I am working with Opencv for my project. I need to convert the image below to threshold image
I tried this function:
Imgproc.threshold(imgGray, imgThreshold, 0, 255, Imgproc.THRESH_BINARY + Imgproc.THRESH_OTSU);
But the result was not so good, as you see below
So I tried the adaptiveThreshold function
:
Imgproc.adaptiveThreshold(imgGray, imgThreshold, 255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C, Imgproc.THRESH_BINARY, 11, 2);
and it resulted:
I just expect a binary image with white background and black text only, no black area or noise ( I do not prefer using Photo.fastNlMeansDenoising
because it takes a lot of time). Please help me with a solution for this.
Also, I am using Tesseract
for Japanese recognization but the accuracy rate is not good. Do you have any suggestion on better OCR for Japanese, or any method to improve Tesseract quality?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…