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
img
grayscale or color (BGR) image containing QR codes.
decoded_info
UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
points
vector of Quadrangle vertices found by detect() method (or some other algorithm).
straight_qrcode
The 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
img
grayscale or color (BGR) image containing QR codes.
decoded_info
UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
points
vector 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
img
grayscale or color (BGR) image containing (or not) QR code.
points
Output vector of vertices of the minimum-area quadrangle containing the code.
-
Both detects and decodes QR codes
Declaration
Parameters
img
grayscale or color (BGR) image containing QR codes.
decoded_info
UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
points
optional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
straight_qrcode
The optional output vector of images containing rectified and binarized QR codes
-
Both detects and decodes QR codes
Declaration
Parameters
img
grayscale or color (BGR) image containing QR codes.
decoded_info
UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
points
optional 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) -> Bool
Parameters
img
grayscale or color (BGR) image containing QR codes.
decoded_info
UTF8-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
img
grayscale or color (BGR) image containing (or not) QR codes.
points
Output 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
img
grayscale or color (BGR) image containing QR code.
points
Quadrangle vertices found by detect() method (or some other algorithm).
straight_qrcode
The 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
img
grayscale or color (BGR) image containing QR code.
points
Quadrangle vertices found by detect() method (or some other algorithm).
-
Both detects and decodes QR code
Declaration
Parameters
img
grayscale or color (BGR) image containing QR code.
points
optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
straight_qrcode
The optional output image containing rectified and binarized QR code
-
Both detects and decodes QR code
Declaration
Parameters
img
grayscale or color (BGR) image containing QR code.
points
optional 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
epsX
Epsilon 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
epsY
Epsilon neighborhood, which allows you to determine the vertical pattern of the scheme 1:1:3:1:1 according to QR code standard.