Using the experience we have gained so far, and the knowledge gained in introductory DSP courses, let’s formulate another local operator. The goal is to compress luminance as well as the adaptive gain control had done while maintaining fine detail and sharpness. Recall that averaging can be done through convolution with a filter, and we can manipulate the weight of the average by changing the shape of the filter. It seems natural that the pixel being mapped should be weighted most heavily, so we may decide to use a Gaussian to convolve a small local area around the pixel being mapped to find a weighted average to map the pixel. You may be concerned with the production of halos without the adaptive gain control explored in sections 3.4, but let’s see if the natural shape of the Gaussian will be able to prevent them without extra control.
Example Gaussian:
0.0035 0.0114 0.0183 0.0114 0.0035
0.0114 0.0591 0.1353 0.0591 0.0114
0.0183 0.1353 1.0000 0.1353 0.0183
0.0114 0.0591 0.1353 0.0591 0.0114
0.0035 0.0114 0.0183 0.0114 0.0035
Think back to your DSP class again, and recall that convolution in the time domain is equivalent to multiplication in the frequency domain. To speed up the process, convolution can be done using the DFTs of the Gaussian and the small local area. Using MATLAB’s efficient FFT algorithm, the whole image conversion and tone mapping process is on the order of seconds. The algorithm does not blur the image to the degree that adaptive gain control does, but since it does still blur the image slightly, it also employs the edge preservation technique used in the later version of the adaptive gain control method.
Comparing the local convolution mapping with the adaptive gain control method, the former clearly retains more detail in the wall artwork and the stained-glass window to the right.
![]() |
![]() |