Apply brightness correction when the lighting is unevenly applied to the subject. If the lighting conditions are known, analytical correction is performed. However, usually the lighting conditions are assumed to be unknown and processed.
The procedure is as follows:
Divide the image into grids and perform brightness variance and discriminant analysis for each grid.
If the brightness variance is small, exclude it as a uniform image like "only background".