Ask Your Question

Area of Interest and Hough Line accuracy problem( detect slightly distorted lines)

asked 2013-10-02 23:12:52 -0500

rockinfresh gravatar image

updated 2013-10-03 22:59:59 -0500


I am trying to do segmentation of book spines stacked both horizontal and vertically. I have came across a problem when the picture is too big. image description image description Only part of the image can be seen in the whole window, the next image shows the source where the hough line is applied to. image description

this is the original image it is suppose to process: image description

As you can see in the image above, I cannot view the whole image. Hence, I tried to minimise the window just for this picture using=>

cv::resize(image, image, cv::Size2i(image.cols/6, image.rows/6) ); // resize to 1/6 of the image

which lead to another problem, when the picture is small, it become too small that the straight lines cannot even be detected.

Hence, I tried => cv::resize(image, image, cv::Size2i(750, 400) );

this lead to another problem. While the image above is above to display the whole window, for smaller pictures, my houghline detection becomes more unstable. Please refer to the 2 images below

before I resize image description

Hough line detection while not perfect, just at least close?

but after i resize, the hough detection becomes worse!!

image description

Do anybody have an idea on how to solve this sizing problem? And also how to improve my Hough Line detection which is pretty unstable now to separate the books? I wish to draw a line in between the stack of books.

Hope to hear from you guys soon. Thanks!!!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-10-05 04:58:24 -0500

Guanta gravatar image

Why not computing the Hough lines on the original large image and rescale the result image afterwards (note: you should draw the lines thick enough, otherwise they may vanish depending on the interpolation method you choose).

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2013-10-02 23:12:52 -0500

Seen: 488 times

Last updated: Oct 05 '13