Dropout red color and binarize image (Android)
Hey, im new to OpenCV and i'd like to use it in my Android Application.
In the app i have to process some images of transactions like this: Example image
I want to filter/dropout the red form color and then binarize the image.
Later i need some OCR to recognize some numbers in the footer etc. so thought i use this to improve the quality of the image:
Imgproc.morphologyEx(mat, mat, Imgproc.MORPH_OPEN, Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(2, 2)));
Imgproc.morphologyEx(mat, mat, Imgproc.MORPH_CLOSE, Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(2, 2)));
The opening should remove the noise in the image and the closing after should improve the written values on the image.
Im not sure tho whats the best way to accomplish the first part (filtering the red form color and binarizing the image). Hope you can give me some tips.
Best regards