Multi-camera foreground color consistency adjustment method

Through image acquisition, integration, processing and component statistics, histogram analysis is used to adjust the foreground colors of multiple cameras, which solves the problems of unstable foreground colors and color differences between devices in traditional methods, and improves shooting efficiency and AI recognition accuracy.

CN116405767BActive Publication Date: 2025-09-23ANYANG JUNBO SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310435943.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-22
Publication Date
2025-09-23
Estimated Expiration
2043-04-22

AI Technical Summary

Technical Problem

Traditional camera foreground color consistency adjustment methods rely on manual adjustments, resulting in instability and slow adjustment speed. In addition, there are differences in color distribution and brightness when the AI ​​model is applied between different devices, affecting shooting efficiency and accuracy.

Method used

Through image acquisition, integration, processing and component statistics, histogram analysis is used to adjust the foreground colors of multiple cameras. RGB component histogram statistics and gain adjustment are used to ensure that the foreground colors of the front and rear cameras are consistent.

Benefits of technology

It achieves consistent adjustment of foreground colors for multiple cameras, improves shooting efficiency and AI recognition accuracy, and reduces the impact of color differences between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116405767B_ABST
    Figure CN116405767B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for adjusting the consistency of foreground colors of multiple cameras, comprising the following steps: Step S1: Image acquisition: a large number of images are acquired to assist in scene consistency adjustment; Step S2: Picture integration: the images are centrally stored to assist in image processing; Step S3: Image processing: assist in image stabilization and component statistics, thereby assisting in adjustment to the correct color; Step S4: Component statistics: histogram statistics are performed on the RGB components of the image to facilitate intuitive observation of image information; Step S5: Image adjustment: adjustments are made based on the RGB components of the images taken by multiple cameras until the foreground colors of the multiple cameras are consistent. The histogram is used in conjunction with a large number of images to assist in comparative adjustment of the multiple cameras, thereby assisting in training the machine, so that the multiple cameras can find a stable foreground color adjustment range, facilitating the installation of external devices on the multiple cameras without affecting the foreground color adjustment of the cameras.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of camera foreground color adjustment, and in particular to a method for adjusting foreground color consistency of multiple cameras. Background Art

[0002] When taking photos, appropriately highlighting foreground elements can make the picture fuller; blurring foreground elements to a certain extent can increase the artistic conception and beauty of the picture. The role of the foreground is to supplement and embellish the image. The selection needs to be moderate and should not affect the presentation of the main elements. In order to help multiple cameras maintain the consistency of foreground colors, a multi-camera foreground color consistency adjustment method is needed.

[0003] Traditional camera foreground color consistency adjustment methods are mostly manually adjusted according to the camera shooting conditions, resulting in the camera's foreground color being adjusted based on human subjectivity and unable to remain stable and consistent, which in turn affects the stable adjustment of the camera's foreground color. On the other hand, traditional camera foreground color consistency adjustment methods are slow to adjust and cannot quickly ensure that the device achieves stable adjustment, thereby affecting the efficiency of camera shooting. When the photos used for AI model training and model inference classification use different equipment, due to differences in light source, CCD manufacturing process, configuration parameters, etc., the photos are different from the training model sample photos in terms of color distribution and brightness, affecting the accuracy of AI reasoning and judgment. Summary of the Invention

[0004] In view of the deficiencies in the prior art, the present invention provides a method for adjusting foreground color consistency of multiple cameras, which solves the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for adjusting foreground color consistency of multiple cameras, comprising the following steps:

[0006] Step S1: Image acquisition: a large number of images are acquired to assist in scene consistency adjustment;

[0007] Step S2: Image integration: centrally store the images to assist image processing;

[0008] Step S3: Image processing: Assisting image stabilization to perform component statistics, thereby assisting in adjusting to the correct color;

[0009] Step S4: Component statistics: Perform histogram statistics on the RGB components of the image to facilitate intuitive observation of image information;

[0010] Step S5: Image adjustment: Adjust the RGB components of the images taken by multiple cameras until the foreground colors of the multiple cameras are consistent.

[0011] Preferably, the step S1 specifically includes the following steps:

[0012] Image acquisition: Adjust the gain of the front or rear camera so that the foreground color of the picture it takes is intuitively more realistic. Then start the machine and use the front camera and rear camera to collect 400 pictures each at the same time. The foreground color refers to the color of the inserted and drawn graphic pictures. The commonly used software for the foreground color is Photoshop. In order to facilitate the stability of the front and rear cameras, the single camera is adjusted, so that the method compares the images through the front and rear cameras, and gradually adjusts the foreground colors of the front and rear cameras to make the foreground colors consistent.

[0013] Preferably, the step S2 specifically includes the following steps:

[0014] Image integration: Use the program to generate a large image from each of the 400 images collected by the front camera and the rear camera, and use image processing software such as Photoshop to integrate the images to generate a large image. The order of the large images is arranged according to the shooting order, so that the two images after the large image is generated can be directly compared intuitively, which is convenient for the subsequent adjustment of the foreground color.

[0015] Preferably, the step S3 specifically includes the following steps:

[0016] Image processing: In the program, the blue background of the two large images generated by the front and rear cameras is removed to prevent the blue background from affecting the judgment of the small image part in the large image, so as to facilitate the component statistics and processing of the RGB image. Each pixel of a color image is synthesized by the three colors of red, blue and green. Such an image is an RGB image. The three colors R, G, and B are the components of the RGB image. The value range of each component is: 0 to 255, and the data type is generally an 8-bit unsigned integer.

[0017] Preferably, the step S4 specifically includes the following steps:

[0018] Component statistics: Use Java to extract RGB color image components. Combined with the RGB image's 3-byte, 24-bit depth, we regard the three grids as three consecutive bytes, i.e., a 24-bit storage space, where: the position occupied by R (8 bytes in total) is used to store the pixel value of the red component image; the position occupied by G (8 bytes in total) is used to store the pixel value of the green component image; the position occupied by B (8 bytes in total) is used to store the pixel value of the blue component image. Conventional thinking would be to just put the value representing the color component (0-255px) directly in the corresponding position, but the computer is a system that quantifies and stores everything, and it does not recognize Therefore, when the R, G, and B components are stored here, there is actually a bit operation process, that is: the R component will be placed on the high 8 bits through a left shift (16 bits), the G component will be placed on the middle 8 bits through a left shift (8 bits), and the B component will be placed directly on the low 8 bits. Therefore, we can predict that the pixel values ​​we usually see or read directly through matlab are the results of bit operations on the R, G, and B component values. Therefore, as long as the corresponding red, green, and blue band values ​​are assigned to a new image and stored in the corresponding positions, the component extraction of the RGB color image can be realized.

[0019] Preferably, the step S4 specifically includes the following steps:

[0020] Histogram statistics are performed on the three components of RGB in the image, and finally plotted in a two-dimensional coordinate system. RGB curves are drawn with corresponding colors. The solid line represents the histogram of the rear camera image, and the dotted line represents the histogram of the front camera image. The horizontal axis represents the color level (0-255), and the vertical axis represents the total number of each color level in the image.

[0021] Preferably, the step S5 specifically includes the following steps:

[0022] Image adjustment: Assuming the front camera is adjusted to the correct color in this example, the histogram shows that the rear camera's RGB color values ​​are lower than those of the front camera. In this case, the gains of the three RGB components of the rear camera need to be increased. Conversely, if the rear camera curve is to the right of the front camera, the rear camera gain needs to be lowered. Repeat steps 1 to 4 until the histogram curves of the front and rear cameras coincide. At this point, it can be assumed that the foreground colors of the front and rear cameras are essentially the same, and images can be collected later for training.

[0023] Preferably, the multi-camera foreground color consistency adjustment method includes a single-camera adjustment method and a multi-camera adjustment method, and the above steps S1-S5 are the single-camera adjustment method, and the multi-camera adjustment method includes the following steps:

[0024] Step Q1: Histogram statistics: compare multiple machines with the standard graph;

[0025] Step Q2: Multi-machine adjustment: Adjust according to the histogram until the foreground color is consistent.

[0026] Preferably, the step Q1 specifically includes the following steps:

[0027] Similar to the single-machine adjustment method, the multi-machine adjustment method requires an image taken by the adjusted machine as the standard image. Then, the histograms of the current machine and the standard image are simultaneously plotted into a two-dimensional coordinate system. In the two-dimensional coordinate system, the light solid line represents the histogram of the standard image, the dark solid line represents the histogram of the front camera image, and the dotted line represents the histogram of the rear camera image. The horizontal axis represents the color level (0-255), and the vertical axis represents the total number of each color level in the image.

[0028] Preferably, the step Q2 specifically includes the following steps:

[0029] Similar to the single-machine adjustment method, observe the distance between the histogram curves of the front and rear cameras and the standard curve, adjust the camera gain accordingly until the three curves overlap, and then observe the histogram. At this point, it means that the cameras of the two machines have been adjusted to be consistent. Later, you can collect images and use them for training.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] 1. Use the histogram in conjunction with a large number of pictures to assist in the comparison and adjustment of multiple cameras, and then assist the machine in training, so that multiple cameras can find a stable foreground color adjustment range.

[0032] 2. Use a large number of pictures to assist in practice, so that the camera can adjust according to the foreground colors of multiple pictures.

[0033] 3. To standardize photo parameters and minimize the impact of other factors on material characteristics, we collected a large number of photos taken with different devices, filtered out the background color, and extracted the RGB values ​​of each foreground pixel for statistical analysis. Based on the difference between the statistical values ​​and the reference values, we adjusted the target camera's gain parameters and fill light source until the statistical values ​​of the foreground pixels in the photos taken by the target camera remained the same as the reference values. This method is more accurate than traditional white balance and gray balance for foreground color correction, significantly reducing differences between different device cameras and improving device recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a schematic diagram of the front camera shooting of the present invention;

[0035] Figure 2 This is a schematic diagram of shooting with the rear camera of the present invention;

[0036] Figure 3 RGB histogram of the front and rear cameras of the single machine of the present invention Figure 1 ;

[0037] Figure 4 RGB histogram of the front and rear cameras of the single machine of the present invention Figure 2 ;

[0038] Figure 5 This is the RGB histogram of the front and rear cameras of multiple machines in the present invention. DETAILED DESCRIPTION

[0039] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.

[0040] The present invention provides a technical solution: a method for adjusting the foreground color consistency of multiple cameras, step S1: image acquisition: a large number of images are acquired to assist in scene consistency adjustment;

[0041] Step S2: Image integration: centrally store the images to assist image processing;

[0042] Step S3: Image processing: Assisting image stabilization to perform component statistics, thereby assisting in adjusting to the correct color;

[0043] Step S4: Component statistics: Perform histogram statistics on the RGB components of the image to facilitate intuitive observation of image information;

[0044] Step S5: Image adjustment: Adjust the RGB components of the images taken by multiple cameras until the foreground colors of the multiple cameras are consistent.

[0045] Wherein, step S1 specifically includes the following steps:

[0046] Image acquisition: Adjust the gain of the front or rear camera so that the foreground color of the picture it takes is intuitively more realistic. Then start the machine and use the front camera and rear camera to collect 400 pictures each at the same time. The foreground color refers to the color of the inserted and drawn graphic pictures. The commonly used software for the foreground color is Photoshop. In order to facilitate the stability of the front and rear cameras, the single camera is adjusted, so that the method compares the images through the front and rear cameras, and gradually adjusts the foreground colors of the front and rear cameras to make the foreground colors consistent.

[0047] Wherein, step S2 specifically includes the following steps:

[0048] Image integration: See Figure 1-Figure 2, use the program to generate a large picture from each of the 400 pictures collected by the front camera and the rear camera, and use image processing software such as Photoshop to integrate the pictures to generate a large picture, and the order of the large pictures is arranged according to the shooting order, so that the two pictures after the large picture is generated can be directly compared intuitively, which is convenient for the subsequent adjustment of the foreground color.

[0049] Wherein, step S3 specifically includes the following steps:

[0050] Image processing: In the program, the blue background of the two large images generated by the front and rear cameras is removed to prevent the blue background from affecting the judgment of the small image part in the large image, so as to facilitate the component statistics and processing of the RGB image. Each pixel of a color image is synthesized by the three colors of red, blue and green. Such an image is an RGB image. The three colors R, G, and B are the components of the RGB image. The value range of each component is: 0 to 255, and the data type is generally an 8-bit unsigned integer.

[0051] Wherein, step S4 specifically includes the following steps:

[0052] Component statistics: Use Java to extract RGB color image components. Combined with the RGB image's 3-byte, 24-bit depth, we regard the three grids as three consecutive bytes, i.e., a 24-bit storage space, where: the position occupied by R (8 bytes in total) is used to store the pixel value of the red component image; the position occupied by G (8 bytes in total) is used to store the pixel value of the green component image; the position occupied by B (8 bytes in total) is used to store the pixel value of the blue component image. Conventional thinking would be to just put the value representing the color component (0-255px) directly in the corresponding position, but the computer is a system that quantifies and stores everything, and it does not recognize Therefore, when the R, G, and B components are stored here, there is actually a bit operation process, that is: the R component will be placed on the high 8 bits through a left shift (16 bits), the G component will be placed on the middle 8 bits through a left shift (8 bits), and the B component will be placed directly on the low 8 bits. Therefore, we can predict that the pixel values ​​we usually see or read directly through matlab are the results of bit operations on the R, G, and B component values. Therefore, as long as the corresponding red, green, and blue band values ​​are assigned to a new image and stored in the corresponding positions, the component extraction of the RGB color image can be realized.

[0053] Wherein, step S4 specifically includes the following steps:

[0054] See Figure 3, the histogram statistics of the three components of RGB of the image are performed separately, and finally plotted into a two-dimensional coordinate system. RGB curves are drawn with corresponding colors. The solid line represents the histogram of the rear camera image, and the dotted line represents the histogram of the front camera image. The horizontal axis represents the color level (0-255), and the vertical axis represents the total number of each color level in the image.

[0055] Wherein, step S5 specifically includes the following steps:

[0056] Image Adjustment: See Figure 4 Assuming that the front camera is adjusted to the correct color in this example, the histogram shows that the RGB color values ​​of the rear camera are lower than those of the front camera. In this case, the gains of the three RGB components of the rear camera need to be increased. On the contrary, if the rear camera curve is to the right of the front camera, the gain of the rear camera needs to be lowered. Then repeat steps 1 to 4 until the histogram curves of the front and rear cameras coincide. At this point, it can be considered that the foreground colors of the front and rear cameras are basically the same, and images can be collected and used for training later.

[0057] The multi-camera foreground color consistency adjustment method includes a single-camera adjustment method and a multi-camera adjustment method, and the above steps S1-S5 are for the single-camera adjustment method, see Figure 5 , the multi-camera adjustment method includes the following steps:

[0058] Step Q1: Histogram statistics: compare multiple machines with the standard graph;

[0059] Step Q2: Multi-machine adjustment: Adjust according to the histogram until the foreground color is consistent.

[0060] Wherein, step Q1 specifically includes the following steps:

[0061] Similar to the single-machine adjustment method, the multi-machine adjustment method requires an image taken by the adjusted machine as the standard image. Then, the histograms of the current machine and the standard image are simultaneously plotted into a two-dimensional coordinate system. In the two-dimensional coordinate system, the light solid line represents the histogram of the standard image, the dark solid line represents the histogram of the front camera image, and the dotted line represents the histogram of the rear camera image. The horizontal axis represents the color level (0-255), and the vertical axis represents the total number of each color level in the image.

[0062] Wherein, step Q2 specifically includes the following steps:

[0063] Similar to the single-machine adjustment method, observe the distance between the histogram curves of the front and rear cameras and the standard curve, adjust the camera gain accordingly until the three curves overlap, and then observe the histogram. At this point, it means that the cameras of the two machines have been adjusted to be consistent. Later, you can collect images and use them for training.

[0064] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0065] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A method for adjusting the consistency of foreground colors of multiple cameras, characterized by: The following steps are involved: Step S1: Image acquisition: multiple images are acquired to assist in foreground color consistency adjustment. The foreground color refers to the color of the inserted or drawn graphic image. Step S2: Image integration: Use the program to generate a large image from the multiple images collected by the front camera and the rear camera, and arrange the small images in the large image according to the order of shooting; Step S3: Image processing: The program removes the blue background of the two large images generated by the front and rear cameras, assists in image stabilization and performs component statistics, and thus assists in adjusting to the correct color; Step S4: Component statistics: Perform histogram statistics on the RGB components of the image to facilitate intuitive observation of image information; Step S5: Image adjustment: When the front camera is adjusted to the correct color, if the RGB color values ​​of the rear camera are lower than those of the front camera, increase the gains of the three RGB components of the rear camera. Conversely, if the RGB color values ​​of the rear camera are higher than those of the front camera, decrease the gains of the three RGB components of the rear camera. Repeat steps 1 to 4 until the histogram curves of the front and rear cameras coincide. Adjust the RGB components of the pictures taken by multiple cameras until the foreground colors of multiple cameras are consistent.

2. The multi-camera foreground color consistency adjustment method according to claim 1, characterized in that: Step S1 specifically includes the following steps: Image acquisition: Adjust the gain of the front or rear camera so that the foreground color of the picture it takes is intuitively realistic. Then start the machine and use the front and rear cameras to collect pictures at the same time. In order to facilitate the stability of the front and rear cameras, the single camera is adjusted. This method compares the images of the front and rear cameras, and gradually adjusts the foreground colors of the front and rear cameras to make the foreground colors consistent.

3. The multi-camera foreground color consistency adjustment method according to claim 1, characterized in that: Step S4 The specific steps include: Component statistics: Use Java to extract the components of RGB color images. Combined with the properties of RGB images being 3 bytes and 24 bits deep, the three grids are regarded as three consecutive bytes, that is, a 24-bit storage space, where the 8-byte positions occupied by R are used to store the pixel values ​​of the red component image; the 8-byte positions occupied by G are used to store the pixel values ​​of the green component image; the 8-byte positions occupied by B are used to store the pixel values ​​of the blue component image. Therefore, when the R, G, and B components are stored here, there is actually a bit operation process, that is, the R component will be placed on the high 8 bits through a 16-bit left shift operation, the G component will be placed on the middle 8 bits through an 8-bit left shift operation, and the B component will be placed directly on the low 8 bits. Therefore, as long as the corresponding red, green, and blue band values ​​are assigned to a new image and stored in the corresponding positions, the component extraction of the RGB color image can be achieved.

4. The method for adjusting foreground color consistency of multiple cameras according to claim 3, wherein: Step S4 The specific steps include: Histogram statistics are performed on the three components of RGB in the image, and finally plotted into a two-dimensional coordinate system. RGB curves are drawn with corresponding colors. The solid line represents the histogram of the rear camera image, and the dotted line represents the histogram of the front camera image. The horizontal axis represents the color level 0-255, and the vertical axis represents the total number of each color level in the image.

5. The multi-camera foreground color consistency adjustment method according to claim 1, characterized in that: The multi-camera foreground color consistency adjustment method includes a single-camera adjustment method and a multi-camera adjustment method, and the above steps S1-S5 are the single-camera adjustment method, and the multi-camera adjustment method includes the following steps: Step Q1: Histogram Statistics: The multi-camera adjustment method requires an image taken by the adjusted camera as a reference image. The histograms of the current camera and the reference image are then plotted in a two-dimensional coordinate system. In this two-dimensional coordinate system, the light solid line represents the histogram of the reference image, the dark solid line represents the histogram of the front camera image, and the dotted line represents the histogram of the rear camera image. The horizontal axis represents the color level 0-255, and the vertical axis represents the total number of each color level in the image. Step Q2: Multi-machine adjustment: Observe the distance between the histogram curves of the front and rear cameras and the standard curve, adjust the camera gain accordingly, and then observe the histogram until the three curves overlap. Then observe the histogram again, indicating that the cameras of the two machines have been adjusted to be consistent. Subsequently, images can be collected for training.

Citation Information

Patent Citations

  • Apparatus and method for adjusting colors among multiple color cameras

    JP2010016803A