Inquiry about detecting black contaminants with minimal gray-value difference in a machine vision environment

Dear Community,

I use:
PLC : X20CP1686X
Camera: VSC123R22.041P-000
AS: V 4.12.8.41
mappVision: 5.30.1
mappView: 5.24.5

Hello.I am trying to detect black contaminants inside a steel plate,
but the intensity (gray value) of the contaminants is very similar to the dark background of the plate surface.

Because of this, threshold-based blob detection does not work,
and both surface texture noise and contaminants are detected together,
even when using global or mean-based thresholding.

I would appreciate any guidance on how to approach this problem,
such as alternative image processing techniques or practical solutions.

Solution was provided by Vision team, refer to Improving image quality of Copper plates in vision camera and Dynamic ROI Adjustment and Pixel Counter for Copper Plate Inspection - #3 by kovarj

An additional option, which may not be the most elegant one but depends on the quality level you want to achieve, is to use blob analysis with two models: one to detect the plate in general and another with a maximum size limit so that the background is not taken into account when detecting defects. I ran a quick test using the image you shared, and the results could be acceptable depending on what you are looking for. The only requirement is that the maximum number of blobs to search for should be set high enough to detect as many existing defects as possible. Best regards.

1 Like

Another option could be to just detect the plate (bright pixels) with blob and check the area of the blob. If it is too small you know you have defects on it.

1 Like

any other questions @Black_Cho ?