Hough algorithm to deskew an image

  • Thread starter Thread starter inotyce
  • Start date Start date
  • Tags Tags
    Algorithm Image
AI Thread Summary
The discussion centers on understanding the Hough Transform algorithm for detecting lines in images, particularly for novices in image processing. The process begins by identifying the edges of an image using an edge detection method like the Canny algorithm. The algorithm represents potential lines in a 2D array called 'Votes,' where rows correspond to angles and columns represent x-intercepts. Each edge point in the image votes for all possible lines that can pass through it, incrementing the corresponding value in the Votes array. After processing, values in the Votes array that exceed a chosen threshold indicate the presence of detected lines in the image. This method effectively identifies reference lines based on the accumulation of votes from edge points.
inotyce
Messages
43
Reaction score
1
https://en.wikipedia.org/wiki/Hough_transform
http://www.codeproject.com/Articles/13615/How-to-deskew-an-image

I follow the second link but since I am a complete novice in image processing, I am having a hard time to figure out what it is all about and how to determine the point to make the correct lines.

In the article (Points of Interest) the writer says this
To find the reference lines, we let each point vote for all the lines that pass through the point. The lines with the highest number of points are our reference lines.
Well, I don't understand. Would someone please enlighten me with a simple summary of what this algorithm actually do to define the points to search all the lines ? Thank you.
 
Technology news on Phys.org
First, find the edges of the image you are interested in (use Canny) and call this 'Edges'.
Second, you can represent any line in an image with a slope value and x-intercept (with some chosen level of granularity).
So consider a 2D array with rows representing angles, and columns representing the x-intercept, we'll call this 'Votes'.
Consider the line generated by the parameters i,j of Votes (some slope/x-intercept) and imagine it layed down upon Edges. Each point in Edges that is on this line causes the value of Votes[j] to increment.
At the end, the values in Votes that are above some threshold (that you choose) represent a line you found in the image.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top