Brightness synchronization method, device, storage medium and equipment
By adjusting the exposure parameters of the target camera module according to the exposure parameters and sensitivity difference coefficient of the first camera module in a multi-camera module, the problem of long brightness synchronization of multiple camera modules is solved, the brightness adjustment efficiency is improved and Screen flickering is avoided.
Patent Information
- Application Number
- CN202111392865.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-23
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-11-23
AI Technical Summary
In the multi-camera module shooting mode, camera brightness synchronization takes a long time, causing the screen brightness to flicker.
By determining the reference exposure parameters of the target camera module based on the exposure parameters of the first camera module and the sensitivity difference coefficient between the modules before switching the target camera module, and using these parameters for image shooting after the switch, the acquisition The brightness information is adjusted to ensure that the brightness of the captured image is close to the brightness of the first camera module.
It reduces the brightness adjustment time, improves the efficiency of brightness adjustment, avoids screen brightness flickering, and shortens the synchronization time of camera module switching.
Smart Images

Figure CN114125314B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a brightness synchronization method, device, storage medium and equipment. Background Art
[0002] With the popularization of smart devices, the shooting mode of smart devices has developed from a single camera module to a multi-camera module. A multi-camera module is composed of multiple cameras that cooperate with each other, and requires the imaging brightness of each camera to remain consistent. At present, in single-camera mode, smart devices use automatic exposure algorithms to adjust the brightness of captured images to make the captured images suitable for human eyes. In the multi-camera module shooting mode, the brightness of each camera is affected by the environment and cannot be consistent, and the brightness between each camera needs to be balanced first. In the prior art, brightness synchronization processing is performed when the camera module is switched. When the brightness difference between the two switched camera modules is large, in order to avoid brightness flickering on the screen, it takes a long time to synchronize the brightness, which is time-consuming. Summary of the invention
[0003] In view of this, the present application provides a brightness synchronization method, device, storage medium and equipment to help solve the problem of long brightness synchronization consumables in the prior art.
[0004] In a first aspect, an embodiment of the present application provides a brightness synchronization method, which is applied to an electronic device, wherein the electronic device includes at least two camera modules, and the method includes:
[0005] In response to a start-up operation of the first camera module, capturing an image using the first camera module;
[0006] Acquire exposure parameters of the first camera module, a sensitivity difference coefficient between at least one second camera module and the first camera module, and determine a reference exposure parameter of the at least one second camera module according to the exposure parameters of the first camera module and at least one of the sensitivity difference coefficients; the at least one second camera module is a camera module other than the first camera module in the at least two groups of camera modules;
[0007] In response to a camera module switching operation, the target camera module is turned on, wherein the camera module switching operation is used to switch the camera module used for shooting from the first camera module to the target camera module; the target camera module is one of the at least one second camera module; wherein the target camera module uses a reference exposure parameter to shoot an image when shooting an image;
[0008] Obtain first brightness information and second brightness information, and adjust the exposure parameters of the target camera module according to the exposure parameters of the first camera module, the first brightness information and the second brightness information; the first brightness information is the brightness information of the image taken by the first camera module, and the second brightness information is the brightness information of the image taken by the target camera module.
[0009] Preferably, determining the reference exposure parameter of the at least one second camera module according to the exposure parameter of the first camera module and at least one of the sensitivity difference coefficients comprises:
[0010] For each second camera module in the at least one second camera module, determining a reference exposure duration of the second camera module according to the exposure duration of the first camera module; wherein the exposure parameters of the first camera module include the exposure duration and gain of the first camera module;
[0011] Determining a reference gain of the second camera module according to the gain of the first camera module and a sensitivity difference coefficient between the second camera module and the first camera module;
[0012] Determining whether a reference gain of the second camera module is less than a preset gain threshold;
[0013] If the reference gain of the second camera module is less than the preset gain threshold, the reference gain value of the second camera module is updated to the preset gain threshold, and the reference exposure time of the second camera module is re-determined based on the updated reference gain value, the exposure parameters of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module.
[0014] Preferably, the step of obtaining a sensitivity difference coefficient between at least one second camera module and the first camera module comprises:
[0015] Determining whether the current shooting scene is a high-contrast scene according to the image shot by the first camera module;
[0016] If it is determined that the current shooting scene is a high-contrast scene, obtaining a correction ratio parameter of at least one second camera module;
[0017] Obtaining a sensitivity difference coefficient between at least one second camera module and the first camera module;
[0018] For each second camera module in the at least one second camera module, a sensitivity difference coefficient between the second camera module and the first camera module is updated according to a correction ratio parameter of the second camera module.
[0019] Preferably, the acquiring the first brightness information and the second brightness information, and adjusting the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information comprises:
[0020] Circularly acquiring first brightness information and second brightness information;
[0021] Determining whether to adjust the brightness of the image captured by the target camera module according to the first brightness information, the second brightness information and a preset measurement range;
[0022] If it is determined to adjust the brightness of the image captured by the target camera module, the exposure parameters of the target camera module are adjusted according to the exposure parameters of the first camera module, the first brightness information and the second brightness information until it is determined not to adjust the brightness of the image captured by the target camera module.
[0023] Preferably, determining whether to adjust the brightness of the image captured by the target camera module according to the first brightness information, the second brightness information and the preset measurement range includes:
[0024] Calculating a brightness ratio according to the first brightness information and the second brightness information;
[0025] determining whether the brightness ratio is within a preset measurement range;
[0026] If it is not within the preset measurement range, it is determined to adjust the brightness of the image captured by the target camera module.
[0027] Preferably, adjusting the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information comprises:
[0028] Determine the exposure time of the current camera module according to the exposure time of the first camera module; wherein the exposure parameters of the first camera module include the exposure time and gain of the first camera module;
[0029] Determine the gain of the target camera module according to the gain of the first camera module, the first brightness information and the second brightness information;
[0030] Determine whether the gain of the target camera module is less than a preset gain threshold;
[0031] If the gain of the target camera module is less than the preset gain threshold, the gain value of the target camera module is updated to the preset gain threshold, and the exposure time of the target camera module is re-determined based on the updated gain value, the exposure parameter of the first camera module, the first brightness information and the second brightness information.
[0032] Preferably, it also includes:
[0033] When it is determined that the brightness of the image captured by the target camera module is not to be adjusted, the currently used camera module is switched to the target camera module, and the image captured by the target camera module is displayed in a display interface.
[0034] In a second aspect, an embodiment of the present application provides a brightness synchronization device, including:
[0035] A shooting unit, configured to shoot an image using the first camera module in response to a start-up operation of the first camera module;
[0036] an acquisition unit, configured to acquire exposure parameters of a first camera module, a sensitivity difference coefficient between at least one second camera module and the first camera module, and determine a reference exposure parameter of the at least one second camera module according to the exposure parameters of the first camera module and at least one of the sensitivity difference coefficients; the first camera module is a camera module used for current image capture; the at least one second camera module is a camera module other than the first camera module in at least two groups of camera modules;
[0037] The shooting unit is further used to turn on the target camera module in response to a camera module switching operation, wherein the camera module switching operation is used to switch the camera module used for shooting from the first camera module to the target camera module; the target camera module is one of the at least one second camera module; wherein the target camera module uses the reference exposure parameters to shoot the image when shooting the image;
[0038] A processing unit is used to obtain first brightness information and second brightness information, and adjust the exposure parameters of the target camera module according to the exposure parameters of the first camera module, the first brightness information and the second brightness information; the first brightness information is the brightness information of the image taken by the first camera module, and the second brightness information is the brightness information of the image taken by the target camera module.
[0039] Preferably, the acquisition unit is specifically used to determine, for each second camera module in at least one second camera module, a reference exposure duration of the second camera module according to the exposure duration of the first camera module; wherein the exposure parameters of the first camera module include the exposure duration and gain of the first camera module;
[0040] Determining a reference gain of the second camera module according to the gain of the first camera module and a sensitivity difference coefficient between the second camera module and the first camera module;
[0041] Determining whether a reference gain of the second camera module is less than a preset gain threshold;
[0042] If the reference gain of the second camera module is less than the preset gain threshold, the reference gain value of the second camera module is updated to the preset gain threshold, and the reference exposure time of the second camera module is re-determined based on the updated reference gain value, the exposure parameters of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module.
[0043] Preferably, the acquisition unit is specifically used to determine whether the current shooting scene is a high-contrast scene according to the image shot by the first camera module;
[0044] If it is determined that the current shooting scene is a high-contrast scene, obtaining a correction ratio parameter of at least one second camera module;
[0045] Obtaining a sensitivity difference coefficient between at least one second camera module and the first camera module;
[0046] For each second camera module in the at least one second camera module, a sensitivity difference coefficient between the second camera module and the first camera module is updated according to a correction ratio parameter of the second camera module.
[0047] Preferably, the processing unit is used to cyclically obtain the first brightness information and the second brightness information;
[0048] Determining whether to adjust the brightness of the image captured by the target camera module according to the first brightness information, the second brightness information and a preset measurement range;
[0049] If it is determined to adjust the brightness of the image captured by the target camera module, the exposure parameters of the target camera module are adjusted according to the exposure parameters of the first camera module, the first brightness information and the second brightness information until it is determined not to adjust the brightness of the image captured by the target camera module.
[0050] Preferably, the processing unit is specifically configured to calculate a brightness ratio according to the first brightness information and the second brightness information;
[0051] determining whether the brightness ratio is within a preset measurement range;
[0052] If it is not within the preset measurement range, it is determined to adjust the brightness of the image captured by the target camera module.
[0053] Preferably, the processing unit is specifically used to determine the exposure time of the current camera module according to the exposure time of the first camera module; wherein the exposure parameters of the first camera module include the exposure time and gain of the first camera module;
[0054] Determine the gain of the target camera module according to the gain of the first camera module, the first brightness information and the second brightness information;
[0055] Determine whether the gain of the target camera module is less than a preset gain threshold;
[0056] If the gain of the target camera module is less than the preset gain threshold, the gain value of the target camera module is updated to the preset gain threshold, and the exposure time of the target camera module is re-determined based on the updated gain value, the exposure parameter of the first camera module, the first brightness information and the second brightness information.
[0057] Preferably, the processing unit is further configured to switch the currently used camera module to the target camera module when it is determined that the brightness of the image captured by the target camera module does not need to be adjusted, and display the image captured by the target camera module in the display interface.
[0058] Thirdly, an embodiment of the present application provides a storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect above.
[0059] In a fourth aspect, an embodiment of the present application provides an electronic device, wherein the memory stores a computer program, and when the computer program is executed, the electronic device executes any one of the methods described in the first aspect above.
[0060] By adopting the solution provided in the embodiment of the present application, before switching the target camera module, the reference exposure parameters of the target camera module are determined according to the exposure parameters of the first camera module and the sensitivity difference coefficient between the modules. In this way, after the camera module switching operation, when the target camera module is turned on, the reference exposure parameters are directly used for image capture, so that the brightness of the captured image is closer to the brightness of the image captured by the first camera module, the first brightness information and the second brightness information are obtained, and the exposure parameters of the target camera module are adjusted according to the first brightness information, the second brightness information and the exposure parameters of the first camera module. Because the exposure parameters of the target camera module have been adjusted according to the exposure parameters of the first camera module and the sensitivity difference coefficient between the modules before receiving the camera module switching operation, the brightness of the image captured by the target camera module is closer to the brightness of the image captured by the first camera module, which reduces the adjustment time and improves the efficiency of brightness adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0062] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0063] Figure 2 A schematic diagram of a brightness synchronization method provided in an embodiment of the present application;
[0064] Figure 3 A schematic diagram of the structure of a brightness synchronization device provided in an embodiment of the present application;
[0065] Figure 4 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0067] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0068] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0069] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0070] Before a detailed introduction to the embodiments of the present application, the terms that are applied or may be applied to the embodiments of the present application are first explained.
[0071] Exposure time: Shutter speed, in simple terms, is the time you press the shutter. The longer the time, the more photons will reach the surface of the image sensor, and the brighter the captured image will be. If the exposure is too high, the photo will be too bright and lose image details. If the exposure is too low, the photo will be too dark and will also lose image details. Although the image quality will be better if the exposure time is relatively long, it cannot be infinitely long because noise is also accumulated during the exposure process.
[0072] Gain: The amplification gain of the analog signal after double sampling.
[0073] Image brightness refers to how bright the picture is.
[0074] See also Figure 1 , is a schematic diagram of an electronic device provided in an embodiment of the present application. Figure 1 The electronic device is described in detail by taking the mobile phone 100 as an example. Figure 1 1 shows a front view and a rear view of a mobile phone 100, wherein two front cameras 111 and 112 are arranged on the front side of the mobile phone 100, and four rear cameras 121, 122, 123, and 124 are arranged on the rear side of the mobile phone 100. Through the multiple cameras, a plurality of shooting modes can be provided for the user, for example, a front shooting mode, a rear shooting mode, a front and rear dual shooting mode, etc. The user can select a corresponding shooting mode to shoot according to the shooting scene to improve the user experience.
[0075] Understandable, Figure 1 The above is only an exemplary description and should not be used as a limitation on the scope of protection of this application. For example, different mobile phones may have different camera configuration numbers and configuration locations. In addition, in addition to mobile phones, the electronic devices involved in the embodiments of the present application may also be tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers, robots, smart glasses, smart TVs, etc.
[0076] It should be noted that in some possible implementations, the electronic device may also be called a terminal device, a user equipment (UE), etc., which is not limited in the embodiments of the present application.
[0077] In actual application scenarios, users use a rear camera module 1 of an electronic device to capture images, and the images captured by the camera module 1 are displayed in the display interface of the electronic device. If the user needs to switch the camera module for taking headshots from the rear camera module 1 to the rear camera module 2. Since the exposure parameters and sensitivity of the rear camera module 2 are different from those of the camera module 1, in order to avoid brightness flickering on the display screen, the electronic device needs to adjust the brightness of the image captured by the camera module 2 according to the brightness, exposure parameters and sensitivity of the captured image of the camera module 1 before switching the camera module 2, so that the difference between the brightness of the image captured by the camera module 2 and the brightness of the image captured by the camera module 1 is within a preset measurement range. In this way, when the brightness difference between the switched camera modules 1 and 2 is large, it takes a long time to synchronize the brightness, which is time-consuming.
[0078] In the embodiment of the present application, a first camera module is used to shoot an image, and the exposure parameters of the first camera module, the sensitivity difference coefficient between at least one second camera module and the first camera module are obtained, and the reference exposure parameters of at least one second camera module are determined according to the exposure parameters of the first camera module and the at least one sensitivity difference coefficient; in response to the camera module switching operation, the target camera module is turned on, and the target camera module uses the reference exposure parameters to shoot an image; the first brightness information and the second brightness information are obtained, and the exposure parameters of the target camera module are adjusted according to the exposure parameters of the first camera module, the first brightness information and the second brightness information. In this way, in the embodiment of the present application, before switching the target camera module, the reference exposure parameters of the target camera module are determined according to the exposure parameters of the first camera module and the sensitivity difference coefficient between the modules. After the camera module switching operation, when the target camera module is turned on, the reference exposure parameters are directly used to shoot the image, so that the brightness of the captured image is closer to the brightness of the image captured by the first camera module, the first brightness information and the second brightness information are obtained, and the exposure parameters of the target camera module are adjusted according to the first brightness information, the second brightness information and the exposure parameters of the first camera module. Because the exposure parameters of the target camera module have been adjusted according to the exposure parameters of the first camera module and the sensitivity difference coefficient between the modules before the camera module switching operation is received, the brightness of the image captured by the target camera module is closer to the brightness of the image captured by the first camera module, thereby reducing the adjustment time and improving the efficiency of the brightness adjustment.
[0079] refer to Figure 2 The figure shows a schematic flow chart of a brightness synchronization method provided by an embodiment of the present application. The method is applicable to Figure 1 The electronic device includes at least two camera modules, such as Figure 2 As shown, the method includes:
[0080] Step S201: In response to a start-up operation of a first camera module, an image is captured using the first camera module.
[0081] In the embodiment of the present application, when the user needs to start the camera module to capture an image, a startup operation can be sent to the electronic device. At this time, the user can select the camera module that needs to be started, that is, the first camera module, and send the first camera module startup operation to the electronic device. At this time, after receiving the first camera module startup operation, the electronic device starts the first camera module and uses the first camera module to capture an image.
[0082] As a possible implementation method, the user may not select a camera module when sending a camera module startup operation to the electronic device. At this time, the electronic device may determine the default camera module for taking images as the first camera module, and the electronic device may use the first camera module to take images.
[0083] Step S202, obtaining exposure parameters of the first camera module, a sensitivity difference coefficient between at least one second camera module and the first camera module, and determining a reference exposure parameter of at least one second camera module based on the exposure parameters of the first camera module and the at least one sensitivity difference coefficient.
[0084] Among them, at least one second camera module is another camera module in the at least two groups of camera modules except the first camera module.
[0085] In an embodiment of the present application, the electronic device can obtain the exposure parameter of the first camera module in the first camera module, and obtain the sensitivity difference coefficient between at least one second camera module and the first camera module in the storage medium. After obtaining the exposure parameter of the first camera module and the sensitivity difference coefficient between at least one second camera module and the first camera module, the electronic device calculates the exposure parameter of each second camera module according to the exposure parameter of the first camera module and the sensitivity difference coefficient between at least one second camera module and the first camera module.
[0086] It should be noted that the sensitivity difference coefficient between every two camera modules is preset and stored in a storage medium. For example, the electronic device includes three camera modules, namely camera modules a, b and c. The electronic device can set the various exposure parameters of camera module a and the various exposure parameters of camera b to equal values, respectively shoot image 1 through camera module a, and count the brightness information 1 of image 1, shoot image 2 through camera module b, and count the brightness information 2 of image 2, calculate the ratio between brightness information 1 and brightness information 2, and use the ratio as the sensitivity difference coefficient between camera module a and camera module b. In the above manner, the electronic device can calculate the sensitivity difference coefficient between camera module a and camera module c, and the sensitivity difference coefficient between camera module b and camera module c, respectively.
[0087] As a possible implementation manner, determining a reference exposure parameter of at least one second camera module according to an exposure parameter of the first camera module and at least one sensitivity difference coefficient includes:
[0088] For each second camera module in at least one second camera module, a reference exposure duration of the second camera module is determined according to the exposure duration of the first camera module. A reference gain of the second camera module is determined according to the gain of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module. It is determined whether the reference gain of the second camera module is less than a preset gain threshold. If the reference gain of the second camera module is less than the preset gain threshold, the reference gain value of the second camera module is updated to the preset gain threshold, and the reference exposure duration of the second camera module is re-determined according to the updated reference gain value, the exposure parameter of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module.
[0089] Among them, the exposure parameters of the first camera module include: exposure time and gain of the first camera module.
[0090] In the embodiment of the present application, since the electronic device includes at least one second camera module, in order to reduce the brightness synchronization time when the user switches the camera module, it is necessary to pre-adjust the exposure parameters for each second camera module. At this time, for each second camera module in the at least one second camera module, the reference exposure duration of the second camera module is first determined according to the exposure duration of the first camera module. For example, the exposure duration of the first camera module can be determined as the reference exposure duration of the second camera module. Then, according to the gain of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module, the reference gain of the second camera module is calculated. For example, the product of the gain of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module can be used as the reference gain of the second camera module. Determine whether the reference gain of the second camera module is less than the preset gain threshold. If the reference gain of the second camera module is less than the preset gain threshold, it means that when the exposure time of the second camera module is set to be the same as the exposure time of the first camera module, the reference gain of the second camera module is too small, and the exposure time of the second camera module needs to be adjusted to increase the reference gain of the second camera module. At this time, the value of the reference gain of the second camera module can be updated to the preset gain threshold. And based on the updated reference gain, the exposure time of the first camera module, the gain of the first camera module, and the sensitivity difference coefficient between the second camera module and the first camera module, the reference exposure time of the second camera module is recalculated. For example, when calculating the reference exposure time of the second camera module, the following formula gain can be used. 参考 *E 参考 *m=gain1*E1, calculate the reference exposure time of the second camera module. 参考 Indicates the reference gain of the second camera module, E 参考 represents the reference exposure time of the second camera module, m is the sensitivity difference coefficient between the second camera module and the first camera module, gain1 represents the gain of the first camera module, and E1 represents the exposure time of the first camera module.
[0091] It should be noted that since the gain of the camera module is the gain of the image signal amplifier, its value is limited in range and cannot be too small. If it is too small, the amplifier function will be lost. Therefore, it is necessary to detect whether the calculated gain of the second camera module exceeds this range. Since the gain is used to amplify the image signal, when the image signal is amplified, the noise in the image will also be amplified, so the gain is generally set to the smallest possible value.
[0092] Exemplarily, the electronic device includes three camera modules, namely camera modules a, b and c. The electronic device obtains the sensitivity difference coefficient 1 between camera module a and camera module b, the sensitivity difference coefficient 2 between camera module a and camera module c, and the sensitivity difference coefficient 3 between camera module b and camera module c. Assume that the electronic device currently uses camera module a to capture images. The electronic device obtains the exposure parameters used by camera module a, that is, obtains the exposure time and gain used by camera module a. Assume that the exposure time of camera module a is t1 seconds and the gain is s. At this time, when the electronic device calculates the reference exposure parameters of camera module b, it can first set the reference exposure time of camera module b to the exposure time of camera module a, that is, set it to t1 seconds, and the reference gain of camera module b is the product of the gain of camera module a and the sensitivity difference coefficient 1. The calculated reference gain of camera module b is compared with the preset gain threshold. Assuming that the preset gain threshold is 1, the electronic device can compare the calculated reference gain of camera module b with 1. Assuming that the calculated reference gain of camera module b is greater than 1, the electronic device determines that the exposure time of camera module b is t1 seconds, and the parameter gain is the product of the gain of camera module a and the sensitivity difference coefficient 1. The electronic device calculates the reference exposure parameter of camera module c, and can first set the reference exposure time of camera module c to the exposure time of camera module a, that is, set to t1 seconds. The reference gain of camera module c is the product of the gain of camera module a and the sensitivity difference coefficient 2. The calculated reference gain of camera module c is compared with the preset gain threshold. At this time, the electronic device can compare the calculated reference gain of camera module c with 1. Assuming that the calculated reference gain of camera module c is less than 1, it does not mean that the reference gain of camera module c is too small. At this time, it is necessary to adjust the exposure time of camera module c to increase the reference gain of camera module c. The electronic device can update the reference gain value of the camera module c to 1, and according to the formula gain 参考 *E 参考 *m=gain1*E1, recalculate the reference exposure time of camera module c. 参考 Indicates the reference gain of camera module c, E 参考 represents the reference exposure time of camera module c, m is the sensitivity difference coefficient 2 between camera module a and camera module c, gain1 represents the gain of camera module a, and E1 represents the exposure time t1 seconds of camera module a. The electronic device obtains the reference exposure time and reference gain of camera module c.
[0093] As a possible implementation method, obtaining the sensitivity difference coefficient between at least one second camera module and the first camera module includes: determining whether the current shooting scene is a high-contrast scene based on the image captured by the first camera module; if the current shooting scene is determined to be a high-contrast scene, obtaining the correction ratio parameter of at least one second camera module; obtaining the sensitivity difference coefficient between at least one second camera module and the first camera module; for each second camera module in the at least one second camera module, updating the sensitivity difference coefficient between the second camera module and the first camera module according to the correction ratio parameter of the second camera module.
[0094] In an embodiment of the present application, since there is an error in the sensitivity difference parameter between the preset camera modules in the high contrast scene, in order to reduce the error, a correction ratio parameter can be set in the high contrast scene. At this time, the electronic device can detect whether the currently photographed scene is a high contrast scene based on the image captured by the first camera module. For example, the brightness difference between the brightest area and the darkest area in the image captured by the first camera module can be calculated. The brightness difference is compared with the preset brightness threshold. If it is greater than the preset brightness threshold, it means that the brightness and darkness of the shooting scene are large and it is a high contrast scene. If it is not greater than the preset brightness threshold, it means that the brightness and darkness of the shooting scene are relatively uniform and it does not belong to a high contrast scene. When it is determined that the current scene is a high contrast scene, the correction ratio parameter of at least one second camera module set in advance can be obtained. The electronic device updates the sensitivity difference coefficient between the second camera module and the first camera module according to the correction ratio parameter of the second camera module for each second camera module in the at least one second camera module. For example, the sensitivity difference coefficient between the second camera module and the first camera module may be updated to the product of the sensitivity difference coefficient between the second camera module and the first camera module and the correction ratio parameter of the second camera module.
[0095] In this way, the sensitivity difference coefficient between the second camera module and the first camera module in the high-contrast scene can be adjusted by correcting the ratio parameter to improve the accuracy of the exposure parameters obtained subsequently.
[0096] Since the camera module of the electronic device can adjust the brightness of the captured image by adjusting the exposure parameters, after adjusting the reference exposure parameters of other camera modules according to the exposure parameters of the first camera module through step S202, when the camera module for capturing images is switched from the first camera module to other camera modules, since the reference exposure parameters of other camera modules have been adjusted accordingly according to the exposure parameters of the first camera module, when other camera modules are used to capture images, the other camera modules use the reference exposure parameters to capture images, and the brightness of the captured images is closer to the brightness of the images captured by the first camera. When the camera module switching operation is subsequently received, the time for brightness synchronization can be reduced.
[0097] Step S203: In response to the camera module switching operation, turn on the target camera module.
[0098] The camera module switching operation is used to switch the camera module used for shooting from the first camera module to the target camera module. The target camera module is a camera module in at least one second camera module. When the target camera module shoots an image, it uses the reference exposure parameters to shoot the image.
[0099] In the embodiment of the present application, when the user needs to switch the camera module, the user can send a camera module switching operation to the electronic device, and the electronic device receives the camera module switching operation and turns on the corresponding target camera module according to the operation. After turning on the target camera module, since the reference exposure parameters of the target camera module are adjusted in advance according to the exposure parameters of the first camera module in the above step S202, when the target camera module uses the reference exposure parameters to shoot an image, the brightness of the captured image is close to the brightness of the image shot by the first camera module, thereby reducing the time for brightness adjustment.
[0100] Step S204: acquiring the first brightness information and the second brightness information, and adjusting the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information.
[0101] The first brightness information is the brightness information of the image captured by the first camera module, and the second brightness information is the brightness information of the image captured by the target camera module.
[0102] In the embodiment of the present application, the electronic device can count the brightness data in the image captured by the first camera module, obtain the brightness information of the image captured by the first camera module, that is, obtain the first brightness information, count the brightness data of the image captured by the target camera module, and obtain the brightness information of the image captured by the target camera module, that is, obtain the second brightness information. The electronic device adjusts the exposure parameters of the target camera module according to the exposure parameters of the first camera module, the first brightness information and the second brightness information obtained, so as to adjust the brightness of the image captured by the target camera module, so that the brightness difference between the image captured by the target camera module and the image captured by the first camera module is within a preset brightness range.
[0103] In a possible implementation, obtaining the first brightness information and the second brightness information, and adjusting the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information, and the second brightness information includes:
[0104] The first brightness information and the second brightness information are obtained in a loop; according to the first brightness information, the second brightness information and a preset measurement range, it is determined whether to adjust the brightness of the image captured by the target camera module; if it is determined to adjust the brightness of the image captured by the target camera module, the exposure parameters of the target camera module are adjusted according to the exposure parameters of the first camera module, the first brightness information and the second brightness information, until it is determined not to adjust the brightness of the image captured by the target camera module.
[0105] In an embodiment of the present application, an electronic device acquires first brightness information and second brightness information, and determines whether to adjust the brightness of an image captured by a target camera module according to the first brightness information, the second brightness information and a preset measurement range. For example, if the difference between the first brightness information and the second brightness information is within the preset measurement range, it is determined not to adjust the brightness of the image captured by the target camera module. If the difference between the first brightness information and the second brightness information is within the preset measurement range, it is determined to adjust the brightness of the image captured by the target camera module. When determining to adjust the brightness of the image captured by the target camera module, the electronic device adjusts the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information. After adjusting the exposure parameter of the target camera module, the target camera module uses the adjusted exposure parameter to capture the next frame of image, and the electronic device re-acquires the first brightness information and the second brightness information, and determines whether to adjust the brightness of the image captured by the target camera module according to the re-acquired first brightness information, the second brightness information and the preset measurement range. When determining to adjust the brightness of the image captured by the target camera module, the electronic device re-adjusts the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information. After adjusting the exposure parameters of the target camera module, the target camera module uses the adjusted exposure parameters to shoot the next frame of image. At this time, the electronic device needs to re-acquire the first brightness information and the second brightness information, and re-determine whether it is necessary to adjust the brightness of the image shot by the target camera module. When it is determined that adjustment is required, the above process of adjusting the exposure parameters of the target camera module is performed until it is determined that the brightness of the image shot by the target camera module is not adjusted.
[0106] That is to say, after each adjustment of the exposure parameters of the target camera module, the electronic device needs to re-use the adjusted exposure information to capture the image, and re-acquire the first brightness information and the second brightness information, and perform the above adjustment process until it is determined that the brightness of the image captured by the target camera module does not need to be adjusted.
[0107] In one possible implementation, determining whether to adjust the brightness of the image captured by the target camera module based on the first brightness information, the second brightness information and the preset measurement range includes: calculating the brightness ratio based on the first brightness information and the second brightness information; determining whether the brightness ratio is within the preset measurement range; if it is not within the preset measurement range, determining to adjust the brightness of the image captured by the target camera module.
[0108] In an embodiment of the present application, the electronic device can calculate the brightness ratio between the first brightness information and the second brightness information based on the first brightness information and the second brightness information, and detect whether the brightness ratio is within a preset measurement range. If it is not within the preset measurement range, it means that the brightness of the image captured by the first camera module and the brightness of the image captured by the target camera module are significantly different, and the image brightness of the target camera module needs to be adjusted.
[0109] It should be noted that the preset measurement range is preset according to actual needs.
[0110] In a possible implementation, adjusting the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information, and the second brightness information includes:
[0111] Determine the exposure time of the current camera module according to the exposure time of the first camera module; determine the gain of the target camera module according to the gain of the first camera module, the first brightness information and the second brightness information; confirm whether the gain of the target camera module is less than a preset gain threshold; if the gain of the target camera module is less than the preset gain threshold, update the gain value of the target camera module to the preset gain threshold, and redetermine the exposure time of the target camera module according to the updated gain value, the exposure parameter of the first camera module, the first brightness information and the second brightness information.
[0112] Among them, the exposure parameters of the first camera module include the exposure time and gain of the first camera module.
[0113] In an embodiment of the present application, when the electronic device determines that the image brightness of the target camera module needs to be adjusted, the brightness adjustment is usually achieved by adjusting the exposure parameters of the target camera module. The electronic device can first set the exposure time of the first camera module to the exposure time of the target camera module, and calculate the brightness ratio between the first brightness information and the second brightness information according to the first brightness information and the second brightness information. The product of the brightness ratio and the gain of the first camera module is used as the gain of the target camera module. It is detected whether the calculated gain of the target camera module is less than the preset gain threshold. If it is less than the preset gain threshold, it means that the calculated gain of the current target camera module is too small. At this time, it is necessary to adjust the exposure time of the target camera module to increase the gain of the target camera module. At this time, the electronic device can update the gain value of the target camera module to the preset gain threshold, and recalculate the exposure time of the target camera module according to the updated gain of the target camera module, the exposure time of the first camera module, the gain of the first camera module, the first brightness information and the second brightness information. For example, the electronic device can use the following formula gain 目标 *E 目标*n=gain1*E1, calculate the exposure time of the target camera module. 目标 Represents the gain of the target camera module, E 目标 represents the exposure time of the target camera module, n is the brightness ratio between the first brightness information and the second brightness information, gain1 represents the gain of the first camera module, and E1 represents the exposure time of the first camera module.
[0114] Furthermore, when the electronic device determines that the calculated gain of the target camera module is greater than or equal to a preset gain threshold, it can determine that the exposure time of the target camera is the exposure time of the first camera module, and the gain of the target camera is the product of the brightness ratio and the gain of the first camera module.
[0115] In a possible implementation, the method further includes: when it is determined not to adjust the brightness of the image captured by the target camera module, switching the currently used camera module to the target camera module, and displaying the image captured by the target camera module in the display interface.
[0116] In the embodiment of the present application, when the electronic device determines that the difference between the first brightness information and the second brightness information is within the preset measurement range, it means that the brightness of the image captured by the current target camera module is substantially the same as the brightness of the image captured by the first camera module. At this time, if the camera module is switched, there is no problem of brightness flickering on the display screen, and the electronic device can determine that there is no need to adjust the brightness of the image captured by the target camera module. The electronic device can directly switch the currently used camera module from the first camera module to the target camera module, and display the image captured by the target camera module in the display interface.
[0117] As described in the above example, the electronic device includes three camera modules, namely camera modules a, b and c. And in the above step S202, the electronic device has obtained the reference exposure parameters of camera modules b and camera modules c. At this time, it is assumed that the electronic device receives a camera module switching operation and needs to switch the camera module from camera module a to camera module b. In response to the camera module switching operation, the electronic device can turn on camera module b, and camera module b uses the reference exposure parameters to shoot images. The electronic device can perform brightness data statistics based on the image shot by camera module a to obtain first brightness information, and perform brightness data statistics based on the image shot by camera module b to obtain second brightness information. The electronic device calculates the brightness ratio between the first brightness information and the second brightness information based on the first brightness information and the second brightness information. And compare the brightness ratio with the preset measurement range to check whether the brightness ratio is within the preset measurement range. Assuming that the brightness ratio is not within the preset measurement range, it means that the brightness of the image shot by camera module b is significantly different from the brightness of the image shot by camera module a, and the brightness of the image shot by camera module b needs to be adjusted. The electronic device can adjust the image brightness by adjusting the exposure parameters of camera module b. At this time, the electronic device can determine the exposure time t1 of camera module a as the exposure time of camera module b, and use the product of the brightness ratio between the first brightness information and the second brightness information and the gain of camera module a as the gain of camera module b. The electronic device detects whether the calculated gain of camera module b is less than a preset gain threshold. Assuming the preset gain threshold is 1, the electronic device detects whether the calculated gain of camera module b is less than 1. Assuming that the calculated gain of camera module b is less than 1, it means that the calculated gain of camera module b is too small, and the exposure time of camera module b needs to be adjusted to increase the gain of camera module b. At this time, the electronic device can update the gain value of camera module b to the preset gain threshold. According to the updated gain of camera module b, the exposure time t1 of camera module a, the gain of camera module a, and the brightness ratio between the first brightness information and the second brightness information, using gain b *E b *n=gain a *E a , calculate the exposure time of camera module b. Among them, gain b Indicates the gain of camera module b, E b represents the exposure time of camera module b, n is the brightness ratio between the first brightness information and the second brightness information, gain a Indicates the gain of camera module a, E a Indicates the exposure time of camera module a.
[0118] After the electronic device recalculates the exposure parameters of camera module b, it can use the updated exposure parameters to capture images and re-execute the above process of obtaining the first brightness information and the second brightness information to adjust the exposure parameters of camera module b until the electronic device determines not to adjust the brightness of the image captured by camera module b.
[0119] In an embodiment of the present application, before switching the target camera module, the reference exposure parameters of the target camera module are determined according to the exposure parameters of the first camera module and the sensitivity difference coefficient between the modules. In this way, after the camera module switching operation, when the target camera module is turned on, the reference exposure parameters are directly used to capture the image, so that the brightness of the captured image is closer to the brightness of the image captured by the first camera module, the first brightness information and the second brightness information are obtained, and the exposure parameters of the target camera module are adjusted according to the first brightness information, the second brightness information and the exposure parameters of the first camera module. Because the exposure parameters of the target camera module have been adjusted according to the exposure parameters of the first camera module and the sensitivity difference coefficient between the modules before receiving the camera module switching operation, the brightness of the image captured by the target camera module is closer to the brightness of the image captured by the first camera module, which reduces the adjustment time and improves the efficiency of brightness adjustment.
[0120] refer to Figure 3 FIG. 1 is a schematic diagram of the structure of a brightness synchronization device provided by an embodiment of the present application. Figure 3 As shown, the device comprises:
[0121] The shooting unit 301 is used to shoot an image using the first camera module in response to a start-up operation of the first camera module.
[0122] The acquisition unit 302 is used to acquire the exposure parameters of the first camera module, the sensitivity difference coefficient between at least one second camera module and the first camera module, and determine the reference exposure parameters of at least one second camera module based on the exposure parameters of the first camera module and the at least one sensitivity difference coefficient.
[0123] Among them, the first camera module is the camera module used for current image capture; and the at least one second camera module is other camera modules in at least two groups of camera modules except the first camera module.
[0124] Specifically, the acquisition unit 302 is specifically used to determine, for each second camera module in at least one second camera module, a reference exposure time of the second camera module according to the exposure time of the first camera module; determine the reference gain of the second camera module according to the gain of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module; determine whether the reference gain of the second camera module is less than a preset gain threshold; if the reference gain of the second camera module is less than the preset gain threshold, update the reference gain value of the second camera module to the preset gain threshold, and re-determine the reference exposure time of the second camera module according to the updated reference gain value, the exposure parameters of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module.
[0125] Among them, the exposure parameters of the first camera module include the exposure time and gain of the first camera module.
[0126] Furthermore, the acquisition unit 302 is specifically used to determine whether the current shooting scene is a high-contrast scene based on the image captured by the first camera module; if the current shooting scene is determined to be a high-contrast scene, obtain the correction ratio parameter of at least one second camera module; obtain the sensitivity difference coefficient between at least one second camera module and the first camera module; for each second camera module in the at least one second camera module, update the sensitivity difference coefficient between the second camera module and the first camera module according to the correction ratio parameter of the second camera module.
[0127] The shooting unit 301 is also used to respond to the camera module switching operation and turn on the target camera module.
[0128] Among them, the camera module switching operation is used to switch the camera module used for shooting from the first camera module to the target camera module; the target camera module is a camera module among at least one second camera module; wherein, when the target camera module takes images, it uses reference exposure parameters for image capture.
[0129] The processing unit 303 is used to obtain the first brightness information and the second brightness information, and adjust the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information.
[0130] The first brightness information is the brightness information of the image captured by the first camera module, and the second brightness information is the brightness information of the image captured by the target camera module.
[0131] Specifically, the processing unit 303 is specifically used to cyclically obtain the first brightness information and the second brightness information; determine whether to adjust the brightness of the image captured by the target camera module based on the first brightness information, the second brightness information and the preset measurement range; if it is determined to adjust the brightness of the image captured by the target camera module, adjust the exposure parameters of the target camera module according to the exposure parameters of the first camera module, the first brightness information and the second brightness information, until it is determined not to adjust the brightness of the image captured by the target camera module.
[0132] Furthermore, the processing unit 303 is specifically used to calculate a brightness ratio according to the first brightness information and the second brightness information; determine whether the brightness ratio is within a preset measurement range; if not within the preset measurement range, determine to adjust the brightness of the image captured by the target camera module.
[0133] Furthermore, the processing unit 303 is specifically used to determine the exposure time of the current camera module based on the exposure time of the first camera module; determine the gain of the target camera module based on the gain of the first camera module, the first brightness information and the second brightness information; determine whether the gain of the target camera module is less than a preset gain threshold; if the gain of the target camera module is less than the preset gain threshold, update the gain value of the target camera module to the preset gain threshold, and redetermine the exposure time of the target camera module based on the updated gain value, the exposure parameter of the first camera module, the first brightness information and the second brightness information.
[0134] Among them, the exposure parameters of the first camera module include the exposure time and gain of the first camera module.
[0135] Furthermore, the processing unit 303 is further configured to switch the currently used camera module to the target camera module and display the image captured by the target camera module in the display interface when it is determined that the brightness of the image captured by the target camera module is not to be adjusted.
[0136] Corresponding to the above embodiments, the present application also provides an electronic device. Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, the electronic device 400 may include: a processor 401, a memory 402 and a communication unit 403. These components communicate through one or more buses, and those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation on the embodiment of the present invention, it can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0137] The communication unit 403 is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0138] The processor 401 is the control center of the storage device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 402, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 401 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0139] The memory 402 is used to store the execution instructions of the processor 401. The memory 402 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0140] When the execution instruction in the memory 402 is executed by the processor 401, the electronic device 400 can execute Figure 2 Some or all of the steps in the illustrated embodiments.
[0141] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the brightness synchronization method provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0142] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.
[0143] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims
1. A brightness synchronization method, It is characterized in that Applied to an electronic device, the electronic device includes at least two camera modules, and the method includes: In response to a start-up operation of the first camera module, capturing an image using the first camera module; Acquire exposure parameters of a first camera module and a sensitivity difference coefficient between at least one second camera module and the first camera module, and determine a reference exposure parameter of the at least one second camera module according to the exposure parameters of the first camera module and at least one of the sensitivity difference coefficients; the at least one second camera module is a camera module other than the first camera module in the at least two camera modules; In response to a camera module switching operation, the target camera module is turned on, wherein the camera module switching operation is used to switch the camera module used for shooting from the first camera module to the target camera module; the target camera module is one of the at least one second camera module; wherein the target camera module uses a reference exposure parameter to shoot an image when shooting an image; Acquire first brightness information and second brightness information, and adjust the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information; the first brightness information is the brightness information of the image captured by the first camera module, and the second brightness information is the brightness information of the image captured by the target camera module; wherein, determining the reference exposure parameter of the at least one second camera module according to the exposure parameter of the first camera module and at least one of the sensitivity difference coefficients includes: For each second camera module in the at least one second camera module, determining a reference exposure duration of the second camera module according to the exposure duration of the first camera module; wherein the exposure parameters of the first camera module include the exposure duration and gain of the first camera module; Determining a reference gain of the second camera module according to the gain of the first camera module and a sensitivity difference coefficient between the second camera module and the first camera module; Determining whether a reference gain of the second camera module is less than a preset gain threshold; If the reference gain of the second camera module is less than the preset gain threshold, the reference gain value of the second camera module is updated to the preset gain threshold, and the reference exposure time of the second camera module is re-determined based on the updated reference gain value, the exposure parameters of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module.
2. The method according to claim 1, It is characterized in that The obtaining of the sensitivity difference coefficient between at least one second camera module and the first camera module comprises: Determining whether the current shooting scene is a high-contrast scene according to the image shot by the first camera module; If it is determined that the current shooting scene is a high-contrast scene, obtaining a correction ratio parameter of at least one second camera module; Obtaining a sensitivity difference coefficient between at least one second camera module and the first camera module; For each second camera module in the at least one second camera module, a sensitivity difference coefficient between the second camera module and the first camera module is updated according to a correction ratio parameter of the second camera module.
3. The method according to claim 1, It is characterized in that The acquiring the first brightness information and the second brightness information, and adjusting the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information comprises: Circularly acquiring first brightness information and second brightness information; Determining whether to adjust the brightness of the image captured by the target camera module according to the first brightness information, the second brightness information and a preset measurement range; If it is determined to adjust the brightness of the image captured by the target camera module, the exposure parameters of the target camera module are adjusted according to the exposure parameters of the first camera module, the first brightness information and the second brightness information until it is determined not to adjust the brightness of the image captured by the target camera module.
4. The method according to claim 3, It is characterized in that The determining whether to adjust the brightness of the image captured by the target camera module according to the first brightness information, the second brightness information and the preset measurement range includes: Calculating a brightness ratio according to the first brightness information and the second brightness information; determining whether the brightness ratio is within a preset measurement range; If it is not within the preset measurement range, it is determined to adjust the brightness of the image captured by the target camera module.
5. The method according to claim 1, It is characterized in that The step of adjusting the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information and the second brightness information comprises: Determine the exposure time of the target camera module according to the exposure time of the first camera module; wherein the exposure parameters of the first camera module include the exposure time and gain of the first camera module; Determine the gain of the target camera module according to the gain of the first camera module, the first brightness information and the second brightness information; Determine whether the gain of the target camera module is less than a preset gain threshold; If the gain of the target camera module is less than the preset gain threshold, the gain value of the target camera module is updated to the preset gain threshold, and the exposure time of the target camera module is re-determined based on the updated gain value, the exposure parameter of the first camera module, the first brightness information and the second brightness information.
6. The method according to claim 3, It is characterized in that Also includes: When it is determined that the brightness of the image captured by the target camera module is not to be adjusted, the currently used camera module is switched to the target camera module, and the image captured by the target camera module is displayed in a display interface.
7. A brightness synchronization device, It is characterized in that include: A shooting unit, configured to shoot an image using the first camera module in response to a start-up operation of the first camera module; an acquisition unit, configured to acquire exposure parameters of the first camera module and a sensitivity difference coefficient between at least one second camera module and the first camera module, and determine a reference exposure parameter of the at least one second camera module according to the exposure parameters of the first camera module and at least one of the sensitivity difference coefficients; The first camera module is a camera module used for capturing the current image; The at least one second camera module is another camera module in the at least two groups of camera modules except the first camera module; The shooting unit is further used to turn on the target camera module in response to a camera module switching operation, wherein the camera module switching operation is used to switch the camera module used for shooting from the first camera module to the target camera module; The target camera module is a camera module in the at least one second camera module; wherein, when the target camera module performs image capture, the reference exposure parameter is used for image capture; a processing unit, configured to obtain first brightness information and second brightness information, and adjust the exposure parameter of the target camera module according to the exposure parameter of the first camera module, the first brightness information, and the second brightness information; the first brightness information is the brightness information of the image captured by the first camera module, and the second brightness information is the brightness information of the image captured by the target camera module; The acquisition unit is specifically used to determine, for each second camera module in at least one second camera module, a reference exposure duration of the second camera module according to the exposure duration of the first camera module; wherein the exposure parameters of the first camera module include the exposure duration and gain of the first camera module; Determining a reference gain of the second camera module according to the gain of the first camera module and a sensitivity difference coefficient between the second camera module and the first camera module; Determining whether a reference gain of the second camera module is less than a preset gain threshold; If the reference gain of the second camera module is less than the preset gain threshold, the reference gain value of the second camera module is updated to the preset gain threshold, and the reference exposure time of the second camera module is re-determined based on the updated reference gain value, the exposure parameters of the first camera module and the sensitivity difference coefficient between the second camera module and the first camera module.
8. A storage medium, It is characterized in that The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
9. An electronic device, It is characterized in that The electronic device comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed, the electronic device executes the method according to any one of claims 1 to 6.
