ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Automatic text orientation before OCR
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mimaletic

Slovenia
7 Posts

Posted - Feb 20 2013 :  12:30:07  Show Profile  Reply
Hi,

We purchased licence for ievision dll approx. one month ago, for
implementing our OCR exe.
Everything works fine except one thing. Dll ignores page orientation and OCR text is in that case, only mess of characters.

I tried solution on your support page, but problem is still there.
Rotation not worked.
// perform OCR
angle :=m_OCR.getTextAngle(ImageEnVect1.IEBitmap.GetIEVisionImage()) *
180 / PI;
ImageEnVect1.IEBitmap.Origin := ieboBOTTOMLEFT;
ImageEnVect1.Proc.Rotate(-angle);
SetOCRParams();
ocrrect := ImageEnVect1.SelectedRect;
memo1.Lines.Text :=
m_OCR.recognize(ImageEnVect1.IEBitmap.GetIEVisionImage(),
IEVisionRect(ocrrect.x, ocrrect.y, ocrrect.width, ocrrect.height)).c_str();

Is there any way to automatically recognise text orientation and rotate picture in right direction, before starting OCR?

Thanks in advance and have a nice day,
Milenko.

fab

1310 Posts

Posted - Feb 27 2013 :  01:38:49  Show Profile  Reply
Hi,
please could you post a sample image?
Go to Top of Page

mimaletic

Slovenia
7 Posts

Posted - Feb 27 2013 :  04:11:41  Show Profile  Reply
Thanks for your reply Fabrizio. Here is one image example, another one has Nigel in his mailbox... :-)

Go to Top of Page

fab

1310 Posts

Posted - Mar 04 2013 :  09:40:12  Show Profile  Reply
It is not simple to detect the right angle when the image is rotated by 90/180/etc degrees...
Anyway following works for your image:

ImageEnView1.IO.LoadFromFile(filename);
ImageEnView1.Proc.Rotate(ImageEnView1.Proc.CalcOrientation());
Go to Top of Page

mimaletic

Slovenia
7 Posts

Posted - Mar 13 2013 :  01:42:58  Show Profile  Reply
Thanks Fabrizio,

Your solution works fine for 90 degrees rotated documents and that's acceptable for our application purpose. IEVision.dll is great product and has fine price/performance ratio.

I was away. Sorry for late answer. Regards, M.
Go to Top of Page

xequte

39140 Posts

Posted - Jan 12 2015 :  21:56:34  Show Profile  Reply
FYI, the next version of IEVision will improve the detection of rotated documents.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: