The controller calculates white-detection parameters that form the narrowest
range with the highest luminance under a condition that the accumulated values
of the respective colors are not reduced to "0", sets the resulting parameter in
the white-detection circuit, and based upon the accumulated values of the respective
colors that are output when the white-detection parameters that form the narrowest
range with the highest luminance under the condition that the accumulated values
of the respective colors are not reduced to "0" have been preset in the white-detection
circuit, calculates the gains of R and B of the white-balance adjusting circuit,
and sets the resulting gains in the white-balance adjusting circuit.