straighten a image

조회 수: 13 (최근 30일)
goutam
goutam 2012년 5월 24일
답변: ali dulla 2016년 2월 11일
hello people am working on a ocr of braille! i have finished the entire project! the one drawback of my project seems to be that, my code doesn't work on images which are slightly curved during scanning! the input to my code is a scanned braille script! so if the image is tilted, then my code gives me an error! so i wanna know if there's any algorithm or method by which i can straighten that image!! any help would be greatly appreciated. thank you
  댓글 수: 2
Geoff
Geoff 2012년 5월 24일
Sorry, first you say "curved", then you say "tilted". Which is it? Or is it both?
"Curved" implies you need to de-warp the image. "Tilted" implies you just need to rotate it. If it's the latter, do you have any reference lines in your image to indicate what true vertical or horizontal is?
goutam
goutam 2012년 5월 26일
sorry, my bad!! the image is tilted. no theres no reference lines!

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2012년 5월 25일
Can you detect the dots? If so, you might be able to use radon() or RANSAC ( http://en.wikipedia.org/wiki/Ransac) or possibly hough() to find the angle, then use imrotate.

추가 답변 (3개)

goutam
goutam 2012년 5월 25일
yes i can detect the dots! i know where the dot starts and where it ends! i also knw the centroid of the dot! using this data can i straighten the image? the image consists of many dots! so i presume i have to find the rotation angle for the dots which are adjacent and then rotate the whole image for tat required value???
  댓글 수: 1
Image Analyst
Image Analyst 2012년 5월 25일
There are a few different ways to do it. Did you look up any of the ways I suggested?

댓글을 달려면 로그인하십시오.


goutam
goutam 2012년 5월 25일
actually yes! i devised a simple method using imrotate. taking a subset of the image i calculated the angle between the centroid of the dots! then i rotated the whole image the required number of degrees! this soln worked! but now i get a new error when i run the whole code. it says "Undefined function or method 'reading' for input arguments of type 'logical'." here reading is a function i had written for identifying the dots. am stuck here! the input to this READING function is my image itself!
  댓글 수: 4
goutam
goutam 2012년 5월 26일
sorry about that! am a newbee to this, hence the problem.
and about my code, i have defined it properly! and the function is in the search path itself! yet it doesnt work!
Image Analyst
Image Analyst 2012년 5월 26일
Well what can I say without seeing your code? All I can say is that you did something wrong.

댓글을 달려면 로그인하십시오.


ali dulla
ali dulla 2016년 2월 11일
Dewarping by means of flow lines

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by