Defect detection algorithm - Sandblasting

1 view (last 30 days)
Jack Sharp
Jack Sharp on 14 Mar 2021
Answered: Tarunbir Gambhir on 17 Mar 2021
I'm currently creating an algorithm to detect incorrectly sandblasted components via image.
I've separated the component from the background, but need to detect the defect (depicted by more "sparkly bits"). I assume that I could compare the quantity of white pixels ("sparkly bits") with a healthy component in order to detect the defect. How can i measure the quantity of white pixels?
This may be a broad question but any direction would be greatly appreciated.
Thankyou.
  1 Comment
DGM
DGM on 16 Mar 2021
I'm not really into the more technical image processing aspects, but the most basic sort of bright feature analysis would be something like
threshold=0.9;
thresholdedimage=partimage>threshold;
numberbrightpixels=sum(thresholdedimage);
Of course, that seems awful simplistic. Maybe the bright bits only really matter contextually when they occur in a solid patch (a smooth, unblasted specular area as opposed to tiny sparkles from a rough surface). In that case, running imopen() or bwareaopen() on the thresholded image may help by excluding features below a certain size.
Also "quantity" might mean different things depending on what we really want. A pixel count is one thing, but maybe it's the intensity distribution that's more meaningful. In that case, maybe we could be looking at the histogram.

Sign in to comment.

Answers (1)

Tarunbir Gambhir
Tarunbir Gambhir on 17 Mar 2021
I recommend you use different morphological operations to process this information from images. I also suggest you go through the following examples for more information on how to use these functions.

Products

Community Treasure Hunt

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

Start Hunting!