M3dmapAddScan
| Board | Supported |
|---|---|
| Host System | Yes |
| V4L2 | Yes |
| Clarity UHD | Yes |
| Concord PoE | No |
| GenTL | Yes |
| GevIQ | Yes |
| GigE Vision | Yes |
| Indio | No |
| Iris GTX | Yes |
| Radient eV-CL | Yes |
| Rapixo CL | Yes |
| Rapixo CoF | Yes |
| Rapixo CXP | Yes |
| USB3 Vision | Yes |
Extract laser line data from an image and store this data in a 3D reconstruction result buffer.
Syntax
void M3dmapAddScan(
AIL_ID LaserContext3dmapId, //in
AIL_ID Result3dmapId, //out
AIL_ID LaserOrDepthMapImageBufId, //in
AIL_ID IntensityImageBufId, //in
AIL_ID ExtraInfoArrayId, //in
AIL_INT PointCloudLabel, //in
AIL_INT64 ControlFlag //in
)
Description
This function stores laser line data extracted from grabbed images into the specified result buffer.
If the specified result buffer is of type M_LASER_CALIBRATION_DATA, you can use this data to calibrate a laser reconstruction setup using M3dmapCalibrate or M3dmapCalibrateMultiple. If your camera has integrated hardware capable of extracting the laser line data, call M3dmapAddScan with M_LINE_ALREADY_EXTRACTED to skip the extraction process and store laser line data in the result buffer.
If the number of extracted laser lines is greater than the maximum number of lines that can be stored in the result buffer, specified using M3dmapControl with M_MAX_FRAMES, the result buffer's oldest values are overwritten with the new ones.
When specifying a 3D reconstruction result buffer allocated using M_POINT_CLOUD_RESULT, calls to M3dmapAddScan either create a new point cloud in the result buffer and add laser line data to it, or just add laser line data to the specified point cloud in the result buffer. To create a new point cloud, specify a point cloud label that does not currently exist in the specified 3D reconstruction result buffer.
Between each set of scans for different objects or for cumulative extraction mode, you can clear the content of the result buffer using M3dmapClear.
Note: Note that the size and depth of the source image buffer containing the laser lines must not change when making multiple calls to
M3dmapAddScanwith the same destination result buffer.
Note: Unlike most other functions that modify an Aurora Imaging Library object, you can call this function concurrently from multiple threads on the same
M_POINT_CLOUD_RESULTresult buffer (Result3dmapId) without using anM_MUTEXobject. This is valid as long as thePointCloudLabelparameter of the concurrent calls is set to a different index.
Parameters
LaserContext3dmapId (in, AIL_ID)
Specifies the identifier of the 3D reconstruction context. The 3D reconstruction context must have been previously allocated on the required system using M3dmapAlloc with M_LASER.
Result3dmapId (out, AIL_ID)
Specifies the identifier of the 3D reconstruction result buffer in which to store the laser line data. The 3D reconstruction result buffer must have been previously allocated using M3dmapAllocResult with M_LASER_CALIBRATION_DATA, M_POINT_CLOUD_RESULT, or M_DEPTH_CORRECTED_DATA.
LaserOrDepthMapImageBufId (in, AIL_ID)
Specifies the identifier of the image buffer containing the grabbed image of the laser line.
IntensityImageBufId (in, AIL_ID)
Specifies the identifier of the image buffer containing the intensity map, if using a 3D camera. If you are not using a 3D camera, set this parameter to M_NULL. If you use a 3D camera that does not provide intensity map data (or if you want to exclude it), you should also set this parameter to M_NULL.
ExtraInfoArrayId (in, AIL_ID)
Reserved for future expansion. This parameter must be set to M_NULL.
PointCloudLabel (in, AIL_INT)
Specifies the label of the point cloud in the result buffer in which to add the laser line data, if the result buffer has been allocated using M3dmapAllocResult with M_POINT_CLOUD_RESULT. For all other types of 3D reconstruction result buffers, set this parameter to M_DEFAULT.
For specifying the label of a point cloud
| Value | Description |
|---|---|
M_POINT_CLOUD_LABEL | Specifies the label of the point cloud. |
If the result buffer does not contain a point cloud with the specified label, a new point cloud is created in the result buffer. |
ControlFlag (in, AIL_INT64)
Specifies the function's control flag. This parameter must be set to one of the following values:
To specify the function's control flag
| Value | Description |
|---|---|
M_DEFAULT | |
M_EXTRACT_LINE (default) | Extracts the laser line data from the input image, corrects the data if the 3D reconstruction context is calibrated, and stores it in the result buffer. |
M_LINE_ALREADY_EXTRACTED | Specifies that the uncorrected depth map and intensity map are given as input. Specify this control flag only if the 3D Reconstruction module should not perform the laser line extraction, as is the case for 3D cameras that perform laser line extraction. |