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
 Barcodes not decoding correctly for some images

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
sbayli Posted - Aug 11 2020 : 12:33:09
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 11 2020 : 20:19:00
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