Module used for white balancing adaptation of a color image. Given a reference image area and a target color, for example a white part of the input image and the color coordinates for white, applies von Kries adaptation to the image. This will transform the reference area the target color and simultaneously change the color coordinates for all other pixels in the image. The image region for the reference color is given by x0, y0, x1, and y1 and the color of the reference region is given by red_target, green_target and blue_target. In addition, the average color of an arbitrary region can be written to the output, This region is set by the log-parameters. The reference region can only be set in the XML-file and can not change during execution. This should be changed in the future with either an adaptive white calcuation or an attention based method. von Kries, J. (1902) Chromatic adaptation. In MacAdam, D. L. (Ed.) Sources of color vision, 109-119, Cambridge, MA: MIT Press. Balkenius, C., Johansson, A. J, and Balkenius, A. (2003). Color constancy in visual scene perception. Lund University Cognitive Studies, 98. 2003 Christian Balkenius christian.balkenius@lucs.lu.se Lund University Cognitive Science http://www.lucs.lu.se/Christian.Balkenius WhiteBalance.h WhiteBalance.cc WhiteBalance.ikc