Code covered by the BSD License  

Highlights from
Straighten image

5.0

5.0 | 1 rating Rate this file 27 Downloads (last 30 days) File Size: 5.34 KB File ID: #40239
image thumbnail

Straighten image

by

 

11 Feb 2013 (Updated )

The function finds the document orientation.

| Watch this File

File Information
Description

The function is useful for automatic image straightening.

Three different approaches how to find the image orientation were implemented: Fourier transform, Hough transform and region properties.

The principle of using Fourier transformation for orientation detection is well described at: http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm

Hough transformation finds lines in the picture. The description of Hough transformation is at: http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm

In a similar problem, horizon detection, only the longest line determines the image orientation: http://www.ijceronline.com/papers/Vol3_issue3/AK03202260233.pdf

However, in text orientation detection it is beneficial to consider all lines' direction to improve signal-to-noise ratio. This late approach is implemented.

Finally region properties binarizes the image and then uses REGIONPROPS from Image Processing Toolbox to calculate blob's orientation.

Required Products Image Processing Toolbox
MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
10 Jun 2014 Matthew  
Updates
25 Feb 2013

Added Fast Fourier Transform.

14 Apr 2013

Improved text description. Added blob detection.

Contact us