Metal Defect Detection I am developing a machine vision project to find defects on metal surfaces. I want to learn and implement algorithms which commercial systems are use for metal surface defect. My sample object as below:

I am using OpenCV. I could find sharp defects with standard edge detection methods. But it is not sufficient. There is some samples of commercial solutions:
- http://www.keyence.co.uk/products/vision/vision-sys/cv-5000/features/movie06.jsp
- http://www.keyence.com/products/vision/vision-sys/cv-5000/features/movie09.jsp  

Or like this picture:


Do you have any idea about algorithms which is used in commercial systems?
As the video says, they use the classical lowpass filtering for texture smoothing, then shading correction to lessen the effect of uneven illumination, followed by binarization for defect segmentation.

A completely different technique is used for the bearing: edge detection and (presumably) assessment of deviations from a smooth line.

The scratch detection on the heavily textured surface is much more challenging and I am not sure that a commercial system can handle it.

For the best of my knowledge, the technique in "Fast Detection of Curved Edges at Low SNR, Nati Ofir, Meirav Galun, Boaz Nadler and Ronen Basri" could do.