Using the Check Presence With Gray Features Tool in Merlic

As its name implies, the Check Presence with Gray Features tool is used to detect the presence or absence of objects based on trained gray value features found in user-selected samples of an image.  The tool requires at least two training images: one with the desired objects present, and the other showing the absence of those objects.  Using more images for training can result in a more robust solution.

MERLIC provides a wide range of gray value feature parameters which are used to train the tool to recognise absence/presence. These include minimum gray value, maximum gray value, gray value range, average gray value, and more. In training mode, the appropriate gray value feature parameters are determined automatically, or can be manually selected if preferred.

The following example demonstrates the ease and speed with which an absence/presence solution can be developed with MERLIC’s Check Presence with Gray Features Tool.  In this example we want to determine the absence or presence of fuses in a fuse box.

The image below shows the Check Presence with Gray Features tool as it appears in the MERLIC Backend workspace.  As mentioned, the tool requires at least two training images which appear in the training area under the current ‘Processing’ image to the left of the tool board. The two Feature parameters used for training are shown on the top right corner of the tool board, and the outputs of the tool are shown on the bottom left.  By default, the current processing image is used for the first ‘good’ training imaging.  The processing image can be changed by stepping through the acquired images.
GrayFeatures-Image1

To train the presence of objects, one or more region boxes (shown in blue) are drawn in the tool window around areas containing a fuse.  In the training area the sample type is set to ‘good’.

GrayFeatures-Image2

Next, a second image is added to the training area by clicking the plus symbol under the processing image. Region boxes are then drawn around the areas where fuses are missing. The sample type for this training image is then set to ‘bad’.  To train the model, ‘Apply training data’ is clicked.  If the ‘Update Features’ parameter is set to 1, the gray value features are then automatically determined based on the current training data provided.

GrayFeatures-Image3

Once the model is trained, the tool switches to the ‘Processing’ mode.  Now, region boxes are drawn around the areas to be inspected during the process.  Cycling through the acquired images, we see the output, ‘Region Accepted’, displays a ‘1’ for each region where a fuse is present and a ‘0’ for each region where a fuse is missing.  Additional outputs include ‘All Regions Accepted’, a ‘Confidence’ value for each region inspected, and more. Once satisfied with the performance, the solution is complete.

GrayFeatures-Image4

To complete the application, the output values could be further evaluated and/or communicated to a digital I/O device or PLC using MERLIC’s communication tool.  Finally a graphical user interface would be created using MERLIC’s Designer.  The application is now ready to be deployed on a system.

To try this example for yourself, register to download a free evaluation version of MERLIC here.