Photosensitive method and device, electronic equipment and storage medium
By adjusting the photosensitive parameters in the photosensitive module, the problem of accuracy drift of photosensitive data is solved, more accurate environmental brightness detection is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202310994697.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2025-02-18
AI Technical Summary
The accuracy of the photosensitive data of the photosensitive module is prone to drift, resulting in inaccurate environmental brightness detection.
When the channel value sensed by the light-sensitive channel of the light-sensitive module is within the preset range, determine whether the photosensitive parameter is set to the specified value and adjust it when it is not set to ensure that the photosensitive parameter is placed at the specified value, so that the light-sensitive parameter is re-enacted Induction to improve the accuracy of light-sensitive data.
By adjusting the photosensitive parameters, the accuracy of the photosensitive data can be ensured, thereby improving the user experience and system accuracy.
Smart Images

Figure CN119469389A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic technology, and in particular to a photosensing method, device, electronic equipment and storage medium. Background Art
[0002] The photosensitive module can be used for light sensing, for example, the ambient brightness can be obtained according to the light sensing of the photosensitive module. However, it is found in practice that the accuracy of the light sensing data of the photosensitive module is prone to drift.
[0003] In view of this, improving the accuracy of the light sensing data of the photosensitive module is an issue that needs to be urgently addressed. Summary of the invention
[0004] The present disclosure provides a photosensitive method, device, electronic device and storage medium. According to a first aspect of an embodiment of the present disclosure, a photosensitive method is provided, comprising:
[0005] When a first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range, determining whether a light sensing parameter of the light sensing module is set to a specified value;
[0006] If the photosensitive parameter is not set to a specified value, setting the photosensitive parameter of the photosensitive module to a specified value;
[0007] Using the light sensing module to re-perform light sensing based on the light sensing parameter of the specified value to obtain a second channel value;
[0008] The first light sensing data is determined according to the second channel value.
[0009] Optionally, the photosensitivity parameter includes at least one of the following:
[0010] The gain of the light sensing channel;
[0011] The single light sensing integration duration of the light sensing channel.
[0012] Optionally, the photosensitive parameters include: the gain of the photosensitive channel;
[0013] When the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value includes:
[0014] When the gain of the light sensing channel is not set to the specified first value, the gain of the light sensing channel of the light sensing module is set to the first value.
[0015] Optionally, the gain of the photosensitive channel is set with different gears; wherein the gear level is positively correlated with the value of the gain, and the first value corresponds to the highest gear of the gain; or, the gain of the photosensitive channel is set with different gears; wherein the gear level is negatively correlated with the value of the gain, and the first value corresponds to the lowest gear of the gain.
[0016] Optionally, the photosensitive parameters include: the gain of the photosensitive channel and the single photosensitive integration time of the photosensitive channel;
[0017] When the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value includes:
[0018] When the gain is set to a specified first value and the channel value sensed by at least one light sensing channel of the light sensing module is within the preset range, the single light sensing integration time length of the light sensing module is set to a specified second value.
[0019] Optionally, the photosensitive parameters include: a single photosensitive integration time of the photosensitive channel;
[0020] When the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value includes:
[0021] When the single light sensing integration time length of the light sensing channel is not set to the specified third value, the single light sensing integration time length of the light sensing channel of the light sensing module is set to the third value.
[0022] Optionally, the method further includes:
[0023] When the channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range and the photosensitive parameter has been set to the specified value, the second photosensitive data is determined according to the maximum channel value sensed by multiple photosensitive channels in the photosensitive module.
[0024] Optionally, when a first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range, third light sensing data is determined according to the first channel value.
[0025] Optionally, the light sensing channel includes at least one of the following channels:
[0026] The first channel is used to sense the full-band visible light;
[0027] The second channel is used to sense red light;
[0028] The third channel is used to sense green light;
[0029] The fourth channel is used to sense blue light;
[0030] The fifth channel is used to sense light in the visible and infrared bands.
[0031] According to a second aspect of an embodiment of the present disclosure, a photosensitive device is provided, including:
[0032] A first determination module, configured to determine whether a photosensitive parameter of the photosensitive module is set to a first value when a first channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range;
[0033] A setting module, used for setting the photosensitive parameter of the photosensitive module to a specified value when the photosensitive parameter is not set to a specified value;
[0034] An acquisition module, configured to use the light sensing module to re-perform light sensing based on the light sensing parameter of the specified value to obtain a second channel value;
[0035] The second determining module is used to determine the first light sensing data according to the second channel value.
[0036] Optionally, the setting module includes:
[0037] The first setting submodule is used to set the gain of the light sensing channel of the light sensing module to the first value when the gain of the light sensing channel is not set to the specified first value.
[0038] Optionally, the setting module includes:
[0039] The second setting submodule is used to set the single light sensing integration time length of the light sensing module to a specified second value when the gain is set to a specified first value and the channel value sensed by at least one light sensing channel of the light sensing module is within the preset range.
[0040] Optionally, the device further comprises:
[0041] The third determination module is used to determine the second light sensing data according to the maximum channel value sensed by multiple light sensing channels in the light sensing module when the channel value sensed by at least one light sensing channel of the light sensing module is within a preset range and the light sensing parameter has been set to the specified value.
[0042] Optionally, the device further comprises:
[0043] The third setting submodule is used to set the single light sensing integration time length of the light sensing channel of the light sensing module to the third value when the single light sensing integration time length of the light sensing channel is not set to the specified third value.
[0044] Optionally, the device further comprises:
[0045] The fourth determination module is used to determine third light sensing data according to the first channel value when the first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range.
[0046] According to a third aspect of an embodiment of the present disclosure, a photosensitive electronic device is provided, including:
[0047] processor;
[0048] a memory for storing processor-executable instructions;
[0049] Wherein, the processor is used to: execute and implement any of the above-mentioned photosensitization methods.
[0050] According to a fourth aspect of an embodiment of the present disclosure, a photosensitive storage medium is provided. When instructions in the storage medium are executed by a processor of a device for improving the photosensitivity accuracy of a photosensitive module, the device is enabled to execute any one of the above-mentioned photosensitivity methods.
[0051] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0052] In an embodiment of the present disclosure, when a first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range, the light sensing parameters are adjusted so that the light sensing parameters are set to a specified value that can ensure accuracy before light sensing is performed. Thus, by resetting the light sensing parameters to the specified values and re-sensing with the specified values, the accuracy of the light sensing data can be improved, thereby enhancing the user experience.
[0053] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0055] Figure 1 is a flow chart of a photosensing method according to an exemplary embodiment;
[0056] Figure 2 is a flow chart of a photosensing method according to an exemplary embodiment;
[0057] Figure 3 is a flow chart of a photosensing method according to an exemplary embodiment;
[0058] Figure 4is a flow chart of a photosensing method according to an exemplary embodiment;
[0059] Figure 5 is a flow chart of a photosensing method according to an exemplary embodiment;
[0060] Figure 6 is a flow chart of a photosensitization method according to an exemplary embodiment;
[0061] Figure 7 is a schematic diagram showing an application scenario of a photosensitization method according to an exemplary embodiment;
[0062] Figure 8 is a schematic diagram of a photosensitive device according to an exemplary embodiment;
[0063] Fig. 9 is a schematic diagram of a photosensitive electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0064] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.
[0065] Photosensitive modules are widely used in modern industrial production processes. The existence of compensation voltage inside the photosensitive module will generate a tiny leakage current, which will change with temperature, causing the channel value of the photosensitive module to decrease as the temperature rises. The decrease in channel value will affect the accuracy of the photosensitive digital-to-analog converter, causing errors in the illumination value, reducing the accuracy of the photosensitive module, and thus affecting the efficiency and cost of the production process. If the traditional photosensitive module is to be improved so that it can output more stable data at different temperatures, high-precision photosensitive module manufacturing technology and professional design capabilities are required, so the cost is relatively high.
[0066] In view of the above problems, the embodiments of the present disclosure provide a photosensing method, a device, an electronic device and a storage medium.
[0067] Figure 1 FIG. 1 is a flow chart of a photosensitive method according to an exemplary embodiment. Figure 1 As shown, the method includes:
[0068] S101: When a first channel value sensed by at least one light sensing channel of a light sensing module is within a preset range, determining whether a light sensing parameter of the light sensing module is set to a specified value;
[0069] S102: if the photosensitive parameter is not set to a specified value, setting the photosensitive parameter of the photosensitive module to a specified value;
[0070] S103: using the light sensing module to re-perform light sensing based on the light sensing parameter of the specified value to obtain a second channel value;
[0071] S104: Determine first light sensing data according to the second channel value.
[0072] In the embodiment of the present disclosure, the light sensing module includes but is not limited to an optical sensor and / or a light sensing chip for light sensing.
[0073] A light sensing module may include one or more light sensing channels, and different light sensing channels are used to sense light of different components.
[0074] The photosensitive parameters refer to the parameters collected by the light sensor, which may include: the wavelength of light, the gain of the light sensing channel and / or the single light sensing integration time of the light sensing channel, etc.
[0075] The channel value of the light-sensing channel is set to a preset range close to 0. For example, when the channel value of a certain light-sensing channel is 0.001, it can be considered that the channel value of this light-sensing channel is within the preset range.
[0076] In some embodiments, the preset range may also include negative values. If the channel value of a photosensitive channel is a negative value, it may indicate an abnormal situation, and the channel value may also be considered to be within the preset range.
[0077] Exemplarily, the first channel value sensed by at least one light sensing channel of the light sensing module being within a preset range may include: a channel value of one of the multiple light sensing channels of the light sensing module being within the preset range; and / or,
[0078] More than one channel value among the multiple light sensing channels in the light sensing module is within a preset range.
[0079] For example, when the light sensing module includes five channels, if the channel value of one of the channels is within a preset range, it is necessary to determine whether the light sensing parameter of the light sensing module is set to a specified value.
[0080] For another example, when the light sensing module includes five channels, if the channel values of two of the channels are within a preset range, it is necessary to determine whether the light sensing parameters of the light sensing module are set to a specified value.
[0081] For another example, when the light sensing module includes five channels, if the channel values of the five channels are all outside the preset range, it is not necessary to determine whether the light sensing parameters of the light sensing module are set to the specified values and the light sensing data can be directly determined.
[0082] Exemplarily, when the channel value of the green light channel in the light sensing channel is 0 or a negative value, it can be considered that the first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range.
[0083] In the embodiment of the present disclosure, when the first channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range, it is determined whether the photosensitive parameter of the photosensitive module is set to a specified value. When the photosensitive parameter is set to a specified value, photosensitive data can be directly determined by photosensing. When the photosensitive parameter is not set to a specified value, the photosensitive parameter of the photosensitive module is set to a specified value. At this time, the photosensitive parameter changes, and the photosensitive module performs photosensing based on the changed photosensitive parameter to obtain a new channel value, and determines the photosensitive data according to the new channel value.
[0084] In the embodiment of the present disclosure, when the light-sensing parameter is not set to the specified value, the light-sensing parameter of the light-sensing module is set to the specified value, and the light-sensing module is used to re-perform light sensing based on the light-sensing parameter of the specified value to obtain the second channel value, and the first light-sensing data is determined according to the second channel value. In this way, the accuracy of the light-sensing data can be improved, thereby improving the user experience.
[0085] In some embodiments, the photosensitive parameter includes at least one of the following:
[0086] The gain of the light sensing channel;
[0087] The single light sensing integration duration of the light sensing channel.
[0088] Exemplarily, there are many gears for the gain of the light-sensing channel. The higher the gear, the greater the gain of the light-sensing channel, and the more accurate the light-sensing data. That is, the gain of the light-sensing channel is positively correlated with the gear level. For example, the gain gears of a certain light-sensing channel include 1, 4, 8, 64, 128, and 512. When the gain is 1, the light-sensing data of this channel is 0.01; when the gain is 512, the light-sensing data of this channel is 5.12. It can be seen that the light-sensing data of the channel when the gain is 512 is more accurate than when the gain is 1.
[0089] The single light sensing integration time of the light sensing channel refers to the light sensing integration time set when performing light sensing, that is, the accumulation of light sensed by the photosensitive module within a certain period of time. Selecting an appropriate light sensing integration time is conducive to ensuring the accuracy of the photosensitive module. Setting the light sensing parameter to a specified value may include at least one of the following:
[0090] Setting the gain of the light sensing channel to a first value;
[0091] The gain of the light sensing channel is set to a first value and the single light sensing integration time length of the light sensing module is set to a second value;
[0092] The single light sensing integration time length of the light sensing channel of the light sensing module is set to the third value.
[0093] In some embodiments, the specified value of the light sensing parameter may be the maximum value of the corresponding light sensing parameter, or the maximum value of the light sensing parameter supported by the light sensing module.
[0094] In some embodiments, the second value may be equal to the third value.
[0095] In some embodiments, the photosensitivity parameters include: the gain of the photosensitivity channel.
[0096] The step of setting the photosensitivity parameter of the photosensitive module to the specified value when the photosensitivity parameter is not set to the specified value includes: setting the gain of the photosensitivity channel of the photosensitive module to the first value when the gain of the photosensitivity channel is not set to the specified first value.
[0097] In the disclosed embodiment, the photosensitive parameter includes the gain of the photosensitive channel. Figure 2 As shown, when the first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range, determine whether the gain of the light sensing channel is set to a specified value. If the gain of the light sensing channel is not set to the specified first value, set the gain of the light sensing channel of the light sensing module to the first value, and then re-determine whether the first channel value sensed by at least one light sensing channel of the light sensing module is within the preset range. If the first channel value sensed by at least one light sensing channel of the light sensing module after re-determination is not within the preset range, determine the light sensing data according to the first value. If the first channel value sensed by at least one light sensing channel of the light sensing module after re-determination is within the preset range, continue to adjust other parameters.
[0098] Exemplarily, it is checked whether at least one channel value data of the channel value of the light sensing module is within the preset range. If so, it is detected whether the gain of the light sensing channel at this time is the maximum value. The greater the gain of the channel, the more accurate the light sensing data. After setting the gain of the light sensing channel to the maximum value, it is again determined whether at least one channel value data of the channel value of the light sensing module is within the preset range. If not, light sensing is performed again to determine the light sensing data.
[0099] In the disclosed embodiment, by determining whether the gain of the light sensing channel is set to a specified first value, the influence of the light sensing parameter of the light sensing channel gain on the light sensing accuracy of the light sensing module can be reduced, the accuracy of the light sensing data can be improved, and the user experience can be enhanced.
[0100] In some embodiments, the gain of the photosensitive channel is set with different gears; wherein the gear level is positively correlated with the value of the gain, and the first value corresponds to the highest gear of the gain; or, the gain of the photosensitive channel is set with different gears; wherein the gear level is negatively correlated with the value of the gain, and the first value corresponds to the lowest gear of the gain.
[0101] In the disclosed embodiment, the gear level is positively correlated with the value of the gain, and the higher the gear level of the photosensitive channel, the greater the value of the gain. When the gain of the photosensitive channel is not set to the specified first value, the gain of the photosensitive channel of the photosensitive module is set to the first value, including: when the gain of the photosensitive channel is not set to the specified highest gear level, the gain of the photosensitive channel of the photosensitive module is set to the highest gear level. Exemplarily, when the gain of the photosensitive channel is in the first gear level, the gain is 1, when the gain is in the second gear level, the gain is 4, when the gain is in the third gear level, the gain is 8, when the gain is in the fourth gear level, the gain is 64, when the gain is in the fifth gear level, the gain is 128, and when the gain is in the first gear level, the gain is 512. At this time, if the gain of the photosensitive channel is not set to the specified highest gear level, the gain of the photosensitive channel of the photosensitive module is set to the highest gear level, that is, the gain of the photosensitive channel is set to the highest gear level 512.
[0102] Alternatively, the gear level is negatively correlated with the value of the gain, and the first value corresponds to the lowest gear of the gain. The lower the gear of the photosensitive channel, the larger the gain value. When the gain of the photosensitive channel is not set to the specified first value, setting the gain of the photosensitive channel of the photosensitive module to the first value includes: when the gain of the photosensitive channel is not set to the specified lowest gear, setting the gain of the photosensitive channel of the photosensitive module to the lowest gear.
[0103] Exemplarily, the gain of the light sensing channel is 512 when the first gear is in the gain position, 128 when the second gear is in the gain position, 64 when the third gear is in the gain position, 8 when the fourth gear is in the gain position, 4 when the fifth gear is in the gain position, and 1 when the first gear is in the gain position. At this time, if the gain of the light sensing channel is not set to the specified lowest gear position, the gain of the light sensing channel of the light sensing module is set to the lowest gear position, that is, the gain of the light sensing channel is set to the lowest gear position of 512.
[0104] Thus, setting the gain to the highest or lowest level can improve the accuracy of light sensing data, thereby improving the user experience.
[0105] In some embodiments, the photosensitivity parameters include: the gain of the photosensitivity channel and the single photosensitivity integration time of the photosensitivity channel.
[0106] When the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value includes:
[0107] When the gain is set to a specified first value and the channel value sensed by at least one light sensing channel of the light sensing module is within the preset range, the single light sensing integration time length of the light sensing module is set to a specified second value.
[0108] In the disclosed embodiment, the photosensitive parameters include: the gain of the photosensitive channel and the single photosensitive integration time of the photosensitive channel. Figure 3 As shown, when the gain of the light sensing channel is set to a specified first value and the first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range, the single light sensing integration time length of the light sensing module is set to a specified second value.
[0109] Exemplarily, after the gain of the light sensing channel is set to the maximum value, it is determined whether the first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range. If so, it is necessary to appropriately extend the single light sensing integration time of the light sensing module. Properly extending the light sensing integration time will make the channel value more accurate. For example, the general light sensing integration time is set to 100ms. Considering that the light sensing data must be reported in a timely manner, the light sensing integration time can be set to 200ms.
[0110] In the embodiment of the present disclosure, by determining whether the gain of the light sensing channel is set to a specified first value and the single light sensing integration time of the light sensing channel is set to a specified second value, the influence of the photosensitive parameters of the gain of the light sensing channel and the single light sensing integration time of the light sensing channel on the light sensing accuracy of the light sensing module can be reduced, the accuracy of the light sensing data can be improved, and the user experience can be enhanced.
[0111] In some embodiments, the light sensing parameters include: a single light sensing integration time length of the light sensing channel;
[0112] The method of setting the photosensitivity parameter of the photosensitive module to the specified value when the photosensitivity parameter is not set to the specified value includes: setting the single photosensitivity integration time of the photosensitivity channel of the photosensitive module to the third value when the single photosensitivity integration time of the photosensitivity channel is not set to the specified third value.
[0113] In the disclosed embodiment, the light sensing parameter includes: a single light sensing integration time length of the light sensing channel. If the single light sensing integration time length of the light sensing channel is not set to a specified third value, the single light sensing integration time length of the light sensing channel of the light sensing module is set to the third value.
[0114] Exemplarily, when the first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range, determine whether the single light sensing integration time length of the light sensing channel is set to a specified third value. In the case where the single light sensing integration time length of the light sensing channel is not set to the specified third value, set the single light sensing integration time length of the light sensing channel to the specified third value. At this time, based on the set single light sensing integration time length of the light sensing channel, determine whether the first channel value sensed by at least one light sensing channel of the light sensing module is within the preset range. If the first channel value sensed by at least one light sensing channel of the light sensing module is within the preset range, adjust other parameters (other parameters may include but are not limited to the gain of the light sensing channel) to perform light sensing; if the first channel value sensed by at least one light sensing channel of the light sensing module is not within the preset range, determine the channel value according to the third value of the single light sensing integration time length of the light sensing channel after the adjustment, and then determine the light sensing data.
[0115] In the disclosed embodiment, by determining whether the single light sensing integration time of the light sensing channel is a specified third value, the influence of the single light sensing integration time of the light sensing channel on the light sensing accuracy of the light sensing module can be reduced, the accuracy of the light sensing data can be improved, and the user experience can be enhanced.
[0116] In some embodiments, the method further comprises:
[0117] When the channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range and the photosensitive parameter has been set to the specified value, the second photosensitive data is determined according to the maximum channel value sensed by multiple photosensitive channels in the photosensitive module.
[0118] In the present disclosure, Figure 4 As shown, after the photosensitive module sets the gain of the photosensitive channel and the single photosensitive integration time of the photosensitive channel to specified values, it detects whether the first channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range. If the first channel value sensed by at least one photosensitive channel of the photosensitive module is within the preset range, it is necessary to determine the second photosensitive data based on the maximum channel value sensed by multiple photosensitive channels in the photosensitive module, that is, to use the maximum channel value sensed by multiple photosensitive channels in the photosensitive module as the channel value of the entire photosensitive module to determine subsequent photosensitive data.
[0119] Exemplarily, after setting the light sensing parameter to a specified value, if it is detected that the first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range, the largest channel value among the multiple light sensing channels is used as the channel value of the light sensing module to determine the light sensing data.
[0120] In the embodiment of the present disclosure, determining the second light sensing data according to the maximum channel value sensed by multiple light sensing channels in the light sensing module can further improve the accuracy of the light sensing data, thereby improving the user experience.
[0121] In some embodiments, when a first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range, third light sensing data is determined according to the first channel value.
[0122] In the present disclosure, Figure 5 As shown, at least one light sensing channel value of the light sensing module is obtained. If the first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range, the third light sensing data is directly determined according to the obtained first channel value. In this way, the time for obtaining light sensing data can be shortened and reported in time, thereby improving the accuracy of the light sensing module and improving the user experience.
[0123] In some embodiments, the light sensing channel includes at least one of the following channels:
[0124] The first channel is used to sense the full-band visible light;
[0125] The second channel is used to sense red light;
[0126] The third channel is used to sense green light;
[0127] The fourth channel is used to sense blue light;
[0128] The fifth channel is used to sense light in the visible and infrared bands.
[0129] The light sensing channels of the light sensing module may include: a visible light full spectrum channel (Clear), a red light channel (Red), a green light channel (Green), a blue light channel (Blue) and a wide spectrum channel (Wide) or a combination of one or more thereof.
[0130] In some embodiments, the light sensing channel also includes other channels, for example, an infrared channel and / or an ultraviolet channel.
[0131] In the disclosed embodiment, the first channel may be a full-spectrum visible light channel for sensing full-band visible light; the second channel may be a red light channel for sensing red light; the third channel may be a green light channel for sensing green light; the fourth channel may be a blue light channel for sensing blue light; and the fifth channel may be a wide-spectrum channel for sensing visible light and infrared light.
[0132] The light sensing channel includes at least one of a first channel, a second channel, a third channel, a fourth channel, and a fifth channel, or a combination of one or more of them.
[0133] The disclosed embodiment of the present application also provides another photosensitive method, such as Figure 6 As shown, the method flow is as follows:
[0134] Step 130: light sensing data collection.
[0135] Step 131: Obtain a first channel value sensed by at least one light sensing channel of a light sensing module.
[0136] Step 132: Check whether there is a channel value data of 0 in the channel value of the light sensing module.
[0137] Step 133: In step 132, if it is detected that the channel values of the light sensing module are not 0, the light sensing data is calculated according to the normal process through the sensed first channel value, that is, Lux = f(C, R, G, B, W).
[0138] Step 134: In step 132, if it is detected that the first channel value sensed by at least one light sensing channel of the light sensing module is 0, it is detected whether the gain of the light sensing module is set to the maximum value at this time.
[0139] (1) The larger the gain setting, the greater the gain of the channel value. For example, when the gain is 1, the data of a certain channel is 0.01; when the gain is 512, the data of the same channel is 5.12. They are equivalent at the data level, but the latter calculates the light perception data more accurately.
[0140] (2) Generally, there are many levels of light gain, such as 1, 4, 8, 64, 128, 512, etc.
[0141] Step 135: In the operation of step 134, if the detection gain is not set to the maximum value, the gain is set to the maximum value, and it is determined again whether there is a channel value data of 0 in the channel value of the light sensing module.
[0142] Step 136: In the operation of step 134, when the detection gain has been set to the maximum value, the single light sensing integration time of the light sensing channel is extended.
[0143] (1) The single light integration time of the light channel means that the longer the channel value acquisition time is, the larger the channel value will be;
[0144] For example, in the same environment, the data of a certain channel obtained when the light integration time is 100ms is 1, and the data of the same channel obtained when the light integration time is 200ms is approximately 2. The more obvious the channel value data is, the more accurate the light data calculation will be.
[0145] (2) Generally, the light sensing integration time is set to 100ms. Considering that the light sensing data must be reported in a timely manner, the light sensing integration time can be set to 200ms.
[0146] Step 137: If after step 136, the channel values of the light sensing module are detected and none of the channel values is 0, the light sensing data is calculated according to the normal process, that is, Lux = f(C, R, G, B, W).
[0147] Step 138: If after step 136, it is detected that the first channel value sensed by at least one light sensing channel of the light sensing module is 0, that is, there are still channels with channel values of 0 after re-detection, then take ch=max(C, R, G, B, W), and calculate the light sensing data Lux=max(C, R, G, B, W) according to the most obvious channel value. At this time, the accuracy of the darkroom light sensing data is greatly improved.
[0148] Step 139: Reporting light sensing data.
[0149] For example, the application scenario of the photosensitive method in the embodiment of the present disclosure is as follows: Figure 7 When receiving an instruction to use the cellular circuit for wireless transmission, the wifi connection is stopped, and when receiving an instruction to stop using the cellular circuit for wireless transmission, the wifi connection is restored. Figure 7 1 is a schematic diagram of an exemplary network environment in which the technical solution can be implemented, wherein the network environment 100 includes electronic devices 102A and 102B, a wifi access point 104, a cellular base station 105, and a network 106. The photosensitive electronic device 102A can be an electronic watch, and the photosensitive electronic device 102B can be a tablet computer.
[0150] The present disclosure also provides a photosensitive device, such as Figure 8 As shown, the device comprises:
[0151] A first determination module, configured to determine whether a photosensitive parameter of the photosensitive module is set to a first value when a first channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range;
[0152] A setting module, used for setting the photosensitive parameter of the photosensitive module to a specified value when the photosensitive parameter is not set to a specified value;
[0153] An acquisition module, configured to use the light sensing module to re-perform light sensing based on the light sensing parameter of the specified value to obtain a second channel value;
[0154] The second determining module is used to determine the first light sensing data according to the second channel value.
[0155] In some embodiments, the setting module includes:
[0156] The first setting submodule is used to set the gain of the light sensing channel of the light sensing module to the first value when the gain of the light sensing channel is not set to the specified first value.
[0157] In some embodiments, the setting module includes:
[0158] The second setting submodule is used to set the single light sensing integration time length of the light sensing module to a specified second value when the gain is set to a specified first value and the channel value sensed by at least one light sensing channel of the light sensing module is within the preset range.
[0159] In some embodiments, the apparatus further comprises:
[0160] The third determination module is used to determine the second light sensing data according to the maximum channel value sensed by multiple light sensing channels in the light sensing module when the channel value sensed by at least one light sensing channel of the light sensing module is within a preset range and the light sensing parameter has been set to the specified value.
[0161] In some embodiments, the apparatus further comprises:
[0162] The third setting submodule is used to set the single light sensing integration time length of the light sensing channel of the light sensing module to the third value when the single light sensing integration time length of the light sensing channel is not set to the specified third value.
[0163] In some embodiments, the apparatus further comprises:
[0164] The fourth determination module is used to determine third light sensing data according to the first channel value when the first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range.
[0165] The present disclosure also provides a photosensitive electronic device, including:
[0166] processor;
[0167] a memory for storing processor-executable instructions;
[0168] Wherein, the processor is used to: execute and implement the photosensitization method.
[0169] Fig. 9 A block diagram of an electronic device according to an exemplary embodiment is shown. For example, the electronic device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0170] Reference Fig. 9, the electronic device may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0171] The processing component 802 generally controls the overall operation of the electronic device, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0172] The memory 804 is configured to store various types of data to support the operation of the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0173] The power component 806 provides power to various components of the electronic device. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0174] The multimedia component 808 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0175] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0176] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0177] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device. For example, the sensor assembly 814 can detect the open / closed state of the electronic device, the relative positioning of components, such as the display and keypad of the electronic device, and the sensor assembly 814 can also detect the position change of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device and the temperature change of the electronic device. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0178] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0179] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0180] The disclosed embodiment also provides a photosensitive storage medium. When the instructions in the storage medium are executed by a processor of a device for improving the photosensitivity accuracy of a photosensitive module, the device is able to execute the photosensitivity method, including: when a first channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range, determining whether a photosensitive parameter of the photosensitive module is set to a specified value; when the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value; using the photosensitive module to re-perform photosensitivity based on the photosensitive parameter of the specified value to obtain a second channel value; and determining first photosensitive data based on the second channel value.
[0181] Optionally, the photosensitivity parameter includes at least one of the following: a gain of the photosensitivity channel; and a single photosensitivity integration time of the photosensitivity channel.
[0182] Optionally, the photosensitivity parameters include: the gain of the photosensitivity channel; when the photosensitivity parameters are not set to the specified value, setting the photosensitivity parameters of the photosensitive module to the specified value includes: when the gain of the photosensitive channel is not set to the specified first value, setting the gain of the photosensitive channel of the photosensitive module to the first value.
[0183] Optionally, the gain of the light sensing channel is set to different gears; wherein the gear level is positively correlated with the value of the gain, and the first value corresponds to the highest gear of the gain.
[0184] Optionally, the photosensitivity parameters include: the gain of the photosensitivity channel and the single photosensitivity integration time of the photosensitivity channel; when the photosensitivity parameters are not set to the specified values, setting the photosensitivity parameters of the photosensitivity module to the specified values includes: when the gain is set to a specified first value and the channel value sensed by at least one photosensitivity channel of the photosensitivity module is within the preset range, setting the single photosensitivity integration time of the photosensitivity module to a specified second value.
[0185] Optionally, the photosensitivity parameters include: the duration of a single photosensitivity integration of the photosensitivity channel; when the photosensitivity parameters are not set to the specified values, setting the photosensitivity parameters of the photosensitivity module to the specified values, including: when the duration of a single photosensitivity integration of the photosensitivity channel is not set to a specified third value, setting the duration of a single photosensitivity integration of the photosensitivity channel of the photosensitivity module to the third value.
[0186] Optionally, the method further includes: when a channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range and the photosensitivity parameter has been set to the specified value, determining second photosensitive data based on a maximum channel value sensed by multiple photosensitive channels in the photosensitive module.
[0187] Optionally, when a first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range, third light sensing data is determined according to the first channel value.
[0188] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0189] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A photosensitive method, characterized in that: The method comprises: When a first channel value sensed by at least one light sensing channel of the light sensing module is within a preset range, determining whether a light sensing parameter of the light sensing module is set to a specified value; If the photosensitive parameter is not set to a specified value, setting the photosensitive parameter of the photosensitive module to a specified value; Using the light sensing module to re-perform light sensing based on the light sensing parameter of the specified value to obtain a second channel value; The first light sensing data is determined according to the second channel value.
2. The method according to claim 1, characterized in that The photosensitive parameters include at least one of the following: The gain of the light sensing channel; The single light sensing integration duration of the light sensing channel.
3. The method according to claim 1 or 2, characterized in that: The photosensitive parameters include: the gain of the photosensitive channel; When the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value includes: When the gain of the light sensing channel is not set to the specified first value, the gain of the light sensing channel of the light sensing module is set to the first value.
4. The method according to claim 3, characterized in that The gain of the light sensing channel is set to different gears; wherein the gear level is positively correlated with the value of the gain, and the first value corresponds to the highest gear of the gain; or, The gain of the light sensing channel is set to different gears; wherein the gear level is negatively correlated with the value of the gain, and the first value corresponds to the lowest gear of the gain.
5. The method according to claim 3, characterized in that: The photosensitive parameters include: the gain of the photosensitive channel and the single photosensitive integration time of the photosensitive channel; When the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value includes: When the gain is set to a specified first value and the channel value sensed by at least one light sensing channel of the light sensing module is within the preset range, the single light sensing integration time length of the light sensing module is set to a specified second value.
6. The method according to claim 1 or 2, characterized in that: The photosensitive parameters include: a single photosensitive integration time of the photosensitive channel; When the photosensitive parameter is not set to the specified value, setting the photosensitive parameter of the photosensitive module to the specified value includes: When the single light sensing integration time length of the light sensing channel is not set to the specified third value, the single light sensing integration time length of the light sensing channel of the light sensing module is set to the third value.
7. The method according to claim 1 or 2, characterized in that: The method further comprises: When the channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range and the photosensitive parameter has been set to the specified value, the second photosensitive data is determined according to the maximum channel value sensed by multiple photosensitive channels in the photosensitive module.
8. The method according to claim 1 or 2, characterized in that: When a first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range, third light sensing data is determined according to the first channel value.
9. The method according to claim 1 or 2, characterized in that: The light sensing channel includes at least one of the following channels: The first channel is used to sense the full-band visible light; The second channel is used to sense red light; The third channel is used to sense green light; The fourth channel is used to sense blue light; The fifth channel is used to sense light in the visible and infrared bands.
10. A photosensitive device, characterized in that: The device comprises: A first determination module, configured to determine whether a photosensitive parameter of the photosensitive module is set to a specified value when a first channel value sensed by at least one photosensitive channel of the photosensitive module is within a preset range; A setting module, used for setting the photosensitive parameter of the photosensitive module to a specified value when the photosensitive parameter is not set to a specified value; An acquisition module, configured to use the light sensing module to re-perform light sensing based on the light sensing parameter of the specified value to obtain a second channel value; The second determining module is used to determine the first light sensing data according to the second channel value.
11. The device according to claim 10, characterized in that The setting module includes: The first setting submodule is used to set the gain of the light sensing channel of the light sensing module to the first value when the gain of the light sensing channel is not set to the specified first value.
12. The device according to claim 11, characterized in that The setting module includes: The second setting submodule is used to set the single light sensing integration time length of the light sensing module to a specified second value when the gain is set to a specified first value and the channel value sensed by at least one light sensing channel of the light sensing module is within the preset range.
13. The device according to claim 12, characterized in that The device also includes: The third determination module is used to determine the second light sensing data according to the maximum channel value sensed by multiple light sensing channels in the light sensing module when the channel value sensed by at least one light sensing channel of the light sensing module is within a preset range and the light sensing parameter has been set to the specified value.
14. The device according to claim 13, characterized in that The device also includes: The third setting submodule is used to set the single light sensing integration time length of the light sensing channel of the light sensing module to the third value when the single light sensing integration time length of the light sensing channel is not set to the specified third value.
15. The device according to claim 14, characterized in that The device also includes: The fourth determination module is used to determine third light sensing data according to the first channel value when the first channel value sensed by at least one light sensing channel of the light sensing module is outside the preset range.
16. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is used to: execute and implement the photosensitization method described in any one of claims 1 to 9 above.
17. A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device for improving the photosensitivity accuracy of a photosensitive module, the device is able to execute any one of the photosensitivity methods described in claims 1 to 9.