Object used to reconstruct point clouds. More...
Inherits INativeHandle.
Inherited by LaserPlaneCalibrator3D, MatrixCalibrator3D, and PinholeCameraCalibrator3D.
Public Member Functions | |
void | Dispose () |
IDisposable implementation. | |
PointCloud | CreatePointCloud< T > (Image rangeMap) |
Creates a calibrated PointCloud with point type T from the given rangeMap . More... | |
PointCloud | CreatePointCloud (Image rangeMap, PointCloudFlags flags) |
Creates a calibrated PointCloud using the given rangeMap and flags . More... | |
PointCloud | CreatePointCloud (Image rangeMap, PointCloudFlags flags, SensorSettings settings, double encoderStep) |
Creates a calibrated PointCloud using the given rangeMap and flags . More... | |
Static Public Member Functions | |
static Calibrator3D | FromFile (string fileName) |
Loads a 3D calibration file (ASCII string version). More... | |
static T | FromFile< T > (string fileName) |
Loads a 3D calibration file (ASCII string version). More... | |
static Calibrator3D | FromHandle (IntPtr nativeHandle, ShareObject doShare) |
Create a Calibrator3D from a native handle and potentially increment the unmanaged reference count on the native handle. More... | |
Protected Member Functions | |
Calibrator3D (IntPtr handle) | |
Constructor. More... | |
virtual void | Dispose (bool disposing) |
IDisposable helper function. More... | |
Properties | |
IntPtr | Handle [get] |
Native handle of the calibrator. | |
bool | IsDisposed [get] |
Gets if the native handle has been disposed. | |
AffineMatrix3D | ExtrinsicMatrix [get, set] |
Gets/sets the extrinsic transformation matrix of the calibrator. More... | |
double? | RangeMapIgnoreValue [get, set] |
Gets/sets the ignore value for range maps. More... | |
Properties inherited from INativeHandle | |
IntPtr | Handle [get] |
The native handle of the object. | |
bool | IsDisposed [get] |
Possibility to check whether the object has already been disposed of. | |
Events | |
NativeHandleEventDelegate | ObjectDisposing |
Raised when this object is about to be disposed via the IDisposable.Dispose method. More... | |
Events inherited from INativeHandle | |
NativeHandleEventDelegate | ObjectDisposing |
Raised when this object is about to be disposed via the IDisposable.Dispose method. More... | |
Object used to reconstruct point clouds.
|
protected |
Constructor.
handle | Native handle of the calibrator. |
ArgumentException | When handle is IntPtr.Zero. |
PointCloud CreatePointCloud | ( | Image | rangeMap, |
PointCloudFlags | flags | ||
) |
Creates a calibrated PointCloud using the given rangeMap and flags .
Depending on the calibration method the resulting point cloud is a DensePointCloud or a SparsePointCloud.
Note, that if the output point cloud is dense, the confidence layer is always available. Background range map pixels are set non-confident. In case of a sparse point cloud, points representing background values and also the confidence layer are removed (except the user explicitly wants to keep the confidence layer which can be fixed via the point cloud flags).
The following DataType.BytesPerPixel as input for unsigned integer DataType values are supported: 1, 2 and 4. For floating point DataType values only 4 and 8 DataType.BytesPerPixel are supported. Note, that only linear access is supported (check with function ImagePlane.TryGetLinearAccess).
rangeMap | Range map to use. |
flags | Flags used for point cloud creation. |
PointCloud CreatePointCloud | ( | Image | rangeMap, |
PointCloudFlags | flags, | ||
SensorSettings | settings, | ||
double | encoderStep | ||
) |
Creates a calibrated PointCloud using the given rangeMap and flags .
Note, that the calibration parameters always refer to the whole sensor (with no mirroring of the pixel coordinates). If the camera settings indicate, that a sensor ROI is given or pixel coordinates are mirrored, the range map values will be transformed to the sensor coordinates before applying the calibration parameters. If the user acquires the range map to be calibrated and uses sensor settings different from the default ones, he has to set them correctly via this function.
If you only like to change one or two settings and do not want to care about the other parameters, you can get the default settings via LaserPlaneCalibrator3D.SensorSettings, change the relevant settings within the struct and pass it to CreatePointCloud. The default encoder step can also be get from the calibrator via LaserPlaneCalibrator3D.YFactor.
Depending on the calibration method the resulting point cloud is a DensePointCloud or a SparsePointCloud.
Note, that if the output point cloud is dense, the confidence layer is always available. Background range map pixels are set non-confident. In case of a sparse point cloud, points representing background values and also the confidence layer are removed (except the user explicitly wants to keep the confidence layer which can be fixed via the point cloud flags).
The following DataType.BytesPerPixel as input for unsigned integer DataType values are supported: 1, 2 and 4. For floating point DataType values only 4 and 8 DataType.BytesPerPixel are supported. Note, that only linear access is supported (check with function ImagePlane.TryGetLinearAccess).
rangeMap | Range map to use. |
flags | Flags used for point cloud creation. |
settings | Sensor settings applied during the acquisition of the range map. |
encoderStep | Encoder step. |
PointCloud CreatePointCloud< T > | ( | Image | rangeMap | ) |
Creates a calibrated PointCloud with point type T from the given rangeMap .
The following DataType.BytesPerPixel as input for unsigned integer DataType values are supported: 1, 2 and 4. For floating point DataType values only 4 and 8 DataType.BytesPerPixel are supported. Note, that only linear access is supported (check with function ImagePlane.TryGetLinearAccess).
T | Point type to create; e.g. Point3Dcf. |
rangeMap | Range map to use. |
T | : | struct |
|
protectedvirtual |
IDisposable helper function.
disposing |
|
static |
Loads a 3D calibration file (ASCII string version).
fileName | Full path to the file to load. |
ArgumentException | When the fileName is null or empty. |
CvbException | When loading the Calibrator3D from file failed. |
|
static |
Loads a 3D calibration file (ASCII string version).
fileName | Full path to the file to load. |
T | Type of the calibrator. |
ArgumentException | When the fileName is null or empty. |
CvbException | When loading the Calibrator3D from file failed. |
T | : | Calibrator3D |
|
static |
Create a Calibrator3D from a native handle and potentially increment the unmanaged reference count on the native handle.
Note that this function is not intended for general use. Providing invalid values on the nativeHandle parameter will most likely lead to severe problems in your application.
nativeHandle | Handle to create the image from. |
doShare | ShareObject.Yes if nativeHandle is to be shared. |
null
of no object could be created.
|
getset |
Gets/sets the extrinsic transformation matrix of the calibrator.
CvbException | When setting or getting the extrinsic matrix failed. |
|
getset |
Gets/sets the ignore value for range maps.
An value equal to this one in an input range map will have its confidence in the resulting point being set to 0.
If a non-null
value is set the resulting point cloud will always have a confidence plane!
Value to ignore in an input range map; null
if no values are to be ignored.
NativeHandleEventDelegate ObjectDisposing |
Raised when this object is about to be disposed via the IDisposable.Dispose method.
This event is raised right before this object is disposed. The dispose itself cannot be canceled.