Table of Contents

Class BarcodeItem

Namespace
ScanbotSDK.MAUI.Barcode.Core
Assembly
ScanbotSDK.Shared.dll

A single barcode found in the input image. Barcodes with the same content but different locations in the image are considered separate barcodes.

public class BarcodeItem : IDisposable
Inheritance
BarcodeItem
Implements
Inherited Members

Properties

DataBarStackSize

The number of 1D stacks in the barcode. Applies only to DATABAR and DATABAR_EXPANDED barcodes.

Default is 1

public int DataBarStackSize { get; init; }

Property Value

int

ExtendedQuad

As quad, but extended to appropriate height for oned barcodes.

public required Point[] ExtendedQuad { get; init; }

Property Value

Point[]

ExtendedQuadNormalized

As quadNormalized, but extended to appropriate height for oned barcodes.

public required PointF[] ExtendedQuadNormalized { get; init; }

Property Value

PointF[]

ExtractedDocument

The parsed known document format (if parsed successfully).

public required GenericDocument ExtractedDocument { get; init; }

Property Value

GenericDocument

Format

Barcode format.

Default is NONE

public BarcodeFormat Format { get; init; }

Property Value

BarcodeFormat

GlobalIndex

The index of the barcode to uniquely identify it. In case of frame accumulation, the index remains the same across frames.

Default is -1

public int GlobalIndex { get; init; }

Property Value

int

IsGS1CompositePart

True if this result is the 2D part of a GS1 Composite barcode. Can only happen if GS1_COMPOSITE scanning is disabled and a part of the composite (1D) or (2D) is scanned separately. When GS1_COMPOSITE scanning is enabled, parts of the composite barcode are never returned separately, even if their respective format is enabled in the decoding options.

Default is false

public bool IsGS1CompositePart { get; init; }

Property Value

bool

IsGS1Message

True if the barcode contains a GS1 message. Requires GS1 handling to be enabled in the decoding option.

Default is false

public bool IsGS1Message { get; init; }

Property Value

bool

IsUpsideDown

True if this is a 1D barcode that is printed upside-down, that is, the barcode was scanned right-to-left.

Default is false

public bool IsUpsideDown { get; init; }

Property Value

bool

Quad

The four corners of the barcode in the input image, in clockwise order starting from the top left, in image coordinates.

public required Point[] Quad { get; init; }

Property Value

Point[]

QuadNormalized

The four corners of the barcode in the input image, in clockwise order starting from the top left, normalized to the range [0, 1].

public required PointF[] QuadNormalized { get; init; }

Property Value

PointF[]

RawBytes

Raw bytes of barcode contents. Some barcode formats are able to encode binary data. If a barcode contains binary data, it's provided as a list of bytes in the rawBytes field. Some barcode formats additionally allow pieces of the data within to have different encodings - UTF-8, ASCII, binary, etc. The rawBytesEncodings field lists the encoding of each range in the rawBytes array. For barcode formats that contain a GS1 message (e.g. GS1 Composite), we recommend to use a GS1Handling and extract the GS1 message from the text.

public required byte[] RawBytes { get; init; }

Property Value

byte[]

RawBytesEncodings

Encoding information for the rawBytes field. Each element of this list covers some portion of the rawBytes array. Taken together, the elements of the list cover the entirety of the rawBytes array without overlap and without holes. The elements are ordered in increasing order of the start and end indices.

public required RangeEncoding[] RawBytesEncodings { get; init; }

Property Value

RangeEncoding[]

SizeScore

The size score is a floating point value between 0 and 1 that represents the relative size of the barcode in the input image. Barcodes taking up a small portion of the input image will have a score close to 0, while barcodes that take a large portion will have a score close to 1.

Default is 0

public double SizeScore { get; init; }

Property Value

double

SourceImage

A crop from the input image containing the barcode.

public ImageRef SourceImage { get; init; }

Property Value

ImageRef

StructuredAppendInfo

If this barcode is part of a structured append sequence, this field contains information about the sequence.

public required StructuredAppendInfo StructuredAppendInfo { get; init; }

Property Value

StructuredAppendInfo

Text

Text contained in the barcode. Binary data is returned in the rawBytes field only.

public required string Text { get; init; }

Property Value

string

UpcEanExtension

If this is a UPC/EAN barcode that has an EAN-2 or EAN-5 extension, this field contains the extension value. Requires the UPC_EAN_EXTENSION format to be enabled in the decoding options.

public required string UpcEanExtension { get; init; }

Property Value

string

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()