How to find rotation angle of image?
.net, algorithm, c#, image-processing, math
Solution
I use gmseDeskew algorithm to deskew an image in my program. It works very well.
Problem
I'm feeding in a Bitmap image to my C# program to be able to perform OCR to identify the characters in the image. I can do this fairly well if the image is not rotated. One of the program requirements, however, is that the program automatically determines if the image has been rotated, and that it automatically corrects these rotations. I've tried implementing a simple method where lines are traced across the image and points which contact a character are recorded, and then performing a simple linear regression on the line points. This works to an extent, although it has not proven very accurate due to curvature of characters, etc. I was wondering if there was a better method to solve this problem? Many thanks in advance! :)