Class TextDetectionModel

    • Constructor Detail

      • TextDetectionModel

        protected TextDetectionModel​(long addr)
    • Method Detail

      • detect

        public void detect​(Mat frame,
                           List<MatOfPoint> detections,
                           MatOfFloat confidences)
        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 retrive image region without perspective transformations. Note: If DL model doesn't support that kind of output then result may be derived from detectTextRectangles() output.
        Parameters:
        frame - The input image
        detections - array with detections' quadrangles (4 points per result)
        confidences - array with detection confidences
      • detectTextRectangles

        public void detectTextRectangles​(Mat frame,
                                         MatOfRotatedRect detections,
                                         MatOfFloat confidences)
        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.
        Parameters:
        frame - the input image
        detections - array with detections' RotationRect results
        confidences - array with detection confidences
      • detectTextRectangles

        public void detectTextRectangles​(Mat frame,
                                         MatOfRotatedRect detections)