Monado OpenXR Runtime
Loading...
Searching...
No Matches
pose_optimize.cpp File Reference

PnP pose optimization using ceres. More...

#include "util/u_logging.h"
#include "tracking/t_camera_models.hpp"
#include "tracking/t_constellation.h"
#include "math/m_api.h"
#include "math/m_eigen_interop.hpp"
#include "math/m_quatexpmap.hpp"
#include "math/m_quatexpmap_bigceres.hpp"
#include "constellation/camera_model.h"
#include <Eigen/Core>
#include <Eigen/Geometry>
#include "ceres/autodiff_cost_function.h"
#include "ceres/problem.h"
#include "ceres/solver.h"
#include "pose_optimize.hpp"
#include "ransac.hpp"
#include "internal_math.hpp"
Include dependency graph for pose_optimize.cpp:

Functions

bool xrt::tracking::constellation::optimizer::optimizePose (u_logging_level log_level, bool deterministic, const camera_model &params, xrt_pose init_pose, t_blob *blobs, uint32_t num_blobs, t_constellation_tracker_led_model *leds_model, t_constellation_device_id_t device_id, xrt_pose &out_pose)
 Does a pose optimization and RANSAC refinement on the given blobs and LED model, returning the optimized pose.
 

Detailed Description

Function Documentation

◆ optimizePose()

bool xrt::tracking::constellation::optimizer::optimizePose ( u_logging_level  log_level,
bool  deterministic,
const camera_model &  params,
xrt_pose  init_pose,
t_blob *  blobs,
uint32_t  num_blobs,
t_constellation_tracker_led_model *  leds_model,
t_constellation_device_id_t  device_id,
xrt_pose &  out_pose 
)

Does a pose optimization and RANSAC refinement on the given blobs and LED model, returning the optimized pose.

Parameters
log_levelThe logging level to use for debug output.
paramsThe camera model parameters.
init_poseThe initial pose estimate to start the optimization from.
blobsThe array of blobs to use for the optimization, will write to here to unmark outliers.
num_blobsThe number of blobs in the array.
leds_modelThe LED model to use for the optimization.
device_idThe device ID to optimize the pose for.
[out]out_poseThe optimized pose will be written to this variable.
Returns
true if the optimization was successful, false otherwise.

References xrt::tracking::constellation::optimizer::optimizePose(), xrt::tracking::constellation::optimizer::ransacPose(), U_LOG_IFL_D, and U_LOG_IFL_E.

Referenced by xrt::tracking::constellation::optimizer::optimizePose().