Page 1 of 1

OCRTesseractGetOrientation_" returns wrong rotation

Posted: Wed Dec 02, 2015 6:05 pm
by fs051268
Hi,

when using the OCRTesseractGetOrientation_2 function for the attached image the return is a rotation angle even though it is not rotated.
Only when changing the confidence level to a low number it returns the correct result, but if confidence level is 10 it still returns wrong angle!

What is the cause and how can it be fixed?
Using 11.0.2.30 version.

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Thu Dec 03, 2015 6:32 pm
by Loïc
Hi,

The OCR is for machine printed character recognition purpose. Your image contains only few handwritten characters, this functions is definitively not designed for such pattern.

With best regards,

Loïc

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Thu Dec 03, 2015 10:17 pm
by fs051268
Hi,

I know that it is not designed for it but why does the function return a rotation other then zero?
The problem is that the software obviously does not know what is on the page so it should not rotate such a scan but if a rotation result is returned, it rotates the page.

Can you enhance your algorithm so it will simply not return a rotation angle for such a document?

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Fri Dec 04, 2015 3:50 pm
by Loïc
hi,

which dictionary are you using?

Regards,

Loïc

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Fri Dec 04, 2015 4:40 pm
by fs051268
The function call looks like this:
rotationAngle = OCRTesseractGetOrientation_2 ( imageId, "deu+eng+fra+spa", , 4 )

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Fri Dec 04, 2015 4:47 pm
by Loïc
ok thanks.

We have experimented a bit and we will be able to detect the correct orientation for your case for the next minor release.
We will also push some r&d efforts for the next major release (probably for a medium release) in order to improve it more.

That said, I suggest to always use 10 for the accuracy. We frequently improve this method and we are clearly focused on providing better result (accuracy and speed) with this value.

Kind regards,

Loïc

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Fri Dec 04, 2015 4:57 pm
by fs051268
Hi,

thanks!

the weird thing is, if we raise the accuracy setting to more than 3, we get the wrong result. If we set ti to 3 or below it does not return a rotation angle!

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Fri Dec 04, 2015 6:13 pm
by Loïc
Yes I've seen that. We need more to do experimentation on this method for document without machine printed characters. This is back-logged.

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Thu Dec 17, 2015 6:27 pm
by SarrasiM
Good day,

I experimented the same behavior where lowering the accuracy settings returned the good orientation :)

Loic, can you give us more information on how the orientation is detected in the background? Is it checked for the whole image or only a part of it? I have some images with machine printed characters but very stylized font in the middle, while the rest of the image use a common font but still a little stylized and it returned a 180 degrees while it should not be rotated. Is there any way a confidence level could be returned in an overload as an out parameters or anything? On this image it does return a 0 degree if accuracy is <= 4.

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Thu Dec 17, 2015 7:17 pm
by SarrasiM
Is the SetROI taken into account when using this method?

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Tue Jan 05, 2016 2:39 pm
by Loïc
Hello,
I experimented the same behavior where lowering the accuracy settings returned the good orientation :)
Please share your image and a code snippet reproducing your issue with our team. You can do that here: https://www.gdpicture.com/support/getting-support-from-our-team
Is the SetROI taken into account when using this method?
No, otherwise it would have been mentioned into the documentation.

With best regards,

Loïc

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Sun Feb 28, 2016 2:23 pm
by fs051268
Hi,

has this issue been addressed in the new version 12?

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Sun Feb 28, 2016 2:36 pm
by Loïc
Hi Ferdinand,

The V12 includes our latest R&D work about orientation detection. So yes, the issue has been "addressed" and will be continuously revisited.

With best regards,

Loïc

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Fri Mar 25, 2016 12:08 pm
by fs051268
Great, thanks.

Re: OCRTesseractGetOrientation_" returns wrong rotation

Posted: Tue Jan 29, 2019 2:44 pm
by Gabriela
Hi,

You can also refer to this example on how to use the GetOrientation() method:
https://www.gdpicture.com/guides/gdpicture/we ... 20OCR.html