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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Loading TImageEnVect for OCR

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Sidney Egnew Posted - Jun 07 2017 : 06:58:21
I wrote an application to test IEVision OCR capabilities.
ImageFolder: TImageEnFolderMView
ImageVector: TImageEnVect

I wrote functions using TImageEnVect to extract barcodes and OCR from the ImageFolder select image. Here is how I am loading ImageVector:

procedure TForm2.ImageFolderImageSelect(Sender: TObject; idx: Integer);
begin
  ImageFolder.CopyToIEBitmap(idx,ImageVector.IEBtmap);
  ImageVector.Update;
end;


The test program works correctly but I am having trouble getting it to work with my production application. Both the test and the production application are accessing images stored on disk in single page TIFF files. But the production program does not use any visual components. A queue is monitored that tells the program to process a particular image. I am using this code:

ImageVector := TImageEnVect.Create(nil);
try
//  ImageVector.LoadFromFileIEV(SourceFileName); -- I tried this first
  ImageVector.LoadObjectsFromTiff(SourceFileName,0);
  BarcodeDetection(ImageVector,myStringList);
finally
  ImageVector.Free;
end

My detection routine does not work with the new code.  Here is my detection logic:
    ImageVector.SelectionBase := iesbBitmap;
    SelectionRectangle := IEVisionRect(0, 0, 0, 0);
    if ImageVector.Selected then
      with ImageVector do
        SelectionRectangle := IEVisionRect(SelX1, SelY1, SelX2 - SelX1 + 1, SelY2 - SelY1 + 1);
    BarcodeSymbols := IEVisionLib.createBarCodeScanner().scan(ImageVector.IEBitmap.GetIEVisionImage(), SelectionRectangle);
    for i := 0 to BarcodeSymbols.size() - 1 do
    begin
      BarcodeSymbol := TIEVisionBarCodeSymbol(BarcodeSymbols.getObj(i));
      StringList.Add(BarcodeSymbol.GetSymbolType().c_str()
                   +';'
                   +BarcodeSymbol.GetData().c_str());
    end;



Please advise.

1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 08 2017 : 18:56:13
Hi

TImageEnVect is just a TImageEnView with vectorial features, so you should still use the same loading procedure:

ImageVector := TImageEnVect.Create(nil);
try
  ImageVector.IO.LoadFromFile(SourceFileName);
  BarcodeDetection(ImageVector, myStringList);
finally
  ImageVector.Free;
end

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com