White balance adjustment method, device, equipment and medium

By calculating the white balance parameters of the second camera in the multi-eye image acquisition device, it is consistent with the white balance of the first camera, the visual difference caused by inconsistent white balance is solved and the user experience is improved.

CN116033284BActive Publication Date: 2025-08-08ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211721145.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-08-08
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

The inconsistent white balance between the two cameras in the multi-eye image acquisition device leads to large differences in image visuals, affecting the user's visual perception.

Method used

By determining the white balance white point target coordinates of the first camera, combining the pre-saved position area map and the target algorithm, the white balance white point target coordinates of the second camera are calculated and their parameters are adjusted so that the white balance of the two cameras tends to be consistent.

Benefits of technology

It effectively reduces the visual difference between the images collected by the two cameras, improves the user's visual sense, and has a smaller algorithm overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033284B_ABST
    Figure CN116033284B_ABST
Patent Text Reader

Abstract

The present application discloses a white balance adjustment method, apparatus, device and medium. Since the present application can use the first target coordinates of the white balance white point corresponding to the first camera as a reference, determine the number of targets in the position area containing the first target coordinates in the first position area map, and then determine the first target position and the second target position corresponding to the target number, determine the second target coordinates of the white balance white point corresponding to the second camera according to the first target coordinates, the two coordinates corresponding to the first target position and the second target position in the first position area map respectively, the two coordinates corresponding to the first target position and the second target position in the second position area map respectively and a preset target algorithm, and set the white balance parameters of the second camera according to the second target coordinates, so as to achieve the white balance of the first camera and the second camera becoming consistent, and avoid the problem of large visual differences in images captured by the first camera and the second camera.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video surveillance technology, and in particular to a white balance adjustment method, device, equipment and medium. Background Art

[0002] Currently, with the rapid development of surveillance technology, monocular image acquisition devices are evolving towards multi-camera image acquisition devices, resulting in various image acquisition device forms, such as fixed-focus and zoom combinations, and zoom and zoom combinations. The emergence of multi-camera image acquisition devices can meet the need to capture panoramic images with one camera and local images with another, but this also leads to some image quality issues. For example, if the white balance of the two cameras in a multi-camera image acquisition device is inconsistent, the images captured by one camera will be visually different from those captured by the other camera, affecting the user's viewing experience.

[0003] Figure 1a This is a fixed-focus panoramic image display provided in an embodiment of the present application. Figure 1b This is a partial image display diagram zoomed to an intersection provided in an embodiment of the present application. Figure 1a It is a panoramic image captured by a camera of a multi-camera image acquisition device. Figure 1b This is a partial image captured by another camera of the multi-camera image acquisition device. It can be seen that there is a white balance difference between the two images, and the visual difference between the two images is also very large.

[0004] In related technologies, in order to reduce the visual difference between panoramic images and local images, the existing white balance algorithm is generally optimized, and the white balance parameters of the two cameras are determined and adjusted based on the optimized white balance algorithm. Although this method can reduce the visual difference between the two images, it cannot guarantee that the panoramic image and the local image can achieve absolute consistency in white balance in all scenes. In addition, due to the increased complexity of the algorithm, it may also cause certain delays and performance overhead. Therefore, it is crucial to propose a method that can accurately adjust the white balance parameter values of the two cameras to reduce the visual difference between the images captured by the two cameras. Summary of the Invention

[0005] The embodiments of the present application provide a white balance adjustment method, apparatus, device, and medium to solve the problem in the prior art that the white balance of two cameras in a multi-camera image acquisition device is inconsistent, resulting in large visual differences in the images captured by the two cameras, affecting the user's viewing experience.

[0006] The present application provides a white balance adjustment method, the method comprising:

[0007] Determining first target coordinates of a white balance point corresponding to a first camera according to a current image captured by a first camera of a target image acquisition device and a preset white balance algorithm;

[0008] Determining, based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, the number of targets in the position area containing the first target coordinates; and determining, based on the number of targets, the pre-stored correspondence between the number of targets and the first and second positions, the first and second target positions corresponding to the number of targets;

[0009] Based on the first coordinates and second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, determine the second target coordinates of the white balance white point corresponding to the second camera, and set the white balance parameters of the second camera according to the second target coordinates.

[0010] Furthermore, before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image capture device and a preset white balance algorithm, the method further includes:

[0011] Determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

[0012] Furthermore, determining the first target position and the second target position corresponding to the target quantity according to the correspondence between the target quantity, the pre-stored quantity, the first position, and the second position includes:

[0013] If the number of the target is one, determining a first set position in the position area where the first target coordinate is located as the first target position, and determining a second set position in the position area where the first target coordinate is located as the second target position;

[0014] If the number of the targets is two, the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located is determined as the first target position, and the fourth set position of the white point position sub-area in the other position area is determined as the second target position;

[0015] If the number of targets is zero, the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinates is determined as the first target position, and the sixth set position of the white point position sub-area in the other position area is determined as the second target position.

[0016] Furthermore, determining the second target coordinates of the white balance white point corresponding to the second camera based on the first coordinates and the second coordinates corresponding to the first target position and the second target position in the first white point position area map, respectively, and the third coordinates and the fourth coordinates corresponding to the second white point position area map corresponding to the second camera, respectively, and a preset target algorithm includes:

[0017] Determine a first perpendicular point where a first perpendicular line, which passes through the first target coordinate and is perpendicular to a first straight line formed by the first coordinate and the second coordinate, intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate;

[0018] Determine the second target coordinates of the white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection of the second straight line and a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate.

[0019] Furthermore, before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image capture device and a preset white balance algorithm, the method further includes:

[0020] Obtaining the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification;

[0021] The camera with a large field of view angle is determined as the first camera, and the camera with a small field of view angle is determined as the second camera.

[0022] The present application also provides a white balance adjustment device, comprising:

[0023] a determination module configured to determine, based on a current image captured by a first camera of a target image capture device and a preset white balance algorithm, first target coordinates of a white balance point corresponding to the first camera; determine, based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, a number of targets in a position area containing the first target coordinates; and determine, based on the number of targets, a pre-stored correspondence between the number of targets and the first and second positions, first target positions and second target positions corresponding to the number of targets;

[0024] a processing module, configured to determine, based on the first coordinates and the second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and the fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, and to set the white balance parameters of the second camera according to the second target coordinates.

[0025] Furthermore, the determination module is also used to determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, an operation is performed to determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

[0026] Further, the determination module is specifically used to, if the number of targets is one, determine the first set position in the position area where the first target coordinate is located as the first target position, and determine the second set position in the position area where the first target coordinate is located as the second target position; if the number of targets is two, determine the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located as the first target position, and determine the fourth set position of the white point position sub-area in the other position area as the second target position; if the number of targets is zero, determine the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinate as the first target position, and determine the sixth set position of the white point position sub-area in the other position area as the second target position.

[0027] Furthermore, the processing module is specifically used to determine a first vertical point where a first perpendicular line passing through the first target coordinate and perpendicular to a first straight line formed by the first coordinate and the second coordinate intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first vertical point to a second distance between the first coordinate and the second coordinate; determine the second target coordinate of the white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection of a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate, and the second straight line.

[0028] Furthermore, the determination module is also used to obtain the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification; determine the camera with a larger field of view angle as the first camera, and determine the camera with a smaller field of view angle as the second camera.

[0029] The present application also provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned white balance adjustment methods when executing a computer program stored in the memory.

[0030] The present application also provides a computer-readable storage medium storing a computer program, which implements the steps of any of the above-mentioned white balance adjustment methods when executed by a processor.

[0031] In the present application, the first target coordinates of the white balance point corresponding to the first camera are determined based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm; the number of targets in the position area containing the first target coordinates is determined based on the first target coordinates and a pre-saved first position area map corresponding to the first camera at each color temperature, and the first target position and the second target position corresponding to the number of targets are determined based on the number of targets, the pre-saved number, and the correspondence between the first position and the second position; the second target coordinates of the white balance point corresponding to the second camera are determined based on the first coordinates and the second coordinates respectively corresponding to the first target position and the second target position in the first position area map, and the third coordinates and the fourth coordinates respectively corresponding to the second position area map corresponding to the second camera and the preset target algorithm, and the white balance parameters of the second camera are set based on the second target coordinates. In the embodiment of the present application, the first target coordinates of the white balance white point corresponding to the first camera can be used as a reference to first determine the number of targets in the position area containing the first target coordinates in the first position area map, and then determine the first target position and the second target position corresponding to the target number. According to the first target coordinates, the two coordinates corresponding to the first target position and the second target position in the first position area map respectively, the two coordinates corresponding to the first target position and the second target position in the second position area map respectively, and a preset target algorithm, the second target coordinates of the white balance white point corresponding to the second camera are determined, and the white balance parameters of the second camera are set according to the second target coordinates to achieve consistency in white balance between the first camera and the second camera, thereby avoiding the problem of large visual differences between the images captured by the first camera and the second camera due to inconsistent white balance, and the white balance algorithm overhead in the present application is relatively small. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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 any creative work.

[0033] Figure 1a A fixed-focus panoramic image display provided in an embodiment of the present application;

[0034] Figure 1b A partial image display diagram zoomed to an intersection provided in an embodiment of the present application;

[0035] Figure 2 A schematic diagram of a white balance adjustment process provided in an embodiment of the present application;

[0036] Figure 3A schematic diagram of displaying a first location area map provided in some embodiments of the present application;

[0037] Figure 4 A schematic diagram showing the display of first target coordinates in a first location area map provided in some embodiments of the present application;

[0038] Figure 5 A display schematic diagram of determining a first vertical point when the target number is 1 provided in some embodiments of the present application;

[0039] Figure 6 A schematic diagram of a display of determining a first vertical point when the target quantity is 0 in some embodiments of the present application;

[0040] Figure 7 A schematic diagram of the relationship between various coordinates provided in some embodiments of the present application;

[0041] Figure 8 A schematic diagram showing a method for determining a camera's field of view angle according to some embodiments of the present application;

[0042] Figure 9 A schematic diagram of a process for determining second target coordinates of a white balance point corresponding to a second camera provided in some embodiments of the present application;

[0043] Figure 10 A schematic diagram of a process for determining the second target coordinates based on white balance calculation method 1 provided in some embodiments of the present application;

[0044] Figure 11 A schematic diagram of a process for determining second target coordinates based on white balance calculation method 2 provided in some embodiments of the present application;

[0045] Figure 12 A schematic diagram of a process for determining the second target coordinates based on white balance calculation method 3 provided in some embodiments of the present application;

[0046] Figure 13 A schematic diagram of the structure of a white balance adjustment device provided in some embodiments of the present application;

[0047] Figure 14 A schematic structural diagram of an electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0049] In order to ensure the consistency of white balance between two cameras in a multi-camera image acquisition device, reduce the visual difference of images captured by the two cameras, and improve the user's viewing experience, the embodiments of the present application provide a white balance adjustment method, device, equipment and medium.

[0050] In the present application, the first target coordinates of the white balance point corresponding to the first camera are determined based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm; the number of targets in the position area containing the first target coordinates is determined based on the first target coordinates and a pre-saved first position area map corresponding to the first camera at each color temperature, and the first target position and the second target position corresponding to the number of targets are determined based on the number of targets, the pre-saved number, and the correspondence between the first position and the second position; the second target coordinates of the white balance point corresponding to the second camera are determined based on the first coordinates and the second coordinates respectively corresponding to the first target position and the second target position in the first position area map, and the third coordinates and the fourth coordinates respectively corresponding to the second position area map corresponding to the second camera and the preset target algorithm, and the white balance parameters of the second camera are set based on the second target coordinates.

[0051] Example 1:

[0052] Figure 2 A schematic diagram of a white balance adjustment process provided in an embodiment of the present application includes the following steps:

[0053] S201: Determine first target coordinates of a white balance white point corresponding to a first camera of a target image acquisition device according to a current image captured by the first camera and a preset white balance algorithm.

[0054] The white balance adjustment solution provided in the embodiments of the present application is applied to an electronic device, which may be a smart terminal, a PC, an image acquisition device, a server, or the like.

[0055] In an embodiment of the present application, the target image acquisition device includes two cameras, one is a first camera and the other is a second camera, wherein one camera is used to acquire panoramic images and the other camera is used to acquire local images.

[0056] If the electronic device is a target image acquisition device, the electronic device determines the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by its own first camera and a preset white balance algorithm; if the electronic device is not a target image acquisition device, the electronic device can receive the current image captured by the first camera of the target image acquisition device, and determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image and the preset white balance algorithm.

[0057] The preset white balance algorithm may be a grayscale world method, etc. The coordinates of the white balance point corresponding to the first camera may include multiple ones, and the first target coordinates are the average coordinates of the multiple white balance point coordinates. The abscissa of the first target coordinates is the ratio of the pixel value corresponding to the pixel point in the G channel to the pixel value corresponding to the pixel point in the R channel, and the ordinate is the ratio of the pixel value corresponding to the pixel point in the G channel to the pixel value corresponding to the pixel point in the B channel.

[0058] Among them, the process of determining the first target coordinates of the white balance white point corresponding to the first camera according to the preset white balance algorithm is an existing technology and will not be described in detail here.

[0059] S202: Determine the number of targets in the position area including the first target coordinates based on the first target coordinates and a pre-saved first position area map corresponding to the first camera at each color temperature, and determine the first target position and the second target position corresponding to the number of targets based on the correspondence between the number of targets, the pre-saved number, and the first position and the second position.

[0060] To accurately determine how to adjust the white balance parameters of the second camera of the target image acquisition device for the current scene, in this embodiment, a first position area map corresponding to each color temperature of the first camera is pre-stored. The number of color temperatures can be 3, 5, etc., and the number of color temperatures can be set as needed. The color temperature can be any of A, TL84, D50, D65, D75, etc.

[0061] Specifically, in order to obtain the first position area map, in an embodiment of the present application, black, white and gray cards are placed in the test box in advance, and then the black, white and gray cards are placed under light of various color temperatures for irradiation. For each color temperature, it is determined that when irradiated under light of the color temperature, the image containing the black and gray card is captured by the first camera of the target image acquisition device, and the position of each pixel point in the original first position area map is determined according to the pixel values corresponding to each channel in the R channel, G channel and B channel of each pixel point in the image, wherein the horizontal axis of the original first position area map represents the ratio of the pixel value corresponding to the pixel point in the G channel to the pixel value corresponding to the pixel point in the R channel, and the vertical axis represents the ratio of the pixel value corresponding to the pixel point in the G channel to the pixel value corresponding to the pixel point in the R channel. For each pixel, the ratio of the pixel value corresponding to the pixel in the G channel to the pixel value corresponding to the pixel in the R channel is determined as the horizontal coordinate of the position corresponding to the pixel, and the ratio of the pixel value corresponding to the pixel in the G channel to the pixel value corresponding to the pixel in the B channel is determined as the vertical coordinate of the position corresponding to the pixel. Based on the coordinates of the position corresponding to the pixel, the position corresponding to the pixel is marked in the first position area map. After determining the position of each pixel in the first position area map, the position area corresponding to the color temperature is manually divided, wherein the position area includes the position of each pixel in the first position area map in the image obtained under the color temperature light. Then, which of these pixels are corresponding white points are manually determined and marked.

[0062] Figure 3 A schematic diagram of a first position area map provided in some embodiments of the present application is now directed to Figure 3 Provide explanation.

[0063] In the embodiment of the present application, the number of color temperatures is set to 5, and the five color temperatures are A, TL84, D50, D65, and D75 respectively.

[0064] For each color temperature, the color temperature corresponds to a position area, which is a polygonal area, and there may be overlapping areas between two position areas. For each position area, the area at the center of the position area is the position area corresponding to the white point.

[0065] After determining the first target coordinates, the number of targets in the position area containing the first target coordinates is determined based on the first target coordinates and a pre-saved first position area map corresponding to the first camera at each color temperature, wherein the first target coordinates may be located in a position area corresponding to a certain color temperature, in which case the number of targets is 1; the first target coordinates may also not be located in a position area corresponding to any color temperature, in which case the number of targets is 0; the currently captured image may also be located in a common area of position areas corresponding to two color temperatures, in which case the number of targets is 2.

[0066] Figure 4 A schematic diagram of displaying a first target coordinate in a first position area diagram provided in some embodiments of the present application is now directed to Figure 4 Provide explanation.

[0067] If the first target coordinates are the coordinates corresponding to point A, then the first target coordinates are located in a position area corresponding to a certain color temperature; if the first target coordinates are the coordinates corresponding to point B, then the first target coordinates are not located in a position area corresponding to any color temperature; if the first target coordinates are the coordinates corresponding to point C, then the first target coordinates are located in a common area of the sub-areas corresponding to two color temperatures.

[0068] Since the closer the first target coordinates are to the position area corresponding to a certain color temperature, the closer the color temperature of the image currently captured by the first camera is to the color temperature, the higher the accuracy of determining the second target coordinates corresponding to the second camera based on the position area corresponding to this close color temperature is. Therefore, in the embodiment of the present application, when the number of targets in the position area containing the first target coordinates is different, that is, when the positional relationship between the first target coordinates and the position areas corresponding to each color temperature is different, the parameters required for subsequent determination of the second target coordinates of the white balance white point of the second camera are different. Specifically, the electronic device pre-stores the number and the correspondence between the first position and the second position, wherein the first position and the second position are parameters considered when determining the second target coordinates of the white balance white point of the second camera.

[0069] In order to determine the coordinates of the two positions based on which the second target coordinates are determined, after determining the target quantity, the first target position and the second target position corresponding to the target quantity are determined according to the target quantity, the pre-saved quantity, and the correspondence between the first position and the second position.

[0070] S203: Determine the second target coordinates of the white balance white point corresponding to the second camera based on the first coordinates and the second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and the fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, and set the white balance parameters of the second camera based on the second target coordinates.

[0071] After determining the first target position and the second target position, determine the first coordinate and the second coordinate respectively corresponding to the first target position and the second target position in the first position area map, and determine the third coordinate and the fourth coordinate respectively corresponding to the first target position and the second target position in the second position area map corresponding to the second camera, wherein the determination process of the second position area map is the same as the determination process of the first position area map, except that the camera for collecting images is the second camera, which is not repeated here.

[0072] In order to determine the second target coordinates, in an embodiment of the present application, the second target coordinates of the white balance white point corresponding to the second camera are determined based on the first coordinates, the second coordinates, the third coordinates, the fourth coordinates and a preset target algorithm, and then the white balance parameters of the second camera are set according to the second target coordinates to achieve consistency in the white balance of the first camera and the second camera.

[0073] The process of setting the white balance parameters of the second camera according to the second target coordinates is a conventional technique and will not be described in detail here.

[0074] In the embodiment of the present application, the first target coordinates of the white balance white point corresponding to the first camera can be used as a reference to first determine the number of targets in the position area containing the first target coordinates in the first position area map, and then determine the first target position and the second target position corresponding to the target number. According to the first target coordinates, the two coordinates corresponding to the first target position and the second target position in the first position area map respectively, the two coordinates corresponding to the first target position and the second target position in the second position area map respectively, and a preset target algorithm, the second target coordinates of the white balance white point corresponding to the second camera are determined, and the white balance parameters of the second camera are set according to the second target coordinates to achieve consistency in white balance between the first camera and the second camera, thereby avoiding the problem of large visual differences between the images captured by the first camera and the second camera due to inconsistent white balance, and the white balance algorithm overhead in the present application is relatively small.

[0075] Example 2:

[0076] To reduce the workload of the electronic device, based on the above embodiment, in an embodiment of the present application, before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image capture device and a preset white balance algorithm, the method further includes:

[0077] Determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

[0078] In an embodiment of the present application, since the capture areas of the two cameras of the target image capture device do not overlap at all, that is, the images captured by the first camera and the second camera do not contain the same image content, there is no need to consider whether there is a visual difference in the images captured by the two cameras, nor is there a need to make the white balance of the first camera and the second camera tend to be consistent. Therefore, in order to reduce the workload of the electronic device, before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image capture device and the preset white balance algorithm, the electronic device can first determine whether there is an overlapping area between the capture area of the first camera and the capture area of the second camera. If so, it is determined that it is necessary to ensure that the white balance of the first camera and the second camera tend to be consistent, thereby ensuring that the visual difference between the images captured by the first camera and the second camera is small. Therefore, the operation of determining the first target coordinates of the white balance white point corresponding to the first camera is performed based on the current image captured by the first camera of the target image capture device and the preset white balance algorithm. If not, it is determined that it is not necessary to ensure that the white balance of the first camera and the second camera are close to the same, nor is it necessary to ensure that the visual difference between the images captured by the first camera and the second camera is small. Therefore, the operation of ensuring that the white balance of the first camera and the second camera are close to the same is not performed. The target coordinates corresponding to the first camera and the second camera can be determined based on a preset white balance algorithm. The process of determining the target coordinates corresponding to the first camera and the second camera based on the preset white balance algorithm is conventional technology and is not further described here.

[0079] To determine whether the acquisition areas of the first camera and the second camera overlap, in one possible implementation, a first image captured by the first camera and a second image captured by the second camera can be obtained. Then, based on an AI intelligent method, the first image and the second image can be identified to determine whether they contain overlapping image content. Specifically, if they do, it is determined that the acquisition areas of the first camera and the second camera overlap; otherwise, it is determined that the acquisition areas of the first camera and the second camera do not overlap.

[0080] In another possible implementation, whether the acquisition areas of the first camera and the second camera overlap can be determined based on whether the field of view angles of the first camera and the second camera are in the same direction. Specifically, if they are in the same direction, then it is determined that the acquisition areas of the first camera and the second camera overlap; otherwise, it is determined that the acquisition areas of the first camera and the second camera do not overlap.

[0081] Example 3:

[0082] In order to accurately determine the second target coordinates according to the number of targets, based on the above embodiments, in an embodiment of the present application, determining the first target position and the second target position corresponding to the number of targets according to the correspondence between the number of targets, the pre-stored number, the first position, and the second position includes:

[0083] If the number of the target is one, determining a first set position in the position area where the first target coordinate is located as the first target position, and determining a second set position in the position area where the first target coordinate is located as the second target position;

[0084] If the number of the targets is two, the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located is determined as the first target position, and the fourth set position of the white point position sub-area in the other position area is determined as the second target position;

[0085] If the number of targets is zero, the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinates is determined as the first target position, and the sixth set position of the white point position sub-area in the other position area is determined as the second target position.

[0086] In an embodiment of the present application, if the number of targets in the position area including the first target coordinate is one, that is, the first target coordinate is only located in the position area corresponding to one color temperature, then the first set position in the position area where the first target coordinate is located can be determined as the first target position, and the second set position in the position area where the first target coordinate is located can be determined as the second target position, wherein the first set position can be the position of the upper left corner in the position area, and the second set position can be the position of the lower right corner in the position area. Specifically, the first set position and the second set position can be set according to needs.

[0087] If the number of targets in the position area containing the first target coordinate is two, that is, the first target coordinate is only located in the common area of the position areas corresponding to the two color temperatures, then the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located can be determined as the first target position, and the fourth set position of the white point position sub-area in the other position area can be determined as the second target position. For ease of description, one of the position areas is referred to as the first area, and the other position area is referred to as the second area. The third set position of the white point position sub-area in the first area is determined as the first target position, and the fourth set position of the white point position sub-area in the second area is determined as the second target position. The third set position can be the center position of the sub-position area where the white point is located in the first area, and the fourth set position can be the center position of the sub-position area where the white point is located in the second area. Specifically, the third set position and the fourth set position can be set as required.

[0088] If the number of targets in the position area containing the first target coordinate is zero, that is, the first target coordinate is not located in any position area corresponding to a color temperature, then the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinate can be determined as the first target position, and the sixth set position of the white point position sub-area in the other position area can be determined as the second target position. For ease of description, one of the position areas is referred to as the third area, and the other position area is referred to as the fourth area. The fifth set position of the white point position sub-area in the third area is determined as the first target position, and the sixth set position of the white point position sub-area in the fourth area is determined as the second target position. The fifth set position can be the center position of the sub-position area where the white point is located in the third area, and the sixth set position can be the center position of the sub-position area where the white point is located in the fourth area. Specifically, the fifth set position and the sixth set position can be set as required.

[0089] Example 4:

[0090] In order to accurately determine the second target coordinates of the white balance white point corresponding to the second camera, based on the above embodiments, in the embodiment of the present application, determining the second target coordinates of the white balance white point corresponding to the second camera based on the first coordinates and second coordinates corresponding to the first target position and the second target position in the first white point position area map, respectively, and the third coordinates and fourth coordinates corresponding to the second white point position area map corresponding to the second camera, respectively, and a preset target algorithm includes:

[0091] Determine a first perpendicular point where a first perpendicular line, which passes through the first target coordinate and is perpendicular to a first straight line formed by the first coordinate and the second coordinate, intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate;

[0092] Determine the second target coordinates of the white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection of the second straight line and a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate.

[0093] In order to accurately determine the second target coordinates of the white balance white point corresponding to the second camera, in an embodiment of the present application, after determining the first target coordinates, the first coordinate, the second coordinate, the third coordinate and the fourth coordinate, first determine the first straight line formed by the first coordinate and the second coordinate, then determine the first perpendicular line passing through the first target coordinate and perpendicular to the first straight line, and then determine the first perpendicular point where the first perpendicular line intersects the first straight line.

[0094] Specifically, the first vertical point is determined according to the following formula:

[0095]

[0096] Among them, P0_A is the coordinate of the first vertical point, P3_A is the first target coordinate, P1_A is the first coordinate, and P2_A is the second coordinate.

[0097] Figure 5 A display schematic diagram of determining a first vertical point when the target number is 1 is provided in some embodiments of the present application. Figure 6 For some embodiments of the present application, a display diagram of determining the first vertical point when the target number is 0 is now directed to Figure 5 and Figure 6 Provide explanation.

[0098] When the number of targets is 1, P3 is the first target coordinate, P1 is the first coordinate of the upper left corner of the position area corresponding to color temperature 1 where P3 is located, and P2 is the second coordinate of the lower right corner of the position area corresponding to color temperature 2 where P3 is located. A first perpendicular line perpendicular to the first straight line formed by P1 and P2 is drawn through P3, and the first perpendicular point where the first perpendicular line intersects the first straight line is P0. Figure 5 .

[0099] When the number of targets is 0, P3 is the first target coordinate, P1 is the first coordinate of the center position of the sub-position area where the white point is located in the position area corresponding to color temperature 1, and P2 is the second coordinate of the center position of the sub-position area where the white point is located in the position area corresponding to color temperature 1. Through P3, a first perpendicular line perpendicular to the first straight line formed by P1 and P2 is drawn, and then the first perpendicular point where the first perpendicular line intersects the first straight line is determined to be P0, see Figure 6 .

[0100] After the first vertical point is determined, a first distance between the first coordinate and the first vertical point and a second distance between the first coordinate and the second coordinate are determined, and then a first ratio of the first distance to the second distance is determined.

[0101] To accurately determine the second target coordinates of the white balance point corresponding to the second camera, the second target coordinates of the white balance point corresponding to the second camera are determined based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio. To determine the second ratio, a third distance between the second target coordinate and the second vertical point and a fourth distance between the third coordinate and the fourth coordinate are first determined, and then the ratio of the third distance to the fourth distance is determined as the second ratio. The second vertical point is the intersection of a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate, and the second straight line. That is to say, the ratio of the first distance between the first coordinate and the first perpendicular point to the second distance between the first coordinate and the second coordinate is equal to the ratio of the third distance between the third coordinate and the second perpendicular point and the fourth distance between the third coordinate and the fourth coordinate, that is, ρ(P1_A, P0_A) / ρ(P1_A, P2_A) = ρ(P1_B, P0_B) / ρ(P1_B, P2_B), where P0_A is the coordinate of the first perpendicular point, P1_A is the first coordinate, P2_A is the second coordinate, P0_B is the coordinate of the second perpendicular point, P1_B is the third coordinate, and P2_B is the fourth coordinate. Wherein, ρ(a, b) represents the Euclidean distance between the coordinates a and b. If the coordinate value of a is (x1, y1) and the coordinate value of b is (x0, y0),

[0102]

[0103] Figure 7 A schematic diagram of the relationship between various coordinates provided in some embodiments of the present application is now directed to Figure 7 Provide explanation.

[0104] P3_A is the first target coordinate, P1_A is the first coordinate, P2_A is the second coordinate, P0_A is the first perpendicular point, P3_B is the second target coordinate, P1_B is the third coordinate, P2_B is the fourth coordinate, and P0_B is the second perpendicular point. P0_A is the intersection of a first perpendicular line drawn through P3_A and perpendicular to the first line formed by P1_A and P2_A, with P0_A being the first perpendicular point. P0_B is the intersection of a second perpendicular line drawn through P3_B and perpendicular to the second line formed by P1_B and P2_B, with P0_B being the second perpendicular point. The proportion of P0_A on the first line formed by P1_A and P2_A is the same as the proportion of P0_B on the second line formed by P1_B and P2_B.

[0105] It should be noted that the principle of determining the second target coordinates based on the first target coordinates, the first coordinates, the second coordinates, the third coordinates and the fourth coordinates is mainly to determine the first vertical point based on the first target coordinates, the first coordinates and the second coordinates, and then, based on the proportion of the first vertical point on the first straight line formed by the first coordinates and the second coordinates, equate it to the second straight line formed by the third coordinates and the fourth coordinates, to ensure that the proportion of the second vertical point on the second straight line is the same as the proportion of the first vertical point on the first straight line, and finally determine the second target coordinates through the second vertical point.

[0106] Example 5:

[0107] In order to determine which camera of the target image acquisition device is determined as the first camera and which is determined as the second camera, based on the above embodiments, in an embodiment of the present application, before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm, the method further includes:

[0108] Obtaining the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification;

[0109] The camera with a large field of view angle is determined as the first camera, and the camera with a small field of view angle is determined as the second camera.

[0110] In an embodiment of the present application, one camera of the target image acquisition device is used to capture panoramic images, and the other camera is used to capture local images. In this embodiment of the present application, the camera that captures the panoramic image can be determined as the first camera, and the camera that captures the local image can be determined as the second camera. In order to determine whether each camera captures the panoramic image or the local image, the electronic device pre-stores the field of view angles corresponding to the two cameras in the target image acquisition device. The field of view angle refers to the range of the current monitoring scene. The larger the range of the monitoring scene, the larger the field of view angle; the smaller the range of the monitoring scene, the smaller the field of view angle.

[0111] In order to determine the field of view of the first camera and the second camera of the target image acquisition device, in an embodiment of the present application, a focus calibration is used to perform deductive calculations to determine the field of view corresponding to each camera. For example, the target image acquisition device is fixed to a preset length of the target object, and the actual physical width of the target object seen at each magnification is recorded. Then, a trigonometric function is used to record the opening angle of the triangle formed with the target image acquisition device as the fixed point and the coordinates of the left and right extreme points of the field of view as the base. This opening angle is also the field of view angle. Among them, the preset length can be 10 meters, 15 meters, etc. Specifically, the preset length can be set according to needs.

[0112] For convenience, the electronic device pre-stores the field of view angles corresponding to the first camera and the second camera of the target image acquisition device at different magnifications. Before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and the preset white balance algorithm, the pre-stored field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification are first searched and obtained, and then the camera with the larger field of view angle is determined as the first camera, and the camera with the smaller field of view angle is determined as the second camera.

[0113] Figure 8 A display diagram of determining the camera field of view angle provided in some embodiments of the present application is now directed to Figure 8 Provide explanation.

[0114] Figure 8 The small black square in the figure is a camera of the target image acquisition device, the solid line is the physical width of the scene, and the angle formed by the dotted line is the field of view.

[0115] In an embodiment of the present application, based on specific scene conditions, the first target coordinates of the white balance point corresponding to the first camera with a larger field of view can be used as a basic white balance reference to determine the second target coordinates of the white balance point corresponding to the second camera with a smaller field of view, and the white balance parameters of the second camera can be adjusted according to the second target coordinates to achieve consistency in white balance between the first camera and the second camera.

[0116] Figure 9 A schematic diagram of a process for determining the second target coordinates of the white balance white point corresponding to the second camera provided in some embodiments of the present application is now directed to Figure 9 Provide explanation.

[0117] First, determine whether the acquisition areas of the two cameras overlap. If not, determine the target coordinates of the white balance points corresponding to the first camera and the second camera respectively based on a preset white balance algorithm.

[0118] If so, the two cameras are determined to have a larger field of view. The camera with the larger field of view is designated as the first camera, and the camera with the smaller field of view is designated as the second camera. Then, based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm, the first target coordinates of the white balance white point corresponding to the first camera are determined. Based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, the number of targets in the position area containing the first target coordinates is determined. If the number of targets is one, the second target coordinates are determined based on white balance calculation method 1. If the number of targets is two, the second target coordinates are determined based on white balance calculation method 2. If the number of targets is zero, the second target coordinates are determined based on white balance calculation method 3.

[0119] Figure 10 A schematic diagram of a process for determining the second target coordinates based on white balance calculation method 1 provided in some embodiments of the present application. Figure 11 This is a schematic diagram of a process for determining the second target coordinates based on white balance calculation method 2 provided in some embodiments of the present application. Figure 12 This is a schematic diagram of a process for determining the second target coordinates based on the white balance calculation method 3 provided in some embodiments of the present application. Figure 10 、 Figure 11 as well as Figure 12 Provide explanation.

[0120] If the number of targets is one, the upper left corner position of the position area where the first target coordinate is located is determined as the first target position, and the lower right corner position of the position area where the first target coordinate is located is determined as the second target position. Then, based on the first coordinates and second coordinates corresponding to the first and second target positions in the first position area map, a first straight line formed by the first coordinates and the second coordinates is determined, a first perpendicular point where a first perpendicular line passing through the first target coordinate and perpendicular to the first straight line intersects the first straight line is determined, and a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate is determined. Then, the third coordinates and fourth coordinates corresponding to the first and second target positions in the second position area map are determined, and based on the first ratio, the third coordinate, and the fourth coordinate, the second target coordinate of the white balance white point corresponding to the second camera is determined. The first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second perpendicular point to the fourth distance between the third coordinate and the fourth coordinate, and the second perpendicular point is the intersection point of a second perpendicular line passing through the second target coordinate and perpendicular to the third and fourth coordinates with the second straight line.

[0121] If there are two targets, the center position of the white point location subregion in one of the two location regions where the first target coordinate is located is determined as the first target position, and the center position of the white point location subregion in the other location region is determined as the second target position. Then, based on the first coordinates and second coordinates corresponding to the first and second target positions, respectively, a first straight line formed by the first coordinates and the second coordinates is determined, a first perpendicular point at which a first perpendicular line passing through the first target coordinate and perpendicular to the first straight line intersects the first straight line is determined, and a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate is determined. Then, the third coordinates and fourth coordinates corresponding to the first and second target positions, respectively, in the second location region are determined, and based on the first ratio, the third coordinates, and the fourth coordinates, the second target coordinate of the white balance white point corresponding to the second camera is determined. The first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second perpendicular point to the fourth distance between the third coordinate and the fourth coordinate, and the second perpendicular point is the intersection point of a second perpendicular line passing through the second target coordinate and perpendicular to the third and fourth coordinates with the second straight line.

[0122] If the number of targets is zero, the center position of the white point position subregion in one of the two position regions closest to the first target coordinate is determined as the first target position, and the center position of the white point position subregion in the other position region is determined as the second target position. Then, based on the first coordinates and second coordinates corresponding to the first and second target positions in the first position region map, a first straight line formed by the first coordinates and the second coordinates is determined, a first perpendicular point at which a first perpendicular line passing through the first target coordinate and perpendicular to the first straight line intersects the first straight line is determined, and a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate is determined. Then, the third coordinates and fourth coordinates corresponding to the first and second target positions in the second position region map are determined, and based on the first ratio, the third coordinates, and the fourth coordinates, the second target coordinate of the white balance white point corresponding to the second camera is determined. The first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second perpendicular point to the fourth distance between the third coordinate and the fourth coordinate, and the second perpendicular point is the intersection point of a second perpendicular line passing through the second target coordinate and perpendicular to the third and fourth coordinates with the second straight line.

[0123] Example 6:

[0124] Figure 13 A schematic diagram of a white balance adjustment device provided in some embodiments of the present application, the device comprising:

[0125] Determination module 1301 is configured to determine, based on a current image captured by a first camera of a target image capture device and a preset white balance algorithm, first target coordinates of a white balance point corresponding to the first camera; determine, based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, the number of targets in a position area containing the first target coordinates; and determine, based on the number of targets, the pre-stored correspondence between the number of targets and the first and second positions, first target positions and second target positions corresponding to the number of targets;

[0126] Processing module 1302 is configured to determine the second target coordinates of the white balance white point corresponding to the second camera based on the first coordinates and the second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and the fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, and to set the white balance parameters of the second camera based on the second target coordinates.

[0127] Furthermore, the determination module 1301 is also used to determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, an operation is performed to determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

[0128] Further, the determination module 1301 is specifically configured to, if the number of targets is one, determine the first set position in the position area where the first target coordinate is located as the first target position, and determine the second set position in the position area where the first target coordinate is located as the second target position; if the number of targets is two, determine the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located as the first target position, and determine the fourth set position of the white point position sub-area in the other position area as the second target position; if the number of targets is zero, determine the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinate as the first target position, and determine the sixth set position of the white point position sub-area in the other position area as the second target position.

[0129] Furthermore, the processing module 1302 is specifically used to determine a first vertical point where a first perpendicular line passing through the first target coordinate and perpendicular to a first straight line formed by the first coordinate and the second coordinate intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first vertical point to a second distance between the first coordinate and the second coordinate; determine a second target coordinate of a white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection point of a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate, and the second straight line.

[0130] Furthermore, the determination module 1301 is also used to obtain the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification; determine the camera with a larger field of view angle as the first camera, and determine the camera with a smaller field of view angle as the second camera.

[0131] Example 7:

[0132] On the basis of the above embodiments, some embodiments of the present application further provide an electronic device, such as Figure 14As shown, it includes: a processor 1401 , a communication interface 1402 , a memory 1403 and a communication bus 1404 , wherein the processor 1401 , the communication interface 1402 , and the memory 1403 communicate with each other via the communication bus 1404 .

[0133] The memory 1403 stores a computer program. When the program is executed by the processor 1401, the processor 1401 performs the following steps:

[0134] Determining first target coordinates of a white balance point corresponding to a first camera according to a current image captured by a first camera of a target image acquisition device and a preset white balance algorithm;

[0135] Determining, based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, the number of targets in the position area containing the first target coordinates; and determining, based on the number of targets, the pre-stored correspondence between the number of targets and the first and second positions, the first and second target positions corresponding to the number of targets;

[0136] Based on the first coordinates and second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, determine the second target coordinates of the white balance white point corresponding to the second camera, and set the white balance parameters of the second camera according to the second target coordinates.

[0137] Furthermore, the processor 1401 is also used to determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, an operation is performed to determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

[0138] Further, the processor 1401 is specifically used to, if the number of targets is one, determine the first set position in the position area where the first target coordinate is located as the first target position, and determine the second set position in the position area where the first target coordinate is located as the second target position; if the number of targets is two, determine the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located as the first target position, and determine the fourth set position of the white point position sub-area in the other position area as the second target position; if the number of targets is zero, determine the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinate as the first target position, and determine the sixth set position of the white point position sub-area in the other position area as the second target position.

[0139] Further, the processor 1401 is specifically used to determine a first vertical point where a first perpendicular line passing through the first target coordinate and perpendicular to a first straight line formed by the first coordinate and the second coordinate intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first vertical point to a second distance between the first coordinate and the second coordinate; determine the second target coordinate of the white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection of a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate, and the second straight line.

[0140] Furthermore, the processor 1401 is also used to obtain the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification; determine the camera with a larger field of view angle as the first camera, and determine the camera with a smaller field of view angle as the second camera.

[0141] The communication bus mentioned in the server above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0142] The communication interface 1402 is used for communication between the electronic device and other devices.

[0143] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk memory. Alternatively, the memory may be at least one storage device located away from the processor.

[0144] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0145] Example 8:

[0146] Based on the above embodiments, some embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by an electronic device. When the program is executed on the electronic device, the electronic device implements the following steps:

[0147] The memory stores a computer program, which, when executed by the processor, causes the processor to perform the following steps:

[0148] Determining first target coordinates of a white balance point corresponding to a first camera according to a current image captured by a first camera of a target image acquisition device and a preset white balance algorithm;

[0149] Determining, based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, the number of targets in the position area containing the first target coordinates; and determining, based on the number of targets, the pre-stored correspondence between the number of targets and the first and second positions, the first and second target positions corresponding to the number of targets;

[0150] Based on the first coordinates and second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, determine the second target coordinates of the white balance white point corresponding to the second camera, and set the white balance parameters of the second camera according to the second target coordinates.

[0151] Furthermore, before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image capture device and a preset white balance algorithm, the method further includes:

[0152] Determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

[0153] Furthermore, determining the first target position and the second target position corresponding to the target quantity according to the correspondence between the target quantity, the pre-stored quantity, the first position, and the second position includes:

[0154] If the number of the target is one, determining a first set position in the position area where the first target coordinate is located as the first target position, and determining a second set position in the position area where the first target coordinate is located as the second target position;

[0155] If the number of the targets is two, the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located is determined as the first target position, and the fourth set position of the white point position sub-area in the other position area is determined as the second target position;

[0156] If the number of targets is zero, the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinates is determined as the first target position, and the sixth set position of the white point position sub-area in the other position area is determined as the second target position.

[0157] Furthermore, determining the second target coordinates of the white balance white point corresponding to the second camera based on the first coordinates and the second coordinates corresponding to the first target position and the second target position in the first white point position area map, respectively, and the third coordinates and the fourth coordinates corresponding to the second white point position area map corresponding to the second camera, respectively, and a preset target algorithm includes:

[0158] Determine a first perpendicular point where a first perpendicular line, which passes through the first target coordinate and is perpendicular to a first straight line formed by the first coordinate and the second coordinate, intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate;

[0159] Determine the second target coordinates of the white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection of the second straight line and a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate.

[0160] Furthermore, before determining the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image capture device and a preset white balance algorithm, the method further includes:

[0161] Obtaining the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification;

[0162] The camera with a large field of view angle is determined as the first camera, and the camera with a small field of view angle is determined as the second camera.

[0163] In the embodiment of the present application, the first target coordinates of the white balance white point corresponding to the first camera can be used as a reference to first determine the number of targets in the position area containing the first target coordinates in the first position area map, and then determine the first target position and the second target position corresponding to the target number. According to the first target coordinates, the two coordinates corresponding to the first target position and the second target position in the first position area map respectively, the two coordinates corresponding to the first target position and the second target position in the second position area map respectively, and a preset target algorithm, the second target coordinates of the white balance white point corresponding to the second camera are determined, and the white balance parameters of the second camera are set according to the second target coordinates to achieve consistency in white balance between the first camera and the second camera, thereby avoiding the problem of large visual differences between the images captured by the first camera and the second camera due to inconsistent white balance, and the white balance algorithm overhead in the present application is relatively small.

[0164] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0166] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0168] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A white balance adjustment method, characterized in that: include: Determining first target coordinates of a white balance point corresponding to a first camera according to a current image captured by a first camera of a target image acquisition device and a preset white balance algorithm; Determining, based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, the number of targets in the position area containing the first target coordinates; and determining, based on the number of targets, the pre-stored correspondence between the number of targets and the first and second positions, the first and second target positions corresponding to the number of targets; Determine, based on the first coordinates and second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, and set the white balance parameters of the second camera according to the second target coordinates; The determining, based on the correspondence between the target quantity, the pre-stored quantity, the first position, and the second position, of the first target position and the second target position corresponding to the target quantity includes: If the number of the target is one, determining a first set position in the position area where the first target coordinate is located as the first target position, and determining a second set position in the position area where the first target coordinate is located as the second target position; If the number of the targets is two, the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located is determined as the first target position, and the fourth set position of the white point position sub-area in the other position area is determined as the second target position; If the number of targets is zero, the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinates is determined as the first target position, and the sixth set position of the white point position sub-area in the other position area is determined as the second target position.

2. The method according to claim 1, characterized in that Before determining the first target coordinates of the white balance white point corresponding to the first camera according to the current image captured by the first camera of the target image capture device and a preset white balance algorithm, the method further includes: Determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

3. The method according to claim 1, characterized in that Determining the second target coordinates of the white balance white point corresponding to the second camera according to the first coordinates and the second coordinates corresponding to the first target position and the second target position in the first position area map, respectively, and the third coordinates and the fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm includes: Determine a first perpendicular point where a first perpendicular line, which passes through the first target coordinate and is perpendicular to a first straight line formed by the first coordinate and the second coordinate, intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate; Determine the second target coordinates of the white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection of the second straight line and a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate.

4. The method according to claim 1, wherein Before determining the first target coordinates of the white balance white point corresponding to the first camera according to the current image captured by the first camera of the target image capture device and a preset white balance algorithm, the method further includes: Obtaining the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification; The camera with a large field of view angle is determined as the first camera, and the camera with a small field of view angle is determined as the second camera.

5. A white balance adjustment device, characterized in that: include: a determination module configured to determine, based on a current image captured by a first camera of a target image capture device and a preset white balance algorithm, first target coordinates of a white balance point corresponding to the first camera; determine, based on the first target coordinates and a pre-stored first position area map corresponding to the first camera at various color temperatures, a number of targets in a position area containing the first target coordinates; and determine, based on the number of targets, a pre-stored correspondence between the number of targets and the first and second positions, first target positions and second target positions corresponding to the number of targets; a processing module, configured to determine a second target coordinate of a white balance white point corresponding to the second camera based on first and second coordinates corresponding to the first and second target positions in the first position area map, respectively, and third and fourth coordinates corresponding to the second position area map corresponding to the second camera, respectively, and a preset target algorithm, and to set white balance parameters of the second camera based on the second target coordinates; The determining module is specifically configured to, if the number of the targets is one, determine the first set position in the position area where the first target coordinate is located as the first target position, and determine the second set position in the position area where the first target coordinate is located as the second target position; if the number of the targets is two, determine the third set position of the white point position sub-area in one of the two position areas where the first target coordinate is located as the first target position, and determine the fourth set position of the white point position sub-area in the other position area as the second target position; If the number of targets is zero, the fifth set position of the white point position sub-area in one of the two position areas closest to the first target coordinates is determined as the first target position, and the sixth set position of the white point position sub-area in the other position area is determined as the second target position.

6. The device according to claim 5, characterized in that The determination module is also used to determine whether there is an overlapping area between the acquisition area of the first camera and the acquisition area of the second camera. If so, an operation is performed to determine the first target coordinates of the white balance white point corresponding to the first camera based on the current image captured by the first camera of the target image acquisition device and a preset white balance algorithm.

7. The device according to claim 5, characterized in that The processing module is specifically configured to determine a first perpendicular point where a first perpendicular line passing through the first target coordinate and perpendicular to a first straight line formed by the first coordinate and the second coordinate intersects the first straight line, and determine a first ratio of a first distance between the first coordinate and the first perpendicular point to a second distance between the first coordinate and the second coordinate; Determine the second target coordinates of the white balance white point corresponding to the second camera based on the first ratio, the third coordinate, and the fourth coordinate, wherein the first ratio is equal to the second ratio, the second ratio is the ratio of the third distance between the second target coordinate and the second vertical point to the fourth distance between the third coordinate and the fourth coordinate, and the second vertical point is the intersection of the second straight line and a second perpendicular line passing through the second target coordinate and perpendicular to a second straight line formed by the third coordinate and the fourth coordinate.

8. The device according to claim 5, characterized in that The determination module is also used to obtain the pre-saved field of view angles corresponding to the two cameras of the target image acquisition device at the current magnification; determine the camera with a larger field of view angle as the first camera, and determine the camera with a smaller field of view angle as the second camera.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store program instructions, and the processor is used to implement the steps of the white balance adjustment method as described in any one of claims 1 to 4 when executing the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the steps of the white balance adjustment method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Automatic white balance control method and mobile terminal

    CN105227945A

  • White balance calibration parameter generation method and system, image correction method and system, equipment and medium

    CN114612571A