Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you already get a grayscale image in onCameraFrame(): then you can use functions like compare(), or threshold

public Mat onCameraFrame(Mat inputFrame) {
    Mat gray = inputFrame.gray();
    Mat bin = new Mat();
    Imgproc.threshold(gray, bin, 120, 255, Imgproc.THRESH_BINARY);

    // process bin image with tesseract

    bin.release(); // must be released manually !
}