possible values of A. If x is substituted by the center C of acenter-surround cell and the surround S is correlated withthe non-linearity factor A, a new, improved responsefunction is formed. Since the maximum response of thecell must be equal to the maximum value of a pixel, B=255.The following equations describe the activation function of the center-surround cell of the proposed method.(4)
(5)(6)
(7)Where, (i, j) denote the coordinates of a pixel in the imageand p is its value. In the proposed method, the surround S
i,j
is the average of a 3×3 pixel region while the center C
i,j
isthe central pixel of this region. Equation (5) describes thenon-linearity factor A, as a function of the surround. Theminimum value obtained by A(S), when S=0, is denoted by‘m’. This non-linearity affects the overall result of thealgorithm and its value is determined by the statistics of theimage. Equation (6) describes the transition between thenon-linearity ‘a*’ and the linearity ‘a’, as the surroundvalues increase. Fig. 3 shows the 3-dimensionalrepresentation of equation (4).Figure 3: The 3-dimensional representation of equation (4).The new activation function maintains the transition fromthe non-linearity ‘a*’ to the linearity ‘a’ correlated with thevalue of the surround. This means that when the surroundhas low values, something occurring in dark image regions,the non-linearity ‘a*’ increases the value of the center inorder to increase the local contrast. On the contrary, whenthe surround comprises high values, something thathappens in light image regions, the linearity ‘a’ does notalter the value of the center. For all the intermediatesurround values, equation (6) determines the degree of non-linearity.The calculation of ‘m’ in equation (5) is as follows:(8)(9)
Where u(x) is the unit step function (is 1 if x
≥
0 and 0 if x<0), px, py are the dimensions of image and p
i,j
the pixelvalue at position (i, j). The main idea is to calculate the percentage of pixels in the image that have values below85. This is a rough estimation of the darkness in the imageand therefore it is used to adjust the minimum value ‘m’that the non-linear factor A can obtain. Equation (9)linearly regulates the value of ‘m’, between 10, when100% of the image pixels are below 85 and 200, when 0%of the image pixels are below 85. Constant 85 was selectedas it is the 1/3 of 255 and can be thought of as the first binof a 3-bin histogram that divides the 255 intensities into 3sets: dark, medium and light.In order to achieve better results, a histogram clipping andstretching technique is required, prior to processing withthe center-surround network. The technique is the one thathas been extensively discussed in [4] and for this reason itis not described here.
3. EXPERIMENTAL RESULTS
The proposed method is compared to the MSR algorithm,extensively described in [3]. The MSR algorithm isgenerally used for color constancy applications. However,in the present study only its dynamic range compressioncharacteristics are compared, by applying it only ongrayscale images. The implementation of the MSR algorithm that was used for the tests was the commercialsoftware PhotoFlair that features the MSR algorithm. The parameters of the MSR were the default that the authorshave mentioned (3 scales with radiuses 5, 20 and 240 pixels and equal weights for every scale). The proposedmethod was implemented in C code. Both algorithms wereexecuted on an Intel Pentium 4 processor, running at 3GHz,with 512 MB RAM and Windows XP.
3.1 Results with Real Images
This subsection presents the results of the comparison between the MSR and the proposed algorithm, in a set of real high-resolution grayscale images. Most of the imagesrepresent scenes that were captured with different digitalcameras under different lighting conditions where dynamicrange correction is required. Table 1 exhibits some of theresults that were obtained by the proposed method andMSR. For every image, its size and the execution times of the two methods are included. It is important to mentionthat the PhotoFlair software that was used to obtain theMSR outputs has 3 different versions of the Retinexalgorithm: Scenic Retinex, Portrait Retinex and PortraitRetinex followed by ‘auto levels’, which is a form of
( )
( )
( )
i,ji,j,ti,j,t1i,ji,j,t
255ASCC(C,S)ASC
+
+ ⋅=+
( )
i,ji,ji,j
A(S)SmqS
= + +
i,ji,ji,j
255Sq(S)255-S
⋅=
j1i1i,jy,xyi-1 xj-1
1Sp9
++= =
=
∑∑
( )
190m100r10100
= − +
( )
pypxi,ji=1j=1
u85-pr =×100 px×py
∑∑