Hi,
You could try to perform image enhancement prior to converting it to a binary image.
For non-uniform illumination correction, you could refer to the following page: https://www.mathworks.com/help/images/correcting-nonuniform-illumination.html
Alternatively, you could also explore File Exchange for any submissions on other methods for illumination correction.