In the paper, we propose new fast and effective approach for automatic visibility enhancement of images with poor global and local contrast. Initially, we developed the technique for scanned images with dark and light background regions and low visibility of foreground objects in both types of regions. Newly proposed algorithm carries out locally adaptive tone mapping by means of variable S-shaped curve. We use cubic Hermit spline. Starting and ending points of the spline depend on global brightness contrast, whereas tangents depend on local distribution of background and foreground pixels. Alteration of the tangents for adjacent areas is smoothed in order to avoid forming of visible artifacts. The description of several optimization tricks, which allow realization of high-speed algorithm, is given. We compare proposed method with several well-known image enhancement techniques by means of estimation of Michelson contrast (also known as visibility metric) for a number of test patterns. Disclosed algorithm outperforms tested alternatives. Finally, we extend application of proposed method for photo enhancement and correction of images with haze. Downloaded From: http://proceedings.spiedigitallibrary.org/ on 05/14/2015 Terms of Use: http://spiedl.org/terms Proc. of SPIE-IS&T Vol. 9395 93950B-2 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 05/14/2015 Terms of Use: http://spiedl.org/terms