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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top