Barcode Xpress for .NET Core v13.9 - Updated
Access Results
Developer Guide > How To > Access Results

Get Barcode Results

Result Class

The Analyze method returns an array of Result objects. Each element of the Result array contains the results of a single recognized barcode (or unsolved barcode. See ReturnPossibleBarcodes).

C# - to get the recognition results using Accusoft.BarcodeXpress13.NetCore

// Call Analyze to detect barcodes in the image 
// all detected barcodes will be returned to the 
// Result object array. 
Result[] results = bcXpress.reader.Analyze(bitmap); 

     // Get some results info, if any. 
for (short i = 0; i < results.Length; i++) 
{ 
    // Get result for current barcode. 
    Result curResult = results[i]; 

         // Do something with results.
    Console.WriteLine(curResult.BarcodeName);
    Console.WriteLine(curResult.BarcodeValue); 
}

1D barcode values are generally 7 bit ASCII, except for Code 128, which permits the use of 8 bit data. If you are using values above 127, you must use the BarcodeDataAsByte property of the Result class instead of the BarcodeValue property, and your data must be encoded.

To get the recognition results for Code 128 using encoded 8859-15

// Get some results info, if any.
for (short i = 0; i < results.Length; i++)
{
    // Get result for current barcode.
    Result curResult = results[i];
    System.Text.Encoding iso = System.Text.Encoding.GetEncoding("ISO-8859-15");
    String resultString = iso.GetString(curResult.BarcodeDataAsByte);

         // Do something with results.
    Console.WriteLine(curResult.BarcodeName);
    Console.WriteLine(resultString);
}

Properties

Property Description
Area Gets the bounding rectangular area of the recognized barcode.
BarcodeDataAsByte Gets the recognized barcode data value in bytes.
BarcodeName Gets the name of the recognized barcode.
BarcodeType Gets the type of the recognized barcode.
BarcodeValue Gets the value of the recognized barcode.
Confidence Gets the confidence of the recognized barcode.
Length Gets the length of the result string.
NumberCheckSumChars Gets the number of characters in the recognized checksum.
Point1 Gets the top left coordinate of the recognized barcode.
Point2 Gets the top right coordinate of the recognized barcode.
Point3 Gets the bottom left coordinate of the recognized barcode.
Point4 Gets the bottom right coordinate of the recognized barcode.
Skew Gets the angle of skew for the recognized barcode analyzed.
ValidCheckSum Gets a valid checksum for a recognized barcode.
ModeTransitions Get the array of BX_ModeTransition structures representing mode transitions encountered.
Info2D Get the 2D result properties of the recognized barcode.

ResultInfo2D

For supported barcodes, the Info2D property provides both the encoded indicator pattern and the detected number of rows and columns of a single barcode. For PDF417 and MicroPDF417 barcodes, column is the number of code word columns.

Property Description
RowsDetected Get the number of rows detected in the barcode.
ColumnsDetected Get the number of columns detected in the barcode.
Rows Get the number of rows defined by the indicator pattern in the barcode.
Columns Get the number of columns defined by the indicator pattern in the barcode.
ErrorCorrectionLevel Get the error correction detected in the barcode.

Order of Results

Since Barcode Xpress can return multiple barcode results from a single scan, the detected barcode results (both solved and unsolved) will be sorted using the following criteria. Note that all solved barcodes will be ordered before unsolved barcodes.

  1. First, the confidence factor is used to sort the barcode results from highest confidence to lowest. The Confidence property gets the confidence of the barcode that was recognized.
  2. Next, for any barcodes with the same confidence, they will then be sorted by their location, from top to bottom, then left to right.

 

See Also

Acquire an Image for Barcode Recognition

Recognize a Barcode

Create a Barcode

Overview

Debug Your Application

Is this page helpful?
Yes No
Thanks for your feedback.