Shooting method, device and electronic equipment

By acquiring and analyzing spectral information under different lights, determining the reflectivity information of the subject, and adjusting the exposure and white balance parameters, the problems of uneven exposure of images and color casting of light sources under different lights are solved, and more accurate exposure control and More even image color.

CN115118855BActive Publication Date: 2025-02-25VIVO MOBILE COMM HANGZHOU CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210725722.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2025-02-25
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

In the images collected under different light rays, the prior art can easily lead to excessive exposure of black objects and insufficient exposure of white objects, and the automatic white balance compensation gain cannot effectively solve the color cast problem of light source area.

Method used

By acquiring the light source spectral information of the flash, the spectral response information of the camera module, the first environmental reflection spectral information and the second environmental reflection spectral information, the reflectivity information of the photographing object is determined, and the exposure compensation value and automatic exposure are determined based on this information. The AWB of white balance compensates the gain and adjusts the shooting parameters of the shooting device.

Benefits of technology

More precise exposure control is achieved, reducing the color casting phenomenon in each light source area, thereby reducing the impact of the light source on image brightness and color.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115118855B_ABST
    Figure CN115118855B_ABST
Patent Text Reader

Abstract

The present application discloses a shooting method, device and electronic device, which belongs to the field of camera technology. The specific scheme includes: obtaining the light source spectrum information of the flash, the spectrum response information of the camera module, the first environment reflection spectrum information and the second environment reflection spectrum information; determining the reflectivity information of the shooting object according to the light source spectrum information, the first environment reflection spectrum information and the second environment reflection spectrum information, and determining the exposure compensation value of the automatic exposure AE according to the reflectivity information of the shooting object; determining the channel information of the preset reflectivity object according to the reflectivity information of the shooting object, the spectrum response information and the first environment reflection spectrum information, and determining the automatic white balance AWB compensation gain according to the channel information; adjusting the shooting parameters of the shooting device according to the exposure compensation value and the AWB compensation gain, and shooting the shooting object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of camera technology, and specifically relates to a shooting method, device and electronic equipment. Background Art

[0002] Typically, images captured under different lighting conditions will exhibit different brightness and colors.

[0003] In the related art, in order to ensure that images captured under different light conditions can present appropriate brightness, exposure control can be performed according to the 18% neutral gray standard. In order to ensure that images captured under different light conditions can present appropriate colors, the dominant light source of multiple light sources can be determined based on empirical values, and the corresponding automatic white balance (AWB) compensation gain can be performed on the dominant light source.

[0004] However, when the image includes a large number of black objects or a large number of white objects, the exposure control method in the related art may cause the black objects to be overexposed and the white objects to be underexposed. The AWB compensation gain method in the related art can only solve the color cast problem of the dominant light source, and may also cause more serious color cast problems in areas with other light sources. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a shooting method, device and electronic device that can solve the problem that the light source affects the display effect of the captured image.

[0006] In a first aspect, an embodiment of the present application provides a shooting method, which is applied to a shooting device, wherein the shooting device includes a flash and a camera module, and the method includes: obtaining light source spectrum information of the flash, spectral response information of the camera module, first ambient reflection spectrum information, and second ambient reflection spectrum information; determining reflectivity information of a shooting object according to the light source spectrum information, the first ambient reflection spectrum information, and the second ambient reflection spectrum information, and determining an exposure compensation value of automatic exposure AE according to the reflectivity information of the shooting object; determining channel information of a preset reflectivity object according to the reflectivity information of the shooting object, the spectral response information, and the first ambient reflection spectrum information, and determining an automatic white balance AWB compensation gain according to the channel information; adjusting shooting parameters of the shooting device according to the exposure compensation value and the AWB compensation gain; wherein the first ambient reflection spectrum information is the ambient reflection spectrum information when the flash is in an off state, and the second ambient reflection spectrum information is the ambient reflection spectrum information when the flash is in an on state.

[0007] In a second aspect, an embodiment of the present application provides a shooting device, which includes a flash and a camera module, and the shooting device also includes: an acquisition module and a processing module; the acquisition module is used to acquire light source spectrum information of the flash, spectral response information of the camera module, first ambient reflection spectrum information and second ambient reflection spectrum information; the processing module is used to determine the reflectivity information of the shooting object according to the light source spectrum information, the first ambient reflection spectrum information and the second ambient reflection spectrum information, and determine the exposure compensation value of automatic exposure AE according to the reflectivity information of the shooting object; the processing module is also used to determine the channel information of the preset reflectivity object according to the reflectivity information of the shooting object, the spectral response information and the first ambient reflection spectrum information, and determine the automatic white balance AWB compensation gain according to the channel information; the processing module is also used to adjust the shooting parameters of the shooting device according to the exposure compensation value and the AWB compensation gain, and shoot the shooting object; wherein the first ambient reflection spectrum information is the ambient reflection spectrum information when the flash is in an off state, and the second ambient reflection spectrum information is the ambient reflection spectrum information when the flash is in a working state.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0012] In an embodiment of the present application, light source spectrum information of a flash, spectral response information of a camera module, first ambient reflection spectrum information, and second ambient reflection spectrum information are obtained; reflectance information of a photographic object is determined according to the light source spectrum information, the first ambient reflection spectrum information, and the second ambient reflection spectrum information, and an exposure compensation value of automatic exposure AE is determined according to the reflectance information of the photographic object; channel information of a preset reflectance object is determined according to the reflectance information of the photographic object, the spectral response information, and the first ambient reflection spectrum information, and an automatic white balance AWB compensation gain is determined according to the channel information; photographing parameters of a photographing device are adjusted according to the exposure compensation value and the AWB compensation gain, and the photographic object is photographed; wherein the first ambient reflection spectrum information is the ambient reflection spectrum information when the flash is in an off state, and the second ambient reflection spectrum information is the ambient reflection spectrum information when the flash is in an on state. Through this solution, the exposure compensation value of AE and the AWB compensation gain can be determined according to the light source spectrum information of the flash, the spectral response information of the camera module, the first environment reflection spectrum information and the second environment reflection spectrum information. Since the exposure compensation value of AE is determined based on the reflectivity information of the photographed object, a more accurate exposure control effect can be achieved. Since the AWB compensation gain is determined based on the channel information of the preset reflectivity object, the color cast phenomenon of each light source area can be reduced, thereby reducing the influence of the light source on the image brightness and image color. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is one of the flowcharts of the shooting method provided in the embodiment of the present application;

[0014] Figure 2 This is the second flow chart of the shooting method provided in the embodiment of the present application;

[0015] Figure 3 is a schematic diagram of the structure of a photographing device provided in an embodiment of the present application;

[0016] Figure 4 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0017] Figure 5 It is a hardware schematic diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0019] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0020] The following is a detailed description of the shooting method provided in the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0021] The shooting method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the shooting method. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, wearable devices, etc. The shooting method provided in the embodiment of the present application is described below using the electronic device as an example of the execution subject.

[0022] like Figure 1 As shown, an embodiment of the present application provides a shooting method, which is applied to a shooting device, and the shooting device may include a flash and a camera module. The method may include steps 101 to 104:

[0023] Step 101: A photographing device obtains light source spectrum information of a flash, spectrum response information of a camera module, first environment reflection spectrum information, and second environment reflection spectrum information.

[0024] The first environment reflection spectrum information is the environment reflection spectrum information when the flash is in an off state, and the second environment reflection spectrum information is the environment reflection spectrum information when the flash is in an on state.

[0025] Optionally, the above-mentioned shooting device may further include a spectrometer, a monochromator, and a spectral sensor. The shooting device may detect the light source spectrum information of the light source emitted by the flash through the spectrometer; measure the spectral response information of the R channel, the G channel, and the B channel of the camera module through the monochromator; and respectively detect the first environment reflection spectrum information and the second environment reflection spectrum information through the spectral sensor.

[0026] Optionally, the light source spectrum information may include spectrum information of light sources in each band within a preset wavelength range, and the spectrum response information may include spectrum response information of three channels of the camera module to light sources in each band within the preset wavelength range. The first environment reflection spectrum information and the second environment reflection spectrum information may include reflection spectrum information of each band within a preset wavelength range. The preset wavelength range may be a visible light wavelength range, and the visible light wavelength range may be (380nm, 780nm).

[0027] It should be noted that the spectrometer can be used to separate the electromagnetic radiation of the radiation source into required bands or band regions through a dispersive element, and perform intensity measurement in the selected band.

[0028] It should be noted that a monochromator can be used to selectively transmit light of a narrower wavelength range from input light or other radiation of a wider wavelength range.

[0029] It should be noted that the spectral sensor can be used to measure the reflected light after the interaction between light and matter. The spectral sensor can generate different response signals by scanning each band within a preset wavelength range, thereby obtaining the reflected spectrum information at each band.

[0030] Step 102: The photographing device determines reflectivity information of the photographing object according to the light source spectrum information, the first environment reflection spectrum information and the second environment reflection spectrum information, and determines an exposure compensation value of automatic exposure (AE) according to the reflectivity information of the photographing object.

[0031] Optionally, the electronic device determines the reflectivity information of the photographed object according to the light source spectrum information, the first environment reflection spectrum information and the second environment reflection spectrum information, which may specifically include: the electronic device may determine the reflectivity information R1 of the photographed object according to the following formula (1):

[0032]

[0033] Among them, RS1 is the first environment reflection spectrum information, RS2 is the second environment reflection spectrum information, and S1 is the light source spectrum information.

[0034] Specifically, since the first environment reflection spectrum information RS1 is the product of the object reflectance information R1 and the environment light source spectrum information S2, that is, RS1 = R1 * S2; the second environment reflection spectrum information RS2 is the product of the total spectrum information and the object reflectance information R1, and the total spectrum information is the sum of the environment light source spectrum information S2 and the flash light source spectrum information S1, that is, RS2 = (S1 + S2) * R1. Therefore, according to the formula RS1 = R1 * S2 and the formula RS2 = (S1 + S2) * R1, the above formula (1) can be obtained.

[0035] In the embodiment of the present application, since the reflectivity information of the photographed object can be determined, the exposure compensation value of AE can be determined according to the reflectivity information of the photographed object, thereby achieving a more accurate exposure control effect.

[0036] Optionally, the electronic device determines the exposure compensation value of AE according to the reflectivity information of the object, which may specifically include: the electronic device may determine the mean value of the reflectivity information of the object in all bands within a preset wavelength range according to the reflectivity information of the object; when the mean value of the reflectivity information of the object is greater than the preset reflectivity, determine the exposure compensation value to be a first exposure compensation value; when the mean value of the reflectivity information of the object is less than or equal to the preset reflectivity, determine the exposure compensation value to be a second exposure compensation value; wherein the first exposure compensation value is the ratio of a first difference to the preset reflectivity, the second exposure compensation value is the ratio of the first difference to the mean value of the reflectivity information of the object, and the first difference is the absolute value of the difference between the mean value of the reflectivity information of the object and the preset reflectivity.

[0037] Specifically, Figure 2 As shown, the electronic device can determine the average value of the reflectivity information of the photographed object in all bands within the preset wavelength range (λ1, λ2) based on the reflectivity information R1 of the photographed object based on the following formula (2): Then determine the mean reflectivity information of the photographed object The relationship between the size of the preset reflectivity R3 and the mean reflectivity information of the photographed object When the reflectivity information of the photographed object is greater than the preset reflectivity R3, the electronic device can determine the first exposure compensation value N1 based on the following formula (3); When the reflectivity R2 is less than or equal to the preset reflectivity R3, the electronic device can determine the second exposure compensation value N2 based on the following formula (4).

[0038]

[0039]

[0040]

[0041] It should be noted that the preset reflectivity R3 may be the reflectivity of a preset reflectivity object, and the reflectivity of the preset reflectivity object may be the reflectivity of a neutral gray block of 18% gray, that is, 18%.

[0042] In the embodiment of the present application, since the average reflectivity information of the object can be determined according to the reflectivity information of the object, and the exposure compensation value of AE is determined based on the average reflectivity information of the object, a more accurate exposure control effect can be achieved.

[0043] Step 103: The photographing device determines channel information of a preset reflectivity object according to the reflectivity information, spectral response information of the photographed object and the first environment reflective spectrum information, and determines an automatic white balance AWB compensation gain according to the channel information.

[0044] Optionally, the electronic device determines the channel information of the preset reflectivity object based on the reflectivity information of the photographed object, the spectral response information and the first ambient reflection spectrum information. Specifically, it may include: the electronic device may first determine the spectral information of the ambient light source when the flash is in an off state based on the reflectivity information of the photographed object and the first ambient reflection spectrum information; and then determine the channel information of the preset reflectivity object based on the spectral information of the ambient light source, the spectral response information and the preset reflectivity.

[0045] Specifically, since the reflectivity information R1 of the photographed object and the first environment reflection spectrum information RS1 are known values, the following formula (5) can be obtained according to RS1=R1*S2. The electronic device can determine the ambient light source spectrum information S2 based on the following formula (5). Thereafter, the electronic device can determine the channel information of the preset reflectivity object according to the ambient light source spectrum information S2, the spectral response information and the preset reflectivity R3.

[0046] S2=RS1 / R1 (5).

[0047] In the embodiment of the present application, since the channel information of the preset reflectivity object can be determined according to the ambient light source spectrum information, the spectrum response information and the preset reflectivity, it can provide a basis for determining the AWB compensation gain.

[0048] Optionally, the above spectral response information may include R channel spectral response information QE R , G channel spectral response information QE G and B channel spectral response information QE B The electronic device determines the channel information of the preset reflectivity object according to the ambient light source spectrum information S2, the spectrum response information and the preset reflectivity R3, which may specifically include: the electronic device may determine the channel information of the preset reflectivity object according to the R channel spectrum response information QE based on the following formula (6). R , the preset reflectivity R3 and the ambient light source spectrum information S2 determine the R channel information RM; based on the following formula (7), according to the G channel spectrum response information QE G , the preset reflectivity R3 and the ambient light source spectrum information S2 determine the G channel information GM; according to the B channel spectrum response information QE B , the preset reflectivity R3 and the ambient light source spectrum information S2 determine the B channel information BM.

[0049]

[0050]

[0051]

[0052] In the embodiment of the present application, since the channel information of the corresponding channel can be determined according to the spectral response information of each channel, it can provide a basis for determining the AWB compensation gain of each channel.

[0053] Optionally, the electronic device determines the AWB compensation gain according to the channel information, which may specifically include: the electronic device may determine a ratio of the G channel information to the R channel information and a ratio of the G channel information to the B channel information as the AWB compensation gain of the corresponding channel.

[0054] Specifically, the electronic device may determine the ratio of the G channel information GM to the R channel information RM as the R channel compensation gain Rgain in the AWB compensation gain; and determine the ratio of the G channel information GM to the B channel information BM as the B channel compensation gain Bgain in the AWB compensation gain.

[0055] In the embodiment of the present application, since the AWB compensation gain of each channel can be determined, a basis can be provided for adjusting the AWB parameter of each pixel point of the captured image.

[0056] Step 104: The photographing device adjusts the photographing parameters of the photographing device according to the exposure compensation value and the AWB compensation gain, and photographs the subject.

[0057] Optionally, the electronic device may adjust the exposure value of the photographing device according to the exposure compensation value. Specifically, after determining the first exposure compensation value N1, the photographing device may adjust the exposure value of the photographing object according to the exposure compensation value N2. When the reflectivity is greater than the preset reflectivity R3, N1 exposure values ​​(EV) are added to the current exposure value of AE; similarly, after determining the second exposure compensation value N2, the shooting device can When the reflectivity is less than or equal to the preset reflectivity R3, N2 EV is reduced based on the current exposure value of AE.

[0058] Optionally, the shooting device may perform AWB gain compensation according to the AWB compensation gain obtained in step 103. Specifically, the shooting device may perform AWB gain compensation on each pixel in the captured image according to the AWB compensation gain. Taking the target pixel as an example, the shooting device may multiply the value of the r channel of the target pixel by the R channel compensation gain Rgain, and multiply the value of the b channel of the target pixel by the B channel compensation gain Bgain.

[0059] In the embodiment of the present application, the exposure compensation value of AE and the AWB compensation gain can be determined according to the light source spectrum information of the flash, the spectral response information of the camera module, the first environment reflection spectrum information and the second environment reflection spectrum information. Since the exposure compensation value of AE is determined based on the reflectivity information of the photographed object, a more precise exposure control effect can be achieved. Since the AWB compensation gain is determined based on the channel information of the preset reflectivity object, the color cast phenomenon of each light source area can be reduced, thereby reducing the influence of the light source on the image brightness and image color.

[0060] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method is executed by a shooting device as an example to illustrate the shooting device provided in the embodiment of the present application.

[0061] like Figure 3 As shown, the embodiment of the present application also provides a shooting device 300, which includes a flash and a camera module, and the shooting device also includes: an acquisition module 301 and a processing module 302. The acquisition module 301 can be used to acquire the light source spectrum information of the flash, the spectral response information of the camera module, the first environment reflection spectrum information and the second environment reflection spectrum information. The processing module 302 can be used to determine the reflectivity information of the shooting object according to the light source spectrum information, the first environment reflection spectrum information and the second environment reflection spectrum information, and determine the exposure compensation value of the automatic exposure AE according to the reflectivity information of the shooting object. The processing module 302 can also be used to determine the channel information of the preset reflectivity object according to the reflectivity information of the shooting object, the spectral response information and the first environment reflection spectrum information, and determine the automatic white balance AWB compensation gain according to the channel information. The processing module 302 can also be used to adjust the shooting parameters of the shooting device according to the exposure compensation value and the AWB compensation gain, and shoot the shooting object. The first environment reflection spectrum information is the environment reflection spectrum information when the flash is in an off state, and the second environment reflection spectrum information is the environment reflection spectrum information when the flash is in an on state.

[0062] Optionally, the processing module 302 is specifically configured to: Determine the reflectivity information R1 of the photographed object; wherein RS1 is the first environment reflection spectrum information, RS2 is the second environment reflection spectrum information, and S1 is the light source spectrum information.

[0063] Optionally, the processing module 302 is specifically used to: determine the mean value of the reflectivity information of the object in all bands within a preset wavelength range according to the reflectivity information of the object; when the mean value of the reflectivity information of the object is greater than the preset reflectivity, determine the exposure compensation value to be a first exposure compensation value; when the mean value of the reflectivity information of the object is less than or equal to the preset reflectivity, determine the exposure compensation value to be a second exposure compensation value; wherein the first exposure compensation value is the ratio of a first difference to the preset reflectivity, the second exposure compensation value is the ratio of the first difference to the mean value of the reflectivity information of the object, and the first difference is the absolute value of the difference between the mean value of the reflectivity information of the object and the preset reflectivity.

[0064] Optionally, the processing module 302 is specifically used to: determine the spectral information of the ambient light source when the flash is in an off state according to the reflectivity information of the photographed object and the first ambient reflection spectrum information; determine the channel information of the preset reflectivity object according to the ambient light source spectral information, the spectral response information and the preset reflectivity.

[0065] Optionally, the spectral response information includes R channel spectral response information, G channel spectral response information and B channel spectral response information; the processing module 302 is specifically used to: determine the R channel information according to the R channel spectral response information, the preset reflectivity and the ambient light source spectral information; determine the G channel information according to the G channel spectral response information, the preset reflectivity and the ambient light source spectral information; determine the B channel information according to the B channel spectral response information, the preset reflectivity and the ambient light source spectral information.

[0066] Optionally, the processing module 302 is specifically configured to: determine a ratio of the G channel information to the R channel information and a ratio of the G channel information to the B channel information as AWB compensation gains of corresponding channels.

[0067] In the embodiment of the present application, the exposure compensation value of AE and the AWB compensation gain can be determined according to the light source spectrum information of the flash, the spectral response information of the camera module, the first environment reflection spectrum information and the second environment reflection spectrum information. Since the exposure compensation value of AE is determined based on the reflectivity information of the photographed object, a more precise exposure control effect can be achieved. Since the AWB compensation gain is determined based on the channel information of the preset reflectivity object, the color cast phenomenon of each light source area can be reduced, thereby reducing the influence of the light source on the image brightness and image color.

[0068] The shooting device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.

[0069] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0070] The shooting device provided in the embodiment of the present application can achieve Figure 1 to Figure 2 The various processes implemented in the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.

[0071] Alternatively, if Figure 4 As shown, an embodiment of the present application further provides an electronic device 400, including a processor 401 and a memory 402, wherein the memory 402 stores programs or instructions that can be executed on the processor 401, and when the program or instructions are executed by the processor 401, the various steps of the above-mentioned shooting method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0072] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0073] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0074] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

[0075] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0076] The processor 1010 may be used to obtain light source spectrum information of the flash, spectrum response information of the camera module, first environment reflection spectrum information, and second environment reflection spectrum information.

[0077] The processor 1010 may also be configured to determine the reflectivity information of the photographed object according to the light source spectrum information, the first environment reflection spectrum information, and the second environment reflection spectrum information, and determine an exposure compensation value of automatic exposure AE according to the photographed object reflection spectrum information.

[0078] The processor 1010 may also be configured to determine channel information of a preset reflectivity object according to the reflectivity information of the photographed object, the spectral response information, and the first ambient reflection spectrum information, and determine an automatic white balance AWB compensation gain according to the channel information.

[0079] The processor 1010 may also be used to adjust the shooting parameters of the electronic device according to the exposure compensation value and the AWB compensation gain, and shoot the subject. The first environment reflection spectrum information is the environment reflection spectrum information when the flash is in an off state, and the second environment reflection spectrum information is the environment reflection spectrum information when the flash is in an on state.

[0080] In the embodiment of the present application, the exposure compensation value of AE and the AWB compensation gain can be determined according to the light source spectrum information of the flash, the spectral response information of the camera module, the first environment reflection spectrum information and the second environment reflection spectrum information. Since the exposure compensation value of AE is determined based on the reflectivity information of the photographed object, a more precise exposure control effect can be achieved. Since the AWB compensation gain is determined based on the channel information of the preset reflectivity object, the color cast phenomenon of each light source area can be reduced, thereby reducing the influence of the light source on the image brightness and image color.

[0081] Optionally, the processor 1010 is specifically configured to: Determine the reflectivity information R1 of the photographed object; wherein RS1 is the first environment reflection spectrum information, RS2 is the second environment reflection spectrum information, and S1 is the light source spectrum information.

[0082] In the embodiment of the present application, since the reflectivity information of the photographed object can be determined, the exposure compensation value of AE can be determined according to the reflectivity information of the photographed object, thereby achieving a more accurate exposure control effect.

[0083] Optionally, the processor 1010 is specifically used to: determine the mean value of the reflectivity information of the object in all bands within a preset wavelength range according to the reflectivity information of the object; when the mean value of the reflectivity information of the object is greater than the preset reflectivity, determine the exposure compensation value to be a first exposure compensation value; when the mean value of the reflectivity information of the object is less than or equal to the preset reflectivity, determine the exposure compensation value to be a second exposure compensation value; wherein the first exposure compensation value is a ratio of a first difference to the preset reflectivity, the second exposure compensation value is a ratio of the first difference to the mean value of the reflectivity information of the object, and the first difference is the absolute value of the difference between the mean value of the reflectivity information of the object and the preset reflectivity.

[0084] In the embodiment of the present application, since the average reflectivity information of the object can be determined according to the reflectivity information of the object, and the exposure compensation value of AE is determined based on the average reflectivity information of the object, a more accurate exposure control effect can be achieved.

[0085] Optionally, the processor 1010 is specifically used to: determine the spectral information of the ambient light source when the flash is in an off state according to the reflectivity information of the photographed object and the first ambient reflection spectrum information; determine the channel information of the preset reflectivity object according to the ambient light source spectral information, the spectral response information and the preset reflectivity.

[0086] In the embodiment of the present application, since the channel information of the preset reflectivity object can be determined according to the ambient light source spectrum information, the spectrum response information and the preset reflectivity, it can provide a basis for determining the AWB compensation gain.

[0087] Optionally, the spectral response information includes R channel spectral response information, G channel spectral response information and B channel spectral response information; the processor 1010 is specifically used to: determine the R channel information according to the R channel spectral response information, the preset reflectivity and the ambient light source spectral information; determine the G channel information according to the G channel spectral response information, the preset reflectivity and the ambient light source spectral information; determine the B channel information according to the B channel spectral response information, the preset reflectivity and the ambient light source spectral information.

[0088] In the embodiment of the present application, since the channel information of the corresponding channel can be determined according to the spectral response information of each channel, it can provide a basis for determining the AWB compensation gain of each channel.

[0089] Optionally, the processor 1010 is specifically configured to: determine a ratio of the G channel information to the R channel information and a ratio of the G channel information to the B channel information as AWB compensation gains of corresponding channels.

[0090] In the embodiment of the present application, since the AWB compensation gain of each channel can be determined, a basis can be provided for adjusting the AWB parameter of each pixel point of the captured image.

[0091] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0092] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0093] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0094] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0095] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0096] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0097] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0098] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0099] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0101] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A shooting method, applied to a shooting device, wherein the shooting device includes a flash and a camera module, characterized in that: The method comprises: Acquire light source spectrum information of the flash, spectrum response information of the camera module, first environment reflection spectrum information, and second environment reflection spectrum information; Determine the reflectivity information of the photographed object according to the light source spectrum information, the first environment reflection spectrum information and the second environment reflection spectrum information, and determine the exposure compensation value of automatic exposure AE according to the reflectivity information of the photographed object; Determine channel information of a preset reflectivity object according to the reflectivity information of the photographed object, the spectral response information and the first ambient reflective spectrum information, and determine an automatic white balance AWB compensation gain according to the channel information; adjusting the shooting parameters of the shooting device according to the exposure compensation value and the AWB compensation gain, and shooting the subject; The first environment reflection spectrum information is the environment reflection spectrum information when the flash is in an off state, and the second environment reflection spectrum information is the environment reflection spectrum information when the flash is in an on state; The step of determining the exposure compensation value of AE according to the reflectivity information of the photographed object includes: The average value of the reflectivity information of the photographed object in all bands within a preset wavelength range is determined according to the reflectivity information of the photographed object, and the exposure compensation value of AE is determined based on the relationship between the average value of the reflectivity information of the photographed object and the preset reflectivity.

2. The shooting method according to claim 1, characterized in that: The determining the reflectivity information of the photographed object according to the light source spectrum information, the first environment reflection spectrum information and the second environment reflection spectrum information includes: According to the formula Determine reflectivity information R1 of the photographed object; Among them, RS1 is the first environment reflection spectrum information, RS2 is the second environment reflection spectrum information, and S1 is the light source spectrum information.

3. The shooting method according to claim 1 or 2, characterized in that: The step of determining the exposure compensation value of AE according to the reflectivity information of the photographed object includes: Determine the average value of the reflectivity information of the photographed object in all bands within a preset wavelength range according to the reflectivity information of the photographed object; When the average reflectivity information of the photographed object is greater than a preset reflectivity, determining the exposure compensation value to be a first exposure compensation value; When the average reflectivity information of the photographed object is less than or equal to the preset reflectivity, determining the exposure compensation value to be a second exposure compensation value; Among them, the first exposure compensation value is the ratio of the first difference to the preset reflectivity, the second exposure compensation value is the ratio of the first difference to the average reflectivity information of the photographed object, and the first difference is the absolute value of the difference between the average reflectivity information of the photographed object and the preset reflectivity.

4. The shooting method according to claim 1, characterized in that: The determining the channel information of the preset reflectivity object according to the reflectivity information of the photographed object, the spectral response information and the first environment reflection spectrum information includes: Determine the ambient light source spectrum information when the flash is in an off state according to the reflectivity information of the photographed object and the first ambient reflective spectrum information; The channel information of the preset reflectivity object is determined according to the ambient light source spectrum information, the spectrum response information and the preset reflectivity.

5. The shooting method according to claim 4, characterized in that: The spectral response information includes R channel spectral response information, G channel spectral response information and B channel spectral response information; The determining the channel information of the preset reflectivity object according to the ambient light source spectrum information, the spectrum response information and the preset reflectivity includes: Determine R channel information according to the R channel spectral response information, the preset reflectivity and the ambient light source spectral information; Determine G channel information according to the G channel spectral response information, the preset reflectivity and the ambient light source spectral information; The B channel information is determined according to the B channel spectral response information, the preset reflectivity, and the ambient light source spectral information.

6. The shooting method according to claim 5, characterized in that: The determining the AWB compensation gain according to the channel information includes: A ratio of the G channel information to the R channel information and a ratio of the G channel information to the B channel information are determined as AWB compensation gains of corresponding channels.

7. A photographing device, comprising a flash and a camera module, characterized in that: The photographing device further includes: an acquisition module and a processing module; The acquisition module is used to acquire the light source spectrum information of the flash, the spectrum response information of the camera module, the first environment reflection spectrum information and the second environment reflection spectrum information; The processing module is used to determine the reflectivity information of the photographed object according to the light source spectrum information, the first environment reflection spectrum information and the second environment reflection spectrum information, and determine the exposure compensation value of automatic exposure AE according to the photographed object reflectivity information; The processing module is further used to determine channel information of a preset reflectivity object according to the reflectivity information of the photographed object, the spectral response information and the first environmental reflection spectrum information, and determine an automatic white balance AWB compensation gain according to the channel information; The processing module is further used to adjust the shooting parameters of the shooting device according to the exposure compensation value and the AWB compensation gain, and shoot the subject; The first environment reflection spectrum information is the environment reflection spectrum information when the flash is in an off state, and the second environment reflection spectrum information is the environment reflection spectrum information when the flash is in an on state; The processing module is used to determine the average reflectivity information of the object in all bands within a preset wavelength range according to the reflectivity information of the object, and determine the exposure compensation value of AE based on the relationship between the average reflectivity information of the object and the preset reflectivity.

8. The photographing device according to claim 7, characterized in that: The processing module is specifically used for: According to the formula Determine reflectivity information R1 of the photographed object; Among them, RS1 is the first environment reflection spectrum information, RS2 is the second environment reflection spectrum information, and S1 is the light source spectrum information.

9. The photographing device according to claim 7 or 8, characterized in that: The processing module is specifically used for: Determine the average value of the reflectivity information of the photographed object in all bands within a preset wavelength range according to the reflectivity information of the photographed object; When the average reflectivity information of the photographed object is greater than a preset reflectivity, determining the exposure compensation value to be a first exposure compensation value; When the average reflectivity information of the photographed object is less than or equal to the preset reflectivity, determining the exposure compensation value to be a second exposure compensation value; Among them, the first exposure compensation value is the ratio of the first difference to the preset reflectivity, the second exposure compensation value is the ratio of the first difference to the average reflectivity information of the photographed object, and the first difference is the absolute value of the difference between the average reflectivity information of the photographed object and the preset reflectivity.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the shooting method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • System for characterizing ambient lighting

    CN114208162A

  • Image quality in cameras using flash

    US20070248342A1