41. Creates a calibrated point cloud from a range map aquired
5by a laser triangulation setup (for further information see
6<a htref="https://help.commonvisionblox.com/NextGen/15.0/md_theory_of_operation_tools__metric.html">here</a>).
72. Converts it to a numpy array without copying.
83. Modifies point cloud values through numpy.
94. Saves the point cloud.
18print(
"Loading range map and calibration file.")
20),
"tutorial",
"Metric",
"Images",
"RangeMapCalibrationPattern.tif"))
27print(
"Creating calibrated point cloud.")
29 rangemap.planes[0], calibrator, cvb.PointCloudFlags.Float)
35if np_array.flags[
"OWNDATA"]:
39 raise RuntimeError(
"cannot map to numpy array")
42print(
"Modifying point cloud data via numpy array.")
44for i
in range(np_array.shape[0]):
45 for j
in range(np_array.shape[1]):
46 if np_array[i, j, 2] < 0:
53print(
"Saving: ./calibrated_cloud.ply")
54cloud.save(
"calibrated_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:671
The Common Vision Blox image.
Definition: __init__.py:2097
Union[cvb.PointCloud, cvb.DensePointCloud, cvb.SparsePointCloud] create(cvb.ImagePlane range_map, cvb.Calibrator3D calibrator, int flags, Union[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:4701
str install_path()
Directory Common Vision Blox has been installed to.
Definition: __init__.py:8318
numpy.array as_array(Any buffer, bool copy=False)
Maps a cvb object to a numpy array.
Definition: __init__.py:8068