This document details a method called bi-level weighted histogram equalization combined with adaptive gamma correction for improving the brightness and contrast of dimmed images. The proposed technique enhances image quality while addressing limitations of existing methods, such as over-enhancement and irregularities. Performance is evaluated using metrics like peak signal-to-noise ratio (PSNR) and absolute mean brightness error (AMBE), demonstrating the method's superiority in preserving brightness.