GetOrientation Method (GdPictureOCR)

Discussions about Tesseract OCR integration in GdPicture.
Post Reply
mtnguyen
Posts: 8
Joined: Mon Nov 13, 2017 11:33 pm

GetOrientation Method (GdPictureOCR)

Post by mtnguyen » Mon Mar 19, 2018 12:43 am

Hi GDPicture team,

As we are upgrading GDPicture from 11.2.0.7 to 14.0.42, we have encountered an issue with GetOrientation.
Using provided sample code, we have got pages that got rotated where they should not be.
We used you sample code of splitting TIF to get the problematic page and attached it here.

https://guides.gdpicture.com/content/Ho ... 20OCR.html

Code: Select all

using (GdPictureOCR gdpictureOCR = new GdPictureOCR())
{
	gdpictureOCR.ResourceFolder = DictionaryPath;
	gdpictureOCR.AddLanguage(_OCRLanguage);
	status = gdpictureOCR.SetImage(m_ImageID);
	int intPageRotation = gdpictureOCR.GetOrientation();
	if (intPageRotation != 0)
	{
		status = m_GdPictureImaging.RotateAngle(m_ImageID, 360 - intPageRotation);
	}
}
Thanks in advance.
Tri
Attachments
TIFTest-017.zip
(308.38 KiB) Downloaded 7 times

User avatar
Loïc
Site Admin
Posts: 5576
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GetOrientation Method (GdPictureOCR)

Post by Loïc » Tue Mar 27, 2018 9:49 am

Hi,

Using the last version I can't reproduce the problem with the attached image. Which dictionary are you using?

Kind regards,

mtnguyen
Posts: 8
Joined: Mon Nov 13, 2017 11:33 pm

Re: GetOrientation Method (GdPictureOCR)

Post by mtnguyen » Tue Mar 27, 2018 10:24 pm

Hi Loïc,

I am using the English dictionary eng.traineddata that has modified date 11/12/2017 (I guess this has not been changed since then). Beside, this is the dictionary that comes with the installation package v14.0.42.

When you are saying the latest version, do you mean v14.0.44? As I was using v14.0.42, I will try with the latest version and update you on it.

Thank you for your response.
Best regards
Tri

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest