| Customize Help
| Save Settings

M3dimMesh



Function Map
Synopsis
Create a 3D mesh structure for a point cloud.
Syntax
void M3dimMesh(
MIL_ID MeshContext3dimId, //in
MIL_ID SrcContainerBufId, //in
MIL_ID DstContainerBufId, //in
MIL_INT64 ControlFlag //in
)
Description

This function generates a triangular mesh structure for the source container's point cloud, using the specified surface reconstruction mode. The mesh data is stored in an M_COMPONENT_MESH_MIL component, which is added to the destination container.

You can choose from 1 of 2 surface reconstruction modes to create the mesh: organized or smoothed.

The organized surface reconstruction mode requires an organized point cloud and connects neighboring points to create the mesh. With this mode, invalid data points in the point cloud result in a mesh with holes. No change is made to the source container's M_COMPONENT_RANGE and M_COMPONENT_CONFIDENCE components; they are simply copied over to the destination container. If the components M_COMPONENT_INTENSITY, M_COMPONENT_NORMALS_MIL, and M_COMPONENT_REFLECTANCE exist in the source container, these are also copied to the destination container.

The smoothed surface reconstruction mode requires normal vectors at each 3D point (M_COMPONENT_NORMALS_MIL component) and generates a mesh by solving a Poisson equation. This approach results in a mesh without holes. Before solving the Poisson equation, an octree is built, which partitions the 3D space for the mesh calculation. The octree's depth determines the mesh's resolution. Note that a higher octree depth gives a higher resolution, but a slower calculation time. Smoothed surface reconstruction generates a new point cloud; new M_COMPONENT_RANGE and M_COMPONENT_CONFIDENCE components are added to the destination container, along with the mesh component.

Note that, when using the smoothed surface reconstruction mode, no M_COMPONENT_NORMALS_MIL component is added to the destination container.

To determine the number of triangular faces in the mesh, inquire the M_COMPONENT_MESH_MIL component using MbufInquireContainer() with M_SIZE_X.

Inquiring the M_SIZE_Y value of the M_COMPONENT_MESH_MIL component returns 3 for an unorganized destination point cloud (3 vertices for each triangular face), and 6 for an organized destination point cloud (3 vertices with corresponding coordinates in both X and Y).

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
MeshContext3dimId

Specifies a mesh 3D image processing context.

function map For specifying the mesh 3D image processing context identifier
Click to summarizeValue Description
Click to summarize M_MESH_CONTEXT_ORGANIZED

Specifies a predefined mesh 3D image processing context with all mesh context control types (M3dimControl()) set to their default, except for M_MESH_MODE which is set to M_MESH_ORGANIZED. Use this predefined context to create the mesh using the organized surface reconstruction mode.

With surface reconstruction from an organized point cloud, neighboring points are connected. Any invalid points will result in a mesh with holes.

(summarize)
Click to summarize M_MESH_CONTEXT_SMOOTHED

Specifies a predefined mesh 3D image processing context with all mesh context control types (M3dimControl()) set to their default, except for M_MESH_MODE which is set to M_MESH_SMOOTHED. Use this predefined context to create the mesh using the smoothed surface reconstruction mode.

With the smoothed surface reconstruction mode, the mesh structure is extrapolated from existing points and any holes are filled.

(summarize)
Click to summarize MIL mesh 3D image processing context
identifier

Specifies the identifier of a mesh 3D image processing context, previously allocated using M3dimAlloc() with M_MESH_CONTEXT.

If a previously allocated context is specified, the function applies the mesh control settings specified using M3dimControl().

(summarize)
SrcContainerBufId

Specifies the identifier of the 3D-processable point cloud container to use as the source. The container must be 3D-processable (that is, if you call MbufInquireContainer() with M_3D_PROCESSABLE, the function returns M_PROCESSABLE).

The container must have been previously allocated using MbufAllocContainer() with M_PROC. The container must have the components M_COMPONENT_RANGE and M_COMPONENT_CONFIDENCE.

DstContainerBufId

Specifies the identifier of the destination container, previously allocated using MbufAllocContainer() with M_PROC. The destination container must not be a child container.

The destination container's M_COMPONENT_MESH_MIL component stores the mesh data in an unsigned, 32-bit, 1-band, 2D array buffer.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dim.lib.
DLL Requires mil.dll; mil3dim.dll.
MESH CONTEXT ORGANIZED MESH CONTEXT SMOOTHED NOT PROCESSABLE PROC