Straighten image

版本 1.4.0.0 (5.3 KB) 作者: Jan Motl
The function finds the document orientation.
2.0K 次下载
更新时间 2013/4/14

查看许可证

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.

引用格式

Jan Motl (2024). Straighten image (https://www.mathworks.com/matlabcentral/fileexchange/40239-straighten-image), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Image Filtering and Enhancement 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.4.0.0

Improved text description. Added blob detection.

1.1.0.0

Added Fast Fourier Transform.

1.0.0.0