Decode barcode when the barcode type is unknown
Posted: 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
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