| Customize Help

Steps to grab from compliant 3D sensors



The following steps provide a typical methodology to grab into a container from 3D sensors that transmit 3D data in a format defined by an industry standard (such as GigE Vision or GenICam). You can determine whether your 3D sensor transmits data in a format suitable for grabbing directly into a container using MdigInquire() with M_TARGET_BUFFER_OBJECT.

  1. Configure your 3D sensor to transmit the range or disparity component and associated confidence information (either transmitted in a confidence component or in the range/disparity component using an invalid data value). MIL provides the following methods to perform this configuration:

    • Use Matrox Capture Works to configure your 3D sensor at runtime.

    • Use the Feature Browser to configure your 3D sensor at runtime. You can launch the Feature Browser using MdigControl() with M_GC_FEATURE_BROWSER (after allocating your digitizer in step 2).

    • Use MdigControlFeature() to configure your 3D sensor from within your application (after allocating your digitizer in step 2). Optionally, you can preconfigure a GenICam User Set on your device and use this function to select that User Set (with the feature name "UserSetSelector") and load it (with the feature name "UserSetLoad").

    • Use Matrox Intellicam to create a DCF for your device.

  2. Allocate a digitizer for your 3D sensor using MdigAlloc() (specifying the appropriate DCF file if you created one).

  3. Allocate a container with the M_GRAB attribute using MbufAllocContainer(). To display the grabbed data directly using this container, you must also specify the M_DISP attribute.

  4. Grab into the container using MdigGrab(), MdigProcess(), or MdigGrabContinuous(). All components of the container are freed and components appropriate to store the grabbed data are allocated automatically. These components will be reused for subsequent grabs, unless the 3D sensor transmits components that cannot be stored in the automatically allocated components (for example, because the components have a different size for each grab).

  5. If your 3D sensor transmitted multiple sets of components (for example, 2 range components and 2 associated confidence components), allocate a child container to access a single set of components (for example, only the components associated with group 1) using MbufChildContainer().

  6. If required, convert the container to a format that is M_3D_PROCESSABLE or M_3D_DISPLAYABLE using MbufConvert3d().