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 a fuse.
Input:
An image containing fuses.
Output:
The result of the inspection drawn on the image. If the fuse is undamaged, a green circle is drawn. Otherwise, the circle is red.
Hints:
To detect a broken wire, the Blob Analysis technique can be used. Using the SplitRegionIntoBlobs filter, you can analyze each fuse separately.
Labeling connections is explained in this article.
Solution (FIS):
-
In Workspace Explorer, open the workspace Examples, and in the Filmstrip window, select the Fuses dataset. Drag the Image channel to the ACQUIRE section.
-
Add the ThresholdToRegion filter to create a region containing fuses. The background is white. Therefore, you can set the inMaxValue to 248. Since the PROCESS section should consist of key functionalities of the application, the rest of the tools will be placed here.
-
To split the region into several regions corresponding to each fuse, add the SplitRegionIntoBlobs filter and connect it with the ThresholdToRegion filter.
-
Now you have an array of regions. To check whether the wire is not broken, you need to analyze each of them separately. You can accomplish it with an Array mode.
-
Note that pins and the wire are darker than the material around them; thus, the ThresholdToRegion filter can be used again. Add this filter and connect the outImage output of the ReadFilmstrip to it. Also, connect the FuseBlobs output to the inRoi.
-
Add the SplitRegionIntoBlobs filter to check whether the fuse is damaged. If there is more than one Region on the the outBlobs output, it will mean that the fuse is broken into two parts. To check that, right-click on the outBlobs output, select Property Outputs and choose the Count property. Then open the Results Control, mark the checkbox in the outBlobs.Count row and set Limits to 1: After that operation, a new Property Outputs will appear. Just click on the outBlobs.Count and select the Status property.
- Click twice on the new output and change its name to IsFuseOK.
-
Add the RegionBoundingCircle filter to create circles around fuses. To be more precise, this filter computes a circle around the region of the fuse.
-
To draw the circles with colors corresponding to the result of the inspection, add the DrawCircles_MultiColor.
- Connect its inputs: the inCircles with the outBoundingCircle and the inColorIds with output IsFuseOK of the second SplitRegionIntoBlobs filter.
- Specify the colors of circles by setting the inPalette to red and green.
Macrofilter Main
Used Filters
Icon | Name | Description |
---|---|---|
DrawCircles_MultiColor | Draws circles on an image with multiple colors. | |
RegionBoundingCircle | Computes the smallest circle enclosing a region. | |
SplitRegionIntoBlobs | Segmentation of a region into individual objects when the objects do not touch each other. | |
ThresholdToRegion | Extraction of a region of objects that can be defined by a salient brightness. |
Further Readings
- Blob Analysis - Article presents detailed information about the Blob Analysis technique.