DESCRIPCIÓN: BIENES
6.8. EVALUACIÓN DE LA PROPUESTA
whereSMax andSminare respectively the maximum and minimum saturation value which are interpolated using a cubic with ratio rL as weight. Note that SMin=1, because unexpanded values does not need to be corrected. From experiments, it was found SMax =2 to avoid exaggeration in the final saturation. An example of this technique can be seen in Figure 5.3.
5.1.3 Expand Map
A point-wise range expansion can be sufficient in the case of images with well-exposed pixels, such as an outdoor picture in a cloudy day, see Figure 5.4 for an example.
(a) Lux 7.9e−01 2.2e+00 4.7e+00 9.3e+00 1.7e+01 (b)
Figure 5.4: An example of expansion for well-exposed content for the Vineyard LDR image: a) The original LDR image. b) The false colour image of the expanded image in a) using Equation 5.7 with Lw, Max=20and Lwhite=40. Note that there are no over/under-exposed, so there are no missing areas with details and colours.
However, more sophisticated image processing is needed when saturated areas are in the image, such as very bright sky in a sunny outdoor picture or a lamp in an indoor scene, see Figure 5.5
for an example. Indeed, saturated regions are clipped with no extra information about the original signal, and an expansion can not generate the lost content.
(a) (b)
Figure 5.5: An example of expansion for over-exposed content for the Venice Bay LDR image: a) The original LDR image. b) F-stop -4 for the expanded version using Equation 5.7 with Lw, Max=40 and Lwhite=80. Note that quantisation artefacts are around the sun and there is no reconstruction of content, and the sun is uniformly white.
Assuming that over-exposed pixels belong to light sources, or self-emitting or reflecting sur- faces, a solution is to reconstruct the low frequency profiles of these parts of the scenes using neighbours of saturated pixels to retrieve information about the original signal. Moreover, a large neighbourhood needs to be used in the case of a large over-exposed area. A function that reconstructs these profiles is called Expand Map, a smooth function, that determines the level of needed expansion for pixels belonging to areas of high luminance allowing a plausible restoration with available local information. The expand map can be defined as:
Λ:[0,255]w×h→[0,1]w×h (5.12)
SinceΛ is a smooth function, it can reduce contouring during expansion, because expansion follows the low frequency profiles of reconstructed light sources. For example, a smooth gra- dient is created in an over-exposed region next to a well-exposed one, reducing the step edge that expansion can introduce in this situation.
Note that the expand map leaves under-exposed regions untouched. A reason is that there is no good criteria to restore luminance in very dark regions, such as the creation of light sources in very bright areas. Furthermore, pixels of an image are not well discretised in very dark areas, and these parts have many quantisation artefacts such as blocks and ringing [205] in
compressed images.
Figure 5.6:The pipeline for the generation of the expand map for still images. The luminance channel of the LDR image is used to create light sources using an importance sampling algorithm. Then, density estimation is calculated using these samples, generating a smooth field that is the final expand map.
A simple definition forΛis to determine areas of high luminance and smooth them with a low pass filter. However, this process can not be based on thresholding, because it is a local function without spatial knowledge which can remove important areas of high luminance, see Figure 5.7 for an example. An approach that preserves all these features is to discretise the image into light source samples, see Section 2.7.2. Then, a smooth field is created using density estimation from these samples. Density estimation is a statistical method that constructs an estimate of a probability density function from observed data [53]. 2D density estimation is calculated for each pixel ofΛusing then-nearest samples inside an influence radiusrs:
Λ(x,rs) = 1
|P|V(P)
∑
p∈P(x)Ψp V(P) =πrmax2 (5.13)
(a) (b) (c)
Figure 5.7:An expand map generated using thresholding and Gaussian filtering: a) A single exposure LDR image of Bristol Bridge. b) Thresholding on the luminance channel where threshold was set equal to0.9for determining over-exposed regions. c) A Gaussian filtered image of b) with kernel size of 48. Note that the threshold approach does not include other features of the sky which is an area of high luminance compared to the wood in the bottom. The original HDR image is courtesy of Greg Ward [212]
whereP=y:kx−yk ≤rs is the set of samples in the radius rs,Ψp is the luminance of
maximum distance from x toymaxthe farthest sample in P. Parzen windows or smoothing kernels can improve the smoothness of Equation 5.13, obtaining:
Λ(x,rs) = 1 |P|V(P)
∑
p∈P K kx−ypk rmax Ψp (5.14) -100 -5 0 5 10 15 20 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 (a) -100 -5 0 5 10 15 20 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 (b)Figure 5.8: An example of density estimation in 1D with different kernels with samples at x= [0.0,1.0,8.0,8.25,8.50]>: a) The density estimation using a Cone kernel with α =1/3. WhileΛ is plotted in red, partial contributions are plotted in blue. b) The density estimation using a Gaussian kernel. Note that while the global shapes is kept both in a) and b), the shape of the kernel influences local features. For example, the concavity in b) around x=5is not present in a).
where K is a symmetric smoothing normalised kernel based on distance. This is a decreas- ing function whereK(x≥rs) =0. The more common kernels forK are Gaussian and Cone
functions. The first is defined as:
KG(x) = 1 √ 2πe −x2 2rs2 if|x| ≤1 0 otherwise (5.15) (a) (b) (c)
Figure 5.9: An example of 2D density estimation applied to an LDR version of the Bristol Bridge HDR image: a) The density estimation using a Cone kernel withα=1. b) The density estimation using a Gaussian kernel. Note that the estimates in a) and b) look similar, differences are more difficult to find compared to the 1D case. The original HDR image is courtesy of Greg Ward [212].
Figure 5.8.b and Figure 5.9.c show examples of estimation usingKG. The latter is defined as: KC(x) = 1 α 1−α|x| if|x| ≤1 0 otherwise (5.16)
whereα ∈(0,+∞)is a constant that characterises the filter shape, see Figure 5.8.a and Figure 5.9.b for examples of estimation usingKC.
An example application of reconstruction and noise reduction using the outlined expand map is shown in Figure 5.10. 350 400 450 500 550 0 50 100 150 200 250 300 350 400 E xpa nde d L um ina nc e c d/ m 2 Horizontal Column Original Signal Expanded without EM Expanded with EM
Figure 5.10:An example of reconstruction and noise reduction using the expand map. On the left side the Red Bulb LDR image, where a row around the light bulb is highlighted in green. On the right side the graph of luminance values of the highlighted row for the original image (blue line), expansion with (red line) and without (green line) expand map. Note that the simple expansion expands noise and does not reconstruct the clipped profile, it keeps the flat clipped region. On the other hand, the expansion with the expand map generates a plausible reconstruction shape profile which reduces expansion of the noise.
Light Sources Generation
Light sources generation was reviewed in Section 2.7.2. Among the main methods for extract- ing light source samples, see Section 2.7.2, a suitable one for generating an expand map is MCS [170, 45]. This is because MCS is computationally fast, therefore it is suitable for real-time applications and videos. Moreover, it is straightforward to implement in parallel or on graphics hardware. Other methods such as SIS [4] and k-means sampling (KMS) [97] need iterative relaxations which can be computationally expensive and can not meet real-time deadlines due to their iterative nature. Furthermore, MCS is easier to implement and more computationally
efficient than PTS [148], which allows real-time sampling as well.
(a) (b) (c)
Figure 5.11: An example of generated samples using MCS from Memorial Church HDR image: a) A single exposure of the image. b) Light source samples are calculated from HDR values. c) Light source samples are calculated from LDR values, single exposure in a). Note that the samples distribution shares some features to the one in b). The original HDR image is courtesy of Paul Debevec [44].
Note that applying a sampling method to an LDR image and to an equivalent HDR one can produce different results. However, some features in the distribution of samples are kept in the LDR image, see Figure 5.11.
MCS is based on median cut colour quantisation by Heckbert [80]. The idea of the algorithm is to divide the image in 2pregions of equal luminance, wheren=2pis the number of samples
and pis the number of cuts of the image. At the beginning of the algorithm there is only one region, the full image. Then, at each iteration the image is subdivided along the longest dimen- sion such that the luminance is divided evenly in the two sub-images. The process continues untilnregions are created. Subsequently, for each region a sample is placed in the centroid of each region with energy equal to the sum of luminance values within the region. An example of the sampling process using MCS is shown in Figure 5.12. Samples are stored in a 2D-tree [177], to improve the efficiency of range queries for P. Note that the whole process can be sped up calculating a summed area table of the image [37].
An heuristic for determining the number of cuts is given by p=dlog2√h×we wherehand
Figure 5.12:An example of MCS applied to Pisa HDR image for generating 32 lights. From the top to the bottom the increasing number of cuts from 1 to 32, which doubles for each iteration. In the last row on right, there are the final generated samples. The original HDR image is courtesy of Paul Debevec [44].
each 2p2 ×2
p
2 region in the case of a uniformly coloured image. This produces enough low
frequency information for calculating a smoothΛ. For example, 1,024 samples are generated for an 1,920×1,080 image.
A problem with MCS is the generation of few isolated samples. This is due to the presence of large low luminance areas, and few samples are drawn there. However, these can produce isolated areas of high luminance during the evaluation of density estimation, which have to be considered as outliers because they are low luminance ones. A straightforward solution to this problem is to set void density estimation, when few samples are inP, which can be mathematically expressed as:
Λ0(x,rs) =Λ(x,rs)f(|P|) f(x) =
(
1 ifx≥nsMin
0 otherwise (5.17)
wherensMinis the minimum number of needed samples to validate the estimation.
Colours Treatment
Clipped colours in over-exposed areas can be reconstructed employing coloured expand maps. The only modifications is to generate coloured light source samples during MCS, and to extend density estimation to three colour channels, see Figure 5.13 for an example. Note that the risk of colour shifts in well-exposed areas is minimal. This is because light source samples are placed in areas of high luminance where pixels are usually clipped. Therefore, the application of a coloured expand map happens in saturated regions. Furthermore, the colour of the expand map in a region is similar to the one of that region in the LDR image. Therefore, colours are not greatly modified. In the worst case, when a well-exposed region is under the influence of a coloured expand map, there is an increase of colour saturation.
The use of a coloured expand map works well when over-exposed areas are not too large, for example less than 5-10% of the area of the image. Large over-exposed areas tend to produce white samples, so the expand map is grey in those areas.
Figure 5.13: An example of coloured expand map in the Redentore LDR image. On the left side the original image. On the right side two zooms of two differently expanded images around some lanterns in the scene: a) The image was expanded using a luminance expand map. Note that colours inside the lantern are lost. b) The image was expanded using a coloured expand. Note that yellow tint was reconstructed using colours from light source samples.