A new image enhancement technique based on a self-tunable transformation function to improve the visual quality of images captured with low dynamic range devices in extreme lighting conditions is presented. This technique consists of four processes: histogram adjustment, dynamic range compression, contrast enhancement, and nonlinear color restoration. Histogram adjustment on each spectral band is performed to minimize the effect of illumination. Dynamic range compression is accomplished by a newly designed inverse sine nonlinear function that provides various nonlinear curvatures with an image dependent parameter. A nonlinear curve generated by this parameter is used to modify the intensity of each pixel in the luminance image. A nonlinear color restoration process based on the chromatic information and luminance of the original image is employed. The effectiveness of this technique is evaluated on various natural images and aerial images, and compared with other state-of the art techniques. A quantitative evaluation is performed by estimating the number of Harris corners and speeded up robust features on wide area motion imagery data. The application of the proposed algorithm on face detection is also demonstrated. The evaluation results demonstrate that the proposed method holds significant benefits for surveillance and security applications and also as a preprocessing technique for object detection and tracking applications.