001// 002// This file is auto-generated. Please don't modify it! 003// 004package org.opencv.objdetect; 005 006import java.util.ArrayList; 007import java.util.List; 008import org.opencv.core.Mat; 009import org.opencv.objdetect.QRCodeEncoder; 010import org.opencv.objdetect.QRCodeEncoder_Params; 011import org.opencv.utils.Converters; 012 013// C++: class QRCodeEncoder 014/** 015 * Groups the object candidate rectangles. 016 * rectList Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.) 017 * 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.) 018 * groupThreshold Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it. 019 * eps Relative difference between sides of the rectangles to merge them into a group. 020 */ 021public class QRCodeEncoder { 022 023 protected final long nativeObj; 024 protected QRCodeEncoder(long addr) { nativeObj = addr; } 025 026 public long getNativeObjAddr() { return nativeObj; } 027 028 // internal usage only 029 public static QRCodeEncoder __fromPtr__(long addr) { return new QRCodeEncoder(addr); } 030 031 // C++: enum CorrectionLevel (cv.QRCodeEncoder.CorrectionLevel) 032 public static final int 033 CORRECT_LEVEL_L = 0, 034 CORRECT_LEVEL_M = 1, 035 CORRECT_LEVEL_Q = 2, 036 CORRECT_LEVEL_H = 3; 037 038 039 // C++: enum ECIEncodings (cv.QRCodeEncoder.ECIEncodings) 040 public static final int 041 ECI_UTF8 = 26; 042 043 044 // C++: enum EncodeMode (cv.QRCodeEncoder.EncodeMode) 045 public static final int 046 MODE_AUTO = -1, 047 MODE_NUMERIC = 1, 048 MODE_ALPHANUMERIC = 2, 049 MODE_BYTE = 4, 050 MODE_ECI = 7, 051 MODE_KANJI = 8, 052 MODE_STRUCTURED_APPEND = 3; 053 054 055 // 056 // C++: static Ptr_QRCodeEncoder cv::QRCodeEncoder::create(QRCodeEncoder_Params parameters = QRCodeEncoder::Params()) 057 // 058 059 /** 060 * Constructor 061 * @param parameters QR code encoder parameters QRCodeEncoder::Params 062 * @return automatically generated 063 */ 064 public static QRCodeEncoder create(QRCodeEncoder_Params parameters) { 065 return QRCodeEncoder.__fromPtr__(create_0(parameters.nativeObj)); 066 } 067 068 /** 069 * Constructor 070 * @return automatically generated 071 */ 072 public static QRCodeEncoder create() { 073 return QRCodeEncoder.__fromPtr__(create_1()); 074 } 075 076 077 // 078 // C++: void cv::QRCodeEncoder::encode(String encoded_info, Mat& qrcode) 079 // 080 081 /** 082 * Generates QR code from input string. 083 * @param encoded_info Input string to encode. 084 * @param qrcode Generated QR code. 085 */ 086 public void encode(String encoded_info, Mat qrcode) { 087 encode_0(nativeObj, encoded_info, qrcode.nativeObj); 088 } 089 090 091 // 092 // C++: void cv::QRCodeEncoder::encodeStructuredAppend(String encoded_info, vector_Mat& qrcodes) 093 // 094 095 /** 096 * Generates QR code from input string in Structured Append mode. The encoded message is splitting over a number of QR codes. 097 * @param encoded_info Input string to encode. 098 * @param qrcodes Vector of generated QR codes. 099 */ 100 public void encodeStructuredAppend(String encoded_info, List<Mat> qrcodes) { 101 Mat qrcodes_mat = new Mat(); 102 encodeStructuredAppend_0(nativeObj, encoded_info, qrcodes_mat.nativeObj); 103 Converters.Mat_to_vector_Mat(qrcodes_mat, qrcodes); 104 qrcodes_mat.release(); 105 } 106 107 108 @Override 109 protected void finalize() throws Throwable { 110 delete(nativeObj); 111 } 112 113 114 115 // C++: static Ptr_QRCodeEncoder cv::QRCodeEncoder::create(QRCodeEncoder_Params parameters = QRCodeEncoder::Params()) 116 private static native long create_0(long parameters_nativeObj); 117 private static native long create_1(); 118 119 // C++: void cv::QRCodeEncoder::encode(String encoded_info, Mat& qrcode) 120 private static native void encode_0(long nativeObj, String encoded_info, long qrcode_nativeObj); 121 122 // C++: void cv::QRCodeEncoder::encodeStructuredAppend(String encoded_info, vector_Mat& qrcodes) 123 private static native void encodeStructuredAppend_0(long nativeObj, String encoded_info, long qrcodes_mat_nativeObj); 124 125 // native support for java finalize() 126 private static native void delete(long nativeObj); 127 128}