Color correction method for ultra-high-definition camera
By performing regional color correction on the video data from ultra-high-definition cameras, the problem of inconsistent colors between video frames was solved, resulting in smoother video color performance.
Patent Information
- Application Number
- CN202511292464.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-12-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing color correction methods lack consistency in video timing, resulting in uneven color between video frames, abrupt changes, and flickering. Furthermore, global correction may lead to color distortion in local areas.
By performing frame-by-frame image clustering on ultra-high-definition camera video data, calculating the target presence coefficient and multi-frame target factors, determining whether a region needs to be segmented, and using a histogram equalization algorithm for local color correction, the color consistency of the target region is ensured.
It improves color consistency between video frames, reduces local color distortion, and enhances the visual effect of the video.
Smart Images

Figure CN121120403A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image color enhancement, in particular to a color correction method for an ultra-high-definition camera. BACKGROUND
[0002] In the field of photogrammetry, imaging technology develops rapidly. Multi-camera systems such as panoramic cameras, free-viewpoint cameras, high-speed video shooting, and light field imaging have many popular applications in people's daily life, such as image-based three-dimensional reconstruction technology, augmented reality technology, and unmanned driving technology. However, when images are spliced, because of different camera settings, lighting conditions, and viewing angles of different images, there is usually a certain color difference between adjacent images, and the reproduction effect is very different between different hardware devices, so color correction technology is usually used to correct and process video images.
[0003] Existing color correction methods usually focus on the processing of single-frame images and lack effective consideration of video temporal consistency. Since the illumination and color changes between video frames are complex, the color consistency between consecutive frames cannot be fully guaranteed, which can easily lead to uneven visual effects in videos, and even jumping and flickering phenomena. In addition, existing color correction techniques mostly rely on global style mapping and correction of single-frame images, but in dynamic video images, the color performance of target regions is often different from that of background regions, so global adjustment can cause color distortion in local regions, resulting in large color deviations in video images. SUMMARY
[0004] To solve the above technical problems, the present application provides a color correction method for an ultra-high-definition camera to solve the existing problems.
[0005] The color correction method for an ultra-high-definition camera of the present application adopts the following technical solutions:
[0006] An embodiment of the present application provides a color correction method for an ultra-high-definition camera, which comprises the following steps:
[0007] Obtain each frame of image in the video data to be color corrected;
[0008] Divide each frame of image into multiple regions on average, cluster all pixel points in each region according to the pixel values of the pixel points, and obtain the color block difference degree of each region in each frame of image according to the minimum value of the difference between the average pixel values of each adjacent cluster in each region, and obtain the target existence coefficient of each region in each frame of image in combination with the proportion of edge pixel points in each region and the discrete degree of the average gray value of all edges in each region.
[0009] The target region weight of each region is obtained according to the total number of edges of all adjacent regions corresponding to each region in each frame image of the current video and the difference of pixel values of each region in all adjacent frames of the current video, and the multi-frame target factor of each region is obtained in combination with the difference of LBP values of each region in all adjacent frames of the current video;
[0010] The correction coefficient of each region in each frame image is obtained according to the target existence coefficient and the multi-frame target factor of each region in each frame image, and then it is judged whether each region of each frame image needs to be divided into small regions, when the division is needed, the edge length of the small region after the division of each region in each frame image is obtained, and then the video after color correction is obtained.
[0011] Preferably, the specific process of clustering all pixel points in each region is that the mean value of the pixel values of the R, G and B channels of each pixel point is taken as the color value of each pixel point, the color values of all pixel points in each region are taken as the input of the DPC density clustering algorithm, the absolute difference value of the color values between pixel points is taken as the distance measurement, and the output is a plurality of clustering clusters.
[0012] Preferably, the method for obtaining the color block difference degree of each region in each frame image is that the minimum value of the difference of the mean values of the color values of the pixel points in all adjacent two clustering clusters of each region in each frame image is counted and taken as the color block difference degree of each region in each frame image.
[0013] Preferably, the calculation formula of the target existence coefficient of each region in each frame image is: ; in the formula, is the target existence coefficient of the i th region in the k th frame image, is the edge density in the i th region in the k th frame image, wherein the ratio of the total number of edge pixel points to the total number of all pixel points in each region is taken as the edge density of each region, is the variance of the mean value of the gray scale of all edges of the i th region in the k th frame image, is the color block difference degree of the i th region in the k th frame image, is a preset constant.
[0014] Preferably, the calculation formula of the target region weight of each region is: ; in the formula, is the target region weight of the i th region, is the total number of edges of all adjacent regions of the i th region in the u th frame image of the current video, , are respectively the mean values of the color values of the i th region in the u th frame and the u-1 th frame images of the current video, and U is the total number of frames of the current video.
[0015] Preferably, the method for obtaining the multi-frame target factor of each region is: accumulating the difference of LBP values of the same region in all adjacent frame images of the current video, and the multi-frame target factor of the same region is positively correlated with the target region weight of the same region and negatively correlated with the accumulated result.
[0016] Preferably, the correction coefficient of each region in each frame image is the normalized result of the product of the target existence coefficient of each region and the multi-frame target factor.
[0017] Preferably, the specific process of judging whether each region of each frame image needs to be divided into small regions is: when the correction coefficient of any region of each frame image is greater than or equal to a preset division threshold, it is judged that the region needs to be divided into small regions; otherwise, it is judged that the region does not need to be divided into small regions.
[0018] Preferably, the calculation formula of the side length of the small region after the division of each region in each frame image is: ; in the formula, is the side length of the small region after the division of the i-th region in the k-th frame image, v is a preset initial side length, is the correction coefficient of the i-th region in the k-th frame image, e is a preset coefficient, and , is a rounding function.
[0019] Preferably, the specific process of obtaining the video after color correction is: dividing each region into small regions according to the side length of the corresponding small region of each region; taking each region and each small region after the division in each frame image of the video to be color corrected as input, respectively, and using the histogram equalization algorithm to perform color correction on each region or small region, outputting each region or small region after color correction, and merging all the regions and small regions after color correction in each frame image to obtain a video in which each frame image is color corrected.
[0020] The present application has at least the following beneficial effects:
[0021] The present application is directed to the current use of traditional color correction algorithm is easy to only video image overall color correction, ignoring the difference between the target area and the background area, and the continuity between the video frames, resulting in local distortion, poor color consistency between the continuous frames when color correction, by analyzing the image features of the shooting object area in each frame image of the ultra-high definition camera, the target existence coefficient is constructed, which can preliminarily distinguish the shooting object area and the background area in each frame image; By analyzing the color change and texture change characteristics of the background area and the shooting object area between the continuous frames in the video, the correction coefficient is constructed, and then the area where the shooting object is located in each frame image in the video is more accurately distinguished, so as to divide each area into smaller sub-areas, and then use the histogram equalization algorithm to correct the color of each area, thereby improving the color correction effect of the video. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0023] Figure 1 A step flow chart of a color correction method for an ultra-high definition camera provided by the present application is provided.
[0024] Figure 2 A correction coefficient acquisition flow chart of each area in each frame image provided by the present application is provided.
[0025] Figure 3 A vector waveform diagram before color correction provided by the present application is provided.
[0026] Figure 4 A vector waveform diagram after color correction provided by the present application is provided. DETAILED DESCRIPTION
[0027] In order to further illustrate the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the specific embodiments, structure, features and effects of a color correction method for an ultra-high definition camera according to the present application are described in detail as follows. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.
[0029] The application provides a color correction method for an ultra-high-definition camera.
[0030] An embodiment of the application provides a color correction method for an ultra-high-definition camera, and specifically provides a color correction method for an ultra-high-definition camera. Figure 1 The method comprises the following steps:
[0031] Step 1: acquiring each frame of image in video data to be color corrected.
[0032] The required video data is captured by the ultra-high-definition camera and uploaded to a video image correction system, and is marked as video data to be color corrected. The collected each frame of image is converted into a gray-scale image by using a gray value average method, and finally the RGB image and the gray-scale image of each frame are obtained.
[0033] Step 2: dividing each frame of image into multiple regions, clustering all pixel points in each region according to the pixel values of the pixel points, obtaining the color block difference degree of each region in each frame of image according to the minimum value of the difference between the average pixel values of each adjacent cluster in each region, and obtaining the target existence coefficient of each region in each frame of image in combination with the proportion of the edge pixel points of each region in each frame of image and the discrete degree of the average gray-scale values of all edges in each region.
[0034] For video image data, there is a certain purpose for shooting, that is, there is a clear shooting object such as a person or a scene, so that the shooting object (that is, the target region) is focused during the shooting process by using the camera, so that the image features of the shooting object are more clear and prominent, and at the same time, the non-shooting object (that is, the background) is more blurred. Thus, in the overall video image, the overall color partition of the position of the shooting object is obvious, and the stripe edge of the shooting object is more clear. On the contrary, the color in the background region is overall edge blurred, the brightness difference between the edges is obvious, and the edge density is relatively lower, and the stripe edge in the background region is more blurred. Specifically, if a region in the video image is a target region, the edges of the color blocks of different colors in the region are obvious, the transition mutation degree is higher, and the edge stripe is obvious, while in the background region, the brightness difference between the edges is obvious, and the distribution density is lower.
[0035] Taking a single frame of image data in the video image data to be color corrected as an example, the image is evenly divided into regions with a side length of v x v, where v is a preset initial side length, and in this embodiment, v is 30, and the implementer can adjust it according to actual precision requirements. The average of the pixel values of the R, G, and B channels of each pixel point is recorded as the color value of each pixel point. Taking the i th region in the k th frame of image as an example, the color values of all the pixel points in the i th region are taken as the input of the DPC density clustering algorithm, the truncation distance is 3, the absolute difference of the color values between the pixel points is taken as the distance, and the output is a plurality of clustering clusters, and each clustering cluster is a color block in the i th region. It should be noted that the DPC density clustering algorithm is a known technology, and the specific process will not be described here.
[0036] Further, to represent the edge stripe distribution in a single region, the i th region is taken as the input of the edge detection algorithm, the total number of edges in the i th region is obtained, and the ratio of the total number of pixel points on the edges in the i th region to the total number of all pixel points in the region is taken as the edge density of the i th region.
[0037] As a preferred embodiment, the color block difference degree of each region in each frame of image is obtained according to the minimum value of the difference between the average pixel values of each adjacent clustering cluster in each region in each frame of image. In this embodiment, the color block difference degree of the i th region in the k th frame of image is denoted as , and specifically, the minimum value of the difference between the average pixel values of all adjacent two clustering clusters in each region in each frame of image is counted and taken as the color block difference degree of each region in each frame of image.
[0038] As a preferred embodiment, the target existence coefficient of each region in each frame of image is obtained according to the color block difference degree of each region in each frame of image, the proportion of the edge pixel points, and the discrete degree of the average gray value of all edges, and is used to represent the possibility that each region in each frame of image belongs to the region where the video shooting object is located.
[0039] In this embodiment, the target existence coefficient of the i th region in the k th frame of image is denoted as , and its specific expression is: ; in the formula, is the target existence coefficient of the i th region in the k th frame of image, is the edge density of the i th region in the k th frame of image, is the variance of the average gray value of all edges of the i th region in the k th frame of image, is the color block difference degree of the i th region in the k th frame of image, is a preset constant for preventing the denominator from being 0, and in this embodiment, .
[0040] The meaning of the relationship is that when the more details of the i-th region in the k-th frame of image, the higher the degree of transition between the overall color blocks, the greater the edge density in the region, the smaller the brightness difference between the edges, that is, the smaller the variance of the mean of all edge gray values, and the greater the overall difference of each color block in the region, which means that the region is more likely to be the region where the shooting object exists in the video image, and the region size should be reduced, and then the region is more carefully color corrected to prevent color distortion in the region.
[0041] Step three: according to the total number of edges of each region corresponding to all adjacent regions in each frame of image of the current video, and the difference of pixel values of each region in all adjacent frames of the current video, the target region weight of each region is obtained, and the multi-frame target factor of each region is obtained by combining the difference of LBP values of each region in all adjacent frames of the current video.
[0042] In the process of color correction, since the video shooting is continuous, the shooting object in the video image may have some differences at different shooting times. Further, in the process of continuous shooting, the lighting environment faced by the shooting object may also change rapidly, and the focusing situation may change due to the movement of shooting, so that the local region of the main shooting object in the image also appears blurred. If only the way of step two is used for calculation, the region of the shooting target will be regarded as a background region, which will cause color distortion in the target region during the color correction process, so further analysis is needed.
[0043] Specifically, as the video shooting proceeds, the background may change continuously, but the main shooting object will still be in the video image, that is, as the multi-frame video image shooting proceeds, the difference degree of the target region where the shooting object is in the multi-frames is still small, while the background region will change obviously with the movement of video shooting. The specific performance is that in the multi-frames, if the single region is in the target region where the shooting object is, the number of edge stripes in the multi-frames is more, and the color fluctuation of the single region in the multi-frames is weak. In addition, even if the lighting environment of shooting changes, the overall color change of the target region where the shooting object is is relatively small, and the difference of the overall texture features is small. The regions in the eight-neighborhood of each region are recorded as the adjacent regions of each region.
[0044] According to the above analysis, the target region weight of each region is obtained according to the total number of edges of each region corresponding to all adjacent regions in each frame of image of the current video, and the difference of pixel values of each region in all adjacent frames of the current video.
[0045] In this embodiment, the target region weight of the i-th region is recorded as The specific expression is: ; wherein, is a target region weight of the i-th region, is a total number of edges of all adjacent regions of the i-th region in the u-th frame image in the current video, , are mean values of color values of the i-th region in the u-th frame and the u-1-th frame images of the current video respectively, and U is a total number of frames of the current video. The greater the value of the target region weight of the i-th region, the more the total number of edges of the adjacent regions of the region in multiple images, the smaller the difference in overall color of the region in multiple images, and the more likely the region is the target region.
[0046] According to the target region weight of each region and the difference in LBP value of each region in all adjacent frames of the current video, a multi-frame target factor of each region is obtained, which is used to represent the possibility of each region being the region where the shooting object is located. The process of obtaining the multi-frame target factor is as follows: the cumulative result of the difference in LBP value of the same region in all adjacent frame images of the current video is counted, and the multi-frame target factor of the same region is in a positive correlation with the target region weight of the same region and in a negative correlation with the cumulative result. It should be noted that the positive correlation means that the dependent variable increases (decreases) as the independent variable increases (decreases), and the negative correlation means that the dependent variable decreases (increases) as the independent variable increases (decreases), and the specific calculation relationship is not specially limited in the present application, and preferably, in the present embodiment, the multi-frame target factor of the i-th region is denoted as , and the specific expression is as follows: ; wherein, is a multi-frame target factor of the i-th region, is a target region weight of the i-th region, , are decimal values of the LBP value of the i-th region in the u-th frame and the u-1-th frame images of the current video respectively, and U is a total number of frames of the current video, is a preset constant. It should be noted that the LBP value of a single region is calculated by a known technique, and the specific process is not described again.
[0047] The meaning of the relationship is as follows: between multiple images of the video, if is greater, it means that the total number of edges of the adjacent regions of the i-th region in multiple images is greater, the difference in overall color of the region in multiple images is smaller, and the difference in overall texture feature of the region in multiple images is smaller, which means that the region is more likely to be the target region where the shooting object exists, and the region should be more carefully color corrected.
[0048] Step four: obtaining correction coefficients of each region in each frame image according to the target existence coefficients of each region in each frame image and the multi-frame target factor, and then judging whether each region of each frame image needs to be divided into small regions, and when it needs to be divided, obtaining the edge length of the small regions after the division of each region in each frame image, and then obtaining the video after color correction.
[0049] Further, the correction coefficients of each region in each frame image are obtained according to the target existence coefficients of each region in each frame image and the multi-frame target factor. In this embodiment, the normalized result of the product of the target existence coefficient of the i-th region in the k-th frame image and the multi-frame target factor is taken as the correction coefficient of the i-th region in the k-th frame image.
[0050] The meaning of the relationship is that: in the k-th frame image of the current video, the greater the possibility of the existence of the target in the i-th region and the greater the possibility of the existence of the target in the region in the multi-frame, the more likely the object of the video shooting exists in the region, and the more detailed color correction should be performed on the region to prevent color distortion in the region to ensure the color accuracy of the region.
[0051] Similarly, the correction coefficient of each region in each frame of the current video can be calculated. The obtaining process of the correction coefficients of each region in each frame image is shown in Figure 2 .
[0052] Further, the correction coefficients of all regions of all frame images in the current video are taken as input, and the cross-validation method is used to output the division threshold, which is denoted as the preset division threshold. When the correction coefficient of a single region in a single frame image in the video is greater than or equal to the preset division threshold, it is judged that the region contains the target object of the current video shooting, and the region needs to be divided into small regions for more detailed color correction in the correction process; otherwise, it is judged that the region is the background content in the current video, and the region does not need to be divided into small regions.
[0053] Based on the above analysis, when the correction coefficient of the i-th region in the k-th frame image is greater than or equal to the preset division threshold, the edge length of the small regions after the division of the region in the frame image is calculated as follows: ; in the formula, is the edge length of the small regions after the division of the i-th region in the k-th frame image, v is a preset initial edge length, is the correction coefficient of the i-th region in the k-th frame image, e is a preset coefficient and , in this embodiment, e is 4, is a rounding function for rounding the input data to an integer. It should be noted that if the i-th region cannot be divided by the edge length , there will still be a part of length less than the edge length in the edge part of the region after the division into small regions If the region is not a small region, the remaining edge part of the region is taken as a small region.
[0054] By the above method, each region can be divided into small regions according to the side length of the corresponding small region of each region. Further, each region and each small region in each frame of the video data to be color corrected is taken as input respectively, and the histogram equalization algorithm is used to perform color correction on each region or small region, and output each region or small region after color correction. All the color corrected regions and small regions in each frame are merged, and then a video in which each frame is color corrected is obtained.
[0055] Finally, the hue color distribution in each frame is measured by a vector scope to determine whether there is still color difference. The vector scope is a general scope for measuring the hue and saturation of an image. By observing the extension of the vector scope at different angles, the hue of the image can be obtained. By judging the center position of the vector diagram relative to the crosshair, it can be quickly detected whether there is color imbalance in the image. If the pattern of the vector waveform diagram deviates from the center of the crosshair, it means that the image has color imbalance. If the pattern of the vector waveform diagram coincides with the crosshair, it means that the color is balanced. Figure 3 The vector waveform diagram before color correction provided by the present application, Figure 4 The vector waveform diagram after color correction provided by the present application; by Figure 3 And Figure 4 As can be seen from the comparison of the above, after the image is color corrected by the method provided by the present application, the overall hue of the image is more uniform, and the overall image does not show a bias towards a certain color, and the correction effect is good.
[0056] It should be noted that the above sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of the present application. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0057] Each embodiment in the present specification is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0058] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit them; the technical solutions described in the above embodiments are modified, or some technical features are replaced equivalently, without changing the essence of the corresponding technical solutions out of the scope of the technical solutions of the embodiments of the present application, which should be included in the protection scope of the present application.
Claims
1. A color correction method for an ultra-high definition video camera, characterized by, The method comprises the following steps: Obtaining each frame image in video data to be color corrected; Dividing each frame image into multiple regions averagely, clustering all pixel points in each region according to pixel values of the pixel points, obtaining color block difference degrees of each region in each frame image according to minimum values of differences between average pixel values of each adjacent cluster in each region, and obtaining target existence coefficients of each region in each frame image in combination with proportions of edge pixel points in each region and discrete degrees of average gray values of all edges in each region; Obtaining target region weights of each region according to total numbers of edges of all adjacent regions corresponding to each region in each frame image of a current video and differences of pixel values of each region in all adjacent frames of the current video, and obtaining multi-frame target factors of each region in combination with differences of LBP values of each region in all adjacent frames of the current video; Obtaining correction coefficients of each region in each frame image according to the target existence coefficients and the multi-frame target factors of each region in each frame image, and then judging whether each region of each frame image needs to be divided into small regions, obtaining edge lengths of small regions of each region in each frame image after division when division is needed, and then obtaining video after color correction.
2. The color correction method for an ultra-high definition video camera according to claim 1, wherein, The specific process of clustering all pixel points in each region is that: average values of pixel values of three channels of each pixel point are taken as color values of the pixel point; color values of all pixel points in each region are taken as inputs of DPC density clustering algorithm, absolute differences of color values between pixel points are taken as distance measurement, and outputs are multiple cluster groups.
3. The color correction method for an ultra-high definition video camera according to claim 1, wherein, The method for obtaining color block difference degrees of each region in each frame image is that: minimum values of differences between average color values of pixel points in all adjacent two cluster groups of each region in each frame image are counted and taken as the color block difference degrees of each region in each frame image.
4. The color correction method for an ultra-high definition video camera according to Claim 1, wherein, The calculation formula of the target existence coefficient of each region in each frame image is: ; in the formula, is the target existence coefficient of the i-th region in the k-th frame image, is the edge density in the i-th region in the k-th frame image, wherein the ratio of the total number of edge pixel points in each region to the total number of all pixel points is taken as the edge density of each region, is the variance of the gray mean value of all edges of the i-th region in the k-th frame image, is the color block difference degree of the i-th region in the k-th frame image, is a preset constant.
5. The color correction method for an ultra-high definition video camera according to Claim 1, wherein, The calculation formula of the target region weight of each region is: ; wherein, is the target region weight of the i-th region, is the total number of edges of all adjacent regions of the i-th region in the u-th frame image in the current video, , are the average values of the color values of the i-th region in the u-th frame and the u-1-th frame images of the current video respectively, and U is the total number of frames of the current video.
6. The color correction method for an ultra-high definition video camera according to claim 1, wherein, The method for obtaining multi-frame target factors of each region is that: cumulative results of differences of LBP values of a same region in all adjacent frame images of a current video are counted, and the multi-frame target factors of the same region are in positive correlation with target region weights of the same region and in negative correlation with the cumulative results.
7. The color correction method for an ultra-high definition video camera according to claim 1, wherein The correction coefficient of each region in each frame image is a normalized result of a product of the target existence coefficient and the multi-frame target factor of each region.
8. The color correction method for an ultra-high definition video camera according to Claim 1, wherein, The specific process of judging whether each region of each frame image needs to be divided into small regions is that: when the correction coefficient of any region of each frame image is greater than or equal to a preset division threshold, it is judged that the region needs to be divided into small regions; otherwise, it is judged that the region does not need to be divided into small regions.
9. The color correction method for an ultra-high definition video camera according to Claim 1, wherein, The calculation formula of the side length of the small region after the region segmentation in each frame image is: ; in the formula, is the side length of the small region after the region segmentation of the i-th region in the k-th frame image, v is a preset initial side length, is the correction coefficient of the i-th region in the k-th frame image, e is a preset coefficient and , is a rounding function.
10. The color correction method for an ultra-high definition video camera according to Claim 1, wherein, The specific process of obtaining the color corrected video is as follows: dividing each region into small regions according to the side length of the corresponding small region; taking each region and each small region in each frame of the video data to be color corrected as input, respectively, performing color correction on each region or small region by using a histogram equalization algorithm, outputting each region or small region after color correction, and merging all the color corrected regions and small regions in each frame to obtain a video in which each frame is color corrected.