The task is to check whether the molybdenum foil inside halogen lamp is not damaged.
An image of halogen lamp. The position of the object is variable.
Region of detected defect and circle around it.
Location of object is variable. The foils are much darker than wire and glass, therefore to find them Blob Analysis technique can be used. In this case this way can be faster than performing Template Matching.
- Add EnumerateImages filter to get load consecutive images of some disk directory.
- Add ThresholdToRegion filter to create a region containing the foils.
- Add OpenRegion filter to remove noise and most of the letters.
- Add FillRegionHoles filter to fill small holes in the foils which should not be considered as defects. Set inMaxHoleArea to 10.
- Add OpenRegion filter to remove the remaining noises. Set inRadiusX to 6.
- Add CloseRegion filter to close the holes in region of foil. Set its inRadiusX to 5.
- Add RegionDifference filter to compute the region containing defects.
- To split the detected holes add SplitRegionIntoBlobs filter and set inMinBlobArea to 8.
- Add RegionMassCenter filter to compute the point with coordinates equal to the average coordinates of the region's pixels.
- Add CreateCircle filter and connect its input in.Point with a outMassCenter.
|CloseRegion||Filling-in small gaps in a region without making it thicker.|
|RegionDifference||Computes a region containing pixels from the first input region, but not from the second input region.|
|FillRegionHoles||Extends the input region so that it contains also all the pixels previously lying in its holes.|
|ThresholdToRegion||Extraction of a region of objects that can be defined by a salient brightness.|
|EnumerateImages||Emulates image acquisition with images stored on disk.|
|CreateCircle||Creates a circle from an aligned point and radius.|
|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.|
|OpenRegion||Removing small parts from a region without making it thinner.|
- Blob Analysis - Article presents detailed information about the Blob Analysis technique.