Hough algorithm to deskew an image

  • Thread starter Thread starter inotyce
  • Start date Start date
  • Tags Tags
    Algorithm Image
Click For Summary
SUMMARY

The discussion centers on the Hough algorithm for deskewing images, specifically utilizing the Canny edge detection method to identify edges. The algorithm operates by allowing each edge point to "vote" for potential lines based on slope and x-intercept parameters, stored in a 2D array called 'Votes'. Lines with the highest vote counts, exceeding a user-defined threshold, are considered the reference lines for deskewing the image. This method effectively identifies and corrects skewed images by analyzing the distribution of edge points.

PREREQUISITES
  • Canny edge detection
  • Hough transform
  • 2D array manipulation
  • Image processing fundamentals
NEXT STEPS
  • Study the implementation of Canny edge detection in OpenCV
  • Explore the mathematical principles behind the Hough transform
  • Learn about thresholding techniques for line detection
  • Investigate practical applications of image deskewing in software development
USEFUL FOR

Image processing enthusiasts, software developers working with computer vision, and anyone interested in implementing image correction techniques using the Hough algorithm.

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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
3
Views
2K
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 30 ·
2
Replies
30
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K