mmdpieces - Classify two dimensional pieces.
-
Description
- The input image is a binary image typically found in industrial automation applications. It has three types of objects: rings, nails and T-pins. Our procedure for identification of these classes of objects is based on thickening, thinning and reconstruction.
Reading
The binary image of the pieces is read.
Contour noise reduction
An homotopic thickening is applied to reduce contour noise.
Skeleton
The homotopic skeleton by thinning is created.
Skeleton pruning
The open lines of the skeleton are pruned by the end point thinning. The remaining skeleton components will be loops, identifying the rings.
Detect rings
Extraction of the rings by reconstruction of the thicked image from the filtered skeleton.
Rings in the input image
Restriction of the objects detected to the input-image.
Skeleton of the remaining objects
It eliminates the skeleton of the rings.
End points filtering
It removes sucessively 4 end-points to let T junctions just on T-pins.
T-pins markers
It detects triple points, applying the union of matchings with two templates. These points will identify (mark) the T-pins.
Detect T-pins
Detection of the T-pins by reconstruction of the ticked image from the T-pin markers.
T-pins in the input image
Restriction of the objects detect to the input image
Detect nails
The nails are imediatly detected by the subtration of the images of the rings and T-pints from the input image.
Color composition
The result of the classification is presented in a pseudo color image.