Equations are not being displayed properly on some articles. We hope to have this fixed soon. Our apologies.

Sparavigna, A. (2015). Retinex filtering and thresholding of foggy images. PHILICA.COM Article number 511.

ISSN 1751-3030  
Log in  
Register  
  1208 Articles and Observations available | Content last updated 22 October, 12:04  
Philica entries accessed 3 370 915 times  


NEWS: The SOAP Project, in collaboration with CERN, are conducting a survey on open-access publishing. Please take a moment to give them your views

Submit an Article or Observation

We aim to suit all browsers, but recommend Firefox particularly:

Retinex filtering and thresholding of foggy images

Amelia Carolina Sparavignaunconfirmed user (Department of Applied Science and Technology, Politecnico di Torino)

Published in compu.philica.com

Abstract
Recently, we have discussed the use of GIMP Retinex, a filter of the GNU Image Manipulation Program, for enhancing images in several applications, ranging from those obtained by microscopes to the images coming from satellites. Retinex can also enhance foggy images: here we investigate the role of GIMP filter in their thresholding for binarization. Keywords: GIMP Retinex, Image processing, Thresholding, Binarization, Generalized entropies.

Article body


In some recent papers [1-3], we have proposed and discussed the use of the GIMP Retinex filter for enhancing images. Retinex methods, such as that used for the tool of the GNU Image Manipulation Program, had been developed to solve some experimental observations. These experiments are concerning the fact that it is easy to find discrepancies between an image we have recorded by a camera and the real scene we have observed. The reason is that humans are able to see details both in the shadows and in the nearby illuminated areas, whereas a photograph of the same scene is showing either the shadows as too dark or the bright areas as overexposed [4]. In fact, some peculiar features of human vision concerning colours, brightness and contrast of a scene, are quite different from those of recording devices [5,6].

Several algorithms of image processing had been developed, inspired by the human vision biological mechanism to adapt itself to these conditions: these methods are known as Retinex models. The first algorithm was conceived by Edwin H. Land, an American scientist and inventor, best known as co-founder of Polaroid Corporation [7-11]. As explained in Ref.4, through the years, Land evolved several models, until his last one proposed in 1986.  The term “retinex” was coined by Land himself, combining the words “retina” and “cortex”, to indicate the results of his researches, that human colour perception is involving all levels of vision processes, from the retina to the cerebral cortex.

Several Retinex approaches exist [6,12]: the single-scale Retinex (SSR), the multiscale Retinex (MSR), and, for colour images, the MultiScale Retinex with Colour Restoration (MSRCR). GIMP Retinex is a freely available tool of this last family, developed by Fabien Pelisson [13]. The resulting image of this filter can be adjusted selecting different levels, scales and dynamics. In this tool, there are three “levels”:  uniform, which tends to treat both low and high intensity areas fairly, low, that “flares up” the lower intensity areas on the image, and high that tends to “bury” the lower intensity areas in favour of a better rendering of the clearer areas of the image. The “scale” determines the depth of the Retinex scale. Minimum value is 16, a value providing gross, unrefined filtering. Maximum value is 250. Optimal and default value is 240. A “scale division” determines the number of iterations in the multiscale Retinex filter. The minimum required, and the recommended value is three. The “dynamic” slider allows adjusting colour saturation contamination around the new average colour (default value is 1,2).

In the Figure 1, an example of Retinex filtering of a foggy image is proposed: (a) is showing the original image, (b),(c) e (d) are giving the outputs after GIMP Retinex filtering (scale:240, scale division:3, dynamic:1,2). In (b) the level is uniform, in (c) low and in (d) high. We can see immediately the enhancement of the visibility of objects, which are present in the image. In (b) and (c) we have also a strong enhancement of colours.

Images, which are obtained when there are foggy weather conditions, have poor contrast and strong loss of colour characteristics. Several methods had been proposed to improve them (see [14-16] and references therein). However, to restore contrast and colours, GIMP Retinex can be a good answer, as shown by Figure 1, and in fact, some Retinex algorithms for foggy images had been proposed too [17-19]. Let us consider that an algorithm able of improving foggy images can be quite important, for instance, to process the images recorded by cameras on-board of cars, to find objects on the road and estimate their visibility distance [16]. However, if we want an algorithm able of distinguish automatically an object from the background, such as an obstacle on the road, we need some segmentation of the image, able of partitioning it in areas containing the objects and in areas pertaining to the background.

The simplest approach to segmentation is that of changing an image into a binary one in black and white. The resulting binary image is useful if it is able of showing the objects as black and the background as white. A binary image can be produced by means of a bi-level thresholding, which is replacing each pixel (i,j) of it with a black pixel if pixel intensity I(i,j) is less than some fixed constant T (that is, I(i,j) < T), and with a white pixel if the intensity is greater than that constant. The result depends on the value of threshold T. To choose the best value of T, one of the most used approaches is that of maximizing the entropy of the image [20].

In the Figure 2, we can see an example of thresholding of a foggy image. The original image shows a suburban street. As told in its caption on Wikipedia (en.wikipedia.org/wiki/Fog), even a light fog is able reducing visibility, rendering the cyclist very hazy at about 200 m. A Retinex low level filtering, (with scale:240, scale division:3, dynamic:1,2), improves the visibility. This is quite clear when we apply a bi-level thresholding. With T=127, the original and the Retinex appear as in the middle panels of Figure 2. The cyclist is visible in the binary image of the Retinex image, not in the binary image of the original one.  Using the original image, to see the cyclist we have to rise the threshold to the value of 193, wasting the visibility of the road. In the lower right panel we can see a thresholding, with T= 175, of the Retinex image. The result is less sensitive to the value of T. Another example of the role of Retinex filtering on the thresholding of foggy images is given in the Figure 3.

The two proposed examples, and several others we have tested, are showing that it could be interesting to investigate, in more detail and quantitatively, the role of  GIMP Retinex filtering in determining the best threshold for an image segmentation. This could be relevant for those applications, which are devoted to the enhancement of foggy images. The combined use of a Retinex method and thresholding had already demonstrated to work well for optical character recognition  systems and document analysis [21].

 

  Figure 1 – Panel (a) is showing the original image (Courtesy: Ian Furst, Wikipedia, Tree in field during extreme cold with frozen fog). The other three images are giving the outputs after GIMP Retinex filtering (scale:240, scale division:3, dynamic:1,2). In (b) the level is uniform, in (c) low and in (d) high. Note the enhancement of the visibility of the objects, which are present in the image. In (b) and (c) we have also a strong enhancement of colors.

 

Figure 2 - The original image in the left-upper panel, (Courtesy: Ian W. Fleggen, Wikipedia, 20880313, Foggy Street), shows a suburban street. As told in the caption of Wikipedia, even a light fog is able reducing visibility, rendering the cyclist very hazy at about 200 m. A Retinex low level filtering, (with scale:240, scale division:3, dynamic:1,2), improves the visibility (right-upper panel). Let us apply a bi-level thresholding. With T=127, the original and the Retinex images appear as in the middle panels. The cyclist is visible in the Retinex image.  Using the original image, to see the cyclist we have to rise the threshold to the value of 193, but in this case, we are wasting the visibility of the road. In the right-lower panel we can see a thresholding, with T= 175, of the Retinex image.

 

 Figure 3 - Here another example of thresholding on a low quality image. On the right, we have the result of a Retinex low level filtering, (with scale:240, scale division:3, dynamic:1,2).  Let us apply a bi-level thresholding, with T=127. Note the different result:  car and road are visible in the binary image of  Retinex image.

 REFERENCES

1.   Sparavigna, A.C. (2015). An image processing approach based on Gnu Image Manipulation Program Gimp to the panoramic radiography, International Journal of Sciences 4(5): 57-67. DOI: 10.18483/ijSci.721

2.  Sparavigna, A.C. (2015). Gimp Retinex for enhancing images from microscopes, International Journal of Sciences 4(6):72-79. DOI: 10.18483/ijSci.758

3.   Sparavigna, A.C. (2015). Rock glaciers on Mars viewed with Google Earth. PHILICA.COM Article number 510. ISSN 1751-3030

4.    Barnard, K.; Funt, B. (1999). Investigations into multi-scale Retinex, in Colour Imaging: Vision and Technology, L. MacDonald, Ed. and M. Ronnier Luo. Ed., John Wiley and Sons, pp. 9-17. ISBN: 978-0-471-98531-0

5.  Zhixi Bian; Yan Zhang (2002). Retinex image enhancement techniques: Algorithm, application and advantages, EE264 final project report for Image Processing and Reconstruction.

6.   Jobson, D.J.; Rahman, Z.; Woodell, G.A. (1997). A Multi-Scale Retinex for bridging the gap between colour images and the human observation of scenes, IEEE Transactions on Image Processing 6(7):965-976. DOI: 10.1109/83.597272

7.   Land, E.H. (1986). An alternative technique for the computation of the designator in the retinex theory of color vision, Proc. Nat. Acad, Sci. 83:3078-3080. PMCID: PMC323455

8.    Land, E.H. (1983). Recent advances in Retinex theory and some implications for cortical computations, Proc. Nat. Acad. Sci. 80:5163-5169. PMCID: PMC384211

9.    Land, E.H. (1986). Recent advances in Retinex theory, Vis. Res. 26:7-21. DOI: 10.1016/0042-6989(86)90067-2

10. Land, E.H. (1959). Experiments in color vision, Scientific American, May Issue, 285-298.

11. Land, E.H. (1959). Color vision and the natural image, Proc. of the National Academy of Sciences 45(1):115–129. PMCID: PMC222521

12. Jobson, J.; Rahman, Z.; Woodell, G.A. (1997). Properties and performance of a center/surround Retinex, Image Processing IEEE Transactions on 6(3):451-462. DOI: 10.1109/83.557356

13. Fabien Pelisson, GIMP Retinex,  http://www-prima.inrialpes.fr/pelisson/MSRCR.php

14. Tan, T.T. (2008). Visibility in bad weather from a single image, IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2008, 23-28 June 2008, 1-8. DOI:  10.1109/cvpr.2008.4587643

15. Chen, Z.; Shen, J.; Roth, P. (2013). Single image defogging algorithm based on dark channel priority, Journal of Multimedia, 8(4):432-438 DOI: 10.4304/jmm.8.4.432-438

16. Hautìere, N.; Tarel, J-P.; Lavenant, J.; Aubert, D. (2006). Automatic fog detection and estimation of visibility distance through use of an on board camera, Machine Vision and Applications, 17(1):8-20. DOI: 10.1007/s00138-006-0011-9

17. Shu, T.; Liu, Y-F.; Deng, B.; Tan, Y-P.; Chen, B-Q. (2015). Multi-scale Retinex algorithm for the foggy image enhancement based on sub-band decomposition, Journal of Jishou University, 36(1):40-45.  DOI: 10.3969/j.issn.1007-2985.2015.01.010

18. Hu, X.; Gao, X.; Wang, H. (2014). A novel Retinex algorithm and its application to fog-degraded image enhancement, Sensors & Transducers Journal, 175(7): 138-143.

19. Wanting Yang; Ronggui Wang; Shuai Fang; Xuan Zhang (2010). Variable filter Retinex algorithm for foggy image enhancement, Journal of Computer-aided Design and Computer Graphics, 22(6):965-971.

20. Sparavigna, A.C. (2015), Shannon, Tsallis and Kaniadakis entropies in bi-level image thresholding, International Journal of Sciences 4(2):35-43. DOI: 10.18483/ijSci.626

21. Wagdy, M.; Faye, I.; Rohaya, D. (2013). Fast and efficient document image clean up and binarization based on retinex theory, IEEE 9th International Colloquium on Signal Processing and its Applications (CSPA), 8-10 March 2013, Kuala Lumpur, 58-62. DOI: 10.1109/CSPA.2013.6530014

Amelia Carolina Sparavigna, Department of Applied Science and Technology, Politecnico di Torino, Torino, Italy

 

Information about this Article
This Article has not yet been peer-reviewed
This Article was published on 8th September, 2015 at 11:42:42 and has been viewed 2037 times.

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.
The full citation for this Article is:
Sparavigna, A. (2015). Retinex filtering and thresholding of foggy images. PHILICA.COM Article number 511.


<< Go back Review this ArticlePrinter-friendlyReport this Article



Website copyright © 2006-07 Philica; authors retain the rights to their work under this Creative Commons License and reviews are copyleft under the GNU free documentation license.
Using this site indicates acceptance of our Terms and Conditions.

This page was generated in 0.2422 seconds.