Calibration Library 1.0.0
A C++ library for camera calibration and vision-related geometric transformations
Loading...
Searching...
No Matches
bundle_utils.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <unordered_map>
5#include <vector>
6
11
13
14struct BundleSensorSetup final {
15 std::vector<PinholeCamera<BrownConradyd>> cameras;
16 std::unordered_map<std::string, std::size_t> sensor_to_index;
17 std::vector<std::string> missing_sensors;
18};
19
21 const BundleRigConfig& rig,
22 const std::unordered_map<std::string, IntrinsicCalibrationOutputs>& intrinsics)
24
25const std::vector<HandEyeObservationConfig>* select_bundle_observations(
26 const BundleRigConfig& rig, const HandEyePipelineConfig* handeye_cfg);
27
28struct SensorAccumulator final {
29 std::vector<Eigen::Isometry3d> base;
30 std::vector<Eigen::Isometry3d> cam;
31};
32
34 nlohmann::json views;
35 std::vector<BundleObservation> observations;
36 std::vector<SensorAccumulator> accumulators;
37 std::size_t used_view_count{0};
38};
39
41 const std::vector<HandEyeObservationConfig>& observation_config,
42 const std::vector<std::string>& sensors,
43 const std::unordered_map<std::string, std::size_t>& sensor_to_index,
44 const std::unordered_map<std::string, SensorDetectionsIndex>& sensor_index,
45 const std::unordered_map<std::string, IntrinsicCalibrationOutputs>& intrinsics)
46 -> BundleViewProcessingResult;
47
49 std::vector<Eigen::Isometry3d> transforms;
50 nlohmann::json report;
51 bool failed{false};
52};
53
55 const BundleRigConfig& rig,
56 const std::unordered_map<std::string, std::unordered_map<std::string, HandeyeResult>>&
57 handeye_results,
58 const std::vector<SensorAccumulator>& accumulators) -> HandeyeInitializationResult;
59
61 Eigen::Isometry3d pose{Eigen::Isometry3d::Identity()};
62 std::string source;
63};
64
66 const std::vector<SensorAccumulator>& accumulators,
67 const std::vector<Eigen::Isometry3d>& init_g_se3_c)
69
70} // namespace calib::pipeline::detail
Hand-eye calibration algorithms and utilities.
const std::vector< HandEyeObservationConfig > * select_bundle_observations(const BundleRigConfig &rig, const HandEyePipelineConfig *handeye_cfg)
auto collect_bundle_sensor_setup(const BundleRigConfig &rig, const std::unordered_map< std::string, IntrinsicCalibrationOutputs > &intrinsics) -> BundleSensorSetup
auto compute_handeye_initialization(const BundleRigConfig &rig, const std::unordered_map< std::string, std::unordered_map< std::string, HandeyeResult > > &handeye_results, const std::vector< SensorAccumulator > &accumulators) -> HandeyeInitializationResult
auto choose_initial_target(const BundleRigConfig &rig, const std::vector< SensorAccumulator > &accumulators, const std::vector< Eigen::Isometry3d > &init_g_se3_c) -> TargetInitializationResult
auto collect_bundle_observations(const std::vector< HandEyeObservationConfig > &observation_config, const std::vector< std::string > &sensors, const std::unordered_map< std::string, std::size_t > &sensor_to_index, const std::unordered_map< std::string, SensorDetectionsIndex > &sensor_index, const std::unordered_map< std::string, IntrinsicCalibrationOutputs > &intrinsics) -> BundleViewProcessingResult
Pipeline configuration helpers for hand-eye and bundle adjustment stages.
Bundle-adjustment rig configuration extending the hand-eye observations.
Definition handeye.h:59
std::unordered_map< std::string, std::size_t > sensor_to_index
std::vector< PinholeCamera< BrownConradyd > > cameras
std::vector< std::string > missing_sensors
std::vector< SensorAccumulator > accumulators
std::vector< BundleObservation > observations
std::vector< Eigen::Isometry3d > transforms
std::vector< Eigen::Isometry3d > cam
std::vector< Eigen::Isometry3d > base