LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scratch detection with imaqdx

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:

 

surface.PNG

 

And I would like to detect scratches like these:

 

scracth1.PNG

 

scracth2.PNG

 

Any ideas to detect this kind of scratches? I have tried with texture detection. Is it the better way?

 

Thanks a lot.

 

 

 

0 Kudos
Message 1 of 7
(3,563 Views)

Hi Alvaro,

I did not understand completely your use case.Do you mean to detect the scratch in the image and magnify to show that scratch ?

 

 

Regards,
Srikrishna


0 Kudos
Message 2 of 7
(3,538 Views)

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

0 Kudos
Message 3 of 7
(3,533 Views)

Hi Alvaro,

Then in that case ,you can try some image histogram based scratch detection technique which will identify higher frequencies for the scratch areas...

 

 

Regards,
Srikrishna


0 Kudos
Message 4 of 7
(3,519 Views)

If you are lucky enough to have the Vision Development Module, 'IMAQ Find Edge.vi' can be configured to give you this pretty quickly:

 

temp.png

 

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.

Redhawk
Test Engineer at Moog Inc.

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.

0 Kudos
Message 5 of 7
(3,505 Views)

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.

0 Kudos
Message 6 of 7
(3,437 Views)

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.

0 Kudos
Message 7 of 7
(3,411 Views)