Open atgorvi opened 2 years ago
The method works on binary images, typically text or graphics. pixFindSkew, by default, only finds skew angles between -7 and +7 degrees. It may have failed in your case either because the image wasn't binarized properly to extract the inverted text (white text on dark background), or because the skew angle is larger than 7 degrees (it is), or both.
Before doing OCR i need to detect angle of text, and possibly rotate image but using findSkew function i get incorrect angle, what do I do wrong?
val skewImage: Pix = Binarize.otsuAdaptiveThreshold(Convert.convertTo8(ReadFile.readBitmap(bitmap))) val skew: Float = Skew.findSkew(skewImage) Log.i("skew", skew.toString()
)