MIL_ID Geometry3dmapId, | //in |
MIL_INT64 GeometryType, | //in |
MIL_INT64 OperationType, | //in |
MIL_DOUBLE Param1, | //in |
MIL_DOUBLE Param2, | //in |
MIL_DOUBLE Param3, | //in |
MIL_DOUBLE Param4, | //in |
MIL_DOUBLE Param5 | //in |
This function allows you to define a geometry object, either by letting the 3D Reconstruction module compute the geometry that best fits a depth map, or by explicitly specifying the coefficients of the geometry's equation in world units.
If performing a fit operation, it is possible to specify an image buffer that acts as a mask, where pixels set to 0 will not be used in the fit. For example, masking pixels that represent a scanned object in the depth map can be useful when using the fit operation to define a new reference plane. Note that missing data (gaps) in the depth map is also ignored when fitting.
When fitting, it is also possible to specify an outlier distance along the Z-axis, beyond which no input data is considered for the fit operation. When specifying an outlier distance, the fit operation is performed in two phases. A preliminary fit is performed on all points (except those ignored if passing an image mask). Afterwards, points that are beyond the outlier distance are excluded, and a second fit operation is performed on the remaining points.
After defining a geometry object, it is possible to inquire whether the operation was successful using M3dmapInquire() with M_STATUS. After performing a successful fit operation, you can inquire the root mean squared error of the operation using M3dmapInquire() with M_FIT_RMS_ERROR. You can also inquire the geometry type using M3dmapInquire() with M_GEOMETRY_TYPE, or inquire the coefficients of the geometry's equation using M3dmapInquire() with M_FIT_PARAM_Z0, M_FIT_PARAM_AX, or M_FIT_PARAM_AY.
Specifies the identifier of a geometry object. The geometry object must have been previously allocated on the required system using M3dmapAlloc().
Specifies the type of geometry object to define.
See the Parameter associations section for possible values that can be specified.
Specifies whether to define the geometry object by explicitly providing the coefficients of the geometry's equation or by applying a best-fit geometry operation on the depth map.
See the Parameter associations section for possible values that can be specified.
Specifies information about the geometry object used for the operation. Its definition is dependent on the specified operation and the geometry object type.
If this parameter is not used it must be set to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies information about the geometry object used for the operation. Its definition is dependent on the specified operation and the geometry object type.
If this parameter is not used it must be set to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies information about the geometry object used for the operation. Its definition is dependent on the specified operation and the geometry object type.
If this parameter is not used it must be set to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
The table below lists possible values for the GeometryType, OperationType, Param1, Param2, and Param3 parameters.
For defining the type of geometry object
used for the operation
|
|||||||||||||||||||||||||||||||||||||||
OperationType |
Description
|
||||||||||||||||||||||||||||||||||||||
GeometryType | |||||||||||||||||||||||||||||||||||||||
Param1 | |||||||||||||||||||||||||||||||||||||||
Param2 | |||||||||||||||||||||||||||||||||||||||
Param3 | |||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the geometry is defined from the specified depth map. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HORIZONTAL_PLANE |
Specifies a horizontal plane described by the equation z(x,y) = z0 . (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the identifier of the image buffer representing the depth map on which to fit the horizontal plane. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param2 |
Specifies whether to use an image mask, and if so, the image buffer to use as the image mask. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that no image mask is used. |
||||||||||||||||||||||||||||||||||||||
Mask image buffer identifier |
Specifies the identifier of the image buffer to use as an image mask. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param3 |
Specifies the outlier distance, if needed. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_INFINITE. |
||||||||||||||||||||||||||||||||||||||
M_INFINITE |
Specifies that no pixel will be excluded when performing the fit operation (except for pixels optionally excluded by means of an image mask). |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the outlier vertical distance to use, in world units. |
||||||||||||||||||||||||||||||||||||||
M_PLANE |
Specifies an arbitrary plane described by the equation z(x,y) = z0 + Ax*x + Ay*y . (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the identifier of the image buffer representing the depth map on which to fit the plane. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param2 |
Specifies whether to use an image mask, and if so, the image buffer to use as the image mask. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that no image mask is used. |
||||||||||||||||||||||||||||||||||||||
Mask image buffer identifier |
Specifies the identifier of the image buffer to use as an image mask. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param3 |
Specifies the outlier distance, if needed. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_INFINITE. |
||||||||||||||||||||||||||||||||||||||
M_INFINITE |
Specifies that no pixel will be excluded when performing the fit operation (except for pixels optionally excluded by means of an image mask). |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the outlier vertical distance to use, in world units. |
||||||||||||||||||||||||||||||||||||||
M_PARAMETRIC |
Specifies that the geometry is explicitly defined. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HORIZONTAL_PLANE |
Specifies a horizontal plane described by the equation z(x,y) =z0 . (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the value of the coefficient z0 (Z-intercept). INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PLANE |
Specifies an arbitrary plane described by the equation z(x,y) = z0 + Ax*x + Ay*y . (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the value of the coefficient z0 (Z-intercept). INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Param2 |
Specifies the value of the coefficient A x. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Param3 |
Specifies the value of the coefficient A y. INQ (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; mil3dmap.lib. |
DLL | Requires mil.dll; mil3dmap.dll. |