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
 Barcodes not decoding correctly for some images
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

sbayli

USA
1 Posts

Posted - Aug 11 2020 :  12:33:09  Show Profile  Reply
I have some examples (attached) of images where the bar codes are not being decoded properly and sometimes they are not even seen as symbols. My preference would be that code not be read at all as opposed to being read incorrectly. Is there anything I can do to improve accuracy?

Extraction Code Looks like this:
function TBarCodeExtractor.ExtractBarCodesFromImage(ImageView : TImageEnView ;Page, ImageIndex : integer; ListIfNoneFound : Boolean): Integer;
var  symbols: TIEVisionVectorObjRef;
     Image: TIEVisionImage;
     s: TIEVisionBarCodeSymbol;
     SelRect : TIEVisionRect;
     i : integer;
     BarCode : TBarCode;
     SymbolCount : Integer;
begin
     Result := 0;
     Image :=  ImageView.IEBitmap.GetIEVisionImage;
     selRect := IEVisionRect(0, 0, ImageView.IEBitmap.Width, ImageView.IEBitmap.Height);
     symbols := IEVisionLib.createBarCodeScanner().scan(Image, SelRect);
     SymbolCount := symbols.size();
     for i := 0 to SymbolCount - 1 do
          begin
          Inc(Result);
          s := TIEVisionBarCodeSymbol(symbols.getObj(i) );
          BarCode := TBarCode.Create;
          BarCode.Page := Page;
          BarCode.ImageIndex := ImageIndex;
          BarCode.SymbolCount := SymbolCount;
          BarCode.SymbolIndex := i + 1;
          BarCode.Left := s.getBoundingBox().x;
          BarCode.Top := s.getBoundingBox().y;
          BarCode.Width := s.getBoundingBox().width;
          BarCode.Height := s.getBoundingBox().height;
          BarCode.CodeType := s.getSymbolType().c_str();
          BarCode.Text := s.getData().c_str();
          BarCodeList.Add(BarCode);
          end;
end;






Steve Bayliss

xequte

38613 Posts

Posted - Aug 11 2020 :  20:19:00  Show Profile  Reply
Hi Steve

This is a good quality image, so the only way to improve the accuracy would be to select the area containing the bar code.

When it does not return an accurate result, is the confidence affected?

c := Format('Confidence: %d', [s.getQuality()]));

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