Reputation: 521
How should I detect whether a defect (as seen in the above image - this is called a 'Tie down error') is present in a finger of the glove?
I have already extracted each finger tip (using contours and contour approximation) and the algorithm can identify if the shape of the glove is not perfect.
But it does not detect a tie down at the tip of the glove finger.
How can I detect this using OpenCV?
Upvotes: 2
Views: 1172
Reputation: 18665
Segment each finger and then apply to each finger an analysis based on color or grey level: a good finger has almost the same grey level/color while a defective one has a dark part.
In order to segment the fingers: for each finger found the landmarks: B1 (base 1), B2 (base 2) and T (tip); see them in purple in the below image.
It seems to me that you already have these landmarks because you draw the blue graphics.
Once you have them you define a region with these boundaries: the straight line between B1 and B2 and the red contour you already have (the red contour you draw here https://i.sstatic.net/hXfoC.jpg ) starting from B1 and going to B2 through T.
Then you apply for each region your analysis, for example mark as defective all the pixel with intensity below a threshold.
Upvotes: 2