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
 IEVision 6.0.3.0: save/load regions
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

kolio

Ukraine
3 Posts

Posted - Aug 26 2022 :  11:19:38  Show Profile  Reply
hi. Sorry, my English not perfect :)
when I call function:
regions := ocr.getRegions(origImageEn.IEBitmap.GetIEVisionImage(), chkTextRegionsOnly.Checked);

I receive object regions (type TIEVisionVectorRect). All OK

so after that I can save regions to file (like XML). This is needed to making templates where I know which region what must contain.
It is very fast and not need to recognize regions every time

but! if I want to load saved regions from XML - i must call function:
for Node in Nodes do begin
  rect.x := strtoint(Node.Attributes['x']);
  rect.y := strtoint(Node.Attributes['y']);
  rect.width := strtoint(Node.Attributes['width']);
  rect.height := strtoint(Node.Attributes['height']);
  regions.push_back(rect);
end;


but regions = nil when OCR is created and not called function ocr.getRegions :(
so I cant insert saved regions to nil :(
can you tell me how i can create empty region object in OCR engine to add my regions manually?

and second problem: regions (type TIEVisionVectorRect) don`t contains info about type of region: text, image

my sample demo:


green rects is text layers.
at finish I want to add some functionality to rects: move, resize, delete, create new region

kolio

Ukraine
3 Posts

Posted - Aug 28 2022 :  04:46:21  Show Profile  Reply
I have modified my app for using
ocr.getRegions
only when i need to find regions and on all another operations I have using
array of TRect



Go to Top of Page

xequte

38611 Posts

Posted - Aug 28 2022 :  23:14:29  Show Profile  Reply
Hi Kolio

Yes you are better to use a native Delphi type like TRect in your own code than TIEVisionVectorRect.

Tesseract does not return any other information about text other than its position and orientation/angle.

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