I have a document that has both very big and very small letters and I'm applying adaptive thresholding to it.
cvtColor(mbgra, dst, CV_BGR2GRAY);
GaussianBlur(dst, dst, Size(11, 11), 0);
adaptiveThreshold(dst, dst, 255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 11, 3);
The algorithm is working great, but I have a small problem regarding big black letters as it becomes hollow from the inside like this
The original image has those letters filled with black
The question is how to make those letters filled out with blacks as in the original image without increasing the block size of the filter as this won't play well with small letters!
Any thoughts or suggestions are of course welcome!