Color correction method, device and electronic equipment

By constructing the target reverse LUT tree and performing trilinear interpolation, the problem of reduced color correction accuracy caused by large-scale camera movements in virtual shooting is solved, and color correction consistency under different shapes, positions and coordinate systems is achieved, improving virtual Captured image quality.

CN117319573BActive Publication Date: 2024-08-27DIVINE VISION (SHENZHEN) CULTURE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311435786.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2024-08-27
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

The accuracy and effect of color correction methods in existing virtual shooting technology decrease when the camera moves over a wide range, resulting in color correction failure. It is especially difficult to achieve consistent color correction effects in screen scenes with different shapes, positions, and coordinate systems.

Method used

By obtaining the initial color of the pixel to be color corrected in the image to be displayed and the pixel coordinates on the target screen, combined with the camera position and light source angle, the target reverse LUT tree is constructed, and trilinear interpolation is performed to achieve color correction, which is suitable for different shapes. , position and coordinate system of the screen scene.

Benefits of technology

Improved accuracy and consistency of image color correction, suitable for a wide range of camera movements and a variety of screen shapes and positions, enhancing the versatility and applicability of color correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117319573B
    Figure CN117319573B
Patent Text Reader

Abstract

The present application provides a color correction method, device and electronic device. The color correction method comprises: obtaining an image to be displayed, and determining the initial color of a pixel to be color corrected in the image to be displayed and the pixel coordinates corresponding to the pixel to be color corrected on a target screen; obtaining the target position of a camera shooting the target screen and the target identifier of the target screen; determining the target angle between the target camera and the light source at the pixel coordinates on the target screen; determining a target reverse LUT according to the target identifier, the target position and the target angle; and performing color correction on the initial color of the pixel to be color corrected according to the target reverse LUT to obtain the target color of the pixel to be color corrected. The present application can improve the color correction effect of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a color correction method, device and electronic device. Background Art

[0002] Virtual shooting is to place the object to be shot in front of the background screen, display the background image on the background screen, and then shoot the object to be shot, making the object to be shot seem to be in the real scene. Compared with green screen shooting, the camera can directly shoot the final picture, which helps to improve the efficiency of shooting and production and save costs.

[0003] In virtual shooting scenes, current color correction methods are usually only applicable to situations where the camera moves within a small range centered on a preset position. When the camera moves over a large range, the accuracy and effect of color correction will be greatly reduced, and color correction may even fail. Therefore, a color correction method is urgently needed to improve the color correction effect of the image. Summary of the invention

[0004] Various aspects of the present application provide a color correction method, an apparatus, and an electronic device to improve the color correction effect of an image.

[0005] A first aspect of an embodiment of the present application provides a color correction method, which is applied to a virtual shooting scene, wherein the virtual shooting scene includes at least one camera and at least one screen, and the color correction method includes: obtaining an image to be displayed, and determining the initial color of a pixel to be color corrected in the image to be displayed and the pixel coordinates corresponding to the pixel to be color corrected on a target screen, wherein the target screen is one of at least one screen; obtaining a target position of a camera shooting the target screen and a target identifier of the target screen; determining a target angle between the target camera and a light source at the pixel coordinates on the target screen; determining a target reverse LUT according to the target identifier, the target position and the target angle; and performing color correction on the initial color of the pixel to be color corrected according to the target reverse LUT to obtain a target color of the pixel to be color corrected.

[0006] A second aspect of an embodiment of the present application provides a color correction device, which is applied to a virtual shooting scene, wherein the virtual shooting scene includes at least one camera and at least one screen, and the color correction device includes:

[0007] A first determination module is used to obtain an image to be displayed, and determine an initial color of a pixel to be color corrected in the image to be displayed and a pixel coordinate corresponding to the pixel to be color corrected on a target screen, where the target screen is one of at least one screen;

[0008] An acquisition module, used to acquire a target position of a camera shooting a target screen and a target identifier of the target screen;

[0009] A second determination module is used to determine a target angle between a target camera and a light source at a pixel coordinate on a target screen;

[0010] A third determination module is used to determine a target reverse LUT according to a target identifier, a target position and a target angle;

[0011] The correction module is used to perform color correction on the initial color of the pixel to be color corrected according to the target inverse LUT to obtain the target color of the pixel to be color corrected.

[0012] A third aspect of an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the color correction method of the first aspect when executing the computer program.

[0013] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the color correction method of the first aspect.

[0014] The embodiments of the present application are applied in the scenario of image processing, by acquiring an image to be displayed, and determining the initial colors of the pixels to be color corrected in the image to be displayed and the pixel coordinates corresponding to the pixels to be color corrected on a target screen, where the target screen is one of at least one screen; acquiring the target position of a camera shooting the target screen and the target identifier of the target screen; determining the target angle between the target camera and the light source at the pixel coordinates on the target screen; determining a target reverse LUT according to the target identifier, the target position and the target angle; and performing color correction on the initial colors of the pixels to be color corrected according to the target reverse LUT to obtain the target color of the pixels to be color corrected, thereby improving the color correction effect of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 A schematic diagram showing the introduction of color difference into a virtual scene;

[0017] Figure 2 A schematic diagram showing system color calibration in a virtual scene;

[0018] Figure 3 A schematic diagram showing an application scenario according to an embodiment of the present application;

[0019] Figure 4 A schematic diagram showing an application scenario according to an embodiment of the present application;

[0020] Figure 5 A schematic diagram showing screens of different shapes according to an embodiment of the present application;

[0021] Figure 6 A schematic diagram showing screens in different positions according to an embodiment of the present application;

[0022] Figure 7 A schematic diagram showing different coordinate systems according to an embodiment of the present application;

[0023] Figure 8 A flowchart showing the steps of a color correction method according to an embodiment of the present application is shown;

[0024] Fig. 9 A schematic diagram showing screen UV coordinates according to an embodiment of the present application;

[0025] Fig.10 A schematic diagram showing a screen light source according to an embodiment of the present application;

[0026] Fig.11 A schematic diagram showing the light emitting angle of a light source according to an embodiment of the present application;

[0027] Fig.12 A schematic diagram showing a light source according to an embodiment of the present application;

[0028] Fig.13 A schematic diagram showing a connecting line, a tangent line and a secondary tangent line according to an embodiment of the present application;

[0029] Fig.14 A schematic diagram of a LUT tree according to an embodiment of the present application is shown;

[0030] Fig.15 A schematic diagram showing another LUT tree according to an embodiment of the present application;

[0031] Fig.16 A structural block diagram of a color correction device provided for an exemplary embodiment of the present application;

[0032] Fig.17 A schematic structural diagram of an electronic device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0034] With the development of AI (artificial intelligence) technology and the video shooting industry, virtual shooting, as an emerging shooting technology, has received more and more attention and use from the industry in recent years. It has broad application prospects in various scenarios such as the shooting of movies, TV series and variety shows, product launches and video live broadcasts. Through virtual shooting, the subject to be shot (such as actors) can be easily placed in the virtual scene, making the subject to be shot seem to be in the real scene. This technology can be used to shoot some scenes that were previously impossible to shoot with traditional solutions. Compared with the original green screen, the camera can directly shoot the final picture. It helps to improve the efficiency of shooting and production and save costs. See Figure 1 , showing a schematic diagram of introducing color difference into a virtual scene. Figure 1 As shown in FIG. 1 , the dotted frame portion may indicate the cause of the introduction of chromatic aberration. In a virtual shooting scene, for example, the image of the virtual scene may be displayed in real time on a light emitting diode (LED) wall (screen) through the broadcast control software (e.g. Figure 1 However, due to the influence of broadcast control software, LED wall, camera, ambient light, etc. on the color during the camera shooting process, when the camera shoots the actor and the background image on the LED wall together, the image obtained (such as Figure 1 There will be a color difference between the output image in the image and the input image, resulting in a difference between the captured color and the color of the scene material. Therefore, in order to calibrate the color of the output image, it is usually based on the idea of ​​black box modeling, and the influence of the dotted box part is used as the transformation function f(x), and the image color is calibrated by offsetting f(x).

[0035] Here, f(x) is usually offset by a transformation g(x), which is the inverse color lookup table (LUT). Figure 2 , which shows a schematic diagram of system color correction in a virtual scene. Figure 2As shown, in the scene of XR (virtual reality) or internal virtual shooting, the original image, that is, the background image to be broadcast, controlled, and shot can be obtained, and a reverse LUT is generated to process the original image to obtain a processed image. The processed image can be used as an image of the virtual scene displayed on the LED wall in real time, for broadcast, controlled, and shot, so that when the camera shoots the actor and the processed image on the LED wall together, the image obtained removes the influence of the above factors on the color, that is, the image obtained by finally shooting the processed image removes the color difference compared to the image obtained by shooting the original image.

[0036] However, in the above virtual shooting scene, the current color correction scheme is usually only applicable to the case where the camera moves within a small range centered on the preset camera position. When the camera moves over a large range, the accuracy and effect of color correction will be greatly reduced, and even color correction failure may occur. Figure 3 , showing a schematic diagram of an application scenario according to an embodiment of the present application. Figure 3 As shown, the camera may correspond to different camera positions (as shown in the figure, camera positions A, B and C) during the process of mobile shooting. If a reverse LUT is generated by collecting the color of the pixel point Pixel on the LED screen at camera position A (assuming that camera position A is a color correction camera for color correction), the effect of color correction near camera position A using the reverse LUT may meet expectations. However, when the camera moves to camera positions B and C, if the reverse LUT is still used for color correction, the color correction effect will deteriorate.

[0037] Additionally, colors may appear inconsistent between near and far areas on large screens. Figure 4 , showing a schematic diagram of an application scenario according to an embodiment of the present application. Figure 4 As shown, even if the camera is shooting at the same camera position B, the colors of pixel 1 and pixel 2 in different areas of the LED screen are inconsistent (assuming that the LED screen displays a pure color image). Therefore, using the generated reverse LUT to perform color correction on these two pixels will result in inconsistent color correction results.

[0038] in, Figure 3 and Figure 4 This is only an exemplary application scenario of the present application. The present application can also be applied in other related scenarios and is not limited here.

[0039] The above problems are all caused by the change of the light emission angle of the screen, which leads to unstable light emission performance. Therefore, a new color correction method is urgently needed to improve the color correction effect of the image and make the color correction effect of different areas consistent.

[0040] Based on the above problems, the present application provides a color correction method, which is not restricted by screens of different shapes, and the screen can be built into any shape, such as Figure 5 In addition, it is not restricted by different positions and postures, and the screen can be anywhere in the physical space, such as Figure 6 The coordinate system established in the physical space may be set to any coordinate system form according to the different calibration equipment, such as Figure 7 The left-handed coordinate system of a and c, and any rotation transformation of b relative to a, etc. The color correction method proposed in this paper can meet the above universal requirements, is not restricted by these conditions, meets the needs of different scenes to the greatest extent, and provides a larger application space.

[0041] In this embodiment, the execution device of the color correction method is not limited. Optionally, the color correction method is applied to a terminal, and the overall color correction method can also be implemented with the help of a cloud computing system. For example, the color correction method can be applied to a cloud server so as to run various models with the advantage of cloud resources; in contrast to being applied to the cloud, the color correction method can also be applied to server-side devices such as conventional servers, cloud servers, or server arrays.

[0042] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0043] Figure 8 A flowchart of a color correction method provided by an exemplary embodiment of the present application. Figure 2 The color correction method is applied to a virtual shooting scene, which includes at least one camera and at least one screen, and specifically includes the following steps:

[0044] S801, acquiring an image to be displayed, and determining the initial colors of pixels to be color corrected in the image to be displayed and the pixel coordinates corresponding to the pixels to be color corrected on the target screen.

[0045] The target screen is one of the at least one screen.

[0046] In the embodiment of the present application, the pixels to be color corrected may be all the pixels in the image to be displayed, or may be part of the pixels in the image to be displayed.

[0047] The initial color of the pixel to be color corrected may refer to the RGB color of the pixel to be color corrected on the image to be displayed, which is the color of the pixel to be displayed on the screen and has not been color corrected.

[0048] Furthermore, the pixel coordinates corresponding to the pixel point to be color corrected on the target screen refer to the pixel coordinates of the display position of the pixel point to be color corrected on the target screen when the image to be displayed is displayed on the target screen.

[0049] The pixel coordinates of the pixel to be color corrected on the screen may be UV coordinates of the pixel to be color corrected on the target screen. The UV coordinates may represent texture coordinates of the surface of the 3D model corresponding to the screen. Fig. 9 , shows a schematic diagram of a UV coordinate system according to an embodiment of the present application. Fig. 9 The target screen shown can represent the Figure 5 The curved screen shown in the figure is expanded in a plane, where the UV coordinate system shown in the figure can represent the texture coordinate system of the 3D model surface corresponding to the curved screen. Any vertex of the target screen can be used as the origin of the coordinate system (the upper left vertex in the figure is used as the origin). The value range of the U axis and the V axis can be 0 to 1. The position of any pixel in the image displayed on the target screen can be determined by the UV coordinates. The coordinate system and the expression of the coordinates can be selected according to the needs and are not limited here.

[0050] S802, obtaining a target position of a camera for shooting a target screen and a target identifier of the target screen.

[0051] The target position of the camera is the position of the camera when shooting the target screen. The position can be the spatial coordinate position of the virtual camera. The spatial coordinate can be set to any coordinate system form according to different calibration devices. Figure 7 , showing schematic diagrams of different coordinate systems. Figure 7 As shown, it can be a left-hand coordinate system or a right-hand coordinate system, or a rotation coordinate system obtained by arbitrarily selecting and transforming the left-hand / right-hand coordinate system. The camera position can also be the world coordinate system position of the physical camera, which is not limited in the present application embodiment.

[0052] The target identifier of the target screen can be used to determine a target screen from at least one screen. The target identifier can be a screen number, name, or other identifier that can distinguish different screens, and the embodiment of the present application does not limit this. The target screen can be a screen of any shape, such as a straight screen, a curved screen, etc., and the embodiment of the present application does not limit this.

[0053] in, Figure 6 These screens can also be placed anywhere in the physical space, see Figure 6 It can be a ceiling screen (placed above the shooting screen), a vertical screen (placed at any position of the shooting screen), a floor screen (placed below the shooting screen), etc., and the embodiments of the present application are not limited to this.

[0054] S803, determining a target angle between the target camera and the light source at the pixel coordinates on the target screen.

[0055] In the embodiment of the present application, the light source can be a component that can emit light, such as a lamp bead. To schematically illustrate the technical solution of the present application, the following takes the light source as a lamp bead as an example to illustrate the solution. Each lamp bead on the screen represents a pixel, and each lamp bead is composed of three sub-lamp beads: red, green and blue. Fig.10 As shown, the luminous ability of the lamp bead will vary according to its emission angle, such as Fig.11 The two emission angles (α1 and α2) in the equation have an influence on the luminous ability. Fig.11 The factors of the emission angle and the mutual shielding effect between the lamp beads, such as Fig.12 In the viewing angles C and D, the three sub-lamp beads are mutually blocked, which affects the correct display of colors. However, there is almost no blockage in the viewing angles A and B. The factor that affects the color is the different emission angles. In addition to the influence of the original emission angles, the viewing angles C and D are also affected by mutual blocking.

[0056] In order to solve the problem of the influence of angle on the color of screen light, the embodiment of the present application proposes to use the angle between the tangent and the secondary tangent at each lamp bead of the screen and the connection line from the camera to the lamp bead to express Fig.12 The chromatic aberration in the two directions AB and CD affects the influencing factors.

[0057] Among them, the target angle includes: a first target sub-angle and / or a second target sub-angle, wherein the first target sub-angle is the angle between the connecting line and the first tangent of the lamp bead; the second target sub-angle is the angle between the connecting line and the second tangent of the lamp bead, and the connecting line is the connecting line between the target camera and the lamp bead.

[0058] For example, in Fig.13 , if the camera is at position A, the target screen is Fig.12 The vertical screen shown. The first tangent line is the tangent line, and the second tangent line is the secondary tangent line.

[0059] In the embodiment of the present application, the values ​​of the first target sub-angle and the second target sub-angle are both between 0° and 180°.

[0060] Furthermore, the first tangent line represents the tangent line at the screen pixel coordinates corresponding to the lamp bead, and the second tangent line represents the secondary tangent line of the lamp bead, or the first tangent line represents the secondary tangent line of the lamp bead, and the second tangent line represents the tangent line of the lamp bead, and the tangent line is parallel to one side of the rectangular screen where the lamp bead is located, wherein the target screen is composed of multiple rectangular screens. The secondary tangent line is perpendicular to the tangent line, and the normal line of the plane formed by the secondary tangent line and the tangent line is perpendicular to the rectangular screen. The tangent line, secondary tangent line and normal line mentioned in this application are the tangent line, secondary tangent line and normal line of the model surface in the field of 3D model.

[0061] S804, determining a target reverse LUT according to the target identifier, the target position and the target angle.

[0062] In an optional embodiment, the target reverse LUT may be determined by searching a pre-constructed LUT tree according to the target identifier, the target position, and the target angle.

[0063] Specifically, the process of building the LUT tree is as follows:

[0064] S01. Move the camera to multiple locations in the physical space in sequence

[0065] like Fig.13 , first move the camera to a position A in the physical space.

[0066] S02. Setting a number of different sampling points on the multiple screens respectively.

[0067] like Fig.13 , including three screens: ceiling screen, vertical screen and floor screen, and three sampling points N1, N2 and N3 are set on these three screens respectively.

[0068] S03. Display the same color card on each screen at the same time, and switch different colors in sequence.

[0069] Among them, refer to Fig.13 , display a color card X (R, G, B) on three screens at the same time, and switch different colors in sequence. For example, to collect a 16-level LUT, you need to display 16 to the power of 3 (4096) colors.

[0070] S04. Calculate the reverse LUT.

[0071] Among them, when each color X is displayed in step S03, the colors at different sampling positions are collected Y (R, G, B), and finally all the colors Y collected under X constitute a LUT (i.e. f(x)). Each sampling position will generate a LUT. Finally, the camera obtains N1, N2 and N3 LUTs at point A, the vertical screen, the ground screen and the ceiling screen respectively, and the reverse LUT of each LUT (i.e. g(x)) is obtained.

[0072] It can be understood that each reverse LUT corresponds to the physical coordinates, two angles and screen identification during camera acquisition.

[0073] S05. Move the camera to the next physical space coordinate, and continue to loop S01 to S04.

[0074] Among them, the physical space acquisition position Loc of the camera is distributed within the commonly used range that needs to be shot.

[0075] S06, constructing a LUT tree.

[0076] Among them, all the reverse LUTs (i.e. g(x)) collected under each screen are integrated together to construct the following Fig.14 and Fig.15 LUT tree, where each screen corresponds to a LUT tree.

[0077] Furthermore, the LUT tree is applied to color correction. According to the input initial color color_in (R, G, B), the current target position Loc (x, y, z) of the camera and the two angles (the first target sub-angle and the second target sub-angle) at the pixel point of the target screen, 3-linear interpolation is performed in combination with the LUT tree to obtain the final target color color_out (R, G, B).

[0078] Specifically, the construction method of the LUT tree refers to the following process:

[0079] S11. Acquire multiple determined inverse LUTs.

[0080] S12, determining the screen identifier, camera position, eta and theta corresponding to the reverse LUT.

[0081] Among them, eta represents the angle between the line connecting the camera position and the light source and the tangent line of the light source, and theta represents the angle between the line connecting the camera position and the light source and the secondary tangent line of the light source.

[0082] S13, clustering all eta values ​​under the camera position.

[0083] For example, if abs(eta1-eta2)<=th, the two reverse LUTs corresponding to eta1 and eta2 are drawn to Fig.15 Under the first child node corresponding to an eta, and the angle represented by the first child node is (eta1+eta2) / 2, if abs(eta1-eta2)>th, eta1 and eta2 are considered to be two first child nodes, where th is preset, such as the empirical value of 2°, and abs() represents the absolute value. For example, abs(eta1-eta2) represents the absolute value of the difference between eta1 and eta2.

[0084] In the embodiment of the present application, all first sub-nodes may be arranged in ascending order according to the magnitude of the eta angle they represent. Similarly, the second sub-nodes may be arranged in ascending order according to the magnitude of theta angle they represent.

[0085] Furthermore, the above steps S11 to S13 are repeatedly executed to complete the construction of the LUT trees for all screens.

[0086] In one embodiment, determining a target reverse LUT based on a target identifier, a target position, and a target angle may include: determining a target LUT tree corresponding to the target identifier in at least one pre-constructed LUT tree, wherein the screen corresponds one-to-one to the LUT tree, and the root node of the target LUT tree represents the target identifier; determining a first target node matching the target position in the target LUT tree, wherein the first target node is one of a plurality of first nodes, the first node is a child node of the root node, and each first node represents a different position of the camera; determining a second target node matching the target angle among a plurality of second nodes of the first target node, wherein the plurality of second nodes respectively represent the angles of lamp beads at different coordinates on the target camera and the target screen; and determining the reverse LUT corresponding to the second target node as the target reverse LUT.

[0087] For example, refer to Fig.14 , is the LUT tree corresponding to screen i, where multiple screens correspond to multiple LUT trees, and the LUT tree corresponds to the screen and the screen identifier one by one. The root node i represents the screen, the first node represents the position of the camera, and the second node represents the angle. Each second node has a corresponding reverse LUT.

[0088] Furthermore, the corresponding root node can be determined according to the target identifier, and then the corresponding target LUT tree can be determined. Fig.14 The LUT tree of is the target LUT tree, wherein the first node i is determined to be the first target node. The second node 11 is the second target node, and the reverse LUT corresponding to the second node 11 is the target reverse LUT.

[0089] Further, refer to Fig.15 , the second node includes: a first subnode and a second subnode, wherein the first subnode is a subnode of the first node, and the second subnode is a subnode of the first subnode, the target angle includes a first target sub-angle and / or a second target sub-angle, and the second target node includes: a first target subnode and / or a second target subnode, the first target subnode represents a first target sub-angle, and the second target subnode represents a second target sub-angle, the first target sub-angle is an angle between a connecting line and a first tangent of a light source, the second target sub-angle is an angle between a connecting line and a second tangent of a light source, and the connecting line is a connecting line between a target camera and a light source, and determining a second target node matching the target angle from among multiple second nodes of the first target node includes: determining a first target subnode matching the first target sub-angle from among multiple first subnodes of the first target node; and determining a second target subnode matching the second target sub-angle from among multiple second subnodes of the first target subnode.

[0090] Reference Fig.15, the first subnode represents the angle between the connecting line and the first tangent, and the second subnode represents the angle between the connecting line and the second tangent. Among them, the first target subnode can be determined from the multiple first subnodes, and the second target subnode can be determined from the multiple second subnodes.

[0091] In an embodiment of the present application, the first target node includes: a first standby node and / or a second standby node, the first standby node is the first node among multiple first nodes whose position is closest to the target position and is on one side of the target position, and the second standby node is the first node among multiple first nodes whose position is closest to the target position and is on the other side of the target position.

[0092] Reference Fig.15 The first standby node may be the first node on one side of the target location, such as the first node 1, and the second standby node may be the first node on the other side of the target location, such as the first node 2.

[0093] In the embodiments of this application, refer to Figure 3 If the target position is on the left side of position B, it can be determined that the first node corresponding to position B is the second standby node, and the first target node only includes the second standby node. If the target position is between position B and position A, the first node corresponding to position B is the first standby node, and the first node corresponding to position C is the second standby node. If the target position is on the right side of position C, the first node corresponding to position C is the first standby node. This method is only an exemplary description, and the present application can also determine the first standby node and the second standby node that match the target position according to other methods, which are not limited here.

[0094] In an embodiment of the present application, the first target subnode includes: a first standby subnode, a second standby subnode, a third standby subnode and a fourth standby subnode, and determining a first target subnode matching the first target subangle from multiple first subnodes of the first target node includes: determining the first standby subnode and / or the second standby subnode from multiple first subnodes of the first standby node, the first standby subnode being the first subnode whose corresponding angle is less than or equal to the first target subangle and is closest to the first target subangle from multiple first subnodes of the first standby node, and the second standby subnode being The first subnode among the multiple first subnodes of the first standby node whose corresponding angle is greater than the first target sub-angle and is closest to the first target sub-angle; the third standby subnode and / or the fourth standby subnode are determined among the multiple first subnodes of the second standby node, the third standby subnode is the first subnode among the multiple first subnodes of the second standby node whose corresponding angle is less than or equal to the first target sub-angle and is closest to the first target sub-angle, and the third standby subnode is the first subnode among the multiple first subnodes of the second standby node whose corresponding angle is greater than the first target sub-angle and is closest to the first target sub-angle.

[0095] For example, refer to Fig.15 , if it is determined that the first standby node is the first node 1 and the second standby node is the first node 2. Then the first standby subnode and the second standby subnode are determined in the multiple first subnodes of the first node 1. If the first target sub-angle eta0 is between the angle eta3 represented by the first subnode 13 and the angle eta4 represented by the first subnode 14, then the first subnode 13 can be determined to be the first standby subnode and the first subnode 14 can be determined to be the second standby subnode. Similarly, if the first subnode 21 under the first node 2 is the third standby subnode, the first subnode 22 is the fourth standby subnode.

[0096] In an embodiment of the present application, the second target subnode includes: a fifth standby subnode, a sixth standby subnode, a seventh standby subnode, an eighth standby subnode, a ninth standby subnode, a tenth standby subnode, an eleventh standby subnode and a twelfth standby subnode, and determining a second target subnode matching the second target sub-angle from multiple second subnodes of the first target subnode includes: determining the fifth standby subnode and / or the sixth standby subnode from multiple second subnodes of the first standby subnode, the fifth standby subnode being the second subnode whose corresponding angle is less than or equal to the second target sub-angle and is closest to the second target sub-angle from multiple second subnodes of the first standby subnode, and the sixth standby subnode being the second subnode whose corresponding angle is greater than the second target sub-angle and is closest to the second target sub-angle from multiple second subnodes of the first standby subnode; determining the seventh standby subnode and / or the eighth standby subnode from multiple second subnodes of the second standby subnode, the seventh standby subnode being the second subnode whose corresponding angle is less than or equal to the second target sub-angle and is closest to the second target sub-angle from multiple second subnodes of the second standby subnode. The eighth standby subnode is a second subnode among the multiple second subnodes of the second standby subnode, the corresponding angle of which is greater than the second target sub-angle and is closest to the second target sub-angle; the ninth standby subnode and / or the tenth standby subnode are determined among the multiple second subnodes of the third standby subnode, the ninth standby subnode is a second subnode among the multiple second subnodes of the third standby subnode, the corresponding angle of which is less than or equal to the second target sub-angle and is closest to the second target sub-angle, the tenth standby subnode is a second subnode among the multiple second subnodes of the third standby subnode, the corresponding angle of which is greater than the second target sub-angle and is closest to the second target sub-angle; the eleventh standby subnode and / or the twelfth standby subnode are determined among the multiple second subnodes of the fourth standby subnode, the eleventh standby subnode is a second subnode among the multiple second subnodes of the fourth standby subnode, the corresponding angle of which is less than or equal to the second target sub-angle and is closest to the second target sub-angle, the twelfth standby subnode is a second subnode among the multiple second subnodes of the fourth standby subnode, the corresponding angle of which is greater than the second target sub-angle and is closest to the second target sub-angle.

[0097] For example, refer to the determination of the first to fourth standby subnodes. Fig.15 , assuming that it can be determined that the second subnode 132 under the first standby subnode (first subnode 13) is the fifth standby subnode, the second subnode 133 is the sixth standby subnode, the second subnode 145 under the second standby subnode (first subnode 14) is the seventh standby subnode, the second subnode 146 is the eighth standby subnode, the second subnode 211 under the third standby subnode (first subnode 21) is the ninth standby subnode, the second subnode 212 is the tenth standby subnode, the second subnode 222 under the fourth standby subnode (first subnode 22) is the eleventh standby subnode, and the second subnode 223 is the twelfth standby subnode.

[0098] Further, the fifth to twelfth standby sub-nodes correspond to respective reverse LUTs, and these reverse LUTs are target reverse LUTs.

[0099] In an optional embodiment, a target reverse LUT is determined based on a target identification, a target position and a target angle, including: determining a target reverse LUT corresponding to the target angle, the target position and the target identification from multiple reverse LUTs based on a correspondence stored in a preset database, the correspondence indicating the target angle, the target position and the target identification corresponding to each reverse LUT.

[0100] In the embodiment of the present application, the corresponding relationship between the screen identification, the camera position, eta, theta and the target reverse LUT can be stored in advance based on the LUT tree. Then, the corresponding target reverse LUT can be directly searched during use, thereby improving the efficiency of color correction.

[0101] S805 , performing color correction on the initial color of the pixel to be color corrected according to the target inverse LUT to obtain the target color of the pixel to be color corrected.

[0102] In an embodiment of the present application, for example, if color correction is to be performed on the initial color of a pixel to be color corrected in an image to be displayed, and the pixel is displayed on the screen after color correction, a target color can be obtained for each combination of the screen on which the pixel is to be displayed, the position of the camera to shoot the screen, and the target angle of the pixel on the screen. For example, for the same screen and the same target angle, target color 1 can be obtained for camera position 1, and target color 2 can be obtained for camera position 2, so that target color 1 is displayed when shooting at position 1, and target color 2 is displayed when shooting at position 2. Or for the same camera position, pixel 1 to be displayed on screen 1 corresponds to target color 3, and pixel 2 to be displayed on screen 2 corresponds to target color 4, so as to achieve the purpose of more accurate color correction. The above target colors 1-4 are colors adjusted using a reverse LUT, and the target colors can be used as colors displayed on the screen in real time, for broadcast control, screen display, and shooting, so that the color captured by the camera is the color of the original material (the color in the image to be displayed).

[0103] Among them, color correction is performed on the initial color of the pixel to be color corrected according to the target reverse LUT, including: determining the position interpolation weight according to the size relationship between the coordinate values ​​of the target position and the coordinate values ​​corresponding to the position represented by the first target node; determining the first angle interpolation weight according to the size relationship between the first target sub-angle and the angle represented by the first target sub-node; determining the second angle interpolation weight according to the size relationship between the second target sub-angle and the angle represented by the second target sub-node; color correction is performed on the pixel to be color corrected according to the position interpolation weight, the first angle interpolation weight, the second angle interpolation weight and the target reverse LUT.

[0104] Specifically, in the embodiment of the present application, the first nodes corresponding to the two positions closest to the target position loc(x, y, z) in the target LUT tree are searched, assuming that they are the first standby node loc1(x1, y1, z1) and the second standby node loc2(x2, y2, z2);

[0105] Calculate the position interpolation weight w_loc of loc(x,y,z) as follows:

[0106] a. Calculate the weights of x, y and z separately, taking x as an example;

[0107] b. If x1≤x2:

[0108] a) If x ≥ x1 and x < x2, w_x = (x - x1) / (x2 - x1);

[0109] b) If x <x1,w_x=0;

[0110] c) Otherwise w_x=1;

[0111] c. If x2 < x1:

[0112] a) If x >= x2 and x < x1, w_x = (x - x2) / (x1 - x2);

[0113] b) If x < x2, w_x = 0;

[0114] c) Otherwise w_x = 1;

[0115] d. Similarly, obtain the interpolation weight w_y of y and the interpolation weight w_c of c according to b and c;

[0116] e. Calculate the weighted weight wt_x of x = abs(x2 - x1) / (abs(x2 - x1) + abs(y2 - y1) + abs(z2 - z1)), and similarly calculate the weighted weight wt_y of y and the weighted weight wt_z of z;

[0117] f. Calculate the position interpolation weight w_loc = wt_x * w_x + wt_y * w_y + wt_z * w_z.

[0118] Among them, the first angle interpolation weight includes: the first sub - angle interpolation weight and the second sub - angle interpolation weight. According to the size relationship between the first target sub - angle and the angle represented by the first target sub - node, determine the first angle interpolation weight, including: according to the size relationship between the angle represented by the first standby sub - node, the angle represented by the second standby sub - node, and the first target sub - angle, determine the first sub - angle interpolation weight; according to the size relationship between the angle represented by the third standby sub - node, the angle represented by the fourth standby sub - node, and the first target sub - angle, determine the second sub - angle interpolation weight.

[0119] Among them, calculating the first sub - angle interpolation weight w_eta_loc1 under the first standby node loc1 node includes the following steps. In this step, eta1 represents the angle corresponding to the first standby sub - node, eta0 represents the first target sub - angle, and eta2 represents the angle corresponding to the second standby sub - node;

[0120] a. If eta1 ≤ eta0 < eta2, then w_eta_loc1 = (eta0 - eta1) / (eta2 - eta1);

[0121] b. If eta0 < eta1, then w_eta_loc2 = 0;

[0122] c. Otherwise w_eta_loc1 = 1;

[0123] Similarly, calculate the second sub - angle interpolation weight w_eta_loc2 under the loc2 node according to the above steps;

[0124] Among them, the second angle interpolation weight includes: the third sub-angle interpolation weight, the fourth sub-angle interpolation weight, the fifth sub-angle interpolation weight and the sixth sub-angle interpolation weight. The second angle interpolation weight is determined according to the size relationship between the second target sub-angle and the angle represented by the second target sub-node, including: determining the third sub-angle interpolation weight according to the size relationship between the angle represented by the fifth stand-by sub-node, the angle represented by the sixth stand-by sub-node and the second target sub-angle; determining the fourth sub-angle interpolation weight according to the size relationship between the angle represented by the seventh stand-by sub-node, the angle represented by the eighth stand-by sub-node and the second target sub-angle; determining the fifth sub-angle interpolation weight according to the size relationship between the angle represented by the ninth stand-by sub-node, the angle represented by the tenth stand-by sub-node and the second target sub-angle; determining the sixth sub-angle interpolation weight according to the size relationship between the angle represented by the eleventh stand-by sub-node, the angle represented by the twelfth stand-by sub-node and the second target sub-angle.

[0125] Further, the target reverse LUT includes: a first target reverse LUT corresponding to the fifth standby subnode, a second target reverse LUT corresponding to the sixth standby subnode, a third target reverse LUT corresponding to the seventh standby subnode, a fourth target reverse LUT corresponding to the eighth standby subnode, a fifth target reverse LUT corresponding to the ninth standby subnode, a sixth target reverse LUT corresponding to the tenth standby subnode, a seventh target reverse LUT corresponding to the eleventh standby subnode, and an eighth target reverse LUT corresponding to the twelfth standby subnode, and color correction is performed on the pixel to be corrected for color according to the position interpolation weight, the first angle interpolation weight, the second angle interpolation weight and the target reverse LUT, including: using a preset formula to correct the initial color according to the first target reverse LUT, the second target reverse LUT and the third sub-angle interpolation weight Positive, get the first color; use the preset formula to correct the initial color according to the third target reverse LUT, the fourth target reverse LUT and the fourth sub-angle interpolation weight to get the second color; use the preset formula to correct the initial color according to the fifth target reverse LUT, the sixth target reverse LUT and the fifth sub-angle interpolation weight to get the third color; use the preset formula to correct the initial color according to the seventh target reverse LUT, the eighth target reverse LUT and the sixth sub-angle interpolation weight to get the fourth color; use the preset formula to determine the fifth color according to the first color, the second color and the first sub-angle interpolation weight; use the preset formula to determine the sixth color according to the third color, the fourth color and the second sub-angle interpolation weight; use the preset formula to determine the target color according to the fifth color, the sixth color and the position interpolation weight.

[0126] In the embodiment of the present application, it is assumed that under the first standby node loc1, eta0 satisfies eta1 <= eta0 < eta2. The third sub-angle interpolation weight w_theta3 and the fourth sub-angle interpolation weight w_theta4 of the second target sub-angle theta0 are calculated respectively under eta1 and eta2. The calculation method is similar to that of the first sub-angle interpolation weight. It is assumed that theta0 is between the angle theta5 represented by the fifth standby sub-node and the angle theta6 represented by the sixth standby sub-node under the first standby sub-node, and between the angle theta7 represented by the seventh standby sub-node and the angle theta8 represented by the eighth standby sub-node under the second standby sub-node. Then:

[0127] value_loc1_eta1 = mix(reverse LUT5(color_in), reverse LUT 6(color_in), w_theta3);

[0128] value_loc1_eta2 = mix(reverse LUT 7(color_in), reverse LUT 8(color_in), w_theta4); value_loc1 = mix(value_loc1_eta1, value_loc1_eta2, w_eta_loc1).

[0129] Among them, reverse LUT5 represents the reverse LUT corresponding to the fifth standby sub-node. Reverse LUT 6 represents the reverse LUT corresponding to the sixth standby sub-node. Reverse LUT 7 represents the reverse LUT corresponding to the seventh standby sub-node. Reverse LUT8 represents the reverse LUT corresponding to the eighth standby sub-node.

[0130] Among them, value_loc1_eta1 represents the first color, value_loc1_eta2 represents the second color, color_in represents the initial color, reverse LUTi represents the corresponding reverse LUT, and value_loc1 represents the fifth color.

[0131] Refer to Fig.15, assume that under loc2, the first target sub-angle eta0 satisfies eta3 <= eta0 < eta4. Calculate the interpolation weights w_theta3 and w_theta4 of the second target sub-angle theta0 at eta3 and eta4 respectively, where eta3 is the angle represented by the third待用子节点 (pending sub-node), and eta4 is the angle represented by the fourth待用子节点; and assume that theta0 is between theta9 and theta10 in eta3, and theta0 is between theta11 and theta12 in eta4; where theta9 is the angle represented by the ninth待用子节点, theta10 is the angle represented by the tenth待用子节点, theta11 is the angle represented by the eleventh待用子节点, and theta12 is the angle represented by the twelfth待用子节点, then:

[0132] value_loc2_eta3 = mix(Reverse LUT 9(color_in), Reverse LUT 10(color_in), w_theta3);

[0133] value_loc2_eta4 = mix(Reverse LUT 11(color_in), Reverse LUT 12(color_in), w_theta4); value_loc2 = mix(value_loc2_eta3, value_loc2_eta4, w_eta_loc2).

[0134] Among them, Reverse LUT9 represents the reverse LUT corresponding to the ninth待用子节点. Reverse LUT10 represents the reverse LUT corresponding to the tenth待用子节点. Reverse LUT 11 represents the reverse LUT corresponding to the eleventh待用子节点. Reverse LUT12 represents the reverse LUT corresponding to the twelfth待用子节点. value_loc2_eta2 represents the third color, value_loc2_eta3 represents the fourth color, and value_loc2 represents the sixth color.

[0135] Furthermore, color_out = mix(value_loc1, value_loc2, w_loc). Among them, color_out represents the target color, and w_loc is the position interpolation weight. The preset function mix(x, y, a) = x * (1 - a) + y * a.

[0136] It should be noted that the term "待用子节点" in the original text seems to be a specific technical term in a particular context. If there is a more accurate and standard English equivalent, it would be better to use that for a more precise translation. Here, a literal translation is provided for the sake of following the translation rules.In an optional embodiment, the corresponding relationship between the screen identification, the camera position, eta, theta, the target reverse LUT and each interpolation weight can be stored in advance based on the LUT tree. Then, during use, the corresponding target reverse LUT and interpolation weight calculation can be directly searched to correct the initial color and obtain the target color, thereby improving the efficiency of color correction.

[0137] Specifically, the storage process of the corresponding relationship includes the following steps:

[0138] S31, use the array x_eta_matrix to store each weight w_eta that may need to interpolate eta under each acquisition position x and the two eta indexes index_eta_1 and index_eta_2 used for interpolation. For example, if there are 10 x, the value range of eta is 0-180, so the size of this matrix is ​​10x 181;

[0139] S32. Use the array x_eta_theta_matirx to store each weight w_theta that may need to interpolate theta under each acquisition position x and acquisition angle eta and the two theta indexes index_theta_1 and index_theta_2 used for interpolation. For example, there are 10 x, 11 eta, and the value range of theta is 0-180, so the size of this matrix is ​​10x 11x 181.

[0140] S33, using the array x_offset to store the value range (LUT_x_1, LUT_x_2) of the LUT index corresponding to each acquisition position x, see Fig.14 In the LUT tree shown, eta and theta are sorted, and each theta in the last layer is a reverse LUT, and these reverse LUTs are also stored in order; in addition, according to the above example, the size of the array is 10x1;

[0141] S34. The value range (LUT_eta_1, LUT_eta_2) of the LUT index corresponding to each acquisition eta under a single acquisition position x is stored through the array x_eta_offset. Therefore, according to the above example, the size of the array is 10x 11.

[0142] S35, storing the above array in a database.

[0143] The specific process of determining each interpolation value based on the database is as follows:

[0144] S41, according to the target position and the first node of the target LUT tree (the node representing the position), searching for the indexes (index_x_1 and index_x_2) of the two first nodes (the first standby node and the second standby node) used for interpolation and the corresponding position interpolation weights, specifically the above-mentioned method for determining the position interpolation weights, the search result is applicable to all pixels of the image to be displayed;

[0145] S42, according to the first target sub-angle eta corresponding to the pixel to be color corrected T and (index_x_1 and index_x_2) of S41, directly take the interpolation index (index_eta_1 and index_eta_2) of eta, the interpolation weight of the first sub-angle and the interpolation weight of the second sub-angle in the corresponding positions of the array x_eta_matrix;

[0146] S43, according to (index_x_1 and index_x_2) calculated in S41, (index_eta_1 and index_eta_2) calculated in S42, and the second target sub-angle theta0 value of the pixel to be color corrected, directly take the interpolation index (index_theta_1 and index_theta_2) of the theta0 value and the third sub-angle interpolation weight to the sixth sub-angle interpolation weight at the corresponding position of the array x_eta_theta_matirx;

[0147] S44, directly obtain the index LUT_x_1 of the starting reverse LUT for interpolation in the array x_offset according to (index_x_1 and index_x_2) calculated in S41; directly obtain the acquisition eta under the first standby node and the second standby node in the array x_eta_offset according to (index_x_1 and index_x_2) calculated in S41 and (index_eta_1 and index_eta_2) in S42 T The corresponding starting reverse LUT index LUT_eta_1;

[0148] S45. According to LUT_x_1, LUT_eta_1 of S44 and index_theta_1 of S43, one of the LUT indexes used for interpolation can be calculated: LUT_1 = LUT_x_1 + LUT_eta_1 + index_theta_1. The indexes of the other seven reverse LUTs can be calculated similarly.

[0149] S46. Determine multiple inverse LUTs according to the obtained indexes of the 8 inverse LUTs.

[0150] In summary, after the data of the LUT tree is pre-calculated and stored, the information of the LUT tree is decomposed into 4 arrays. In determining each interpolation process, for a pixel to be color corrected, the present application only needs to search once in the database to obtain the position interpolation weight, and then directly obtain other interpolation weights and the target reverse LUT in the array to obtain all the reverse LUTs that need to be used for interpolation. This method can avoid the cumbersome interpolation process of the LUT tree.

[0151] In the embodiment of the present application, through the two angles of the pixel points and the physical space coordinates of the camera and other information, multiple different LUTs are collected to build a LUT tree for trilinear interpolation, which better solves the problem of large-scale movement of the camera relative to the acquisition position during color correction, and different colors in different areas of the screen under the same camera viewport. In addition, the present application has high versatility and is applicable to screens of different shapes and positions, as well as scenes with different coordinate systems.

[0152] In the embodiment of the present application, in addition to providing a color correction method, a color correction device 160 is also provided. Fig.16 As shown, the color correction device 160 includes:

[0153] A first determination module 161 is used to obtain an image to be displayed, and determine the initial color of a pixel to be color corrected in the image to be displayed and the pixel coordinates corresponding to the pixel to be color corrected on a target screen, where the target screen is one of at least one screen;

[0154] An acquisition module 162 is used to acquire a target position of a camera shooting a target screen and a target identifier of the target screen;

[0155] A second determination module 163 is used to determine a target angle between a target camera and a light source at a pixel coordinate on a target screen;

[0156] A third determination module 164 is used to determine a target reverse LUT according to the target identifier, the target position and the target angle;

[0157] The correction module 165 is used to perform color correction on the initial color of the pixel to be color corrected according to the target inverse LUT to obtain the target color of the pixel to be color corrected.

[0158] In an optional embodiment, the third determination module 164 is specifically used to determine a target LUT tree corresponding to the target identifier in at least one pre-constructed LUT tree, wherein the screen corresponds one-to-one to the LUT tree, and the root node of the target LUT tree represents the target identifier; determine a first target node matching the target position in the target LUT tree, the first target node is one of multiple first nodes, the first node is a child node of the root node, and each first node represents a different position of the camera; determine a second target node matching the target angle among multiple second nodes of the first target node, and each second node represents an angle of the target camera and the light source at different coordinates on the target screen; and determine the reverse LUT corresponding to the second target node as the target reverse LUT.

[0159] In an optional embodiment, the second node includes: a first subnode and a second subnode, wherein the first subnode is a subnode of the first node, the second subnode is a subnode of the first subnode, the target angle includes a first target sub-angle and / or a second target sub-angle, and the second target node includes: a first target subnode and a second target subnode, the first target subnode represents a first target sub-angle, the second target subnode represents a second target sub-angle, the first target sub-angle is an angle between a connecting line and a first tangent of a light source, the second target sub-angle is an angle between a connecting line and a second tangent of a light source, the connecting line is a connecting line between a target camera and a light source, and when the third determination module 164 determines a second target node matching the target angle from among multiple second nodes of the first target node, it is specifically used to:

[0160] Determining a first target subnode matching the first target sub-angle among a plurality of first subnodes of the first target node;

[0161] A second target subnode matching the second target sub-angle is determined among the plurality of second subnodes of the first target subnode.

[0162] In an optional embodiment, the correction module 165 is specifically configured to:

[0163] Determine the position interpolation weight according to the size relationship between each coordinate value of the target position and the coordinate value corresponding to the position represented by the first target node;

[0164] Determine a first angle interpolation weight according to a magnitude relationship between the first target sub-angle and the angle represented by the first target sub-node;

[0165] Determine a second angle interpolation weight according to a magnitude relationship between the second target sub-angle and the angle represented by the second target sub-node;

[0166] Color correction is performed on the pixel to be color corrected according to the position interpolation weight, the first angle interpolation weight, the second angle interpolation weight, and the target inverse LUT.

[0167] In an optional embodiment, the first target node includes: a first standby node and / or a second standby node, the first standby node being the first node among the multiple first nodes whose position is closest to the target position and is on one side of the target position, and the second standby node being the first node among the multiple first nodes whose position is closest to the target position and is on the other side of the target position.

[0168] In an optional embodiment, the first target subnode includes: a first standby subnode, a second standby subnode, a third standby subnode and a fourth standby subnode, and when the third determination module 164 determines the first target subnode matching the first target sub-angle from among the multiple first subnodes of the first target node, it is specifically used to:

[0169] Determine a first standby subnode and / or a second standby subnode from among the plurality of first subnodes of the first standby node, the first standby subnode being the first subnode whose corresponding angle is less than or equal to the first target subangle and is closest to the first target subangle among the plurality of first subnodes of the first standby node, and the second standby subnode being the first subnode whose corresponding angle is greater than the first target subangle and is closest to the first target subangle among the plurality of first subnodes of the first standby node;

[0170] A third standby subnode and / or a fourth standby subnode are determined from among the multiple first subnodes of the second standby node, the third standby subnode being the first subnode among the multiple first subnodes of the second standby node whose corresponding angle is less than or equal to the first target subangle and is closest to the first target subangle, and the third standby subnode is the first subnode among the multiple first subnodes of the second standby node whose corresponding angle is greater than the first target subangle and is closest to the first target subangle.

[0171] In an optional embodiment, the second target subnode includes: a fifth standby subnode, a sixth standby subnode, a seventh standby subnode, an eighth standby subnode, a ninth standby subnode, a tenth standby subnode, an eleventh standby subnode and a twelfth standby subnode, and when the third determination module 164 determines the second target subnode matching the second target sub-angle from the multiple second subnodes of the first target subnode, it is specifically used to:

[0172] Determine a fifth standby subnode and / or a sixth standby subnode from among the plurality of second subnodes of the first standby subnode, the fifth standby subnode being a second subnode whose corresponding angle is less than or equal to the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the first standby subnode, and the sixth standby subnode being a second subnode whose corresponding angle is greater than the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the first standby subnode;

[0173] Determine a seventh standby subnode and / or an eighth standby subnode from among the plurality of second subnodes of the second standby subnode, the seventh standby subnode being a second subnode whose corresponding angle is less than or equal to the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the second standby subnode, and the eighth standby subnode being a second subnode whose corresponding angle is greater than the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the second standby subnode;

[0174] Determine a ninth standby subnode and / or a tenth standby subnode from the plurality of second subnodes of the third standby subnode, the ninth standby subnode being a second subnode whose corresponding angle is less than or equal to the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the third standby subnode, and the tenth standby subnode being a second subnode whose corresponding angle is greater than the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the third standby subnode;

[0175] The eleventh standby subnode and / or the twelfth standby subnode are determined from the multiple second subnodes of the fourth standby subnode, the eleventh standby subnode being the second subnode among the multiple second subnodes of the fourth standby subnode whose corresponding angle is less than or equal to the second target subangle and is closest to the second target subangle, and the twelfth standby subnode is the second subnode among the multiple second subnodes of the fourth standby subnode whose corresponding angle is greater than the second target subangle and is closest to the second target subangle.

[0176] In an optional embodiment, the first angle interpolation weight includes: a first sub-angle interpolation weight and a second sub-angle interpolation weight. When the correction module 165 determines the first angle interpolation weight according to the magnitude relationship between the first target sub-angle and the angle represented by the first target sub-node, it is specifically used to:

[0177] Determine the interpolation weight of the first sub-angle according to the size relationship between the angle represented by the first standby sub-node, the angle represented by the second standby sub-node, and the first target sub-angle;

[0178] The second sub-angle interpolation weight is determined according to the size relationship between the angle represented by the third standby sub-node, the angle represented by the fourth standby sub-node, and the first target sub-angle.

[0179] In an optional embodiment, the second angle interpolation weight includes: a third sub-angle interpolation weight, a fourth sub-angle interpolation weight, a fifth sub-angle interpolation weight and a sixth sub-angle interpolation weight. When the correction module 165 determines the second angle interpolation weight according to the size relationship between the second target sub-angle and the angle represented by the second target sub-node, it is specifically used to: determine the third sub-angle interpolation weight according to the size relationship between the angle represented by the fifth stand-by sub-node, the angle represented by the sixth stand-by sub-node and the second target sub-angle; determine the fourth sub-angle interpolation weight according to the size relationship between the angle represented by the seventh stand-by sub-node, the angle represented by the eighth stand-by sub-node and the second target sub-angle; determine the fifth sub-angle interpolation weight according to the size relationship between the angle represented by the ninth stand-by sub-node, the angle represented by the tenth stand-by sub-node and the second target sub-angle; determine the sixth sub-angle interpolation weight according to the size relationship between the angle represented by the eleventh stand-by sub-node, the angle represented by the twelfth stand-by sub-node and the second target sub-angle.

[0180] In an optional embodiment, the target reverse LUT includes: a first target reverse LUT corresponding to the fifth standby subnode, a second target reverse LUT corresponding to the sixth standby subnode, a third target reverse LUT corresponding to the seventh standby subnode, a fourth target reverse LUT corresponding to the eighth standby subnode, a fifth target reverse LUT corresponding to the ninth standby subnode, a sixth target reverse LUT corresponding to the tenth standby subnode, a seventh target reverse LUT corresponding to the eleventh standby subnode, and an eighth target reverse LUT corresponding to the twelfth standby subnode. When the correction module 165 performs color correction on the pixel to be color corrected according to the position interpolation weight, the first angle interpolation weight, the second angle interpolation weight, and the target reverse LUT, it is specifically used to:

[0181] Using a preset formula, the initial color is corrected according to the first target reverse LUT, the second target reverse LUT and the third sub-angle interpolation weight to obtain a first color;

[0182] Using a preset formula, the initial color is corrected according to the third target reverse LUT, the fourth target reverse LUT and the fourth sub-angle interpolation weight to obtain a second color;

[0183] Using a preset formula, the initial color is corrected according to the fifth target reverse LUT, the sixth target reverse LUT and the fifth sub-angle interpolation weight to obtain a third color;

[0184] Using a preset formula, the initial color is corrected according to the seventh target reverse LUT, the eighth target reverse LUT, and the sixth sub-angle interpolation weight to obtain a fourth color;

[0185] Determine a fifth color by using a preset formula according to the first color, the second color and the interpolation weight of the first sub-angle;

[0186] Determine the sixth color according to the third color, the fourth color and the second sub-angle interpolation weight using a preset formula;

[0187] A preset formula is used to determine the target color based on the fifth color, the sixth color and the position interpolation weight.

[0188] In an optional embodiment, the first tangent line represents the tangent line at the screen pixel coordinates corresponding to the light source, and the second tangent line represents the secondary tangent line of the light source, or the first tangent line represents the secondary tangent line of the light source, and the second tangent line represents the tangent line of the light source, and the tangent lines are parallel to one side of the rectangular screen where the light source is located.

[0189] In an optional embodiment, the correction module 165 is specifically used to determine a target reverse LUT corresponding to the target angle, target position and target identification from multiple reverse LUTs according to the corresponding relationship stored in a preset database, and the corresponding relationship indicates the target angle, target position and target identification corresponding to each reverse LUT.

[0190] The specific implementation process refers to the above embodiment and will not be described again here.

[0191] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and are only used to distinguish between different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to different types.

[0192] Fig.17 1 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device 170 is used to run the above-mentioned color correction method and color correction method. Fig.17 As shown, the electronic device includes: a memory 174 and a processor 175 .

[0193] The memory 174 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. The memory 174 can be an object storage service (OSS).

[0194] The memory 174 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0195] The processor 175 is coupled to the memory 174 and is used to execute the computer program in the memory 174 to perform the above color correction method.

[0196] Further, if Fig.17 As shown, the electronic device also includes: a firewall 171, a load balancer 172, a communication component 176, a power supply component 173 and other components. Fig.17 Only some components are shown schematically, which does not mean that the electronic device only includes Fig.17 Components shown.

[0197] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when the computer program / instructions are executed by a processor, causes the processor to implement the steps in the method shown above.

[0198] Accordingly, an embodiment of the present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is caused to implement the steps in the method shown above.

[0199] Above Fig.17 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related text from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0200] Above Figure 8 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.

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

[0202] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable text processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable text processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0203] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable text processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0204] These computer program instructions may also be loaded onto a computer or other programmable text processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0205] In a typical configuration, a computing device includes one or more processors (CPU and / or GPU), input / output interfaces, network interfaces, and memory.

[0206] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0207] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store text. The text can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store text that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0208] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0209] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A color correction method, characterized in that: Applied in a virtual shooting scene, the virtual shooting scene includes at least one camera and at least one screen, and the color correction method includes: Acquire an image to be displayed, and determine an initial color of a pixel to be color corrected in the image to be displayed and a pixel coordinate corresponding to the pixel to be color corrected on a target screen, where the target screen is one of the at least one screen; Acquire a target position of a target camera shooting the target screen and a target identifier of the target screen; the target camera is one of the at least one camera; Determine a target angle between the target camera and the light source at the pixel coordinates on the target screen; A target reverse LUT is determined according to the target identifier, the target position and the target angle; the target angle includes a first target sub-angle and / or a second target sub-angle; the first target sub-angle is the angle between a connecting line and a first tangent of the light source, the second target sub-angle is the angle between the connecting line and a second tangent of the light source, the connecting line is the connecting line between the target camera and the light source, the first tangent represents a tangent at the screen pixel coordinates corresponding to the light source, the second tangent represents a secondary tangent at the screen pixel coordinates corresponding to the light source, or the first tangent represents a secondary tangent at the screen pixel coordinates corresponding to the light source, the second tangent represents a tangent at the screen pixel coordinates corresponding to the light source, and the tangents are parallel to a side of a rectangular screen where the light source is located; Color correction is performed on the initial color of the pixel to be color corrected according to the target inverse LUT to obtain the target color of the pixel to be color corrected.

2. The color correction method according to claim 1, characterized in that: Determining the target reverse LUT according to the target identifier, the target position and the target angle includes: Determine a target LUT tree corresponding to the target identifier in at least one pre-constructed LUT tree, wherein the screen corresponds to the LUT tree one-to-one, and the root node of the target LUT tree represents the target identifier; Determine a first target node matching the target position in the target LUT tree, where the first target node is one of a plurality of first nodes, the first node is a child node of the root node, and each of the first nodes represents a different position of a camera; Determine a second target node matching the target angle from among a plurality of second nodes of the first target node, wherein each of the second nodes respectively represents an angle between the target camera and a light source at different pixel coordinates on the target screen; the second node is a child node of the first node; The reverse LUT corresponding to the second target node is determined as the target reverse LUT.

3. The color correction method according to claim 2, characterized in that: The second node includes: a first subnode and a second subnode, wherein the first subnode is a subnode of the first node, and the second subnode is a subnode of the first subnode, the target angle includes a first target sub-angle and a second target sub-angle, and the second target node includes: a first target subnode and a second target subnode, the first target subnode represents a first target sub-angle, and the second target subnode represents a second target sub-angle, Wherein, determining a second target node matching the target angle among a plurality of second nodes of the first target node comprises: Determine a first target subnode matching the first target sub-angle among a plurality of first subnodes of the first target node; A second target subnode matching the second target sub-angle is determined from among a plurality of second subnodes of the first target subnode.

4. The color correction method according to claim 3, characterized in that: The color correction of the initial color of the pixel to be color corrected according to the target inverse LUT comprises: Determining a position interpolation weight according to a size relationship between each coordinate value of the target position and a coordinate value corresponding to the position represented by the first target node; Determining a first angle interpolation weight according to a magnitude relationship between the first target sub-angle and the angle represented by the first target sub-node; Determining a second angle interpolation weight according to a magnitude relationship between the second target sub-angle and the angle represented by the second target sub-node; Color correction is performed on the pixel to be color corrected according to the position interpolation weight, the first angle interpolation weight, the second angle interpolation weight and the target reverse LUT.

5. The color correction method according to claim 4, characterized in that: The first target node includes: a first standby node and a second standby node, the first standby node being the first node among the multiple first nodes whose position is closest to the target position and is on one side of the target position, and the second standby node being the first node among the multiple first nodes whose position is closest to the target position and is on the other side of the target position.

6. The color correction method according to claim 5, characterized in that: The first target subnode includes: a first standby subnode, a second standby subnode, a third standby subnode and a fourth standby subnode, and determining a first target subnode matching the first target sub-angle from among the multiple first subnodes of the first target node includes: Determine a first standby subnode and a second standby subnode from among the plurality of first subnodes of the first standby node, the first standby subnode being the first subnode among the plurality of first subnodes of the first standby node whose corresponding angle is less than or equal to the first target subangle and which is closest to the first target subangle, and the second standby subnode being the first subnode among the plurality of first subnodes of the first standby node whose corresponding angle is greater than the first target subangle and which is closest to the first target subangle; A third standby subnode and a fourth standby subnode are determined from among the multiple first subnodes of the second standby node, the third standby subnode being the first subnode among the multiple first subnodes of the second standby node whose corresponding angle is less than or equal to the first target subangle and which is closest to the first target subangle, and the fourth standby subnode being the first subnode among the multiple first subnodes of the second standby node whose corresponding angle is greater than the first target subangle and which is closest to the first target subangle.

7. The color correction method according to claim 6, characterized in that: The second target subnode includes: a fifth standby subnode, a sixth standby subnode, a seventh standby subnode, an eighth standby subnode, a ninth standby subnode, a tenth standby subnode, an eleventh standby subnode and a twelfth standby subnode, and determining a second target subnode matching the second target sub-angle from among the plurality of second subnodes of the first target subnode includes: Determine a fifth standby subnode and a sixth standby subnode from among the plurality of second subnodes of the first standby subnode, the fifth standby subnode being a second subnode whose corresponding angle is less than or equal to the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the first standby subnode, and the sixth standby subnode being a second subnode whose corresponding angle is greater than the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the first standby subnode; Determine a seventh standby subnode and an eighth standby subnode from among the plurality of second subnodes of the second standby subnode, the seventh standby subnode being a second subnode whose corresponding angle is less than or equal to the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the second standby subnode, and the eighth standby subnode being a second subnode whose corresponding angle is greater than the second target subangle and is closest to the second target subangle among the plurality of second subnodes of the second standby subnode; Determine a ninth standby subnode and a tenth standby subnode from among the plurality of second subnodes of the third standby subnode, wherein the ninth standby subnode is a second subnode among the plurality of second subnodes of the third standby subnode whose corresponding angle is less than or equal to the second target subangle and is closest to the second target subangle, and the tenth standby subnode is a second subnode among the plurality of second subnodes of the third standby subnode whose corresponding angle is greater than the second target subangle and is closest to the second target subangle; An eleventh standby subnode and a twelfth standby subnode are determined from the multiple second subnodes of the fourth standby subnode, the eleventh standby subnode being the second subnode among the multiple second subnodes of the fourth standby subnode, the corresponding angle of which is less than or equal to the second target sub-angle and which is closest to the second target sub-angle, and the twelfth standby subnode is the second subnode among the multiple second subnodes of the fourth standby subnode, the corresponding angle of which is greater than the second target sub-angle and which is closest to the second target sub-angle.

8. The color correction method according to claim 7, characterized in that: The first angle interpolation weight includes: a first sub-angle interpolation weight and a second sub-angle interpolation weight, and the first angle interpolation weight is determined according to the magnitude relationship between the first target sub-angle and the angle represented by the first target sub-node, including: Determine a first sub-angle interpolation weight according to a magnitude relationship among the angle represented by the first standby sub-node, the angle represented by the second standby sub-node, and the first target sub-angle; The second sub-angle interpolation weight is determined according to the size relationship between the angle represented by the third standby sub-node, the angle represented by the fourth standby sub-node, and the first target sub-angle.

9. The color correction method according to claim 8, characterized in that: The second angle interpolation weight includes: a third sub-angle interpolation weight, a fourth sub-angle interpolation weight, a fifth sub-angle interpolation weight and a sixth sub-angle interpolation weight, and the second angle interpolation weight is determined according to the size relationship between the second target sub-angle and the angle represented by the second target sub-node, including: Determine a third sub-angle interpolation weight according to a magnitude relationship among the angle represented by the fifth standby sub-node, the angle represented by the sixth standby sub-node, and the second target sub-angle; Determine a fourth sub-angle interpolation weight according to a magnitude relationship among the angle represented by the seventh standby sub-node, the angle represented by the eighth standby sub-node, and the second target sub-angle; Determine a fifth sub-angle interpolation weight according to a magnitude relationship among the angle represented by the ninth to-be-used sub-node, the angle represented by the tenth to-be-used sub-node, and the second target sub-angle; The interpolation weight of the sixth sub-angle is determined according to the size relationship between the angle represented by the eleventh to-be-used sub-node, the angle represented by the twelfth to-be-used sub-node, and the second target sub-angle.

10. The color correction method according to claim 9, characterized in that: The target reverse LUT includes: a first target reverse LUT corresponding to the fifth standby subnode, a second target reverse LUT corresponding to the sixth standby subnode, a third target reverse LUT corresponding to the seventh standby subnode, a fourth target reverse LUT corresponding to the eighth standby subnode, a fifth target reverse LUT corresponding to the ninth standby subnode, a sixth target reverse LUT corresponding to the tenth standby subnode, a seventh target reverse LUT corresponding to the eleventh standby subnode, and an eighth target reverse LUT corresponding to the twelfth standby subnode. The step of performing color correction on the pixel to be color corrected according to the position interpolation weight, the first angle interpolation weight, the second angle interpolation weight, and the target reverse LUT includes: Using a preset formula, the initial color is corrected according to the first target reverse LUT, the second target reverse LUT and the third sub-angle interpolation weight to obtain a first color; Using the preset formula, correcting the initial color according to the third target reverse LUT, the fourth target reverse LUT and the fourth sub-angle interpolation weight to obtain a second color; Using the preset formula, correcting the initial color according to the fifth target reverse LUT, the sixth target reverse LUT and the fifth sub-angle interpolation weight to obtain a third color; Using the preset formula, correcting the initial color according to the seventh target reverse LUT, the eighth target reverse LUT and the sixth sub-angle interpolation weight to obtain a fourth color; Determine a fifth color using the preset formula according to the first color, the second color and the first sub-angle interpolation weight; Using the preset formula, determining a sixth color according to the third color, the fourth color and the second sub-angle interpolation weight; The target color is determined according to the fifth color, the sixth color and the position interpolation weight using the preset formula.

11. The color correction method according to any one of claims 1 to 10, characterized in that: Determining the target reverse LUT according to the target identifier, the target position and the target angle includes: According to the corresponding relationship stored in the preset database, a target reverse LUT corresponding to the target angle, the target position and the target identifier is determined from multiple reverse LUTs, and the corresponding relationship indicates the target angle, the target position and the target identifier corresponding to each reverse LUT.

12. A color correction device, characterized in that: Applied in a virtual shooting scene, the virtual shooting scene includes at least one camera and at least one screen, and the color correction device includes: A first determination module is used to obtain an image to be displayed, and determine, for a pixel to be color corrected in the image to be displayed, an initial color of the pixel to be color corrected and a pixel coordinate corresponding to the pixel to be color corrected on a target screen; An acquisition module, used to acquire a target position of a target camera for photographing the target screen and a target identifier of the target screen; the target camera is one of the at least one camera; A second determination module is used to determine a target angle between the target camera and the light source at the pixel coordinates on the target screen; the target angle includes a first target sub-angle and / or a second target sub-angle, the first target sub-angle is the angle between a connecting line and a first tangent of the light source, the second target sub-angle is the angle between the connecting line and a second tangent of the light source, the connecting line is the connecting line between the target camera and the light source, the first tangent represents a tangent at the screen pixel coordinates corresponding to the light source, the second tangent represents a secondary tangent at the screen pixel coordinates corresponding to the light source, or the first tangent represents a secondary tangent at the screen pixel coordinates corresponding to the light source, the second tangent represents a tangent at the screen pixel coordinates corresponding to the light source, and the tangents are parallel to a side of a rectangular screen where the light source is located; A third determination module is used to determine a target reverse LUT according to the target identifier, the target position and the target angle; The correction module is used to perform color correction on the pixel to be color corrected according to the target inverse LUT to obtain the target color of the pixel to be color corrected.

13. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the color correction method according to any one of claims 1 to 11 when executing the computer program.