Hi I have a couple of images including labels that have angles between 0 and 180 degrees. Any way to detect them using existing OCR tools or any algorithm for that?
A:
Some time ago i wrote such algorithm for this:
- cut one letter
- rotate it clockwise from -X degress to X degres from initial posiotion, stepping by 1-2 degrees
- With each rotation catch it to a block, by checking most outside pixels in every side
- With each rotation check/remember dimensions of a block
- After all rotations find a block that have highest height/width ratio and rotate initial letter to that position
- You have now properly rotated letter, but pay attension, that wide letters will lies on side (like W, will be rotated 90 degrees) so you have to create pattern for W for comparsion on its side, not normal
killer_PL
2010-08-26 09:23:19