Deslant handwriting samples
Hello I am trying to do preprocessing on the IAM DB offline samples. Namely I want to do slant correction on each handwriting image sample they have. This is because I want to use a neural net to do handwriting recognition.
Firstly is there a way to do this in OpenCV out of the box ? Like is there a class or function that I can call something like the following ?
slant_correct(image)
If not can someone outline the steps in detail, since I am new to OpenCV.
BTW, slant correction refers to shearing the image so that handwriting samples are not slanted to the right.
An example would be following-: slant_correction.png
The problem is that every sample has different slant corrections required ie. different levels of shearing required, so how do I firstly detect the slant required and secondly how do I correct it ?