You are here: Start » Program Examples » Mounts (Blob Analysis)

Mounts (Blob Analysis)

Aim

The task is to detect mounts and divide them into OK/NG parts.

Input

An image of mounts. The position of the objects is variable. Some of the objects are damaged.

Output

The marked mounts divided into OK and NG objects.

Hints

Location of object is variable. To find object the Blob Analysis technique can be used.

To separate OK and NG parts, compare each found blob's area to the good template value. You can use a formula.

Use the RegionBoundingCircle and the DrawCircles_TwoColors to mark OK and NG items.

Solution (AVS)

  1. In Workspace Explorer open workspace Examples and in Film strip window select Mounts dataset. Drag the Image channel to the ACQUIRE section.

  2. Add the ExtractBlobs_Intensity filter to locate the mounts. Disable the inProcessingParams HoleThreshold. The value should be Auto.

  3. Add the formula with the outIsOK output:

    outIsOK = area(inRegion) >= inMinOkArea

    • Connect the outRegion output from the previous filter to the formula inRegion input.
    • Set the inMinOkArea input's value to 2250.
  4. Add the RegionBoundingCircle and connect its input with the ExtractBlobs_Intensity output.

  5. Add the DrawCircles_TwoColors:

  6. Now the final output of the whole program should be the image with the OK parts marked in green and the NG parts marked in red.

Macrofilter Main

Used Filters

Icon Name Description
DrawCircles_TwoColors Usually: green or red for pass/fail status.
ExtractBlobs_Intensity Segments an image into blobs by thresholding using a single value.
RegionBoundingCircle Computes the smallest circle enclosing a region.

Further Readings

  • Blob Analysis - Article presents detailed information about the Blob Analysis technique.