Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to segment cracks/joints from each other using vision assistant?

Solved!
Go to solution

I have built an application that processes images taken from a high resolution camera with IR lighting. I have noticed that some cracks in the pavement might join together, or run into joints that are cut into the concrete or ashalt.I need to distinguish between the cracks and joints so that I can classify them and record their locations on the image to a spreadsheet. I have seen where someone used the watershed segmentation for separation circular objects, but does this work for cracks(lines) as well? If not are there any ideas for "disconnecting the cracks from the joints. I have attached my vision assistant script and a sample image. Thanks in advance for your advice.

Download All
0 Kudos
Message 1 of 14
(3,569 Views)

Hey Mustang08,

 

I opened your script with the images you posted, but the type of image is invalid for the Morphology function you are doing. You need to first do a color plane extraction to be able to get it to threshold.

 

invalid image.png

 

You can also use edge detection to detect cracks.

 

Regards,

A. Zaatari

National Instruments
Applications Engineer
0 Kudos
Message 2 of 14
(3,551 Views)

I just attached the original image that I am further processing. I already have everything in place to threshold the image and get just the joints and cracks that are present, I just need to know if there is a way to separate cracks that may be joined to joints into he binary image. One thought I had was to do like you said and use the edge detection and find the horizontal and vertical lines present, calculate the intersections for the lines if any, and mask out a small square so that they are no longer joined. I started writing the code yesterday for this method and am testing it on a few images now to get the edge detection settings to where they will pick up everything I need it to. Let me know f there is an easier or more effective way to do this. Thanks. I also attached the binary so you can see how the cracks are attached tot he joints in some cases. Also is there a way to remove the yellow lines present ont he binary that come from the edge detections in the vission assistant?

0 Kudos
Message 3 of 14
(3,547 Views)

Hey mustang08,

 

I would try to use the morphology functions like dilate, erode, and close to define those lines very well, also filtering the noise out of the picture. Then I would find the edges and their intersection to find the joints... 

 

Or you can just do that in the Gray functionality in VA.

 

Regards,

A. Zaatari

National Instruments
Applications Engineer
0 Kudos
Message 4 of 14
(3,533 Views)

I meant to attach the script. 

National Instruments
Applications Engineer
0 Kudos
Message 5 of 14
(3,533 Views)
Solution
Accepted by mustang08

I tried the morphology functions and the problem is it would join a crack to the joints if it was intersecting them and then count that as one shape/object. I ended up finding a really good solution. I used the advanced edge detection before dilation the image, then using those points for the lines detected to extract the joints and get the information needed(width, length,position), and then use the positions to draw black pixels over the joints on the binary. This allowed me to get the information I needed for the joints and also remove them from the binary image so that I can process the cracks left over into he picture. Now I just need to figure out how to get some of the other object that the threshold finds removed so that I am left with just the cracks. Thanks for the help. Its always good to get ideas from someone looking at it from another direction.

0 Kudos
Message 6 of 14
(3,518 Views)

How do you get the edge detection lines off the image display? I tried to look at property nodes and couldnt find anything pointing to that. I know they do not get processed int he Vission Assistant, but I would like to display the image without these lines. Any ideas? Picture is attached with what i am talking about.

0 Kudos
Message 7 of 14
(3,512 Views)

Hey Mustang08,

 

I am not sure you can remove those lines in VA, but I believe you can do so in LabVIEW using Vision.

 

Hope this helps.

 

Regards,

A. Zaatari

 

National Instruments
Applications Engineer
0 Kudos
Message 8 of 14
(3,503 Views)

I tried using property nodes for the display and could not find anything. Is there a function witht eh vision toolkit that allows oyu to remove them? If so whih function is it.Thanks for the help.

0 Kudos
Message 9 of 14
(3,501 Views)

Hey Mustang08,

 

I believe you should be able to do that by switching off the booleans for show results, show area, etc... as shown in the picture that I have attached.

 

Hope this helpsolution.pngs,

 

Regards,

A. Zaatari

National Instruments
Applications Engineer
0 Kudos
Message 10 of 14
(3,489 Views)