001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.objdetect;
005
006import org.opencv.core.Mat;
007import org.opencv.objdetect.QRCodeDetector;
008
009// C++: class QRCodeDetector
010
011public class QRCodeDetector extends GraphicalCodeDetector {
012
013    protected QRCodeDetector(long addr) { super(addr); }
014
015    // internal usage only
016    public static QRCodeDetector __fromPtr__(long addr) { return new QRCodeDetector(addr); }
017
018    //
019    // C++:   cv::QRCodeDetector::QRCodeDetector()
020    //
021
022    public QRCodeDetector() {
023        super(QRCodeDetector_0());
024    }
025
026
027    //
028    // C++:  QRCodeDetector cv::QRCodeDetector::setEpsX(double epsX)
029    //
030
031    /**
032     * sets the epsilon used during the horizontal scan of QR code stop marker detection.
033     *      @param epsX Epsilon neighborhood, which allows you to determine the horizontal pattern
034     *      of the scheme 1:1:3:1:1 according to QR code standard.
035     * @return automatically generated
036     */
037    public QRCodeDetector setEpsX(double epsX) {
038        return new QRCodeDetector(setEpsX_0(nativeObj, epsX));
039    }
040
041
042    //
043    // C++:  QRCodeDetector cv::QRCodeDetector::setEpsY(double epsY)
044    //
045
046    /**
047     * sets the epsilon used during the vertical scan of QR code stop marker detection.
048     *      @param epsY Epsilon neighborhood, which allows you to determine the vertical pattern
049     *      of the scheme 1:1:3:1:1 according to QR code standard.
050     * @return automatically generated
051     */
052    public QRCodeDetector setEpsY(double epsY) {
053        return new QRCodeDetector(setEpsY_0(nativeObj, epsY));
054    }
055
056
057    //
058    // C++:  QRCodeDetector cv::QRCodeDetector::setUseAlignmentMarkers(bool useAlignmentMarkers)
059    //
060
061    /**
062     * use markers to improve the position of the corners of the QR code
063     *
064     * alignmentMarkers using by default
065     * @param useAlignmentMarkers automatically generated
066     * @return automatically generated
067     */
068    public QRCodeDetector setUseAlignmentMarkers(boolean useAlignmentMarkers) {
069        return new QRCodeDetector(setUseAlignmentMarkers_0(nativeObj, useAlignmentMarkers));
070    }
071
072
073    //
074    // C++:  String cv::QRCodeDetector::decodeCurved(Mat img, Mat points, Mat& straight_qrcode = Mat())
075    //
076
077    /**
078     * Decodes QR code on a curved surface in image once it's found by the detect() method.
079     *
080     *      Returns UTF8-encoded output string or empty string if the code cannot be decoded.
081     *      @param img grayscale or color (BGR) image containing QR code.
082     *      @param points Quadrangle vertices found by detect() method (or some other algorithm).
083     *      @param straight_qrcode The optional output image containing rectified and binarized QR code
084     * @return automatically generated
085     */
086    public String decodeCurved(Mat img, Mat points, Mat straight_qrcode) {
087        return decodeCurved_0(nativeObj, img.nativeObj, points.nativeObj, straight_qrcode.nativeObj);
088    }
089
090    /**
091     * Decodes QR code on a curved surface in image once it's found by the detect() method.
092     *
093     *      Returns UTF8-encoded output string or empty string if the code cannot be decoded.
094     *      @param img grayscale or color (BGR) image containing QR code.
095     *      @param points Quadrangle vertices found by detect() method (or some other algorithm).
096     * @return automatically generated
097     */
098    public String decodeCurved(Mat img, Mat points) {
099        return decodeCurved_1(nativeObj, img.nativeObj, points.nativeObj);
100    }
101
102
103    //
104    // C++:  string cv::QRCodeDetector::detectAndDecodeCurved(Mat img, Mat& points = Mat(), Mat& straight_qrcode = Mat())
105    //
106
107    /**
108     * Both detects and decodes QR code on a curved surface
109     *
110     *      @param img grayscale or color (BGR) image containing QR code.
111     *      @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
112     *      @param straight_qrcode The optional output image containing rectified and binarized QR code
113     * @return automatically generated
114     */
115    public String detectAndDecodeCurved(Mat img, Mat points, Mat straight_qrcode) {
116        return detectAndDecodeCurved_0(nativeObj, img.nativeObj, points.nativeObj, straight_qrcode.nativeObj);
117    }
118
119    /**
120     * Both detects and decodes QR code on a curved surface
121     *
122     *      @param img grayscale or color (BGR) image containing QR code.
123     *      @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
124     * @return automatically generated
125     */
126    public String detectAndDecodeCurved(Mat img, Mat points) {
127        return detectAndDecodeCurved_1(nativeObj, img.nativeObj, points.nativeObj);
128    }
129
130    /**
131     * Both detects and decodes QR code on a curved surface
132     *
133     *      @param img grayscale or color (BGR) image containing QR code.
134     * @return automatically generated
135     */
136    public String detectAndDecodeCurved(Mat img) {
137        return detectAndDecodeCurved_2(nativeObj, img.nativeObj);
138    }
139
140
141    @Override
142    protected void finalize() throws Throwable {
143        delete(nativeObj);
144    }
145
146
147
148    // C++:   cv::QRCodeDetector::QRCodeDetector()
149    private static native long QRCodeDetector_0();
150
151    // C++:  QRCodeDetector cv::QRCodeDetector::setEpsX(double epsX)
152    private static native long setEpsX_0(long nativeObj, double epsX);
153
154    // C++:  QRCodeDetector cv::QRCodeDetector::setEpsY(double epsY)
155    private static native long setEpsY_0(long nativeObj, double epsY);
156
157    // C++:  QRCodeDetector cv::QRCodeDetector::setUseAlignmentMarkers(bool useAlignmentMarkers)
158    private static native long setUseAlignmentMarkers_0(long nativeObj, boolean useAlignmentMarkers);
159
160    // C++:  String cv::QRCodeDetector::decodeCurved(Mat img, Mat points, Mat& straight_qrcode = Mat())
161    private static native String decodeCurved_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_qrcode_nativeObj);
162    private static native String decodeCurved_1(long nativeObj, long img_nativeObj, long points_nativeObj);
163
164    // C++:  string cv::QRCodeDetector::detectAndDecodeCurved(Mat img, Mat& points = Mat(), Mat& straight_qrcode = Mat())
165    private static native String detectAndDecodeCurved_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_qrcode_nativeObj);
166    private static native String detectAndDecodeCurved_1(long nativeObj, long img_nativeObj, long points_nativeObj);
167    private static native String detectAndDecodeCurved_2(long nativeObj, long img_nativeObj);
168
169    // native support for java finalize()
170    private static native void delete(long nativeObj);
171
172}