ZxBarcodeBinarize Method (ImagePlane, ZxBarcodeBinarizationMode)

CVB.Net Documentation
This function applies the binarization that the function Read(ImagePlane, Rect, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology)/ReadMultiple(ImagePlane, Rect, 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(ImagePlane, Rect, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology)/ReadMultiple(ImagePlane, Rect, ZxBarcodeBinarizationMode, ZxBarcodeThoroughness, ZxBarcodeSymbology) 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 the document \a OpenSourceLicenses.chm.

Namespace:  Stemmer.Cvb.Foundation
Assembly:  Stemmer.Cvb.Foundation (in Stemmer.Cvb.Foundation.dll) Version: 14.0.0.0
Syntax

public static Image Binarize(
	ImagePlane plane,
	ZxBarcodeBinarizationMode binarization
)

Parameters

plane
Type: Stemmer.CvbImagePlane
Input 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.
binarization
Type: Stemmer.Cvb.FoundationZxBarcodeBinarizationMode
Selects the binarization algorithm to use. see ZxBarcodeBinarizationMode for eligible values.

Return Value

Type: Image
Binarization result image.
Exceptions

ExceptionCondition
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.
See Also

Reference