Light supplement lamp control method and device, equipment and storage medium
By quickly obtaining the pixel size and picture brightness of the image sensor, determining the brightness variable and adjusting the brightness of the fill light, the problem of low brightness adjustment efficiency in traditional methods is solved, achieving more efficient picture brightness adjustment and a more stable user experience.
Patent Information
- Application Number
- CN202411424669.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-18
AI Technical Summary
The traditional fill light brightness adjustment method is inefficient, mainly because the brightness sensor detection process is a passive response method, which leads to delay and complex calculations, which affects the rapid adjustment of fill light brightness.
By obtaining the pixel size and picture brightness of the image sensor, the brightness mutation variable is quickly determined, and the brightness mutation variable is adjusted based on the pixel size relationship to obtain the brightness adjustment coefficient, and then the brightness brightness of the fill light is quickly adjusted.
The efficiency of filling light brightness adjustment is improved, the invisible switching of image sensors is realized, the picture brightness stability of the camera equipment in a changing environment is improved, and cost and resource consumption is reduced.
Smart Images

Figure CN119484990A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to the field of camera technology, and in particular to a fill light control method, device, equipment and storage medium. Background Art
[0002] For camera devices with multiple image sensors, the pixel size of each image sensor is different, and the corresponding amount of light entering is different, resulting in a sudden change in the brightness of the picture when the image sensor is switched. The brightness of the fill light needs to be adjusted to maintain a good picture brightness.
[0003] At present, the traditional method of adjusting the brightness of the fill light usually uses a brightness sensor to detect the ambient brightness in real time, and then determines the target brightness of the fill light based on the ambient brightness. However, the brightness sensor detection process is a passive response method, and both the detection request process and the data transmission process will produce a large delay. In addition, the target brightness determination process requires complex calculations, which results in a long target brightness determination process and low fill light brightness adjustment efficiency. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The embodiments of the present application provide a fill light control method, device, equipment and storage medium, which can improve the adjustment efficiency of the fill light brightness.
[0006] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a fill light control method, which is applied to a camera device, wherein the camera device includes a fill light and at least two image sensors, and the fill light brightness adjustment method includes: obtaining the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled; when the currently enabled image sensor is switched to the image sensor to be enabled, determining the brightness mutation amount according to the picture brightness and the pixel size of the two image sensors before and after the switching, wherein the pixel sizes of the two image sensors before and after the switching are different; adjusting the brightness mutation amount based on the size relationship between the pixel sizes of the two image sensors before and after the switching to obtain a brightness adjustment coefficient; obtaining the initial brightness of the fill light, adjusting the initial brightness based on the brightness adjustment coefficient to obtain a target brightness, and adjusting the brightness of the fill light to the target brightness.
[0007] In some embodiments, the image sensor before switching is used as the first sensor, and the image sensor after switching is used as the second sensor, the picture brightness of the first sensor is used as the first brightness, the picture brightness of the second sensor is used as the second brightness, the pixel size of the first sensor is used as the first size, and the pixel size of the second sensor is used as the second size, and the brightness mutation amount is determined according to the picture brightness and the pixel size of the two image sensors before and after switching, including: determining a brightness parameter item based on the product of the ratio between the second size and the first size and the first brightness; determining the brightness mutation amount based on the ratio between the second brightness and the brightness parameter item.
[0008] In some embodiments, the brightness mutation amount is adjusted based on the size relationship between the pixel sizes of the two image sensors before and after switching to obtain a brightness adjustment coefficient, including: when the first size is smaller than the second size, the brightness adjustment coefficient is determined based on the inverse of the brightness mutation amount; or, when the first size is greater than or equal to the second size, the brightness mutation amount is determined as the brightness adjustment coefficient.
[0009] In some embodiments, determining the brightness mutation amount based on the ratio between the second brightness and the brightness parameter item includes: determining the initial mutation amount based on the ratio between the second brightness and the brightness parameter item; inputting the initial mutation amount and the first image gain of the first sensor into a variable prediction model for regression prediction to obtain the brightness mutation amount, wherein the first image gain is obtained from the first sensor before switching to the second sensor.
[0010] In some embodiments, the obtaining of the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled includes: obtaining the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the image gain of the currently enabled image sensor; if the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, switching the currently enabled image sensor to the image sensor to be enabled, and obtaining the picture brightness of the image sensor to be enabled.
[0011] In some embodiments, the obtaining of the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled includes: obtaining the pixel size, picture brightness, and image gain of each of the image sensors; if the picture brightness of the currently enabled image sensor meets a first switching condition, or the image gain of the currently enabled image sensor meets a second switching condition, switching the currently enabled image sensor to the image sensor to be enabled.
[0012] In some embodiments, the number of the image sensors is greater than or equal to three, one of the multiple image sensors is the currently enabled image sensor, and the remaining image sensors all have corresponding first switching conditions and corresponding second switching conditions, and if the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled, including: if the picture brightness of the currently enabled image sensor meets any one of the first switching conditions, the image sensor to be enabled is determined from each of the image sensors, and the currently enabled image sensor is switched to the image sensor to be enabled; or, if the picture brightness of the currently enabled image sensor meets any one of the second switching conditions, the image sensor to be enabled is determined from each of the image sensors, and the currently enabled image sensor is switched to the image sensor to be enabled.
[0013] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes a fill light control device, which is applied to a camera device, wherein the camera device includes a fill light and at least two image sensors, and the fill light control device includes: an acquisition module, which is used to acquire the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled; a processing module, which is used to determine the brightness mutation amount according to the picture brightness and the pixel size of the two image sensors before and after switching the currently enabled image sensor to the image sensor to be enabled, wherein the pixel sizes of the two image sensors before and after switching are different; an adjustment module, which is used to adjust the brightness mutation amount based on the size relationship between the pixel sizes of the two image sensors before and after switching to obtain a brightness adjustment coefficient; a control module, which is used to acquire the initial brightness of the fill light, adjust the initial brightness based on the brightness adjustment coefficient to obtain a target brightness, and adjust the brightness of the fill light to the target brightness.
[0014] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the fill light control method described in the first aspect when executing the computer program.
[0015] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the fill light control method described in the first aspect above.
[0016] The embodiment of the present application includes at least the following beneficial effects: by acquiring the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled, and then when the currently enabled image sensor is switched to the image sensor to be enabled, the brightness mutation amount is determined according to the picture brightness and pixel size corresponding to the two image sensors before and after the switching. Since the acquisition process of the pixel size and the picture brightness belongs to the active response mode, the pixel size and the picture brightness can be quickly acquired, and then the brightness mutation amount can be quickly determined. Then, based on the size relationship between the pixel sizes corresponding to the two image sensors before and after the switching, the brightness mutation amount is adjusted to obtain the brightness adjustment coefficient. Finally, the initial brightness of the fill light is acquired, and the initial brightness is adjusted based on the brightness adjustment coefficient. The target brightness can be quickly obtained, and then the brightness of the fill light is adjusted to the target brightness. Compared with the brightness sensor detection process of the passive response mode, the adjustment efficiency of the fill light brightness can be effectively improved, the senseless switching of the image sensor can be realized, and the picture brightness stability of the camera device in a changing environment can be improved, thereby improving the user experience. In addition, there is no need to set a brightness sensor, which can effectively save costs and save communication port resources of the camera device.
[0017] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0019] Figure 1 A schematic diagram of an optional flow chart of a fill light control method provided in an embodiment of the present application;
[0020] Figure 2A schematic diagram of an optional process for determining a brightness mutation amount provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of an optional process for determining a brightness adjustment coefficient provided in an embodiment of the present application;
[0022] Figure 4 An optional specific flow chart of determining the brightness mutation amount provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of an optional process of obtaining various operation parameters and switching image sensors provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of another optional flow chart for obtaining various operation parameters and switching image sensors provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of an optional specific process of switching image sensors provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of an optional structure of the fill light control device provided in the embodiment of the present application;
[0027] Fig. 9 A schematic diagram of an optional hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. Among them, the target object can be a user. In addition, when the embodiment of the present application needs to obtain the target object attribute information, the target object's separate permission or separate consent will be obtained by means of a pop-up window or jumping to a confirmation page, etc., and after the separate permission or separate consent of the target object is clearly obtained, the necessary target object-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0030] In the description of this application, “several” means one or more, “more” means more than two, “greater than”, “less than”, “exceed”, etc. are understood to exclude the number, and “above”, “below”, “within”, etc. are understood to include the number.
[0031] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] At present, the traditional method of adjusting the brightness of the fill light usually uses a brightness sensor to detect the ambient brightness in real time, and then determines the target brightness of the fill light based on the ambient brightness. However, the brightness sensor detection process is a passive response method, and both the detection request process and the data transmission process will produce a large delay. In addition, the target brightness determination process requires complex calculations, which results in a long target brightness determination process and low fill light brightness adjustment efficiency.
[0033] In response to the problem of low adjustment efficiency of fill light brightness, the present application provides a fill light control method, device, equipment and storage medium, which are applied to a camera device, wherein the camera device includes a fill light and at least two image sensors, and the fill light brightness adjustment method includes: obtaining the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor and the picture brightness of the image sensor to be enabled; when the currently enabled image sensor is switched to the image sensor to be enabled, determining the brightness mutation amount according to the picture brightness and the pixel size of the two image sensors before and after the switching, wherein the pixel sizes of the two image sensors before and after the switching are different; adjusting the brightness mutation amount based on the size relationship between the pixel sizes of the two image sensors before and after the switching to obtain a brightness adjustment coefficient; obtaining the initial brightness of the fill light, adjusting the initial brightness based on the brightness adjustment coefficient to obtain a target brightness, and adjusting the brightness of the fill light to the target brightness.
[0034] According to the solution provided by the embodiment of the present application, by acquiring the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled, and then when the currently enabled image sensor is switched to the image sensor to be enabled, the brightness mutation amount is determined according to the picture brightness and pixel size corresponding to the two image sensors before and after the switching. Since the acquisition process of the pixel size and the picture brightness belongs to the active response mode, the pixel size and the picture brightness can be quickly acquired, and then the brightness mutation amount can be quickly determined. Then, based on the size relationship between the pixel sizes corresponding to the two image sensors before and after the switching, the brightness mutation amount is adjusted to obtain the brightness adjustment coefficient. Finally, the initial brightness of the fill light is acquired, and the initial brightness is adjusted based on the brightness adjustment coefficient. The target brightness can be quickly obtained, and then the brightness of the fill light is adjusted to the target brightness. Compared with the brightness sensor detection process of the passive response mode, the adjustment efficiency of the fill light brightness can be effectively improved, the senseless switching of the image sensor can be realized, and the picture brightness stability of the camera device in a changing environment can be improved, thereby improving the user experience. In addition, there is no need to set a brightness sensor, which can effectively save costs and save communication port resources of the camera device.
[0035] The fill light control method, device, equipment and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the fill light control method in the embodiments of the present application is described.
[0036] The fill light control method provided in the embodiment of the present application relates to the field of computer technology. The fill light control method provided in the embodiment of the present application can be applied to a camera device. In some embodiments, the camera device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the software can be an application for implementing the fill light control method, etc., but is not limited to the above forms.
[0037] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0038] like Figure 1 As shown, Figure 1 An optional flow chart of a fill light control method provided in an embodiment of the present application, the fill light control method can be executed by a camera device, the camera device includes a fill light and at least two image sensors, and the fill light control method includes but is not limited to the following steps S110 to S140:
[0039] Step S110 , obtaining the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled.
[0040] Step S120, after the currently enabled image sensor is switched to the image sensor to be enabled, the brightness mutation amount is determined according to the picture brightness and pixel size of the two image sensors before and after the switching.
[0041] Step S130 , adjusting the brightness mutation amount based on the size relationship between the pixel sizes of the two image sensors before and after the switching to obtain a brightness adjustment coefficient.
[0042] Step S140, obtaining the initial brightness of the fill light, adjusting the initial brightness based on the brightness adjustment coefficient to obtain the target brightness, and adjusting the brightness of the fill light to the target brightness.
[0043] The pixel sizes of the two image sensors before and after the switching are different.
[0044] It should be noted that the pixel size of each image sensor is a fixed value and only needs to be obtained once.
[0045] It should be noted that the pixel size of each image sensor is preset in the memory of the camera device and can be directly obtained without further steps; the screen brightness of the image sensor can be calculated through the target image captured by the image sensor, that is, the screen brightness of the image sensor is used to characterize the brightness information of the target image, and the target image can be captured through the active response of the image sensor. Therefore, the screen brightness can be acquired faster. Based on this, by obtaining the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled, and then when the currently enabled image sensor is switched to the image sensor to be enabled, the brightness mutation amount is determined according to the picture brightness and pixel size corresponding to the two image sensors before and after the switching. Since the acquisition process of the pixel size and the picture brightness belongs to the active response mode, the pixel size and the picture brightness can be quickly obtained, and then the brightness mutation amount can be quickly determined. Then, based on the size relationship between the pixel sizes corresponding to the two image sensors before and after the switching, the brightness mutation amount is adjusted to obtain the brightness adjustment coefficient. Finally, the initial brightness of the fill light is obtained, and the initial brightness is adjusted based on the brightness adjustment coefficient. The target brightness can be quickly obtained, and then the brightness of the fill light is adjusted to the target brightness. Compared with the brightness sensor detection process of the passive response mode, the adjustment efficiency of the fill light brightness can be effectively improved, the senseless switching of the image sensor can be realized, and the picture brightness stability of the camera device in a changing environment can be improved, thereby improving the user experience. In addition, there is no need to set a brightness sensor, which can effectively save costs and save communication port resources of the camera device.
[0046] In addition, refer to Figure 2In one embodiment, the image sensor before switching is used as the first sensor, the image sensor after switching is used as the second sensor, the screen brightness of the first sensor is used as the first brightness, the screen brightness of the second sensor is used as the second brightness, the pixel size of the first sensor is used as the first size, and the pixel size of the second sensor is used as the second size. According to the screen brightness and pixel size of the two image sensors before and after switching, the brightness mutation amount is determined, including but not limited to the following steps:
[0047] Step S210: determining a brightness parameter item based on a product of a ratio between the second size and the first size and the first brightness.
[0048] Step S220: determining a brightness mutation amount based on a ratio between the second brightness and the brightness parameter item.
[0049] Wherein, when the second size is larger than the first size, the first scale parameter is determined according to the quotient of the second size and the first size, the brightness parameter item is the product of the first scale parameter and the first brightness, and the brightness mutation amount is the quotient of the second brightness and the brightness parameter item. Wherein, when the second size is smaller than the first size, the second scale parameter is determined according to the quotient of the first size and the second size, the brightness parameter item is the product of the second scale parameter and the second brightness, and the brightness mutation amount is the quotient of the first brightness and the brightness parameter item.
[0050] It should be noted that since the value of the brightness parameter item is always smaller than the value of the second brightness or the first brightness, the brightness mutation amount is always a number greater than 1, and the brightness mutation amount contains the pixel size information of the two image sensors before and after switching, the picture brightness information before and after switching the image sensors, and the picture brightness change information before and after switching the image sensors.
[0051] It should be noted that the calculation formula for the brightness mutation is as follows:
[0052]
[0053] Among them, k is the amount of sudden change in the picture. It is assumed that of the two image sensors before and after the switching, the image sensor with a larger pixel size is a large-pixel sensor, and the other is a small-pixel sensor. bb is the picture brightness corresponding to the large-pixel sensor, aa is the picture brightness corresponding to the small-pixel sensor, b is the pixel size of the large-pixel sensor, and a is the pixel size of the small-pixel sensor.
[0054] Based on this, by determining the brightness parameter item based on the product of the ratio between the second size and the first size and the first brightness, and then determining the brightness mutation amount based on the ratio between the second brightness and the brightness parameter item, the organic connection between the pixel sizes corresponding to the first sensor and the second sensor and the picture brightness is utilized, so that the determined brightness mutation amount can characterize the degree of picture brightness mutation caused by switching image sensors in actual scenes. The brightness mutation amount, as an important participant in calculating the target brightness, can make the calculated target brightness more in line with the actual scene, thereby improving the actual effect of brightness adjustment of the fill light.
[0055] In addition, refer to Figure 3 In one embodiment, based on the size relationship between the pixel sizes of the two image sensors before and after the switching, the brightness mutation amount is adjusted to obtain a brightness adjustment coefficient, including but not limited to the following steps:
[0056] Step S310: when the first size is smaller than the second size, a brightness adjustment coefficient is determined based on the inverse of the brightness mutation amount.
[0057] Step S320: When the first size is greater than or equal to the second size, the brightness mutation amount is determined as the brightness adjustment coefficient.
[0058] It should be noted that since the larger the pixel size of the image sensor, the more light will enter a single pixel and the brighter the overall picture brightness will be. Therefore, when the first size is smaller than the second size, that is, the pixel size of the currently enabled image sensor is smaller than the pixel size of the image sensor to be enabled, when switching from the currently enabled image sensor to the image sensor to be enabled, the pixel size will increase, and therefore, the picture brightness will also increase accordingly. At this time, the inverse of the brightness mutation amount is used as the brightness adjustment coefficient, so that the brightness adjustment coefficient is less than 1, and then the brightness adjustment coefficient is used to adjust the initial brightness of the fill light to reduce the brightness of the fill light, which can avoid sudden changes in picture brightness.
[0059] In addition, as the pixel size of the image sensor is smaller, the amount of light entering a single pixel will be less, and the overall picture brightness will be darker. Therefore, when the first size is greater than or equal to the second size, that is, the box size of the currently enabled image sensor is greater than or equal to the pixel size of the image sensor to be enabled, when switching from the currently enabled image sensor to the image sensor to be enabled, the pixel size will decrease, and thus the picture brightness will decrease accordingly. At this time, the brightness mutation amount is directly used as the brightness adjustment coefficient, so that the brightness adjustment coefficient is greater than 1, and then the initial brightness of the fill light is adjusted using the brightness adjustment coefficient to increase the brightness of the fill light, which can avoid sudden changes in picture brightness.
[0060] It should be noted that the calculation formula of the brightness adjustment coefficient is as follows:
[0061]
[0062] Or as follows:
[0063] M ′ =k
[0064] Wherein, M is the brightness adjustment coefficient corresponding to step S310, M ′ is the brightness adjustment coefficient corresponding to step S320, and k in the above two formulas is the brightness mutation coefficient.
[0065] It should be noted that the calculation formula of the target brightness is as follows:
[0066]
[0067] Or as follows:
[0068] L ′ =O×M ′ =O×k
[0069] Wherein, L is the target brightness corresponding to step S310, L ′ is the target brightness corresponding to step S320, M is the brightness adjustment coefficient corresponding to step S310, and M ′ is the brightness adjustment coefficient corresponding to step S320, and k in the above two formulas is the brightness mutation coefficient.
[0070] Based on this, when the first size is smaller than the second size, the brightness adjustment coefficient is determined based on the inverse of the brightness mutation amount, or, when the first size is greater than or equal to the second size, the brightness mutation amount is determined as the brightness adjustment coefficient. The brightness adjustment coefficient reflects the change in picture brightness caused by switching sensors, and a quantitative analysis is made of the adjustment of the fill light brightness based on this, thereby improving the accuracy and reliability of the fill light brightness adjustment.
[0071] In addition, refer to Figure 4 In one embodiment, the brightness mutation amount is determined based on the ratio between the second brightness and the brightness parameter item, including but not limited to the following steps:
[0072] Step S410: determining an initial mutation amount based on a ratio between the second brightness and the brightness parameter item.
[0073] Step S420: input the initial mutation amount and the first image gain of the first sensor into a variable prediction model for regression prediction to obtain the brightness mutation amount.
[0074] The first image gain is acquired before the first sensor is switched to the second sensor, and the first image gain can be directly acquired in the memory of the camera device.
[0075] The initial mutation amount is the quotient of the second brightness and the brightness parameter item.
[0076] Based on this, the initial mutation amount is determined based on the ratio between the second brightness and the brightness parameter item, and then the initial mutation amount and the first image gain of the first sensor are input into the variable prediction model for regression prediction to obtain the brightness mutation amount. Since the initial mutation amount contains the pixel size information of the two image sensors before and after the switching and the picture brightness information before and after the switching of the image sensor, as well as the picture brightness change information before and after the switching of the image sensor, the first image gain of the first sensor contains the clarity information of the picture before the switching of the image sensor, and the initial mutation amount and the first image gain of the first sensor are both related to the picture brightness, therefore, the initial mutation amount and the first image gain of the first sensor both have a guiding role in determining the brightness mutation amount, so that the variable prediction model can simultaneously pay attention to the picture brightness information contained in the initial mutation amount and the first image gain of the first sensor, thereby accurately generating a dynamically changing brightness mutation amount, improving the brightness adjustment ability of the fill light, and improving the picture brightness stability of the camera equipment in a changing environment.
[0077] In one possible implementation, the variable prediction model is a pre-trained regression model, and the training steps of the variable prediction model are as follows:
[0078] Firstly, the initial mutation amount, the first image gain of the first sensor and the corresponding brightness mutation amount label are obtained, the feature of the initial mutation amount is extracted as the initial mutation amount feature, the feature of the first image gain of the first sensor is extracted as the first gain feature, the initial mutation amount feature and the first gain feature are input into the variable prediction model for regression processing, and the reference brightness mutation amount is obtained; then, the model loss is determined according to the reference brightness mutation amount and the brightness mutation amount label, and the variable prediction model is trained based on the model loss, so that the variable prediction model can learn and understand the intrinsic relationship between the initial mutation amount and the first image gain of the first sensor and the brightness mutation amount, and then the accurate brightness mutation amount is predicted by combining the initial mutation amount and the first image gain of the first sensor in the inference stage.
[0079] In addition, refer to Figure 5 In one embodiment, obtaining the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled includes but is not limited to the following steps:
[0080] Step S510 , obtaining the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the image gain of the currently enabled image sensor.
[0081] Step S520, if the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled, and the picture brightness of the image sensor to be enabled is obtained.
[0082] Among them, the first switching condition is one of the switching conditions. The first switching condition can be set to that the picture brightness of the currently enabled image sensor is within a predetermined brightness threshold range. For example, the first switching condition can be specifically set to that the picture brightness is greater than or equal to 20lux and less than 30lux. Assuming that the picture brightness of the currently enabled image sensor is 25lux, the picture brightness of the currently enabled image sensor is within the brightness threshold range corresponding to the first switching condition, which is equivalent to satisfying the first switching condition.
[0083] Then, the second switching condition is another switching condition. The second switching condition can be set to that the image gain of the currently enabled image sensor is within a predetermined gain threshold range. For example, the second switching condition can be specifically set to that the image gain is greater than or equal to 16 times and less than 128 times. Assuming that the image gain of the currently enabled image sensor is 16 times, the image gain of the currently enabled image sensor is within the gain threshold range corresponding to the second switching condition, which is equivalent to satisfying the second switching condition.
[0084] It should be noted that if the image brightness of the currently enabled image sensor does not meet the first switching condition, and the image gain of the currently enabled image sensor does not meet the second switching condition, there is no need to switch the image sensor. The image brightness and image gain of the currently enabled image sensor can be obtained again later, and it can be re-determined whether the image brightness of the currently enabled image sensor meets the first switching condition, or whether the image gain of the currently enabled image sensor meets the second switching condition.
[0085] Based on this, after obtaining the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the image gain of the currently enabled image sensor, if the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled, and the picture brightness of the image sensor to be enabled is obtained. Since both the first switching condition and the second switching condition quantify the problem of unsatisfactory current picture brightness, they can guide the switching of image sensors, so that the camera device can actively switch to a more suitable image sensor, realize the senseless switching of the image sensor, improve the efficiency of the fill light to adjust the brightness, and improve the overall user experience of the camera device; in addition, the picture brightness of the image sensor to be enabled is obtained only when the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, which can effectively save the number of times the picture brightness is obtained and reduce resource consumption.
[0086] Specifically, according to actual needs, the specific switching condition of the image sensor can be set to one of the following two conditions: Condition 1: If the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, then the currently enabled image sensor is switched to the image sensor to be enabled, that is, when either the first switching condition or the second switching condition is met, the image sensor needs to be switched; Condition 2: If the picture brightness of the currently enabled image sensor meets the first switching condition, and the image gain of the currently enabled image sensor meets the second switching condition, then the currently enabled image sensor is switched to the image sensor to be enabled, that is, the image sensor is switched only when the first switching condition and the second switching condition need to be met at the same time.
[0087] In addition, refer to Figure 6 In one embodiment, obtaining the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled includes but is not limited to the following steps:
[0088] Step S610, obtaining the pixel size, picture brightness and image gain of each image sensor.
[0089] Step S620 , if the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled.
[0090] It should be noted that the explanation of the first switching condition is consistent with the above, and the explanation of the second switching condition is consistent with the above, which will not be repeated here.
[0091] Based on this, after obtaining the pixel size, picture brightness and image gain of each image sensor, if the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled. Since the first switching condition and the second switching condition both quantify the problem of unsatisfactory current picture brightness, they can guide the switching of image sensors, so that the camera device can actively switch to a more suitable image sensor, realize the senseless switching of the image sensor, improve the efficiency of the fill light to adjust the brightness, and improve the overall user experience of the camera device. In addition, before judging whether the switching conditions are met, the picture brightness and image gain of each image sensor have been obtained in advance. After switching the image sensor, the brightness mutation amount can be quickly determined according to the picture brightness and pixel size of the two image sensors before and after the switching, thereby effectively improving the efficiency of the fill light to adjust the brightness.
[0092] In addition, refer to Figure 7 In one embodiment, the number of image sensors is greater than or equal to three, one of the multiple image sensors is a currently enabled image sensor, and the remaining image sensors all have corresponding first switching conditions and corresponding second switching conditions. If the image brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled, including but not limited to the following steps:
[0093] Step S710 : if the picture brightness of the currently enabled image sensor meets any first switching condition, an image sensor to be enabled is determined among the image sensors, and the currently enabled image sensor is switched to the image sensor to be enabled.
[0094] Step S720 : if the picture brightness of the currently enabled image sensor meets any second switching condition, an image sensor to be enabled is determined among the image sensors, and the currently enabled image sensor is switched to the image sensor to be enabled.
[0095] Exemplarily, it is assumed that when the initial shooting time period is noon, the image sensor enabled by the camera device is the first image sensor;
[0096] Then, when the shooting time is adjusted from noon to evening, the ambient light will become darker. Assuming that the screen brightness of the currently enabled first image sensor is 25 lux, the image gain of the first image sensor is 20 times, and the first switching condition corresponding to the second image sensor is that the screen brightness is greater than or equal to 20 lux and less than 30 lux, and the second switching condition corresponding to the second image sensor is that the image gain is greater than or equal to 16 times and less than 256 times. Therefore, at this time, the first switching condition and the second switching condition are met, and the first image sensor will be switched to the second image sensor;
[0097] Then, when the shooting time is adjusted from dusk to night again, the ambient light will become darker. Assuming that the picture brightness of the currently enabled second image sensor is 15 lux, the image gain of the second image sensor is 256 times, the first switching condition corresponding to the third image sensor is that the picture brightness is less than 20 lux, and the second switching condition corresponding to the third image sensor is that the image gain is greater than or equal to 256 times. Therefore, at this time, the first switching condition and the second switching condition are met, and the second image sensor will be switched to the third image sensor;
[0098] Then, when the shooting time is adjusted from evening to early morning again, the ambient light will become brighter. Assuming that the picture brightness of the currently enabled third image sensor is 25 lux, and the image gain of the third image sensor is 96 times, the first switching condition corresponding to the second image sensor is that the picture brightness is greater than or equal to 20 lux and less than 30 lux, and the second switching condition corresponding to the second image sensor is that the image gain is less than 128 times. Therefore, at this time, the first switching condition and the second switching condition are met, and the third image sensor will be switched to the second image sensor;
[0099] Then, when the shooting time is adjusted from early morning to noon again, the ambient light will become brighter. Assuming that the picture brightness of the currently enabled second image sensor is 40 lux and the image gain of the second image sensor is 4 times, the first switching condition corresponding to the first image sensor is that the picture brightness is greater than or equal to 30 lux, and the second switching condition corresponding to the first image sensor is that the image gain is less than 8 times. Therefore, at this time, the first switching condition and the second switching condition are met, and the second image sensor will be switched to the first image sensor.
[0100] It should be noted that the second switching condition corresponding to switching from the first image sensor to the second image sensor is that the gain is greater than or equal to 16 times, and the second switching condition corresponding to switching from the second image sensor to the first image sensor is that the gain is less than 8 times. The gain thresholds corresponding to the two second switching conditions are different, which can prevent repeated switching between the first image sensor and the second image sensor caused by gain fluctuations, reduce picture oscillation, and maintain picture stability. The effects of other switching image sensors are similar to the effects of the first switching of the image sensor.
[0101] Based on this, the number of image sensors is greater than or equal to three, one of the multiple image sensors is the currently enabled image sensor, and the remaining image sensors all have corresponding first switching conditions and corresponding second switching conditions. If the picture brightness of the currently enabled image sensor meets any one of the first switching conditions, the image sensor to be enabled is determined among each image sensor, and the currently enabled image sensor is switched to the image sensor to be enabled. Alternatively, if the picture brightness of the currently enabled image sensor meets any one of the second switching conditions, the image sensor to be enabled is determined among each image sensor, and the currently enabled image sensor is switched to the image sensor to be enabled. Therefore, using the first switching condition or the second switching condition to describe the poor brightness of the current picture and indicating the image sensor that can improve the brightness of the current picture, and then switching the image sensor, can make full use of the characteristics of multiple image sensors, so that the picture brightness can achieve a better effect.
[0102] In addition, refer to Figure 8 The present application also provides a fill light control device 800, which is applied to a camera device, wherein the camera device includes a fill light and at least two image sensors, including:
[0103] An acquisition module 810 is used to acquire the pixel size of each image sensor, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled;
[0104] The processing module 820 is used to determine the brightness mutation amount according to the picture brightness and pixel size of the two image sensors before and after the currently enabled image sensor is switched to the image sensor to be enabled, wherein the pixel sizes of the two image sensors before and after the switching are different;
[0105] An adjustment module 830, configured to adjust the brightness mutation amount based on the size relationship between the pixel sizes of the two image sensors before and after the switching to obtain a brightness adjustment coefficient;
[0106] The control module 840 is used to obtain the initial brightness of the fill light, adjust the initial brightness based on the brightness adjustment coefficient to obtain the target brightness, and adjust the brightness of the fill light to the target brightness.
[0107] It can be understood that the specific implementation of the fill light control device 800 is basically the same as the specific implementation of the above-mentioned fill light control method, and will not be repeated here.
[0108] In addition, refer to Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0109] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0110] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the fill light control method of the embodiment of this application;
[0111] Input / output interface 903, used to implement information input and output;
[0112] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0113] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0114] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0115] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned fill light control method.
[0116] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0117] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0118] It can be understood by those skilled in the art that Figures 1 to 9 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0119] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0121] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0122] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0123] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0124] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0127] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A fill light control method, characterized in that: Applied to a camera device, the camera device includes a fill light and at least two image sensors, and the fill light brightness adjustment method includes: Acquire the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled; After the currently enabled image sensor is switched to the image sensor to be enabled, determining a brightness mutation amount according to the picture brightness and the pixel sizes of the two image sensors before and after the switching, wherein the pixel sizes of the two image sensors before and after the switching are different; Based on the size relationship between the pixel sizes of the two image sensors before and after switching, the brightness mutation amount is adjusted to obtain a brightness adjustment coefficient; The initial brightness of the fill light is acquired, the initial brightness is adjusted based on the brightness adjustment coefficient to obtain a target brightness, and the brightness of the fill light is adjusted to the target brightness.
2. The fill light control method according to claim 1, characterized in that: The method uses the image sensor before switching as the first sensor, uses the image sensor after switching as the second sensor, uses the picture brightness of the first sensor as the first brightness, uses the picture brightness of the second sensor as the second brightness, uses the pixel size of the first sensor as the first size, uses the pixel size of the second sensor as the second size, and determines the brightness mutation amount according to the picture brightness and pixel size of the two image sensors before and after switching, including: Determine a brightness parameter item based on a product of a ratio between the second size and the first size and the first brightness; The brightness mutation amount is determined based on the ratio between the second brightness and the brightness parameter item.
3. The fill light control method according to claim 2, characterized in that: The adjusting the brightness mutation amount based on the size relationship between the pixel sizes of the two image sensors before and after the switching to obtain a brightness adjustment coefficient includes: When the first size is smaller than the second size, determining a brightness adjustment coefficient based on the inverse of the brightness mutation amount; Alternatively, when the first size is greater than or equal to the second size, the brightness mutation amount is determined as a brightness adjustment coefficient.
4. The fill light control method according to claim 2, characterized in that: The determining the brightness mutation amount based on the ratio between the second brightness and the brightness parameter item includes: Determining an initial mutation amount based on a ratio between the second brightness and the brightness parameter item; The initial mutation amount and the first image gain of the first sensor are input into a variable prediction model for regression prediction to obtain a brightness mutation amount, wherein the first image gain is obtained by the first sensor before switching to the second sensor.
5. The fill light control method according to claim 1, characterized in that: The acquiring the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled includes: Acquire the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the image gain of the currently enabled image sensor; If the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled, and the picture brightness of the image sensor to be enabled is obtained.
6. The fill light control method according to claim 1, characterized in that: The acquiring the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled includes: Obtaining the pixel size, picture brightness and image gain of each of the image sensors; If the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled.
7. The fill light control method according to claim 5 or 6, characterized in that: The number of the image sensors is greater than or equal to three, one of the multiple image sensors is the currently enabled image sensor, and the remaining image sensors all have corresponding first switching conditions and corresponding second switching conditions, and if the picture brightness of the currently enabled image sensor meets the first switching condition, or the image gain of the currently enabled image sensor meets the second switching condition, the currently enabled image sensor is switched to the image sensor to be enabled, comprising: If the picture brightness of the currently enabled image sensor meets any one of the first switching conditions, determining the image sensor to be enabled among the image sensors, and switching the currently enabled image sensor to the image sensor to be enabled; Alternatively, if the picture brightness of the currently enabled image sensor meets any one of the second switching conditions, the image sensor to be enabled is determined among the image sensors, and the currently enabled image sensor is switched to the image sensor to be enabled.
8. A fill light control device, characterized in that: Applied to a camera device, the camera device includes a fill light and at least two image sensors, and the fill light control device includes: An acquisition module, used for acquiring the pixel size of each of the image sensors, the picture brightness of the currently enabled image sensor, and the picture brightness of the image sensor to be enabled; a processing module, configured to determine a brightness mutation amount according to the picture brightness and the pixel sizes of the two image sensors before and after the currently enabled image sensor is switched to the image sensor to be enabled, wherein the pixel sizes of the two image sensors before and after the switching are different; An adjustment module, configured to adjust the brightness mutation amount based on the size relationship between the pixel sizes of the two image sensors before and after switching to obtain a brightness adjustment coefficient; The control module is used to obtain the initial brightness of the fill light, adjust the initial brightness based on the brightness adjustment coefficient to obtain the target brightness, and adjust the brightness of the fill light to the target brightness.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the fill light control method according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the fill light control method according to any one of claims 1 to 7 is implemented.