Use Case Tutorial:

Pattern Matching with Polarized DoLP Image in MVTec HALCON

With tutorial and sample source code

With on-camera polarization processing, LUCID’s polarization cameras can be connected with GigE Vision and GenICam machine vision software for users to leverage the image processing libraries. Although there are no standardized pixel formats for polarized data, LUCID’s polarization camera allows for the mapping of DoLP polarized data to standard monochrome pixel formats. This enables the polarized data to be imported into third party software.

In applications such as parts matching, it is important to capture a clear outline of the object in order for the matching algorithm to be effective. However phenomenons such as glare could make the object shape more difficult to distinguish. The DoLP data from a polarization camera can capture a clear outline of the edges and corners and is less susceptible to glare. The following example demonstrates how to configure the camera in MVTec HALCON to perform pattern matching on reflective, metal objects.

Requirements:

  • Triton (TRI050S-P/Q) or Phoenix (LPHX050S-P/Q) 5.0 MP Polarization Camera
  • Triton 5.0 MP Polarized Firmware Version: 1.32.0.0 or higher or
  • Phoenix 5.0 MP Polarized Firmware Version: 1.40.0.0 or higher
  • MVTec HALCON – Win 32/64-bit Version: 13.0.1.1 or higher

Pattern Matching with Polarized DoLP Image in MVTec HALCON

Step 1. Connect LUCID’s polarization camera to MVTec HALCON

Please refer to our getting started guide on connecting to the software. Proceed to Step 2 once the camera is connected to MVTec HALCON.

Step 2. Enable DoLP pixel mapping to Mono8

In order to import DoLP data into HALCON, the DoLP data has to be mapped to a supported pixel format such as Mono8. By default, the mapping of the polarized data is not enabled. To enable this, select ImageFormatControl and set PixelFormatMappingEnable from 0 to 1.

After the mapping is enabled, click “Snap” under the “Connection” tab. The camera should send a DoLP image as a Mono8 image to HALCON. The same can be done for a color polarization camera using a Bayer8 image.

Step 3. 2D Matching using HALCON

The source code below provides an example of using planar deformable matching to match objects in the DoLP image. The benefit of this type of matching is that objects with perspective deformation can also be matched.

Conclusion

Without on-camera polarization processing, users would have to import raw data into MVTec HALCON and develop their own polarization processing algorithm before the data could be used with HALCON libraries. With LUCID’s on-camera polarization processing, users can import the data directly in to any GigE Vision software which speeds up integration time.