001// 002// This file is auto-generated. Please don't modify it! 003// 004package org.opencv.dnn; 005 006import org.opencv.dnn.Net; 007import org.opencv.dnn.TextDetectionModel; 008import org.opencv.dnn.TextDetectionModel_EAST; 009 010// C++: class TextDetectionModel_EAST 011/** 012 * This class represents high-level API for text detection DL networks compatible with EAST model. 013 * 014 * Configurable parameters: 015 * - (float) confThreshold - used to filter boxes by confidences, default: 0.5f 016 * - (float) nmsThreshold - used in non maximum suppression, default: 0.0f 017 */ 018public class TextDetectionModel_EAST extends TextDetectionModel { 019 020 protected TextDetectionModel_EAST(long addr) { super(addr); } 021 022 // internal usage only 023 public static TextDetectionModel_EAST __fromPtr__(long addr) { return new TextDetectionModel_EAST(addr); } 024 025 // 026 // C++: cv::dnn::TextDetectionModel_EAST::TextDetectionModel_EAST(Net network) 027 // 028 029 /** 030 * Create text detection algorithm from deep learning network 031 * @param network Net object 032 */ 033 public TextDetectionModel_EAST(Net network) { 034 super(TextDetectionModel_EAST_0(network.nativeObj)); 035 } 036 037 038 // 039 // C++: cv::dnn::TextDetectionModel_EAST::TextDetectionModel_EAST(string model, string config = "") 040 // 041 042 /** 043 * Create text detection model from network represented in one of the supported formats. 044 * An order of {@code model} and {@code config} arguments does not matter. 045 * @param model Binary file contains trained weights. 046 * @param config Text file contains network configuration. 047 */ 048 public TextDetectionModel_EAST(String model, String config) { 049 super(TextDetectionModel_EAST_1(model, config)); 050 } 051 052 /** 053 * Create text detection model from network represented in one of the supported formats. 054 * An order of {@code model} and {@code config} arguments does not matter. 055 * @param model Binary file contains trained weights. 056 */ 057 public TextDetectionModel_EAST(String model) { 058 super(TextDetectionModel_EAST_2(model)); 059 } 060 061 062 // 063 // C++: TextDetectionModel_EAST cv::dnn::TextDetectionModel_EAST::setConfidenceThreshold(float confThreshold) 064 // 065 066 /** 067 * Set the detection confidence threshold 068 * @param confThreshold A threshold used to filter boxes by confidences 069 * @return automatically generated 070 */ 071 public TextDetectionModel_EAST setConfidenceThreshold(float confThreshold) { 072 return new TextDetectionModel_EAST(setConfidenceThreshold_0(nativeObj, confThreshold)); 073 } 074 075 076 // 077 // C++: float cv::dnn::TextDetectionModel_EAST::getConfidenceThreshold() 078 // 079 080 /** 081 * Get the detection confidence threshold 082 * @return automatically generated 083 */ 084 public float getConfidenceThreshold() { 085 return getConfidenceThreshold_0(nativeObj); 086 } 087 088 089 // 090 // C++: TextDetectionModel_EAST cv::dnn::TextDetectionModel_EAST::setNMSThreshold(float nmsThreshold) 091 // 092 093 /** 094 * Set the detection NMS filter threshold 095 * @param nmsThreshold A threshold used in non maximum suppression 096 * @return automatically generated 097 */ 098 public TextDetectionModel_EAST setNMSThreshold(float nmsThreshold) { 099 return new TextDetectionModel_EAST(setNMSThreshold_0(nativeObj, nmsThreshold)); 100 } 101 102 103 // 104 // C++: float cv::dnn::TextDetectionModel_EAST::getNMSThreshold() 105 // 106 107 /** 108 * Get the detection confidence threshold 109 * @return automatically generated 110 */ 111 public float getNMSThreshold() { 112 return getNMSThreshold_0(nativeObj); 113 } 114 115 116 @Override 117 protected void finalize() throws Throwable { 118 delete(nativeObj); 119 } 120 121 122 123 // C++: cv::dnn::TextDetectionModel_EAST::TextDetectionModel_EAST(Net network) 124 private static native long TextDetectionModel_EAST_0(long network_nativeObj); 125 126 // C++: cv::dnn::TextDetectionModel_EAST::TextDetectionModel_EAST(string model, string config = "") 127 private static native long TextDetectionModel_EAST_1(String model, String config); 128 private static native long TextDetectionModel_EAST_2(String model); 129 130 // C++: TextDetectionModel_EAST cv::dnn::TextDetectionModel_EAST::setConfidenceThreshold(float confThreshold) 131 private static native long setConfidenceThreshold_0(long nativeObj, float confThreshold); 132 133 // C++: float cv::dnn::TextDetectionModel_EAST::getConfidenceThreshold() 134 private static native float getConfidenceThreshold_0(long nativeObj); 135 136 // C++: TextDetectionModel_EAST cv::dnn::TextDetectionModel_EAST::setNMSThreshold(float nmsThreshold) 137 private static native long setNMSThreshold_0(long nativeObj, float nmsThreshold); 138 139 // C++: float cv::dnn::TextDetectionModel_EAST::getNMSThreshold() 140 private static native float getNMSThreshold_0(long nativeObj); 141 142 // native support for java finalize() 143 private static native void delete(long nativeObj); 144 145}