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 !
}