3#include "../calibrator_3d.hpp"
6#include "_decl/decl_metric_calibration_configuration.hpp"
7#include "_decl/decl_metric_segmentor_dense_point_cloud_aqs12.hpp"
8#include "_decl/decl_metric_segmentor_range_map_aqs12.hpp"
9#include "_detail/detail_metric_segmentor.hpp"
25 using AQS12DensePointCloudSegmentorPtr = std::shared_ptr<AQS12DensePointCloudSegmentor>;
26 using AQS12RangeMapSegmentorPtr = std::shared_ptr<AQS12RangeMapSegmentor>;
70 Internal::DoResCallShareOut<Calibrator3D>([&](
void *&handle) {
71 return CVB_CALL_CAPI(CVMAQS12CreateIntrinsicCalibratorFromPiece(
73 reinterpret_cast<CExports::CVC3DPointD *
>(result.second.data())));
105 Internal::DoResCallShareOut<Calibrator3D>([&](
void *&handle) {
106 return CVB_CALL_CAPI(CVMAQS12CreateIntrinsicCalibratorFromPieceRect(
107 imagePlane.
Handle(), 0, aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), segmentor.
Handle(),
108 config.
Handle(), handle,
reinterpret_cast<CExports::CVC3DPointD *
>(result.second.data())));
142 Internal::DoResCall([&]() {
143 return CVB_CALL_CAPI(CVMAQS12CalculateCorrectionOfLaserPlaneInclinationWithParamsFromPiece(
145 *
reinterpret_cast<CExports::CVC3DTransformation *
>(&trafo),
146 *
reinterpret_cast<CExports::CVC3DAffineTransformationParameters *
>(&trafoPara),
147 reinterpret_cast<CExports::CVC3DPointD *
>(residuals.data())));
190 Internal::DoResCall([&]() {
191 return CVB_CALL_CAPI(CVMAQS12CalculateCorrectionOfLaserPlaneInclinationWithParamsFromPieceRect(
192 cloud.
Handle(), aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), segmentor.
Handle(), config.
Handle(),
193 *
reinterpret_cast<CExports::CVC3DTransformation *
>(&trafo),
194 *
reinterpret_cast<CExports::CVC3DAffineTransformationParameters *
>(&trafoPara),
195 reinterpret_cast<CExports::CVC3DPointD *
>(residuals.data())));
223 Internal::DoResCall([&]() {
224 return CVB_CALL_CAPI(CVMAQS12CalculateRigidBodyTransformationWithParamsFromPiece(
227 *
reinterpret_cast<CExports::CVC3DTransformation *
>(&trafo),
228 *
reinterpret_cast<CExports::CVC3DAffineTransformationParameters *
>(&trafoPara),
229 reinterpret_cast<CExports::CVC3DPointD *
>(residuals.data())));
259 Internal::DoResCall([&]() {
260 return CVB_CALL_CAPI(CVMAQS12CalculateRigidBodyTransformationWithParamsFromPieceRect(
261 cloud.
Handle(), aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), segmentor.
Handle(),
263 *
reinterpret_cast<CExports::CVC3DTransformation *
>(&trafo),
264 *
reinterpret_cast<CExports::CVC3DAffineTransformationParameters *
>(&trafoPara),
265 reinterpret_cast<CExports::CVC3DPointD *
>(residuals.data())));
Affine transformation for 3D containing a transformation matrix and a translation vector.
Definition affine_matrix_3d.hpp:140
A dense Cartesian 3D point cloud object.
Definition decl_dense_point_cloud.hpp:30
Object to collect all input parameters for the AQS12 calibration piece.
Definition decl_metric_aqs12_calibration_piece.hpp:28
double TopBasePlaneDistance() const noexcept
Gets the distance between the top and base plane.
Definition decl_metric_aqs12_calibration_piece.hpp:56
const std::array< Point3D< double >, 12 > & Points() const noexcept
Gets array with AQS12 points.
Definition decl_metric_aqs12_calibration_piece.hpp:46
Segmentor object to configure face segmentation of AQS12 calibration piece on dense point clouds.
Definition decl_metric_segmentor_dense_point_cloud_aqs12.hpp:19
Segmentor object to configure face segmentation of AQS12 calibration piece on range maps.
Definition decl_metric_segmentor_range_map_aqs12.hpp:19
Calibration configuration object.
Definition decl_metric_calibration_configuration.hpp:47
void * Handle() const noexcept
Returns C-API style handle to Node Object.
Definition decl_metric_calibration_configuration.hpp:319
void * Handle() const noexcept
Returns C-API style handle to Node Object.
Definition decl_metric_segmentor_dense_point_cloud.hpp:123
void * Handle() const noexcept
Returns C-API style handle to Node Object.
Definition decl_metric_segmentor_range_map.hpp:133
Image plane information container.
Definition decl_image_plane.hpp:29
void * Handle() const noexcept override
Classic API image handle.
Definition detail_image_plane.hpp:35
void * Handle() const noexcept
Returns C-API style handle to Node Object.
Definition decl_point_cloud.hpp:773
Rectangle object.
Definition rect.hpp:24
This class is a replacement for C++17 std::optional.
Definition optional.hpp:61
Namespace for metric calibration.
Definition decl_metric_aqs12_calibration_piece.hpp:19
std::pair< LaserPlaneHomographyCalibrator3DPtr, std::array< Point3D< double >, 12 > > AQS12CalibratorResult
Result for calculating the calibrator based on the AQS12 calibration piece.
Definition metric_aqs12.hpp:32
TransformationResult CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece(const DensePointCloud &cloud, const AQS12DensePointCloudSegmentor &segmentor, const CalibrationConfiguration &config)
Calculates an extrinsic calibration and the correction for the laser plane inclination (affine transf...
Definition metric_aqs12.hpp:134
AQS12CalibratorResult CreateCalibratorFromAqs12Piece(const ImagePlane &imagePlane, const AQS12RangeMapSegmentor &segmentor, const CalibrationConfiguration &config)
Calculates intrinsic and extrinsic calibration parameters from the given range map image of an AQS12 ...
Definition metric_aqs12.hpp:64
RigidBodyTransformationResult CalculateRigidBodyTransformationFromAqs12Piece(const DensePointCloud &cloud, const AQS12DensePointCloudSegmentor &segmentor, const AQS12Piece &aqs12)
Calculates a rigid body transformation from a given dense point cloud of an AQS12 calibration piece.
Definition metric_aqs12.hpp:216
std::tuple< AffineMatrix3D, Cvb::optional< std::vector< Point3D< double > > >, Cvb::optional< AffineTransformationParameters > > TransformationResult
Result for calculating an extrinsic transformation.
Definition metric.hpp:41
std::tuple< AffineMatrix3D, Cvb::optional< std::vector< Point3D< double > > >, AffineTransformationParameters > RigidBodyTransformationResult
Result for calculating a rigid body transformation.
Definition metric.hpp:49
Namespace for the Foundation package.
Definition decl_metric_aqs12_calibration_piece.hpp:11
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
T dynamic_pointer_cast(T... args)