Package org.opencv.objdetect
Class QRCodeDetector
java.lang.Object
org.opencv.objdetect.QRCodeDetector
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QRCodeDetector
__fromPtr__
(long addr) Decodes QR code in image once it's found by the detect() method.Decodes QR code in image once it's found by the detect() method.decodeCurved
(Mat img, Mat points) Decodes QR code on a curved surface in image once it's found by the detect() method.decodeCurved
(Mat img, Mat points, Mat straight_qrcode) Decodes QR code on a curved surface in image once it's found by the detect() method.boolean
decodeMulti
(Mat img, Mat points, List<String> decoded_info) Decodes QR codes in image once it's found by the detect() method.boolean
Decodes QR codes in image once it's found by the detect() method.boolean
Detects QR code in image and returns the quadrangle containing the code.detectAndDecode
(Mat img) Both detects and decodes QR codedetectAndDecode
(Mat img, Mat points) Both detects and decodes QR codedetectAndDecode
(Mat img, Mat points, Mat straight_qrcode) Both detects and decodes QR codedetectAndDecodeCurved
(Mat img) Both detects and decodes QR code on a curved surfacedetectAndDecodeCurved
(Mat img, Mat points) Both detects and decodes QR code on a curved surfacedetectAndDecodeCurved
(Mat img, Mat points, Mat straight_qrcode) Both detects and decodes QR code on a curved surfaceboolean
detectAndDecodeMulti
(Mat img, List<String> decoded_info) Both detects and decodes QR codesboolean
detectAndDecodeMulti
(Mat img, List<String> decoded_info, Mat points) Both detects and decodes QR codesboolean
Both detects and decodes QR codesboolean
detectMulti
(Mat img, Mat points) Detects QR codes in image and returns the vector of the quadrangles containing the codes.protected void
finalize()
long
void
setEpsX
(double epsX) sets the epsilon used during the horizontal scan of QR code stop marker detection.void
setEpsY
(double epsY) sets the epsilon used during the vertical scan of QR code stop marker detection.
-
Field Details
-
nativeObj
protected final long nativeObj
-
-
Constructor Details
-
QRCodeDetector
protected QRCodeDetector(long addr) -
QRCodeDetector
public QRCodeDetector()
-
-
Method Details
-
getNativeObjAddr
public long getNativeObjAddr() -
__fromPtr__
-
setEpsX
public void setEpsX(double epsX) sets the epsilon used during the horizontal scan of QR code stop marker detection.- 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.
-
setEpsY
public void setEpsY(double epsY) sets the epsilon used during the vertical scan of QR code stop marker detection.- 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.
-
detect
Detects QR code in image and returns the quadrangle containing the code.- 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.- Returns:
- automatically generated
-
decode
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.- 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- Returns:
- automatically generated
-
decode
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.- Parameters:
img
- grayscale or color (BGR) image containing QR code.points
- Quadrangle vertices found by detect() method (or some other algorithm).- Returns:
- automatically generated
-
decodeCurved
Decodes QR code on a curved surface in image once it's found by the detect() method. Returns UTF8-encoded output string or empty string if the code cannot be decoded.- 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- Returns:
- automatically generated
-
decodeCurved
Decodes QR code on a curved surface in image once it's found by the detect() method. Returns UTF8-encoded output string or empty string if the code cannot be decoded.- Parameters:
img
- grayscale or color (BGR) image containing QR code.points
- Quadrangle vertices found by detect() method (or some other algorithm).- Returns:
- automatically generated
-
detectAndDecode
Both detects and decodes QR code- 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- Returns:
- automatically generated
-
detectAndDecode
Both detects and decodes QR code- 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.- Returns:
- automatically generated
-
detectAndDecode
Both detects and decodes QR code- Parameters:
img
- grayscale or color (BGR) image containing QR code.- Returns:
- automatically generated
-
detectAndDecodeCurved
Both detects and decodes QR code on a curved surface- 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- Returns:
- automatically generated
-
detectAndDecodeCurved
Both detects and decodes QR code on a curved surface- 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.- Returns:
- automatically generated
-
detectAndDecodeCurved
Both detects and decodes QR code on a curved surface- Parameters:
img
- grayscale or color (BGR) image containing QR code.- Returns:
- automatically generated
-
detectMulti
Detects QR codes in image and returns the vector of the quadrangles containing the codes.- 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.- Returns:
- automatically generated
-
decodeMulti
public boolean decodeMulti(Mat img, Mat points, List<String> decoded_info, List<Mat> straight_qrcode) Decodes QR codes in image once it's found by the detect() method.- 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- Returns:
- automatically generated
-
decodeMulti
Decodes QR codes in image once it's found by the detect() method.- 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).- Returns:
- automatically generated
-
detectAndDecodeMulti
public boolean detectAndDecodeMulti(Mat img, List<String> decoded_info, Mat points, List<Mat> straight_qrcode) Both detects and decodes QR codes- 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- Returns:
- automatically generated
-
detectAndDecodeMulti
Both detects and decodes QR codes- 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.- Returns:
- automatically generated
-
detectAndDecodeMulti
Both detects and decodes QR codes- 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.- Returns:
- automatically generated
-
finalize
-