A virtual scene real-time color correction method and system
By using Delaune triangulation algorithm and parallel processing technology in virtual scene color correction, adaptive matching bit depth and color hierarchical mapping is solved, and efficient and accurate color correction is achieved.
Patent Information
- Application Number
- CN202411818609.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The existing virtual scene color correction methods are prone to color deviation and color distortion during the color conversion process, making it difficult to achieve rapid matching of the colors of virtual scenes and LED screens.
Through preset color space projection and capture, RGB channel mapping relationship is generated, and the color space is divided using the Delaunay triangulation algorithm to build a three-dimensional grid structure to realize the generation of color map tables. Then, the color areas of the LED screen are processed in parallel, and adaptively match bit depth reduction and color grading mapping according to the area color type, and the color index is quickly calculated through displacement operations to correct the color deviation in real time.
It realizes efficient color matching between virtual scenes and LED screens, reduces color deviation and distortion, significantly improves the smoothness and accuracy of color correction, and optimizes the efficiency of system resources use.
Smart Images

Figure CN119316576B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of color correction, and in particular to a method and system for real-time color correction of a virtual scene. Background Art
[0002] With the rapid development of virtual reality (VR) and augmented reality (AR) technologies, the integration of virtual scenes and real scenes has been widely used in many fields, such as virtual studios, virtual stages, and simulated training scenes. Virtual scenes often contain rich colors, light and shadow, and details. When integrated with physical display devices (such as LED screens), how to ensure the consistency and accuracy of colors is one of the most important challenges. In particular, the color space in virtual scenes is usually richer and more complex than the colors that LED screens can present in the real world. Especially in virtual environments with large light changes and bright colors, how to accurately map virtual scenes to LED screens and ensure the consistency of displayed colors with those in virtual scenes is a core technical issue that affects visual effects.
[0003] The usual operation process is to project the image in the virtual scene onto the LED screen through projection technology or rendering, and then capture the image signal of the LED screen through the camera, and merge these signals with the original image in the virtual scene. However, due to the difference between the color gamut and brightness performance of the LED screen and the setting of the virtual scene, color deviation is prone to occur during the color conversion process. There may also be color distortion problems between the signal captured by the camera and the original image, especially in the case of complex lighting or lens distortion, the color captured by the camera is often difficult to be completely consistent with the color in the virtual scene. The above problems will not only cause color distortion, but even obvious color mismatch at the boundary between the virtual and real scenes, which will make the audience feel visually goofed and affect the immersive experience. Summary of the invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by the present invention is: the existing virtual scene color correction method is prone to color deviation and color distortion during color conversion, and the problem of how to achieve rapid color matching between the virtual scene and the LED screen.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a virtual scene real-time color correction method, including preset color space projection and capture, and generating RGB channel mapping relationship. The color areas of the LED screen are processed in parallel. According to the regional color type, the bit depth is adaptively matched to reduce and color grading mapping, and the color index is quickly calculated by displacement operation to correct the color deviation in real time.
[0007] As a preferred solution of the virtual scene real-time color correction method of the present invention, the preset color space projection and capture includes a program preset complete RGB color space range, using a RGB distribution with a step of 17 to generate 4096 color combinations, and the preset color combination It is expressed as:
[0008] ,
[0009] Project the colors onto the LED screen one by one, and use a high frame rate camera to capture the actual color signal displayed on the LED screen in real time to generate the corresponding captured color ,
[0010] As a preferred solution of the virtual scene real-time color correction method of the present invention, wherein: the generation of the RGB channel mapping relationship includes each group Corresponding to one ,The color points are processed using the Delaunay triangulation algorithm to divide the data points in the RGB color space into non-overlapping triangular meshes, and construct a three-dimensional mesh structure. In the triangulation, each color point is regarded as a point in the three-dimensional space, and multiple interconnected triangles are formed through triangulation.
[0011] After completing the Delaunay triangulation, the program generates a basic color map that contains every preset color in the virtual scene. The actual color displayed on the LED screen The corresponding relationship between them.
[0012] As a preferred solution of the virtual scene real-time color correction method of the present invention, the parallel processing of the color area of the LED screen includes selecting the same Perform matching to build parallel sets and collect color brightness.
[0013] As a preferred solution of the real-time color correction method for virtual scenes described in the present invention, the bit depth reduction and color grading mapping based on the adaptive matching of regional color types includes selecting extremely bright and extremely dark color areas and extreme color areas for bit depth reduction based on color brightness.
[0014] When the input RGB color value , when the values of all RGB channels fall into the limit range, the bit depth is reduced, which is expressed as:
[0015] ,
[0016] in, Represents the input RGB color value, To represent intermediate values that reduce the bit depth as you approach the extreme ends of the color space.
[0017] when , , When the difference between the two is less than the preset gray judgment value, it is recognized as a gray area and the bit depth is reduced.
[0018] As a preferred solution of the real-time color correction method for virtual scenes described in the present invention, the bit depth reduction and color grading mapping according to the adaptive matching of regional color types also includes identifying human skin color, green plants, and blue sky areas as high-attention color areas, and the remaining non-extreme light and extreme dark areas are regarded as mid-tone areas.
[0019] As a preferred solution of the real-time color correction method for virtual scenes of the present invention, the real-time correction of color deviation by quickly calculating the color index through displacement operation includes a program calculating the color index through displacement operation to realize the search of the mapping table, and the color index calculated by displacement operation for the parallel set with reduced bit depth is expressed as:
[0020] ,
[0021] in, Represents a color index value.
[0022] The color index calculated by performing displacement operation on the parallel set of high-attention color areas is expressed as:
[0023] ,
[0024] The color index calculated by performing displacement operation on the parallel set of mid-tone areas is expressed as:
[0025] ,
[0026] Through multiple dynamic sampling combined with machine learning models, color correction is completed by dynamically updating the mapping table during use.
[0027] Another object of the present invention is to provide a real-time color correction system for a virtual scene, which can quickly adjust the image color through adaptive color processing, and reduce the accuracy of colors that are difficult for the human eye to perceive, significantly reducing the overall amount of calculation, and realizing a faster color correction solution, solving the current problem of color inconsistency when the virtual scene is integrated with the LED screen and the problem that the hardware is difficult to support fast color correction.
[0028] As a preferred solution of the virtual scene real-time color correction system described in the present invention, it includes: a color capture module, a parallel module, and a color correction module. The color capture module is used to preset color space projection and capture, and generate RGB channel mapping relationship. The parallel module is used to parallel process the color area of the LED screen. The color correction module is used to adaptively match the bit depth reduction and color grading mapping according to the regional color type, and quickly calculate the color index through displacement operation to correct the color deviation in real time.
[0029] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a method for real-time color correction of a virtual scene.
[0030] A computer-readable storage medium stores a computer program, which implements the steps of a virtual scene real-time color correction method when executed by a processor.
[0031] Beneficial effects of the present invention: The virtual scene real-time color correction method provided by the present invention divides the RGB color space into non-overlapping triangular grids through the Delaunay triangulation algorithm, effectively processes the color distribution in the three-dimensional space, ensures the smooth transition between RGB colors, ensures that the mapping relationship of each color point has a high degree of continuity and consistency, prevents mutations and faults in color mapping, and improves the smoothness and accuracy of color correction. According to the brightness characteristics of the color area, unnecessary precision loss is reduced, and the efficiency of system resource utilization is optimized. The present invention achieves better results in color smoothness, resource utilization and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0033] Figure 1 This is an overall flow chart of a virtual scene real-time color correction method provided by the first embodiment of the present invention.
[0034] Figure 2 This is an overall flow chart of a virtual scene real-time color correction system provided by the third embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0036] Example 1, reference Figure 1 , as an embodiment of the present invention, provides a virtual scene real-time color correction method, comprising:
[0037] S1: Preset color space projection and capture, and generate RGB channel mapping relationship.
[0038] Furthermore, preset color space projection and capture include program presets for the full RGB color space range, using RGB distribution with 17 steps to generate 4096 color combinations, preset color combinations It is expressed as:
[0039] ,
[0040] Project the colors onto the LED screen one by one, and use a high frame rate camera to capture the actual color signal displayed on the LED screen in real time to generate the corresponding captured color .
[0041] It should be noted that the generation of RGB channel mapping relationship includes each group Corresponding to one , the color points are processed using the Delaunay triangulation algorithm. The data points in the RGB color space are divided into non-overlapping triangular grids to construct a three-dimensional grid structure. In the triangulation, each color point is regarded as a point in the three-dimensional space, and multiple interconnected triangles are formed through triangulation. In the three-dimensional RGB space, the color changes are often continuous and smooth. Delaunay triangulation can handle this well. By dividing the points in the RGB space into multiple triangular grids, the system can ensure that the transition between each adjacent color point is natural and smooth, avoiding color mutations.
[0042] This is crucial for color correction because, visually, abrupt color changes can result in unnatural effects, while smooth transitions maximize the color reproduction of the virtual world.
[0043] After completing the Delaunay triangulation, the program generates a basic color map that contains every preset color in the virtual scene. The actual color displayed on the LED screen The mapping table provides data support for subsequent color correction and interpolation calculations, ensuring that the colors in the virtual scene can be accurately mapped to the colors displayed on the LED screen in different scenes.
[0044] S2: Parallel processing of the color areas of the LED screen.
[0045] Furthermore, the color regions of the LED screen are processed in parallel, including selecting the same Perform matching to build parallel sets and collect color brightness.
[0046] It should be noted that by processing color areas in parallel, the system can perform color correction on multiple areas at the same time, rather than processing each area in turn. This approach significantly reduces the time consumption of the entire process, especially in the application scenario of high-resolution large screens, where the LED screen may need to process millions of pixels, and processing them one by one will obviously affect the overall efficiency. Different areas of the LED screen may display different colors, and in order to ensure visual consistency and natural transition, the system needs to collect color brightness information of these areas for accurate color correction.
[0047] Through parallel collection processing, the brightness difference of each area is monitored in real time, and the color mapping and matching are adjusted based on the mapping table. Especially in the scene where the virtual scene is integrated with the reality, the acquisition and matching of color brightness can ensure the smooth transition between different color areas and prevent the occurrence of color faults or inharmonious phenomena. Parallel processing helps to reasonably allocate computing resources. There may be complex high-brightness and high-saturation areas on the LED screen, as well as low-brightness and low-complexity areas. Parallel processing allows more computing resources to be allocated to areas with higher resource requirements, and fewer resources to simpler areas, thereby achieving load balancing and avoiding system overload.
[0048] S3: Adaptively matches bit depth reduction and color grading mapping according to regional color types, and quickly calculates color index through displacement operations to correct color deviation in real time.
[0049] Furthermore, adaptively matching the bit depth reduction and color grading mapping according to the regional color type includes selecting extreme light and extreme dark color regions for bit depth reduction according to color brightness.
[0050] When the input RGB color value , when the values of all RGB channels fall into the limit range, the bit depth is reduced, which is expressed as:
[0051] ,
[0052] in, Represents the input RGB color value, To represent intermediate values that reduce the bit depth as you approach the extreme ends of the color space.
[0053] when , , When the difference between the two is less than the preset gray judgment value, it is recognized as a gray area and the bit depth is reduced.
[0054] It should be noted that adaptive matching of bit depth reduction and color grading mapping according to regional color type also includes identifying human skin color, green of plants, and blue of the sky as high-attention color areas, and the remaining non-extreme light and extreme dark areas are regarded as mid-tone areas.
[0055] It should also be noted that the real-time correction of color deviation by quickly calculating the color index through the displacement operation includes the program calculating the color index through the displacement operation to realize the search of the mapping table, and the displacement operation calculation of the color index for the parallel set with reduced bit depth is expressed as:
[0056] ,
[0057] in, Represents a color index value. By shifting right by 4 bits, the precision of each color channel is reduced, reducing the bit depth of RGB color from 8 bits to 4 bits. This precision reduction process can significantly reduce the use of computing and storage resources. Extreme brightness and darkness areas are visually insensitive, and reducing the bit depth will not significantly affect color accuracy, which can significantly save processing and storage overhead.
[0058] The color index calculated by performing displacement operation on the parallel set of high-attention color areas is expressed as:
[0059] ,
[0060] Since the color reproduction requirements of the high-attention color areas are high, maintaining full bit depth ensures delicate transitions and accuracy of colors. Through high-precision processing, color distortion is avoided, especially in areas with rich details and more attention from the audience.
[0061] The color index calculated by performing displacement operation on the parallel set of mid-tone areas is expressed as:
[0062] ,
[0063] By reducing the bit depth of the RGB channels to 6 bits, the system can accurately process the mid-tone area while avoiding unnecessary waste of precision. This method significantly improves the system's processing speed while ensuring visual effects, and is particularly suitable for processing large areas of neutral color in complex scenes. In such scenes, color changes are relatively smooth, so using moderate bit depth processing can achieve efficient and smooth transitions in color correction while reducing the use of storage and computing resources.
[0064] Through multiple dynamic sampling combined with machine learning models, color correction is completed by dynamically updating the mapping table during use.
[0065] Embodiment 2, an embodiment of the present invention, provides a method for real-time color correction of a virtual scene. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0066] First, in order to verify the effectiveness of the real-time color correction method for virtual scenes, this experiment performs color mapping correction between the LED screen and the virtual scene, generates the corresponding color index using the mapping relationship of the RGB channels, and performs adaptive bit depth reduction and color grading mapping for different color areas. The experiment uses a high-resolution LED screen, and the virtual scene presets a complete RGB color space. 4096 color combinations are generated using an RGB distribution with a step of 17, which are projected onto the LED screen one by one, and the actual color signal displayed on the LED screen is captured by a high-frame rate camera. The focus of the experiment is to quickly calculate the color index through displacement operations. The system uses different formulas to calculate the color index of extreme color areas, high-attention areas, and mid-tone areas.
[0067] Table 1 Experimental data table
[0068] ,
[0069] It can be seen from the experimental data in Table 1 that the virtual scene real-time color correction method in our invention can adjust the bit depth and color mapping method according to actual needs when processing different types of color areas. First, for extreme brightness and darkness areas, the system reduces the bit depth of the RGB channel through displacement operations. For example, for the input color (255, 255, 255), the corrected output color is (250, 250, 250), indicating that the color deviation in the extreme brightness area is small and the resource consumption is less. This bit depth reduction processing method greatly reduces the computational complexity while ensuring the proximity of the colors.
[0070] Secondly, for high-attention color areas, such as the input value (128, 200, 175), the system adopts a processing method that maintains high bit depth to ensure that the accuracy of color correction reaches a high level. The corrected output is (130, 202, 178), accurately restoring the color of the high-attention area. This shows that this method can effectively maintain the accuracy of the original color and avoid color distortion when processing areas that require high-precision colors. Compared with existing technologies, it provides higher color fidelity while ensuring visual effects.
[0071] For the mid-tone area, such as the input color (100, 120, 140), the corrected output is (98, 118, 138). This intermediate-precision displacement processing method not only ensures sufficient visual color fidelity, but also avoids the waste of resources caused by high bit depth.
[0072] Based on the above experimental data and analysis results, the present invention can achieve accurate color correction in different scenes through adaptive matching bit depth reduction and color grading mapping technology, especially in the processing of extreme colors and high-attention areas. Compared with the existing technology, the present invention not only improves the accuracy and efficiency of color processing, but also significantly reduces the computational burden, and achieves perfect color fusion between virtual scenes and LED screens.
[0073] Example 3, reference Figure 2 , as an embodiment of the present invention, provides a virtual scene real-time color correction system, including a color capture module, a parallel module, and a color correction module.
[0074] The color capture module is used to preset color space projection and capture, and generate RGB channel mapping relationships. The parallel module is used to process the color areas of the LED screen in parallel. The color correction module is used to adaptively match bit depth reduction and color grading mapping according to the regional color type, and quickly calculate the color index through displacement operation to correct the color deviation in real time.
[0075] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0076] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0077] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk case (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0078] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logical function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limited. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
[0079] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A virtual scene real-time color correction method, characterized in that: include: Preset color space projection and capture, and generate RGB channel mapping relationship; Parallel processing of color areas of LED screens; Adaptively match bit depth reduction and color grading mapping according to regional color type, and quickly calculate color index through displacement operation to correct color deviation in real time; The parallel processing of the color areas of the LED screen includes selecting the same V color Perform matching to build parallel sets and collect color brightness; The adaptive matching bit depth reduction and color grading mapping according to the regional color type includes selecting extremely bright and extremely dark color regions for bit depth reduction according to color brightness; When the input RGB color value R input ,G input ,B input ∈{0,255}, when the values of all RGB channels fall into the limit range, the bit depth is reduced, which is expressed as: R input ∈[0,Δ]or R input ∈[255-Δ,255] G input ∈[0,Δ]or G input ∈[255-Δ,255] B input ∈[0,Δ]or B input ∈[255-Δ,255] Among them, R input ,G input ,B input represents the input RGB color value, Δ is the intermediate value indicating the reduction of the bit depth when approaching the extreme end points of the color space; When R input , G input , B input When the difference between the two is less than the preset gray judgment value, it is recognized as a gray area and the bit depth is reduced.
2. The virtual scene real-time color correction method according to claim 1, characterized in that: The preset color space projection and capture includes a program preset complete RGB color space range, using a 17-step RGB distribution to generate 4096 color combinations, and the preset color combination K color It is expressed as: K color ={(0,0,0),(0,0,17),(0,0,34),…,(255,255,255)} The colors are projected onto the LED screen one by one, and the actual color signal displayed on the LED screen is captured in real time by a high frame rate camera to generate the corresponding captured color V color .
3. The virtual scene real-time color correction method according to claim 2, characterized in that: The generation of the RGB channel mapping relationship includes each group V color Corresponding to a K color , the color points are processed using the Delaunay triangulation algorithm to divide the data points in the RGB color space into non-overlapping triangular grids to construct a three-dimensional grid structure. In the triangulation, each color point is regarded as a point in the three-dimensional space, and multiple interconnected triangles are formed through triangulation; After completing the Delaunay triangulation, the program generates a basic color mapping table, which contains each preset color K in the virtual scene. color The actual color V displayed on the LED screen color The corresponding relationship between them.
4. The virtual scene real-time color correction method according to claim 3, characterized in that: The bit depth reduction and color grading mapping according to the regional color type adaptive matching also includes identifying the human skin color, the green of the plants, and the blue area of the sky as the color area of high attention, and the remaining non-extreme light and extreme dark are regarded as the mid-tone area.
5. The virtual scene real-time color correction method according to claim 4, characterized in that: The method of quickly calculating the color index by shift operation to correct the color deviation in real time includes a program calculating the color index by shift operation to realize the search of the mapping table. The color index calculated by shift operation for the parallel set with reduced bit depth is expressed as: Idx=(R input >>4<<8)+(G input >>4<<4)+(B input >>4) Wherein, Idx represents the color index value; The color index calculated by performing displacement operation on the parallel set of high-attention color areas is expressed as: Idx=(R input <<16)+(G input <<8)+B input The color index calculated by performing displacement operation on the parallel set of mid-tone areas is expressed as: Idx=(R input >>2<<12)+(G input >>2<<6)+(B input >>2) Through multiple dynamic sampling combined with machine learning models, color correction is completed by dynamically updating the mapping table during use.
6. A system using the virtual scene real-time color correction method according to any one of claims 1 to 5, characterized in that: Including color capture module, parallel module, color correction module; The color capture module is used to preset color space projection and capture, and generate RGB channel mapping relationship; The parallel module is used to perform parallel processing on the color areas of the LED screen; The color correction module is used for adaptively matching bit depth reduction and color grading mapping according to regional color types, and quickly calculating color indexes through displacement operations to perform real-time correction of color deviations.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the virtual scene real-time color correction method described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the virtual scene real-time color correction method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Image signal processing pipeline for high dynamic range sensors
CN115734080A
Color calibration method and system for augmented reality technology
CN116862813A