A method of automatically white balancing an image, the method comprising: providing a selectable operating mode on the electronic device for capturing a two dimensional image using a first camera associated with an electronic device; if receiving instruction to operate in operating mode for capturing a two dimensional image with the first camera: capturing a second image using a second camera associated with the electronic device and using the second camera to detect a flicker source; restricting, if it is determined that a flicker source has been detected, an exposure time associated with the first camera to values that are compatible with a local mains frequency, and, if a flicker source is not detected, not restricting the exposure time for the first camera based on the local mains frequency; capturing a first image using the first camera, the first image and the second image being temporally related; determining whether the first camera and the second camera are subject to similar lighting conditions, and, if it is detected that the first camera and the second camera are subject to similar lighting conditions, determining one or more white balance correction values for the first image by analyzing the first image and the second image, the white balance correction value representing the effect of lighting conditions on the first image and the second image, wherein, if it is determined that the first camera and the second camera are not subject to similar lighting conditions, white balancing is performed on the first image by analyzing the first image but not the second image; correcting one or more images captured by the first camera based on the white balance correction value; and discarding the second image. providing a selectable operating mode on the electronic device for capturing a two dimensional image using a first camera associated with an electronic device; if receiving instruction to operate in operating mode for capturing a two dimensional image with the first camera: capturing a second image using a second camera associated with the electronic device and using the second camera to detect a flicker source; restricting, if it is determined that a flicker source has been detected, an exposure time associated with the first camera to values that are compatible with a local mains frequency, and, if a flicker source is not detected, not restricting the exposure time for the first camera based on the local mains frequency; capturing a first image using the first camera, the first image and the second image being temporally related; determining whether the first camera and the second camera are subject to similar lighting conditions, and, if it is detected that the first camera and the second camera are subject to similar lighting conditions, determining one or more white balance correction values for the first image by analyzing the first image and the second image, the white balance correction value representing the effect of lighting conditions on the first image and the second image, wherein, if it is determined that the first camera and the second camera are not subject to similar lighting conditions, white balancing is performed on the first image by analyzing the first image but not the second image; correcting one or more images captured by the first camera based on the white balance correction value; and discarding the second image. capturing a second image using a second camera associated with the electronic device and using the second camera to detect a flicker source; restricting, if it is determined that a flicker source has been detected, an exposure time associated with the first camera to values that are compatible with a local mains frequency, and, if a flicker source is not detected, not restricting the exposure time for the first camera based on the local mains frequency; capturing a first image using the first camera, the first image and the second image being temporally related; determining whether the first camera and the second camera are subject to similar lighting conditions, and, if it is detected that the first camera and the second camera are subject to similar lighting conditions, determining one or more white balance correction values for the first image by analyzing the first image and the second image, the white balance correction value representing the effect of lighting conditions on the first image and the second image, wherein, if it is determined that the first camera and the second camera are not subject to similar lighting conditions, white balancing is performed on the first image by analyzing the first image but not the second image; correcting one or more images captured by the first camera based on the white balance correction value; and discarding the second image.