Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

there is a c++ sample here , also docs and javadocs

basically, download the model and the prototxt , then something similar to this:

TextDetector detector = TextDetectorCNN.create(prototxt, weights);
Mat image = ...
MatOfRect boxes = new MatOfRect();
MatOfFloat confidences = new MatOfFloat();
detector.detect(image, boxes, confidences);

should get you started. good luck !

there is a c++ sample here , also docs and javadocs

basically, assuming, you're using opencv3.x, and you have build opencv libs with the opencv_contrib repo,

download the model and the prototxt , then something similar to this:

TextDetector detector = TextDetectorCNN.create(prototxt, weights);
Mat image = ...
MatOfRect boxes = new MatOfRect();
MatOfFloat confidences = new MatOfFloat();
detector.detect(image, boxes, confidences);

should get you started. good luck ! !

there is a c++ sample here , also docs and javadocs

assuming, you're using opencv3.x, and you have build opencv libs with the opencv_contrib repo,

download the model and the prototxt , then something similar to this:

TextDetector detector = TextDetectorCNN.create(prototxt, weights);
 Mat image = ...
MatOfRect boxes = new MatOfRect();
MatOfFloat confidences = new MatOfFloat();
detector.detect(image, boxes, confidences);

float thresh = ???; // heuristic value
Rect[] rects = boxes.toArray();
float[] conf = confidences.toArray();
for (int i=0; i<rects.length; i++)
    if (conf[i] >= thresh)
        // assume rects[i] is valid

should get you started. started in java. good luck !