MIL_ID Result3dmapId, | //in |
MIL_INT LabelOrIndex, | //in |
MIL_INT64 Feature, | //in |
MIL_INT64 Type, | //in |
MIL_INT ArraySize, | //in |
const void *Coord1OrPackedArrayPtr, | //in |
const void *Coord2ArrayPtr, | //in |
const void *Coord3ArrayPtr, | //in |
MIL_ID CalibratedMilObjectId, | //in |
MIL_INT64 ControlFlag | //in |
This function creates a new point cloud or repopulates an existing point cloud. This function is used as an alternative to M3dmapAddScan(), typically with points generated using third-party hardware or software. This function cannot add additional points to an existing point cloud; rather, it deletes the existing points and adds new points to the original point cloud. While it cannot add additional points to a point cloud, the function can affect point features, such as intensity, of an existing point cloud. The function can add point features, delete point features, and write over point features associated with points in the point cloud.
All point clouds created with or repopulated with M3dmapPut() are of type M_UNORGANIZED. If an existing point cloud is specified that is not of type M_UNORGANIZED (such as point clouds of type M_LASER_SCAN), an error occurs.
If you specify an array with one sort of point feature (position or intensity) and you specify an unorganized point cloud that already exists, you overwrite the same point feature of each existing point, but keep the remaining features of each point. For instance, if Feature is set to M_POSITION, and you specify an existing point cloud that has both position and intensity data, you will overwrite the existing position data of each point, but will keep the existing intensity data of each point. When overwriting intensity data, you keep the existing position data intact.
All points in a point cloud populated using M3dmapPut() are assumed to be in the absolute coordinate system, unless a relative coordinate system is specified using CalibratedMilObjectId.
When you are overwriting existing points with new points, you must put the same number of points as existed in the previous point cloud. If necessary, the array you specify with the new points should include any invalid points as place holders. This keeps the total number of places the same. It is also possible that, when creating a new point cloud, you want to store the invalid points in your array (for instance, to maintain the structure of how your points are internally represented). When adding points to a point cloud, whether creating a new point cloud or overwriting existing points, invalid points are generally represented with an X-, Y-, and Z-coordinate set to M_INVALID_POINT. How to specify an invalid point can differ, depending on the data type of your data. Note that it is possible that a feature, such as M_INTENSITY, has a valid value, while the point to which it corresponds is an invalid point with M_INVALID_POINT coordinates. In this case, you typically set the corresponding feature value to 0.
Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same M_POINT_CLOUD_CONTAINER result buffer (Result3dmapId) without using a M_MUTEX object. This is valid as long as the LabelOrIndex parameter of the concurrent calls is set to a different index.
Specifies the identifier of the 3D reconstruction result buffer in which to store the points. The 3D reconstruction result buffer must have been allocated on the required system using M3dmapAllocResult() with M_POINT_CLOUD_CONTAINER.
Specifies the label or index of the point cloud in which to add or replace point data.
For specifying the label or index of a
point cloud
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
||||||||||||||||||||||||||||||||||||||
Specifies the index of an existing point cloud in the specified 3D reconstruction result buffer. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the index of an existing point cloud. |
|||||||||||||||||||||||||||||||||||||||
Specifies the label of a point cloud in the specified 3D reconstruction result buffer. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the label of a point cloud. |
|||||||||||||||||||||||||||||||||||||||
|
Specifies the type of data (position or intensity) to overwrite/add to the point cloud.
See the Parameter associations section for possible values that can be specified.
Specifies a combination of two values: the data type and depth of the data in the arrays.
When you are deleting feature data, such as the intensity, you must set this parameter to M_DEFAULT.
Specify one of the following:
For specifying the depth and data type of
the elements in the array
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_FLOAT + 32 |
Specifies that the data in each element of the arrays is a 32-bit floating-point number. |
||||||||||||||||||||||||||||||||||||||
M_FLOAT + 64 |
Specifies that the data in each element of the arrays is a 64-bit floating-point number. |
||||||||||||||||||||||||||||||||||||||
M_UNSIGNED + 8 |
Specifies that the data in each element of the arrays is an 8-bit unsigned integer. |
||||||||||||||||||||||||||||||||||||||
M_UNSIGNED + 16 |
Specifies that the data in each element of the arrays is an 16-bit unsigned integer. |
Specifies the number of elements in each specified array.
For specifying the size of specified
arrays
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that no arrays are specified. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the size of the specified arrays. |
Specifies the address of an array containing the X-coordinates or the intensities of the points, or a packed array containing all the data of the points.
The specified array must be the exact size it needs to be; otherwise an error is reported. The exact size is determined based on the number of points in the point cloud and the feature you are adding.
If you are deleting intensity data from an existing point cloud, set this parameter to M_NULL.
See the Parameter associations section for possible values that can be specified.
Specifies the address of an array containing the Y-coordinates of the points.
If you are deleting intensity data from an existing point cloud, or this parameter is not being used, set this parameter to M_NULL.
See the Parameter associations section for possible values that can be specified.
Specifies the address of an array containing the Z-coordinates of the points.
If you are deleting intensity data from an existing point cloud, or this parameter is not being used, set this parameter to M_NULL.
See the Parameter associations section for possible values that can be specified.
Specifies a calibrated MIL object (McalAlloc() set to M_3D_ROBOTICS or M_TSAI_BASED) whose relative coordinate system is used to express the given 3D points. Typically, calibrations are associated with images and digitizers; however, many other MIL objects can also be associated with calibrations. For more on how calibration information is stored and associated with other MIL objects, see the Propagating calibration information after performing a geometric operation section of Chapter 25: Calibrating your camera setup.
If CalibratedMilObjectId is set to M_NULL, the relative coordinate system is considered to be the same as the absolute coordinate system.
If you are not adding or modifying position data, that is, if Feature is set to M_INTENSITY, set this parameter to M_NULL.
The table below lists possible values for the Feature, Coord1OrPackedArrayPtr, Coord2ArrayPtr, and Coord3ArrayPtr parameters.
For putting points and data in a 3D reconstruction result buffer of type M_POINT_CLOUD_CONTAINER.
For putting points and data in a 3D
reconstruction result buffer of type
M_POINT_CLOUD_CONTAINER
|
|||||||||||||||||||||||||||||||||||||||
Feature |
Description
|
||||||||||||||||||||||||||||||||||||||
Coord1OrPackedArrayPtr | |||||||||||||||||||||||||||||||||||||||
Coord2ArrayPtr | |||||||||||||||||||||||||||||||||||||||
Coord3ArrayPtr | |||||||||||||||||||||||||||||||||||||||
M_INTENSITY |
Specifies to add or remove the intensity (or gray level) at each point of an existing point cloud in the 3D reconstruction result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
Coord1OrPackedArrayPtr |
Data
type info
Specifies an array with the intensity (or gray level) of the points. |
||||||||||||||||||||||||||||||||||||||
M_POSITION |
Specifies to add position data to the point cloud using three separate arrays, one for each coordinate. (more details...) |
||||||||||||||||||||||||||||||||||||||
Coord1OrPackedArrayPtr |
Data
type info
Specifies the array with the X-coordinates. |
||||||||||||||||||||||||||||||||||||||
Coord2ArrayPtr |
Data
type info
Specifies the array with the Y-coordinates. |
||||||||||||||||||||||||||||||||||||||
Coord3ArrayPtr |
Data
type info
Specifies the array with the Z-coordinates. |
||||||||||||||||||||||||||||||||||||||
M_XYZ |
Specifies to add position data to the point cloud from a single packed array. (more details...) |
||||||||||||||||||||||||||||||||||||||
Coord1OrPackedArrayPtr |
Data
type info
Specifies an array with coordinates in the following format: [X0, Y0, Z0, X1, Y1, Z1,...]. |
||||||||||||||||||||||||||||||||||||||
M_XYZI |
Specifies to add position and intensity data to the point cloud from a single packed array. (more details...) |
||||||||||||||||||||||||||||||||||||||
Coord1OrPackedArrayPtr |
Data
type info
Specifies an array with coordinates in the following format: [X0, Y0, Z0, I0, X1, Y1, Z1, I1,...]. |
Header | Include mil.h. |
Library | Use mil.lib; mil3dmap.lib. |
DLL | Requires mil.dll; mil3dmap.dll. |