Detect color gradient to do measures.

1 view (last 30 days)
Hi everybody,
I want to do a quality control of a labelling process.
I have to detect if the machine has placed the labels, if they are inside of the tolerance limits (distances) and if they have rotated.
That's why I need to be able to detect the edge of the labels, I was thinking on detecting the color gradient but I have no clue how.
I have been modifying ImageAnalyst's demos for other aplications but I don't knowhow to solve this, all help will be appreciated.
I'm attaching an image of the product so you can see what I'm talking about.
Thank you all!

Accepted Answer

Image Analyst
Image Analyst on 21 Aug 2014
If the labels are the lock/unlock text on the switch, then I don't really see why color segmentation is necessary. Assuming the switch has black casing and it's on a white background, you can convert to grayscale somehow, then find the outer perimeter of the switch and then look inside it for three non-black blobs. Find their centroids so that you can find the two outer ones. Then for each one, examine the text inside the blob. Assuming no letters are missing you will know from the area of the text which says lock and which says unlock, or even if there is not text there at all. Then you can determine spacing of text from the colored box it's in and any other things you want to measure.

More Answers (1)

Sean de Wolski
Sean de Wolski on 21 Aug 2014
doc edge
doc imgradient
doc imgradientxy

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!