Decode barcode when the barcode type is unknown

Discussions about 1D barcode reading and writing
Post Reply
Erkaci
Posts: 1
Joined: Fri Nov 03, 2017 12:55 pm

Decode barcode when the barcode type is unknown

Post by Erkaci » Fri Nov 10, 2017 1:58 pm

Hello to all,
I have a camera scanner which takes image barcode when is available. The image is treated following process:

I send the generated image to GDPicture in order to be decoded. Until now I have been using these functions:

_mGdPictureImaging.Barcode1DReaderDoScan(imageId, scaneMode, barcode1DTypes, false, 1);
_mGdPictureImaging.BarcodeMicroQRReaderDoScan(imageId, scaneMode, 1);
_mGdPictureImaging.BarcodeQRReaderDoScan(imageId, scaneMode, 1);


I get a queue of images, for each image used I start testing with 1D barcode. When no barcode detected I try QR, and if also not detected I try the next type, because I don’t know the type of barcode on the current image. Like :

BarcodeResult barcodeResult = DecodeD1Barcode(bitmap);

if (barcodeResult.Result != BarcodeDecodeResult.Success)
{
barcodeResult = DecodeDataMatrix(bitmap);

if (barcodeResult.Result != BarcodeDecodeResult.Success)
{
barcodeResult = DecodeQRCode(bitmap);

if (barcodeResult.Result != BarcodeDecodeResult.Success)
barcodeResult = DecodeMicroQRBarcode(bitmap);
}
}




Question : Is there any way using GDPicture to ask only to decode Barcode without specifying a type Barcode1DReaderDoScan, BarcodeMicroQRReaderDoScan or BarcodeQRReaderDoScan …? Like : BarcodeDoScan

Remark :
- The taken image has a fixed size
- The image content is a barcode and only one barcode.

Thanks

Eric

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest