Does anyone know how to remove the effect of the bright white spots on the image? That is, these spots occur because of the lighting when photographing. As a result, these spots affect the further processing of the image. If you cut a white spot of light from the image, then the results will be very good. This happens if you make a picture at dark place, and because of the camera's flash the resulting image contains white spot. The whole image is dark, but with bright white spot. If you binarize that image the result is bad too. And histogram equalization doesn't help.
It is a program, it must deal with that images with white spot. So I need some algorithm of solving that problem automatically.