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