Disclosure of Invention
The application provides an exposure parameter adjustment method, an exposure parameter adjustment device, computer equipment and a readable storage medium.
Embodiments of the application may be implemented as follows:
in a first aspect, the present application provides an exposure parameter adjustment method, applied to a computer device, where the computer device is in communication connection with a projector, and the computer device stores a state parameter comparison model, where the state parameter comparison model includes a plurality of state parameters and exposure parameters corresponding to each state parameter;
the method comprises the following steps:
acquiring a current state parameter of a projector;
determining a target exposure parameter corresponding to the current state parameter from a state parameter comparison model according to the current state parameter;
the target exposure parameters are sent to the projector so that the projector adjusts according to the target exposure parameters.
In an alternative embodiment, the state parameter control model is constructed by:
acquiring a standard image of a projector, wherein the standard image is an ideal projection image of the projector;
acquiring a sample image shot by a projector under each state parameter;
and calculating exposure parameters corresponding to each state parameter according to the standard image and each sample image to construct a state parameter comparison model.
In an alternative embodiment, the step of calculating an exposure parameter corresponding to each state parameter according to the standard image and each sample image includes:
acquiring a target sample image shot by a projector under the condition of a target state parameter and image attributes of the target sample image, wherein the target state parameter is any one of a plurality of state parameters;
calculating exposure parameters corresponding to the target state parameters according to the image attributes of the standard image and the image attributes of the target sample image;
repeating the steps until the exposure parameters corresponding to each state parameter are calculated.
In an alternative embodiment, the step of calculating the exposure parameter corresponding to the target state parameter according to the image attribute of the standard image and the image attribute of the target sample image includes:
according to the image attribute of the standard image and the image attribute of the target sample image, calculating according to a preset formula to obtain similar structure values of the standard image and the target sample image under the undetermined exposure parameters;
and adjusting the undetermined exposure parameters until the similar structure value reaches a preset threshold value, and taking the current undetermined exposure parameters as exposure parameters corresponding to the target state parameters.
In an alternative embodiment, the preset formula is:
wherein SSIM (x, y) is the similar structural value of the standard image x and the target sample image y, mux Mean value of standard image properties of standard image x, μy Mean value, sigma, of target sample image properties for target sample image yx Standard deviation sigma of standard image attribute of standard image xy Standard deviation, sigma, of target sample image properties for target sample image yxy Covariance of standard image properties of standard image x and target sample image properties of target sample image y, c1 and c2 Is constant.
In alternative embodiments, the status parameters include projector light engine brightness, ambient light level, distance used, and current projected picture contrast.
In a second aspect, the present application provides an exposure parameter adjustment device, applied to a computer device, where the computer device is in communication connection with a projector, and the computer device stores a state parameter comparison model, where the state parameter comparison model includes a plurality of state parameters and exposure parameters corresponding to each state parameter;
the device comprises:
the acquisition module is used for acquiring the current state parameters of the projector;
the determining module is used for determining a target exposure parameter corresponding to the current state parameter from the state parameter comparison model according to the current state parameter;
and the adjusting module is used for sending the target exposure parameters to the projector so that the projector can adjust according to the target exposure parameters.
In an alternative embodiment, the obtaining module is further configured to:
acquiring a standard image of a projector, wherein the standard image is an ideal projection image of the projector; acquiring a sample image shot by a projector under each state parameter; and calculating exposure parameters corresponding to each state parameter according to the standard image and each sample image to construct a state parameter comparison model.
In a third aspect, the present application provides a computer device comprising a processor and a non-volatile memory storing computer instructions that, when executed by the processor, perform the method of adjusting an exposure parameter of any one of the preceding embodiments.
In a fourth aspect, the present application provides a readable storage medium, where the readable storage medium includes a computer program, where the computer program when executed controls a computer device where the readable storage medium is located to perform the exposure parameter adjustment method according to any one of the foregoing embodiments.
The beneficial effects of the embodiment of the application include, for example: the embodiment of the application provides an exposure parameter adjusting method, an exposure parameter adjusting device, computer equipment and a readable storage medium, wherein the current state parameters of a projector are obtained; determining a target exposure parameter corresponding to the current state parameter from the state parameter comparison model according to the current state parameter; and then the target exposure parameters are sent to the projector so that the projector can adjust according to the target exposure parameters, and the state parameter comparison model is skillfully utilized to realize automatic adjustment of the exposure parameters of the projector under different state parameters.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the description of the present application, it should be noted that, if the terms "upper", "lower", "inner", "outer", and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or the azimuth or the positional relationship in which the inventive product is conventionally put in use, it is merely for convenience of describing the present application and simplifying the description, and it is not indicated or implied that the apparatus or element referred to must have a specific azimuth, be configured and operated in a specific azimuth, and thus it should not be construed as limiting the present application.
Furthermore, the terms "first," "second," and the like, if any, are used merely for distinguishing between descriptions and not for indicating or implying a relative importance.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
With the innovation and popularization of projector technology, projectors are used in more places in daily life of people, including replacing functions of some traditional home appliances such as color televisions. Under the large background of diversified demands, the projector itself is provided with a camera, and in some special scenes, corresponding shooting functions also need to be developed, but in the prior art, due to brightness differences among projector models and actual projection use scene differences, even cameras produced in the same batch of projectors adopt preset parameters of factory configuration and basic automatic exposure of the camera, so that the requirements of shooting clear projection pictures in various complex scenes cannot be met.
Based on this, referring to fig. 1 in combination, fig. 1 is an interactive schematic diagram of an exposure parameter adjustment system according to an embodiment of the present application. The exposure parameter adjustment system may include a computer device 100 and a projector 200 communicatively connected to the computer device 100, where the computer device 100 stores a state parameter comparison model, and the state parameter comparison model includes a plurality of state parameters and exposure parameters corresponding to each state parameter.
In order to solve the foregoing problems, please refer to fig. 2, fig. 2 is a flowchart illustrating steps of an exposure parameter adjustment method according to an embodiment of the present application, wherein the exposure parameter adjustment method may be implemented by the computer device 100 in fig. 1, and the exposure parameter adjustment method is described in detail below.
In step 201, current state parameters of projector 200 are obtained.
Step 202, determining a target exposure parameter corresponding to the current state parameter from the state parameter comparison model according to the current state parameter.
In step 203, the target exposure parameters are sent to the projector 200, so that the projector 200 adjusts according to the target exposure parameters.
In the embodiment of the present application, the state parameters include the brightness of the optical machine of the projector 200, the ambient light brightness, the use distance and the contrast of the current projection picture, wherein the brightness of the optical machine of the projector 200 can be directly obtained as the self attribute of the projector 200, the use distance and the contrast of the projection picture can be calculated in real time, and meanwhile, the sensor can be arranged to acquire the ambient light brightness.
On this basis, as an alternative embodiment, the state parameter control model is constructed in the following manner.
In step 301, a standard image of projector 200 is acquired.
Wherein the standard image is an ideal projected image of projector 200.
In step 302, a sample image taken by projector 200 at each state parameter is acquired.
And step 303, calculating exposure parameters corresponding to each state parameter according to the standard image and each sample image to construct a state parameter comparison model.
In the embodiment of the present application, the standard image of the projector 200 may be acquired first, and it should be understood that the standard image is an ideal projection image of the projector 200, that is, the standard image is the original projection image that is most clear under the current state parameters.
Based on this, a sample image taken under each state parameter may be determined, and it should be noted that, in the embodiment of the present application, each state parameter may be formed by the brightness of the optical machine of the projector, the ambient light, the distance used, and the contrast of the current projection screen, and a new state parameter may be obtained by changing only one parameter at a time, and optionally, the brightness of the optical machine of the projector 200: every 100 lumens increase from 200 lumens to 1500 lumens requires a set of data to be acquired, 1500 lumens to 4000 lumens, once every 500 lumens. I.e. acquisition of data in several cases 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 2000, 2500, 3000, 3500, 4000. Ambient light brightness: data in three cases of full darkness, normal brightness, high brightness (sunlight irradiation) and the like. Distance used: and 0.5 m-5 m is collected into a group every 0.5 m. I.e. 0.5,1,1.5,2,2.5,3,3.5,4,4.5,5, so that a total of 19x 3x 10x 3 state parameters can be acquired. In other implementations of the embodiments of the present application, more or fewer state parameters may be selected for calculation according to actual needs, which is not limited herein.
On the basis of the foregoing, in order to more clearly describe the solution of the present application, the foregoing step 303 may be implemented in the following embodiments.
In a substep 303-1, the image of the target sample taken by the projector 200 under the condition of the target state parameter and the image attribute of the target sample image are acquired.
Wherein the target state parameter is any one of a plurality of state parameters.
In the substep 303-2, an exposure parameter corresponding to the target state parameter is calculated according to the image attribute of the standard image and the image attribute of the target sample image.
Substep 303-3, repeating the above steps until the exposure parameter corresponding to each state parameter is calculated.
In the embodiment of the application, the image attributes can comprise brightness, contrast and structure attributes of the image, and the exposure parameters corresponding to the target state parameters can be calculated based on the image attributes of the standard image as the image attributes of the reference set target sample image.
On this basis, as an alternative embodiment, the foregoing substep 303-2 may be implemented in the following specific manner.
(1) And calculating according to a preset formula and according to the image attribute of the standard image and the image attribute of the target sample image to obtain the similar structure value of the standard image and the target sample image under the undetermined exposure parameters.
(2) And adjusting the undetermined exposure parameters until the similar structure value reaches a preset threshold value, and taking the current undetermined exposure parameters as exposure parameters corresponding to the target state parameters.
Specifically, the silkworm chrysalis similar structure value can be used as the basis for evaluating the standard image and the sample image, after the target state parameter is determined, the target state parameter is kept unchanged, and meanwhile, the undetermined exposure parameter (parameters such as exposure time and exposure gain) of the projector 200 is adjusted, wherein it is understood that different similar structure values can be obtained by adjusting the undetermined exposure parameter under the condition that the similar structure value reaches a preset threshold value, and the current undetermined exposure parameter can be used as the exposure parameter corresponding to the target state parameter.
For part (1) of the aforementioned substep 303-2, the predetermined formula is:
wherein SSIM (x, y) is the similar structural value of the standard image x and the target sample image y, mux Mean value of standard image properties of standard image x, μy Mean value, sigma, of target sample image properties for target sample image yx Standard deviation sigma of standard image attribute of standard image xy Standard deviation, sigma, of target sample image properties for target sample image yxy Covariance of standard image properties of standard image x and target sample image properties of target sample image y, c1 and c2 Is constant, c1 =(k1 L)2 ,c2 =(k2 L)2 L is the dynamic range of the pixel value, k1 =0.01,k2 =0.02。
In the embodiment of the present application, the closer the standard image x and the target sample image y are, the closer the similar structure value SSIM (x, y) is to 1, and the preset threshold may be set to "0.95" to meet the requirement.
Through the steps, a state parameter comparison model which accords with the current situation of the projector 200 can be established, so that the projector 200 can be automatically adjusted to the optimal exposure parameters in different scenes based on the state parameter comparison model, and manual intervention is not needed.
The embodiment of the present application provides an exposure parameter adjusting apparatus 110, which is applied to a computer device 100, where the computer device 100 is in communication connection with a projector 200, and the computer device 100 stores a state parameter comparison model, where the state parameter comparison model includes a plurality of state parameters and exposure parameters corresponding to each state parameter, as shown in fig. 3, the exposure parameter adjusting apparatus 110 includes:
an obtaining module 1101 is configured to obtain a current state parameter of the projector 200.
And a determining module 1102, configured to determine, according to the current state parameter, a target exposure parameter corresponding to the current state parameter from the state parameter comparison model.
The adjusting module 1103 is configured to send the target exposure parameter to the projector 200, so that the projector 200 adjusts according to the target exposure parameter.
Further, the obtaining module 1101 is further configured to:
acquiring a standard image of the projector 200, wherein the standard image is an ideal projection image of the projector 200; acquiring a sample image photographed by the projector 200 under each state parameter; and calculating exposure parameters corresponding to each state parameter according to the standard image and each sample image to construct a state parameter comparison model.
Further, the obtaining module 1101 is specifically configured to:
acquiring a target sample image and image attributes of the target sample image captured by the projector 200 under the condition of a target state parameter, wherein the target state parameter is any one of a plurality of state parameters; calculating exposure parameters corresponding to the target state parameters according to the image attributes of the standard image and the image attributes of the target sample image; repeating the steps until the exposure parameters corresponding to each state parameter are calculated.
Further, the obtaining module 1101 is further specifically configured to:
according to the image attribute of the standard image and the image attribute of the target sample image, calculating according to a preset formula to obtain similar structure values of the standard image and the target sample image under the undetermined exposure parameters; and adjusting the undetermined exposure parameters until the similar structure value reaches a preset threshold value, and taking the current undetermined exposure parameters as exposure parameters corresponding to the target state parameters.
The embodiment of the application provides a computer device 100, where the computer device 100 includes a processor and a nonvolatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device 100 executes the exposure parameter adjustment method described above. As shown in fig. 4, fig. 4 is a block diagram of a computer device 100 according to an embodiment of the present application. The computer apparatus 100 includes an exposure parameter adjustment device 110, a memory 111, a processor 112, and a communication unit 113.
For data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly. For example, the elements may be electrically connected to each other via one or more communication buses or signal lines. The exposure parameter adjustment apparatus 110 includes at least one software function module that can be stored in the memory 111 in the form of software or firmware (firmware) or cured in an Operating System (OS) of the computer device 100. The processor 112 is configured to execute executable modules stored in the memory 111, such as software functional modules and computer programs included in the exposure parameter adjustment apparatus 110.
An embodiment of the present application provides a readable storage medium, where the readable storage medium includes a computer program, and when the computer program runs, the computer device 100 where the readable storage medium is located is controlled to execute the foregoing exposure parameter adjustment method.
In summary, the embodiments of the present application provide the beneficial effects of the embodiments of the present application including, for example: the embodiment of the application provides an exposure parameter adjusting method, an exposure parameter adjusting device, computer equipment and a readable storage medium, wherein the current state parameters of a projector are obtained; determining a target exposure parameter corresponding to the current state parameter from the state parameter comparison model according to the current state parameter; and then the target exposure parameters are sent to the projector so that the projector can adjust according to the target exposure parameters, and the state parameter comparison model is skillfully utilized to realize automatic adjustment of the exposure parameters of the projector under different state parameters.
The present application is not limited to the above embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present application are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.