Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting wrinkles in dates.

I am using Vision Builder to detect the presense of a date which has wrinkles.  Since each date is different, like finger prints, how would I approach seeing varying wrinkle patterns?  I have tried edge detection and some filters, but no good responses yet.  If there are dates with no wrinkles, they would be ejected.

Thanks,

RDD

0 Kudos
Message 1 of 6
(5,215 Views)

Your choice of illumination will make all the difference.  Consider coherent light (laser) and a beam expander, or collimated light (not diffuse), to get the shrpest contrast.  Also consider using a polarising filter and resolver.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 6
(5,206 Views)

I agree that the lighting will be the determining factor.

 

Once you have good lighting, I would do it in two steps.  The first would be to locate the outline of the date.  I would erode this outline to remove the edge areas and only look at the center area of the date.  This gives you a mask for evaluating the results.

 

The second step is to simply determine the presence or absence of wrinkles. Wrinkles would give you a large variation in a small area, while smooth skin would only have gradual variations.  Perhaps do a max filter over a 9x9 area, then do a min filter the same way (use median function).  Subtract the two and see what you get. I would expect large values for wrinkles and small values for smooth.

 

If you can post pictures of wrinkled and smooth dates, we could provide a lot more assistance.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 6
(5,184 Views)

Thanks to both parties for the responses.  This provides a good starting point.

Regards,

RDD

0 Kudos
Message 4 of 6
(5,176 Views)

Just remembered you can use GrayMorphology dilate and erode to get the max and min filters.  Much less complicated than the median filter.  The median gives you more options, where you can get the 10th percentile, 90th percentile, etc.  I would start with dilate and erode and repeat until the small details go away, then subtract the two images.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 5 of 6
(5,164 Views)

Hi Bruce,

I have not had much success with the dilate and erode methods since your last response since I don't really know how to apply this approach.  I did try was using a 45 degree light source to cast a shadow and then use an ROI to try to detect edges, a lot of edges meaning a good date (see attached photo).  All the detect edge function did was find edges on the perimeter of the ROI, but I want the interior of the ROI to be evaluated.

Next I am trying a Threshold approach to convert from grayscale to binary so possibly the edges would be more pronounced.  Any other recommendation would be appreciated, I am learning a lot.

Regards,

Doug

0 Kudos
Message 6 of 6
(5,017 Views)