method. In this technique we use a blurred transparent
positive as the mask, and overlay the positive with the
negative by outlines to get a photo with low contrast and
even optical density. We then print on the rigid printing paper
to enhance the overall contrast and finally obtain the optical
photo(Li et al., 2006).
According to the Mask dodging principle, we use the
following mathematical model to depict an optical image
with uneven lightness(Sun, 2008):
LG y) 2 I y) + B(x, y) (1)
Where I (x, y) denotes the original image, that is, the image
with uneven lightness, I(x, y) denotes the image with even
lightness in the ideal conditions, and B(x,y) denotes the
background image. According to the formula above, the
image with uneven lightness can be regarded as the result of
overlapping the ideal image with the background image, so
the reason for uneven lightness of the image is that the
lightness of the background image is uneven. Therefore, we
can process the original image using the low-pass filter to get
the background image, and then the image with even
lightness can be obtained by subtracting the background
image from the original one.
3. THE IMPROVED IMAGE DODGING ALGORITHM
BASED ON MASK TECHNIQUE
In the process of image dodging with the algorithm based on
Mask technique, there are some defects and problems. First,
it smoothes the whole image using the same filter.
Theoretically, the degree of smoothing should depend on the
definition of image, so we should process the image regions
with different lightness and contrast using different filters.
Second, the algorithm doesn't overcome the uneven contrast
phenomenon. The contrast of the regions which are darker in
the original image is still lower, and vice versa.
The following will elaborate the improved algorithm from
four parts: producing the background image, subtraction,
removing the border lines between image blocks, and
processing the contrast.
3.1 Producing the Background Image
Producing the background image is a very critical step,
because its quality will directly affect the final dodging effect.
Due to the irregular distribution of uneven lightness and
contrast in an image, which is difficult to be depicted by a
simple mathematical model, we usually produce the
background image with a low-pass filter to reflect the
background lightness variation. By comparison, the Gaussian
low-pass filter in frequency domain can get a satisfactory
background image.
We first divide the original image into blocks, and make sure
there are overlapped pixels between adjacent blocks, which
can avoid the obvious border lines between adjacent blocks
and can make these border lines be removed simply after
dodging. According to the Mask dodging algorithm, the
selection of the smoothing operator should depend on the
definitions of regions with different lightness and contrast.
The regions with higher definition should be smoothed to a
greater degree, and the regions with lower definition to a less
degree.
In the object field, the straight edges of ground objects will
be blurred after being imaged by a degrading system, as
showed in Figurel (Hu, et al.,2004).
Joa) gi y)
object field image field
i
|
i
|
Ê
|
Figure 1. Edge curve of the object with straight edge
The slope of edge curve reflects the blurriness of the edge, so
we can measure the definitions of image regions by the slope
of the edge curve. This paper adopted the calculation method
of the definition of image regions which Hu et al. (2004)
proposed.
Based on the general shape of the edge curve, we adopt the
following cosine function to simulate the edge curve (Zhou,
1999).
f(x) 2 Acos Bx - C (2)
Where x is the pixel coordinate, f(x) is the gray value of the
pixel, and A, B and C are the three parameters. In order to
solve out for A, B, and C, at least three pairs of data (f(x), x)
are needed. Edge is reflected in the digital image to be a
series of pixels whose gray values are in increasing or
decreasing order. Therefore, we can extract some feature
edge values in the image blocks to simulate the edge curve.
Then we differentiate the function of the edge curve to get
the definition.
F(x) = —ABsin Bx (3)
Use the mid-point of the edge curve to calculate F(x), let
Bx = % so F(i) = E :
Set the cut-off frequency of the low-pass filter according to
the definition of each image block. If the definition of an
image block is lower, the image block should be smoothed
with the Gaussian low-pass filter with the higher cut-off
frequency, and inversely so. The calculation steps of the cut-
off frequency of the Gaussian filter are as follows:
(1) Calculate the definition of each image block, F;. The
value range of i is [1,n], where n is the number of image
blocks.
(2) Acquire the maximum and minimum definitions, Fax
and Fmin-
(3) According to the size of the image block, set the
maximum and minimum cut-off frequency of the Gaussian
low-pass filter, Domax and Do,,, , to get the cut-off
frequency of Gaussian filter of each image block.
At las
is app.
3.2 Su
To sul
use th
In the
fin M
backg
level :
image
follow
where
image
backg
value |
3.3 Re
After
image
obvioi
and th
be fur!
(Dy Pr
the ov
(a)
Based
appro]
by le
overla
adjust
(b)
usir
(2) Pr
areas |
Throu
graysc
some |
of gra
lines «
coeffic
overla
the o
elimin
Take
illumi:
that X
mosai