I am working with Opencv for my project. I need to convert the image below to threshold image
adaptiveThreshold
is the right choice here. Just need a litte tuning.
With these parameters (it's C++, but you can easily translate to Java)
Mat1b gray= imread("path_to_image", IMREAD_GRAYSCALE);
Mat1b result;
adaptiveThreshold(gray, result, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 15, 40);
the resulting image is: