Color temperature detection method and device, equipment and storage medium
By storing the correspondence between the ambient illuminance interval and the exposure time, the color temperature sensor is controlled to expose different exposure times, solving the problem that electronic devices are difficult to achieve color temperature detection within a wide illuminance range, and achieving accurate color temperature detection.
Patent Information
- Application Number
- CN202510092866.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2045-01-20
AI Technical Summary
It is difficult for electronic devices to detect color temperatures within a wide ambient illumination range, especially when the light signal is too large or the light signal is too small when the light signal is too large, exceeding the voltage acquisition range.
By pre-storing the correspondence between the ambient illuminance interval and the exposure time, the color temperature sensor is controlled to expose different exposure times in sequence, collect the electrical signal parameters at each exposure time, and determine the target electrical signal parameters that match the preset signal processing range, thereby calculating the corresponding color temperature value.
Accurate color temperature detection within a wide ambient illumination range is achieved, avoiding the problem of signal exceeding the acquisition range and ensuring the effectiveness of color temperature detection.
Smart Images

Figure CN119666163A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to a color temperature detection method, device, equipment and storage medium. Background Art
[0002] At present, electronic devices such as smart phones and tablet computers are usually equipped with color temperature sensors. When the electronic device is in different environments or enters shooting mode, the brightness and color temperature of the electronic device can be adjusted according to the ambient illumination and ambient color temperature to enhance the user's viewing and shooting experience.
[0003] Under different usage environments, the ambient illumination may vary widely. For example, users may use electronic devices in a dark environment or in an environment with direct sunlight. Therefore, electronic devices need to be able to detect color temperature in a relatively wide range of ambient illumination.
[0004] However, when the electronic device performs color temperature detection under low ambient illumination, if the ambient illumination increases dramatically, the electrical signal generated by the color temperature sensor based on the stronger light signal is too large, exceeding the voltage acquisition range of the back end, and thus color temperature detection cannot be achieved. When the electronic device performs color temperature detection under high ambient illumination, if the ambient illumination decreases, the electrical signal generated by the color temperature sensor based on the weaker light signal is too small, below the acquisition range of the back end, making it impossible for the back end to recognize the electrical signal. That is, the electronic device cannot achieve color temperature detection under a wider ambient illumination range. Summary of the invention
[0005] The embodiments of the present application provide a color temperature detection method, device, equipment and storage medium, which can improve the technical problem in the related art that color temperature detection under a wide range of ambient illumination cannot be achieved.
[0006] In a first aspect, an embodiment of the present application provides a color temperature detection method, which is applied to an electronic device including a color temperature sensor; the method comprises:
[0007] Acquire multiple ambient illumination intervals and multiple exposure times corresponding thereto from the first corresponding relationship; wherein the first corresponding relationship is a corresponding relationship between the ambient illumination intervals and the exposure times;
[0008] Collecting electrical signal parameters generated by the color temperature sensor at each exposure time;
[0009] Determine a target electrical signal parameter that matches a preset signal quantity processing range from a plurality of electrical signal parameters;
[0010] The corresponding color temperature value is determined based on the target electrical signal parameter.
[0011] In a second aspect, an embodiment of the present application provides a color temperature detection device, the device comprising:
[0012] An acquisition module, used to acquire a plurality of ambient illumination intervals and a plurality of exposure times respectively corresponding thereto from a first corresponding relationship; wherein the first corresponding relationship is a corresponding relationship between the ambient illumination intervals and the exposure times;
[0013] An acquisition module, used for acquiring electrical signal parameters generated by the color temperature sensor at each exposure time;
[0014] A matching module, used to determine a target electrical signal parameter that matches a preset signal processing range from a plurality of electrical signal parameters;
[0015] The determination module is used to determine the corresponding color temperature value based on the target electrical signal parameter.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
[0017] When the processor executes the computer program instructions, the color temperature detection method of the first aspect is implemented.
[0018] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the color temperature detection method of the first aspect is implemented.
[0019] Compared with the prior art, the color temperature detection method, device, equipment and storage medium provided in the embodiment of the present application, the electronic device pre-stores a first corresponding relationship, and the first corresponding relationship is the corresponding relationship between the ambient illumination interval and the exposure time. After determining the exposure time corresponding to each ambient illumination interval from the first corresponding relationship, the color temperature sensor can be controlled to expose in accordance with each exposure time in turn, and collect the electrical signal parameters generated under each exposure time. Among the multiple electrical signal parameters, the target electrical signal parameter matching the preset signal quantity processing range can be determined. Since the target electrical signal parameter is within the signal quantity processing range and does not exceed the voltage acquisition interval of the back end, the back end can obtain the accurate target electrical signal parameter, and based on the target electrical signal parameter, the current corresponding color temperature value is calculated using the relevant algorithm of color temperature detection. In the above-mentioned embodiment, by sequentially exposing multiple different exposure times, the target electrical signal parameter within the acquisition range of the back end can be screened out, and then the corresponding color temperature value is determined according to the target electrical signal parameter. Even when the range of change of the ambient illumination is wide, the color temperature detection function can be realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a flowchart of a color temperature detection method provided by an embodiment of the present application;
[0022] Figure 2 This is a partial flow chart of a color temperature detection method provided by another embodiment of the present application;
[0023] Figure 3 This is a partial flow chart of a color temperature detection method provided by another embodiment of the present application;
[0024] Figure 4 This is one of the flow charts of a color temperature detection method provided in yet another embodiment of the present application;
[0025] Figure 5 This is a second flow chart of a color temperature detection method provided in yet another embodiment of the present application;
[0026] Figure 6 This is a third flow chart of a color temperature detection method provided in yet another embodiment of the present application;
[0027] Figure 7 This is a fourth flow chart of a color temperature detection method provided in yet another embodiment of the present application;
[0028] Figure 8 This is a fifth flow chart of a color temperature detection method provided in yet another embodiment of the present application;
[0029] Fig. 9 This is a fifth flow chart of a color temperature detection method provided in yet another embodiment of the present application;
[0030] Fig.10 is a schematic diagram of the structure of a color temperature sensor provided in an embodiment of the present application;
[0031] Fig.11 is a structural schematic diagram of a color temperature detection device provided in an embodiment of the present application;
[0032] Fig.12 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0033] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0034] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0035] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The embodiments will be described in detail below in conjunction with the accompanying drawings.
[0036] At present, electronic devices such as smart phones and tablet computers are usually equipped with color temperature sensors. When the electronic device is in different environments or enters shooting mode, the brightness and color temperature of the electronic device can be adjusted according to the ambient illumination and ambient color temperature to enhance the user's viewing and shooting experience.
[0037] Under different usage environments, the ambient illumination may vary widely. For example, users may use electronic devices in a dark environment or in an environment with direct sunlight. Therefore, electronic devices need to be able to detect color temperature in a relatively wide range of ambient illumination, so as to adjust the brightness and color temperature according to the detected color temperature value.
[0038] However, when the electronic device performs color temperature detection under low ambient illumination, if the ambient illumination increases sharply, the electrical signal generated by the color temperature sensor based on the stronger light signal is too large, exceeding the voltage acquisition range of the back end, and thus color temperature detection cannot be achieved. When the electronic device performs color temperature detection under high ambient illumination, if the ambient illumination decreases, the electrical signal generated by the color temperature sensor based on the weaker light signal is too small, below the acquisition range of the back end, making it impossible for the back end to recognize the electrical signal.
[0039] As an example, taking the ambient illumination of 100000 lux as an example, the number of channels for each color in the color temperature sensor is set to 1, and the exposure time is 1.41ms. At this time, the voltage signal generated by the red channel is 0.6V, and the voltage signals generated by the green, blue and white channels are 1.12V, 0.83V and 4.50V.
[0040] In another example, the exposure time is kept unchanged and the ambient illumination is set to 30 lux. At this time, the voltage signals generated by the red, green, blue and white channels are 0.00018V, 0.000336V, 0.000249V and 0.00135V respectively. It can be understood that under the same exposure time, when the ambient illumination is 100000 lux, the detected voltage signal can reach 4.5V, while when the ambient illumination is 30 lux, the detected voltage signal is only 0.00018V, which is far below the sampling lower limit of the voltage sampling port of the electronic device, and thus the signal acquisition and color temperature detection functions cannot be realized. That is, the existing electronic devices cannot realize color temperature detection under a wider range of ambient illumination.
[0041] In order to solve at least one of the above technical problems, the embodiments of the present application provide a color temperature detection method, device, equipment and storage medium. The color temperature detection method provided by the embodiments of the present application is first introduced below.
[0042] Figure 1 A schematic flow chart of a color temperature detection method provided by an embodiment of the present application is shown. The color temperature detection method is applied to an electronic device including a color temperature sensor, and the method may include the following steps:
[0043] S110, acquiring a plurality of ambient illumination intervals and a plurality of exposure times respectively corresponding thereto from a first corresponding relationship; wherein the first corresponding relationship is a corresponding relationship between the ambient illumination intervals and the exposure times;
[0044] S120, collecting electrical signal parameters generated by the color temperature sensor at each exposure time;
[0045] S130, determining a target electrical signal parameter that matches a preset signal quantity processing range from a plurality of electrical signal parameters;
[0046] S140, determining a corresponding color temperature value based on the target electrical signal parameter.
[0047] In this embodiment, the electronic device pre-stores a first corresponding relationship, which is a corresponding relationship between the ambient illumination interval and the exposure time. After determining the exposure time corresponding to each ambient illumination interval from the first corresponding relationship, the color temperature sensor can be controlled to expose in accordance with each exposure time in turn, and collect the electrical signal parameters generated at each exposure time. Among the multiple electrical signal parameters, the target electrical signal parameter that matches the preset signal quantity processing range can be determined. Since the target electrical signal parameter is within the signal quantity processing range and does not exceed the voltage acquisition interval of the back end, the back end can obtain accurate target electrical signal parameters, and based on the target electrical signal parameters, the current corresponding color temperature value is calculated using the color temperature detection related algorithm. In the above embodiment, by sequentially exposing multiple different exposure times, the target electrical signal parameters within the acquisition range of the back end can be screened out, and then the corresponding color temperature value is determined according to the target electrical signal parameters. Even when the range of ambient illumination changes is wide, the color temperature detection function can be realized.
[0048] The specific implementation methods of the above steps are introduced below.
[0049] In S110, the electronic device can realize the color temperature detection function under different ambient illuminations through the color temperature sensor. When performing color temperature detection, the electronic device can obtain a pre-generated first correspondence, which includes a correspondence between multiple ambient illumination intervals and exposure times.
[0050] The electronic device can obtain multiple ambient illumination intervals and multiple exposure times corresponding thereto from the first corresponding relationship, that is, the exposure time corresponding to each ambient illumination interval.
[0051] The multiple ambient illumination intervals in the first corresponding relationship should at least cover the ambient illumination range in which the electronic device can maintain normal operation. For example, if the ambient illumination range in which the electronic device can normally implement color temperature detection is 30lux-100000lux, then the set of multiple ambient illumination intervals should include the range of 30lux-100000lux. In one example, the multiple ambient illumination intervals can be 30lux-140lux, 140lux-500lux, 500lux-2000lux, 2000lux-7000lux, 7000lux-30000lux, and 30000lux-100000lux.
[0052] It should be noted that the number of the above-mentioned ambient illumination intervals and the range of each interval are examples. The specific ambient illumination intervals and ranges need to be set according to the actual hardware parameters of the color temperature sensor and are not specifically limited here.
[0053] Please refer to Figure 2 In some embodiments, the color temperature sensor includes at least two color channels; before S110, the following may be included:
[0054] S210, obtaining an upper detection limit value and a lower detection limit value of the ambient illumination;
[0055] S220, when the initial ambient illumination is the detection upper limit value, obtaining electrical signal parameters generated by each color channel of the color temperature sensor at different exposure times;
[0056] S230, determining an exposure time interval that satisfies a signal range condition according to the electrical signal parameters at each exposure time; wherein the signal range condition is that the electrical signal parameters generated by the channels of each color are within a preset signal quantity processing range;
[0057] S240, determining a target exposure time within the exposure time interval, and determining a minimum ambient illumination that satisfies a signal range condition when the exposure time is the target exposure time;
[0058] S250, generating a target ambient illumination interval according to the initial ambient illumination and the minimum ambient illumination;
[0059] S260, taking the lower limit of the current target ambient illumination interval as the new initial ambient illumination, returning to S220, obtaining the next target ambient illumination interval and its corresponding target exposure time, until the minimum ambient illumination is less than or equal to the detection lower limit;
[0060] S270: Generate a first corresponding relationship based on a plurality of target environment illumination intervals and their corresponding target exposure times.
[0061] Before acquiring the first corresponding relationship, the first corresponding relationship may be generated in advance by using the following implementation manner.
[0062] In this embodiment, the electronic device can obtain the detection upper limit value and the detection lower limit value of the preset ambient illumination, and use the detection upper limit value as the initial ambient illumination of the first target ambient illumination interval. By continuously adjusting the exposure time and detecting the electrical signal parameters of the channel of each color at each exposure time, the exposure time interval can be obtained. Under the initial ambient illumination and within the exposure time interval, the electrical signal parameters of the channel of any color can meet the signal range condition. After selecting the target exposure time from the exposure time interval, the ambient illumination can be continuously adjusted under the target exposure time to determine the minimum ambient illumination when the electrical signal parameters of the channel of any color can meet the signal range condition under the target exposure time. The first target ambient illumination interval can be formed based on the initial ambient illumination and the minimum ambient illumination. After determining a target ambient illumination interval, the minimum ambient illumination of the previous target ambient illumination interval can be used as the initial ambient illumination of the next target ambient illumination interval, and the above operation is continuously performed in a loop to obtain multiple target ambient illumination intervals in sequence, until the minimum ambient illumination of the obtained target ambient illumination interval reaches the detection lower limit value and stops. A first corresponding relationship may be generated according to the obtained multiple target environment illumination intervals and the target exposure time corresponding to each target environment illumination interval.
[0063] In S210, an upper detection limit value and a lower detection limit value of the ambient illumination may be determined according to an ambient illumination range in which the electronic device can maintain normal operation.
[0064] As an example, the detection upper limit value of the ambient illumination may be 100,000 lux, and the detection lower limit value may be 30 lux.
[0065] In S220, the ambient illumination can be adjusted by adjusting the external light source. Based on the detection upper limit value of the ambient illumination, the initial ambient illumination can be set as the detection upper limit value.
[0066] Under the initial ambient illumination, the electronic device can obtain the electrical signal parameters generated by the color temperature sensor for each color channel under different exposure times.
[0067] It is understandable that for each color channel in the color temperature sensor, the electrical signal parameter generated can be a photocurrent signal or a voltage signal converted from a photocurrent signal. For example, the back-end sampling port connected to the color temperature sensor can directly read the photocurrent signal as an electrical signal parameter, or can convert the photocurrent signal into a voltage signal and then read the corresponding voltage signal. In the following embodiments, the voltage signal obtained by photocurrent conversion is used as the electrical signal parameter. The signal size of the voltage signal has a positive correlation with the exposure time of the color temperature sensor. That is, when the ambient illumination remains unchanged, the longer the exposure time, the larger the voltage signal generated by each color channel.
[0068] In S230, after determining the electrical signal parameters generated by each color channel at each exposure time, an exposure time interval that satisfies a signal range condition can be determined accordingly. The signal range condition is that the electrical signal parameters generated by each color channel are within a preset signal processing range.
[0069] As an optional example, the electronic device includes multiple sampling ports connected to channels of multiple colors of the color temperature sensor, and each sampling port can receive the electrical signal parameters generated by the channel of the same color. Taking the electrical signal parameter as a voltage signal as an example, the signal processing range of the voltage signal that can be normally collected by the sampling port can be 0.5V-4.5V. The voltage signal that exceeds the signal processing range may have the problem of low sampling accuracy or overvoltage damage to the device.
[0070] At each exposure time, the electrical signal parameters generated by each color channel can be determined. If at a certain exposure time, the electrical signal parameters generated by all color channels are within the preset signal processing range, then the exposure time can meet the signal range condition.
[0071] As an optional implementation, the light output colors of the electronic device may include red, green, blue and white. Taking red, green, blue and white as single channels as an example, when the initial ambient illumination is 100,000 lux and the exposure time is 1.41 ms, the voltage signal generated by the red single channel is 0.60 V, and the voltage signals generated by the green, blue and white single channels are 1.12 V, 0.83 V and 4.50 V respectively. When the signal processing range is 0.5 V-4.5 V, the electrical signal parameters generated by the four colors are all within the preset signal processing range, and the exposure time of 1.41 ms can meet the signal range condition.
[0072] Similarly, under multiple different exposure times, one or more exposure times that meet the signal range condition can be determined. If there are multiple exposure times that meet the signal range condition, the exposure time interval that meets the signal range condition can be determined based on the minimum time and the maximum time among the multiple exposure times.
[0073] It should be noted that among the multiple exposure times, at the minimum time and maximum time that meet the signal range condition, the electrical signal parameters generated by the channels of all colors in the color temperature sensor are within the preset signal processing range, because the electrical signal parameters generated by the channels have a positive correlation with the exposure time. Therefore, for each color channel, at any exposure time between the minimum time and the maximum time, the electrical signal parameters generated must also be within the preset signal processing range. Therefore, based on the minimum time and the maximum time that meet the signal range condition, the exposure time interval can be determined.
[0074] In S240, after determining the exposure time interval that satisfies the signal range condition, a target exposure time may be determined within the exposure time interval, and a minimum ambient illumination that satisfies the signal range condition under the target exposure time may be determined.
[0075] It is understandable that, only when there are at least two exposure times that meet the signal range condition can the exposure time interval be determined, and the target exposure time can be further determined from the exposure time interval. If there is only one exposure time that meets the signal range condition, the exposure time can be directly determined as the target exposure time.
[0076] In some embodiments, the target exposure time is a maximum value within the exposure time interval.
[0077] Since any exposure time within the exposure time interval can meet the requirements, and the longer the exposure time, the larger the voltage signal generated by the channel. Therefore, when the maximum value is selected as the target exposure time within the exposure time interval, the voltage signal generated by each channel can approach the upper limit of the signal processing range, thereby avoiding the voltage signal generated by each channel under the target exposure time being too low, making full use of the signal processing range, and improving the signal acquisition accuracy.
[0078] Under the target exposure time, when the ambient illumination is the initial ambient illumination, the electrical signal parameters generated by each color channel are within the preset signal processing range. For example, when the initial ambient illumination is 100000 lux and the target exposure time is 0.94ms, the voltage signal generated by each color channel is between 0.5V and 4.5V.
[0079] After determining the target exposure time, the ambient illumination can be adjusted to gradually reduce the ambient illumination. When the voltage signal generated by each color channel at the target exposure time is still between 0.5V and 4.5V under the reduced ambient illumination, it means that the reduced ambient illumination can also meet the signal range condition. At this time, the ambient illumination can be further reduced until the voltage signal generated by at least one color channel is lower than 0.5V under a certain ambient illumination. At this time, it can be determined that the ambient illumination does not meet the signal range condition, and the previous ambient illumination that meets the signal range condition is determined as the minimum ambient illumination. For example, when the target exposure time is 0.94ms, if the ambient illumination is reduced to 30000 lux, the voltage signal generated by each color channel is still between 0.5V and 4.5V; but after continuing to reduce the ambient illumination, the voltage signal generated by at least one color channel is lower than 0.5V, then 30000 lux can be determined as the minimum ambient illumination that meets the signal range condition.
[0080] Please refer to Figure 3 In some embodiments, the above S240 may include:
[0081] S310, when the exposure time is the target exposure time, obtaining electrical signal parameters generated by the color temperature sensor under different ambient illuminations for each color channel;
[0082] S320, screening out multiple ambient illuminations that meet the signal range condition according to the electrical signal parameters under each ambient illumination;
[0083] S330: Determine the minimum ambient illumination as the minimum value of multiple ambient illuminations that meet the signal range condition.
[0084] In this embodiment, after determining the target exposure time, the exposure time can be set to the target exposure time, and the electrical signal parameters generated by the channel of each color in the color temperature sensor can be obtained under different ambient illuminations. According to the electrical signal parameters under each ambient illumination, some electrical signal parameters that meet the signal range condition can be screened out, and the partial ambient illuminations corresponding to the partial electrical signal parameters are multiple ambient illuminations that meet the signal range condition. After obtaining multiple ambient illuminations that meet the signal range condition, the minimum ambient illumination can be selected as the minimum ambient illumination of the target ambient illumination interval.
[0085] In S310, after determining the target exposure time, the exposure time can be set to the target exposure time, and the ambient illumination can be adjusted to obtain the electrical signal parameters generated by each color channel of the color temperature sensor under different ambient illuminations. For example, after determining that the target exposure time is 0.94ms and the initial ambient illumination is 100000 lux, the signal size of the voltage signal generated by each color channel of the color temperature sensor can be obtained under different ambient illuminations such as 90000 lux, 60000 lux, and 30000 lux.
[0086] In S320, after matching the signal range conditions for the electrical signal parameters under each ambient illumination, multiple ambient illuminations that meet the signal range conditions can be screened out. For example, under 90,000 lux, the signal size of the voltage signal generated by the channel of each color is within the range of 0.5V-4.5V, and 90,000 lux is the ambient illumination that meets the signal range conditions. Similarly, the above method can be used to determine that 60,000 lux and 30,000 lux are also ambient illuminations that meet the signal range conditions. When the ambient illumination is lower than 30,000 lux, there is at least one color channel whose signal size of the voltage signal is lower than 0.5V. Finally, it can be determined that 90,000 lux, 60,000 lux, and 30,000 lux are multiple ambient illuminations that meet the signal range conditions.
[0087] It should be noted that the above-mentioned ambient illuminations of 90,000 lux, 60,000 lux, and 30,000 lux are just examples, and the specific ambient illumination can be set according to actual needs and is not specifically limited here.
[0088] In S330, after determining multiple ambient illuminations that satisfy the signal range condition, the minimum value of the multiple ambient illuminations may be determined as the minimum ambient illumination that satisfies the signal range condition. For example, in the above-mentioned exemplary embodiment, the minimum ambient illumination may be determined to be 30,000 lux.
[0089] In S250 , after the minimum ambient illumination is determined, a target ambient illumination interval may be generated based on the initial ambient illumination and the minimum ambient illumination.
[0090] Taking the above implementation as an example, when the initial ambient illumination is 100,000 lux and the minimum ambient illumination is 30,000 lux, the target ambient illumination range is 100,000 lux-30,000 lux.
[0091] In some embodiments, after the above S250, the following steps may also be included:
[0092] According to the target exposure time and the electrical signal parameters corresponding to the color temperature sensor under different ambient illuminations, a second corresponding relationship within the target ambient illumination range is generated by fitting; wherein the second corresponding relationship is a corresponding relationship between the electrical signal parameters and the ambient illumination.
[0093] In this embodiment, after determining the target ambient illumination range, the electrical signal parameters corresponding to the color temperature sensor at the target exposure time can be obtained under different ambient illuminations within the target ambient illumination range. Based on the electrical signal parameters under each ambient illumination, a second corresponding relationship within the target ambient illumination range can be fitted and generated.
[0094] Taking the red channel in the color temperature sensor as an example, after determining that the target ambient illumination range is 100000lux-30000lux, the voltage signal generated by the red channel under ambient illuminations of 90000lux, 60000lux, and 30000lux can be obtained under the target exposure time of 0.94ms. Since the generated voltage signal has a positive correlation with the ambient illumination when the exposure time remains unchanged, the corresponding relationship between the electrical signal parameters and the ambient illumination can be fitted based on multiple ambient illuminations and the corresponding voltage signals. The above fitting method can be linear fitting or nonlinear fitting.
[0095] The above implementation can obtain the second corresponding relationship of the red channel within the target environment illumination range. The same implementation can also be used to obtain the second corresponding relationship of other color channels in the color temperature sensor.
[0096] It is understandable that after obtaining the second correspondence between the color channels in the color temperature sensor, during the operation of the electronic device, the current corresponding ambient illumination can be determined based on the second correspondence according to the actually acquired electrical signal parameters.
[0097] When determining the minimum ambient illumination, part of the ambient illumination within the target ambient illumination range has been tested, and when fitting to generate the second correspondence, the previous test data can be directly obtained. For example, when determining that the minimum ambient illumination is 30,000 lux, the voltage signals generated by each color channel under 90,000 lux, 60,000 lux, and 30,000 lux have been tested, and the second correspondence corresponding to each color can be directly fitted based on the test data.
[0098] It should be noted that if more data under ambient illumination are needed when fitting the second corresponding relationship, for example, the voltage signals generated by each color channel under 40,000 lux and 70,000 lux are needed, the ambient illumination can also be adjusted to 40,000 lux and 70,000 lux, and the electrical signal parameters generated by each color channel can be obtained.
[0099] In S260, after determining the target ambient illumination interval, the lower limit value of the current target ambient illumination interval can be used as the new initial ambient illumination, and the above S220-S250 can be returned to execute to obtain the next target ambient illumination interval and its corresponding exposure time, until the minimum ambient illumination of the target ambient illumination interval is less than or equal to the detection lower limit value.
[0100] As an example, after determining the first target ambient illumination interval of 100000lux-30000lux based on the detection upper limit value, 30000lux can be used as the new initial ambient illumination to determine the exposure time interval that meets the signal range condition under the new ambient illumination, and the target exposure time of 3.51ms can be selected within this exposure time interval. Based on the target exposure time of 3.51ms, the ambient illumination can be gradually reduced, and it can be determined whether the voltage signal generated by the channel of each color under each ambient illumination is within the signal quantity processing range, and the minimum ambient illumination under the target exposure time of 3.51ms is determined to be 7000lux. At this time, it can be determined that the second target ambient illumination interval is 30000lux-7000lux, and the target exposure time corresponding to this target ambient illumination interval is 3.51ms.
[0101] Since the minimum ambient illumination of 7000 lux in the second target ambient illumination interval is still greater than the detection lower limit of 30 lux, 7000 lux can be used as the initial ambient illumination of the signal in the third target ambient illumination interval. Continue to perform the above steps to obtain the third target ambient illumination interval of 7000 lux-2000 lux, and the corresponding target exposure time is 13.1 ms.
[0102] By looping through the above steps, multiple target ambient illumination intervals can be obtained, namely 2000lux-500lux, 500lux-140lux, and 140lux-30lux, and the corresponding target exposure times can be 49.2ms, 184ms, and 689ms, respectively. At this time, since the lowest ambient illumination of the target ambient illumination interval 140lux-30lux is consistent with the detection lower limit, the loop stops.
[0103] In S270, after a plurality of target environment illumination intervals and their corresponding target exposure times are determined, a first corresponding relationship may be generated.
[0104] In S120, according to the multiple exposure times in the first corresponding relationship, the color temperature sensor is controlled to perform exposure according to the time length of each exposure time, and the electrical signal parameters generated by the color temperature sensor at each exposure time are collected.
[0105] Please refer to Figure 4 In some embodiments, the color temperature sensor includes a first sensing subunit and a second sensing subunit, and the first sensing subunit and the second sensing subunit include at least two color channels; the above S120 may include:
[0106] S410, dividing a plurality of ambient illumination intervals into a first group and a second group according to corresponding exposure times;
[0107] S420, controlling the first sensor subunit to expose according to the exposure time corresponding to the ambient illumination interval of the first group, and controlling the second sensor subunit to expose according to the exposure time corresponding to the ambient illumination interval of the second group;
[0108] S430, collecting electrical signal parameters generated by the first sensor subunit at each exposure time and electrical signal parameters generated by the second sensor subunit at each exposure time.
[0109] In this embodiment, the color temperature sensor includes two types of sensor subunits. After dividing multiple ambient illumination intervals into two groups according to the size of the exposure time, the first sensor subunit can be controlled to expose according to the duration of each exposure time in the first group, and the second sensor subunit can be controlled to expose according to each exposure time in the second group. Since the first sensor subunit and the second sensor subunit can be exposed at the same time, the total exposure time is the larger value of the sum of the exposure time of the first group and the sum of the exposure time of the second group. Compared with the implementation method using a single sensor subunit, the exposure time can be effectively reduced and the color temperature detection efficiency can be improved.
[0110] In S410, the color temperature sensor may include two types of sensing subunits, namely a first sensing subunit and a second sensing subunit. The first sensing subunit and the second sensing subunit each include at least two color channels.
[0111] After a plurality of ambient illumination intervals and a plurality of exposure times are determined according to the first corresponding relationship, the plurality of ambient illumination intervals may be divided into a first group and a second group according to the corresponding exposure times.
[0112] Please refer to Figure 5 In some embodiments, the above S410 may include:
[0113] S411, obtaining exposure times corresponding to a plurality of ambient illumination intervals;
[0114] S412, dividing multiple environmental illumination intervals into a first group and a second group so that the difference between the total exposure time of the first group and the total exposure time of the second group is minimized; wherein the total exposure time is the sum of multiple exposure times.
[0115] In this embodiment, after obtaining the exposure times corresponding to multiple ambient illumination intervals, they can be grouped according to the exposure time of each ambient illumination interval, so that after being divided into a first group and a second group, the difference in the total exposure time of the two groups is minimized, that is, the total exposure time of the first group and the total exposure time of the second group are as close as possible through group division.
[0116] In S411, when a plurality of ambient illumination intervals are divided into groups, the exposure time corresponding to each ambient illumination interval may be firstly obtained.
[0117] In S412, after determining the exposure time corresponding to each ambient illumination interval, multiple ambient illumination intervals may be divided into a first group and a second group so that the difference between the total exposure time of the first group and the total exposure time of the second group is minimized, wherein the total exposure time is the sum of multiple exposure times.
[0118] As an optional implementation, the multiple ambient illumination intervals in the first corresponding relationship may include 30lux-140lux, 140lux-500lux, 500lux-2000lux, 2000lux-7000lux, 7000lux-30000lux, 30000lux-100000lux, and the corresponding exposure times are 689ms, 184ms, 49.2ms, 13.1ms, 3.51ms, and 0.94ms, respectively.
[0119] Since the exposure time of 689ms in the ambient illumination interval of 30lux-140lux is greater than the sum of the exposure times of other ambient illumination intervals, in order to minimize the difference between the total exposure time of the first group and the total exposure time of the second group, the ambient illumination interval of 30lux-140lux can be divided into the first group, and the remaining ambient illumination intervals can be divided into the second group.
[0120] In some embodiments, the number of channels of the same color in the first sensor subunit and the second sensor subunit is consistent.
[0121] In this embodiment, the first sensor subunit and the second sensor subunit both include channels of multiple colors, and the number of channels of each color is the same. For example, if the first sensor subunit includes 8 red channels, the second sensor subunit also includes 8 red channels. At this time, since the number of red channels is the same, under the same exposure time, the magnitude of the voltage signal formed by the red channels of the two sensor subunits is also consistent. That is, the second corresponding relationship of the red channels of the two sensor subunits is also consistent.
[0122] In S420, after multiple ambient illumination intervals are divided into a first group and a second group, the first sensor subunit can be controlled to expose according to the exposure time corresponding to the ambient illumination interval of the first group, and the second sensor subunit can be controlled to expose according to the exposure time corresponding to the ambient illumination interval of the second group.
[0123] Since the first sensor subunit and the second sensor subunit can be exposed at the same time, compared with the method of using a single sensor subunit to expose in sequence according to the exposure time corresponding to each ambient illumination interval, the total exposure time can be saved and the color temperature detection efficiency can be improved.
[0124] It can be understood that, taking the above implementation as an example, if only a single sensor subunit is provided, the total exposure time corresponding to each ambient illumination interval is:
[0125] 689+184+49.2+13.1+3.51+0.94=939.75ms;
[0126] In the case of using two sensor sub-units and group exposure, the ambient illumination interval in the first group is 30lux-140lux, and the ambient illumination interval in the second group is the remaining ambient illumination interval. Then, the total exposure time of the first sensor sub-unit is 689ms, and the total exposure time of the second sensor sub-unit is:
[0127] 184+49.2+13.1+3.51+0.94=250.75ms;
[0128] Since the first sensor subunit and the second sensor subunit can operate independently, the total exposure time after group operation is the larger of the two exposure total times, i.e. 689ms. Compared with the total exposure time of 939.75ms using a single sensor subunit, the exposure time can be significantly reduced and the color temperature detection efficiency can be improved.
[0129] In S430, at each exposure time corresponding to the first group, the electrical signal parameters generated by the first sensor subunit may be collected; at each exposure time corresponding to the second group, the electrical signal parameters generated by the second sensor subunit may be collected.
[0130] It should be noted that the color temperature sensor can also include three or more sensor sub-units. According to the number of sensor sub-units, multiple ambient illumination intervals can be divided into multiple groups. Each sensor sub-unit can operate independently and expose the ambient illumination intervals contained in different groups for corresponding exposure times, thereby reducing the total exposure time.
[0131] Please refer to Figure 6 In some embodiments, the color temperature sensor includes a third sensing subunit and a fourth sensing subunit, and the third sensing subunit and the fourth sensing subunit include channels of at least two colors; the above S120 may include:
[0132] S510, dividing a plurality of ambient illumination intervals into a third group and a fourth group according to corresponding exposure times;
[0133] S520, controlling the third sensor sub-unit to perform exposure according to the exposure time corresponding to the ambient illumination interval of the third group;
[0134] S530, controlling the third sensor sub-unit and the fourth sensor sub-unit to perform exposure according to the updated exposure time; wherein the updated exposure time corresponding to each ambient illumination interval in the fourth group is lower than the exposure time corresponding to each ambient illumination interval.
[0135] In this embodiment, the color temperature sensor includes two sensor subunits. After dividing a plurality of ambient illumination intervals into two groups according to the size of the exposure time, the third sensor subunit can be controlled to be exposed according to the duration of each exposure time in the third group. For an ambient illumination interval with a longer exposure time, it can be divided into a fourth group, and the third sensor subunit and the fourth sensor subunit can be controlled to be exposed at the same time. At this time, the electrical signal parameter obtained by the electronic device is the sum of the electrical signal parameter of the third sensor subunit and the electrical signal parameter of the fourth sensor subunit. In order to avoid the obtained voltage signal exceeding the signal processing range, the exposure time can be reduced to obtain an updated exposure time. Under the updated exposure time, since the third sensor subunit and the fourth sensor subunit generate electrical signal parameters at the same time, the same signal amount can be obtained through less exposure time, and for an ambient illumination interval with a longer exposure time, the total exposure time can be effectively saved by reducing the exposure time, thereby improving the efficiency of color temperature detection.
[0136] In S510, the color temperature sensor may include two types of sensing subunits, namely a third sensing subunit and a fourth sensing subunit. The third sensing subunit and the fourth sensing subunit may include at least two color channels.
[0137] After the multiple environmental illumination intervals and the multiple exposure times are determined according to the first corresponding relationship, the multiple environmental illumination intervals may be divided into a third group and a fourth group according to the corresponding exposure times.
[0138] Please refer to Figure 7 In some embodiments, the above S510 may include:
[0139] S511, obtaining exposure times corresponding to a plurality of ambient illumination intervals;
[0140] S512: divide the ambient illumination intervals whose exposure time is less than the duration threshold into a third group, and divide the ambient illumination intervals whose exposure time is greater than or equal to the duration threshold into a fourth group.
[0141] In this embodiment, after obtaining the exposure times corresponding to multiple ambient illumination intervals, they can be grouped according to the exposure time of each ambient illumination interval, so that the ambient illumination interval with shorter exposure time is divided into the third group, and the ambient illumination interval with longer exposure time is divided into the fourth group.
[0142] In S511, when a plurality of ambient illumination intervals are divided into groups, the exposure time corresponding to each ambient illumination interval may be firstly obtained.
[0143] In S512, after determining the exposure time corresponding to each ambient illumination interval, the ambient illumination intervals with exposure time less than the duration threshold can be divided into the third group, and the ambient illumination intervals with exposure time greater than or equal to the duration threshold can be divided into the fourth group.
[0144] As an optional implementation, the multiple ambient illumination intervals in the first corresponding relationship may include 30lux-140lux, 140lux-500lux, 500lux-2000lux, 2000lux-7000lux, 7000lux-30000lux, 30000lux-100000lux, and the corresponding exposure times are 689ms, 184ms, 49.2ms, 13.1ms, 3.51ms, and 0.94ms, respectively.
[0145] The preset duration threshold may be 200 ms, then multiple ambient illumination intervals with exposure time less than the duration threshold are divided into the third group, and the ambient illumination interval 30 lux-140 lux with exposure time greater than the duration threshold is divided into the fourth group.
[0146] In S520, after the plurality of environmental illumination intervals are divided into a third group and a fourth group, the third sensing sub-unit may be controlled to perform exposure according to the exposure time corresponding to the environmental illumination interval of the third group.
[0147] Taking the above implementation as an example, the exposure times corresponding to the various ambient illumination intervals in the third group are 184ms, 49.2ms, 13.1ms, 3.51ms, and 0.94ms, respectively. The total exposure time of the third sensor subunit to complete the third group is:
[0148] 184+49.2+13.1+3.51+0.94=250.75ms;
[0149] In S530, after the third sensor subunit completes the exposure corresponding to each ambient illumination interval in the third group, the third sensor subunit and the fourth sensor subunit can be controlled to perform exposure together according to the updated exposure time corresponding to each ambient illumination interval in the fourth group. The updated exposure time can be set to be lower than the exposure time corresponding to the ambient illumination interval of the fourth group.
[0150] Taking the above implementation as an example, the exposure time corresponding to the ambient illumination range of 30lux-140lux of the fourth group is 689ms, which is set based on the electrical signal parameters generated when a single third sensor subunit or a single fourth sensor subunit is exposed to meet the signal quantity processing range.
[0151] In the above embodiment, since the third sensor sub-unit and the fourth sensor sub-unit are exposed together, under the same exposure time and the same ambient illumination, the voltage signal finally generated will be greater than the voltage signal generated by a single sensor sub-unit, which may cause the generated voltage signal to exceed the signal quantity processing range. Therefore, in order to avoid the generated voltage signal being too large, when the third sensor sub-unit and the fourth sensor sub-unit are exposed together, a shorter exposure time, that is, an updated exposure time, needs to be used.
[0152] In some embodiments, the number of channels of the same color in the third sensor sub-unit and the fourth sensor sub-unit is the same, and the updated exposure time is half of the exposure time corresponding to the ambient illumination interval of the fourth group.
[0153] In this embodiment, the number of channels of the same color in the third sensor subunit and the fourth sensor subunit is the same, that is, the voltage signals finally generated by the third sensor subunit and the fourth sensor subunit under the same exposure time and the same ambient illumination will also be consistent.
[0154] Therefore, in order to generate the same voltage signal as when a single sensor subunit is operating when the third sensor subunit and the fourth sensor subunit are exposed together, the updated exposure time can be set to half of the exposure time corresponding to the ambient illumination interval of the fourth group. For example, if the exposure time corresponding to the ambient illumination interval of 30lux-140lux of the fourth group is 689ms under a single sensor subunit, the updated exposure time is 345ms.
[0155] Taking the above implementation as an example, the total exposure duration is the sum of the exposure duration of the third group and the exposure duration of the fourth group, that is:
[0156] 250.75+345=595.75ms;
[0157] By comparing the exposure time with the total exposure time of 939.75 ms for a single sensor unit to sequentially expose each ambient illumination interval, it can be seen that the above implementation can also reduce the total exposure time in a single color temperature detection process and improve the color temperature detection efficiency.
[0158] In some embodiments, the number of channels of the same color in the third sensor sub-unit and the fourth sensor sub-unit is inconsistent.
[0159] In this embodiment, when the number of channels of the same color in two sensor sub-units is inconsistent, it is necessary to calculate the conversion coefficient between the original exposure time and the updated exposure time based on the number of channels of each color of the third sensor sub-unit and the number of channels of each color of the fourth sensor sub-unit, and calculate the updated exposure time corresponding to each exposure time in the fourth group based on the conversion coefficient.
[0160] In S130, after collecting the electrical signal parameters generated by the color temperature sensor under the exposure time corresponding to each ambient illumination interval, a target electrical signal parameter matching the preset signal quantity processing range can be determined from the multiple electrical signal parameters.
[0161] At each exposure time, each color channel of the color temperature sensor can generate a corresponding voltage signal. Taking the color temperature sensor including red, green, blue and white channels as an example, at each exposure time, the red, green, blue and white channels can generate four voltage signals respectively. After matching the four voltage signals with the preset signal processing range, it can be determined whether at least one of the four voltage signals exceeds the signal processing range.
[0162] If at least one voltage signal exceeds the signal quantity processing range, the current ambient illumination does not belong to the ambient illumination interval corresponding to the exposure time.
[0163] After determining that the current ambient illumination does not belong to the ambient illumination interval corresponding to a certain exposure time, the four voltage signals at the next exposure time can be matched with the preset signal quantity processing range until the four voltage signals at a certain exposure time are all within the signal quantity processing range, at which time the four voltage signals can be determined as target electrical signal parameters.
[0164] If the four voltage signals under a certain exposure time are all within the signal quantity processing range, it means that the current ambient illumination belongs to the ambient illumination range corresponding to the exposure time.
[0165] Please refer to Figure 8 In some embodiments, the electrical signal parameter includes signal voltages corresponding to at least two color channels respectively; the above S130 may include:
[0166] S610, matching the signal voltage corresponding to the channels of different colors in each electrical signal parameter with a preset signal quantity processing range;
[0167] S620, when there is at least one signal voltage outside the preset signal quantity processing range, determining that the corresponding electrical signal parameter does not match the preset signal quantity processing range;
[0168] S630: When all signal voltages are within a preset signal processing range, determine that the corresponding electrical signal parameters match the preset signal processing range.
[0169] In this embodiment, after obtaining the electrical signal parameters at each exposure time, the signal voltages corresponding to the channels of different colors contained in each electrical signal parameter can be matched with the preset signal quantity processing range. If at least one signal voltage among the multiple signal voltages is outside the preset signal quantity processing range, the electrical signal parameter does not match the preset signal quantity processing range. At this time, the signal voltages in the electrical signal parameters at the next exposure time can be matched until all the signal voltages in a certain electrical signal parameter are within the preset signal quantity processing range. At this time, the electrical signal parameter can be determined as the target electrical signal parameter.
[0170] In S610, the electrical signal parameters include signal voltages corresponding to at least two color channels respectively. The signal voltages may be converted from photocurrent signals generated by light sensors in the channels of each color.
[0171] Based on the photocurrent signal generated by the optical sensor, the back-end sampling port connected to the channel can directly read the photocurrent signal as an electrical signal parameter, or convert the photocurrent signal into a voltage signal for reading. In the following embodiments, the voltage signal is used as the electrical signal parameter for description.
[0172] According to the electrical signal parameters corresponding to each exposure time, the signal voltages corresponding to channels of different colors in the electrical signal parameters can be matched with a preset signal quantity processing range.
[0173] In S620, taking the electrical signal parameters under a single exposure time as an example, after the signal voltages corresponding to the channels of multiple colors are matched with the preset signal processing range respectively, the matching result of each signal voltage can be determined. If at least one signal voltage among the multiple signal voltages is outside the preset signal processing range, it means that the signal voltage does not match the preset signal processing range. For example, when the signal processing range is 0.5V-4.5V, if the signal voltage is greater than 4.5V or less than 0.5V, it means that the signal voltage does not match the preset signal processing range.
[0174] When there is at least one signal voltage that does not match the preset signal quantity processing range, it can be determined that the electrical signal parameter under the exposure time does not match the preset signal quantity processing range.
[0175] In S630, taking the electrical signal parameter under a single exposure time as an example, if all signal voltages in the electrical signal parameter are within the preset signal processing range, it can be determined that the electrical signal parameter under the exposure time matches the preset signal processing range. The matched electrical signal parameter is the target electrical signal parameter.
[0176] As an optional implementation, after the corresponding electrical signal parameters are collected at each exposure time, the electrical signal parameters can be directly matched with the preset signal quantity processing range. If all voltage signals in the electrical signal parameters are within the signal quantity processing range, the electrical signal parameters can be directly determined as the target electrical signal parameters.
[0177] When performing exposure at each exposure time in sequence, if the electrical signal parameter corresponding to a certain exposure time is determined to be the target electrical signal parameter, the exposure operation can be terminated in advance, and there is no need to perform exposure according to the subsequent exposure time. For example, when the exposure times corresponding to multiple ambient illumination intervals are 0.94ms, 3.51ms, 13.1ms, 49.2ms, 184ms, and 689ms, respectively, if the color temperature sensor has completed exposures with exposure times of 0.94ms, 3.51ms, 13.1ms, and 49.2ms, and the electrical signal parameter generated at an exposure time of 49.2ms is within the signal quantity processing range, it can be directly determined that the electrical signal parameter is the target electrical signal parameter. After determining the target electrical signal parameter, the exposure operation can be stopped, that is, there is no need to perform subsequent exposures of 184ms and 689ms, thereby reducing the exposure time, improving the color temperature detection efficiency, and increasing the service life of the sensor.
[0178] Please refer to Fig. 9 In some embodiments, after the above S130, the following steps may also be included:
[0179] S710, determining a corresponding first ambient illumination interval based on the target electrical signal parameter;
[0180] S720, determining a target corresponding relationship corresponding to the first ambient illumination interval from the plurality of second corresponding relationships;
[0181] S730, determining the current ambient illumination based on the target correspondence relationship and the target electrical signal parameter.
[0182] In this embodiment, after determining the target electrical signal parameter, the exposure time corresponding to the target electrical signal parameter can be determined, and based on the exposure time, the first ambient illumination interval corresponding to the exposure time can be determined from the first corresponding relationship. According to the first ambient illumination interval, the target corresponding relationship corresponding to the first ambient illumination interval can be determined from multiple second corresponding relationships. Based on the target corresponding relationship and the target electrical signal parameter, the current ambient illumination can be obtained.
[0183] In S710, after determining the target electrical signal parameter from the plurality of electrical signal parameters, the ambient illumination interval corresponding to the exposure time can be determined based on the exposure time corresponding to the target electrical signal parameter according to the first corresponding relationship, that is, the first ambient illumination interval corresponding to the target electrical signal parameter is determined. For example, after determining the target electrical signal parameter, if the exposure time corresponding to the target electrical signal parameter is 3.51 ms, then based on the first corresponding relationship, the first ambient illumination interval corresponding to the target electrical signal parameter can be determined to be 30000 lux-7000 lux.
[0184] In S720, before color temperature detection is performed, second correspondences in various ambient illumination intervals have been generated in advance. After a plurality of second correspondences are acquired, a target correspondence corresponding to the first ambient illumination interval can be determined from the second correspondences.
[0185] In S730, the second correspondence is the correspondence between the voltage signal size in the electrical signal parameter and the ambient illumination. After determining the target correspondence from multiple second correspondences, the ambient illumination corresponding to the target electrical signal parameter can be obtained based on the target correspondence as the current ambient illumination.
[0186] In S140 , after the target electrical signal parameter is determined, a corresponding color temperature value may be determined based on the target electrical signal parameter.
[0187] It is understandable that when the target electrical signal parameter matches the signal processing range and the corresponding ambient illumination range in the current environment can be determined, the electronic device can detect the color temperature value based on the signal of the collected target electrical signal parameter. For example, the color temperature sensor may include channels of multiple colors, and the electrical signal parameter includes the voltage signal generated by the channel of each color. According to the voltage signals corresponding to each color, the light intensity of different light colors can be determined, and then the color temperature value of the display screen can be determined.
[0188] In some embodiments, the color temperature sensor includes at least one red channel, at least one green channel, at least one blue channel, and at least one white channel.
[0189] In this embodiment, the color temperature sensor may include channels of multiple colors, for example, at least one red channel, at least one green channel, at least one blue channel, and at least one white channel. The light intensity of the corresponding light output color can be measured using the channel of each color. For example, the display module of the electronic device may include multiple light-emitting pixels, such as red pixels, green pixels, and blue pixels. The red channel in the color temperature sensor can detect the light intensity of the red pixel, the green channel and the blue channel can detect the light intensity of the green pixel and the blue pixel respectively, and the white channel can detect the light intensity of the white light formed by the red, green, and blue pixels.
[0190] As an optional implementation, the color temperature sensor may include a red channel, a green channel, a blue channel, and a white channel.
[0191] When the initial ambient illumination is 100000 lux, the target exposure time is 1.41ms, which can make the voltage signal generated by the white channel 4.5V. At this time, the voltage signals generated by the red, green and blue channels are 0.6V, 1.12V and 0.83V, all within the sampling voltage range of 0.5V-4.5V.
[0192] When the ambient illuminance is gradually reduced from the initial ambient illuminance of 100,000 lux, the voltage signals generated by each color channel also gradually decrease. When the ambient illuminance is reduced to 78,400 lux, the voltage signal generated by the red channel is reduced from 0.6V to 0.5V. At this time, if the ambient illuminance is further reduced, the voltage signal generated by the red channel will be lower than the sampling voltage range, resulting in abnormal sampling data. Therefore, when the initial ambient illuminance is 100,000 lux, the first target ambient illuminance range can be 100,000 lux-78,400 lux.
[0193] It can be understood that for the green channel, when the ambient illumination is reduced to 41900 lux, the generated voltage signal is reduced to 0.5 V, and for the blue channel and the white channel, when the ambient illumination is reduced to 56800 lux and 10500 lux respectively, the generated voltage signal is reduced to 0.5 V. Since the voltage signals generated by the four color channels need to be within the sampling voltage range, the target ambient illumination range needs to be based on the ambient illumination of the red channel when generating a 0.5V signal as the minimum ambient illumination.
[0194] After determining the first target ambient illumination interval, the initial ambient illumination of the second target ambient illumination interval can be determined as 78400 lux. At this time, by adjusting the exposure time, it can be determined that when the exposure time is 1.8ms, the voltage signal generated by the white channel is 4.5V. At this time, the above steps can be continued to cycle, and by gradually reducing the ambient illumination, the ambient illumination corresponding to the voltage signal generated by the red channel is determined to be 0.5V, which is used as the minimum ambient illumination of the second target ambient illumination interval.
[0195] It should be noted that when the number of channels for each color mentioned above is one, since the voltage signals generated by each channel are quite different, in order to make the voltage signals generated by each channel within the range that can be processed by the back-end signal, the target environment illumination interval finally divided has a smaller range, and the target environment illumination interval is further back, the smaller the range is, which eventually leads to too many target environment illumination intervals being divided, greatly increasing the total exposure time. Therefore, when the voltage signal generated by a channel of a certain color is low, a multi-channel parallel connection method can be used to increase the number of channels of that color, thereby reducing the difference in voltage signals generated by channels of each color, so that a single target environment illumination interval can have a larger range.
[0196] As an example, taking the ambient illumination of 100000 lux as an example, the number of channels for each color in the color temperature sensor is set to 1, and the exposure time is 1.41ms. At this time, the voltage signal generated by the red channel is 0.6V, and the voltage signals generated by the green, blue and white channels are 1.12V, 0.83V and 4.50V.
[0197] In another example, the exposure time is kept unchanged and the ambient illumination is set to 30 lux. At this time, the voltage signals generated by the red, green, blue and white channels are 0.00018V, 0.000336V, 0.000249V and 0.00135V respectively. It can be understood that under the same exposure time, when the ambient illumination is 100000 lux, the detected voltage signal can reach 4.5V, while when the ambient illumination is 30 lux, the detected voltage signal is only 0.00018V, which is far below the sampling lower limit of the sampling port of the electronic device, so that the signal acquisition and color temperature detection functions cannot be realized. That is, the existing implementation method cannot realize color temperature detection under a wider range of ambient illumination.
[0198] In some embodiments, the color temperature sensor includes a red channel, b green channels, c blue channels, and d white channels; wherein,
[0199] a>b, a>c, a>d, b>d, c>d.
[0200] In this embodiment, the number of channels of each color in the color temperature sensor may not be completely consistent. When the number of red channels is a, the number of green channels is b, the number of blue channels is c, and the number of white channels is d, the quantitative relationship of the channels of different colors can be determined according to the magnitude of the signal generated by the channels of each color under the same ambient illumination and exposure time.
[0201] As an optional implementation, taking the ambient illumination of 100000 lux as an example, the number of channels for each color in the color temperature sensor is set to 1, and the exposure time is 1.41ms. At this time, the voltage signal generated by the red channel is 0.6V, and the voltage signals generated by the green, blue and white channels are 1.12V, 0.83V and 4.50V respectively.
[0202] According to the magnitude of the voltage signal generated by the single channel of each color, it can be known that the signal generated by a single white channel is greater than the signal generated by the other single-color channels, and the signal generated by a single red channel is less than the signal generated by the other single-color channels. Therefore, in order to reduce the difference between the signal amounts generated by each channel, multiple channels can be set in parallel for the color that generates a lower signal amount.
[0203] As an optional example, the number of channels of each color mentioned above may satisfy the following relationship:
[0204] a>b, a>c, a>d, b>d, c>d;
[0205] In this embodiment, since it can be determined in the above implementation that under the same exposure time and ambient illumination, the signal amount generated by a single white channel is the largest, and the signal amount generated by a single red channel is the smallest. Therefore, in order to make the signal amounts generated by channels of different colors closer, the number of red channels can be set to be the largest and the number of white channels to be the smallest.
[0206] In some embodiments, b <c。
[0207] According to the above implementation, under the same exposure time and ambient illumination, the voltage signal 0.83V generated by a single blue channel is smaller than the voltage signal 1.12V generated by a single green channel. Therefore, in order to make the signal amounts generated by the blue channel and the green channel closer, the number b of the green channels can be set to be smaller than the number c of the blue channels.
[0208] In some embodiments, under the same ambient illumination and the same exposure time, the amount of electrical signals generated by a red channels is smaller than the amount of electrical signals generated by d white channels.
[0209] In this embodiment, since the amount of electrical signal generated by a single white channel is greater than the amount of electrical signal generated by other monochrome channels, the exposure time in each ambient illumination interval can be determined based on the amount of electrical signal generated by the white channel. That is, at the exposure time corresponding to the ambient illumination interval, the amount of electrical signal generated by the white channel is a voltage signal, and the voltage signal is lower than the preset signal amount processing range, that is, lower than the sampling upper limit value of 4.5V of the sampling port.
[0210] After the exposure time is determined based on the amount of electrical signals generated by the d white channels, if the amount of electrical signals generated by the a red channels is greater than the amount of electrical signals generated by the d white channels, it is possible that the voltage signals generated by the a red channels exceed the signal processing range, thereby failing to collect the voltage signals of the red channels. In order to avoid the above situation, when setting the number of red channels a and the number of white channels d, the amount of electrical signals generated by each red channel and the amount of electrical signals generated by each white channel should be taken into account, so that under the same exposure time and ambient illumination, the amount of electrical signals generated by the a red channels in parallel is less than the amount of electrical signals generated by the d white channels.
[0211] Similarly, under the same ambient illumination and the same exposure time, when determining the number b of green channels and the number c of blue channels, it should be ensured that the amount of electrical signals generated by b green channels is smaller than the amount of electrical signals generated by d white channels, and the amount of electrical signals generated by c blue channels is smaller than the amount of electrical signals generated by d white channels.
[0212] In some embodiments, the color temperature sensor may include a 16-channel sensor, including 8 red channels, 2 green channels, 5 blue channels, and 1 white channel. Fig.10 , Fig.10 A schematic diagram of the structure of light-sensing components corresponding to each color channel in a partial display area of an electronic device is shown.
[0213] like Fig.10 As shown, the R channel is connected to a light sensor that can recognize red light, and there are 8 R channels in total; the G channel is connected to a light sensor that can recognize green light, the blue channel is connected to a light sensor that can recognize red light, and the C channel is connected to a light sensor that can recognize white light. The number of G channels, B channels and C channels are 2, 5 and 1 respectively.
[0214] In this embodiment, the color temperature sensor may be a color temperature sensor with 16 channels, each channel may be connected to a corresponding light sensor. The 16 channels may include 8 red channels, 2 green channels, 5 blue channels and 1 white channel, that is, the color temperature sensor includes 8 red sensors, 2 green sensors, 5 blue sensors and 1 white sensor.
[0215] It should be noted that the above-mentioned layout positions of each light sensor and each color channel are examples. The actual layout positions of each light sensor and each color channel can be adjusted according to actual needs. For example, 16 light sensors can be arranged in the same row, the same column or in an array, etc., which is not specifically limited here.
[0216] As an optional implementation, when the color temperature sensor includes a 16-channel sensor, according to the above implementation, multiple ambient illumination intervals can be determined to be 30lux-140lux, 140lux-500lux, 500lux-2000lux, 2000lux-7000lux, 7000lux-30000lux, 30000lux-100000lux, and the corresponding exposure times are 689ms, 184ms, 49.2ms, 13.1ms, 3.51ms, and 0.94ms, respectively.
[0217] When the above 16-channel sensor is used to perform exposure in sequence according to various exposure times, the total exposure time is at least the sum of the exposure times, that is, 940 ms.
[0218] As an optional implementation, in order to reduce the total exposure time in a single color temperature detection process, the color temperature sensor can be configured to include two 16-channel sensors. The two 16-channel sensors can each include 8 red channels, 2 green channels, 5 blue channels, and 1 white channel.
[0219] In an ambient illumination range with a short exposure time, the color temperature sensor can use only a single 16-channel sensor for exposure. For example, in the range of 30,000 lux-100,000 lux, the exposure time of a single 16-channel sensor is 0.94 ms.
[0220] In the ambient illumination range with a longer exposure time, the color temperature sensor can simultaneously open two 16-channel sensors for exposure, doubling the number of channels for each color. After the number of channels for each color has doubled, in order to avoid the amount of electrical signals generated by the channels of each color exceeding the signal processing range, the exposure time can be set to half of the original. For example, in the range of 30lux-140lux, two 16-channel sensors are used for exposure, and the exposure time can be reduced from the original 689ms to 345ms, thereby reducing the total exposure time by 344ms. That is, for lower ambient illumination ranges, multiple 16-channel sensors can be used to run simultaneously to reduce the exposure time in the low ambient illumination range, thereby reducing the total exposure time in a single color temperature detection process. Improve the efficiency of color temperature detection.
[0221] Based on the same inventive concept, the present application also provides a color temperature detection device. Fig.11 Provide detailed explanation.
[0222] Fig.11 1 is a schematic diagram of the structure of a color temperature detection device 1100 provided in an embodiment of the present application.
[0223] like Fig.11 As shown, the color temperature detection device 1100 may include:
[0224] The acquisition module 1101 is used to acquire a plurality of ambient illumination intervals and a plurality of exposure times corresponding thereto from a first corresponding relationship; wherein the first corresponding relationship is a corresponding relationship between the ambient illumination intervals and the exposure times;
[0225] An acquisition module 1102 is used to acquire electrical signal parameters generated by the color temperature sensor at each exposure time;
[0226] A matching module 1103, used to determine a target electrical signal parameter that matches a preset signal processing range from a plurality of electrical signal parameters;
[0227] The determination module 1104 is used to determine the corresponding color temperature value based on the target electrical signal parameter.
[0228] Fig.12 The hardware structure diagram of the electronic device provided in the embodiment of the present application is shown. The electronic device can be at least one of a computer, a server and a document generation dedicated device. The electronic device includes a processor 1201 and a memory 1202 storing computer program instructions.
[0229] Specifically, the processor 1201 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0230] The memory 1202 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1202 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 1202 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 1202 may be inside or outside the electronic device. In a particular embodiment, the memory 1202 is a non-volatile solid-state memory.
[0231] The memory 1202 may include a read-only memory (ROM), a flash memory device, a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory 1202 includes a tangible (non-transitory) computer-readable storage medium (e.g., a memory device) of one or more software that may be encoded with computer-executable instructions and that, when executed (e.g., by one or more processors), is operable to perform the operations described with reference to the methods according to the above aspects of the present disclosure.
[0232] The processor 1201 implements any one of the color temperature detection methods in the above embodiments by reading and executing computer program instructions stored in the memory 1202 .
[0233] In one example, the electronic device may further include a communication interface 1203 and a bus 1210. Fig.12 As shown, the processor 1201, the memory 1202, and the communication interface 1203 are connected via a bus 1210 and communicate with each other.
[0234] The communication interface 1203 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0235] Bus 1210 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1210 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0236] The electronic device can be based on the color temperature detection method to achieve the combination Figures 1 to 11 A color temperature detection method and device are described.
[0237] In addition, in combination with the color temperature detection method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the color temperature detection methods in the above embodiment is implemented.
[0238] In addition, an embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0239] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0240] It should be understood that in the embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0241] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A color temperature detection method, characterized in that: Applicable to an electronic device including a color temperature sensor; the method comprises: Acquire multiple ambient illumination intervals and multiple exposure times corresponding thereto from a first corresponding relationship; wherein the first corresponding relationship is a corresponding relationship between ambient illumination intervals and exposure times; Collecting electrical signal parameters generated by the color temperature sensor at each exposure time; Determine a target electrical signal parameter that matches a preset signal quantity processing range from the plurality of electrical signal parameters; A corresponding color temperature value is determined based on the target electrical signal parameter.
2. The color temperature detection method according to claim 1, characterized in that: The color temperature sensor includes at least two color channels; before acquiring multiple ambient illumination intervals and their corresponding multiple exposure times from the first corresponding relationship, the method further includes: Obtain the detection upper limit value and the detection lower limit value of the ambient illumination; When the initial ambient illumination is the detection upper limit value, obtaining electrical signal parameters generated by the channel of each color under different exposure times of the color temperature sensor; According to the electrical signal parameters at each exposure time, determining an exposure time interval that meets a signal range condition; wherein the signal range condition is that the electrical signal parameters generated by the channel of each color are within a preset signal quantity processing range; Determine a target exposure time within the exposure time interval, and determine the exposure time to be the minimum ambient illumination that satisfies the signal range condition when the exposure time is the target exposure time; Generating a target ambient illumination interval according to the initial ambient illumination and the minimum ambient illumination; Taking the lower limit value of the current target ambient illumination interval as the new initial ambient illumination, returning to step: obtaining the electrical signal parameters generated by the channel of each color under different exposure times of the color temperature sensor, obtaining the next target ambient illumination interval and its corresponding target exposure time, until the lowest ambient illumination is less than or equal to the detection lower limit value; The first corresponding relationship is generated based on a plurality of target environment illumination intervals and their corresponding target exposure times.
3. The color temperature detection method according to claim 2, characterized in that: The step of determining the minimum ambient illumination that satisfies the signal range condition when the exposure time is the target exposure time includes: When the exposure time is the target exposure time, obtaining electrical signal parameters generated by the color temperature sensor under different ambient illuminations for each color channel; According to the electrical signal parameters under each ambient illumination, a plurality of ambient illuminations satisfying the signal range condition are screened out; The minimum ambient illumination is determined to be a minimum value among a plurality of ambient illuminations that satisfy a signal range condition.
4. The color temperature detection method according to claim 3, characterized in that: After generating the target ambient illumination interval according to the initial ambient illumination and the minimum ambient illumination, the method further includes: According to the target exposure time and the electrical signal parameters corresponding to the color temperature sensor under different ambient illuminations, a second corresponding relationship within the target ambient illumination range is fitted and generated; wherein the second corresponding relationship is a corresponding relationship between the electrical signal parameters and the ambient illumination.
5. The color temperature detection method according to claim 4, characterized in that: After determining the target electrical signal parameter matching the preset signal processing range from the plurality of electrical signal parameters, the method further includes: Based on the target electrical signal parameter, determining a corresponding first ambient illumination interval; Determine a target corresponding relationship corresponding to the first ambient illumination interval from a plurality of second corresponding relationships; Based on the target corresponding relationship and the target electrical signal parameter, the current ambient illumination is determined.
6. The color temperature detection method according to claim 2, characterized in that: The target exposure time is a maximum value within the exposure time interval.
7. The color temperature detection method according to claim 2, characterized in that: The electrical signal parameters include signal voltages corresponding to channels of at least two colors respectively; the step of determining a target electrical signal parameter matching a preset signal quantity processing range from the plurality of electrical signal parameters includes: Match the signal voltage corresponding to the channels of different colors in each electrical signal parameter with the preset signal quantity processing range; In the case where there is at least one signal voltage outside the preset signal quantity processing range, determining that the corresponding electrical signal parameter does not match the preset signal quantity processing range; When all signal voltages are within the preset signal quantity processing range, it is determined that the corresponding electrical signal parameters match the preset signal quantity processing range.
8. The color temperature detection method according to claim 1, characterized in that: The color temperature sensor includes a first sensing subunit and a second sensing subunit, wherein the first sensing subunit and the second sensing subunit include channels of at least two colors; The collecting of electrical signal parameters generated by the color temperature sensor at each exposure time includes: Dividing the plurality of ambient illumination intervals into a first group and a second group according to corresponding exposure times; Controlling the first sensor subunit to expose according to the exposure time corresponding to the environmental illumination interval of the first group, and controlling the second sensor subunit to expose according to the exposure time corresponding to the environmental illumination interval of the second group; The electrical signal parameters generated by the first sensor subunit at each exposure time and the electrical signal parameters generated by the second sensor subunit at each exposure time are collected.
9. The color temperature detection method according to claim 8, characterized in that: The step of dividing the plurality of ambient illumination intervals into a first group and a second group according to corresponding exposure times includes: Obtain exposure times corresponding to multiple ambient illumination intervals; A plurality of ambient illumination intervals are divided into a first group and a second group so that a difference between a total exposure time of the first group and a total exposure time of the second group is minimized; wherein the total exposure time is a sum of a plurality of exposure times.
10. The color temperature detection method according to claim 9, characterized in that: The number of channels of the same color in the first sensor subunit and the second sensor subunit is consistent.
11. The color temperature detection method according to claim 1, characterized in that: The color temperature sensor includes a third sensing subunit and a fourth sensing subunit, and the third sensing subunit and the fourth sensing subunit include channels of at least two colors; The collecting of electrical signal parameters generated by the color temperature sensor at each exposure time includes: Dividing the multiple environmental illumination intervals into a third group and a fourth group according to corresponding exposure times; Controlling the third sensor sub-unit to perform exposure according to the exposure time corresponding to the ambient illumination interval of the third group; The third sensor subunit and the fourth sensor subunit are controlled to perform exposure according to the updated exposure time; wherein the updated exposure time corresponding to each ambient illumination interval in the fourth group is lower than the exposure time corresponding to each ambient illumination interval.
12. The color temperature detection method according to claim 11, characterized in that: The number of channels of the same color in the third sensor sub-unit is consistent with that in the fourth sensor sub-unit, and the updated exposure time is half of the exposure time corresponding to the ambient illumination interval of the fourth group.
13. The color temperature detection method according to claim 11, characterized in that: The dividing the multiple ambient illumination intervals into a third group and a fourth group according to the corresponding exposure times includes: Obtain exposure times corresponding to multiple ambient illumination intervals; The ambient illumination intervals whose exposure time is less than the duration threshold are divided into a third group, and the ambient illumination intervals whose exposure time is greater than or equal to the duration threshold are divided into a fourth group.
14. The color temperature detection method according to claim 13, characterized in that: The number of channels of the same color in the third sensor subunit and the fourth sensor subunit is inconsistent.
15. The color temperature detection method according to claim 1, characterized in that: The color temperature sensor includes at least one red channel, at least one green channel, at least one blue channel and at least one white channel.
16. The color temperature detection method according to claim 1, characterized in that: The color temperature sensor includes a red channel, b green channels, c blue channels and d white channels; wherein, a>b, a>c, a>d, b>d, c>d.
17. The color temperature detection method according to claim 16, characterized in that: b <c。 18. The color temperature detection method according to claim 16, characterized in that: Under the same ambient illumination and exposure time, the amount of electrical signals generated by a red channel is smaller than the amount of electrical signals generated by d white channels.
19. The color temperature detection method according to claim 16, characterized in that: The color temperature sensor is a 16-channel sensor, including 8 red channels, 2 green channels, 5 blue channels and 1 white channel.
20. A color temperature detection device, characterized in that: The device comprises: An acquisition module, used to acquire a plurality of ambient illumination intervals and a plurality of exposure times respectively corresponding thereto from a first corresponding relationship; wherein the first corresponding relationship is a corresponding relationship between the ambient illumination intervals and the exposure times; An acquisition module, used for acquiring electrical signal parameters generated by the color temperature sensor at each exposure time; A matching module, used to determine a target electrical signal parameter that matches a preset signal quantity processing range from the plurality of electrical signal parameters; A determination module is used to determine a corresponding color temperature value based on the target electrical signal parameter.
21. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the color temperature detection method according to any one of claims 1 to 19 is implemented.
22. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the color temperature detection method according to any one of claims 1 to 19 is implemented.
Citation Information
Patent Citations
Ambient light intensity detection method and device, storage medium and electronic device
CN107945770A
Camera, day and night mode switching method and device thereof, equipment and medium
CN111726514A
Ambient brightness determination method and device, medium, product and camera
CN113556477A
Environmental illumination measurement method and device, electronic equipment and readable storage medium
CN114894304A
Automatic exposure method, electronic equipment and storage medium
CN115589538A