File Exchange

image thumbnail

Straighten image

version 1.4 (5.34 KB) by

The function finds the document orientation.

13 Downloads

Updated

View License

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.

Comments and Ratings (2)

Matthew

Updates

1.4

Improved text description. Added blob detection.

1.1

Added Fast Fourier Transform.

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video