dnn_TextDetectionModel
import { dnn_TextDetectionModel } 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_Model.
Base class for text detection networks
Constructors and members
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.
detect
Performs detection
Given the input frame, prepare network input, run network inference, post-process network output and return result detections.
Each result is quadrangle's 4 points in this order:
- bottom-left
- top-left
- top-right
- bottom-right
Use cv::getPerspectiveTransform function to retrieve image region without perspective transformations.
Note: If DL model doesn't support that kind of output then result may be derived from detectTextRectangles() output.
detect(frame: Mat, detections: PointVectorVector, confidences: FloatVector): void;frameThe input image
detectionsOutput destination, filled by the native operation. array with detections' quadrangles (4 points per result)
confidencesOutput destination, filled by the native operation. array with detection confidences
detect1
Performs detection
Given the input frame, prepare network input, run network inference, post-process network output and return result detections.
Each result is quadrangle's 4 points in this order:
- bottom-left
- top-left
- top-right
- bottom-right
Use cv::getPerspectiveTransform function to retrieve image region without perspective transformations.
Note: If DL model doesn't support that kind of output then result may be derived from detectTextRectangles() output.
detect1(frame: Mat, detections: PointVectorVector): void;frameThe input image
detectionsOutput destination, filled by the native operation. array with detections' quadrangles (4 points per result)
detectTextRectangles
Performs detection
Given the input frame, prepare network input, run network inference, post-process network output and return result detections.
Each result is rotated rectangle.
Note: Result may be inaccurate in case of strong perspective transformations.
detectTextRectangles(frame: Mat, detections: RotatedRectVector, confidences: FloatVector): void;framethe input image
detectionsOutput destination, filled by the native operation. array with detections' RotationRect results
confidencesOutput destination, filled by the native operation. array with detection confidences
detectTextRectangles1
Performs detection
Given the input frame, prepare network input, run network inference, post-process network output and return result detections.
Each result is rotated rectangle.
Note: Result may be inaccurate in case of strong perspective transformations.
detectTextRectangles1(frame: Mat, detections: RotatedRectVector): void;framethe input image
detectionsOutput destination, filled by the native operation. array with detections' RotationRect results
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.