06-30-2020 09:24 AM - edited 06-30-2020 09:25 AM
Hi to all,
First of all thanks a lot for reading this post and being able to help.
I would like to detect scratches in a surface.
The surface is like this:
And I would like to detect scratches like these:
Any ideas to detect this kind of scratches? I have tried with texture detection. Is it the better way?
Thanks a lot.
06-30-2020 10:38 AM
06-30-2020 10:44 AM
Hello @srikrishnaNF,
There are many images, some with scratches and others without them.
I want to identify the images that have the scratches and color them in the same image.
But yes, I want to show the scratch in the image that have an scratch (or scratches).
Thanks a lot
06-30-2020 11:45 AM
06-30-2020 12:56 PM
If you are lucky enough to have the Vision Development Module, 'IMAQ Find Edge.vi' can be configured to give you this pretty quickly:
For that, the green bounding box is hardcoded: I gave it pixel counts for left right top and bottom of the box, then told it to search top to bottom for one edge and bottom to top for another edge. You'd have to code it a bit more eloquently to detect scratches everywhere, and I don't really know how you'd go about coloring in the scratch as you want to do. But this is where I'd start. Hope this helped.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
07-01-2020 05:08 AM
Hello!
Thanks a lot for replying.
Could be interesting to try what you say.
I have tried with texture defect detection and also have good results.
07-02-2020 04:06 PM - edited 07-02-2020 04:07 PM
You could likely use binary thresholding and particle analysis to color and calculate information (position, area, perimeter, number of scratches, etc.) for the scratches.
Just search 'particle' in the NI Example Finder and look at the various particle detection example VIs. Requires the NI Vision Development Module.