algorithm to be applied to images captured in various challenging lighting conditions. The
technique detects a lighting impairment and inverts the image if it is a low-light impairment.
The inverted low-light image is similar to haze impairment images, allowing both haze
images and low-light images to be enhanced using the same enhancement algorithm.