mmdcookies - Detect broken rounded biscuits.
-
Description
- The input image is a gray-scale image of two rounded-shaped biscuits. One of them is broken. The purpose is to detect the broken biscuit.
Reading
The input image is read.
Thresholding
Convert to binary objects by thresholding
Open tophat with large octagon disk
The tophat of the binary image by an octagon disk with a radius fits the good biscuit but does not fit in the broken biscuit can detect the broken one.
Remove the residues
Clean the residues from the octagon disk and the rounded shaped biscuits by eliminating small connected regions
Final display
Display the detected broken biscuit