Skew detection and correction

5 ビュー (過去 30 日間)
ganesh 2013 年 12 月 5 日
コメント済み: oza san 2017 年 3 月 28 日
I hane a binary image that contains a headerline. I want to skew image so that header line will be in horozontal direction.
  2 件のコメント
oza san
oza san 2017 年 3 月 28 日
i have an image like below and i want to detect and correct the skew can you help me sir?


回答 (2 件)

Image Analyst
Image Analyst 2013 年 12 月 5 日
So find the line, then call imtransform to remove the shear (skew).
  1 件のコメント
Alex Taylor
Alex Taylor 2013 年 12 月 6 日
Image Analyst's answer is on the money. However, I would use imwarp and affine2d instead of imtransform/maketform. The use of imtransform is no longer recommended.


Alex Taylor
Alex Taylor 2013 年 12 月 6 日
編集済み: John Kelly 2015 年 2 月 27 日
I do actually have one clarification from the tags. Do you really mean skew/shear, or do you actually mean rotation?
If you only need to rotate the header line out of view, it will be easier to just use the imrotate function (assuming you have the Image Processing Toolbox).

Community Treasure Hunt

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

Start Hunting!

Translated by