How to correct inclination of letters?
I want to do OCR, but sometimes I get the letters with a specific inclination, I can detect the angle, but I am not sure how to contruct the transformation matrix.
hmm, look at this
(imho, you got shearing there, not a plain rotation. this is no more an affine transform)
(if you rotate it, e.g, the 't-crosses' won't be horizontal any more)
I still do not get the formula for the value in the perspective matrix... Can you suggest me something?
Can you add some sample images? If it is a planar warp, you can find the homography and correct the warping.