Package org.opencv.objdetect
Class QRCodeDetector
- java.lang.Object
-
- org.opencv.objdetect.GraphicalCodeDetector
-
- org.opencv.objdetect.QRCodeDetector
-
public class QRCodeDetector extends GraphicalCodeDetector
-
-
Field Summary
-
Fields inherited from class org.opencv.objdetect.GraphicalCodeDetector
nativeObj
-
-
Constructor Summary
Constructors Modifier Constructor Description QRCodeDetector()protectedQRCodeDetector(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QRCodeDetector__fromPtr__(long addr)java.lang.StringdecodeCurved(Mat img, Mat points)Decodes QR code on a curved surface in image once it's found by the detect() method.java.lang.StringdecodeCurved(Mat img, Mat points, Mat straight_qrcode)Decodes QR code on a curved surface in image once it's found by the detect() method.java.lang.StringdetectAndDecodeCurved(Mat img)Both detects and decodes QR code on a curved surfacejava.lang.StringdetectAndDecodeCurved(Mat img, Mat points)Both detects and decodes QR code on a curved surfacejava.lang.StringdetectAndDecodeCurved(Mat img, Mat points, Mat straight_qrcode)Both detects and decodes QR code on a curved surfaceprotected voidfinalize()intgetEncoding()Returns a kind of encoding for the decoded info from the latest REF: decode or REF: detectAndDecode call When REF: decode or REF: detectAndDecode is used, valid value is zero.intgetEncoding(int codeIdx)Returns a kind of encoding for the decoded info from the latest REF: decode or REF: detectAndDecode callQRCodeDetectorsetEpsX(double epsX)sets the epsilon used during the horizontal scan of QR code stop marker detection.QRCodeDetectorsetEpsY(double epsY)sets the epsilon used during the vertical scan of QR code stop marker detection.QRCodeDetectorsetUseAlignmentMarkers(boolean useAlignmentMarkers)use markers to improve the position of the corners of the QR code alignmentMarkers using by default-
Methods inherited from class org.opencv.objdetect.GraphicalCodeDetector
decode, decode, decodeBytes, decodeBytes, decodeBytesMulti, decodeBytesMulti, decodeMulti, decodeMulti, detect, detectAndDecode, detectAndDecode, detectAndDecode, detectAndDecodeBytes, detectAndDecodeBytes, detectAndDecodeBytes, detectAndDecodeBytesMulti, detectAndDecodeBytesMulti, detectAndDecodeBytesMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectMulti, getNativeObjAddr
-
-
-
-
Method Detail
-
__fromPtr__
public static QRCodeDetector __fromPtr__(long addr)
-
setEpsX
public QRCodeDetector 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.- Returns:
- automatically generated
-
setEpsY
public QRCodeDetector 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.- Returns:
- automatically generated
-
setUseAlignmentMarkers
public QRCodeDetector setUseAlignmentMarkers(boolean useAlignmentMarkers)
use markers to improve the position of the corners of the QR code alignmentMarkers using by default- Parameters:
useAlignmentMarkers- automatically generated- Returns:
- automatically generated
-
decodeCurved
public java.lang.String 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. 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
public java.lang.String decodeCurved(Mat img, Mat points)
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
-
detectAndDecodeCurved
public java.lang.String detectAndDecodeCurved(Mat img, Mat points, Mat straight_qrcode)
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
public java.lang.String detectAndDecodeCurved(Mat img, Mat points)
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
public java.lang.String detectAndDecodeCurved(Mat img)
Both detects and decodes QR code on a curved surface- Parameters:
img- grayscale or color (BGR) image containing QR code.- Returns:
- automatically generated
-
getEncoding
public int getEncoding(int codeIdx)
Returns a kind of encoding for the decoded info from the latest REF: decode or REF: detectAndDecode call- Parameters:
codeIdx- an index of the previously decoded QR code. When REF: decode or REF: detectAndDecode is used, valid value is zero. For REF: decodeMulti or REF: detectAndDecodeMulti use indices corresponding to the output order.- Returns:
- automatically generated
-
getEncoding
public int getEncoding()
Returns a kind of encoding for the decoded info from the latest REF: decode or REF: detectAndDecode call When REF: decode or REF: detectAndDecode is used, valid value is zero. For REF: decodeMulti or REF: detectAndDecodeMulti use indices corresponding to the output order.- Returns:
- automatically generated
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classGraphicalCodeDetector- Throws:
java.lang.Throwable
-
-