A method and an related apparatus for performing a white balance operation
on an image with pixels, wherein global colour gain values common for
substantially all pixels of the image are first determined. Then local
colour gain values for individual pixels of the image are determined
based on analyses of a local window comprising said individual pixel and
a number of adjacent pixels. Thereafter, final colour gain values for
individual pixels of the image are determined as a weighted average of
the global and the local colour gain values, and a white balance
operation is performed on the image using the final colour gain values.