|
The alignment of image illumination intensityDate: 2015-10-07; view: 382. Lect 18_02 _13 It is not hard to see, that simply dithering with the blue noise does not lead to needed result, because the error of quantization has the spectrum, which contains considerable quantity of low-frequency and middle-frequency components. For deliverance from them it is necessary to apply recursive filter. This method of half-toning is called error diffusion. The main idea of it is that the quantization error, which appeared during quantization of the given pixel, is distributed with inverse sign on neighbor pixels and is compensated in such way.
Often some areas of image are very dark, and it is hard to discern something on them. And if to increase the brightness to all image, then initially bright areas will be very light-struck. For making better the view of image, the method of alignment of image illumination intensity is applied. This method is not linear, i.e. it is not realized by linear system. Really, let's consider the model of typical illumination intensity for photo. The landscape, which we will photograph, is illuminated differently in different points. And illumination in space changes very slowly. We want the all details of the photo to be illuminated uniformly, and, at the same time, we want them to be contrasted to each other. And on real photo the product of the picture, that we want to see, and map of illumination is obtained. In places, where the illumination is approximately equal to zero, all subjects are also approximately equal to zero, i.e. they are practically invisible. Since the illumination changes in the space sufficiently slowly, we can say that it is low-frequency signal. But the image can be considered more high-frequency signal. But if in the process of the photo these signals will be summed up, then they can be divided by means of ordinary filter. For example, if we apply high-frequency filter, then the "differences illumination" will be eliminated, and exactly "the image" will be kept. But these signals are not summed up, they are multiplied, and to eliminate the irregularity of illumination by means of simple filtration is not possible. For solution of such tasks the homomorphic processing is applied. Basic method of homomorphic processing consists of reduction of non-linear task to linear by means of any transformations. For instance, in our case, we can reduce the task of the division of multiplied signals to the task of division of the sum signals. For this purpose it is necessary to take logarithm from multiplication of images. Logarithm from multiplication is equal to sum of logarithms of multipliers. If we will take into account that logarithm from low-frequency signal remains low-frequency signal, and logarithm from high-frequency signal remains high-frequency signal, we reduce the task of division of multiplication of signals to the task of division of sum of low- and high-frequency signals. It is obvious that this task can be solved by means of high-frequency filter, which will exclude low frequencies from the sum of signals. After this it is necessary to take the exponent from obtained signal for returning it to initial scale of amplitudes. High-frequency filter can be realized in the following way. Firstly, the process of tailing is applied to image (low-frequency filter), and then from the initial image the tailing part is subtracted. The better radius of tailing depends on concrete image. You can start your experiments from radius of ten pixels order. As a rule, for tailing of image two-dimensional Gaussian filter is applied. It looks like Direct calculation of two-dimensional convolution with such kernel needs great difficult calculations even if the size of kernel is comparatively small. But Gauss kernel has such option as separability(сеперабельность). It means that equivalent effect can be achieved by filtering of all rows of image by one-dimensional Gaussian firstly, and then by filtering of all columns of obtained image by the same one-dimensional Gaussian. From the smoothing of illumination obtained effect can be very strong (dark parts will become the same as light parts according to brightness). To reduce this effect, we can mix up the processed image with initial image in definite proportion.
|