MIL_ID Result3dmapId, | //in |
MIL_INT64 BoxType, | //in |
MIL_INT64 BoxDefinitionType, | //in |
MIL_DOUBLE XPos1OrSource, | //in |
MIL_DOUBLE YPos1, | //in |
MIL_DOUBLE ZPos1, | //in |
MIL_DOUBLE XPos2OrLength, | //in |
MIL_DOUBLE YPos2OrLength, | //in |
MIL_DOUBLE ZPos2OrLength | //in |
This function sets the extraction box used when generating a depth map. This function must be called prior to calling M3dmapExtract().
All coordinates are expressed in the relative coordinate system of the specified 3D reconstruction result buffer.
The edges of the extraction box are inclusive, which means that points in the point cloud that touch the extraction box are included in the depth map. If one or more of the dimensions of the extraction box are specified as zero, this creates a two-dimensional or one-dimensional extraction box. In this case, only those points that touch the extraction box exactly are included in the depth map. Consequently, to create a depth map representing a single slice or a single line of the point cloud, it is typically preferable to specify very small widths, rather than a zero width.
When setting the extraction box, it is important to take into account the results displacement mode, which specifies whether on-going conveyor movement is included in an object's coordinates. If conveyor displacement is included (M3dmapControl() with M_RESULTS_DISPLACEMENT_MODE set to M_CURRENT), you typically place the extraction box ahead of the laser plane, so that the object has at least partially passed through the laser plane before entering the box. The generated depth map will include whatever portions of objects are in the extraction box at the moment that you call M3dmapExtract(). For more information, see the Specifying the extraction box when including Y-axis displacement subsection of the Generating fully corrected depth and intensity maps section of Chapter 18: 3D reconstruction using laser line profiling.
Specifies the identifier of the 3D reconstruction result buffer for which to specify the extraction box. The 3D reconstruction result buffer must be a point cloud container, which means it must have been allocated on the required system using M3dmapAllocResult() with M_POINT_CLOUD_CONTAINER.
Specifies the type of box to set.
For specifying the type of
box
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_EXTRACTION_BOX. |
||||||||||||||||||||||||||||||||||||||
M_EXTRACTION_BOX |
Specifies to set the extraction box used when generating a depth map of the point clouds in the specified result buffer. |
Specifies how the extraction box is defined.
See the Parameter associations section for possible values that can be specified.
Specifies the X-coordinate of the first point used to define the extraction box, or specifies a MIL identifier used to define the extraction box.
See the Parameter associations section for possible values that can be specified.
Specifies the Y-coordinate of the first point used to define the extraction box. When not in use, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies the Z-coordinate of the first point used to define the extraction box. When not in use, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies the X-coordinate of the second point used to define the extraction box, or the length of the extraction box along the X-axis. When not in use, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies the Y-coordinate of the second point used to define the extraction box, or the length of the extraction box along the Y-axis. When not in use, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies the Z-coordinate of the second point used to define the extraction box, or the length of the extraction box along the Z-axis. When not in use, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
The table below lists possible values for the BoxDefinitionType, XPos1OrSource, YPos1, ZPos1, XPos2OrLength, YPos2OrLength, and ZPos2OrLength parameters.
For specifying the box world
coordinates
|
|||||||||||||||||||||||||||||||||||||||
BoxDefinitionType | Description
|
||||||||||||||||||||||||||||||||||||||
XPos1OrSource | |||||||||||||||||||||||||||||||||||||||
YPos1 | |||||||||||||||||||||||||||||||||||||||
ZPos1 | |||||||||||||||||||||||||||||||||||||||
XPos2OrLength | |||||||||||||||||||||||||||||||||||||||
YPos2OrLength | |||||||||||||||||||||||||||||||||||||||
ZPos2OrLength | |||||||||||||||||||||||||||||||||||||||
M_BOTH_CORNERS |
Specifies to define the extraction box using any two opposite corners. (more details...) |
||||||||||||||||||||||||||||||||||||||
XPos1OrSource |
Specifies the X-coordinate of one corner of the extraction box. |
||||||||||||||||||||||||||||||||||||||
YPos1 |
Specifies the Y-coordinate of one corner of the extraction box. |
||||||||||||||||||||||||||||||||||||||
ZPos1 |
Specifies the Z-coordinate of one corner of the extraction box. |
||||||||||||||||||||||||||||||||||||||
XPos2OrLength |
Specifies the X-coordinate of the second corner of the extraction box, opposite to the first corner. |
||||||||||||||||||||||||||||||||||||||
YPos2OrLength |
Specifies the Y-coordinate of the second corner of the extraction box, opposite to the first corner. |
||||||||||||||||||||||||||||||||||||||
ZPos2OrLength |
Specifies the Z-coordinate of the second corner of the extraction box, opposite to the first corner. |
||||||||||||||||||||||||||||||||||||||
M_BOUNDING_BOX |
Specifies that the extraction box is defined by computing the axis-aligned bounding box of the specified point cloud(s) in the result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
XPos1OrSource |
Specifies the point cloud(s) within the result buffer around which to define the bounding box. (more details...) |
||||||||||||||||||||||||||||||||||||||
Specifies to compute the bounding box of the point cloud with the given index. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the array index of an existing point cloud. |
|||||||||||||||||||||||||||||||||||||||
Specifies to compute the bounding box of the point cloud with the given label. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the label of an existing point cloud. |
|||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies to compute the bounding box around all the points in all the point clouds in the result buffer. |
||||||||||||||||||||||||||||||||||||||
M_CENTER_AND_DIMENSION |
Specifies that the extraction box is defined by its center point and its length along each axis. (more details...) |
||||||||||||||||||||||||||||||||||||||
XPos1OrSource |
Specifies the X-coordinate of the center of the extraction box. |
||||||||||||||||||||||||||||||||||||||
YPos1 |
Specifies the Y-coordinate of the center of the extraction box. |
||||||||||||||||||||||||||||||||||||||
ZPos1 |
Specifies the Z-coordinate of the center of the extraction box. |
||||||||||||||||||||||||||||||||||||||
XPos2OrLength |
Specifies the length of the extraction box along the X-axis. |
||||||||||||||||||||||||||||||||||||||
YPos2OrLength |
Specifies the length of the extraction box along the Y-axis. |
||||||||||||||||||||||||||||||||||||||
ZPos2OrLength |
Specifies the length of the extraction box along the Z-axis. |
||||||||||||||||||||||||||||||||||||||
M_CORNER_AND_DIMENSION |
Specifies that the extraction box is defined by one of its corners and its length (or negative length) along each axis. (more details...) |
||||||||||||||||||||||||||||||||||||||
XPos1OrSource |
Specifies the X-coordinate of one corner of the extraction box. |
||||||||||||||||||||||||||||||||||||||
YPos1 |
Specifies the Y-coordinate of one corner of the extraction box. |
||||||||||||||||||||||||||||||||||||||
ZPos1 |
Specifies the Z-coordinate of one corner of the extraction box. |
||||||||||||||||||||||||||||||||||||||
XPos2OrLength |
Specifies the length of the extraction box along the X-axis. |
||||||||||||||||||||||||||||||||||||||
YPos2OrLength |
Specifies the length of the extraction box along the Y-axis. |
||||||||||||||||||||||||||||||||||||||
ZPos2OrLength |
Specifies the length of the extraction box along the Z-axis. |
||||||||||||||||||||||||||||||||||||||
M_DEPTH_MAP |
Specifies to use an extraction box derived from the depth map in the specified image buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
XPos1OrSource |
Specifies the depth map whose calibration information will be used to define the extraction box and set the world-to-pixel scale. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL 3D depth map image buffer identifier |
Specifies the identifier of a depth map image buffer. |
Header | Include mil.h. |
Library | Use mil.lib; mil3dmap.lib. |
DLL | Requires mil.dll; mil3dmap.dll. |