MaskEditorTool

Hint

For new applications starting with VisionPro 9.5 SR1, the use of the CogMaskCreatorTool is recommended.

Many vision tasks require the use of mask images. There is a mask editor in Cognex VisionPro, but it is only available for a few tools. The MaskEditorTool makes the mask editor accessible as a standalone tool.

../../../_images/MaskEditorTool.png

Under Settings the current input image is taken over as the new training image with Grab train image. From the training image, the fixtures are used to fix the mask image created later. This means that the mask image is always placed correctly over the input image, positioning via offsets is not necessary.

Create mask from train binarizes the training image with the threshold specified in Binarize mask threshold, creating an initial approximation of the mask. With Invert the binarization is inverted.

Finally, Edit mask opens the Cognex mask editor, in which the mask image can be edited. The mask image is edited as an overlay that is superimposed on the training image. For a description of the mask editor, please refer to the Cognex VisionPro documentation.

The mask image is superimposed on the current input image as described above. Due to the necessary transformation, the edges of the mask image are interpolated, resulting in gray transitions. In order to obtain a binary image again at the end, Binarize output image can be selected. The image is then binarized with the threshold value specified under Binarize output threshold.

Hint

As of VisionPro 9.5 SR 1, mask images can also be defined based on regions using the new CogMaskCreatorTool.