QRCodeDetector
Objective-C
@interface QRCodeDetector : NSObject
Swift
class QRCodeDetector : NSObject
Groups the object candidate rectangles. rectList Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.) weights Input/output vector of weights of rectangles. Output vector includes weights of retained and grouped rectangles. (The Python list is not modified in place.) groupThreshold Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it. eps Relative difference between sides of the rectangles to merge them into a group.
Member of Objdetect
-
Declaration
Objective-C
- (instancetype)init;Swift
init() -
Decodes QR codes in image once it’s found by the detect() method.
Declaration
Parameters
imggrayscale or color (BGR) image containing QR codes.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
pointsvector of Quadrangle vertices found by detect() method (or some other algorithm).
straight_qrcodeThe optional output vector of images containing rectified and binarized QR codes
-
Decodes QR codes in image once it’s found by the detect() method.
Declaration
Parameters
imggrayscale or color (BGR) image containing QR codes.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
pointsvector of Quadrangle vertices found by detect() method (or some other algorithm).
-
Detects QR code in image and returns the quadrangle containing the code.
Declaration
Parameters
imggrayscale or color (BGR) image containing (or not) QR code.
pointsOutput vector of vertices of the minimum-area quadrangle containing the code.
-
Both detects and decodes QR codes
Declaration
Parameters
imggrayscale or color (BGR) image containing QR codes.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
pointsoptional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
straight_qrcodeThe optional output vector of images containing rectified and binarized QR codes
-
Both detects and decodes QR codes
Declaration
Parameters
imggrayscale or color (BGR) image containing QR codes.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
pointsoptional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
-
Both detects and decodes QR codes
Declaration
Objective-C
- (BOOL)detectAndDecodeMulti:(nonnull Mat *)img decoded_info:(nonnull NSMutableArray<NSString *> *)decoded_info;Swift
func detectAndDecodeMulti(img: Mat, decoded_info: NSMutableArray) -> BoolParameters
imggrayscale or color (BGR) image containing QR codes.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
-
Detects QR codes in image and returns the vector of the quadrangles containing the codes.
Declaration
Parameters
imggrayscale or color (BGR) image containing (or not) QR codes.
pointsOutput vector of vector of vertices of the minimum-area quadrangle containing the codes.
-
Decodes QR code in image once it’s found by the detect() method.
Returns UTF8-encoded output string or empty string if the code cannot be decoded.Declaration
Parameters
imggrayscale or color (BGR) image containing QR code.
pointsQuadrangle vertices found by detect() method (or some other algorithm).
straight_qrcodeThe optional output image containing rectified and binarized QR code
-
Decodes QR code in image once it’s found by the detect() method.
Returns UTF8-encoded output string or empty string if the code cannot be decoded.Declaration
Parameters
imggrayscale or color (BGR) image containing QR code.
pointsQuadrangle vertices found by detect() method (or some other algorithm).
-
Both detects and decodes QR code
Declaration
Parameters
imggrayscale or color (BGR) image containing QR code.
pointsoptional output array of vertices of the found QR code quadrangle. Will be empty if not found.
straight_qrcodeThe optional output image containing rectified and binarized QR code
-
Both detects and decodes QR code
Declaration
Parameters
imggrayscale or color (BGR) image containing QR code.
pointsoptional output array of vertices of the found QR code quadrangle. Will be empty if not found.
-
sets the epsilon used during the horizontal scan of QR code stop marker detection.
Declaration
Objective-C
- (void)setEpsX:(double)epsX;Swift
func setEpsX(epsX: Double)Parameters
epsXEpsilon neighborhood, which allows you to determine the horizontal pattern of the scheme 1:1:3:1:1 according to QR code standard.
-
sets the epsilon used during the vertical scan of QR code stop marker detection.
Declaration
Objective-C
- (void)setEpsY:(double)epsY;Swift
func setEpsY(epsY: Double)Parameters
epsYEpsilon neighborhood, which allows you to determine the vertical pattern of the scheme 1:1:3:1:1 according to QR code standard.
View on GitHub
QRCodeDetector Class Reference