Completing an image edge using MATLAB
I'm trying to complete the right edge of the large rectangle in the following image:
The approach I've tried involves running a Sobel filter for edge detection on the image rotated by 45 degrees, following which I used the MATLAB Hough Transform to fill gaps in the detected edges. Then, I've tried to join the closest edges detected, which should in theory complete the desired rectangle edge.
The issues I'm facing are as follows:
1) Even though I've used a horizontal Sobel kernel on the image rotated by 45 degrees, which should ideally give me only edges that are originally diagonal, I'm getting most major edges that were originally horizontal and vertical as well.
2) I'm getting a lot of broken lines which I'm unable to unify using MATLAB houghpeaks()
and houghlines()
functions even after tweaking the parameters.
3) Following from 2, joining the two closest edges is nontrivial since the houghlines often fits multiple line segments to what is actually the same edge.
What else could I try to achieve such edge completion?
链接地址: http://www.djcxy.com/p/67154.html上一篇: 如何确定图像是否需要旋转
下一篇: 使用MATLAB完成图像边缘