dnn_TextDetectionModel_DB
import { dnn_TextDetectionModel_DB } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits dnn_TextDetectionModel.
This class represents high-level API for text detection DL networks compatible with DB model.
Related publications: [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.
Constructors and members
static new
Create text detection model from network represented in one of the supported formats.
An order of model and config arguments does not matter.
new(model: EmbindString, config: EmbindString): dnn_TextDetectionModel_DB;2 available overloads
new(network: dnn_Net): dnn_TextDetectionModel_DB;new(model: EmbindString, config: EmbindString): dnn_TextDetectionModel_DB;networkNet object.
modelBinary file contains trained weights.
configText file contains network configuration.
The dnn_TextDetectionModel_DB result.
static from1
Create an owned dnn_TextDetectionModel_DB instance with the supplied configuration.
This class represents high-level API for text detection DL networks compatible with DB model.
from1(_0: EmbindString): dnn_TextDetectionModel_DB | null;_00 argument (EmbindString).
The dnn_TextDetectionModel_DB | null result.
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
setBinaryThreshold
Set the binary threshold used by this dnn_TextDetectionModel_DB object.
setBinaryThreshold(binaryThreshold: number): dnn_TextDetectionModel_DB;binaryThresholdbinary threshold argument (number).
The dnn_TextDetectionModel_DB result.
getBinaryThreshold
Return the binary threshold configured on this dnn_TextDetectionModel_DB object.
getBinaryThreshold(): number;The number result.
setPolygonThreshold
Set the polygon threshold used by this dnn_TextDetectionModel_DB object.
setPolygonThreshold(polygonThreshold: number): dnn_TextDetectionModel_DB;polygonThresholdpolygon threshold argument (number).
The dnn_TextDetectionModel_DB result.
getPolygonThreshold
Return the polygon threshold configured on this dnn_TextDetectionModel_DB object.
getPolygonThreshold(): number;The number result.
setUnclipRatio
Set the unclip ratio used by this dnn_TextDetectionModel_DB object.
setUnclipRatio(unclipRatio: number): dnn_TextDetectionModel_DB;unclipRatiounclip ratio argument (number).
The dnn_TextDetectionModel_DB result.
getUnclipRatio
Return the unclip ratio configured on this dnn_TextDetectionModel_DB object.
getUnclipRatio(): number;The number result.
setMaxCandidates
Set the max candidates used by this dnn_TextDetectionModel_DB object.
setMaxCandidates(maxCandidates: number): dnn_TextDetectionModel_DB;maxCandidatesmax candidates argument (number).
The dnn_TextDetectionModel_DB result.
getMaxCandidates
Return the max candidates configured on this dnn_TextDetectionModel_DB object.
getMaxCandidates(): number;The number result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.