CN117579947A - Response value determining method, device, electronic equipment and storage medium - Google Patents

Response value determining method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117579947A
CN117579947A CN202311624842.XA CN202311624842A CN117579947A CN 117579947 A CN117579947 A CN 117579947A CN 202311624842 A CN202311624842 A CN 202311624842A CN 117579947 A CN117579947 A CN 117579947A
Authority
CN
China
Prior art keywords
region
response
channel
determining
gain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311624842.XA
Other languages
Chinese (zh)
Inventor
邵明天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202311624842.XA priority Critical patent/CN117579947A/en
Publication of CN117579947A publication Critical patent/CN117579947A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Photometry And Measurement Of Optical Pulse Characteristics (AREA)

Abstract

The application relates to a response value determination method, a response value determination apparatus, an electronic device, a storage medium and a computer program product. The method comprises the following steps: determining light distribution conditions based on initial response values of all channels of the plurality of spectrum detection units under initial gain; the plurality of spectrum detection units are distributed in a plurality of areas of the spectrum detector, and each area comprises at least one spectrum detection unit; determining target gains corresponding to all areas based on the light distribution condition; and acquiring a target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region. By adopting the method, the accuracy of the response value can be improved.

Description

Response value determining method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing, and in particular, to a response value determining method, apparatus, electronic device, and storage medium.
Background
With the development of image processing technology, automatic white balance (AWB, automatic White Balance) debugging is widely applied to a photographing terminal, and the automatic white balance debugging is used for automatically adjusting white balance parameters of the photographing terminal under different illumination conditions so as to ensure that an image photographed by the photographing terminal presents a real color.
In the conventional method, the spectrum detection pixels in the photographing terminal are used for acquiring the intensity of the optical signals corresponding to each frequency band in the ambient light, and the white balance parameters are determined according to the intensity of the optical signals corresponding to each frequency band, so that the accuracy of the white balance parameters is lower due to the lower accuracy of the intensity of the optical signals corresponding to each frequency band.
Disclosure of Invention
The embodiment of the application provides a response value determining method, a response value determining device, electronic equipment and a storage medium, which can improve the accuracy of a response value.
In a first aspect, the present application provides a response value determination method. The method comprises the following steps:
determining light distribution conditions based on initial response values of all channels of the plurality of spectrum detection units under initial gain; the spectrum detection units are distributed in a plurality of areas of the spectrum detector, and each area comprises at least one spectrum detection unit;
determining target gains corresponding to the areas based on the light distribution conditions;
and acquiring a target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region.
In a second aspect, the present application further provides a response value determining apparatus. The device comprises:
The distribution determining module is used for determining light distribution conditions based on initial response values of all channels of the plurality of spectrum detection units under initial gains; the spectrum detection units are distributed in a plurality of areas of the spectrum detector, and each area comprises at least one spectrum detection unit;
the gain determining module is used for determining target gains corresponding to the areas based on the light distribution condition;
and the response value determining module is used for acquiring a target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region.
In a third aspect, the present application further provides a spectrum detector, including a plurality of regions, each region including at least one spectrum detection unit, and the spectrum detection units of each region sharing a gain amplifying circuit.
In a fourth aspect, the present application further provides an electronic device, including a spectrum detector and a processor, where the spectrum detector includes a plurality of regions, each region includes at least one spectrum detection unit, and the spectrum detection units of each region share a gain amplifying circuit; the processor is adapted to implement the steps of the method described in the first aspect when executing a computer program.
In a fifth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method described in the first aspect.
In a sixth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of the method described in the first aspect.
According to the response value determining method, the light distribution condition of the environmental light is determined through the initial response values of the channels of the plurality of spectrum detection units under the initial gain, the target gain corresponding to each region is determined according to the light distribution condition of the environmental light, namely, the target gain changes along with the change of the distribution condition of the environmental light, so that the target gain is more suitable for obtaining the target response value corresponding to the channels of the spectrum detection units in the current environmental light, the situation that the target response value is overlarge when the environmental light is stronger and the target response value is too small when the environmental light is weaker is avoided, the accuracy of the target response value is improved, the spectrum detection units are deployed in the plurality of regions of the spectrum detector, and the target gains corresponding to the different regions are different according to the environmental light received by the different regions, and the accuracy of the target response value is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method of determining a response value in one embodiment;
FIG. 2 is a schematic diagram of a spectral detector in one embodiment;
FIG. 3 is a schematic diagram of a spectrum sensing unit in one embodiment;
FIG. 4 is a schematic diagram of a spectral response curve in one embodiment;
FIG. 5 is a schematic representation of a response curve in one embodiment;
FIG. 6 is a flowchart illustrating a light ray area distribution determination step in one embodiment;
FIG. 7 is a flowchart showing steps for determining the distribution of light bands in one embodiment;
FIG. 8 is a flow chart of a target gain determination step in one embodiment;
FIG. 9 is a flowchart of a target gain determination step corresponding to adjacent regions in one embodiment;
FIG. 10 is a flow chart of an initial gain determination step in one embodiment;
FIG. 11 is a flowchart of a shooting parameter determination method in one embodiment;
FIG. 12 is a flowchart illustrating steps for determining shooting parameters corresponding to neighboring areas in one embodiment;
FIG. 13 is a flowchart of the reference response value determination step in one embodiment;
FIG. 14 is a schematic diagram of an electronic device in one embodiment;
FIG. 15 is a block diagram showing the construction of a response value determining apparatus in one embodiment;
fig. 16 is an internal structural diagram of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a response value determining method is provided, and the method is applied to a terminal for explanation, wherein the terminal comprises a spectrum detector, the spectrum detector comprises a plurality of areas, and each area comprises at least one multi-channel spectrum detection unit. The terminal may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, smart devices and portable wearable devices, the smart devices may be smart robots, smart speakers, smart televisions, smart air conditioners, smart vehicle devices, smart automobiles and the like, and the portable wearable devices may be smart watches, smart bracelets, head-mounted devices and the like. In this embodiment, the method includes the following steps 102 to 106, wherein:
Step 102, determining light distribution conditions based on initial response values of all channels of a plurality of spectrum detection units under initial gains; the plurality of spectrum detection units are distributed in a plurality of areas of the spectrum detector, and each area comprises at least one spectrum detection unit.
The spectrum detector is a spectrum detection component for measuring optical signals within a specific wave band range, the wave band range measured by the spectrum detector is determined by a spectrum detection unit in the spectrum detector, and the wave band range can be 350 nanometers to 1000 nanometers. The spectrum detector comprises a spectrum detection unit, the spectrum detection unit is located on the spectrum detector, and the distribution of the spectrum detection unit on the spectrum detector can be set according to actual requirements, and the spectrum detection unit is not limited herein. The regions refer to divided regions on the spectrum detector, the spectrum detection units in each region can measure light signals in different directions, the regions included in the spectrum detector can be divided according to actual requirements, and the spectrum detection units included in each region can be set according to the actual requirements, which is not limited herein. For example, as shown in fig. 2, the camera module includes a lens and a spectrum detector, the lens and the spectrum detector are centrally symmetrical, the spectrum detector includes 9 spectrum detection units, namely 201, 202, 203, 204, 205, 206, 207, 208 and 209,9 spectrum detection units are respectively located in 5 areas, 201 and 202 are located in one area, 203 and 206 are located in one area, 208 and 209 are located in one area, 204 and 207 are located in one area, and 205 is located in one area.
The spectrum detection unit refers to a multi-channel optical signal sensor, each channel is a spectrum detection pixel for measuring optical signals in a specific wave band, and the spectrum detection pixels corresponding to different channels measure the optical signals in different wave bands. The spectrum sensing unit includes, but is not limited to, a diffusion coating and a plurality of spectrum sensing pixels, the diffusion coating being located on a surface of the spectrum sensing pixels, the diffusion coating being an optical coating that changes light propagation and functions to disperse incident light into light signals of different wavelengths or angles, for example, as shown in fig. 3, the spectrum sensing unit includes a diffusion coating and 10 spectrum sensing pixels, and the diffusion coating is located on the spectrum sensing pixels. The spectrum detection pixel refers to a specific photosensitive element or pixel on the sensor for detecting the optical signal in a specific wavelength band, and the spectrum detection pixel may be a charge coupled device, a photodiode or other type of photosensitive element, which is not limited herein.
The initial gain refers to an initial multiple of amplifying or reducing the optical signal detected by the optical detection pixel, the initial gain may be provided by the gain amplifying circuit, the initial gain may be a set fixed gain, and different areas may correspond to the same initial gain or may correspond to different initial gains. Each spectrum detecting unit may correspond to one gain amplifying circuit, that is, different spectrum detecting units may set different gains, or a plurality of spectrum detecting units may correspond to one gain amplifying circuit, and the gains corresponding to the spectrum detecting units of the same gain amplifying circuit are the same, for example, a plurality of spectrum detecting units in each region correspond to one gain amplifying circuit. The initial response value refers to the light intensity obtained by amplifying or shrinking the initial gain multiple of the optical signal detected by the spectrum detection pixel, namely the optical signal intensity obtained by convolving the spectrum response curve in the specific band detected by the spectrum detection pixel with the environment spectrum, and the intensity obtained by multiplying the optical signal intensity with the initial gain is the initial response value. For example, the spectrum detection unit includes four channels, each channel measures an electrical signal in a certain band, the spectrum response curve detected by the spectrum detection pixel of each channel is shown as a curve corresponding to each channel in fig. 4, and the response curve output by the spectrum detection unit is shown as fig. 5.
The light distribution refers to the current ambient light distribution. The light distribution conditions include, but are not limited to, at least one of light area distribution conditions and light band distribution conditions.
The terminal obtains initial response values of the channels of the plurality of spectrum detection units under the initial gain, analyzes the initial response values of the channels of the plurality of spectrum detection units under the initial gain, and determines the light distribution condition of the current ambient light.
In one embodiment, an operator starts a camera of a terminal, the terminal obtains an initial response value of each channel of each spectrum detection unit under an initial gain in response to a start trigger operation of the camera, and determines a light distribution condition based on the initial response values of each channel of the plurality of spectrum detection units under the initial gain.
In one embodiment, an operator captures an initial image using a camera of the terminal, and after the terminal acquires the initial image, the initial response value of each channel of each spectrum detection unit under the initial gain is acquired, and the light distribution condition is determined based on the initial response values of each channel of the plurality of spectrum detection units under the initial gain.
Step 104, determining the target gain corresponding to each region based on the light distribution condition.
The target gain is a gain corresponding to the spectrum detection unit determined according to the current light distribution situation of the ambient light, and it can be understood that the gain determined according to the current light distribution situation of the ambient light is more suitable for the current ambient light. The target gains corresponding to the respective regions may be the same or different.
The terminal selects a target method for determining the target gain corresponding to each region according to the light distribution condition of the ambient light, and determines the target gain corresponding to each region based on the target method and initial response values of each channel of the plurality of spectrum detection units under the initial gains.
And step 106, acquiring target response values corresponding to the channels of each spectrum detection unit in the region based on the target gains corresponding to the region.
The target response value refers to a response value of each channel of the spectrum detection unit under the target gain.
Illustratively, for each region, the terminal adjusts the gain coefficient of the gain amplifying circuit corresponding to the region to a corresponding target gain, and then obtains a target response value corresponding to each channel of each spectrum detecting unit in the region through the spectrum detecting unit and the gain amplifying circuit of the region.
In one embodiment, step 106 further comprises, after: based on the target response value of each channel of each spectrum detection unit under the target gain, a shooting parameter is determined, and the shooting parameter is used for shooting a target image. That is, the photographing parameters related to photographing, for example, white balance parameters, are determined using the target response values, and the determined photographing parameters are more suitable for photographing under the current ambient light, thereby improving the accuracy of the target image.
In one embodiment, step 106 further comprises, after: determining a correction parameter based on a target response value of each channel of each spectrum detection unit under a target gain, wherein the correction parameter is used for adjusting a photographed original image; and acquiring an original image shot under the current ambient light, and adjusting the original image based on the correction parameters to obtain a target image corresponding to the original image. And the correction parameters related to image adjustment are determined by using the target response values, and the initial image is adjusted by using the correction parameters, so that the influence of the current ambient light on the initial image is reduced, and the accuracy of the target image is improved.
In one embodiment, step 106 further comprises, after: based on the preset time interval, the target response value corresponding to each spectrum detection unit is used as the initial response value corresponding to each spectrum detection unit, steps 102 and 104 are repeatedly executed, and updated target gains corresponding to the areas are determined. In order to ensure that the target gain corresponding to each region is suitable for the current ambient light, the target gain corresponding to each region is updated in time, so that the accuracy of the target gain corresponding to each region is improved.
According to the response value determining method, the light distribution condition of the environmental light is determined through the initial response values of the channels of the plurality of spectrum detection units under the initial gain, the target gain corresponding to each region is determined according to the light distribution condition of the environmental light, namely, the target gain changes along with the change of the distribution condition of the environmental light, so that the target gain is more suitable for obtaining the target response value corresponding to the channels of the spectrum detection units in the current environmental light, the situation that the target response value is overlarge when the environmental light is stronger and the target response value is too small when the environmental light is weaker is avoided, the accuracy of the target response value is improved, the spectrum detection units are deployed in the plurality of regions of the spectrum detector, and the target gains corresponding to the different regions are different according to the environmental light received by the different regions, and the accuracy of the target response value is further improved.
In one embodiment, the light distribution condition includes at least one of a light area distribution condition and a light band distribution condition; determining a light distribution condition based on initial response values of each channel of the plurality of spectrum detection units under initial gain, including:
determining the distribution condition of the light area based on initial response values corresponding to all channels of the spectrum detection units in different areas; and/or determining the light wave band distribution condition based on the initial response values corresponding to the same channel in different areas.
The light area distribution condition refers to the distribution condition of the ambient light in different areas, and the light area distribution condition can be one of area uniform distribution and area non-uniform distribution. The light wave band distribution condition refers to the distribution condition of the ambient light in different wave bands, and the light wave band distribution condition can be one of uniform wave band distribution and nonuniform wave band distribution.
For each two channels, the terminal determines a first light distribution situation corresponding to the two channels based on a ratio between initial response values corresponding to the two channels in different areas, and determines a light area distribution situation based on a plurality of first light distribution situations; and/or the terminal determines, for each channel, a second light distribution condition corresponding to the channel based on a difference between initial response values corresponding to the same channel in different areas, and determines a light band distribution condition based on a plurality of second light distribution conditions.
In one embodiment, the terminal determines, for each region, an energy ratio between initial response values corresponding to channels of the spectrum detection unit in the same region, and determines a light region distribution condition based on the energy ratio corresponding to each region. The energy ratio refers to the ratio between initial response values corresponding to the channels of the spectrum detection unit in the same area. Determining the distribution situation of the light ray regions based on the energy ratios corresponding to the regions, wherein if the energy ratios corresponding to the regions are the same or the difference value between the energy ratios corresponding to the regions is smaller than a difference threshold value, the distribution situation of the light ray regions is determined to be uniform distribution of the regions; and if the difference value between the energy ratio corresponding to at least one region and the energy ratio corresponding to other regions is equal to or greater than a difference threshold value, determining that the light region distribution condition is the non-uniform distribution of the regions.
In this embodiment, the light area distribution condition is determined by the initial response values corresponding to the channels of the spectrum detection unit in different areas, and/or the light wave band distribution condition is determined by the initial response values corresponding to the same channel in different areas, where the light area distribution condition and the light wave band distribution condition reflect the light distribution condition of the current ambient light, and basic data is provided for subsequent determination of the target gain.
In one embodiment, as shown in fig. 6, only one spectrum detection unit is included in each of the different regions; determining a light region distribution condition based on initial response values corresponding to channels of the spectrum detection units in different regions, including:
step 602, for each region, determining a response ratio between an initial response value corresponding to the first channel and an initial response value corresponding to the second channel in the region; the first channel and the second channel are any two channels of a plurality of channels of the spectrum detection unit.
The first channel and the second channel are two different channels of the same spectrum detection unit, and the first channel and the second channel can be any two channels in one spectrum detection unit or any two adjacent channels in one spectrum detection unit. The response ratio refers to the ratio between the initial response values corresponding to the two channels in one region.
The terminal determines two target channels from the multiple channels, wherein the two target channels are respectively used as a first channel and a second channel, initial response values corresponding to the first channel and the second channel are obtained for each region, and the initial response value corresponding to the first channel is divided by the initial response value corresponding to the second channel to obtain response ratio corresponding to the first channel and the second channel in the region.
Step 604, determining that the first light distribution conditions corresponding to the first channel and the second channel are uniform distribution when the difference values between the response ratios corresponding to the areas are smaller than the difference threshold value; otherwise, the first light distribution condition corresponding to the first channel and the second channel is determined to be non-uniform distribution.
The first light distribution condition refers to the distribution condition of optical signals of two wavebands in ambient light in different areas, and can be understood as the difference condition of the ratio between the initial response values corresponding to the two channels in different areas. The first light distribution conditions are all distribution conditions, namely, the condition that the response ratio between initial response values corresponding to two channels is smaller than a difference threshold value in different areas. The first light distribution condition is a non-uniform distribution, which means a condition that a difference value between response ratios corresponding to at least two regions is equal to or greater than a difference threshold value. For example, the spectrum detector includes 3 regions, each region includes a spectrum detection unit with 10 channels, the 10 channels include an a channel and a B channel, the a channel is used as a first channel, the B channel is used as a second channel, and the response ratio of the first channel and the second channel in the first region is A1: b1, the response ratio of the first channel to the second channel in the second area is A2: b2, the response ratio of the first channel to the second channel in the third area is A3: b3, if A1: b1 =a2: b2 =a3: and B3, uniformly distributing the first light distribution conditions corresponding to the A channel and the B channel, otherwise, non-uniformly distributing the first light.
For the first channel and the second channel, if the difference value between the response ratios corresponding to the respective areas of the terminal is smaller than the difference threshold, determining that the first light distribution conditions corresponding to the first channel and the second channel are uniformly distributed; and in the case that the difference value between the response ratio values corresponding to the at least two areas is equal to or greater than the difference threshold value, determining that the first light distribution conditions corresponding to the first channel and the second channel are non-uniform.
Step 606, in the case that each first light distribution condition is uniformly distributed, determining the light area distribution condition as area uniform distribution; otherwise, the light area distribution condition is determined as area non-uniform distribution.
The uniform distribution of the regions means that the energy distribution of the ambient light in each region is the same, for example, the spectrum detector comprises 3 regions, each region comprises A3-channel spectrum detection unit, namely an A channel, a B channel and a C channel, initial response values corresponding to the A channel, the B channel and the C channel in the first region are A1, B1 and C1, initial response values corresponding to the A channel, the B channel and the C channel in the second region are A2, B2 and C2, initial response values corresponding to the A channel, the B channel and the C channel in the third region are A3, B3 and C3, and A1 between the A channel and the B channel: b1 =a2: b2 =a3: b3, the first light distribution conditions corresponding to the A channel and the B channel are uniformly distributed, and B1 is arranged between the B channel and the C channel: c1 =b2: c2 =b3: and C3, uniformly distributing the first light distribution conditions corresponding to the B channel and the C channel, wherein the light region distribution conditions are uniformly distributed.
In an exemplary embodiment, when the first light distribution conditions corresponding to any two channels are all uniformly distributed, the terminal determines that the light area distribution conditions are uniformly distributed in the area, and when the first light distribution conditions corresponding to at least two channels are non-uniformly distributed, the terminal determines that the light area distribution conditions are non-uniformly distributed in the area.
In this embodiment, first, the distribution condition of the optical signals of any two wavebands in the ambient light in different areas is determined, the first light distribution condition corresponding to any two wavebands is determined, and then the light area distribution condition is determined according to a plurality of first light distribution conditions, that is, the whole is determined locally, so that the accuracy of the light area distribution condition is improved.
In one embodiment, the region includes at least two spectral detection units therein; determining a response ratio between an initial response value corresponding to the first channel and an initial response value corresponding to the second channel in the region, including: counting initial response values corresponding to the channels of each spectrum detection unit in the region aiming at each channel to obtain statistical response values corresponding to the channels; and determining a response ratio between the statistical response value corresponding to the first channel and the statistical response value corresponding to the second channel in the region.
The statistical response value refers to a statistical value of a plurality of initial response values corresponding to one channel in one area, and the statistical response value may be an accumulated value or an average value between the initial response values corresponding to one channel in the same area.
If the area includes at least two spectrum detection units, the terminal counts initial response values corresponding to the channels of the spectrum detection units in the area for each channel to obtain statistical response values corresponding to the channels; and calculating the ratio of the statistical response value corresponding to the first channel to the statistical response value corresponding to the second channel for every two channels to obtain the response ratio of the first channel and the second channel corresponding to the region.
In one embodiment, before determining the response ratio between the initial response value corresponding to the first channel and the initial response value corresponding to the second channel in the area, the method further includes: acquiring region identifiers corresponding to the spectrum detection units, respectively counting the unit statistics quantity of the spectrum detection units corresponding to each region identifier, and if the unit statistics quantity corresponding to the region identifier is one, determining that the region corresponding to the region identifier comprises one spectrum detection unit; if the number of the units corresponding to the area identifier is at least two, determining that the area corresponding to the area identifier comprises a plurality of spectrum detection units.
In this embodiment, by distinguishing the case that the area includes one spectrum detection unit and a plurality of spectrum detection units, different methods are adopted to determine the response ratio for different cases, thereby improving the accuracy of the response ratio.
In one embodiment, as shown in fig. 7, determining the light band distribution based on the corresponding initial response values of the same channel in different regions includes:
step 702, for each channel, obtaining an initial response value corresponding to a channel of the spectrum detection unit in each region.
Step 704, determining, for each two adjacent regions, a difference between initial response values corresponding to channels in the two adjacent regions, to obtain a response difference.
Where two adjacent regions refer to two regions that are adjacent in position, if there are multiple adjacent regions in a region, then the two adjacent regions are regions that are adjacent to any one of the regions, for example, as shown in fig. 2, 201 and 202 are located in a first region, 203 and 206 are located in a second region, 208 and 209 are located in a third region, 204 and 207 are located in a fourth region, 205 are located in a fifth region, the first region is adjacent to each of the second region, the fourth region and the fifth region, then the region adjacent to the first region may be any one of the second region, the fourth region and the fifth region, and each two adjacent regions may include the first region and the second region, the second region and the third region, the third region and the fourth region, and the fourth region and the fifth region. The response difference refers to the difference between the initial response values corresponding to the same channel in the adjacent two regions.
For each two adjacent areas in all the areas, if a spectrum detection unit exists in each of the two adjacent areas, the terminal subtracts initial response values corresponding to the same channel in the two adjacent areas to obtain a response difference value.
In one embodiment, for each two adjacent regions, if at least two spectrum detection units exist in at least one region of the two adjacent regions, for the region in which at least two spectrum detection units exist, initial response values corresponding to the channels of at least two spectrum detection units in the region are counted, so as to obtain response statistic values corresponding to the channels in the region. If at least two spectrum detection units exist in two adjacent areas, determining a difference value between response statistic values corresponding to the channels in the two adjacent areas to obtain a response difference value; if at least two spectrum detection units exist in one of the two adjacent areas, determining a difference value between the response statistic value corresponding to the channel in the area and the initial response value corresponding to the channel in the other area, and obtaining a response difference value.
In one embodiment, for each two adjacent regions, if at least two spectrum detection units exist in at least one region of the two adjacent regions, and for the region in which at least two spectrum detection units exist, one spectrum detection unit of the at least two spectrum detection units is selected as the target spectrum detection unit corresponding to the region. If at least two spectrum detection units exist in two adjacent areas, determining a difference value between initial response values corresponding to the channels of the target spectrum detection units in the two adjacent areas to obtain a response difference value; if at least two spectrum detection units exist in one of the two adjacent areas, determining a difference value between an initial response value corresponding to the channel in the target spectrum detection unit in the area and an initial response value corresponding to the channel in the spectrum detection unit in the other area, and obtaining a response difference value.
Step 706, determining a second light distribution condition corresponding to the channel based on the relationship between each response difference and the attenuation threshold.
The attenuation threshold is a preset threshold, and the attenuation threshold is set based on the attenuation degree of the optical relative illuminance of the lens, wherein the attenuation degree of the optical relative illuminance of the lens refers to the relative reduction degree of the intensity of light captured by the spectrum detection unit in different areas of the spectrum detector.
The terminal compares each response difference value with the attenuation threshold value, and if each response difference value is smaller than the attenuation threshold value, the terminal determines that the second light distribution condition corresponding to the channel is uniform distribution; and if at least one response difference value is equal to or larger than the attenuation threshold value, determining that the second light distribution condition corresponding to the channel is non-uniform distribution.
At step 708, a light band distribution is determined based on the second light distribution corresponding to each channel.
The terminal determines the current light wave band distribution condition of the ambient light according to the second light distribution condition corresponding to each channel.
In one embodiment, determining the light band distribution based on the second light distribution corresponding to each channel includes: under the condition that the second light distribution conditions corresponding to the channels are uniformly distributed, determining that the light wave band distribution conditions are uniformly distributed; and determining that the light wave band distribution condition is non-uniform wave band distribution under the condition that the second light distribution condition corresponding to at least one channel is non-uniform distribution.
In this embodiment, the difference between the initial response values corresponding to the same channel in two adjacent areas is smaller than the attenuation threshold, which indicates that the optical signals of the corresponding wave bands of the channel in the two adjacent areas are the same, if the optical signals of the wave bands in each two adjacent areas are the same, it indicates that the optical signals of the wave bands in the current ambient light are uniformly distributed in each area, then the light wave band distribution condition is determined according to the second light distribution condition corresponding to each channel, and accurate basic data is provided for subsequently determining the target gain corresponding to each area.
In one embodiment, as shown in fig. 8, determining the target gain corresponding to each of the regions based on the light distribution condition includes:
step 802, determining, for each region, a target gain corresponding to the region based on initial response values of channels of the spectrum detection unit in the region, in the case that the light distribution is non-uniform distribution of the region.
The terminal determines, for each region, a target gain corresponding to the region based on an initial response value of each channel of the spectrum detection unit in the region and a saturation value corresponding to the spectrum detection unit.
In one embodiment, for each region, determining a target gain for the region based on initial response values of channels of the spectral detection unit in the region includes: for each region, acquiring initial response values of all channels of a spectrum detection unit in the region, comparing each initial response value with a saturation value, determining an initial response value larger than the saturation value or smaller than the saturation value as an initial target response value, and determining a target gain corresponding to the region based on the ratio between the initial target response value and the saturation value.
In step 804, in the case that the light distribution is that the regions are uniformly distributed and the bands are uniformly distributed, the target gain corresponding to each region is determined based on the initial response value of each channel of any spectrum detection unit.
Wherein, the uniform distribution of the wave bands means that the optical signals of each wave band of the ambient light are the same in different areas or have different values smaller than the attenuation threshold.
In an exemplary embodiment, when the light distribution condition is a non-uniform distribution of the regions, the terminal determines whether the light band distribution condition is a uniform distribution of the bands, and when the light band distribution condition is a uniform distribution of the bands, the terminal determines the target gain corresponding to each region based on the initial response value of each channel of any spectrum detection unit and the saturation value corresponding to the spectrum detection unit.
Step 806, determining the target gain corresponding to the region and the adjacent region of the region based on the initial response value of each channel of the spectrum detection unit in the region under the condition that the light distribution is uniformly distributed in the region and the wave band is unevenly distributed.
Wherein, the uneven distribution of the wave bands means that the difference value of the optical signals of at least one wave band in the ambient light in different areas is larger than the attenuation threshold value.
For example, in the case where the light ray region distribution condition is a region non-uniform distribution and the light ray band distribution condition is a band non-uniform distribution, for any adjacent two regions, the target gains corresponding to the regions and the adjacent regions of the regions are determined based on the initial response values of the channels of the spectrum detection unit in one of the adjacent two regions.
In this embodiment, the light distribution situation is area non-uniform distribution, which indicates that the energy distribution of the ambient light in each area is different, and then the target gain of the corresponding area is determined according to the initial response value corresponding to each channel of the spectrum detection unit in each area, that is, the target gain corresponding to each area is different, and the target gain corresponding to the area is suitable for the distribution situation of the ambient light in the area, so that the accuracy of the target gain is improved; the light distribution condition is that the areas are uniformly distributed and the wave bands are uniformly distributed, which means that the ambient light irradiated to the spectrum detection units in each area is the same, the target gains corresponding to each area can be set to be the same gain, and the terminal determines the target gains corresponding to each area based on the initial response value of each channel of any spectrum detection unit, so that the calculation amount for determining the target gains corresponding to each area is reduced, and the calculation efficiency of determining the target gains by the terminal is improved; the light distribution condition is that the areas are uniformly distributed and the wave bands are unevenly distributed, so that the energy distribution of the ambient light in each area is the same, but the difference of the light signals of the same wave band in different areas is larger, the terminal determines the target gain corresponding to the area and the adjacent area of the area based on the initial response value of each channel of the spectrum detection unit in the area, so that the target gain corresponding to the area is suitable for the distribution condition of the ambient light in the area and the distribution condition of the ambient light in the wave bands, and the accuracy of the target gain is improved.
In one embodiment, determining the target gain for the region based on the initial response values of the channels of the spectral detection unit in the region includes:
comparing initial response values of all channels of the spectrum detection unit in the region, and determining a maximum initial response value and a minimum initial response value; determining a target gain corresponding to the region based on the maximum initial response value and the first response threshold value and the minimum initial response value and the second response threshold value; the first response threshold is greater than the second response threshold.
The maximum initial response value refers to the maximum initial response value in the initial response values of the channels in the same area. The minimum initial response value refers to the smallest initial response value among the initial response values of the channels in the same region. The first response threshold refers to a threshold value compared with a maximum initial response value, and the first response threshold may be set based on a saturation value of the spectrum detection unit, for example, the first response threshold is equal to a first weight multiplied by the saturation value of the spectrum detection unit, the first weight may be set according to an actual requirement, and the first weight may be 80%. The second response threshold refers to a threshold value compared with the minimum initial response value, and the second response threshold may be set based on the saturation value of the spectrum detection unit, for example, the second response threshold is equal to a second weight value multiplied by the saturation value of the spectrum detection unit, the second weight value is smaller than the first weight value, and the second weight value may be 20%.
The terminal compares initial response values of all channels of the spectrum detection unit in the region to obtain a maximum initial response value and a minimum initial response value, compares the maximum initial response value with a first response threshold to obtain a relation between the maximum initial response value and the first response threshold, compares the minimum initial response value with a second response threshold to obtain a relation between the minimum initial response value and the second response threshold, and determines a target gain corresponding to the region based on the relation between the maximum initial response value and the first response threshold and the relation between the minimum initial response value and the second response threshold.
In this embodiment, the maximum initial response value is compared with the first response threshold, and the minimum initial response value is compared with the second response threshold, so as to determine whether the maximum initial response value and the minimum initial response value are within a range that can be accurately measured by the spectrum detection unit, if at least one of the maximum initial response value and the minimum initial response value is not within the range that can be accurately measured by the spectrum detection unit, the initial gain is adjusted to obtain the target gain of the region, and the target gain enables the target response value of each channel obtained by the spectrum detection unit to be within the range that can be accurately measured by the spectrum detection unit, so that the accuracy of the target response value is improved.
In one embodiment, determining a target gain for a region based on a maximum initial response value and a first response threshold, and a minimum initial response value and a second response threshold, comprises:
when the maximum initial response value is smaller than or equal to the first response threshold value and the minimum initial response value is larger than or equal to the second response value, determining the initial gain corresponding to the region as the target gain corresponding to the region; under the condition that the maximum initial response value is larger than the first response threshold value and the minimum initial response value is larger than the second response threshold value, determining a target gain corresponding to the region based on the maximum initial response value and the first response threshold value; and under the condition that the maximum initial response value is smaller than the first response threshold value and the minimum initial response value is smaller than the second response threshold value, determining the target gain corresponding to the region based on the minimum initial response value and the second response threshold value.
In an exemplary embodiment, when the maximum initial response value is less than or equal to the first response threshold and the minimum initial response value is greater than or equal to the second response threshold, the terminal determines the initial gain corresponding to the region as the target gain corresponding to the region; under the condition that the maximum initial response value is larger than the first response threshold value and the minimum initial response value is larger than the second response threshold value, the terminal determines a first ratio between the first response threshold value and the maximum initial response value, and determines a first product between the first ratio and the initial gain as a target gain corresponding to the region; and under the condition that the maximum initial response value is smaller than the first response threshold value and the minimum initial response value is smaller than the second response threshold value, the terminal determines a second ratio between the second response threshold value and the minimum initial response value, and determines a target gain corresponding to a second product determination area between the second ratio and the initial gain.
In this embodiment, according to the relationship between the maximum initial response value and the first response threshold value and the relationship between the minimum initial response value and the second response threshold value, the target gain corresponding to the region is determined according to the situation, so that the accuracy of the target gain is improved.
In one embodiment, as shown in fig. 9, in the case that the light distribution is uniformly distributed in a region and the wavelength bands are unevenly distributed, determining the target gain corresponding to the region and the adjacent region of the region based on the initial response values of the channels of the spectrum detection unit in the region includes:
step 902, for two adjacent regions, acquiring initial response values of each channel of the spectrum detection unit in one region.
Step 904, determining a target gain of the region, and a maximum initial response and a minimum initial response value corresponding to the spectrum detection unit based on the initial response values of the channels of the spectrum detection unit.
The terminal determines the target gain of the region based on the initial response value of each channel of the spectrum detection unit and the saturation value of the spectrum detection unit, and then compares the initial response values of each channel of the spectrum detection unit to obtain the maximum initial response and the minimum initial response value corresponding to the spectrum detection unit.
Step 906, determining a ratio between the maximum initial response value and the minimum initial response value.
Illustratively, the terminal divides the maximum initial response value by the minimum initial response value to obtain a ratio between the maximum initial response value and the minimum initial response value.
Step 908, determining a target gain corresponding to an adjacent region of the region based on the scale and the target gain of the region.
The terminal multiplies the target gain corresponding to the region by a ratio between the maximum initial response value and the minimum initial response value in the region, to obtain the target gain corresponding to the adjacent region of the region.
In this embodiment, the light area distribution condition is that the areas are uniformly distributed, and the light band distribution condition is that the bands are unevenly distributed, which means that the energy distribution of each band of the ambient light in each area is the same, but the difference of the energy of the same band in different areas is larger, the target gains of two adjacent areas are set to be in a multiple relationship, so that the minimum target response value in one area can be ensured to be within the range that the spectrum detection unit can accurately measure, and the maximum target response value in the adjacent area can be ensured to be within the range that the spectrum detection unit can accurately measure, and it can be understood that two adjacent areas are combined into a larger area, so that the minimum target response value and the maximum target response value in the larger area are both accurate measured values.
In one embodiment, determining a target gain for an adjacent region of a region based on a scale and the target gain for the region comprises:
determining a gain factor based on the ratio; and fusing the target gain corresponding to the region with the gain coefficient to obtain the target gain corresponding to the adjacent region of the region.
The gain coefficient refers to a multiple between target gains corresponding to two adjacent regions.
The terminal obtains a coefficient mapping relation, wherein the coefficient mapping relation comprises a corresponding relation between a reference proportion interval and a reference coefficient, the reference proportion interval where the proportion is located is determined to be a target proportion interval, the reference coefficient corresponding to the target proportion interval is determined to be a gain coefficient, and the target gain corresponding to the region is multiplied by the gain coefficient to obtain the target gain corresponding to the adjacent region of the region. For example, the coefficient mapping relationship includes correspondence between multiple groups of reference proportion areas and reference coefficients, wherein the correspondence is 8 times to 32 times of the reference proportion area, and the reference coefficient is 8; the reference ratio interval is 32 times to 128 times, and the reference coefficient is 32; the reference ratio interval is 128 times to 512 times, and the reference coefficient is 128; the reference ratio interval is 512 times to 2048 times, and the reference coefficient is 512 times, etc.
In this embodiment, the ratio between the maximum initial response value and the minimum initial response value indicates the multiple relationship between the maximum initial response value and the minimum initial response value in the same region, and the multiple relationship between the target gains of the region and the adjacent region is determined according to the multiple relationship between the maximum initial response value and the minimum initial response value in one of the regions, so that the minimum target response value in one of the regions can be ensured to be within the range that the spectrum detection unit can accurately measure, and the maximum target response value in the adjacent region can be ensured to be within the range that the spectrum detection unit can accurately measure, thereby improving the accuracy of the target response value.
In one embodiment, as shown in fig. 10, before determining the light distribution condition based on the initial response values of the channels of the plurality of spectrum detection units under the initial gain, the method further includes:
step 1002, obtaining a reference image; the reference image comprises a plurality of image blocks, and each image block corresponds to one area.
Wherein, the reference image refers to an image photographed under the initial photographing parameters. The reference image includes a plurality of pixels, each pixel including a luminance value of a respective color channel including an R (Red) channel, a G (Green) channel, and a B (Blue) channel. Image blocks refer to partial images in a reference image.
Illustratively, the terminal acquires a reference image, divides the reference image into a plurality of image blocks, each image block corresponding to an area.
Step 1004, for each image block, determining a brightness statistic corresponding to each color channel in the image block based on the brightness values corresponding to the color channels of each pixel point in the image block.
The luminance statistic refers to the sum of luminance values corresponding to a color channel in an image block. The luminance value refers to the luminance or intensity of a certain color component at a specific pixel location.
For each image block, the terminal adds the brightness values corresponding to each pixel point of each color channel to obtain a brightness statistical value corresponding to each color channel.
In step 1006, an initial gain of an area corresponding to the image block is determined based on the luminance statistics corresponding to each color channel in the image block.
The terminal determines the light signal distribution condition in the region corresponding to the image block according to the proportional relation between the brightness statistic values corresponding to the color channels in the image block, and determines the initial gain of the region corresponding to the image block based on the light signal distribution condition.
Step 1008, obtaining an initial response value of each channel of each spectrum detection unit under the initial gain.
The terminal adjusts the gain coefficient of the gain amplifying circuit corresponding to each region to an initial gain corresponding to the region, and obtains an initial response value of each channel of each spectrum detecting unit under the initial gain through the spectrum detecting unit and the gain amplifying circuit in the region.
In this embodiment, according to the luminance statistics value corresponding to each color channel in the image block in the reference image, the light signal distribution condition of the area corresponding to the image block is determined, the light signal distribution condition reflects the rough condition of the ambient light irradiated to the spectrum detection unit in the area, and the initial gain of the area corresponding to the image block is determined according to the light signal distribution condition, so that the accuracy of the initial response value is improved, and then the initial response value of each channel of each spectrum detection unit under the initial gain is obtained, so that the accuracy of the initial response value is improved.
In one embodiment, as shown in fig. 11, after obtaining the target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region, the method further includes:
in step 1102, in the case that the light distribution is non-uniform, for each region, based on the target response values corresponding to the channels in the region, the shooting parameters corresponding to the region are determined.
The shooting parameters refer to parameters related to shooting affected by ambient light, and it can be understood that in different ambient light, in order to ensure quality of a shot image or video, some parameters used in a shooting process need to be adjusted according to the ambient light, and the parameters adjusted according to the ambient light are shooting parameters, which include but are not limited to white balance parameters.
In an exemplary embodiment, when the terminal determines that the light distribution condition is non-uniform distribution of the regions, for each region, the terminal determines, based on the target response values corresponding to the channels in the region, the photographing parameters corresponding to the regions, that is, the photographing parameters corresponding to each region are different.
In step 1102, under the condition that the light distribution is uniformly distributed in the area and the wave bands are uniformly distributed, the shooting parameters corresponding to each area are determined based on the target response values corresponding to each channel in any area.
Any one of the areas is one of a plurality of areas included in the spectrum detector, any one of the areas can be preset according to actual requirements, and any one of the areas can be a first area or a central area.
In an exemplary embodiment, when the terminal determines that the light distribution condition is that the areas are uniformly distributed and the bands are uniformly distributed, the terminal determines the photographing parameters corresponding to the areas based on the target response values corresponding to the channels in any one of the areas, that is, the photographing parameters corresponding to each of the areas are the same.
In step 1106, under the condition that the light distribution is uniformly distributed in the area and the wave bands are unevenly distributed, based on the target response values corresponding to the channels in the area and the adjacent areas of the area, the shooting parameters corresponding to the area and the adjacent areas of the area are determined.
The area and the adjacent area of the area refer to two areas adjacent to each other, and the area and the adjacent area of the area can be set in advance according to actual requirements.
In an exemplary embodiment, when the terminal determines that the light distribution condition is that the area is uniformly distributed and the wavelength bands are unevenly distributed, based on the target response values corresponding to the channels in the adjacent areas of the area and the area, the terminal determines the photographing parameters corresponding to the adjacent areas of the area and the area, that is, the photographing parameters corresponding to the adjacent areas of the area and the area are the same.
In this embodiment, the shooting parameters are determined by using the target response values of the channels of the spectrum detection unit in each region under the target gain, and the shooting parameters are determined by using the accurate target response values, so that the accuracy of the shooting parameters is improved, and for different light region distribution conditions and light band distribution conditions, the shooting parameters are determined by using different methods, so that the shooting parameters are more suitable for the current ambient light, and the accuracy of the shooting parameters is further improved.
In one embodiment, as shown in fig. 12, determining, based on target response values corresponding to respective channels in a region and a region adjacent to the region, shooting parameters corresponding to the region and the region adjacent to the region includes:
step 1202, comparing, for each channel, a target response value corresponding to the channel in the region and a target response value corresponding to the channel in an adjacent region of the region with a response threshold interval, and determining the target response value in the response threshold interval as a candidate response value corresponding to the channel.
The response threshold interval is a preset interval, and it is understood that the accuracy of the target response value in the response threshold interval is high, and the accuracy of the target response value outside the response threshold interval is low. The response threshold interval may be determined from the saturation value of the spectrum detection unit. The candidate response value refers to a target response value in a response threshold interval.
The terminal obtains the target response value corresponding to the same channel in the area and the target response value corresponding to the adjacent area of the area, compares the target response value corresponding to the channel in the area and the target response value corresponding to the channel in the adjacent area of the area with the response threshold interval respectively, and determines the target response value in the response threshold interval as the candidate response value corresponding to the channel.
In step 1204, a reference response value corresponding to the channel is determined based on the candidate response value corresponding to the channel.
The reference response value refers to a normalized target response value, and it is understood that the target response value corresponding to the region and the target response value corresponding to the adjacent region of the region are different in target gain, and in order to make the target response value corresponding to the region and the target response value corresponding to the adjacent region of the region identical in gain, normalization processing is required for the target response value corresponding to the region and the target response value corresponding to the adjacent region of the region.
The terminal determines the reference response value corresponding to the channel according to the candidate response value corresponding to the channel, the target gain corresponding to the region and the target gain corresponding to the adjacent region of the region.
In one embodiment, the terminal determines a target coefficient based on a ratio between a target gain corresponding to the region and a target gain corresponding to an adjacent region of the region, and if the candidate response value is a target response value corresponding to the adjacent region of the region, fuses the candidate response value and the target coefficient to obtain a reference response value corresponding to the candidate response value; and if the candidate response value is the target response value corresponding to the region, determining the candidate response value as the reference response value.
In step 1206, shooting parameters corresponding to the region and the adjacent regions of the region are determined based on the reference response values corresponding to the respective channels.
The terminal determines shooting parameters according to the reference response values corresponding to the channels, and takes the shooting parameters as shooting parameters corresponding to the areas and the adjacent areas of the areas.
In this embodiment, the light area distribution condition is area uniform distribution, and the light band distribution condition is band non-uniform distribution, which indicates that the energy distribution condition of the ambient light in each area is the same, but the energy distribution difference of different channels is larger, so that the target response values of each channel in one area cannot be all in the range that the spectrum detection unit can accurately measure, the response threshold interval is used to determine the candidate response value corresponding to each channel, and the candidate response values are all in the response threshold interval, thereby improving the accuracy of the candidate response values. The candidate response values are converted into reference response values, so that different influences on optical signals caused by different target gains corresponding to the regions and different target gains corresponding to adjacent regions of the regions are avoided, the optical signals with the same amplification factors of the reference response values determined from the two regions are determined, shooting parameters corresponding to the regions and the adjacent regions of the regions are determined according to the reference response values, and accuracy of the shooting parameters is improved.
In one embodiment, as shown in fig. 13, determining the reference response value corresponding to the channel based on the candidate response value corresponding to the channel includes:
in step 1302, under the condition that the number of candidate response values corresponding to the channel is one, a gain ratio between the normalized gain and the target gain in the region corresponding to the candidate response values is determined, and the candidate response values and the gain ratio are fused to obtain the reference response value corresponding to the channel.
The normalized gain is a preset standard gain, and it is understood that the gain obtained by conversion is, for example, 512 times the normalized gain, and the target gain corresponding to the region is 16 times, and the 16 times needs to be converted into 512 times. The gain ratio refers to the ratio between the normalized gain and the target gain in the region corresponding to the candidate response value, and the gain ratio may be an integer or a fraction.
If the number of candidate response values corresponding to the channel is one, the terminal determines a gain ratio between the normalized gain and the target gain in the region corresponding to the candidate response values, and multiplies the candidate response values by the gain ratio to obtain a reference response value corresponding to the channel.
In step 1304, under the condition that the number of candidate response values corresponding to the channel is at least two, for each candidate response value, a gain ratio between the normalized gain and the target gain in the region corresponding to the candidate response value is determined, the candidate response value and the gain ratio are fused to obtain a gain response value corresponding to the candidate response value, and the gain response values corresponding to the candidate response values are weighted and fused to obtain a reference response value corresponding to the channel.
The weighted fusion refers to an operation process of multiplying the gain response value and the weight value respectively and then adding the multiplied gain response value and the weight value, the weight value can be set according to the requirement of an example, and the weighted fusion can be weighted average.
If the number of candidate response values corresponding to the channel is at least two, the terminal firstly determines a gain ratio between the normalized gain and the target gain in the region corresponding to the candidate response values for each candidate response value, secondly fuses the candidate response values and the gain ratio to obtain gain response values corresponding to the candidate response values, and finally performs weighted fusion on the gain response values corresponding to the candidate response values to obtain the reference response values corresponding to the channel.
In this embodiment, for channels including different numbers of candidate response values, different methods are adopted to determine the reference response value corresponding to the channel, so that accuracy of the reference response value is improved.
In an exemplary embodiment, as shown in fig. 14, the terminal includes a camera module and a spectrum module, where the camera module is a device integrated with components such as a camera, related circuits, a lens, and a sensor, and is used for taking pictures and videos; a spectroscopic module is a device that integrates a spectroscopic detector, optical elements and associated circuitry for measuring spectroscopic information or making optical measurements. The spectrum detector comprises a plurality of areas, and each area comprises at least one multi-channel spectrum detection unit.
The terminal acquires a reference image, divides the reference image into a plurality of image blocks, each image block corresponds to an area, adds brightness values corresponding to each pixel point of each color channel for each image block to obtain brightness statistical values corresponding to each color channel, determines optical signal distribution conditions in the area corresponding to the image block according to the proportional relation between the brightness statistical values corresponding to each color channel in the image block, and determines initial gain of the area corresponding to the image block based on the optical signal distribution conditions.
When a camera in the terminal is started, a spectrum detector in a spectrum module is started, the terminal acquires initial response values of all channels of each spectrum detection unit under initial gain, under the condition that one spectrum detection unit is included in a region, the terminal acquires initial response values corresponding to two channels for each two channels, calculates a ratio between the initial response values corresponding to the two channels to obtain a response ratio corresponding to the two channels in the region, and determines that first light distribution conditions corresponding to the two channels are uniformly distributed if the response ratios corresponding to the two channels in each region are equal; and if the response ratio corresponding to at least one region is not equal to the response ratio corresponding to other regions, determining that the first light distribution condition corresponding to the two channels is non-uniform distribution. Under the condition that the area comprises at least two spectrum detection units, the terminal calculates initial response values corresponding to the channels of each spectrum detection unit in the area according to each channel of each area to obtain statistical response values corresponding to the channels, calculates the ratio between the statistical response values corresponding to the two channels according to each two channels to obtain corresponding response ratios of the two channels in the area, and determines that the first light distribution conditions corresponding to the two channels are uniform distribution if the corresponding response ratios of the two channels in each area are equal; and if the response ratio corresponding to at least one region is not equal to the response ratio corresponding to other regions, determining that the first light distribution condition corresponding to the two channels is non-uniform distribution.
If the first light distribution conditions are all uniform distribution, determining that the light area distribution conditions are uniform area distribution; if at least one of the first light distribution conditions is non-uniform, the light area distribution condition is determined to be area non-uniform.
For each channel, the terminal acquires initial response values corresponding to the channels of the spectrum detection units in each region, and for each two adjacent regions in all regions, if one spectrum detection unit exists in each of the two adjacent regions, the terminal subtracts the initial response values corresponding to the same channel in each of the two adjacent regions to obtain a response difference value; for each two adjacent areas, if at least two spectrum detection units exist in at least one area of the two adjacent areas, counting initial response values corresponding to the channels of the at least two spectrum detection units in the area to obtain response statistic values corresponding to the channels in the area; if at least two spectrum detection units exist in two adjacent areas, determining a difference value between response statistic values corresponding to the channels in the two adjacent areas to obtain a response difference value; if at least two spectrum detection units exist in one of the two adjacent areas, determining a difference value between the response statistic value corresponding to the channel in the area and the initial response value corresponding to the channel in the other area, and obtaining a response difference value.
The terminal compares each response difference value with an attenuation threshold value, and if each response difference value is smaller than the attenuation threshold value, the second light distribution condition corresponding to the channel is determined to be uniform distribution; and if at least one response difference value is equal to or larger than the attenuation threshold value, determining that the second light distribution condition corresponding to the channel is non-uniform distribution. If the second light distribution conditions corresponding to the channels are uniformly distributed, the terminal determines that the light wave band distribution conditions of the ambient light are uniformly distributed; if the second light distribution condition corresponding to at least one channel is non-uniform distribution, the terminal determines that the light wave band distribution condition of the ambient light is non-uniform distribution of wave bands.
If the light area distribution condition is that the areas are unevenly distributed, the terminal determines a target gain corresponding to each area based on an initial response value of each channel of the spectrum detection unit in the area and a saturation value corresponding to the spectrum detection unit.
If the light area distribution condition is area uniform distribution and the light wave band distribution condition is wave band uniform distribution, the terminal determines the target gain corresponding to each area based on the initial response value of each channel of any spectrum detection unit.
If the light area distribution condition is area uniform distribution and the light wave band distribution condition is wave band non-uniform distribution, the terminal obtains initial response values of all channels of the spectrum detection unit in one area aiming at two adjacent areas, and determines target gain of the area based on the initial response values of all channels of the spectrum detection unit and the saturation value of the spectrum detection unit; comparing initial response values of all channels of the spectrum detection unit, determining a maximum initial response value and a minimum initial response value corresponding to the spectrum detection unit, dividing the maximum initial response value by the minimum initial response value, and obtaining a proportion between the maximum initial response value and the minimum initial response value; obtaining a coefficient mapping relation, wherein the coefficient mapping relation comprises a corresponding relation between a reference proportion interval and a reference coefficient, determining the reference proportion interval in which the proportion is located as a target proportion interval, determining the reference coefficient corresponding to the target proportion interval as a gain coefficient, and multiplying the target gain corresponding to the region by the gain coefficient to obtain the target gain corresponding to the adjacent region of the region.
According to the response value determining method, the light distribution condition of the environmental light is determined through the initial response values of the channels of the plurality of spectrum detection units under the initial gain, the target gain corresponding to each region is determined according to the light distribution condition of the environmental light, namely, the target gain changes along with the change of the distribution condition of the environmental light, so that the target gain is more suitable for obtaining the target response value corresponding to the channels of the spectrum detection units in the current environmental light, the situation that the target response value is overlarge when the environmental light is stronger and the target response value is too small when the environmental light is weaker is avoided, the accuracy of the target response value is improved, the spectrum detection units are deployed in the plurality of regions of the spectrum detector, and the target gains corresponding to the different regions are different according to the environmental light received by the different regions, and the accuracy of the target response value is further improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a response value determining device for implementing the response value determining method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the response value determining device or devices provided below may refer to the limitation of the response value determining method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 15, there is provided a response value determining apparatus including: a distribution determination module 1502, a gain determination module 1504, and a response value determination module 1506, wherein:
a distribution determining module 1502, configured to determine a light distribution condition based on initial response values of each channel of the plurality of spectrum detecting units under an initial gain; the plurality of spectrum detection units are distributed in a plurality of areas of the spectrum detector, and each area comprises at least one spectrum detection unit;
the gain determining module 1504 is configured to determine a target gain corresponding to each region based on the light distribution condition;
the response value determining module 1506 is configured to obtain a target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region.
In one embodiment, the distribution determination module 1502 is further configured to: determining the distribution condition of the light area based on initial response values corresponding to all channels of the spectrum detection units in different areas; and/or determining the light wave band distribution condition based on the initial response values corresponding to the same channel in different areas.
In one embodiment, the distribution determination module 1502 is further configured to: for each region, determining a response ratio between an initial response value corresponding to the first channel and an initial response value corresponding to the second channel in the region; the first channel and the second channel are any two channels in a plurality of channels of the spectrum detection unit; under the condition that the difference value between the response ratio values corresponding to the areas is smaller than the difference threshold value, determining the first light distribution condition corresponding to the first channel and the second channel as uniform distribution; otherwise, determining the first light distribution condition corresponding to the first channel and the second channel as non-uniform distribution; under the condition that all the first light distribution conditions are uniformly distributed, determining the light area distribution conditions as area uniform distribution; otherwise, the light area distribution condition is determined as area non-uniform distribution.
In one embodiment, the distribution determination module 1502 is further configured to: counting initial response values corresponding to the channels of each spectrum detection unit in the region aiming at each channel to obtain statistical response values corresponding to the channels; determining a response ratio between an initial response value corresponding to the first channel and an initial response value corresponding to the second channel in the region, including: and determining a response ratio between the statistical response value corresponding to the first channel and the statistical response value corresponding to the second channel in the region.
In one embodiment, the distribution determination module 1502 is further configured to: for each channel, acquiring an initial response value corresponding to the channel of the spectrum detection unit in each region; for each two adjacent areas, determining the difference value between initial response values corresponding to channels in the two adjacent areas to obtain a response difference value; determining a second light distribution condition corresponding to the channel based on the relation between each response difference value and the attenuation threshold value; and determining the light wave band distribution condition based on the second light distribution condition corresponding to each channel.
In one embodiment, the gain determination module 1504 is further to: determining a target gain corresponding to each region based on initial response values of channels of the spectrum detection unit in the region for each region under the condition that the light distribution condition is non-uniform distribution of the regions; under the condition that the light distribution condition is that the areas are uniformly distributed and the wave bands are uniformly distributed, determining the target gain corresponding to each area based on the initial response value of each channel of any spectrum detection unit; and under the condition that the light distribution is uniformly distributed in the region and the wave bands are unevenly distributed, determining the target gain corresponding to the region and the adjacent region of the region based on the initial response value of each channel of the spectrum detection unit in the region.
In one embodiment, the gain determination module 1504 is further to: comparing initial response values of all channels of the spectrum detection unit in the region, and determining a maximum initial response value and a minimum initial response value; determining a target gain corresponding to the region based on the maximum initial response value and the first response threshold value and the minimum initial response value and the second response threshold value; the first response threshold is greater than the second response threshold.
In one embodiment, the gain determination module 1504 is further to: when the maximum initial response value is smaller than or equal to the first response threshold value and the minimum initial response value is larger than or equal to the second response value, determining the initial gain corresponding to the region as the target gain corresponding to the region; under the condition that the maximum initial response value is larger than the first response threshold value and the minimum initial response value is larger than the second response threshold value, determining a target gain corresponding to the region based on the maximum initial response value and the first response threshold value; and under the condition that the maximum initial response value is smaller than the first response threshold value and the minimum initial response value is smaller than the second response threshold value, determining the target gain corresponding to the region based on the minimum initial response value and the second response threshold value.
In one embodiment, the gain determination module 1504 is further to: for two adjacent areas, initial response values of all channels of a spectrum detection unit in one area are obtained; determining a target gain of a region, and a maximum initial response and a minimum initial response value corresponding to the spectrum detection unit based on initial response values of all channels of the spectrum detection unit; determining a ratio between the maximum initial response value and the minimum initial response value; and determining the target gain corresponding to the adjacent region of the region based on the ratio and the target gain of the region.
In one embodiment, the gain determination module 1504 is further to: determining a gain factor based on the ratio; and fusing the target gain corresponding to the region with the gain coefficient to obtain the target gain corresponding to the adjacent region of the region.
In one embodiment, the distribution determination module 1502 is further configured to: acquiring a reference image; the reference image comprises a plurality of image blocks, and each image block corresponds to one area; for each image block, determining a brightness statistic value corresponding to each color channel in the image block based on the brightness value corresponding to the color channel of each pixel point in the image block; determining initial gain of a region corresponding to the image block based on brightness statistic values corresponding to all color channels in the image block; the initial response value of each channel of each spectrum detection unit under the initial gain is obtained.
In one embodiment, the response value determination module 1506 is further to: under the condition that the light distribution condition is non-uniform distribution of the areas, aiming at each area, determining shooting parameters corresponding to the area based on target response values corresponding to all channels in the area; under the conditions that the light distribution is uniformly distributed in areas and the wave bands are uniformly distributed, determining shooting parameters corresponding to all areas based on target response values corresponding to all channels in any area; and under the conditions that the light distribution is uniformly distributed in the area and the wave bands are unevenly distributed, determining shooting parameters corresponding to the area and the adjacent area of the area based on target response values corresponding to all channels in the area and the adjacent area of the area.
In one embodiment, the response value determination module 1506 is further to: for each channel, comparing the target response value corresponding to the channel in the region and the target response value corresponding to the channel in the adjacent region of the region with a response threshold interval respectively, and determining the target response value in the response threshold interval as a candidate response value corresponding to the channel; determining a reference response value corresponding to the channel based on the candidate response value corresponding to the channel; and determining shooting parameters corresponding to the region and the adjacent regions of the region based on the reference response values corresponding to the channels.
In one embodiment, the response value determination module 1506 is further to: under the condition that the number of candidate response values corresponding to the channel is one, determining a gain ratio between the normalized gain and the target gain of the region corresponding to the candidate response values, and fusing the candidate response values and the gain ratio to obtain a reference response value corresponding to the channel; under the condition that the number of candidate response values corresponding to the channel is at least two, determining a gain ratio between the normalized gain and the target gain of the region corresponding to the candidate response values for each candidate response value, fusing the candidate response values and the gain ratio to obtain gain response values corresponding to the candidate response values, and carrying out weighted fusion on the gain response values corresponding to the candidate response values to obtain the reference response values corresponding to the channel.
In one embodiment, a spectral detector is provided that includes a plurality of regions, each region including at least one spectral detection unit therein, and the spectral detection units of each region sharing a gain amplification circuit.
In one embodiment, there is provided a spectrum detector including a plurality of regions including a central region and a plurality of direction regions, each direction region including 2 multi-channel spectrum detection units, the 2 multi-channel spectrum detection units included in the direction region sharing one gain amplification circuit; the center area comprises 1 multi-channel spectrum detection unit, and the spectrum detection unit in the center area uses a gain amplifying circuit.
In one embodiment, an electronic device is provided that includes a spectral detector including a plurality of regions, each region including at least one spectral detection unit, and the spectral detection units of each region sharing a gain amplification circuit; the processor is configured to execute any one of the above-described response value determination method and shooting parameter determination method.
In one embodiment, an electronic device is provided, and the electronic device further includes an image capturing module, where the image capturing module is configured to capture a target image based on the capturing parameters corresponding to each region when the processor determines that the capturing parameters corresponding to each region are obtained.
In one embodiment, an electronic device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 16. The electronic device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the electronic device is used to exchange information between the processor and the external device. The communication interface of the electronic device is used for conducting wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a response value determination method and/or a shooting parameter determination method. The display unit of the electronic device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the electronic equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 16 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application is applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Embodiments of the present application also provide a computer-readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform steps of a response value determination method.
Embodiments of the present application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform a response value determination method.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (20)

1. A response value determining method, comprising:
determining light distribution conditions based on initial response values of all channels of the plurality of spectrum detection units under initial gain; the spectrum detection units are distributed in a plurality of areas of the spectrum detector, and each area comprises at least one spectrum detection unit;
determining target gains corresponding to the areas based on the light distribution conditions;
And acquiring a target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region.
2. The method of claim 1, wherein the light distribution conditions include at least one of a light area distribution condition and a light band distribution condition; the determining the light distribution condition based on the initial response value of each channel of the plurality of spectrum detection units under the initial gain comprises the following steps:
determining the distribution condition of the light area based on initial response values corresponding to all channels of the spectrum detection unit in different areas; and/or
And determining the light wave band distribution condition based on the initial response values corresponding to the same channel in different areas.
3. The method according to claim 2, wherein only one spectral detection unit is included in each of the different regions; the determining the light area distribution condition based on the initial response values corresponding to the channels of the spectrum detection unit in different areas comprises the following steps:
for each region, determining a response ratio between an initial response value corresponding to a first channel and an initial response value corresponding to a second channel in the region; the first channel and the second channel are any two channels in a plurality of channels of the spectrum detection unit;
Under the condition that the difference value between the response ratio values corresponding to the areas is smaller than a difference threshold value, determining the first light distribution condition corresponding to the first channel and the second channel as uniform distribution; otherwise, determining the first light distribution conditions corresponding to the first channel and the second channel as non-uniform distribution;
under the condition that the first light distribution conditions are all uniformly distributed, determining the light area distribution conditions as area uniform distribution; otherwise, determining the light ray area distribution condition as area non-uniform distribution.
4. A method according to claim 3, wherein the area comprises at least two spectral detection units; before determining the response ratio between the initial response value corresponding to the first channel and the initial response value corresponding to the second channel in the area, the method further includes:
counting initial response values corresponding to the channels of each spectrum detection unit in the region aiming at each channel to obtain statistical response values corresponding to the channels;
the determining the response ratio between the initial response value corresponding to the first channel and the initial response value corresponding to the second channel in the area includes:
And determining a response ratio between the statistical response value corresponding to the first channel and the statistical response value corresponding to the second channel in the region.
5. The method of claim 2, wherein determining the light band distribution based on the corresponding initial response values of the same channel in different ones of the regions comprises:
for each channel, acquiring an initial response value corresponding to the channel of the spectrum detection unit in each region;
for each two adjacent areas, determining a difference value between initial response values corresponding to the channels in the two adjacent areas to obtain a response difference value;
determining a second light distribution condition corresponding to the channel based on the relation between the response difference values and the attenuation threshold values;
and determining the light wave band distribution condition based on the second light distribution condition corresponding to each channel.
6. The method of claim 1, wherein determining the target gain for each of the regions based on the light distribution conditions comprises:
determining a target gain corresponding to each region based on initial response values of channels of a spectrum detection unit in the region for each region under the condition that the light distribution condition is non-uniform distribution of the region;
Determining target gains corresponding to all the areas based on initial response values of all the channels of any one of the spectrum detection units under the condition that the light distribution conditions are that the areas are uniformly distributed and the wave bands are uniformly distributed;
and under the condition that the light distribution condition is that the areas are uniformly distributed and the wave bands are unevenly distributed, determining the target gains corresponding to the areas and the adjacent areas of the areas based on the initial response values of the channels of the spectrum detection unit in the areas.
7. The method of claim 6, wherein determining the target gain corresponding to the region based on the initial response values of the channels of the spectral detection unit in the region comprises:
comparing initial response values of all channels of the spectrum detection unit in the region, and determining a maximum initial response value and a minimum initial response value;
determining a target gain corresponding to the region based on the maximum initial response value and a first response threshold value and the minimum initial response value and a second response threshold value; the first response threshold is greater than the second response threshold.
8. The method of claim 7, wherein the determining the target gain for the region based on the maximum initial response value and a first response threshold and the minimum initial response value and a second response threshold comprises:
When the maximum initial response value is smaller than or equal to a first response threshold value and the minimum initial response value is larger than or equal to a second response value, determining the initial gain corresponding to the region as a target gain corresponding to the region;
if the maximum initial response value is greater than the first response threshold value and the minimum initial response value is greater than the second response threshold value, determining a target gain corresponding to the region based on the maximum initial response value and the first response threshold value;
and if the maximum initial response value is smaller than the first response threshold value and the minimum initial response value is smaller than the second response threshold value, determining a target gain corresponding to the region based on the minimum initial response value and the second response threshold value.
9. The method according to claim 6, wherein, in the case where the light distribution is a uniform distribution of regions and the wavelength bands are unevenly distributed, determining the target gain corresponding to the regions and the adjacent regions of the regions based on the initial response values of the channels of the spectrum detection unit in the regions comprises:
For two adjacent areas, initial response values of all channels of the spectrum detection unit in one area are obtained;
determining a target gain of the region based on initial response values of all channels of the spectrum detection unit, and a maximum initial response value and a minimum initial response value corresponding to the spectrum detection unit;
determining a ratio between the maximum initial response value and the minimum initial response value;
and determining the target gain corresponding to the adjacent area of the area based on the proportion and the target gain of the area.
10. The method of claim 9, wherein the determining a target gain for an adjacent region of the region based on the ratio and the target gain for the region comprises:
determining a gain factor based on the ratio;
and fusing the target gain corresponding to the region with the gain coefficient to obtain the target gain corresponding to the adjacent region of the region.
11. The method of claim 1, wherein prior to determining the light distribution based on the initial response values of the channels of the plurality of spectral detection units at the initial gain, further comprising:
Acquiring a reference image; the reference image comprises a plurality of image blocks, and each image block corresponds to one region;
for each image block, determining a brightness statistic value corresponding to each color channel in the image block based on the brightness value corresponding to each color channel of each pixel point in the image block;
determining the initial gain of the region corresponding to the image block based on the brightness statistic corresponding to each color channel in the image block;
and acquiring an initial response value of each channel of each spectrum detection unit under the initial gain.
12. The method according to claim 1, wherein after obtaining the target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region, further comprising:
under the condition that the light distribution condition is non-uniform distribution of areas, determining shooting parameters corresponding to each area based on target response values corresponding to all channels in the area;
under the conditions that the light distribution conditions are uniform distribution of areas and the wave bands are uniform distribution, determining shooting parameters corresponding to all the areas based on target response values corresponding to all the channels in any one of the areas;
And under the condition that the light distribution condition is that the areas are uniformly distributed and the wave bands are unevenly distributed, determining shooting parameters corresponding to the areas and the adjacent areas of the areas based on target response values corresponding to all channels in the areas and the adjacent areas of the areas.
13. The method of claim 12, wherein the determining the photographing parameters corresponding to the region and the neighboring region of the region based on the target response values corresponding to the respective channels in the region and the neighboring region of the region comprises:
for each channel, comparing a target response value corresponding to the channel in the area and a target response value corresponding to the channel in an adjacent area of the area with the response threshold interval respectively, and determining the target response value in the response threshold interval as a candidate response value corresponding to the channel;
determining a reference response value corresponding to the channel based on the candidate response value corresponding to the channel;
and determining shooting parameters corresponding to the region and the adjacent regions of the region based on the reference response values corresponding to the channels.
14. The method of claim 13, wherein the determining the reference response value corresponding to the channel based on the candidate response value corresponding to the channel comprises:
Under the condition that the number of candidate response values corresponding to the channel is one, determining a gain ratio between a normalized gain and a target gain of a region corresponding to the candidate response values, and fusing the candidate response values and the gain ratio to obtain a reference response value corresponding to the channel;
and under the condition that the number of candidate response values corresponding to the channel is at least two, determining a gain ratio between the normalized gain and a target gain of a region corresponding to the candidate response values for each candidate response value, fusing the candidate response values with the gain ratio to obtain gain response values corresponding to the candidate response values, and carrying out weighted fusion on the gain response values corresponding to the candidate response values to obtain a reference response value corresponding to the channel.
15. A response value determining apparatus, the apparatus comprising:
the distribution determining module is used for determining light distribution conditions based on initial response values of all channels of the plurality of spectrum detection units under initial gains; the spectrum detection units are distributed in a plurality of areas of the spectrum detector, and each area comprises at least one spectrum detection unit;
The gain determining module is used for determining target gains corresponding to the areas based on the light distribution condition;
and the response value determining module is used for acquiring a target response value corresponding to each channel of each spectrum detection unit in the region based on the target gain corresponding to the region.
16. A spectral detector comprising a plurality of regions, each region comprising at least one spectral detection unit, and the spectral detection units of each region sharing a gain amplification circuit.
17. The spectral detector of claim 16, wherein the plurality of regions comprises a central region and a plurality of directional regions, each of the directional regions comprising 2 multi-channel spectral detection units, the 2 multi-channel spectral detection units comprising the directional regions sharing a gain amplification circuit; the center region includes 1 multi-channel spectrum detection unit, and the spectrum detection unit in the center region uses one gain amplifying circuit.
18. An electronic device comprising a spectral detector and a processor, the spectral detector comprising a plurality of regions, each region comprising at least one spectral detection unit, the spectral detection units of each region sharing a gain amplification circuit; the processor is configured to perform the method of any one of claims 1 to 14.
19. The electronic device of claim 18, further comprising an imaging module configured to capture a target image based on the capture parameters corresponding to each of the regions if the processor determines the capture parameters corresponding to each of the regions.
20. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 14.
CN202311624842.XA 2023-11-29 2023-11-29 Response value determining method, device, electronic equipment and storage medium Pending CN117579947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311624842.XA CN117579947A (en) 2023-11-29 2023-11-29 Response value determining method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311624842.XA CN117579947A (en) 2023-11-29 2023-11-29 Response value determining method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117579947A true CN117579947A (en) 2024-02-20

Family

ID=89886096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311624842.XA Pending CN117579947A (en) 2023-11-29 2023-11-29 Response value determining method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117579947A (en)

Similar Documents

Publication Publication Date Title
US10630906B2 (en) Imaging control method, electronic device and computer readable storage medium
CN111586300B (en) Color correction method, device and readable storage medium
JP5859080B2 (en) Method and related apparatus for correcting color artifacts in images
US20100045819A1 (en) Detecting illuminant flicker
Nixon et al. Accurate device-independent colorimetric measurements using smartphones
CN111953955B (en) White balance compensation method and device and electronic equipment
TW201419853A (en) Image processor and image dead pixel detection method thereof
CN102023456B (en) Light metering weight regulating method and device thereof
CN105450932A (en) Backlight photographing method and device
CN105577982A (en) Image processing method and terminal
CN115225820B (en) Shooting parameter automatic adjustment method and device, storage medium and industrial camera
CN113639881A (en) Color temperature testing method and device, computer readable medium and electronic equipment
US20090309995A1 (en) Automatic white balance using non-uniform averaging
CN106412416A (en) Image processing method, device and system
CN112584057B (en) Illuminance detection method and device
CN111669572A (en) Camera module detection method and device, medium and electronic equipment
KR20170048454A (en) Image processing method and device
CN117579947A (en) Response value determining method, device, electronic equipment and storage medium
CN114216573B (en) Color temperature detection method and device, computer readable medium and electronic equipment
CN115170676A (en) Sensor calibration and image correction method and device, electronic equipment and storage medium
CN106231193A (en) A kind of image processing method and terminal
CN114866755B (en) Automatic white balance method and device, computer storage medium and electronic equipment
CN114710654B (en) Image processing method, device, readable storage medium and electronic equipment
CN111800626B (en) Photographing consistency evaluation method and device, mobile terminal and storage medium
CN118317204A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination