CVB.Net 14.0
ZxBarcode Class Reference

Functionality of the ZXBarcode.dll. More...

Static Public Member Functions

static Image Binarize (ImagePlane plane, Rect aoi, ZxBarcodeBinarizationMode binarization)
 This function applies the binarization that the function ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) / ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) is going to use internally. This can be useful for judging whether which binarization will be good enough for reading the code(s). Note that it is not necessary to apply binarization to an image prior Read/ReadMultiple as these methods will always automatically binarize the image passed to it. More...
 
static Image Binarize (ImagePlane plane, ZxBarcodeBinarizationMode binarization)
 This function applies the binarization that the function ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) / ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) is going to use internally. This can be useful for judging whether which binarization will be good enough for reading the code(s). Note that it is not necessary to apply binarization to an image prior Read/ReadMultiple as these methods will always automatically binarize the image passed to it. More...
 
static ZxBarcodeReadResult Read (ImagePlane plane, Rect aoi, ZxBarcodeBinarizationMode binarization, ZxBarcodeThoroughness thoroughness, ZxBarcodeSymbology formatsToLookFor)
 Read a bar code in an image. Unlike its counterpart, ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function only reads one code. For an image with more than one code of the selected symbology it is undefined which code will be returned. More...
 
static ZxBarcodeReadResult Read (ImagePlane plane, ZxBarcodeBinarizationMode binarization, ZxBarcodeThoroughness thoroughness, ZxBarcodeSymbology formatsToLookFor)
 Read a bar code in an image. Unlike its counterpart, ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function only reads one code. For an image with more than one code of the selected symbology it is undefined which code will be returned. More...
 
static ZxBarcodeReadResult[] ReadMultiple (ImagePlane plane, Rect aoi, ZxBarcodeBinarizationMode binarization, ZxBarcodeThoroughness thoroughness, ZxBarcodeSymbology formatsToLookFor)
 Read multiple barcodes in an image. Unlike its counterpart ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function reads up to 256 recognizable codes of the selected symbologies in an image. More...
 
static ZxBarcodeReadResult[] ReadMultiple (ImagePlane plane, ZxBarcodeBinarizationMode binarization, ZxBarcodeThoroughness thoroughness, ZxBarcodeSymbology formatsToLookFor)
 Read multiple barcodes in an image. Unlike its counterpart ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function reads up to 256 recognizable codes of the selected symbologies in an image. More...
 

Detailed Description

Functionality of the ZXBarcode.dll.

Member Function Documentation

◆ Binarize() [1/2]

static Image Binarize ( ImagePlane  plane,
Rect  aoi,
ZxBarcodeBinarizationMode  binarization 
)
static

This function applies the binarization that the function ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) / ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) is going to use internally. This can be useful for judging whether which binarization will be good enough for reading the code(s). Note that it is not necessary to apply binarization to an image prior Read/ReadMultiple as these methods will always automatically binarize the image passed to it.

Please note that this function is not guaranteed to be thread-safe and we strongly advise against calling it simultaneously from different threads.

This function uses the zxing-cpp library (see https://github.com/glassechidna/zxing-cpp). zxing-cpp is a fork of the zxing project and is published under the Apache v2.0 license which requires applications and libraries that make use of this function to declare in their license information that they are using the zxing-cpp library. This may be done e.g. by adding a link to the zxing-cpp project page and the Apache v2.0 license terms (https://github.com/glassechidna/zxing-cpp/blob/master/COPYING) e.g. to a "Help" or "About" screen. In Common Vision Blox the respective links have been added to https://help.commonvisionblox.com/NextGen/OpenSourceLicenses.pdf.

Parameters
planeInput plane to work on. The plane needs to have 8 bits per pixel, otherwise an error will be returned. Note that ZXing Barcode can only process luminance information. If the input image uses a color format, either select a suitable plane or convert it to luminance information before processing it in ZXBarcode.
aoiArea of interest to be binarized.
binarizationSelects the binarization algorithm to use. see ZxBarcodeBinarizationMode for eligible values.
Returns
Binarization result image.
Exceptions
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format or if the aoi is invalid.

◆ Binarize() [2/2]

static Image Binarize ( ImagePlane  plane,
ZxBarcodeBinarizationMode  binarization 
)
static

This function applies the binarization that the function ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) / ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) is going to use internally. This can be useful for judging whether which binarization will be good enough for reading the code(s). Note that it is not necessary to apply binarization to an image prior Read/ReadMultiple as these methods will always automatically binarize the image passed to it.

Please note that this function is not guaranteed to be thread-safe and we strongly advise against calling it simultaneously from different threads.

This function uses the zxing-cpp library (see https://github.com/glassechidna/zxing-cpp). zxing-cpp is a fork of the zxing project and is published under the Apache v2.0 license which requires applications and libraries that make use of this function to declare in their license information that they are using the zxing-cpp library. This may be done e.g. by adding a link to the zxing-cpp project page and the Apache v2.0 license terms (https://github.com/glassechidna/zxing-cpp/blob/master/COPYING) e.g. to a "Help" or "About" screen. In Common Vision Blox the respective links have been added to https://help.commonvisionblox.com/NextGen/OpenSourceLicenses.pdf.

Parameters
planeInput plane to work on. The plane needs to have 8 bits per pixel, otherwise an error will be returned. Note that ZXing Barcode can only process luminance information. If the input image uses a color format, either select a suitable plane or convert it to luminance information before processing it in ZXBarcode.
binarizationSelects the binarization algorithm to use. see ZxBarcodeBinarizationMode for eligible values.
Returns
Binarization result image.
Exceptions
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format.

◆ Read() [1/2]

static ZxBarcodeReadResult Read ( ImagePlane  plane,
Rect  aoi,
ZxBarcodeBinarizationMode  binarization,
ZxBarcodeThoroughness  thoroughness,
ZxBarcodeSymbology  formatsToLookFor 
)
static

Read a bar code in an image. Unlike its counterpart, ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function only reads one code. For an image with more than one code of the selected symbology it is undefined which code will be returned.

Please note that this function is not guaranteed to be thread-safe and we strongly advise against calling it simultaneously from different threads.

When calling this function without a valid Common Vision Blox Foundation Package license, the results returned by the function call will be partly garbled: Any '0' in the result will be replaced by a '5' and any 'e' or 'E' will be replaced by an 'x' or 'X' respectively.

This function uses the zxing-cpp library (see https://github.com/glassechidna/zxing-cpp). zxing-cpp is a fork of the zxing project and is published under the Apache v2.0 license which requires applications and libraries that make use of this function to declare in their license information that they are using the zxing-cpp library. This may be done e.g. by adding a link to the zxing-cpp project page and the Apache v2.0 license terms (https://github.com/glassechidna/zxing-cpp/blob/master/COPYING) e.g. to a "Help" or "About" screen. In Common Vision Blox the respective links have been added to https://help.commonvisionblox.com/NextGen/OpenSourceLicenses.pdf.

Parameters
planeInput plane to work on. The plane needs to have 8 bits per pixel, otherwise an error will be returned. Note that ZXing Barcode can only process luminance information. If the input image uses a color format, either select a suitable plane or convert it to luminance information before processing it in ZXBarcode.
aoiArea of interest to be searched for a readable code.
binarizationSelects the binarization algorithm to use. see ZxBarcodeBinarizationMode for eligible values.
thoroughnessThoroughness to be applied when searching for codes. See ZxBarcodeThoroughness for possible values.
formatsToLookForFlags that provide a hint at what barcode formats are to be expected in the image. This hint does not limit the reading of codes - if the hint points toward e.g. Code 128 and/or QR codes and the image contains a DataMatrix code, the code will be read nevertheless. However, providing the reader with the information what code(s) might be visible in the image may speed up reading slightly. This value can be a combination of the flags in the ZxBarcodeSymbology enumeration if more than one symbology is to be expected (remember, however, that even if multiple symbologies were specified, this function will still read one code; for reading multiple codes please use ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology).
Exceptions
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format or if the aoi is invalid.
Returns
Single read result if a code has been read successfully, otherwise
null
.

◆ Read() [2/2]

static ZxBarcodeReadResult Read ( ImagePlane  plane,
ZxBarcodeBinarizationMode  binarization,
ZxBarcodeThoroughness  thoroughness,
ZxBarcodeSymbology  formatsToLookFor 
)
static

Read a bar code in an image. Unlike its counterpart, ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function only reads one code. For an image with more than one code of the selected symbology it is undefined which code will be returned.

Please note that this function is not guaranteed to be thread-safe and we strongly advise against calling it simultaneously from different threads.

When calling this function without a valid Common Vision Blox Foundation Package license, the results returned by the function call will be partly garbled: Any '0' in the result will be replaced by a '5' and any 'e' or 'E' will be replaced by an 'x' or 'X' respectively.

This function uses the zxing-cpp library (see https://github.com/glassechidna/zxing-cpp). zxing-cpp is a fork of the zxing project and is published under the Apache v2.0 license which requires applications and libraries that make use of this function to declare in their license information that they are using the zxing-cpp library. This may be done e.g. by adding a link to the zxing-cpp project page and the Apache v2.0 license terms (https://github.com/glassechidna/zxing-cpp/blob/master/COPYING) e.g. to a "Help" or "About" screen. In Common Vision Blox the respective links have been added to https://help.commonvisionblox.com/NextGen/OpenSourceLicenses.pdf.

Parameters
planeInput plane to work on. The plane needs to have 8 bits per pixel, otherwise an error will be returned. Note that ZXing Barcode can only process luminance information. If the input image uses a color format, either select a suitable plane or convert it to luminance information before processing it in ZXBarcode.
binarizationSelects the binarization algorithm to use. see ZxBarcodeBinarizationMode for eligible values.
thoroughnessThoroughness to be applied when searching for codes. See ZxBarcodeThoroughness for possible values.
formatsToLookForFlags that provide a hint at what barcode formats are to be expected in the image. This hint does not limit the reading of codes - if the hint points toward e.g. Code 128 and/or QR codes and the image contains a DataMatrix code, the code will be read nevertheless. However, providing the reader with the information what code(s) might be visible in the image may speed up reading slightly. This value can be a combination of the flags in the ZxBarcodeSymbology enumeration if more than one symbology is to be expected (remember, however, that even if multiple symbologies were specified, this function will still read one code; for reading multiple codes please use ReadMultiple.
Exceptions
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format.
Returns
Single read result if a code has been read successfully, otherwise
null
.


◆ ReadMultiple() [1/2]

static ZxBarcodeReadResult[] ReadMultiple ( ImagePlane  plane,
Rect  aoi,
ZxBarcodeBinarizationMode  binarization,
ZxBarcodeThoroughness  thoroughness,
ZxBarcodeSymbology  formatsToLookFor 
)
static

Read multiple barcodes in an image. Unlike its counterpart ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function reads up to 256 recognizable codes of the selected symbologies in an image.

Please note that this function is not guaranteed to be thread-safe and we strongly advise against calling it simultaneously from different threads.

When calling this function without a valid Common Vision Blox Foundation Package license, the results returned by the function call will be partly garbled: Any '0' in the result will be replaced by a '5' and any 'e' or 'E' will be replaced by an 'x' or 'X' respectively.

This function uses the zxing-cpp library (see https://github.com/glassechidna/zxing-cpp). zxing-cpp is a fork of the zxing project and is published under the Apache v2.0 license which requires applications and libraries that make use of this function to declare in their license information that they are using the zxing-cpp library. This may be done e.g. by adding a link to the zxing-cpp project page and the Apache v2.0 license terms (https://github.com/glassechidna/zxing-cpp/blob/master/COPYING) e.g. to a "Help" or "About" screen. In Common Vision Blox the respective links have been added to https://help.commonvisionblox.com/NextGen/OpenSourceLicenses.pdf.

Parameters
planeInput plane to work on. The plane needs to have 8 bits per pixel, otherwise an error will be returned. Note that ZXing Barcode can only process luminance information. If the input image uses a color format, either select a suitable plane or convert it to luminance information before processing it in ZXBarcode.
aoiArea of interest to be searched for a readable code.
binarizationSelects the binarization algorithm to use. see ZxBarcodeBinarizationMode for eligible values.
thoroughnessThoroughness to be applied when searching for codes. See ZxBarcodeThoroughness for possible values.
formatsToLookForFlags that provide a hint at what bar code formats are to be expected in the image. This hint does not limit the reading of codes - if the hint points toward e.g. Code 128 and/or QR codes and the image contains a DataMatrix code, the code will be read nevertheless. However, providing the reader with the information what code(s) might be visible in the image may speed up reading slightly. This value can be a combination of the flags in the ZxBarcodeSymbology enumeration if more than one symbology is to be expected.
Exceptions
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format or if the aoi is invalid.
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format or if the aoi is invalid.
Returns
Array of read results if at least one code has been read successfully, otherwise
null
.

◆ ReadMultiple() [2/2]

static ZxBarcodeReadResult[] ReadMultiple ( ImagePlane  plane,
ZxBarcodeBinarizationMode  binarization,
ZxBarcodeThoroughness  thoroughness,
ZxBarcodeSymbology  formatsToLookFor 
)
static

Read multiple barcodes in an image. Unlike its counterpart ReadMultiple(ImagePlane, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology), this function reads up to 256 recognizable codes of the selected symbologies in an image.

Please note that this function is not guaranteed to be thread-safe and we strongly advise against calling it simultaneously from different threads.

When calling this function without a valid Common Vision Blox Foundation Package license, the results returned by the function call will be partly garbled: Any '0' in the result will be replaced by a '5' and any 'e' or 'E' will be replaced by an 'x' or 'X' respectively.

This function uses the zxing-cpp library (see https://github.com/glassechidna/zxing-cpp). zxing-cpp is a fork of the zxing project and is published under the Apache v2.0 license which requires applications and libraries that make use of this function to declare in their license information that they are using the zxing-cpp library. This may be done e.g. by adding a link to the zxing-cpp project page and the Apache v2.0 license terms (https://github.com/glassechidna/zxing-cpp/blob/master/COPYING) e.g. to a "Help" or "About" screen. In Common Vision Blox the respective links have been added to https://help.commonvisionblox.com/NextGen/OpenSourceLicenses.pdf.

Parameters
planeInput plane to work on. The plane needs to have 8 bits per pixel, otherwise an error will be returned. Note that ZXing Barcode can only process luminance information. If the input image uses a color format, either select a suitable plane or convert it to luminance information before processing it in ZXBarcode.
binarizationSelects the binarization algorithm to use. see ZxBarcodeBinarizationMode for eligible values.
thoroughnessThoroughness to be applied when searching for codes. See ZxBarcodeThoroughness for possible values.
formatsToLookForFlags that provide a hint at what bar code formats are to be expected in the image. This hint does not limit the reading of codes - if the hint points toward e.g. Code 128 and/or QR codes and the image contains a DataMatrix code, the code will be read nevertheless. However, providing the reader with the information what code(s) might be visible in the image may speed up reading slightly. This value can be a combination of the flags in the ZxBarcodeSymbology enumeration if more than one symbology is to be expected.
Exceptions
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format.
ObjectDisposedExceptionif the image to which the input plane belongs has already been disposed
CvbExceptionif the input plane does not have 8 bits per pixel unsigned integer format.
Returns
Array of read results if at least one code has been read successfully, otherwise
null
.