Once your image has been acquired and pre-image processing has been performed to recognize the barcode on the image, the following properties must first be set:
Checks Before Barcode Recognition
If possible, the following properties should be set before the detection process is started:
Once these properties are set you are ready to recognize the barcode on the image.
Barcode Xpress detects all barcodes in an image and gives you complete details about them.
If you know where on the image the barcodes reside, setting the Area values to define a smaller rectangular area on your image will speed up processing. By default, these values are set to 0 which tells Barcode Xpress to search the entire image automatically.
Supported Barcodes for Recognition
Barcodes supported for recognition are listed in the Barcode Xpress Overview. The edition you have enabled will determine exact barcodes.
Once the BarcodeTypes property has been determined as stated in the Acquire Image topic, use the following methods and properties to recognize the barcode.
Methods
Properties
C# - Minimum C# code to recognize barcodes in an image using Accusoft.BarcodeXpress.Net
using (BarcodeXpress barcodeXpress = new BarcodeXpress("."))
using (Bitmap bitmap = new Bitmap("image.bmp"))
{
// The SetSolutionName and SetSolutionKey methods must be called to distribute the runtime.
barcodeXpress.Licensing.SetSolutionName("YourSolutionName");
barcodeXpress.Licensing.SetSolutionKey(12345,12345,12345,12345);
// The SetOEMLicenseKey is required if Manually Reported Runtime Licensing is used.
barcodeXpress.Licensing.SetOEMLicenseKey("1.0.AStringForOEMLicensing");
// call Analyze to detect barcodes in the image
// all detected barcodes will be returned to the
// Result object array.
Result[] results = barcodeXpress.reader.Analyze(bitmap);
// get some results info, if any
for (short i = 0; i < results.Length; i++)
{
// get result for current barcode
Result curResult = (Result)results.GetValue(i);
// do something with results
MessageBox.Show(curResult.BarcodeName);
MessageBox.Show(curResult.BarcodeValue);
}
}
See the Barcode Xpress Overview topic for code examples on recognizing barcodes.
See the Acquire an Image for Barcode Recognition topic for more code examples.
See the Access Results topic for information on obtaining the results after analyzing the barcode on an image.