2CVBpy Example Script for AQS12 Calibration - Use Case 3.
4This example shows how to bring an intrinsically calibrated point cloud to
5a world coordinate system via a rigid body transformation.
6This workflow is recommended for area 3D compact sensors.
8See also use case 3 described in the CVB Metric documentation:
9https://help.commonvisionblox.com/NextGen/14.1/md_theory_of_operation_tools__metric.html#calibration_setup
11The rigid body transformation solely inlcudes rotation and translation.
39print(
"Estimation of a rigid body transformation (rotation and translation)")
42print(
"Loading range map and calibration file.")
44),
"tutorial",
"Metric",
"Images",
"RangeMapCalibrationPattern.tif"))
49calibrator.range_map_ignore_value = 0
51 rangemap.planes[0], calibrator, cvb.PointCloudFlags.Float)
58 cvb.foundation.SegmentationMethod.KmeansClustering)
61print(
"Estimating a rigid-body transformation.")
63 cloud_intrinsic, segmentor, aqs12)
64calibrator.extrinsic_matrix = result[0]
66rotation = calibrator.extrinsic_matrix.matrix.rotation_angles
67print(
"transformation results:")
68print(
"rotation about (x/y/z): ",
69 rotation[0],
"/", rotation[1],
"/", rotation[2],
"degree")
70print(
"translation in (x/y/z): ", calibrator.extrinsic_matrix.translation[0],
"/",
71 calibrator.extrinsic_matrix.translation[1],
"/", calibrator.extrinsic_matrix.translation[2],
"mm")
74print(
"Creating calibrated point cloud.")
76 rangemap.planes[0], calibrator, cvb.PointCloudFlags.Float)
79 cloud.save(
"cloud.ply")
Union[cvb.Calibrator3DAT, cvb.LaserPlaneHomographyCalibrator3D, cvb.LaserPlaneZigZagCalibrator3D, cvb.FactorsCalibrator3D, cvb.MatrixCalibrator3D, cvb.PinholeCameraCalibrator3D] load(str file_name)
Loads a 3D calibration from file.
Definition: __init__.py:612
The Common Vision Blox image.
Definition: __init__.py:2038
Multi-purpose 3D vector class.
Definition: __init__.py:4261
cvb.DensePointCloud create_dense(cvb.ImagePlane range_map, cvb.Calibrator3D calibrator, int flags)
Creates a new dense Cartesian 3D point cloud from the given 2.5D range map image.
Definition: __init__.py:4671
Union[cvb.PointCloud, cvb.DensePointCloud, cvb.SparsePointCloud] create(cvb.ImagePlane range_map, cvb.Calibrator3D calibrator, int flags, Optional[Type[cvb.PointCloud|cvb.DensePointCloud|cvb.SparsePointCloud]] point_cloud_type=DensePointCloud)
Creates a new Cartesian 3D point cloud from the given 2.5D range map image.
Definition: __init__.py:4640
cvb.foundation.AQS12DensePointCloudSegmentor create(int method)
Creates an AQS12 segmentor for dense point clouds based on given segmentation method.
Definition: __init__.py:18
Object to collect all input parameters for the AQS12 calibration piece.
Definition: __init__.py:76
Common Vision Blox Foundation module for Python.
Definition: __init__.py:1
Tuple[cvb.AffineMatrix3D, List[cvb.Point3D]] calculate_rigid_body_transformation_from_aqs12_piece(cvb.DensePointCloud cloud, cvb.foundation.AQS12DensePointCloudSegmentor segmentor, cvb.foundation.AQS12Piece aqs12, Optional[cvb.Rect] aoi)
Calculates the correction of the laser plane inclination (affine transformation) from the given dense...
Definition: __init__.py:2232
str install_path()
Directory Common Vision Blox has been installed to.
Definition: __init__.py:8257