Someone suggested an adaptive threshold for me to get a desired result, however after messing with the parameters and settings I cannot get a similar result.
Here is the base image:
How can I get from that image to this image using an adaptive threshold?
Here is a snippet of what I've been trying
adaptiveThreshold(thr, thr, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 101, 16);