Process an area by trapezoid shape in image processing
显示 更早的评论

Hi everybody
I'm trying to extract cracks from asphalt image. camera angle makes me to process an area by trapezoid shape as road surface. but as i said, i need to extract crack which is a linear object. Then when i use an algorithm for extracting linear objects, the border of trapezoid would be recognized as crack too. when i use grayscale properties of pixels such as thresholding, because of color of asphalt, detecting crack wouldn't go well.
I need your help for doing process on trapzoid area or any other guidness for detecting this crack.
Thanks.
6 个评论
Rik
2020-10-5
If you are sure the crack detection would work on a rectangular image, why not use a keystone correction to make your image rectangular?
Also, I have my doubts if the color of the asphalt would actually make the crack detection hard. You would just have to come up with a way to detect a difference with the background. I suspect the white line is actually more of a problem, since it changes the background color.
Adam Danz
2020-10-5
"...the border of trapezoid would be recognized as crack too."
In addition to Rik's advice, if your algorithm is correctly identifying the crack as well as other linear edes, wouldn't it be relatively easy to identify which edges are linear and remove them thereby isolating the crack?
Rik
2020-10-9
Thank you for guidance. White line can be removed at binary image and wouldn't assume as a problem, would you please say about the features which makes different between crack and background. Also I tried too use KeystoneCorrector that seems well for this problem, but I couldn't find source of it. there are some that doesn't work.
Rik
2020-10-9
If you are looking for the source of the app posted on the FEX: contact the author. I asked politely and explained what I wanted to use it for, after which he sent me the code. That was back in March 2017, so you would have to see if he is still using the same email address.
Before you ask: since it isn't my code I don't feel comfortable forwarding the code to you. Looking at the code itself, it looks like it is simply using interp2 to resample the image.
David Goodmanson
2020-10-9
Hi mohammadreza,
flags are intended for inappropriate comments, duplicated questions and so forth, which is not what is happening here. It would be prefererable if you were to delete the flags from the comments.
mohammadreza pourebrahimi
2020-10-10
回答(1 个)
It is a simple morphological operation to generate a binary mask for the trapezoid's interior. You can use that to eliminate false positives at the road edges.
load theRoad
A=rgb2gray(A);
roadMask=imerode(bwconvhull(imbinarize(A)),strel("disk",3));
imshowpair(edge(A), edge(A).*roadMask, "montage");

类别
在 帮助中心 和 File Exchange 中查找有关 Object Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!