In-situ colour correction for digital images acquired under non-standard lighting conditions

Annamalai Manickavasagan, P. M. K Alahakoon


Computer vision techniques using colour images are becoming popular in food and agriculture sector. Need of a standard illumination source is an important criterion in this approach to determine various attributes based on RGB values of the objects. In general, under laboratory conditions with standard lighting, an imaging system performs with high consistency in digitizing colour. However, in field conditions where the availability of a standard light source cannot be guaranteed, the colour interpretations may not yield accurate results. The objective of this study was to develop a simple algorithm to compensate for the variations in RGB values due to varying light conditions. It is intended to be useful in situations where taking digital images of objects without standard light sources is essential for a particular purpose. A set of quadratic transformation algorithms were developed to transform the RGB values of the images acquired under five different lighting conditions. The mean variance in RGB values of the image of a colour palette (with 6 different colours) taken under five lighting conditions were in the range of 277 – 548. After implementing the developed algorithm, this was reduced to 34 – 142. Similarly, this variance was reduced from 180 – 294 to 63 – 128 in the test conducted with a plant material. This algorithm can be easily adopted in all computer vision applications where variations in colour interpretations due to nonstandard lighting sources are common. 


Colour balancing; illumination; image correction; computer vision

Full Text:



Brown, G. K.and Timm, E. J., 1992. Lighting for fruit and vegetable sorting. ASAE paper no. 936069, St. Joseph, MI, USA.

Chang, Y., Reid and J. F., 1996. RGB calibration for color image analysis in machine vision. IEEE Transactions on Image Processing. 5, 1414-1422.

Chikane, V.and Fuh, C., 2006. Automatic white balance for dgital still cameras. Journal of Information Science and Engineering. 22, 497-509.

Hehn, J. L. and Sokhansanj, S. 1990. Canola and mustard seed identification using mackintosh based imaging system. ASAE paper no. 903534, St. Joseph, MI, USA.

Li, W., Thompson, M. S., Xiong, Y. and Lange, H. 2006. A new image calibration technique for colposcopic images. Medical Imaging 2006: Image Processing, edited by Joseph M. Reinhardt, Josien P. W. Pluim, in Proceedings of SPIE. 6144, 227-239.

Liu, Z., Cheng, F., Ying, Y. and Rao, X. 2005. Identification of rice seed varieties using neutral network. Journal of Zhejiang University Science. 6B, 1095-1100.

Luo, X., Jayas, D. S., Crowe, T. G. and Bulley, N. R. 1997. Evaluation of light sources for machine vision. Canadian Agricultural Engineering. 39, 309-315.

Majumdar, S. and Jayas, D.S. 1999. Classification of bulk samples of cereal grains using machine vision. Journal of Agricultural Engineering Research. 73, 35-47.

Manickavasagan, A., Sathya, G. and Jayas, D.S. 2008. Comparison of illuminations to identify wheat classes using monochrome images. Computers and Electronics in Agriculture. 63, 237-244.

Murakami, P. F., Turner, M.R., Van den Berg, A. K. and Schaberg, P. G. 2005. An instructional guide for leaf color analysis using digital imaging software. Gen. Tech. Rep. NE-327. Newtown Square, PA: U.S. Department of Agriculture, Forest Service, Northeastern Research Station. 33 p.

O’Neal, M., Landis, D. A.and Isaacs, R. 2002. An inexpensive, accurate method for measuring leaf area and defoliation through digital image analysis. Journal of Economic Entomology. 95, 1190 – 1194.

Paliwal, J., Visen, N. S., Jayas, D. S. and White, N.D.G. 2003. Cereal grain and dockage identification using machine vision. Biosystems Engineering. 85, 51-57.

Shahin, M. A. and Symons, S. J. 2003. Color calibration of scanners for scanner-independent grain grading. Cereal Chemistry Journal. 80, 285-289.

Takemura, Y, and Ishii, K. 2011. Auto color calibration algorithm using neural networks and its application to RoboCup robot vision. International Journal of Artificial Intelligence.

Weng, C., Chen, H. and Fuh, C. 2006. A novel automatic white balance method For digital still cameras. Journal of Communication Engineering. 12.



  • There are currently no refbacks.

Copyright (c) 2018 Annamalai Manickavasagan, P. M. K Alahakoon

Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.


This journal and its content is licensed under a Attribution-NoDerivatives 4.0 International.

Flag Counter