Metal Defect Detection
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.