Automatic Brightness Equalization
Microscopy images with uneven illumination exhibit skewed brightness distributions. It is important to equalize the brightness distribution for correct rendering of the object under the microscope and to avoid skewed analysis done in the subsequent operations.
Here is an image acquired under uneven lighting.
If no empirically obtained flat-field image is available, one can try to estimate a flat-field image by fitting a model. Obtain a foreground mask to identify the parts of the image that should contribute to flat-field modeling.
Perform a polynomial fit to obtain a flat field and utilize it for a subsequent brightness equalization in each color channel. Brighten the result by applying Lighter.