You are here: Start » Program Examples » Molybdenum Foil
Molybdenum Foil
Aim:
The task is to check whether the molybdenum foil inside a halogen lamp is not damaged.
Input:
An image of a halogen lamp. The position of the object is variable.
Output:
Region of detected defect and a circle around it.
Hints:
The location of the object is variable. The foils are much darker than the wire and glass. Therefore, to find them, the Blob Analysis technique can be used. In this case, this method can be faster than performing Template Matching.
Labeling connections is explained in this article.
Solution (FIS):
- In Workspace Explorer, open the workspace Examples, and in the Filmstrip window, select the MolybdenumFoil dataset. Drag the Image channel to the ACQUIRE section.
- Add the ThresholdToRegion filter to create a region containing the foils.
- Click the "..." button at the inRoi input to open the GUI for marking the region of interest. The halogen lamp moves
mainly along the horizontal axis, thus the ROI does not have to be too big.
- Set the inMaxValue to 50. The inRegion output should be a region of the foils and the letters.
- Click the "..." button at the inRoi input to open the GUI for marking the region of interest. The halogen lamp moves
mainly along the horizontal axis, thus the ROI does not have to be too big.
- Add the OpenRegion filter to remove noise and most of the letters.
- Add the FillRegionHoles filter to fill small holes in the foils which should not be considered as defects. Set the inMaxHoleArea to 10.
- Add the OpenRegion filter to remove the remaining noises. Set the inRadiusX to 6.
- Add the CloseRegion filter to close the holes in region of foil. Set its inRadiusX to 5.
- Add the RegionDifference filter to compute the region containing defects.
- To split the detected holes, add the SplitRegionIntoBlobs filter and set the inMinBlobArea to 8.
- Add the RegionMassCenter filter to compute the point with coordinates equal to the average coordinates of the region's pixels.
- Add the CreateCircle filter and connect its in.Point input with the outMassCenter.
Macrofilter Main
Used Filters
Icon | Name | Description |
---|---|---|
![]() |
CloseRegion | Filling-in small gaps in a region without making it thicker. |
![]() |
CreateCircle | Creates a circle from an aligned point and radius. |
![]() |
FillRegionHoles | Adds pixels to the input region so that it contains no holes. |
![]() |
OpenRegion | Removing small parts from a region without making it thinner. |
![]() |
RegionDifference | Computes a region containing pixels from the first input region but not from the second input region. |
![]() |
RegionMassCenter | Computes a point with coordinates equal to the average coordinates of the region's pixels. |
![]() |
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.