You are here: Start » Program Examples » Fuses

Fuses

Aim

The task is to check if there is no gap in the wire between two pins of fuse.

Input

An image containing fuses.

Output

Result of the inspection drawn on the image. If fuse is undamaged, a green circle is drawn, otherwise the circle is red.

Hints

To detect a broken wire Blob Analysis technique can be used. Using SplitRegionIntoBlobs filter you can analyze each fuse separately.

Solution (AVS)

  1. Add EnumerateImages filter to get load consecutive images of some disk directory.

  2. Add ThresholdToRegion filter to create a region containing fuses. A background is white, therefore you can set inMaxValue to 248.

  3. To split region to several regions corresponding to each fuse, add SplitRegionIntoBlobs filter and connect it with the ThresholdToRegion filter.

  4. Now you have an array of regions. To check whether the wire is not broken you need to analyze each of them separately. To accomplish this, create a new Step macrofilter CheckSingleFuse and create its inputs: inImage of type Image and inRoi of type Region.

  5. Note that pins and a wire are darker than a material around them, thus ThresholdToRegion filter can be used again. Add this filter and connect its inputs with the inputs of macrofilter.

  6. Add SplitRegionIntoBlobs filter to check whether the fuse is damaged. If output outRegion is an array with size greater than 1, it means that pins are not connected together, hence it is damaged.

  7. To test the size of array, add TestArraySizeEqualTo filter and connect its input with the outBlobs. Set its input inReferenceSize to 1.

  8. Create the macrofilter's output outIsOk and connect it with the result of the inspection outIsEqual.

  9. Add RegionBoundingCircle filter to create circles around fuses. To be more precise this filter computes circle around region of fuse.

  10. To draw the circles with color corresponding to the result of the inspection, add DrawCircles_TwoColors.

Macrofilter Main

Macrofilter CheckSingleFuse

Used Filters

Icon Name Description
RegionBoundingCircle Computes the smallest circle enclosing a region.
ThresholdToRegion Extraction of a region of objects that can be defined by a salient brightness.
TestArraySizeEqualTo Tests whether the size of an array equals the given value.
LoadImage Loads a single image from a file.
DrawCircles_TwoColors Draws circles on an image with two colors, depending on the status of each circle (usually: green or red for pass/fail status).
SplitRegionIntoBlobs Segmentation of a region into individual objects when the objects do not touch each other.

Further Readings

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