You are here: Start » AVL.NET » AVL.RecognizeBarcode
Extracts information from a barcode located on the input image at a given position.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
public static void RecognizeBarcode ( AvlNet.Image inImage, AvlNet.Rectangle2D inBarcodePosition, int inScanCount, int inScanWidth, float inMinStrength, float inSmoothingStdDev, INullable<string> outDecodedText, out AvlNet.BarcodeFormat? outBarcodeFormat, out AvlNet.Rectangle2D outAlignedBarcodePosition, IList<AvlNet.Segment2D> diagScheduledScanSegments )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | AvlNet.Image | Input image. | |||
inBarcodePosition | AvlNet.Rectangle2D | Position of the input image in which the barcode is located. | |||
inScanCount | int | <1, INF> | 5 | Number of parallel scans run until first successful read. Default value: 5. | |
inScanWidth | int | <1, INF> | 5 | Width of the single scan. Default value: 5. | |
inMinStrength | float | <0.0f, INF> | 5.0f | Minimal strength of an extracted edge. Default value: 5.0f. | |
inSmoothingStdDev | float | <0.0f, INF> | 0.25f | Standard deviation of the gaussian smoothing applied to the profile extracted in each scan. Default value: 0.25f. | |
outDecodedText | AvlNet.INullable<string> | Decoded barcode text or nothing if all of the scans failed. | |||
outBarcodeFormat | AvlNet.BarcodeFormat? | Decoded barcode format or nothing if all of the scans failed. | |||
outAlignedBarcodePosition | AvlNet.Rectangle2D | ||||
diagScheduledScanSegments | System.Collections.Generic.IList<AvlNet.Segment2D> | Scheduled scan segments. |
Examples
Remarks
Minimal bar width requirement
To provide precise detection of the barcode width of the thinnest bar should be at least 1.5 pixels.
Depending on the barcode format guard or start/end code patterns must be readable.
Pharmacode usage
The pharmacode barcode type can be read correctly in both directions. To get results from both directions use a Pharmacode and PharmacodeInversed barcode types.
Before decoding a Pharmacode the code orientation angle is normalized to a range from -45° to 135° what makes the code decoding more stable
Using a relative coordinate systems
For more information about local coordinate systems please refer to the following article.
Function Overrides
- RecognizeBarcode(Image, Rectangle2D, Int32, Int32, Single, Single, INullable<String>, Nullable<BarcodeFormat>, Rectangle2D)
- RecognizeBarcode(Image, Rectangle2D, Nullable<CoordinateSystem2D>, Nullable<BarcodeFormat>, Int32, Int32, Single, Single, INullable<String>, Nullable<BarcodeFormat>, Rectangle2D)
- RecognizeBarcode(Image, Rectangle2D, Nullable<CoordinateSystem2D>, Nullable<BarcodeFormat>, Int32, Int32, Single, Single, INullable<String>, Nullable<BarcodeFormat>, Rectangle2D, IList<Segment2D>)