Package org.opencv.dnn
Class TextDetectionModel_DB
- java.lang.Object
- 
- org.opencv.dnn.Model
- 
- org.opencv.dnn.TextDetectionModel
- 
- org.opencv.dnn.TextDetectionModel_DB
 
 
 
- 
 public class TextDetectionModel_DB extends TextDetectionModel This class represents high-level API for text detection DL networks compatible with DB model. Related publications: CITE: liao2020real Paper: https://arxiv.org/abs/1911.08947 For more information about the hyper-parameters setting, please refer to https://github.com/MhLiao/DB Configurable parameters: - (float) binaryThreshold - The threshold of the binary map. It is usually set to 0.3. - (float) polygonThreshold - The threshold of text polygons. It is usually set to 0.5, 0.6, and 0.7. Default is 0.5f - (double) unclipRatio - The unclip ratio of the detected text region, which determines the output size. It is usually set to 2.0. - (int) maxCandidates - The max number of the output results.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedTextDetectionModel_DB(long addr)TextDetectionModel_DB(java.lang.String model)Create text detection model from network represented in one of the supported formats.TextDetectionModel_DB(java.lang.String model, java.lang.String config)Create text detection model from network represented in one of the supported formats.TextDetectionModel_DB(Net network)Create text detection algorithm from deep learning network.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TextDetectionModel_DB__fromPtr__(long addr)protected voidfinalize()floatgetBinaryThreshold()intgetMaxCandidates()floatgetPolygonThreshold()doublegetUnclipRatio()TextDetectionModel_DBsetBinaryThreshold(float binaryThreshold)TextDetectionModel_DBsetMaxCandidates(int maxCandidates)TextDetectionModel_DBsetPolygonThreshold(float polygonThreshold)TextDetectionModel_DBsetUnclipRatio(double unclipRatio)- 
Methods inherited from class org.opencv.dnn.TextDetectionModeldetect, detect, detectTextRectangles, detectTextRectangles
 - 
Methods inherited from class org.opencv.dnn.ModelenableWinograd, getNativeObjAddr, predict, setInputCrop, setInputMean, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputScale, setInputSize, setInputSize, setInputSwapRB, setPreferableBackend, setPreferableTarget
 
- 
 
- 
- 
- 
Constructor Detail- 
TextDetectionModel_DBprotected TextDetectionModel_DB(long addr) 
 - 
TextDetectionModel_DBpublic TextDetectionModel_DB(Net network) Create text detection algorithm from deep learning network.- Parameters:
- network- Net object.
 
 - 
TextDetectionModel_DBpublic TextDetectionModel_DB(java.lang.String model, java.lang.String config)Create text detection model from network represented in one of the supported formats. An order ofmodelandconfigarguments does not matter.- Parameters:
- model- Binary file contains trained weights.
- config- Text file contains network configuration.
 
 - 
TextDetectionModel_DBpublic TextDetectionModel_DB(java.lang.String model) Create text detection model from network represented in one of the supported formats. An order ofmodelandconfigarguments does not matter.- Parameters:
- model- Binary file contains trained weights.
 
 
- 
 - 
Method Detail- 
__fromPtr__public static TextDetectionModel_DB __fromPtr__(long addr) 
 - 
setBinaryThresholdpublic TextDetectionModel_DB setBinaryThreshold(float binaryThreshold) 
 - 
getBinaryThresholdpublic float getBinaryThreshold() 
 - 
setPolygonThresholdpublic TextDetectionModel_DB setPolygonThreshold(float polygonThreshold) 
 - 
getPolygonThresholdpublic float getPolygonThreshold() 
 - 
setUnclipRatiopublic TextDetectionModel_DB setUnclipRatio(double unclipRatio) 
 - 
getUnclipRatiopublic double getUnclipRatio() 
 - 
setMaxCandidatespublic TextDetectionModel_DB setMaxCandidates(int maxCandidates) 
 - 
getMaxCandidatespublic int getMaxCandidates() 
 - 
finalizeprotected void finalize() throws java.lang.Throwable- Overrides:
- finalizein class- TextDetectionModel
- Throws:
- java.lang.Throwable
 
 
- 
 
-