Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

detect scratches on a camera lens

I am trying to detect scratches on a camera lens. I am looking at a grid target

and trying to find out iof there are any discontinuities on the grid which shows

scratches. I am attaching the picture that I am lookinh at wher i created a

discontinuity. I am attaching the VI as wll as the image. I just want to show the

scratch on the output. Take a look at what I did with the code.

Download All
0 Kudos
Message 1 of 22
(5,928 Views)
To me it looks worser than a scratch. It looks to me like it having some crack. What will you get if you get a image of a black paper?
0 Kudos
Message 2 of 22
(5,916 Views)

Yes it a crack when you look at the image. The camera I am working is an endoscope camera.

So instead of breaking the lens I created a crack on the target. What I am unable to get is to detect

only the crack. I dont think think it will work if we look at a dark image, I am sure. How can I just simply

show the detected crack as a result and say fail. The project is to detect cracks & scratches and if there

is any discoloration in the image acquired.

0 Kudos
Message 3 of 22
(5,903 Views)

A crack/scratch in the camera lens or the object being viewed?  I don't think the image would look anything like what you posted either way.  If the camera lens is damaged, it is unlikely to show up as a discrete discontinuity.  You either won't see it at all, or it will be a blurring or distortion of the image.  If you are looking at cracks in the object, they will likely be black lines (depending on lighting) but the background will not likely shift.

 

Before you start trying to analyze an image, I think you need to put more thought into what that image will really look like.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 22
(5,880 Views)

I got what you guys have suggested. Even considering the crack in the

target, is there any way we could detect what I have shiown in the image

above. I thought of using golden template but was not satisfied with the results.

I am kind of stuck with ideas on what is my next step.

0 Kudos
Message 5 of 22
(5,825 Views)
Just want to confirm. Do you want to detect the line (distorted)? Can you post a good image (without any distortion)?
0 Kudos
Message 6 of 22
(5,806 Views)

Muks 

Yes I want to detect the line. I want to see the crack

or the distiotion in the image. I am attaching the grid

without any distortion. I mena a regular grdi bar is

attached to this post.

 

 

Yesh

 

 

0 Kudos
Message 7 of 22
(5,791 Views)

Sorry for that

I attached the wrong picture in the aboce post. I am also attachedinh the reference image

I printed for the target..

Download All
0 Kudos
Message 8 of 22
(5,789 Views)
Did you try canny edge detection?
0 Kudos
Message 9 of 22
(5,771 Views)

Try this

 

Download All
0 Kudos
Message 10 of 22
(5,770 Views)