Restoring Color in Old Images

Last week's activity was interesting -- we restored the color in old images digitally! This was interesting because finally I understood what the fancy jargon that came with it meant already.

Apparently there are different ways to represent color in images and the one that we played around with were with the RGB and HSV representation of color in images.

RGB represents the amount of red, green, and blue there is in an image [1] which is practical, because they are the primary colors of light [1] from which other colors may be made from. This kind of representation however, isn't practical for heavy color restoration because we do not describe colors like this. Rather we describe them through their hue, saturation, and lightness/value [1]. Thus we use HSV to do just that. Hue and saturation represents the purity of color and how much it is diluted by white light [1], and value is how far the color is from black, which may simply be its gray-level.

In this activity, we messed with the RGB and HSV representations of an old image in hopes of restoring its color so that it looks brand new, particularly the images shown in Figure 1.

Figure 1: Images to undergo color restoration techniques.

The first two techniques we used, gray-world algorithm and reference white balancing, messed with the RGB representation of the image. In gray-world algorithm, we essentially divide the value of each color channel by the corresponding average value of that color channel. In reference white balancing technique however, we selected a white region in the image, took average value in each color channel, and used that as divisor for the value of each color channel.

Applying gray-world algorithm on the pictures, we get Figure 2.

Figure 2: Result of gray-world algorithm.

Notice that the images obtained a slight bluish tint, however looks different depending on the average color value in the image. This means that if the original image had a lot of white regions, then it would be reflected on the average value in each color channel, and thus the resulting image. This is evident in Figure 2b where the image became much brighter. On the other hand, since the overall image in Figure 1a is dark, then the average value will be lower and the resulting image darker.

Applying reference white balancing on the pictures, we get Figure 3.

Figure 3: Result of reference white algorithm.

In Figure 3a, we used the white panel on the top right part of the image, and for Figure 3b, we used the white sidewalk in the lower right of the image. Notice that the images don't have a bluish tint but became brighter as expected. Not a lot has changed between Figure 1b and Figure 3b, however we see improvements between Figure 1a and Figure 3b since the colors are now much more evident.

The next technique we used, histogram manipulation, dealt with one of the channels of the image's HSV representation, particularly the value channel. Since this is essentially the gray-level representation of the image, it is optimal to work with this channel and not the others. In this activity, we applied different cumulative distribution functions on the images. Doing so, we get Figure 4.

Figure 4: Result of manipulating histogram of the value channel of the
image's HSV representation for different cumulative distribution functions (CDF).

In this activity, I worked with linear, quadratic, and cubic cumulative distribution functions (CDF). Notice that the resulting images look much better and that you can easily change it by changing the CDF you are working with. In this case, a cubic CDF works best for Figure 1a and quadratic CDF for Figure 1b since for Figure 1a, image is much brighter and you see all detail, and Figure 1b, the image is not oversaturated by white light.

References:
[1] R. C. Gonzales, and R. E. Woods, Digital Image Processing (Prentice Hall, USA, 2002).

Comments

Popular posts from this blog

First Post in this Blog

Edge Detection and Image Segmentation

Analyzing Images in Fourier Space