Ambient illumination measurement method and apparatus, electronic device, and readable storage medium
By using at least two sets of cameras to acquire images and combining them with preset coefficients, the problem of low accuracy in ambient light measurement is solved, achieving higher measurement accuracy and lower power consumption, and supporting adaptive adjustments to screen brightness and image processing.
Patent Information
- Application Number
- CN202210546441.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-05-19
AI Technical Summary
The accuracy of the ambient illumination measurement method in the prior art is low and is easily affected by environmental factors.
At least two sets of cameras are used to acquire images, and the pixel positions of at least two images are obtained. The pixel illuminance value is determined by using preset coefficients obtained from different environmental parameters and combining them with the color channel value, and finally the environmental illuminance value is determined.
It improves the accuracy of ambient light measurement, reduces data processing volume and power consumption, and supports adaptive adjustments to screen brightness and image noise reduction processing.
Smart Images

Figure CN114894304B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a method and device for measuring ambient illumination, an electronic device, and a readable storage medium. Background Art
[0002] Illuminance is the amount of visible light received per unit area. Illuminance measurement is generally applicable in a variety of scenarios. For example, the screen brightness of an electronic device can be automatically adjusted based on the measured illuminance to suit the human eye.
[0003] In the prior art, a measuring instrument is used to measure the ambient illumination. However, during the measurement process, the instrument is easily affected by environmental factors, resulting in low measurement accuracy. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide an ambient illuminance measurement method that can solve the problem of low accuracy of ambient illuminance measurement methods in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a method for measuring ambient illuminance, the method comprising: acquiring at least two captured images; the pixel positions of the at least two captured images correspond to each other; the color channel values of each color channel corresponding to the at least two captured images, and the preset coefficient corresponding to each color channel value, determining the pixel illuminance value corresponding to the pixel position; determining the ambient illuminance value based on the pixel illuminance value corresponding to each pixel position; wherein the preset coefficient of the pixel position corresponding to each color channel in the at least two captured images is obtained based on at least two test environments, and the environmental parameters of different test environments are different, and the environmental parameters include at least one of the following: ambient color temperature, ambient illuminance.
[0006] In second aspect, an embodiment of the present application provides an ambient illuminance measuring device, which includes: a first acquisition module for acquiring at least two acquired images; the pixel positions of the at least two acquired images correspond to each other; a first determination module for determining, for each pixel position, the pixel illuminance value corresponding to the pixel position according to the color channel value of each color channel corresponding to the pixel position in the at least two acquired images, and the preset coefficient corresponding to each color channel value; a second determination module for determining the ambient illuminance value according to the pixel illuminance value corresponding to each pixel position; wherein the preset coefficient of each color channel corresponding to the pixel position in the at least two acquired images is obtained based on at least two test environments, and the environmental parameters of different test environments are different, and the environmental parameters include at least one of the following: ambient color temperature, ambient illuminance.
[0007] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory stores programs or instructions executable on the processor. When the programs or instructions are executed by the processor, the steps of the method according to the first aspect are implemented.
[0008] In a fourth aspect, a readable storage medium is provided, which stores programs or instructions. When the programs or instructions are executed by a processor, the steps of the method according to the first aspect are implemented.
[0009] In a fifth aspect, a chip is provided, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute programs or instructions to implement the method according to the first aspect.
[0010] In a sixth aspect, a computer program product is provided, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the method according to the first aspect.
[0011] In this way, in the embodiments of the present application, at least two groups of cameras are arranged in the process of measuring the ambient illuminance. The at least two groups of cameras acquire images based on the same shooting angle to obtain at least two corresponding images. The pixel point positions on the at least two images correspond to each other. Further, the color channel values of the pixel point positions in each image are obtained respectively, and then the preset coefficients corresponding to each color channel value obtained based on different environmental parameters are combined to determine the pixel illuminance values corresponding to each pixel point position. Finally, the ambient illuminance value measured at present is determined according to the pixel illuminance values corresponding to each pixel point position. As can be seen, in the embodiments of the present application, the spectral response curves of different cameras are different. When the ambient color temperature changes, the degrees of change of RGB components perceived by different cameras are also different. Therefore, the change amounts of RGB values of different images are different with the change of color temperature. In combination with the respective preset coefficients, the change of color temperature can be reflected in the finally obtained ambient illuminance value, thereby effectively improving the accuracy of illuminance measurement. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 is one of the flowcharts of the ambient illuminance measurement method according to the embodiments of the present application;
[0013] Figure 2 is another of the flowcharts of the ambient illuminance measurement method according to the embodiments of the present application;
[0014] Figure 3 is a third of the flowcharts of the ambient illuminance measurement method according to the embodiments of the present application;
[0015] Figure 4Fig. 4 is a flowchart of an environment illumination measurement method according to an embodiment of the present application;
[0016] Figure 5 Fig. 5 is a flowchart of an environment illumination measurement method according to an embodiment of the present application;
[0017] Figure 6 Fig. 6 is a block diagram of an environment illumination measurement device according to an embodiment of the present application;
[0018] Figure 7 Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;
[0019] Figure 8 Fig. 8 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] The technical solutions of the embodiments of the present application will be described clearly below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art belong to the scope of protection of the present application.
[0021] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually a category, and are not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally represents that the front and rear associated objects are in an "or" relationship.
[0022] The environment illumination measurement method provided by the embodiments of the present application will be described in detail below with reference to the drawings and specific embodiments and application scenarios.
[0023] Figure 1 Fig. 1 shows a flowchart of an environment illumination measurement method according to an embodiment of the present application. The method is applied to an electronic device, and includes:
[0024] Step 110: acquiring at least two captured images; the pixel point positions of the at least two captured images correspond to each other.
[0025] In the present embodiment, the electronic device includes at least two groups of cameras, and each group of cameras can be used to capture at least one image.
[0026] Optionally, the shooting angles of each group of cameras are the same, so as to ensure that the pixel positions of the at least two images correspond to each other.
[0027] Optionally, the common regions of the at least two images are aligned and linearly corrected, and then the at least two images are output, so as to ensure that the pixel positions of the at least two images correspond to each other.
[0028] In the present application, the at least two groups of cameras are different cameras, so as to ensure that the spectral response curves of the cameras in different groups are different.
[0029] In step 120, for each pixel position, the pixel luminance value corresponding to the pixel position is determined according to the color channel values of the pixel position in the at least two captured images corresponding to each color channel, and the preset coefficients corresponding to each color channel value.
[0030] In this step, based on any one image, the R (red) value, G (green) value and B (blue) value of each pixel position of the image are obtained.
[0031] Among them, the RGB values of the pixel positions of at least two images are obtained.
[0032] At the same time, the preset coefficients corresponding to each color channel value are obtained. Among them, one color channel value in one image corresponds to one preset coefficient.
[0033] For example, one image includes three color channel values, which are R channel value, G channel value and B channel value, and correspondingly, there are three preset coefficients.
[0034] Among them, the preset coefficients of the pixel positions in the at least two captured images corresponding to each color channel are obtained based on at least two test environments, and the environment parameters of different test environments are different, and the environment parameters include at least one of the following: environment color temperature, environment illumination.
[0035] Generally, the spectral response curves of different cameras are different, and when the environment color temperature and the environment illumination change, the degree of change of the RGB components sensed by different cameras will also be different, that is, the change of the color temperature and the change of the environment illumination can be reflected on the RGB values of the pixel positions in different images. Therefore, the present application uses at least two groups of cameras to capture images, changes at least one of the environment color temperature and the environment illumination during the capturing process, and then reflects different environment parameters through the RGB values in the at least two images. The preset coefficients obtained based on such method take into account the influence of the change of the color temperature and other factors on the environment illumination value.
[0036] Therefore, in this step, the preset coefficients and the RGB values of the at least two images are used to determine the pixel luminance value corresponding to each pixel position.
[0037] Step 130: determining the ambient illumination value according to the pixel illumination value corresponding to each pixel point position.
[0038] In this step, the pixel illumination value corresponding to each pixel point position is comprehensively considered to determine the ambient illumination value.
[0039] In this way, in the embodiments of the present application, at least two groups of cameras are arranged in the process of measuring the ambient illumination, and the at least two groups of cameras acquire images based on the same shooting angle to obtain at least two corresponding images, and the pixel point positions on the at least two images correspond to each other. Further, the color channel values of the pixel point positions in each image are obtained respectively, and then the preset coefficients corresponding to each color channel value obtained based on different environmental parameters are combined to determine the pixel illumination value corresponding to each pixel point position. Finally, the ambient illumination value measured at present is determined according to the pixel illumination value corresponding to each pixel point position. It can be seen that, in the embodiments of the present application, the spectral response curves of different cameras are different, and when the ambient color temperature changes, the degrees of change of RGB components sensed by different cameras are also different, so the change amounts of RGB values of different images are different with the change of color temperature, and the color temperature change can be reflected in the finally obtained ambient illumination value by combining the respective preset coefficients, thereby effectively improving the accuracy of illumination measurement.
[0040] In Figure 1 on the basis of the embodiments shown, Figure 2 a flow chart of an ambient illumination measurement method according to another embodiment of the present application is shown.
[0041] In the present embodiment, the at least two acquired images include a first image and a second image; and the color channels include a first color channel, a second color channel and a third color channel.
[0042] In the present embodiment, the first image and the second image are taken as examples for illustration.
[0043] The first color channel, the second color channel and the third color channel are respectively an R channel, a G channel and a B channel.
[0044] Correspondingly, step 120 includes:
[0045] Sub-step A1: for each pixel point position, the first color channel value of the pixel point position in the first image corresponding to the first color channel, the second color channel value of the pixel point position in the first image corresponding to the second color channel, the third color channel value of the pixel point position in the first image corresponding to the third color channel, the fourth color channel value of the pixel point position in the second image corresponding to the first color channel, the fifth color channel value of the pixel point position in the second image corresponding to the second color channel, and the sixth color channel value of the pixel point position in the second image corresponding to the third color channel are obtained.
[0046] Sub-step A2: obtaining a first coefficient corresponding to the first color channel value, a second coefficient corresponding to the second color channel value, a third coefficient corresponding to the third color channel value, a fourth coefficient corresponding to the fourth color channel value, a fifth coefficient corresponding to the fifth color channel value, and a sixth coefficient corresponding to the sixth color channel value.
[0047] Sub-step A3: determining the pixel luminance value corresponding to the pixel point position according to the first color channel value, the second color channel value, the third color channel value, the fourth color channel value, the fifth color channel value, the sixth color channel value, and the first coefficient, the second coefficient, the third coefficient, the fourth coefficient, the fifth coefficient, and the sixth coefficient.
[0048] Exemplarily, the first coefficient corresponding to the first color channel value, the second coefficient corresponding to the second color channel value, the third coefficient corresponding to the third color channel value, the fourth coefficient corresponding to the fourth color channel value, the fifth coefficient corresponding to the fifth color channel value, and the sixth coefficient corresponding to the sixth color channel value are respectively: k R , k G , k B , k' R , k' G , k' B .
[0049] Firstly, it is assumed that there is only one group of cameras, one image is collected, and the luminance value is determined by using Formula One, wherein Formula One is:
[0050]
[0051] In Formula One, Es is used to represent the luminance value, k R , k G , k B are preset coefficients corresponding to color channel values in an image, R, G, and B are respectively used to represent R value, G value, and B value of the pixel point position, and sensitivity is used to represent image acquisition parameters.
[0052] In this embodiment, based on two images, on the basis of Formula One, it can be changed to Formula Two:
[0053]
[0054] In Formula Two, E d is used to represent the luminance value, k R , k G , k B are preset coefficients corresponding to color channel values in the first image, k' R , k' G , k' BThe preset coefficients corresponding to the color channel values in the second image are R, G and B, which respectively represent the R value, G value and B value of the pixel point position in the first image, R', G' and B' respectively represent the R value, G value and B value of the pixel point position in the second image, w is a fixed coefficient, w is used to represent the proportion of one of the images (the first image or the second image) in the final calculation result, and sensitivity is used to represent the image acquisition parameter.
[0055] In formula two, since the shooting angles are the same, the ratio between the sensitivities corresponding to the two images is a constant, which is denoted by k R , k G , k B , k' R , k' G , k' B After absorbing all the fixed coefficients, formula two can be simplified to formula three:
[0056]
[0057] Further, formula three is converted to formula four:
[0058]
[0059] It can be seen that, compared with formula one, the coefficient of R changes from k R to: The coefficient of G changes from k G to: The coefficient of B changes from k B to:
[0060] That is, both formula one and formula four are based on the RGB values of the first image to calculate the illumination value, and the difference between the two is that the preset coefficients corresponding to the color channel values change from the immutable coefficients (k R , k G , k B ) of formula one to variable coefficients, and the change rule depends on the relationship between the RGB values of the two images.
[0061] The variable coefficient is:
[0062]
[0063] The relationship between the RGB values of the two images is reflected in the ratio of R' to R, the ratio of G' to G, and the ratio of B' to B.
[0064] It should be noted that in Formulas 1 to 4, R, G, B, R', G', and B' are used to represent the RGB value of a certain pixel position. In other embodiments, R, G, B, R', G', and B' in Formulas 1 to 4 can be used to represent the average of the RGB values of each pixel position.
[0065] In this embodiment, illustratively, first, an M*6 (M is a positive integer) matrix is designed as the first matrix X':
[0066] In the first matrix, the first three values in a row represent the R, G, and B values of a pixel in the first image, and the last three values in the row represent the R, G, and B values of the corresponding pixel in the second image. Similarly, if an image contains M pixels, the first matrix contains M rows.
[0067] Second, design a 6*1 matrix as the second matrix K:
[0068] In the second matrix, the preset coefficients corresponding to the color channel values of the two images are stored. In the second matrix, the arrangement order of the preset coefficients is: k R 、k G 、k B , k' R , k' G , k' B , corresponding to the arrangement order of R, G, B, R', G', B' on the rows in the first matrix.
[0069] Third, Y'=X'*K, Y' is the third matrix,
[0070] The third matrix stores the y value of each pixel position in the image, where the y value is used to represent the pixel illumination value corresponding to the pixel position.
[0071] This embodiment utilizes the fact that the same ambient color temperature has different effects on the RGB values of different images. This factor can be taken into account when measuring ambient illuminance, thereby improving the accuracy of ambient illuminance measurements. Furthermore, this embodiment utilizes two images for calculation, ensuring minimal data processing and reducing power consumption while improving the accuracy of ambient illuminance measurements.
[0072] exist Figure 1 Based on the embodiment shown, Figure 3 A flow chart of an ambient illumination measurement method according to another embodiment of the present application is shown. Step 120 includes:
[0073] Sub-step B1: for each pixel position, according to the color channel value of each color channel corresponding to the pixel position in at least two acquisition images, and the preset coefficient corresponding to each color channel value, determine the pixel gray value corresponding to the pixel position.
[0074] In this step, before determining the pixel illumination value corresponding to the pixel position, first determine the pixel gray value corresponding to the pixel position.
[0075] Exemplarily, assuming that the first image and the second image are used to measure the ambient illumination, the third matrix Y' includes the pixel gray value corresponding to each pixel position.
[0076] Sub-step B2: according to the pixel gray value corresponding to the pixel position, determine the pixel illumination value corresponding to the pixel position.
[0077] Exemplarily, according to formula five: y = e * s, determine the pixel illumination value corresponding to the pixel position.
[0078] In formula five, y is used to represent the pixel gray value corresponding to the pixel position, e is used to represent the pixel illumination value corresponding to the pixel position, and s is used to represent the correlation coefficient.
[0079] In this embodiment, when determining the pixel illumination value corresponding to the pixel position, the pixel gray value corresponding to the pixel position can be determined, for example, the pixel gray value can be determined by a preset calculation method, in combination with the color channel value of each color channel of the pixel position and the preset coefficient corresponding to each color channel value, and then the pixel illumination value can be obtained in combination with this embodiment, so that the ambient illumination measurement method in this embodiment is realized.
[0080] In Figure 3 On the basis of the embodiment shown in the figure, in the flow of the ambient illumination measurement method of another embodiment of the present application, step B1 includes:
[0081] Sub-step C1: obtain the image acquisition parameter corresponding to one of the at least two acquisition images.
[0082] Optionally, the one image is the image collected by the main camera, and the main camera can be any one of the at least two groups of cameras.
[0083] The image acquisition parameter includes the light sensitivity. The light sensitivity is equal to the product of the aperture and the exposure time.
[0084] Sub-step C2: according to the pixel gray value corresponding to the pixel position and the image acquisition parameter, determine the pixel illumination value corresponding to the pixel position.
[0085] Optionally, the pixel luminance value corresponding to each pixel position point is determined according to Formula Six: Y'=E*sensitivity.
[0086] In Formula Six, E is used to represent an M*1 matrix for storing the pixel luminance values corresponding to the M pixel position points of the image, and sensitivity is used to represent the light sensitivity of the image.
[0087] Correspondingly, In which e is used to represent the pixel luminance value corresponding to the pixel position.
[0088] In this embodiment, the pixel luminance value corresponding to each pixel position point can be determined in combination with the image acquisition parameters corresponding to the image and the pixel gray value corresponding to each pixel position point.
[0089] Based on the embodiment shown in Figure 1 Based on the embodiment shown in Figure 4 A flowchart of an ambient illuminance measurement method according to another embodiment of the present application is shown, and step 130 includes:
[0090] Sub-step D1: Obtain the mean value of the pixel luminance values corresponding to each pixel position point.
[0091] Sub-step D2: Take the mean value as the ambient illuminance value.
[0092] In this step, the pixel luminance values corresponding to all the pixel position points are added and averaged to obtain the measured ambient illuminance value.
[0093] In this embodiment, the ambient illuminance value is obtained using the averaging method in combination with the luminance perceived by each pixel position point, so that the final ambient illuminance value is obtained by comprehensively considering the luminance perceived by each position in the image, thereby ensuring the accuracy of the measurement result.
[0094] Based on the embodiment shown in Figure 1 Based on the embodiment shown in Figure 5 A flowchart of an ambient illuminance measurement method according to another embodiment of the present application is shown, and step 120 includes:
[0095] Sub-step E1: For each pixel position, obtain the mean value of the color channel values of the pixel position.
[0096] Unlike the foregoing embodiments, this embodiment first obtains the mean value of the color channel values, and then obtains an average pixel luminance value based on the mean value.
[0097] Exemplarily, taking the first image and the second image as an example, the R values in the first image are averaged to obtain R i The G values in the first image are averaged to obtain Gi B is obtained by averaging all B values in the first image i Meanwhile, R' is obtained by averaging all R values in the second image i G' is obtained by averaging all G values in the second image i B' is obtained by averaging all B values in the second image i .
[0098] Sub-step E2: determining the pixel luminance value corresponding to the pixel position according to the mean value of each color channel value of the pixel position and the preset coefficient corresponding to each color channel value.
[0099] In this step, formula seven is:
[0100]
[0101] In formula seven, the explanations of the parameters can be referred to the foregoing embodiments, which will not be repeated here.
[0102] In formula seven, E d is used to represent an average pixel luminance value.
[0103] By way of reference, E d is taken as the ambient luminance value.
[0104] In this embodiment, another method for measuring ambient luminance is provided. In this embodiment, the average value of each color channel value can be calculated first, and then an average pixel luminance value is obtained by using the formula.
[0105] In the flow of the ambient luminance measurement method of another embodiment of the present application, the step of obtaining the preset coefficient corresponding to each color channel value comprises:
[0106] Step F1: for each test environment, obtaining the reference luminance value corresponding to the test environment and at least two sample images obtained under the test environment; the pixel positions of the at least two sample images correspond to each other.
[0107] In this embodiment, in the process of obtaining the preset coefficient, the electronic device can perform image acquisition in the set test environment. It is assumed that N image acquisitions are performed, N is a positive integer, and N > 1.
[0108] Among them, at least two sample images can be collected in one test environment.
[0109] Step F2: for each test environment, determining the image gray value corresponding to the test environment according to the image acquisition parameter corresponding to one of the sample images and the reference luminance value.
[0110] In this step, a N*1 matrix is designed as the fourth matrix Y:
[0111] In the fourth matrix, y = the reference illuminance value of the test environment * sensitivity. Wherein, y is used to represent the image gray value corresponding to the test environment, and sensitivity is used to represent the image acquisition parameter of the corresponding camera (i.e. the main camera) recorded when one of the sample images is acquired.
[0112] Step F3: According to the color channel value of each color channel corresponding to at least two sample images, and the image gray value corresponding to the test environment, determine the preset coefficient corresponding to each color channel value.
[0113] Taking two sample images as an example, a N*6 matrix is set as the fifth matrix X,
[0114] It should be noted that each value in the fifth matrix is used to represent the average value, that is, in the fifth matrix, one row is used to record a test environment, the first three values of the row are used to represent the average R value, the average G value and the average B value of an image, and the last three values of the same row are used to represent the average R value, the average G value and the average B value of another image. In turn, after N times of acquisition, the fifth matrix includes N rows.
[0115] Further, according to formula eight: Y = XK, the sixth matrix K can be obtained. That is
[0116]
[0117] In this embodiment, at least one of the environmental illuminance and the environmental color temperature is different in the different two test environments, so that multiple test environments can be created.
[0118] Optionally, a standard light box is used to manufacture multiple different color temperatures (such as standard color temperatures D65, TL84, U30, F, etc.), and multiple illuminance environments (such as 1 lux, 10 lux, 100 lux, 1000 lux, etc.) are manufactured under each color temperature environment, so that one color temperature and one illuminance are combined to form N combinations. Under each combination, a high-precision illuminometer is used to obtain the true illuminance as the reference illuminance value, and a sample image is acquired by using the multi-camera mode of the application (for example, the electronic device is used to take a photo of the standard color card), and the light sensitivity of the main camera used when shooting is recorded. There are N light sensitivities.
[0119] Optionally, when the high-precision illuminometer is used to obtain the true illuminance, the illuminometer can be directly measured, the light energy is converted into electric energy by a selenium photocell or a silicon photocell, the current is measured by an internal ammeter, and the specific value of the illuminance is marked with lux as a scale.
[0120] In the first aspect, in the process of solving the preset coefficient, a plurality of color temperature values and a plurality of illuminance values can be manufactured, and two-by-two combinations can be formed to form N test environments. Based on the different color temperatures and illuminances in different environments, the RGB components in different images can be flexibly changed to reflect the color temperature factor in the environment in the image, so that the final obtained preset coefficient is related to the environmental color temperature factor. Further, when the obtained preset coefficient is applied to actual measurement, the influence of the environmental color temperature factor on the illuminance measurement is effectively considered, so that the measurement is more accurate. In the second aspect, the measurement method of the embodiment needs to obtain N sample images through N times of acquisition before application, so as to fill the related data in the sample images into the corresponding matrix, so as to obtain the preset coefficient through the calculation formula. In this way, the obtained preset coefficient is relatively accurate through a large number of test experiments, so as to ensure the accuracy of the measurement.
[0121] In the flow of the environmental illuminance measurement method of another embodiment of the present application, the sixth matrix can be obtained through linear fitting according to the ratio of the fourth matrix to the fifth matrix.
[0122] Optionally, the least square method is used for multiple linear regression fitting, and the formula is used to solve the preset coefficient corresponding to each color channel value to solve the sixth matrix.
[0123] In addition, other methods such as gradient descent method can also be used for fitting.
[0124] In the embodiment, the linear fitting method can be used to determine a preset coefficient corresponding to each color channel value, so as to determine the stability of the preset coefficient and reduce the measurement error.
[0125] In more embodiments, a nonlinear model can also be constructed according to the distribution of the collected data to fit.
[0126] In another flow of the environmental illuminance measurement method of the present application, the method further includes:
[0127] Step G1: determining a target display brightness according to the environmental illuminance value; the target display brightness is used to adjust the screen display brightness.
[0128] In the embodiment, different screen brightnesses suitable for human eye habits are preset for different illuminance environments (which can be preset when leaving the factory, or can be set by the user), so that the corresponding relationship between the environmental illuminance value and the screen brightness can be obtained. In the process of using the electronic device, the screen brightness can be automatically adjusted in real time according to the measured environmental illuminance value.
[0129] Optionally, the target display brightness is the screen brightness that needs to be adjusted under the current environment.
[0130] In the embodiment, an application scenario of the ambient illuminance value is provided to automatically adjust the screen brightness according to the ambient illuminance value, so that the adjustment of the screen brightness is more accurate on the basis of more accurate measurement of the ambient illuminance value.
[0131] In the flow of another ambient illuminance measurement method of the application, the method further includes:
[0132] Step H1: determining a target noise reduction parameter according to the ambient illuminance value; the target noise reduction parameter is used for noise reduction processing of the obtained image.
[0133] In the embodiment, the ambient illuminance value is taken as a parameter to be passed to a shooting algorithm. Taking a noise reduction algorithm as an example, differential image noise reduction processing can be performed according to the ambient illuminance value. For example, when the ambient illuminance value is high, the shooting picture noise level is low, and a weaker noise reduction parameter is used, more details can be retained to improve the picture definition; when the ambient illuminance value is low, the shooting picture noise level is high, and a stronger noise reduction parameter is used, some details can be sacrificed to eliminate more noise. For another example, the ambient illuminance distribution map can be passed to the shooting algorithm, and different noise reduction strengths are used in different illuminance regions in the picture, so that the noise in the dark region is eliminated while the definition of the bright region is well protected.
[0134] Optionally, the target noise reduction parameter is a noise reduction parameter that needs to be processed under the current shooting environment.
[0135] In the embodiment, an application scenario of the ambient illuminance value is provided to adaptively adjust the noise reduction parameter involved in the image processing according to the ambient illuminance value in the shooting scene, so that the noise reduction processing effect of the image is better on the basis of more accurate measurement of the ambient illuminance value.
[0136] In summary, the application utilizes the different characteristics of the spectral response curves of at least two groups of cameras, expands three color channels into a larger number of color channels, and pre-performs data calibration to generate a set of multi-channel RGB linear combination coefficients, and then calculates the ambient illuminance value based on the obtained coefficients. Compared with the measurement method of the prior art using a traditional single camera, only the linear combination of the spectral response curves of the three color channels of RGB is equal to the spectral visibility function, and the measurement has no error, but the actual camera spectral response curve cannot meet this condition, that is, there is no fixed proportional relationship between the light intensity sensed by the camera sensor and the light intensity sensed by the human eye; the application utilizes multiple groups of cameras to more accurately perceive the ambient illuminance in different environments, and to a certain extent, eliminates the calculation error caused by the difference between the spectral response curve and the spectral visibility function.
[0137] The environment illumination measurement method provided in the embodiments of the present application can be executed by an environment illumination measurement device. The environment illumination measurement method executed by the environment illumination measurement device is taken as an example in the embodiments of the present application to illustrate the environment illumination measurement device provided in the embodiments of the present application.
[0138] Figure 6 A block diagram of the environment illumination measurement device of another embodiment of the present application is shown, which comprises:
[0139] The first acquisition module 10 is configured to acquire at least two captured images; the pixel point positions of the at least two captured images correspond to each other;
[0140] The first determination module 20 is configured to, for each pixel point position, determine a pixel illumination value corresponding to the pixel point position according to the color channel values of each color channel corresponding to the pixel point position in the at least two captured images and the preset coefficients corresponding to each color channel value;
[0141] The second determination module 30 is configured to determine an environment illumination value according to the pixel illumination values corresponding to each pixel point position;
[0142] The preset coefficients of each color channel corresponding to the pixel point position in the at least two captured images are obtained based on at least two test environments, and the environment parameters of different test environments are different, and the environment parameters comprise at least one of the following: environment color temperature, environment illumination.
[0143] In this way, in the embodiments of the present application, at least two groups of cameras are set in the process of measuring the environment illumination, and the at least two groups of cameras acquire images based on the same shooting angle to obtain at least two corresponding images, and the pixel point positions on the at least two images correspond to each other. Further, the color channel values of the pixel point positions of each image in the at least two images are acquired respectively, and then the preset coefficients corresponding to each color channel value obtained based on different environment parameters are combined to determine the pixel illumination values corresponding to each pixel point position. Finally, the environment illumination value measured at present is determined according to the pixel illumination values corresponding to each pixel point position. As can be seen, in the embodiments of the present application, the spectral response curves of different cameras are different, and when the environment color temperature changes, the degrees of change of the RGB components sensed by different cameras are also different, so the amounts of change of the RGB values of different images are different with the change of the color temperature, and the color temperature change can be reflected in the finally obtained environment illumination value by combining the respective preset coefficients, thereby effectively improving the accuracy of the illumination measurement.
[0144] Optionally, the at least two captured images comprise a first image and a second image; and the color channels comprise a first color channel, a second color channel and a third color channel.
[0145] The first determination module 20 comprises:
[0146] The first obtaining unit is configured to obtain, for each pixel position, a first color channel value of the pixel position in a first color channel corresponding to a first image, a second color channel value of the pixel position in a second color channel corresponding to the first image, a third color channel value of the pixel position in a third color channel corresponding to the first image, a fourth color channel value of the pixel position in the first color channel corresponding to a second image, a fifth color channel value of the pixel position in the second color channel corresponding to the second image, and a sixth color channel value of the pixel position in the third color channel corresponding to the second image.
[0147] The second obtaining unit is configured to obtain a first coefficient corresponding to the first color channel value, a second coefficient corresponding to the second color channel value, a third coefficient corresponding to the third color channel value, a fourth coefficient corresponding to the fourth color channel value, a fifth coefficient corresponding to the fifth color channel value, and a sixth coefficient corresponding to the sixth color channel value.
[0148] The first determining unit is configured to determine a pixel luminance value corresponding to the pixel position according to the first color channel value, the second color channel value, the third color channel value, the fourth color channel value, the fifth color channel value, the sixth color channel value, and the first coefficient, the second coefficient, the third coefficient, the fourth coefficient, the fifth coefficient, and the sixth coefficient.
[0149] Optionally, the first determining module 20 includes:
[0150] The second determining unit is configured to determine, for each pixel position, a pixel gray value corresponding to the pixel position according to color channel values of each color channel corresponding to the pixel position in at least two captured images, and a preset coefficient corresponding to each color channel value.
[0151] The third determining unit is configured to determine a pixel luminance value corresponding to the pixel position according to the pixel gray value corresponding to the pixel position.
[0152] Optionally, the third determining unit includes:
[0153] The obtaining subunit is configured to obtain an image capture parameter corresponding to one of the at least two captured images.
[0154] The determining subunit is configured to determine a pixel luminance value corresponding to the pixel position according to the pixel gray value corresponding to the pixel position and the image capture parameter.
[0155] The image capture parameter includes a light sensitivity.
[0156] Optionally, the second determining module includes:
[0157] The third obtaining unit is configured to obtain a mean value of the pixel luminance values corresponding to the respective pixel positions.
[0158] The fourth determining unit is configured to determine the average value as the ambient illuminance value.
[0159] Optionally, the first determining module 20 comprises:
[0160] The fourth obtaining unit is configured to obtain, for each pixel position, an average value of the color channel values of the pixel position.
[0161] The fifth determining unit is configured to determine, according to the average value of the color channel values of the pixel position and the preset coefficient corresponding to each color channel value, a pixel illuminance value corresponding to the pixel position.
[0162] Optionally, the device further comprises:
[0163] The second obtaining module is configured to obtain, for each test environment, a reference illuminance value corresponding to the test environment and at least two sample images obtained under the test environment; the pixel positions of the at least two sample images correspond to each other.
[0164] The third determining module is configured to determine, for each test environment, an image gray value corresponding to the test environment according to the image acquisition parameter corresponding to one of the sample images and the reference illuminance value.
[0165] The fourth determining module is configured to determine, according to the color channel value of each color channel corresponding to the at least two sample images and the image gray value corresponding to the test environment, a preset coefficient corresponding to each color channel value.
[0166] Optionally, the device further comprises:
[0167] The fifth determining module is configured to determine a target display brightness according to the ambient illuminance value; the target display brightness is used to adjust the display brightness of the screen.
[0168] Optionally, the device further comprises:
[0169] The sixth determining module is configured to determine a target noise reduction parameter according to the ambient illuminance value; the target noise reduction parameter is used to perform noise reduction processing on the image obtained by shooting.
[0170] The environment illumination measuring apparatus in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other device than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or the like, and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, and the embodiments of the present application are not limited in this regard. The environment illumination measuring apparatus in the embodiments of the present application can be a device with a motion system. The motion system can be an Android motion system, an ios motion system, or other possible motion systems, and the embodiments of the present application are not limited in this regard.
[0171] The environment illumination measuring apparatus provided in the embodiments of the present application can implement each process implemented by the method embodiments, and thus repeated description is omitted here.
[0172] Optionally, as shown in The embodiments of the present application also provide an electronic device 100, which includes a processor 101, a memory 102, and a program or instruction stored in the memory 102 and executable on the processor 101. When the program or instruction is executed by the processor 101, each step of any of the above environment illumination measuring methods is implemented, and the same technical effects are achieved, and thus repeated description is omitted here.
[0173] Figure 7 It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device.
[0174] A hardware structure schematic diagram of an electronic device for implementing the embodiments of the present application.
[0175] Figure 8 A hardware structure schematic diagram of an electronic device for implementing the embodiments of the present application.
[0176] The electronic device 1000 includes, but is not limited to, a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc.
[0177] Those skilled in the art can understand that the electronic device 1000 can also include a power supply (such as a battery) for powering various components, and the power supply can be logically connected to the processor 1010 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than shown, or combine certain components, or different component arrangements, which will not be described here.
[0178] The user input unit 1007 is configured to acquire at least two acquisition images; pixel point positions of the at least two acquisition images correspond to each other; the processor 1010 is configured to, for each pixel point position, determine a pixel illuminance value corresponding to the pixel point position according to color channel values of each color channel corresponding to the pixel point position in the at least two acquisition images and a preset coefficient corresponding to each color channel value; and determine an environment illuminance value according to the pixel illuminance value corresponding to each pixel point position; wherein the preset coefficient of each color channel corresponding to the pixel point position in the at least two acquisition images is obtained based on at least two test environments, and environment parameters of different test environments are different, and the environment parameters include at least one of the following: environment color temperature, environment illuminance.
[0179] In this way, in the embodiment of the present application, at least two groups of cameras are set in the process of measuring the environment illuminance, and the at least two groups of cameras acquire images based on the same shooting angle to obtain at least two corresponding images, and the pixel point positions on the at least two images correspond to each other. Further, the color channel values of the pixel point positions of each image in the at least two images are acquired respectively, and then the preset coefficient corresponding to each color channel value obtained based on different environment parameters is combined to determine the pixel illuminance value corresponding to each pixel point position. Finally, the environment illuminance value measured at present is determined according to the pixel illuminance value corresponding to each pixel point position. As can be seen, in the embodiment of the present application, based on the different spectral response curves of different cameras, when the environment color temperature changes, the degree of change of the RGB component sensed by different cameras will also be different, so the change amount of the RGB value of different images is different with the change of the color temperature, and the color temperature change can be reflected in the finally obtained environment illuminance value by combining the respective preset coefficients, thereby effectively improving the accuracy of illuminance measurement.
[0180] Optionally, the at least two captured images comprise a first image and a second image; the color channels comprise a first color channel, a second color channel and a third color channel; the processor 1010 is further configured to, for each pixel position, acquire a first color channel value of the pixel position in the first image corresponding to the first color channel, a second color channel value of the pixel position in the first image corresponding to the second color channel, a third color channel value of the pixel position in the first image corresponding to the third color channel, a fourth color channel value of the pixel position in the second image corresponding to the first color channel, a fifth color channel value of the pixel position in the second image corresponding to the second color channel, and a sixth color channel value of the pixel position in the second image corresponding to the third color channel; acquire a first coefficient corresponding to the first color channel value, a second coefficient corresponding to the second color channel value, a third coefficient corresponding to the third color channel value, a fourth coefficient corresponding to the fourth color channel value, a fifth coefficient corresponding to the fifth color channel value, and a sixth coefficient corresponding to the sixth color channel value; and determine a pixel luminance value corresponding to the pixel position according to the first color channel value, the second color channel value, the third color channel value, the fourth color channel value, the fifth color channel value, the sixth color channel value, the first coefficient, the second coefficient, the third coefficient, the fourth coefficient, the fifth coefficient, and the sixth coefficient.
[0181] Optionally, the processor 1010 is further configured to, for each pixel position, determine a pixel gray value corresponding to the pixel position according to color channel values of the pixel position in the at least two captured images corresponding to each color channel and a preset coefficient corresponding to each color channel value; and determine a pixel luminance value corresponding to the pixel position according to the pixel gray value corresponding to the pixel position.
[0182] Optionally, the processor 1010 is further configured to acquire an image capture parameter corresponding to one of the at least two captured images; and determine a pixel luminance value corresponding to the pixel position according to the pixel gray value corresponding to the pixel position and the image capture parameter; wherein the image capture parameter comprises a photosensitive sensitivity.
[0183] Optionally, the processor 1010 is further configured to acquire a mean value of pixel luminance values corresponding to each pixel position; and take the mean value as the ambient luminance value.
[0184] Optionally, the processor 1010 is further configured to, for each pixel position, acquire a mean value of color channel values of the pixel position; and determine a pixel luminance value corresponding to the pixel position according to the mean value of the color channel values of the pixel position and a preset coefficient corresponding to each color channel value.
[0185] Optionally, the processor 1010 is further configured to obtain, for each test environment, a reference illuminance value corresponding to the test environment and at least two sample images obtained under the test environment; the pixel positions of the at least two sample images correspond to each other; for each test environment, determine an image gray value corresponding to the test environment according to an image acquisition parameter corresponding to one of the sample images and the reference illuminance value; and determine a preset coefficient corresponding to each color channel value according to the color channel value of each color channel corresponding to the at least two sample images and the image gray value corresponding to the test environment.
[0186] Optionally, the processor 1010 is further configured to determine a target display brightness according to the ambient illuminance value; the target display brightness is used to adjust the screen display brightness.
[0187] Optionally, the processor 1010 is further configured to determine a target noise reduction parameter according to the ambient illuminance value; the target noise reduction parameter is used to perform noise reduction processing on the obtained image.
[0188] In summary, the present application utilizes the different characteristics of the spectral response curves of at least two groups of cameras to expand three color channels to a larger number of color channels, and pre-performs data calibration to generate a set of multi-channel RGB linear combination coefficients, and then calculates the ambient illuminance value based on the obtained coefficients. Compared with the measurement method of the prior art using a traditional single camera, only the linear combination of the spectral response curves of the three color channels of RGB is equal to the spectral visibility function, and the measurement has no error. However, the actual camera spectral response curve cannot meet this condition, that is, there is no fixed proportional relationship between the light intensity sensed by the camera sensor and the light intensity sensed by the human eye. The present application utilizes multiple groups of cameras to accurately perceive the ambient illuminance under different environments, and to a certain extent, eliminates the calculation error caused by the difference between the spectral response curve and the spectral visibility function.
[0189] It should be understood that in the embodiments of the present application, the input unit 1004 can include a graphics processor (GPU) 10041 and a microphone 10042. The graphics processor 10041 processes image data of a still picture or a video image obtained by an image capture device (such as a camera) in a video image capture mode or an image capture mode. The display unit 1006 can include a display panel 10061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 can include two parts of a touch detection device and a touch controller. The other input devices 10072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), a trackball, a mouse, a motion stick, and the like, which will not be described here. The memory 1009 can be used to store software programs and various data, including but not limited to application programs and action systems. The processor 1010 can integrate an application processor and a modem processor, wherein the application processor mainly processes action systems, user pages and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1010.
[0190] The memory 1009 can be used to store software programs and various data. The memory 1009 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 1009 can include a volatile memory or a non-volatile memory, or the memory 1009 can include both a volatile memory and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 1009 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0191] The processor 1010 can include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1010.
[0192] The embodiments of the present application also provide a readable storage medium, the readable storage medium stores programs or instructions, the programs or instructions are executed by a processor to realize each process of the above-mentioned ambient illumination measurement method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described here.
[0193] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0194] The embodiment of the present application further provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions to realize the processes of the above-mentioned environment illumination measurement method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0195] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0196] The embodiment of the present application provides a computer program product, which is stored in a storage medium, and is executed by at least one processor to realize the processes of the above-mentioned environment illumination measurement method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0197] It should be noted that in this document, the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order, for example, the described method can be performed in an order different from the described order, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.
[0198] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of software and a necessary general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product in essence or in the form of a part that contributes to the prior art, which is stored in a storage medium (such as a ROM / RAM, a magnetic disc, an optical disc), and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0199] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.
Claims
1. A method of measuring ambient illuminance, characterized by, The method comprises: acquiring at least two acquisition images acquired by at least two groups of cameras; pixel point positions of the at least two acquisition images correspond to each other; wherein each group of cameras is used for acquiring at least one image, and spectral response curves of different groups of cameras are different; for each pixel point position, determining a pixel illuminance value corresponding to the pixel point position according to color channel values of each color channel corresponding to the pixel point position in the at least two acquisition images and preset coefficients corresponding to each color channel value; determining an environment illuminance value according to the pixel illuminance value corresponding to each pixel point position; wherein the preset coefficients of each color channel corresponding to the pixel point position in the at least two acquisition images are obtained based on at least two test environments, environment parameters of different test environments are different, and the environment parameters comprise at least one of the following: environment color temperature, environment illuminance.
2. The method of claim 1, wherein, The at least two acquisition images comprise a first image and a second image; the color channels comprise a first color channel, a second color channel and a third color channel; The method comprises: for each pixel point position, acquiring a first color channel value of the pixel point position corresponding to the first color channel in the first image, a second color channel value of the pixel point position corresponding to the second color channel in the first image, a third color channel value of the pixel point position corresponding to the third color channel in the first image, a fourth color channel value of the pixel point position corresponding to the first color channel in the second image, a fifth color channel value of the pixel point position corresponding to the second color channel in the second image, and a sixth color channel value of the pixel point position corresponding to the third color channel in the second image; acquiring a first coefficient corresponding to the first color channel value, a second coefficient corresponding to the second color channel value, a third coefficient corresponding to the third color channel value, a fourth coefficient corresponding to the fourth color channel value, a fifth coefficient corresponding to the fifth color channel value, and a sixth coefficient corresponding to the sixth color channel value; determining the pixel illuminance value corresponding to the pixel point position according to the first color channel value, the second color channel value, the third color channel value, the fourth color channel value, the fifth color channel value, the sixth color channel value, the first coefficient, the second coefficient, the third coefficient, the fourth coefficient, the fifth coefficient and the sixth coefficient.
3. The method of claim 1, wherein, The method comprises: for each pixel point position, determining a pixel gray value corresponding to the pixel point position according to color channel values of each color channel corresponding to the pixel point position in the at least two acquisition images and preset coefficients corresponding to each color channel value; According to the pixel gray value corresponding to the pixel point position, the pixel luminance value corresponding to the pixel point position is determined.
4. The method of claim 3, wherein, The pixel luminance value corresponding to the pixel point position is determined according to the pixel gray value corresponding to the pixel point position. An image acquisition parameter corresponding to one of the at least two acquisition images is acquired. The pixel luminance value corresponding to the pixel point position is determined according to the pixel gray value corresponding to the pixel point position and the image acquisition parameter. The image acquisition parameter includes photosensitive sensitivity.
5. The method of claim 1, wherein, The environment luminance value is determined according to the pixel luminance value corresponding to each pixel point position. A mean value of the pixel luminance values corresponding to each pixel point position is acquired. The mean value is taken as the environment luminance value.
6. The method of claim 1, wherein, For each pixel point position, the mean value of the color channel values of the pixel point position is acquired. The pixel luminance value corresponding to the pixel point position is determined according to the mean value of the color channel values of the pixel point position and the preset coefficient corresponding to each color channel value. The preset coefficient corresponding to each color channel value is acquired by the following steps:
7. The method of claim 1, wherein, For each test environment, a reference luminance value corresponding to the test environment and at least two sample images obtained under the test environment are acquired; the pixel point positions of the at least two sample images correspond to each other. For each test environment, an image gray value corresponding to the test environment is determined according to an image acquisition parameter corresponding to one of the sample images and the reference luminance value. The preset coefficient corresponding to each color channel value is determined according to the color channel value of each color channel corresponding to the at least two sample images and the image gray value corresponding to the test environment. The method further includes:
8. The method of claim 1, wherein, A target display brightness is determined according to the environment luminance value; the target display brightness is used to adjust the screen display brightness. The method further includes:
9. The method of claim 1, wherein, A target noise reduction parameter is determined according to the environment luminance value; the target noise reduction parameter is used to perform noise reduction processing on the obtained image. The device includes:
10. An ambient illuminance measuring device, characterized by A first acquisition module is configured to acquire at least two acquisition images collected by at least two groups of cameras; the pixel point positions of the at least two acquisition images correspond to each other; each group of cameras is configured to collect at least one image, and the spectral response curves of different groups of cameras are different; A first determination module is configured to determine, for each pixel point position, a pixel luminance value corresponding to the pixel point position according to the color channel value of each color channel corresponding to the pixel point position in the at least two acquisition images and a preset coefficient corresponding to each color channel value; A second determination module is configured to determine an environment luminance value according to the pixel luminance value corresponding to each pixel point position. The preset coefficients of the pixel point position corresponding to each color channel of the at least two captured images are obtained based on at least two test environments, and environment parameters of different test environments are different, and the environment parameters include at least one of the following: environment color temperature, environment illumination.
11. The apparatus of claim 10, wherein, The at least two captured images include a first image and a second image; and the color channels include a first color channel, a second color channel and a third color channel. The first determining module includes: The first obtaining unit is configured to, for each pixel point position, obtain a first color channel value of the pixel point position corresponding to the first color channel of the first image, a second color channel value of the pixel point position corresponding to the second color channel of the first image, a third color channel value of the pixel point position corresponding to the third color channel of the first image, a fourth color channel value of the pixel point position corresponding to the first color channel of the second image, a fifth color channel value of the pixel point position corresponding to the second color channel of the second image, and a sixth color channel value of the pixel point position corresponding to the third color channel of the second image. The second obtaining unit is configured to obtain a first coefficient corresponding to the first color channel value, a second coefficient corresponding to the second color channel value, a third coefficient corresponding to the third color channel value, a fourth coefficient corresponding to the fourth color channel value, a fifth coefficient corresponding to the fifth color channel value, and a sixth coefficient corresponding to the sixth color channel value. The first determining unit is configured to determine a pixel illumination value corresponding to the pixel point position according to the first color channel value, the second color channel value, the third color channel value, the fourth color channel value, the fifth color channel value, the sixth color channel value, the first coefficient, the second coefficient, the third coefficient, the fourth coefficient, the fifth coefficient and the sixth coefficient.
12. The apparatus of claim 10, wherein, The first determining module includes: The second determining unit is configured to, for each pixel point position, determine a pixel gray value corresponding to the pixel point position according to color channel values of the pixel point position corresponding to each color channel of the at least two captured images and preset coefficients corresponding to each color channel value. The third determining unit is configured to determine a pixel illumination value corresponding to the pixel point position according to the pixel gray value corresponding to the pixel point position.
13. The apparatus of claim 12, wherein, The third determining unit includes: The obtaining subunit is configured to obtain an image capture parameter corresponding to one of the at least two captured images. The determining subunit is configured to determine a pixel illumination value corresponding to the pixel point position according to the pixel gray value corresponding to the pixel point position and the image capture parameter. The image capture parameter includes photosensitive sensitivity.
14. An electronic device, comprising: The processor and the memory, the memory stores programs or instructions that can be run on the processor, the programs or instructions are executed by the processor to realize the steps of the environment illumination measurement method in any one of claims 1-9.
15. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to realize the steps of the environment illumination measurement method in any one of claims 1-9.
Citation Information
Patent Citations
Smart home lighting data collection terminal
CN108650455A
Illuminance calculation device, illumination control system and program
JP2017062921A