A control method, device, medium and equipment for white balance synchronization

By acquiring and smoothing the white balance gain of the camera modules, the white balance synchronization problem when multiple camera modules work together is solved, thus improving the quality of the image.

CN119094711BActive Publication Date: 2026-04-14KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

When multiple camera modules work together, the white balance is difficult to synchronize, resulting in a decrease in image quality.

Method used

By acquiring the white balance gain of the camera module to be synchronized and using the spare white balance gain for smoothing, white balance synchronization between camera modules can be achieved.

Benefits of technology

This ensures smooth transitions between camera module switching or zooming, improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094711B_ABST
    Figure CN119094711B_ABST
Patent Text Reader

Abstract

The application provides a white balance synchronization control method and device, a medium and equipment. The method comprises the following steps: obtaining a first camera module and a second camera module to be subjected to white balance synchronization; determining a synchronous white balance gain of the first camera module and a normal white balance gain of the second camera module; performing smoothing processing on the synchronous white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain; and performing white balance synchronization on the second camera module by using the backup white balance gain. Since the determined backup white balance gain takes into account the white balance gain of the first camera module and the white balance gain of the second camera module, when the second camera module uses the backup white balance gain to perform white balance synchronization, the effect of a transition picture can be ensured, and the quality of an imaging picture is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of camera technology, and in particular to a white balance synchronization control method, device, medium and equipment. Background Technology

[0002] With the development of technology, video recording devices such as cameras and camcorders are widely used in people's daily lives, work, and studies, playing an increasingly important role in people's lives. When using video recording devices to capture images, white balance must be controlled to ensure the accurate reproduction of colors in the image scene.

[0003] With the development of smart electronic devices, many devices now use multiple camera modules, such as the common triple-camera module, which includes an ultra-wide-angle module, a wide-angle main camera module, and a telephoto telephoto module. In certain camera modes, multiple camera modules need to work together. However, because each camera module has different image sensors and imaging capabilities, color jumps can occur during zooming or camera module switching, and white balance cannot be synchronized, resulting in a decrease in image quality. Summary of the Invention

[0004] To address the problems existing in the prior art, embodiments of the present invention provide a white balance synchronization control method, device, medium, and equipment to solve or partially solve the technical problem in the prior art where white balance is difficult to synchronize when multiple camera modules work together, thus affecting the quality of the image.

[0005] A first aspect of the present invention provides a white balance synchronization control method, the method comprising:

[0006] Acquire the first and second camera modules to be synchronized for white balance;

[0007] Determine the synchronous white balance gain of the first camera module and the normal white balance gain of the second camera module;

[0008] The synchronous white balance gain of the first camera module is smoothed based on the normal white balance gain of the second camera module to obtain the corresponding backup white balance gain.

[0009] The second camera module is synchronized with white balance using the backup white balance gain.

[0010] In the above scheme, determining the synchronous white balance gain of the first camera module includes:

[0011] If the white balance synchronization algorithm is determined to be the SAO synchronization algorithm, the proportion of each ambient light source in the shooting scene is obtained, and the brightness preference gain and synchronization white balance preference gain corresponding to each ambient light source are determined.

[0012] The synchronous white balance gain of the first camera module is determined based on the proportion of each ambient light source, the brightness preference gain corresponding to each ambient light source, and the synchronous white balance preference gain corresponding to each ambient light source.

[0013] In the above scheme, determining the synchronous white balance gain of the first camera module based on the proportion of each ambient light source, the preference gain corresponding to each ambient light source, and the synchronous white balance preference gain includes:

[0014] sum(sync awb preference gain of each light souce*

[0015] According to the formula Determine the sync white balance gain (sync awb gain) of the first camera module; wherein,

[0016] The light source probability is the proportion of each ambient light source, the sync white balance preference gain of each light source is the corresponding sync white balance preference gain for each ambient light source, and the preference gain based on LV is the corresponding brightness preference gain for each ambient light source.

[0017] In the above scheme, determining the synchronous white balance gain of the first camera module includes:

[0018] If the white balance synchronization algorithm is determined to be the white balance landing point synchronization algorithm, the first camera module is used to capture the background image under different ambient light sources to obtain the corresponding first grayscale image; the second camera module is used to capture the background image to obtain the corresponding second grayscale image.

[0019] The first coordinate position of the preset gray point, each ambient light source calibration point and the final landing point in the first grayscale image is calibrated.

[0020] The preset gray point, each ambient light source calibration point and the final landing point are mapped onto the second grayscale image. The coordinates of each ambient light source calibration point are adjusted so that the final landing point falls within the target coordinate range of the second grayscale image.

[0021] The synchronous white balance gain of the first camera module is determined based on the adjusted coordinates of each of the ambient light source calibration points.

[0022] In the above scheme, the step of smoothing the synchronous white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain includes:

[0023] Get the current ambient light level;

[0024] The mixing ratio of the normal white balance gain and the synchronous white balance gain is determined based on the ambient brightness level.

[0025] The synchronization balance gain is adjusted according to the mixing ratio to obtain the backup white balance gain.

[0026] In the above scheme, the step of using the spare white balance gain to perform white balance synchronization on the second camera module includes:

[0027] Obtain the target number of frames for which white balance synchronization is required for the second camera module;

[0028] Set the white balance gain of the target frame number to the backup white balance gain, and set the white balance gain of the remaining frame number to the normal white balance gain of the second camera module.

[0029] A second aspect of the present invention provides a white balance synchronization control device, the device comprising:

[0030] The white balance synchronization statistics management unit is used to determine the first and second camera modules to be synchronized with white balance when it is determined that the camera module is switching or zooming.

[0031] The white balance synchronization gain processing unit is used to determine the synchronization white balance gain of the first camera module.

[0032] The white balance statistics management unit is used to obtain the normal white balance gain of the second camera module; to smooth the synchronization white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain; and to use the backup white balance gain to perform white balance synchronization of the second camera module.

[0033] In the above scheme, the white balance synchronization gain processing unit is specifically used for:

[0034] If the white balance synchronization algorithm is determined to be the SAO synchronization algorithm, the proportion of each ambient light source in the shooting scene is obtained, and the brightness preference gain and synchronization white balance preference gain corresponding to each ambient light source are determined.

[0035] The synchronous white balance gain of the first camera module is determined based on the proportion of each ambient light source, the brightness preference gain corresponding to each ambient light source, and the synchronous white balance preference gain corresponding to each ambient light source.

[0036] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0037] A fourth aspect of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method described in any of the first aspects.

[0038] This invention provides a white balance synchronization control method, apparatus, medium, and device. The method includes: when it is determined that a camera module is switching or zooming, acquiring a first camera module and a second camera module to be synchronized for white balance; determining the synchronization white balance gain of the first camera module and the normal white balance gain of the second camera module; smoothing the synchronization white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain; and using the backup white balance gain to synchronize the white balance of the second camera module. Thus, when multiple camera modules are working collaboratively, if it is determined that a camera module is switching or zooming, the synchronization white balance gain of the first camera module can be smoothed using the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain. Since the backup white balance gain considers both the white balance gain of the first camera module and the white balance gain of the second camera module, when the second camera module uses the backup white balance gain for white balance synchronization, the effect of the transition scene can be ensured, thereby improving the quality of the image. Attached Figure Description

[0039] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0040] Figure 1 A schematic diagram of an image captured by a wide-angle camera module according to an embodiment of the present invention is shown;

[0041] Figure 2 A schematic diagram of an image captured by a telephoto camera module according to an embodiment of the present invention is shown;

[0042] Figure 3A schematic diagram of a camera module zooming from 1x to 10x according to an embodiment of the present invention is shown;

[0043] Figure 4 A schematic diagram of a camera module zooming from 10x to 1x according to an embodiment of the present invention is shown;

[0044] Figure 5 A schematic flowchart of a white balance synchronization control method according to an embodiment of the present invention is shown;

[0045] Figure 6 A schematic diagram of image frames corresponding to each camera module according to an embodiment of the present invention is shown;

[0046] Figure 7 A schematic diagram of a background image card according to an embodiment of the present invention is shown;

[0047] Figure 8 A schematic diagram showing the positions of a preset gray point, each ambient light source calibration point, and the final point (final) in a first grayscale image is provided according to an embodiment of the present invention.

[0048] Figure 9 A schematic diagram showing the positions of a preset gray point, each ambient light source calibration point, and the final point (final) in a second grayscale image according to an embodiment of the present invention is provided.

[0049] Figure 10 A schematic diagram of a white balance synchronization control device according to an embodiment of the present invention is shown;

[0050] Figure 11 A schematic diagram of a computer device structure according to an embodiment of the present invention is shown;

[0051] Figure 12 A schematic diagram of a computer-readable storage medium structure according to an embodiment of the present invention. Detailed Implementation

[0052] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0053] To better understand the technical solution of this application, let's first explain why white balance synchronization is necessary:

[0054] Generally, to ensure that the white balance of two camera modules is as close as possible when they work together, thus making their collaborative shooting function more stable and accurate, white balance synchronization between the two modules is necessary. Collaborative shooting modes include portrait mode and optical zoom mode.

[0055] Referring to Table 1, depending on the different configurations of the camera modules in the electronic device, the camera module information that needs to be synchronized after module switching or zooming is as follows:

[0056] Table 1

[0057]

[0058] In Table 1, Master can be understood as the main camera module whose image needs to be previewed on an electronic device, while Slave can be understood as the secondary camera module that runs in the background and whose image does not need to be previewed on an electronic device.

[0059] "Tele" represents the telephoto camera module, "wide" represents the wide-angle camera module, and "ultrawide" represents the ultra-wide-angle camera module. It's understandable that some electronic devices have two camera modules (dual-camera modules), while others have three. Taking a dual-camera module combination of "tele" and "wide" as an example, if the telephoto camera module "tele" is the first camera module (master camera module), and the wide-angle camera module "wide" is the second camera module (slave camera module), then when switching from the first camera module to the second camera module, the primary camera module (SyncMaster) that needs white balance synchronization is "tele," and the slave camera module (SyncSlave) that needs white balance synchronization is "wide."

[0060] Taking portrait mode as an example, when switching to portrait mode for shooting, the wide-angle camera module is generally switched to the telephoto camera module for shooting, and the image displayed on the screen is provided by the telephoto camera module. Because the background size of the image captured by the wide-angle camera module is larger, the portrait is smaller (see reference...). Figure 1 The background size of the image captured by the telephoto camera module will be smaller, making the portrait stand out more (see reference). Figure 2 Therefore, in this case, if white balance synchronization is not performed after switching modules, the screen color will change abruptly.

[0061] Similarly, in optical zoom mode, refer to Figure 3 When you need to use a zoom lens to magnify a scene, that is, to zoom in, the zoom mode can be from 1x to 10x. (See reference...) Figure 4When you need to zoom out by using a zoom lens, the zoom mode can be from 10x to 1x. If white balance is not synchronized after optical zooming of the camera module, the color of the image will also change abruptly.

[0062] Based on this, this embodiment provides a white balance synchronization control method, such as... Figure 5 As shown, the method mainly includes the following steps:

[0063] S510: When it is determined that the camera module is switching or zooming, the first camera module and the second camera module to be synchronized for white balance are acquired.

[0064] Understandably, when switching or zooming between camera modules, it is first necessary to determine which is the main camera module and which is the secondary camera module in order to accurately synchronize white balance.

[0065] For example, when the camera module is switched from the first camera module to the second camera module, the first camera module becomes the master camera module, and the second camera module becomes the slave camera module. Specifically, in this embodiment, the first and second camera modules to be synchronized for white balance can be determined by obtaining the IDs of the first and second camera modules.

[0066] S511, determine the synchronous white balance gain of the first camera module and the normal white balance gain of the second camera module;

[0067] Continuing with the application scenario of switching from the first camera module to the second camera module, since the first camera module is the master camera module and the second camera module is the slave camera module, after the module switch, the second camera module needs to synchronize its white balance with the white balance of the first camera module. Therefore, it is necessary to determine the synchronization white balance gain of the first camera module and the normal white balance gain of the second camera module.

[0068] Specifically, before determining the synchronization white balance gain of the first camera module, in order to avoid the impact of environmental factors on the white balance synchronization effect, it is necessary to perform white balance calibration and color accuracy (CCM) calibration on the first and second camera modules under the same environment.

[0069] The parameters that need to be calibrated mainly include: Region of Interest (ROI), dark current (OB), lens shadow relative illumination shading, brightness and exposure information synchronization, white balance under a standard lightbox, and subjective scene.

[0070] Calibration methods for dark current (OB), lens shadow shading, and brightness / exposure synchronization can be performed using well-known methods, and will not be detailed here. The following section focuses on calibration methods for ROI, white balance under a standard lightbox, and subjective scenes.

[0071] For ROI calibration, the ROI captured by the first camera module needs to be aligned with the ROI captured by the second camera module to ensure that the captured image content is consistent. In practical applications, the field of view ratio (FOVratio) of each camera module needs to be adjusted for ROI alignment. The FOV ratio is calculated based on the proportion of the image diagonal.

[0072] Specifically, assuming the first camera module is an ultra-wide-angle camera module, the second camera module is a wide-angle camera module, and the third camera module is a telephoto camera module, then for the same image content, the pixel size that the ultra-wide-angle camera module needs to crop is calculated based on the image pixels of the wide-angle camera module;

[0073] Then, the pixels that need to be cropped from the ultra-wide-angle camera module are compared with the full pixels of the image content to determine the FOV ratio of the ultra-wide-angle camera module.

[0074] For the same image content, the pixel size that the wide-angle camera module needs to crop is calculated based on the telephoto camera module. Then, the pixel size that the wide-angle camera module needs to crop is compared with the full pixels of the image content to determine the FOV ratio of the wide-angle camera module.

[0075] In practical applications, the diagonal of the telephoto camera module's image can be 1 / 2 = 0.5 of the diagonal of the wide-angle camera module's image. Assuming the FOV ratio of the ultra-wide-angle camera module is 32, then the FOV ratio of the wide-angle camera module is 64, and the FOV ratio of the telephoto camera module is 128.

[0076] refer to Figure 6 Mark 61 represents the image corresponding to the ultra-wide-angle camera module. Cropping the pixels outside border 62 from mark 61 yields the image corresponding to mark 63. Mark 63 represents the image corresponding to the wide-angle camera module. Cropping the pixels outside border 64 from mark 63 yields the image corresponding to mark 65, which represents the image corresponding to the telephoto camera module.

[0077] It can be seen that the images captured by markers 61, 63, and 65 are consistent, meaning that the ROI calibration is qualified.

[0078] For white balance calibration under a standard light box, such as Figure 7As shown, the background image card 71 (24-color card) needs to be placed at 1 / 9 of the fixed area 72. Under light sources such as D50 / D65 / D75 / TL84 / CWF / A / H, the first image of the background image card is taken using the first camera module, and the second image of the background image card is taken using the second camera module.

[0079] Among them, D50 is a high color temperature light source with a color temperature of 5000k, which can simulate sunlight; D65 is a high color temperature light source with a color temperature of 6500k, which can simulate sunlight under a blue sky; and D75 is a high color temperature light source with a color temperature of 7500k, which can simulate average sunlight in the north.

[0080] TL84 is a medium color temperature light source with a color temperature of 4000k; CWF is a medium color temperature light source with a color temperature of 4150k. A-beam and H-beam are low color temperature light sources, with A-beam having a color temperature of 2856k and H-beam having a color temperature of 2300k, which can simulate horizontal sunlight.

[0081] Under any light source, determine the R / G value and B / G value of patch 21 (the 21st patch of the 24-color chart, marked 73) in the first image and the second image respectively.

[0082] Then, based on the R / G and B / G values ​​of patch 21 in the first image and the R / G and B / G values ​​of patch 21 in the second image, the color difference value (diff) between the first camera module and the second camera module is calculated. The calculation method is as follows:

[0083] diff=max(ABS(model1_R / G-model2_R / G) / model2_R / G),

[0084] ABS(model1_B / G-model2_B / G) / model2_B / G)

[0085] Among them, model1 is the first camera module and model2 is the second camera module.

[0086] Similarly, the color difference values ​​of patches 1 to 18 between the first and second camera modules can be calculated. If the color difference value of patch 21 is less than 4% and the color difference value of patches 1 to 18 is less than 6% under each light source, it indicates that the white balance calibration of the first and second camera modules is qualified.

[0087] For calibration of subjective scenes, after the above objective parameters are calibrated, the template color, grass color and soil color are photographed using the first camera module and the second camera module. The color of the photographed images is observed by human experience to see if there is any color cast. If there is no color cast, it means that the first camera module and the second camera module are calibrated successfully.

[0088] After calibration, the synchronization white balance gain of the first camera module can be determined. This embodiment can determine the synchronization white balance gain of the first camera module using two synchronization algorithms: the first is the SAO synchronization algorithm (SYNC_AWB_SAO_METHOD); the second is the white balance point synchronization algorithm (SYNC_AWB_POINT_METHOD).

[0089] In one implementation, determining the synchronization white balance gain of the first camera module includes:

[0090] If the white balance synchronization algorithm is determined to be the SAO synchronization algorithm, the proportion of each ambient light source in the shooting scene is obtained, and the brightness preference gain and synchronization white balance preference gain corresponding to each ambient light source are determined.

[0091] The synchronization white balance gain of the first camera module is determined based on the proportion of each ambient light source, the brightness preference gain corresponding to each ambient light source, and the synchronization white balance preference gain corresponding to each ambient light source.

[0092] Specifically, in the same environment, there may be multiple different types of light sources. For example, when shooting indoors near a window, the light sources include indoor low color temperature A or H light, as well as outdoor D50, D65, or D75 light. The brightness of these light sources, as well as the user's color preference for a particular scene, will affect the white balance effect. Therefore, it is necessary to adjust the color preference parameters and ambient light brightness parameters first. The specific code is as follows:

[0093] {

[0094] 1, / / Whether to consider CCM (Color Correction Matrix) in synchronous calculation 1 = true 0 = false

[0095] / / Brightness boundary, Y information (0~255): Statistical points with a value below 20 in the image are not included in the calculation.

[0096] / / Brightness boundary Y information (0~255): Statistical points in the image with a value higher than 220 are not included in the calculation.

[0097] 0, / / syncgain is a stable setting from 0 to 1024. The smaller the value, the more stable the white balance effect.

[0098] }

[0099] / / FOV ratio

[0100] {

[0101] / / Whether to enable FOV alignment matching: 1 = true (enabled) 0 = false (disabled)

[0102] 128, / / FOV ratio baseline value is 128

[0103] }

[0104] / / AWB sync smooth mechanism for synchronizing white balance gain.

[0105] {

[0106] 1, / / Whether to enable syncgainsmooth mechanism 1 = true (enabled) 0 = false (disabled)

[0107] 2. / / smooth frame rate setting (1-5) - Number of frames to be synchronized

[0108] {

[0109] / / Preference gain settings; preset based on shooting environment:

[0110] {512,512,512} / / H light

[0111] {512,512,512} / / A light

[0112] {512,512,512} / / TL84

[0113] {512,512,512} / / CWF

[0114] {512,512,512} / / D50

[0115] {512,512,512} / / D65

[0116] {512,512,512} / / D75

[0117] }

[0118] For example, if the shooting scene is an office, the office generally uses TL84 light source. {512,512,512} represent R, G, and B values ​​respectively. The R, G, and B values ​​can be preset according to scene preferences. For example, if the office scene allows the image color to be a bit reddish, then the R value can be set a little higher within the allowable range.

[0119] / / preferencegain preference gain setting; adjusted based on LV brightness level:

[0120] {30,100}, / / LV brightness levels, the lowest brightness level is 30, and the highest brightness level is 100.

[0121] {512,512}, / / H-light R channel base=512

[0122] {512,512}, / / H optical G channel base=512

[0123] {512,512}, / / H optical B channel base=512

[0124] {512,512}, / / A optical R channel base=512

[0125] {512,512}, / / A optical G channel base=512

[0126] {512,512}, / / Base of channel B in optical A = 512

[0127] {512,512}, / / TL84 optical R channel base=512

[0128] {512,512}, / / TL84 optical G channel base=512

[0129] {512,512}, / / TL84 optical B channel base=512

[0130] {512,512}, / / CWF optical R channel base=512

[0131] {512,512}, / / CWF optical G channel base=512

[0132] {512,512}, / / CWF optical B channel base=512

[0133] {512,512}, / / D50 optical R channel base=512

[0134] {512,512}, / / D50 optical G channel base=512

[0135] {512,512}, / / D50 optical B channel base=512

[0136] {512,512}, / / D65 optical R channel base=512

[0137] {512,512}, / / D65 optical G channel base=512

[0138] {512,512}, / / D65 optical B channel base=512

[0139] {512,512}, / / D75 optical R channel base=512

[0140] {512,512}, / / D75 optical G channel base=512

[0141] {512,512}, / / D75 optical B channel base=512

[0142] }

[0143] The highest brightness level (LV) is 100, and the lowest is 30. Under light sources with different brightness levels, the white balance synchronization effect can be adjusted by adjusting the values ​​of R, G, and B.

[0144] Regarding the {512,512} format of RGB described above, if the brightness level is lower than 30, the data in the left column will be adjusted; if the brightness level is higher than 100, the data in the right column will be adjusted to change the values ​​of R, G, and B.

[0145] Taking the D65 light source as an example, if the brightness is below 30, adjust the data in the left column as follows:

[0146] {508,512} / / D65 R channel

[0147] {512,512} / / D65 G channel

[0148] {520,512} / / D65 B channel

[0149] If the brightness level is greater than 30 but less than 100, the corresponding RGB value can be determined by interpolation and stored in a pre-set buffer area. The corresponding R, G, and B values ​​can be directly retrieved from the buffer area to adjust the R, G, and B values.

[0150] For example, if the ambient light source is TL84, the R value is set to 500 when the brightness level is 30; the R value is set to 540 when the brightness level is 100; if the current ambient light source brightness level is 40, the corresponding R value for brightness level 40 can be determined by interpolation calculation.

[0151] By adjusting the parameters that affect the synchronization white balance gain, and finally executing the SAO synchronization algorithm, we can obtain the brightness preference gain and the synchronization white balance preference gain for each ambient light source.

[0152] Then, the synchronization white balance gain of the first camera module can be determined based on the proportion of each ambient light source, the corresponding preference gain under each ambient light source, and the synchronization white balance preference gain. Specifically, this includes:

[0153] sum(sync awb preference gain of each light souce*

[0154] According to the formula Determine the sync white balance gain (sync awb gain) of the first camera module; wherein,

[0155] The light source probability is the proportion of each ambient light source, the sync white balance preference gain of each light source is the corresponding sync white balance preference gain for each ambient light source, and the preference gain base on LV is the corresponding brightness preference gain for each ambient light source.

[0156] In another implementation, determining the synchronization white balance gain of the first camera module includes:

[0157] If the white balance synchronization algorithm is determined to be the white balance landing point synchronization algorithm, the first camera module is used to capture the background image under different ambient light conditions to obtain the corresponding first grayscale image; the second camera module is used to capture the background image to obtain the corresponding second grayscale image.

[0158] The first coordinate position of the preset gray point, each ambient light source calibration point and the final landing point in the first grayscale image is calibrated.

[0159] The preset gray point, each ambient light source calibration point and the final landing point are mapped to the second grayscale image. The coordinates of each ambient light source calibration point are adjusted so that the final landing point falls within the target coordinate range of the second grayscale image.

[0160] The synchronous white balance gain of the first camera module is determined based on the adjusted coordinates of each ambient light source calibration point.

[0161] Specifically, the white balance synchronization algorithm is based on the coordinate positions of the preset gray point, each ambient light source calibration point, and the final point (final) in the first grayscale image captured by the main camera module. Using a coordinate position mapping method, the preset gray point, each ambient light source calibration point, and the final point (final) are mapped onto the second grayscale image captured by the camera module. By adjusting the positions of the preset gray point and each ambient light source calibration point, the algorithm ensures that the final point (final) falls within the target coordinate range in the second grayscale image, and then outputs the corresponding synchronized white balance gain.

[0162] Among them, the positions of the preset gray points, the calibration points of each ambient light source, and the final landing point in the first grayscale image are pre-calibrated, as referenced. Figure 8 and Figure 9The preset gray points include: H-low, L-low, H-Mid, L-Mid, H-High, L-High, and the landing point Extd (extend) to the right of D65; the ambient light source calibration points include: H point, A point, TL84, DNP, and D65; the final landing point is a pentagram marker.

[0163] The specific code implementation for adjusting the coordinates of the preset gray point, the calibration points of each ambient light source, and the final landing point in the second grayscale image captured by the main camera module is as follows:

[0164] First, calibrate the settings of each point in the coordinate system: First, set the coordinate positions of the preset gray point, each ambient light source calibration point, and the final landing point in the first grayscale image captured by the main camera module:

[0165] / / mappingtable

[0166] {extend x,extend y} / / Threshold of Extd for the landing point on the right side of D65

[0167] {h-low_x,h-low_y}

[0168] {h-mid_x,h-mid_y}

[0169] {h-high_x,h-high_y}

[0170] {l-low_x,h-low_y}

[0171] {l-mid_x,h-mid_y}

[0172] {l-high_x,h-high_y}

[0173] / / The above are the settings for the gray dot positions.

[0174] x, y offset: The coordinate position offset of each ambient light source calibration point (which can be the offset in the first grayscale image or the offset in the second grayscale image). The position of the ambient light source calibration point in the corresponding grayscale image can be adjusted by adjusting the position coordinate offset. This application uses the coordinate position offset of each ambient light source calibration point in the second grayscale image to coarsely adjust the position of the ambient light source calibration point in the second grayscale image.

[0175] {0,0} / / H

[0176] {0,0} / / A

[0177] {0,0} / / TL84

[0178] {0,0} / / D65

[0179] {0,0} / / D50 / DNP

[0180] {0,0} / / CWF

[0181] {0,0} / / reserve

[0182] Final landing point adjustment

[0183] / / -100-80-60-40-20-10 0 20 40 60 80 100 represents the Y-axis coordinate range, which is (-100, 100).

[0184] The final landing point's position in the second grayscale image can be adjusted by finely tweaking the coordinates of the following ambient light source points:

[0185] {0,0,0,0,0,0,0,0,0,0,0,0} / / H

[0186] {0,0,0,0,0,0,0,0,0,0,0,0} / / A

[0187] {0,0,0,0,0,0,0,0,0,0,0,0} / / TL84

[0188] {0,0,0,0,0,0,0,0,0,0,0,0} / / D50 / DNP

[0189] {0,0,0,0,0,0,0,0,0,0,0,0} / / D65

[0190] {0,0,0,0,0,0,0,0,0,0,0,0} / / CWF

[0191] Here, {0,0,0,0,0,0,0,0,0,0,0,0} represents the 12 position intervals of the above Y-axis interval. For example, taking the H light source point as an example, assuming that the final point falls at the 0 position of the Y-axis of the H light source point, the {0,0,0,0,0,0,0,0,0,0,0} of the H light source point is adjusted to {0,0,0,0,0,0,-5,0,0,0,0,0}, which means that within the interval of -10 to 20 of the Y-axis of the H light source point, the Y-axis coordinate of the final point is shifted down by 5 points.

[0192] Once the final point falls within the target coordinate range in the second grayscale image, the coordinates of each ambient light source calibration point in the second grayscale image are obtained. Based on the coordinates of each ambient light source calibration point in the second grayscale image, the corresponding synchronization white balance gain is output. The coordinates of each ambient light source calibration point in the second grayscale image and the synchronization white balance gain have a preset correspondence.

[0193] Both of the above synchronization algorithms can obtain the synchronization white balance gain of the first camera module.

[0194] S512, based on the normal white balance gain of the second camera module, the synchronous white balance gain of the first camera module is smoothed to obtain the corresponding backup white balance gain;

[0195] However, if the first camera module directly uses the synchronous white balance gain of the first camera module, there may be color jumps. Therefore, in order to make the color of the currently displayed image transition from the image captured by the first camera module to the image captured by the second camera module, this embodiment needs to smooth the synchronous white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain the corresponding backup white balance gain.

[0196] In one implementation, the synchronous white balance gain of the first camera module is smoothed based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain, including:

[0197] Get the current ambient light level;

[0198] The mixing ratio of normal white balance gain and synchronous white balance gain is determined based on the ambient brightness level.

[0199] The synchronization balance gain is adjusted according to the mixing ratio to obtain the backup white balance gain.

[0200] The mixing ratio includes a first ratio corresponding to the synchronous white balance gain and a second ratio corresponding to the normal white balance gain. Adjusting the synchronous balance gain according to the mixing ratio to obtain the backup white balance gain can include:

[0201] Determine the first product value between the first ratio and the synchronous white balance gain;

[0202] Determine the second product value between the second ratio and the normal white balance gain;

[0203] The sum of the first and second product values ​​is determined as the standby white balance gain.

[0204] Specifically, the code implementation for determining the mixing ratio of normal white balance gain and synchronous white balance gain based on the ambient brightness level is as follows:

[0205] / / LV 0 1 23 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1819 20{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100}

[0206] / / The parameter range is 0 to 100, which is the mixing ratio. The mixing ratio can be set under different LV conditions to make the synchronous white balance gain smoother.

[0207] For example, when the brightness level LV is 10, you can set a suitable blending ratio by setting the corresponding position 100 within the curly braces. If the blending ratio is set to 20, then you can change the corresponding position 100 to 20, so that the first ratio is 80% and the second ratio is 20%.

[0208] S513, use the backup white balance gain to perform white balance synchronization on the second camera module.

[0209] After the backup white balance gain is determined, the backup white balance gain is used to perform white balance synchronization on the second camera module, including:

[0210] Obtain the target number of frames for white balance synchronization of the second camera module;

[0211] Set the white balance gain of the target frame number to the backup white balance gain, and set the white balance gain of the remaining frame number to the normal white balance gain of the second camera module.

[0212] For example, assuming the target number of frames for white balance synchronization is 3, when switching from the first camera module to the second camera module, the white balance gain used by the first 3 frames of the second camera module is the backup white balance gain, while the images after the 3rd frame still use their own normal white balance gain.

[0213] Because the backup white balance gain takes into account the white balance gains of both the first and second camera modules, when the second camera module uses the backup white balance gain for white balance synchronization, the transition effect can be ensured, thereby improving the quality of the image.

[0214] Based on the same inventive concept as in the foregoing embodiments, this embodiment also provides a white balance synchronization control device, such as... Figure 10 As shown, the device includes:

[0215] The White Balance Sync Statistics Management Unit (AWB Sync Mgr) is used to determine the first and second camera modules to be synchronized with white balance when it is determined that the camera module is switching or zooming.

[0216] The white balance synchronization gain processing unit AWB Sync Algo is used to determine the synchronization white balance gain of the first camera module.

[0217] The white balance statistics management unit (AWB Mgr) is used to obtain the normal white balance gain of the second camera module; to smooth the synchronization white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain; and to use the backup white balance gain to perform white balance synchronization of the second camera module.

[0218] In one implementation, the white balance synchronization gain processing unit AWB Sync Algo is specifically used for:

[0219] If the white balance synchronization algorithm is determined to be the SAO synchronization algorithm, the parameters affecting the synchronization white balance gain are adjusted.

[0220] Obtain the proportion of each type of ambient light source in the shooting scene, and determine the corresponding brightness preference gain and synchronous white balance preference gain for each type of ambient light source;

[0221] The synchronous white balance gain of the first camera module is determined based on the proportion of each ambient light source, the brightness preference gain corresponding to each ambient light source, and the synchronous white balance preference gain corresponding to each ambient light source.

[0222] Since the apparatus described in the embodiments of this invention is used to implement the white balance synchronization control method of the embodiments of this invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in the embodiments of this invention, and therefore will not be described in detail here. All apparatuses used in the methods of the embodiments of this invention fall within the scope of protection of this invention.

[0223] Based on the same inventive concept, this embodiment provides a computer device 1100, such as... Figure 11 As shown, it includes a memory 1110, a processor 1120, and a computer program 1111 stored in the memory 1110 and executable on the processor 1120. When the processor 1120 executes the computer program 1111, it implements any step of the method described above.

[0224] Based on the same inventive concept, this embodiment provides a computer-readable storage medium 1200, such as... Figure 12As shown, a computer program 1211 is stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0225] Through one or more embodiments of the present invention, the present invention has the following beneficial effects or advantages:

[0226] This invention provides a white balance synchronization control method, apparatus, medium, and device. The method includes: when it is determined that a camera module is switching or zooming, acquiring a first camera module and a second camera module to be synchronized for white balance; determining the synchronization white balance gain of the first camera module and the normal white balance gain of the second camera module; smoothing the synchronization white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain; and using the backup white balance gain to synchronize the white balance of the second camera module. Thus, when multiple camera modules are working collaboratively, if it is determined that a camera module is switching or zooming, the synchronization white balance gain of the first camera module can be smoothed using the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain. Since the backup white balance gain considers both the white balance gain of the first camera module and the white balance gain of the second camera module, when the second camera module uses the backup white balance gain for white balance synchronization, the effect of the transition scene can be ensured, thereby improving the quality of the image.

[0227] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0228] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0229] Similarly, it should be understood that, in order to simplify this disclosure and aid in understanding one or more of the various aspects of the invention, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0230] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0231] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0232] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components of the gateway, proxy server, or system according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing some or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0233] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0234] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0235] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A white balance synchronization control method, characterized in that, The method includes: Acquire the first and second camera modules to be synchronized for white balance; Determine the synchronous white balance gain of the first camera module and the normal white balance gain of the second camera module; The synchronous white balance gain of the first camera module is smoothed based on the normal white balance gain of the second camera module to obtain the corresponding backup white balance gain. The second camera module is synchronized with white balance using the backup white balance gain; wherein, The smoothing of the synchronous white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain includes: Get the current ambient light level; The mixing ratio of the normal white balance gain and the synchronous white balance gain is determined based on the ambient brightness level. The synchronous white balance gain is adjusted according to the mixing ratio to obtain the backup white balance gain.

2. The method as described in claim 1, characterized in that, Determining the synchronous white balance gain of the first camera module includes: If the white balance synchronization algorithm is determined to be the SAO synchronization algorithm, the proportion of each ambient light source in the shooting scene is obtained, and the brightness preference gain and synchronization white balance preference gain corresponding to each ambient light source are determined. The synchronous white balance gain of the first camera module is determined based on the proportion of each ambient light source, the brightness preference gain corresponding to each ambient light source, and the synchronous white balance preference gain corresponding to each ambient light source.

3. The method as described in claim 2, characterized in that, The step of determining the synchronous white balance gain of the first camera module based on the proportion of each ambient light source, the preference gain corresponding to each ambient light source, and the synchronous white balance preference gain includes: According to the formula Determine the synchronization white balance gain of the first camera module ;in, The The proportion of each type of ambient light source in the total light source, the The corresponding synchronous white balance preference gain for each ambient light source, the This represents the brightness preference gain for each ambient light source.

4. The method as described in claim 1, characterized in that, Determining the synchronous white balance gain of the first camera module includes: If the white balance synchronization algorithm is determined to be the white balance landing point synchronization algorithm, the first camera module is used to capture the background image under different ambient light sources to obtain the corresponding first grayscale image; the second camera module is used to capture the background image to obtain the corresponding second grayscale image. Calibrate preset gray points, calibration points of various ambient light sources, and final landing points. final The first coordinate position in the first grayscale image; The preset gray point, each ambient light source calibration point, and the final landing point are used. final Mapped in the second grayscale image, the coordinates of each of the ambient light source calibration points are adjusted so that the final landing point falls within the target coordinate range in the second grayscale image; The synchronous white balance gain of the first camera module is determined based on the adjusted coordinates of each of the ambient light source calibration points.

5. The method as described in claim 1, characterized in that, The step of using the spare white balance gain to perform white balance synchronization on the second camera module includes: Obtain the target number of frames for which white balance synchronization is required for the second camera module; Set the white balance gain of the target frame number to the backup white balance gain, and set the white balance gain of the remaining frame number to the normal white balance gain of the second camera module.

6. A white balance synchronization control device, characterized in that, The device includes: The white balance synchronization statistics management unit is used to determine the first and second camera modules to be synchronized with white balance when it is determined that the camera module is switching or zooming. The white balance synchronization gain processing unit is used to determine the synchronization white balance gain of the first camera module. The white balance statistics management unit is used to obtain the normal white balance gain of the second camera module; to smooth the synchronization white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain; and to use the backup white balance gain to perform white balance synchronization of the second camera module. The smoothing of the synchronous white balance gain of the first camera module based on the normal white balance gain of the second camera module to obtain a corresponding backup white balance gain includes: Get the current ambient light level; The mixing ratio of the normal white balance gain and the synchronous white balance gain is determined based on the ambient brightness level. The synchronous white balance gain is adjusted according to the mixing ratio to obtain the backup white balance gain.

7. The apparatus as claimed in claim 6, characterized in that, The white balance synchronization gain processing unit is specifically used for: If the white balance synchronization algorithm is determined to be the SAO synchronization algorithm, the proportion of each ambient light source in the shooting scene is obtained, and the brightness preference gain and synchronization white balance preference gain corresponding to each ambient light source are determined. The synchronous white balance gain of the first camera module is determined based on the proportion of each ambient light source, the brightness preference gain corresponding to each ambient light source, and the synchronous white balance preference gain corresponding to each ambient light source.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-5.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Control method, control device, electronic equipment and storage medium

    CN116782040A