| CPC H04N 23/73 (2023.01) [H04N 23/632 (2023.01); H04N 23/634 (2023.01); H04N 23/88 (2023.01)] | 20 Claims |

|
1. A method for photographing an image, comprising:
receiving a first user operation on a camera application of an electronic device;
starting the camera application and presenting a photographing interface in response to the first user operation, wherein the photographing interface includes a photographing control and an image preview area;
receiving a second user operation on the photographing control; and
photographing a picture and displaying a photographing processing interface in the image preview area in response to the second user operation, wherein, in a process of photographing the picture, the method further comprises:
receiving a Clear value of a spectral sensor of the electronic device, wherein the spectral sensor includes a plurality of visible optical channels and a Clear channel, and wherein a wavelength range of any one visible optical channel in the plurality of visible optical channels is located within a wavelength range of the Clear channel;
extending an exposure time of the spectral sensor based on the Clear value being less than or equal to a first threshold and an analog gain of the spectral sensor being greater than or equal to a second threshold, wherein the second threshold is an upper threshold of the analog gain of the spectral sensor;
increasing the analog gain of the spectral sensor based on the Clear value being less than or equal to the first threshold and the analog gain of the spectral sensor being less than the second threshold;
reducing the analog gain of the spectral sensor based on the Clear value being greater than the first threshold and an exposure time of the spectral sensor being greater than or equal to a third threshold, wherein the third threshold is a lower threshold over the exposure time of the spectral sensor;
shortening the exposure time of the spectral sensor based on the Clear value being greater than the first threshold and the exposure time of the spectral sensor being less than the third threshold;
acquiring a spectral data of a photographing environment output by the spectral sensor based on adjusted exposure parameters;
converting a light signal obtained through a lens into an electrical signal through a photosensitive element of the electronic device;
processing the electrical signal to obtain an initial image; and
performing white balance processing on the initial image based on the spectral data of the photographing environment to obtain a processed image.
|