You are here: Start » FIL.NET » Function Reference » Computer Vision » Datacodes » FIL.ReadSingleQRCode
Detects and recognizes a single QR code on the input image.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void ReadSingleQRCode ( FilNet.Image inImage, FilNet.Rectangle2D? inRoi, FilNet.CoordinateSystem2D? inRoiAlignment, float inMinModuleSize, float inMaxModuleSize, float? inContrastThreshold, int? inPatternQuality, bool inAllowRotation, FilNet.Polarity inPolarity, float? inMinLineMagnitude, INullable<FilNet.QRCode> outQRCode )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inRoi | FilNet.Rectangle2D? | Range of pixels to be processed. Default value: ftl::NIL. | ||
![]() | inRoiAlignment | FilNet.CoordinateSystem2D? | Adjusts the region of interest to the position of the inspected object. Default value: ftl::NIL. | ||
![]() | inMinModuleSize | float | <1.5f, 100.0f> | 4.0f | Lower estimated size of a code unit in pixels. Default value: 4.0f. |
![]() | inMaxModuleSize | float | <1.5f, 100.0f> | 40.0f | Upper estimated size of a code unit in pixels. Default value: 40.0f. |
![]() | inContrastThreshold | float? | <1.0f, 255.0f> | Guaranteed gray level difference between dark and bright modules. Default value: ftl::NIL. | |
![]() | inPatternQuality | int? | <1, 3> | Quality of the code from 1 (extremely deformed) to 3 (perfect). Default value: ftl::NIL. | |
![]() | inAllowRotation | bool | True | Allows codes rotated in relation to the axes of the input image. Default value: True. | |
![]() | inPolarity | FilNet.Polarity | Any | Specifies whether code is darker or brighter than the background. Default value: Any. | |
![]() | inMinLineMagnitude | float? | <1.0f, 255.0f> | Strength of an edge within the code; default depends on parameters. Default value: ftl::NIL. | |
![]() | outQRCode | FilNet.INullable<FilNet.QRCode> | This parameter cannot be null. |
Description
The filter locates and decodes QR code on the image (inImage) within given region (inRoi). The encoded text length must be greater than 2.
inMinModuleSize is the expected lower bound of one module (smallest unit of the code).
inMinModuleSize is the expected upper bound of one module (smallest unit of the code).
Parameter inContrastThreshold describes contrast of the code - namely, it denotes the brightness difference between light and dark modules of the code. If not given, the algorithm uses normalization of the image to enhance the code and computes this value automatically.
inPatternQuality is an integer from the range <1,3> describing how much the code is blurred or the positional patterns are deformed. For instance, value 3 corresponds to a perfect quality code, while value 1 to an extremely blurred one. For standard cases it is recommended to use quality of 2 or to leave it default.
inAllowRotation Allows codes rotated in relation to the axes of the input image.
inPolarity Setup polarity of QR code can improve performance of ReadingQRCodes
inMinLineMagnitude describes strength of an edge within the code. This value determined automatically is usually correct, so this parameter can be viewed as a hint for the algorithm in nonstandard, tough cases.
Examples
![]() Simple case. |
![]() Dark and lower quality code. |
![]() Code viewed from an angle. |
Remarks
To be correctly detected, the code should have safety area around it (of same brightness as the code background color) at least as wide as its unit. Moreover, unit size should be at least 2 pixels.
Function Overrides
- ReadSingleQRCode(Image, Single, Single, Boolean, Polarity, INullable<QRCode>)
- ReadSingleQRCode(Image, Nullable<Rectangle2D>, Nullable<CoordinateSystem2D>, Single, Single, Nullable<Single>, Nullable<Int32>, Boolean, Polarity, Nullable<Single>, INullable<QRCode>, Rectangle2D)
- ReadSingleQRCode(Image, Nullable<Rectangle2D>, Nullable<CoordinateSystem2D>, Single, Single, Nullable<Single>, Nullable<Int32>, Boolean, Polarity, Nullable<Single>, INullable<QRCode>, NullableValue<Rectangle2D>)