Color lookup table generating method based on shooting parameters, device and computer equipment
Patent Information
- Application Number
- HK42023079555
- Authority / Receiving Office
- HK · HK
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Different shooting and display devices produce color differences in images when using different parameters, and the color calibration of existing technologies is not accurate enough.
Generate a color lookup table based on shooting parameters. By acquiring multiple solid color images, displaying and shooting them on a display device using multiple shooting parameters, determining the shooting color value under each parameter, and establishing a color lookup table for color correction.
It improves the accuracy of color calibration, reduces color differences between displays on different devices, and results in better color consistency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for generating a color lookup table based on shooting parameters, as well as an image color correction method, apparatus, computer device, storage medium, and computer program product. Background Technology
[0002] With the development of computer technology, imaging devices for taking pictures and display devices for displaying information are widely used in various fields. For example, images are displayed on display devices, and imaging devices are used to capture the images displayed on the display devices. The resulting image data is used for color calibration to reduce color differences when different devices use the same image.
[0003] However, the images captured by the shooting device using different parameters also have certain differences in color. Even after color calibration using the captured image data and the image data displayed by the display device, there is still a problem of inaccurate color calibration. Summary of the Invention
[0004] Therefore, it is necessary to address the aforementioned technical problems by providing a method, apparatus, computer device, computer-readable storage medium, and computer program product for generating color lookup tables based on shooting parameters, which can generate more accurate color lookup tables, as well as an image color correction method, apparatus, computer device, computer-readable storage medium, and computer program product that can effectively correct the colors of captured images.
[0005] This application provides a method for generating a color lookup table based on shooting parameters, the method comprising:
[0006] Obtain solid color images generated based on multiple solid color values; the solid color images are used for display on a display device;
[0007] The image displayed on the display device is captured using each of a plurality of shooting parameters while displaying different pure color images on the display device;
[0008] Based on the images captured under each of the aforementioned shooting parameters, determine the shooting color value corresponding to each of the various pure color values under each of the aforementioned shooting parameters;
[0009] Based on the shooting color value corresponding to each of the various pure color values under each shooting parameter, a color lookup table is generated for each shooting parameter. The color lookup table includes the correspondence between each of the pure color values and the corresponding shooting color values. The color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters.
[0010] This application also provides a color lookup table generation apparatus based on shooting parameters, the apparatus comprising:
[0011] The acquisition module is used to acquire solid color images generated based on multiple solid color values; the solid color images are used for display on a display device.
[0012] The image capture module is used to capture the image displayed on the display device when different pure color images are displayed on the display device using each of a plurality of capture parameters;
[0013] The color determination module is used to determine the shooting color value corresponding to each of the multiple pure color values under each shooting parameter, based on the image captured under each shooting parameter.
[0014] The generation module is used to generate a color lookup table corresponding to each of the shooting parameters based on the shooting color values corresponding to the various pure color values under each shooting parameter. The color lookup table includes the correspondence between each of the pure color values and the corresponding shooting color values. The color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters.
[0015] In one embodiment, the acquisition module is further configured to acquire solid color images generated based on multiple solid color values in a first color space;
[0016] The color determination module is further configured to, based on the images captured under each of the shooting parameters, determine the intermediate color value corresponding to each of the multiple pure color values in the second color space under each of the shooting parameters; and convert each of the intermediate color values in the second color space to the first color space to obtain each shooting color value in the first color space.
[0017] The generation module is further configured to generate a color lookup table for each shooting parameter in the first color space based on the shooting color value corresponding to each of the multiple pure color values in the first color space under each shooting parameter.
[0018] In one embodiment, the color determination module is further configured to perform brightness conversion processing on each of the intermediate color values in the second color space to obtain brightness-converted intermediate color values; and to perform color conversion processing on each brightness-converted intermediate color value to obtain each captured color value in the first color space.
[0019] In one embodiment, the generation module is further configured to, for two shooting parameters of the same category, generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the difference between the color lookup tables corresponding to the two shooting parameters.
[0020] In one embodiment, the generation module is further configured to generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the difference between the color lookup tables corresponding to the two shooting parameters when the difference between two shooting parameters of the same category is greater than a preset threshold and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters.
[0021] In one embodiment, the generating module is further configured to, for each of the two shooting parameters of the same category, determine the difference between the shooting color values corresponding to each of the solid color values in the two color lookup tables; and, based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each of the solid color values in the two color lookup tables, determine the color lookup table corresponding to at least one shooting parameter between the two shooting parameters.
[0022] In one embodiment, the plurality of pure color values represent corresponding standard pure colors, the plurality of shooting parameters include at least one of aperture number, exposure time, color temperature or hue, the display device is a light-emitting diode display screen, the pure color values include a first sub-color value on a plurality of color channels, and the shooting color value includes a second sub-color value on a plurality of color channels.
[0023] This application also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0024] Obtain solid color images generated based on multiple solid color values; the solid color images are used for display on a display device;
[0025] The image displayed on the display device is captured using each of a plurality of shooting parameters while displaying different pure color images on the display device;
[0026] Based on the images captured under each of the aforementioned shooting parameters, determine the shooting color value corresponding to each of the various pure color values under each of the aforementioned shooting parameters;
[0027] Based on the shooting color value corresponding to each of the various pure color values under each shooting parameter, a color lookup table is generated for each shooting parameter. The color lookup table includes the correspondence between each of the pure color values and the corresponding shooting color values. The color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters.
[0028] This application also provides a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0029] Obtain solid color images generated based on multiple solid color values; the solid color images are used for display on a display device;
[0030] The image displayed on the display device is captured using each of a plurality of shooting parameters while displaying different pure color images on the display device;
[0031] Based on the images captured under each of the aforementioned shooting parameters, determine the shooting color value corresponding to each of the various pure color values under each of the aforementioned shooting parameters;
[0032] Based on the shooting color value corresponding to each of the various pure color values under each shooting parameter, a color lookup table is generated for each shooting parameter. The color lookup table includes the correspondence between each of the pure color values and the corresponding shooting color values. The color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters.
[0033] This application also provides a computer program product, which includes a computer program that, when executed by a processor, performs the following steps:
[0034] Obtain solid color images generated based on multiple solid color values; the solid color images are used for display on a display device;
[0035] The image displayed on the display device is captured using each of a plurality of shooting parameters while displaying different pure color images on the display device;
[0036] Based on the images captured under each of the aforementioned shooting parameters, determine the shooting color value corresponding to each of the various pure color values under each of the aforementioned shooting parameters;
[0037] Based on the shooting color value corresponding to each of the various pure color values under each shooting parameter, a color lookup table is generated for each shooting parameter. The color lookup table includes the correspondence between each of the pure color values and the corresponding shooting color values. The color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters.
[0038] The aforementioned method, apparatus, computer device, storage medium, and computer program product for generating color lookup tables based on shooting parameters acquire solid color images generated based on multiple solid color values, which are then displayed on a display device. This is achieved by capturing images displayed on the display device using each of the multiple shooting parameters while displaying different solid color images on the display device. Based on the images captured under each shooting parameter, the corresponding shooting color values for each of the multiple solid color values under each shooting parameter are determined, thereby obtaining various shooting color values under different shooting parameters. According to the shooting color values corresponding to each of the multiple solid color values under each shooting parameter, a color lookup table can be generated for each shooting parameter, establishing a correlation between each shooting parameter and the color lookup table, resulting in a more accurate color lookup table. This color lookup table includes the correspondence between each solid color value and its corresponding shooting color value, and is used for color correction of the target image captured using the corresponding shooting parameters. This allows for more accurate correction of the target image captured with the corresponding shooting parameters, effectively reducing color differences caused by different devices displaying the same image, ensuring color consistency across different devices.
[0039] This application provides an image color correction method, the method comprising:
[0040] Display virtual scene images as virtual scene screens through a display device;
[0041] Under the target shooting parameters, a real scene with the virtual scene displayed on the display device as the background is captured to obtain a target image;
[0042] Obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table;
[0043] The target image is color-corrected according to the target color mapping relationship to obtain the corrected image.
[0044] This application also provides an image color correction device, the device comprising:
[0045] The display module is used to display virtual scene images as virtual scene screens through a display device;
[0046] The scene shooting module is used to shoot a real scene against the background of the virtual scene displayed on the display device under the target shooting parameters, so as to obtain a target image;
[0047] The relationship determination module is used to obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table.
[0048] The correction module is used to perform color correction on the target image according to the target color mapping relationship to obtain the corrected image.
[0049] In one embodiment, the scene shooting module is further configured to shoot a real scene formed by using the virtual scene image displayed on the display device as the background and the physical object as the foreground under target shooting parameters, thereby obtaining a target image.
[0050] In one embodiment, the relationship determination module is further configured to obtain the target format corresponding to the target image and the format corresponding to the target color lookup table; when the format of the target color lookup table is different from the target format, the target color lookup table is converted to the target format, and the target color mapping relationship corresponding to the target shooting parameters is determined based on the target color lookup table converted to the target format.
[0051] In one embodiment, the target shooting parameters belong to multiple shooting parameters, and each shooting parameter has a corresponding color lookup table; the color lookup tables corresponding to each of the multiple shooting parameters are generated according to the above-described color lookup table generation method based on shooting parameters.
[0052] In one embodiment, the relationship determination module is further configured to determine the target color mapping relationship under the target shooting parameters based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value;
[0053] The correction module is further configured to determine the target color value corresponding to each pixel in the target image; and to perform color correction on each target color value according to the target color mapping relationship to obtain the corrected image.
[0054] In one embodiment, the correction module is further configured to determine the channel color value corresponding to each pixel in the target image in each color channel; and to perform color correction on the channel color value of each pixel in the corresponding color channel based on the channel mapping relationship corresponding to the multiple color channels, so as to obtain the corrected image.
[0055] This application also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0056] Display virtual scene images as virtual scene screens through a display device;
[0057] Under the target shooting parameters, a real scene with the virtual scene displayed on the display device as the background is captured to obtain a target image;
[0058] Obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table;
[0059] The target image is color-corrected according to the target color mapping relationship to obtain the corrected image.
[0060] This application also provides a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0061] Display virtual scene images as virtual scene screens through a display device;
[0062] Under the target shooting parameters, a real scene with the virtual scene displayed on the display device as the background is captured to obtain a target image;
[0063] Obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table;
[0064] The target image is color-corrected according to the target color mapping relationship to obtain the corrected image.
[0065] This application also provides a computer program product, which includes a computer program that, when executed by a processor, performs the following steps:
[0066] Display virtual scene images as virtual scene screens through a display device;
[0067] Under the target shooting parameters, a real scene with the virtual scene displayed on the display device as the background is captured to obtain a target image;
[0068] Obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table;
[0069] The target image is color-corrected according to the target color mapping relationship to obtain the corrected image.
[0070] The aforementioned image color correction method, apparatus, computer equipment, storage medium, and computer program product display a virtual scene image as a virtual scene image on a display device. Under target shooting parameters, a real scene is captured against the backdrop of the virtual scene image displayed on the display device. This allows the physical objects and the virtual image to be merged into the same image, thus cleverly combining the virtual scene and the real environment to generate a fused target image. A target color lookup table corresponding to the target shooting parameters is obtained. Based on the target color lookup table, the target color mapping relationship corresponding to the target shooting parameters is accurately determined. This target color mapping relationship is related to the shooting parameters used; a target color mapping relationship determined based on the used shooting parameters is more accurate. Color correction is performed on the target image according to the target color mapping relationship to obtain a corrected image. This ensures that the images displayed on different devices maintain color consistency, effectively reducing color differences caused by displaying images on different devices. Attached Figure Description
[0071] Figure 1 This is an application environment diagram of a color lookup table generation method based on shooting parameters in one embodiment;
[0072] Figure 2 This is a flowchart illustrating a color lookup table generation method based on shooting parameters in one embodiment;
[0073] Figure 3 This is a schematic diagram of partial data from a color lookup table in one embodiment.
[0074] Figure 4 This is a flowchart illustrating the process of generating a color lookup table for each shooting parameter in a first color space in one embodiment.
[0075] Figure 5 This is a schematic diagram of the sRGB color space in one embodiment;
[0076] Figure 6 This is a schematic diagram of the color lookup table corresponding to different color temperatures in one embodiment;
[0077] Figure 7 This is a schematic diagram showing the color lookup tables corresponding to different categories of shooting parameter 1 and shooting parameter 2 in one embodiment;
[0078] Figure 8 This is a flowchart illustrating an image color correction method in one embodiment;
[0079] Figure 9This is a schematic diagram of an interface for capturing a real scene formed by using a virtual scene displayed on a display device as the background and physical objects as the foreground, as one embodiment.
[0080] Figure 10 This is a schematic diagram illustrating color correction of channel color values through channel mapping relationships in one embodiment;
[0081] Figure 11 This is a flowchart illustrating an image color correction method in another embodiment;
[0082] Figure 12 This is a schematic diagram of the images before and after color correction in one embodiment;
[0083] Figure 13 This is a structural block diagram of a color lookup table generation device based on shooting parameters in one embodiment;
[0084] Figure 14 This is a structural block diagram of an image color correction device in one embodiment;
[0085] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0086] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0087] This application's embodiments can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. For example, it can be applied to the field of Artificial Intelligence (AI), where AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to obtain optimal results—theories, methods, technologies, and application systems. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine capable of reacting in a manner similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities. The solutions provided in this application's embodiments relate to a color lookup table generation method based on shooting parameters using artificial intelligence, which will be specifically described through the following embodiments.
[0088] The color lookup table generation method based on shooting parameters provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed in the cloud or on another server. Both terminal 102 and server 104 can independently execute the color lookup table generation method based on shooting parameters provided in this embodiment. Terminal 102 and server 104 can also work together to execute the color lookup table generation method based on shooting parameters provided in this embodiment. When terminal 102 and server 104 work together to execute the color lookup table generation method based on shooting parameters provided in this embodiment, terminal 102 acquires pure color images generated based on various pure color values; the pure color images are used for display on a display device. The display device captures images when different pure color images are displayed on the display device using each of the multiple shooting parameters. Based on the images captured under each shooting parameter, the shooting color value corresponding to each of the multiple pure color values under each shooting parameter is determined. Server 104 generates a color lookup table for each shooting parameter based on the shooting color values corresponding to various pure color values. The color lookup table includes the correspondence between each pure color value and its corresponding shooting color value. This color lookup table is used for color correction of the target image captured using the corresponding shooting parameters. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include display devices, smart speakers, smart TVs, smart air conditioners, and smart vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0089] It should be noted that the quantities of "multiple" mentioned in the embodiments of this application all refer to the quantity of "at least two".
[0090] In one embodiment, such as Figure 2 As shown, a method for generating a color lookup table based on shooting parameters is provided, which can be applied to... Figure 1 Computer equipment (computer equipment can be) Figure 1 Taking the terminal in the middle as an example, the following steps are included:
[0091] Step S202: Obtain solid color images generated based on multiple solid color values; the solid color images are used for display on a display device.
[0092] Here, the pure color value refers to the color value used to form a pure color. A pure color is a single color, which can be white, red, orange, yellow, green, cyan, blue, purple, gray, and black, but is not limited to these. The pure color can be a standard pure color in a defined color space.
[0093] Multiple pure color values correspond to the same color space, meaning they belong to the color range defined by that same color space. Color is the human eye's perception of different frequencies of light. A color space, also known as a "color gamut," refers to the range of colors that a certain color representation model can express. In color theory, various color models are established to represent a color using one-dimensional, two-dimensional, three-dimensional, or even four-dimensional spatial coordinates. The color range defined by this coordinate system is called the color space. Examples of color spaces include RGB (Red, Green, Blue), sRGB (Standard Red, Green, Blue), CMYK, Lab, and Gamma color spaces, but are not limited to these. Different devices may use different color models, thus displaying their own images through their respective color spaces. An image is the picture presented on a device, such as a picture captured by a terminal or a picture displayed on a device. A pure color image is an image formed by pure color values within the color range defined by a color space.
[0094] A display device is a device that can output images; it can also be called a monitor, display screen, screen, etc.
[0095] Specifically, the terminal can generate a corresponding solid color image based on the solid color value of each solid color in the same color space, thus obtaining multiple solid color images. The generated solid color images are used for display on the display device.
[0096] Step S204: Using each of the multiple shooting parameters, capture the image displayed on the display device while displaying different solid color images on the display device.
[0097] Shooting parameters refer to the parameters used by a camera for image capture, including at least one of aperture type, aperture number, exposure time, and color temperature or hue. The aperture is a component used to control the amount of light passing through the lens and entering the photosensitive surface inside the camera body. The aperture's function is to determine the amount of light entering the lens. Aperture size is expressed in F-numbers, denoted as F. Aperture is not the same as F-number; rather, aperture size is inversely proportional to F-number, which is also called the f-number. For example, a large aperture lens has a small F-number, and a small aperture lens has a large F-number. Exposure time refers to the length of time the shutter is open to project light onto the photosensitive surface of the photographic material.
[0098] Color temperature, or the temperature of a color, refers to the warmth or coolness of the light source in the photographic environment. The unit of measurement for color temperature is "K" (Kelvin). Hue refers to the overall color tendency or predominance of a color in an image, such as cool or warm tones.
[0099] Multiple shooting parameters can refer to shooting parameters of different categories, or different parameter values within the same category. For example, a color temperature of 1800K and a color temperature of 2000K are two different shooting parameters within the same category.
[0100] Specifically, the terminal displays each solid color image through the display device, and takes a picture of each solid color image displayed on the display device using each of the multiple shooting parameters of the shooting device, thus obtaining the corresponding captured images.
[0101] In this embodiment, when the display device displays a solid color image, the imaging device can capture images of the scene displayed on the display device using each imaging parameter, resulting in images formed by capturing the same scene displayed on the display device under different imaging parameters. By performing the same processing on each solid color image, images formed by capturing the scene displayed on the display device under each imaging parameter can be obtained.
[0102] In this embodiment, the display device iterates through and displays multiple solid color images. The same shooting parameters of the shooting device can be used to capture images of each solid color image displayed by the display device, resulting in a captured image corresponding to each solid color image under the same shooting parameters. This process is repeated for each shooting parameter of the shooting device to obtain a captured image corresponding to each solid color image under each shooting parameter.
[0103] Step S206: Based on the images captured under each shooting parameter, determine the shooting color value corresponding to each of the various pure color values under each shooting parameter.
[0104] Among them, the captured color value refers to the color value obtained by the shooting device from the image presented by the display device, used to form the captured image. Multiple captured color values correspond to the same color space, that is, color values belonging to the color range defined by the same color space.
[0105] Specifically, based on the images captured by the shooting device under each shooting parameter, the terminal determines the shooting color value corresponding to each of the various pure color values under each shooting parameter.
[0106] Step S208: Based on the shooting color values corresponding to various pure color values under each shooting parameter, generate a color lookup table for each shooting parameter. The color lookup table includes the correspondence between each pure color value and the corresponding shooting color value. The color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters.
[0107] A color lookup table (LUT) is a color conversion method. It records the corresponding photographic color values for various pure color values, and can also record the correspondence between each pure color value and its corresponding photographic color value. For example, it can record the correspondence between red and its corresponding photographic color value.
[0108] Specifically, the terminal can select the shooting color value corresponding to the same shooting parameter and each of the various pure color values from the shooting color values corresponding to each shooting parameter under each shooting parameter. Based on the shooting color value corresponding to the same shooting parameter and each of the various pure color values, a color lookup table corresponding to that shooting parameter is generated. For example, selecting the shooting color value corresponding to each pure color value at a color temperature of 1800K, and recording the selected shooting color value and each pure color value according to the correspondence in the color lookup table, yields the color lookup table corresponding to that color temperature of 1800K.
[0109] like Figure 3 The image shown is a schematic diagram of part of the data in a color lookup table in one embodiment. Figure 3 The image displays the corresponding shooting color values for 13 solid colors. "0.000808728, 0, 0.0106966" represents the shooting color value for the first color, "0.00236515, 0, 0.00926223" represents the shooting color value for the second color, and so on. It's understandable that the color lookup table could include even more solid colors and their corresponding shooting color values.
[0110] In other embodiments, the color lookup table can record the solid color value of each solid color and the corresponding shooting color value of each solid color.
[0111] Following the same processing method, a color lookup table corresponding to each shooting parameter can be obtained. This color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters, resulting in a corrected image.
[0112] In this embodiment, solid color images generated based on multiple solid color values are acquired. These solid color images are used for display on a display device. The process involves capturing images displayed on the display device using each of the multiple shooting parameters while displaying different solid color images. Based on the images captured under each shooting parameter, the corresponding shooting color values for each of the multiple solid color values under each shooting parameter are determined, thus obtaining various shooting color values under different shooting parameters. According to the shooting color values corresponding to each of the multiple solid color values under each shooting parameter, a color lookup table can be generated for each shooting parameter, establishing a relationship between each shooting parameter and the color lookup table. This color lookup table includes the correspondence between each solid color value and its corresponding shooting color value. The color lookup table is used for color correction of the target image captured using the corresponding shooting parameters, enabling more accurate correction of the target image captured by the corresponding shooting parameters. This effectively reduces color differences caused by different devices displaying the same image, ensuring color consistency across different devices.
[0113] In this embodiment, different color lookup tables are generated by combining different shooting parameters. This increases the dimensionality of the original color lookup table, resulting in a multi-dimensional color lookup table. The multi-dimensionality refers to the multiple shooting parameters.
[0114] In one embodiment, such as Figure 4 As shown, obtaining solid color images generated based on multiple solid color values includes step S402:
[0115] Step S402: Obtain solid color images generated based on multiple solid color values in the first color space.
[0116] Specifically, the terminal can generate a corresponding solid color image based on a solid color value in a first color space, and the generated solid color image corresponds to the first color space. For different solid colors, the terminal generates its own corresponding solid color image based on the first color space for each solid color, thus obtaining a solid color image corresponding to each solid color.
[0117] Based on the images captured under each shooting parameter, determine the shooting color value corresponding to each of the various pure color values under each shooting parameter, including steps S404-S406:
[0118] Step S404: Based on the images captured under each shooting parameter, determine the intermediate color value corresponding to each of the multiple pure color values in the second color space under each shooting parameter.
[0119] The second color space differs from the first color space. The first and second color spaces represent different color ranges. For example, the first color space is the sRGB color space, and the second color space is the Gamma color space.
[0120] The second color space is the color space used by the imaging device to display the color information of an image. In other words, the imaging device uses the second color space to display the color information of the captured image. The image generated by the imaging device is formed by the color values within the color range defined by the second color space.
[0121] Specifically, the display device supports a first color space, while the imaging device supports a second color space. The terminal displays each solid color image on the display device and, using each of the multiple imaging parameters of the imaging device, captures a separate image of each solid color image displayed on the display device to obtain corresponding captured images. Each captured image is formed based on intermediate color values in the second color space.
[0122] Based on the images captured by the camera at each shooting parameter and displayed on the screen, the terminal determines the intermediate color value corresponding to each of the various pure color values in the second color space at each shooting parameter.
[0123] Step S406: Convert each intermediate color value in the second color space to the first color space to obtain each captured color value in the first color space.
[0124] Specifically, the computer device converts each intermediate color value from the second color space to the first color space, thereby converting each captured image from the second color space to the first color space, resulting in captured color values corresponding to various pure color values in the first color space under each shooting parameter. Each captured color value forms a captured image in the second color space.
[0125] Based on the shooting color values corresponding to various pure color values under each shooting parameter, a color lookup table is generated for each shooting parameter, including step S408:
[0126] Step S408: Generate a color lookup table for each shooting parameter in the first color space based on the shooting color values corresponding to the various pure color values in the first color space under each shooting parameter.
[0127] Specifically, if multiple pure color values and their corresponding shooting color values all belong to the color values under the first color space, then a corresponding color lookup table under the first color space can be generated.
[0128] Furthermore, for multiple pure color values and their corresponding shooting color values in the first color space, the terminal can select the shooting color value that corresponds to the same shooting parameter and is associated with each of the multiple pure color values from among the multiple pure color values and their respective shooting color values. Based on the shooting color value that corresponds to the same shooting parameter and is associated with each of the multiple pure color values, a color lookup table for that shooting parameter in the first color space is generated. Following the same processing method, a color lookup table for each shooting parameter in the first color space can be obtained.
[0129] In this embodiment, pure color images generated based on multiple pure color values in a first color space are obtained. Based on the images captured under each shooting parameter, intermediate color values corresponding to the multiple pure color values in a second color space under each shooting parameter are determined. The intermediate color values in the second color space are converted to the first color space to obtain the shooting color values in the first color space. This allows for conversion to the same color space when the pure color values and the captured color values correspond to different color spaces. This enables the accurate generation of a color lookup table corresponding to each shooting parameter in the first color space based on the shooting color values corresponding to the multiple pure color values in the first color space under each shooting parameter. This avoids the problem of inaccurate correction caused by directly using color values from different color spaces for image color correction.
[0130] like Figure 5 The image shows the sRGB color space and the coordinates of standard red, green, blue and white in the sRGB color space. For example, Red (0.640, 0.330), Green (0.300, 0.600), Blue (0.150, 0.060), and White [0.3127, 0.3290 (D65)].
[0131] In one embodiment, converting intermediate color values from the second color space to the first color space to obtain captured color values in the first color space includes:
[0132] The intermediate color values in the second color space are subjected to brightness conversion to obtain brightness-converted intermediate color values; the brightness-converted intermediate color values are then subjected to color conversion to obtain the captured color values in the first color space.
[0133] Specifically, the terminal performs brightness conversion processing on each intermediate color value in the second color space to obtain each intermediate color value with linear brightness; and performs color conversion processing on each intermediate color value with linear brightness to obtain the corresponding shooting color value in the first color space.
[0134] Specifically, the brightness corresponding to each intermediate color value is of the original type, and the brightness of the original type is used for storage and data transmission. However, in actual processing, the brightness of the linear type is used for screen display, calculation processing, etc., so the terminal needs to convert the brightness of the intermediate color values from the original type to the linear type.
[0135] Primitive and linear types are two different representations of brightness. Primitive type refers to the storage format corresponding to the brightness when the image is stored, while linear type refers to the display format of the image brightness when it is displayed. Primitive type brightness refers to the value of the brightness in a certain storage format when the image is stored, such as the value corresponding to the brightness stored as an 8-bit integer. Linear type brightness refers to the actual brightness presented by the image when it is displayed.
[0136] The terminal determines the brightness corresponding to each intermediate color value and performs brightness conversion processing on each brightness to convert each brightness from the original type to the linear type, thus obtaining each intermediate color value with linear brightness.
[0137] The captured image corresponds to color information presented in the second color space. Therefore, the original color information corresponding to the pixels in the captured image is the color information in the second color space. Intermediate color values are determined based on the original color information of the pixels, and thus also correspond to the second color space. The terminal performs color conversion processing on each intermediate color value with linear brightness to convert each intermediate color value from the second color space to the first color space, obtaining the captured color value corresponding to each captured image in the first color space. This captured color value is the color information in the first color space, and the brightness of this captured color is linear.
[0138] It is understandable that color information remains unchanged during brightness conversion, and brightness does not change during color conversion.
[0139] In this embodiment, each intermediate color value is subjected to brightness conversion processing to obtain each intermediate color value with linear brightness, which can convert the brightness under the storage format into brightness that can be used for data calculation.
[0140] The intermediate color values, which are linearly oriented in brightness, undergo color conversion to transform them from the second color space to the first color space, accurately obtaining the corresponding color values for each captured image in the first color space. By first performing brightness conversion and then color converting the resulting color information, data from the second color space can be accurately mapped to the first color space.
[0141] In one embodiment, the method further includes:
[0142] For two shooting parameters of the same category, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters is generated based on the difference between the color lookup tables corresponding to the two shooting parameters.
[0143] Specifically, for two shooting parameters of the same category, the terminal can determine the color lookup table corresponding to each of the two shooting parameters, and generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the differences between the two shooting parameters and the differences between the two color lookup tables.
[0144] like Figure 6 As shown, the shooting parameter is color temperature. After generating color lookup tables (LUT1) for 1800K, LUT2 for 2800K, LUT3 for 5000K, LUT4 for 6500K, and LUT5 for 8000K, a color lookup table (LUTA) corresponding to a color temperature of 4000K (between 2800K and 5000K) can be generated based on the color temperature difference between 2800K and 5000K, and the difference between LUT2 and LUT3. Similarly, a color lookup table (LUTB) corresponding to a color temperature of 7000K (between 6500K and 8000K) can be generated based on the color temperature difference between 6500K and 8000K, and the difference between LUT4 and LUT5. By generating a new color lookup table based on the differences between the two color lookup tables, the differences between the various shooting parameters are minimized, resulting in smoother transitions between the different color lookup tables.
[0145] In this embodiment, for two shooting parameters of the same category, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be predicted and generated based on the differences between their respective color lookup tables. This reduces the amount of data required for shooting and statistical analysis of each shooting parameter of the same category, improving processing efficiency. Furthermore, it can generate color lookup tables for more shooting parameters, providing color lookup tables suitable for image color correction in various shooting scenarios.
[0146] In one embodiment, for two shooting parameters of the same category, based on the differences between the color lookup tables corresponding to the two shooting parameters, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters is generated, including:
[0147] When the difference between two shooting parameters of the same category is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters is generated based on the difference between the color lookup tables corresponding to the two shooting parameters.
[0148] Specifically, after generating a color lookup table for each shooting parameter, the terminal can determine whether there is a corresponding color lookup table for other shooting parameters between two shooting parameters of the same category. If not, it determines the difference between the two shooting parameters.
[0149] When the difference between two shooting parameters is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, the terminal can generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the difference between the two shooting parameters and the difference between the color lookup tables corresponding to the two shooting parameters.
[0150] In this embodiment, when the difference between two shooting parameters of the same category is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be accurately generated based on the difference between the color lookup tables corresponding to the two shooting parameters, so that dynamic and smooth transition can be achieved between the various color lookup tables.
[0151] In one embodiment, for two shooting parameters of the same category, based on the differences between the color lookup tables corresponding to the two shooting parameters, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters is generated, including:
[0152] For the color lookup tables corresponding to two shooting parameters of the same category, determine the difference between the shooting color values corresponding to each pure color value in the two color lookup tables; based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each pure color value in the two color lookup tables, determine the color lookup table corresponding to at least one shooting parameter that is between the two shooting parameters.
[0153] Specifically, the color lookup table includes the correspondence between the color value of each pure color and the corresponding shooting color value.
[0154] For two shooting parameters of the same category, the terminal can determine the difference between the two shooting parameters and the color lookup tables corresponding to each shooting parameter. The terminal determines the difference between the shooting color values corresponding to each pure color value in the two color lookup tables to obtain the difference between the corresponding two shooting color values in the two color lookup tables. Based on the difference between the two shooting parameters and the difference corresponding to each shooting color, the terminal determines the shooting color values corresponding to at least one shooting parameter between the two shooting parameters, thereby forming a color lookup table corresponding to the at least one shooting parameter.
[0155] In this embodiment, when the difference between two shooting parameters of the same category is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters is determined based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each pure color value in the two color lookup tables.
[0156] In this embodiment, for the color lookup tables corresponding to two shooting parameters of the same category, the difference between the shooting color values corresponding to each pure color value in the two color lookup tables is determined. Based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each pure color value in the two color lookup tables, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be accurately determined, thereby providing more types and more numbers of color lookup tables, and better adapting to various shooting scenarios.
[0157] In one embodiment, the terminal can record a color lookup table corresponding to each set of shooting parameters. Each set of shooting parameters includes at least two different categories of shooting parameters. For example... Figure 7 As shown, this displays color lookup tables corresponding to different categories of shooting parameter 1 and shooting parameter 2. The horizontal and vertical axes represent different types of shooting parameters; for example, the horizontal axis represents color temperature, and the vertical axis represents exposure time. The color temperature value on the horizontal axis and the exposure time on the vertical axis correspond to the same color lookup table, representing the color lookup table corresponding to a certain color temperature and a certain exposure time.
[0158] In one embodiment, multiple pure color values represent corresponding standard pure colors, multiple shooting parameters include at least one of aperture number, exposure time, color temperature or hue, the display device is a light-emitting diode display, the pure color values include first sub-color values in multiple color channels, and the shooting color values include second sub-color values in multiple color channels.
[0159] Specifically, standard solid colors can be white, red, orange, yellow, green, cyan, blue, purple, gray, and black, but are not limited to these. The terminal obtains the solid color value corresponding to each standard solid color. Each solid color value includes a first sub-color value in multiple color channels, such as a first sub-color value in the red channel, a first sub-color value in the green channel, and a first sub-color value in the blue channel. Based on each solid color value, a corresponding solid color image is generated, and each solid color image is displayed on a light-emitting diode (LED) display screen. The LED display screen is also known as a light-emitting diode (LED) display screen.
[0160] The terminal captures the image displayed on the display device while using a shooting device with each of a plurality of shooting parameters to display different solid color images. The plurality of shooting parameters includes at least one of aperture number, exposure time, color temperature, or hue.
[0161] Based on the images captured under each shooting parameter, determine the shooting color value corresponding to each of the various pure color values under each shooting parameter;
[0162] The terminal generates a color lookup table for each shooting parameter based on the shooting color values corresponding to various pure color values under each shooting parameter. Each shooting color value includes second sub-color values in multiple color channels, such as second sub-color values in the red channel, green channel, and blue channel. Since there is a correspondence between the pure color values and shooting color values for the same pure color, a color lookup table can be generated for each shooting parameter. This color lookup table includes the correspondence between each pure color value and its corresponding shooting color value.
[0163] In this embodiment, multiple pure color values represent corresponding standard pure colors, and multiple shooting parameters include at least one of aperture number, exposure time, color temperature, or hue. The display device is a light-emitting diode display screen. The pure color values include first sub-color values on multiple color channels, and the shooting color values include second sub-color values on multiple color channels. This allows for accurate color calibration of red, green, blue, white, and other colors composed of these colors in the image through color calibration information. This ensures that color differences caused by different devices such as terminals, LED screens, and shooting devices are precisely canceled out, thereby maintaining color consistency in the images displayed on different display devices and effectively reducing color differences caused by images displayed on different devices.
[0164] In one embodiment, such as Figure 8 As shown, an image color correction method is provided, which is applied to... Figure 1 Computer equipment (computer equipment can be) Figure 1 Taking the terminal in the middle as an example, the following steps are included:
[0165] Step S802: Display the virtual scene image as a virtual scene screen through a display device.
[0166] Virtual scene images refer to images that present virtual interactive scenes, specifically image frames from a video. Virtual scene images refer to the images displayed on a display device.
[0167] Specifically, the terminal acquires a virtual scene image and transmits it to a display device for display as a virtual scene.
[0168] Step S804: Under the target shooting parameters, take a picture of the real scene with the virtual scene screen displayed on the display device as the background to obtain the target image.
[0169] Among them, target shooting parameters refer to the parameters used by the shooting device when shooting, including at least one of aperture type, aperture number, exposure time, color temperature or hue.
[0170] Specifically, users can adjust the shooting parameters of the shooting device to achieve the desired target shooting parameters. A real scene is formed against the background of a virtual scene displayed on the display device. The shooting device then uses the target shooting parameters to capture images of this real scene against the background of the virtual scene displayed on the display device, thus obtaining the target image.
[0171] In this embodiment, the virtual scene image can be an image frame from a virtual interactive video. The terminal acquires the virtual interactive video and transmits it to a display device for playback, thereby presenting the virtual scene as a virtual scene on the display device. The shooting device uses target shooting parameters to shoot and record a real scene against the background of the virtual scene displayed on the display device, obtaining a target video. The image frames in this target video serve as the target image.
[0172] Step S806: Obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table.
[0173] Specifically, the terminal pre-generates multiple color lookup tables corresponding to different shooting parameters. The terminal can obtain the target color lookup table corresponding to the target shooting parameters. This target color lookup table includes the correspondence between each pure color value and its corresponding shooting color value. Based on the differences between each pure color value and its corresponding shooting color value in the target color lookup table, the terminal determines the target color mapping relationship under the target shooting parameters.
[0174] Step S808: Perform color correction on the target image according to the target color mapping relationship to obtain the corrected image.
[0175] Specifically, the terminal can perform color correction on the color values corresponding to each pixel of the target image through the target color mapping relationship to obtain the corrected image. For example, if the target color mapping relationship is represented by mapping coefficients, the mapping coefficients are multiplied by the color values of each pixel in the target image, and the resulting color values are used to replace the corresponding color values in the target image to obtain the corrected image.
[0176] In this embodiment, a virtual scene image is displayed as a virtual scene image through a display device. Under the target shooting parameters, a real scene is captured against the background of the virtual scene image displayed on the display device. This allows the physical objects and the virtual image to be merged into the same image, thus cleverly combining the virtual scene and the real environment to generate a fused target image. A target color lookup table corresponding to the target shooting parameters is obtained. Based on the target color lookup table, the target color mapping relationship corresponding to the target shooting parameters is accurately determined. This target color mapping relationship is related to the shooting parameters used, and the target color mapping relationship determined by combining the shooting parameters used is more accurate. The target image is color-corrected according to the target color mapping relationship to obtain a corrected image, so that the images displayed on different devices can maintain color consistency, thereby effectively reducing the color differences caused by the images displayed on different devices.
[0177] In one embodiment, under target shooting parameters, a real scene is captured against a background of a virtual scene displayed on a display device to obtain a target image, including:
[0178] Under the target shooting parameters, the real scene formed by the virtual scene displayed on the display device as the background and the physical objects as the foreground is photographed to obtain the target image.
[0179] Among them, entity objects are physical props and human figures in real-world scenes.
[0180] Specifically, the terminal presents a virtual scene through a display device and places physical objects in front of the virtual scene. The terminal then uses a camera to capture a real scene with the virtual scene displayed on the display device as the background and the physical objects as the foreground, under target shooting parameters, to obtain a target image that includes both the virtual scene and the physical objects.
[0181] like Figure 9As shown, a virtual scene is displayed on an LED screen, and physical props are placed in front of the LED screen. The characters perform in front of the LED screen with the virtual scene displayed on the display device as the background. The shooting device shoots the real scene formed by the virtual scene displayed on the display device as the background and the physical props and characters as the foreground under the target shooting parameters, and obtains a target image including the virtual scene, physical props and characters.
[0182] In this embodiment, under the target shooting parameters, the real scene formed by the virtual scene screen displayed on the display device as the background and the physical object as the foreground is captured to obtain the target image. After the physical object and the virtual screen are merged, they can coexist in the same screen and space, thereby cleverly combining virtual information and real environment.
[0183] In one embodiment, determining the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table includes:
[0184] Obtain the target format corresponding to the target image and the format corresponding to the target color lookup table; when the format of the target color lookup table is different from the target format, convert the target color lookup table to the target format, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table converted to the target format.
[0185] The color lookup table can be in the format of “.spi3d”, “.3dl”, “.clf”, “.ctf”, “.csp”, “.lut”, “.cube”, “.itx”, and “.icc”, but is not limited to these.
[0186] Specifically, after the terminal obtains the target image through the shooting device, it can determine the target format corresponding to the target image. The target format can be the data format used by the shooting device when it captures and forms the target image.
[0187] The terminal can obtain the target color lookup table corresponding to the target shooting parameters when the target image was captured by the shooting device, and determine the format of the target color lookup table. It compares the target format corresponding to the target image with the format corresponding to the target color lookup table. If the target format of the target image is different from the format of the target color lookup table, the target color lookup table is converted to the target format, resulting in a target color lookup table in the target format. Based on the target color lookup table converted to the target format, the terminal determines the target color mapping relationship corresponding to the target shooting parameters.
[0188] In this embodiment, the target color mapping relationship under the target shooting parameters is determined based on the difference between each pure color value in the target color lookup table converted to the target format and the corresponding shooting color value.
[0189] Furthermore, based on the pure color value of each solid color in the target color lookup table converted to the target format and the channel color difference of the corresponding shooting color value in each color channel, the channel mapping relationship corresponding to each color channel under the target shooting parameters is determined.
[0190] In this embodiment, when the format of the target color lookup table is the same as the target format of the target image, the target color mapping relationship corresponding to the target shooting parameters is determined based on the target color lookup table.
[0191] For example, if the shooting device uses RAW format, then the image data corresponding to the target image captured by the shooting device will be in RAW format. The terminal can obtain the target color lookup table corresponding to the target shooting parameters when the shooting device captured the target image, and determine the target format corresponding to the target color lookup table. When the format of the target color lookup table is different from the target format, it will...
[0192] In this embodiment, the target format corresponding to the target image and the format corresponding to the target color lookup table are obtained to determine whether their data formats are the same. When the format of the target color lookup table is different from the target format, the target color lookup table is converted to the target format so that the data of both belong to the same category. Therefore, based on the target color lookup table converted to the target format, the target color mapping relationship corresponding to the target shooting parameters can be accurately determined.
[0193] In one embodiment, the target shooting parameters belong to multiple shooting parameters, and each shooting parameter has a corresponding color lookup table; the color lookup tables corresponding to the multiple shooting parameters are generated according to the color lookup table generation method based on shooting parameters in the above embodiments.
[0194] Specifically, the computer device acquires solid color images generated based on various solid color values. These solid color images are used for display on a display device. The device captures the images displayed on the display device using each of the multiple shooting parameters, showing different solid color images. Based on the images captured under each shooting parameter, the computer device determines the corresponding shooting color value for each of the various solid color values under each shooting parameter. Based on the shooting color values corresponding to the various solid color values under each shooting parameter, the computer device generates a color lookup table for each shooting parameter. The color lookup table includes the correspondence between each solid color value and its corresponding shooting color value.
[0195] In this embodiment, the color lookup table generation method based on shooting parameters pre-generates the corresponding color lookup table under each shooting parameter, so that in practical applications, the corresponding target color lookup table can be quickly obtained based on the target shooting parameters used during shooting, thereby accurately and quickly calculating the target color mapping relationship based on the target color lookup table, thereby improving the speed of image color correction.
[0196] In one embodiment, determining the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table includes:
[0197] Based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value, determine the target color mapping relationship under the target shooting parameters;
[0198] The target image is color-corrected based on the target color mapping relationship to obtain the corrected image, including:
[0199] Determine the target color value corresponding to each pixel in the target image; perform color correction on each target color value according to the target color mapping relationship to obtain the corrected image.
[0200] Specifically, the target color lookup table includes the correspondence between each pure color value and its corresponding shooting color value. The terminal can calculate the difference between each pure color value and its corresponding shooting color value in the target color lookup table to obtain each difference. Based on each difference, the target color mapping relationship under the target shooting parameters is determined.
[0201] The terminal can determine each pixel in the target image and the target color value corresponding to each pixel. Based on the target color mapping relationship, the target color value of each pixel is corrected to obtain color-corrected pixels, which together form the corrected image.
[0202] In this embodiment, based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value, the target color mapping relationship under the target shooting parameters can be accurately determined. Thus, after determining the target color value corresponding to each pixel in the target image, the target color value can be accurately corrected according to the target color mapping relationship, so that the corrected image is consistent with the image displayed by the display device in terms of color, avoiding color differences caused by different devices.
[0203] In one embodiment, the target color mapping relationship includes channel mapping relationships corresponding to multiple color channels, and the target color value includes channel color values; determining the target color value corresponding to each pixel in the target image includes:
[0204] Determine the channel color value corresponding to each pixel in the target image for each color channel;
[0205] The target color values are corrected according to the target color mapping relationship to obtain the corrected image. This includes: correcting the channel color value of each pixel in the corresponding color channel based on the channel mapping relationship corresponding to multiple color channels to obtain the corrected image.
[0206] Specifically, the target color lookup table includes the correspondence between each solid color value and its corresponding shooting color value. The solid color value includes the first sub-color value in multiple color channels, and the shooting color value includes the second sub-color value in multiple color channels.
[0207] The target color mapping relationship includes channel mapping relationships corresponding to multiple color channels. For each pure color value and its corresponding shooting color value in the target color lookup table, the terminal calculates the channel color difference between the first and second sub-color values on the same color channel, obtaining the channel color difference corresponding to each color channel. Based on the channel color difference corresponding to each color channel, the channel mapping relationship for each color channel under the target shooting parameters is determined.
[0208] The terminal can determine each pixel in the target image and the target color value corresponding to each pixel. This target color value includes the channel color values corresponding to multiple color channels. Based on the channel mapping relationship corresponding to each color channel, the terminal performs color correction on the channel color value of each pixel in the corresponding color channel, obtaining color-corrected pixels. The color-corrected pixels form the corrected image.
[0209] like Figure 10 As shown, the solid color value includes the first sub-color value corresponding to each of the red channel R, green channel G, and blue channel B, and the captured color value includes the second sub-color value corresponding to each of the red channel R, green channel G, and blue channel B. The terminal calculates the channel mapping relationship corresponding to the red channel R based on the first and second sub-color values on the red channel R. It calculates the channel mapping relationship corresponding to the green channel G based on the first and second sub-color values on the green channel G. Finally, it calculates the channel mapping relationship corresponding to the blue channel B based on the first and second sub-color values on the blue channel B.
[0210] The target color value of each pixel in the target image includes its corresponding channel color value in the red channel R, green channel G, and blue channel B. The terminal performs color correction on the channel color value of each pixel in the target image in the red channel R using the channel mapping relationship corresponding to the red channel R, obtaining the corrected channel color value in the red channel R. Similarly, the terminal performs color correction on the channel color value of each pixel in the target image in the green channel G using the channel mapping relationship corresponding to the green channel G, obtaining the corrected channel color value in the green channel. Finally, the terminal performs color correction on the channel color value of each pixel in the target image in the blue channel B using the channel mapping relationship corresponding to the blue channel B, obtaining the corrected channel color value in the blue channel.
[0211] In this embodiment, the channel color value corresponding to each pixel in the target image on each color channel is determined. Based on the channel mapping relationship corresponding to multiple color channels, the channel color value of each pixel on the corresponding color channel is color corrected. This allows for more detailed and accurate correction of the color value of each pixel, resulting in a more accurate corrected image.
[0212] like Figure 11 As shown, an image color correction method is provided, including a calibration period and an application period. The method involves obtaining the user's required shooting parameters, i.e., the required LUT accuracy, the format of the 3D LUT used, and the shooting parameters to be adjusted, such as the camera's aperture number, type, shutter speed, color temperature, and hue. The method also calculates the required dimensions and the time required to generate the entire LUT system.
[0213] The required dimensions of the generated LUT = 3 + the number of shooting parameters that need to be adjusted.
[0214] Total number of 3DLUTs required = LUT precision^ Dimensions
[0215] Time required = Time required for a single color calibration * Total number of 3DLUTs required
[0216] After obtaining this data, color calibration begins, i.e., the calibration period: This involves acquiring solid color images generated based on various solid color values; these images are used for display on the display device. Using each of the multiple shooting parameters, images are captured while displaying different solid color images on the device. Based on the images captured under each shooting parameter, the corresponding shooting color values for each of the various solid color values are determined. A color lookup table is then generated for each shooting parameter based on these corresponding shooting color values. These color lookup tables for each shooting parameter are then combined into a dynamic lookup table system.
[0217] Application phase: The cameraman adjusts the image displayed on the display device, and based on the current camera status feedback, i.e. the current target shooting parameters, determines the target color lookup table, i.e. the target 3DLUT, through the target shooting parameters, and applies the target 3DLUT to the current image correction system to perform color correction on the captured target image.
[0218] In this embodiment, multiple LUTs are combined into a "dynamic" LUT within a single system, i.e., by increasing the dimensionality of the LUT, effects can be achieved to handle different situations. Furthermore, difference calculations are performed between multiple LUTs to generate even more LUTs, thus providing a "dynamic" color correction system with adjustable shooting parameters. This allows each LUT to smoothly shift to the next LUT, enabling the selection of the most suitable LUT for the current application scenario from among multiple LUTs.
[0219] Understandably, color lookup tables can be three-dimensional. When a color lookup table corresponding to one shooting parameter is generated, it becomes a four-dimensional color lookup table, or 4DLUT. When a color lookup table corresponding to two shooting parameters is generated, it becomes a five-dimensional color lookup table, or 5DLUT. And so on, 6DLUT, 7DLUT, etc., can be obtained, thus achieving the dimensionality upgrade of the LUT table.
[0220] In one embodiment, an image color correction method is provided, applied to a terminal, comprising:
[0221] Obtain solid color images generated based on multiple solid color values; these solid color images are used for display on a display device.
[0222] Capture the image displayed on the display device by using each of the multiple shooting parameters and displaying different solid color images on the display device respectively;
[0223] Based on the images captured under each shooting parameter, determine the shooting color value corresponding to each of the various pure color values under each shooting parameter;
[0224] Based on the shooting color values corresponding to various pure color values under each shooting parameter, a color lookup table is generated for each shooting parameter. The color lookup table includes the correspondence between each pure color value and the corresponding shooting color value.
[0225] When the difference between two shooting parameters of the same category is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, for the color lookup tables corresponding to the two shooting parameters of the same category, determine the difference between the shooting color values corresponding to each pure color value in the two color lookup tables;
[0226] Based on the difference between two shooting parameters and the difference between the shooting color values corresponding to each pure color value in the two color lookup tables, determine the color lookup table corresponding to at least one shooting parameter between the two shooting parameters.
[0227] Display virtual scene images as virtual scene screens through a display device;
[0228] Under the target shooting parameters, the real scene formed by the virtual scene displayed on the display device as the background and the physical objects as the foreground is photographed to obtain the target image;
[0229] Obtain the target color lookup table corresponding to the target shooting parameters, and obtain the target format corresponding to the target image and the format corresponding to the target color lookup table;
[0230] When the format of the target color lookup table is different from the target format, the target color lookup table is converted to the target format, and the target color mapping relationship corresponding to the target shooting parameters is determined based on the target color lookup table converted to the target format.
[0231] Based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value, determine the target color mapping relationship under the target shooting parameters;
[0232] Determine the channel color value corresponding to each pixel in the target image for each color channel;
[0233] Based on the channel mapping relationship corresponding to multiple color channels, the channel color value of each pixel in the corresponding color channel is color corrected to obtain the corrected image.
[0234] In this embodiment, solid color images generated based on multiple solid color values are acquired. These solid color images are used for display on a display device. The process involves capturing images displayed on the display device using each of the multiple shooting parameters while displaying different solid color images. Based on the images captured under each shooting parameter, the corresponding shooting color values for each of the multiple solid color values are determined, thus obtaining various shooting color values under different shooting parameters. According to the shooting color values corresponding to each of the multiple solid color values under each shooting parameter, a color lookup table can be generated for each shooting parameter, establishing a relationship between each shooting parameter and the color lookup table. Furthermore, combining different shooting parameters to generate their own color lookup tables increases the dimensionality of the original color lookup table, resulting in a multi-dimensional color lookup table. The multi-dimensionality refers to the multiple shooting parameters.
[0235] When the difference between two shooting parameters of the same category is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be accurately generated based on the difference between the color lookup tables corresponding to the two shooting parameters. More color lookup tables can be generated, so that dynamic and smooth transition can be achieved between the various color lookup tables.
[0236] In the application of color lookup tables, a virtual scene image is displayed on a display device. Under target shooting parameters, a real scene is photographed against the backdrop of the virtual scene displayed on the display device. This allows the physical objects and the virtual image to be merged into a single image, cleverly combining the virtual scene and the real environment to generate a fused target image. The target color lookup table corresponding to the target shooting parameters is obtained. Based on the differences between each pure color value in the target color lookup table and its corresponding shooting color value, the target color mapping relationship under the target shooting parameters can be accurately determined. This target color mapping relationship is related to the shooting parameters used; a target color mapping relationship determined by combining the used shooting parameters is more accurate.
[0237] By determining the channel color value corresponding to each pixel in the target image for each color channel, and based on the channel mapping relationship corresponding to multiple color channels, color correction is performed on the channel color value of each pixel in the corresponding color channel. This allows for more detailed and accurate correction of the color value of each pixel, resulting in a more accurate corrected image. This ensures that the colors displayed on different devices remain consistent, effectively reducing color differences caused by displaying images on different devices.
[0238] The image color correction method in this embodiment can be applied to any image color correction scenario. For example... Figure 12 As shown, a virtual scene image A is transmitted from a computer to an LED screen, so that the LED screen displays the virtual scene. Then, a camera is used to capture a real scene against the background of the virtual scene displayed on the LED screen under the target shooting parameters, resulting in a target image B.
[0239] Obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship based on the target color lookup table. Perform color correction on the target image B according to the target color mapping relationship. Figure 12 As can be seen, after color correction of the target image B, the color of the corrected image C can be kept consistent with the color of the virtual scene image A, that is, color correction can avoid color differences caused by different devices.
[0240] The image color correction method in this embodiment can be applied to an LED virtual film studio. An LED virtual film studio can perform virtual film production, and the required equipment includes a computer configured with a game engine, an LED screen, physical objects, and a camera. The camera is the shooting device. Virtual film production refers to a series of computer-aided film production and visual filmmaking methods. A game engine refers to the core components of some pre-written, editable computer game systems or interactive real-time image applications. An LED screen is a large LED screen in the virtual film production shooting location used to display virtual content generated by the game engine. Physical objects are physical objects placed in front of the LED screen, including props and characters. The camera is the camera used in virtual film production, which, under target shooting parameters, captures the real scene formed by the virtual scene displayed on the display device as the background and the physical objects as the foreground, obtaining the target image. In this embodiment, the image color correction method, when applied to an LED virtual studio scene, can output multiple pure colors such as red, green, blue, and white through a game engine in the computer, and obtain pure color images generated based on the various pure color values. These pure color images are used for display on the LED screen. The camera captures the images displayed on the LED screen using each of its multiple shooting parameters while displaying different pure color images. Based on the images captured by the camera under each shooting parameter, the corresponding shooting color values for each of the various pure color values are determined. A color lookup table is generated for each shooting parameter based on the corresponding shooting color values for each of the various pure color values. The color lookup table includes the correspondence between each pure color value and its corresponding shooting color value. It is understood that the camera used in the LED virtual studio scene processing is a camera.
[0241] After obtaining the various color lookup tables, the computer outputs the game scene images generated by the game engine and displays them as game scene images on an LED screen.
[0242] The camera captures a real scene with the game scene displayed on the LED screen as the background and physical objects as the foreground under the target shooting parameters, and obtains the target image.
[0243] Obtain the target color lookup table corresponding to the target's shooting parameters. Based on the difference between each pure color value in the target color lookup table and its corresponding shooting color value, determine the target color mapping relationship under the target shooting parameters. The target color mapping relationship includes the channel mapping relationships corresponding to multiple color channels.
[0244] The channel color value corresponding to each pixel in the target image is determined for each color channel. Based on the channel mapping relationship corresponding to multiple color channels, the channel color value of each pixel in the corresponding color channel is color corrected to obtain the corrected image.
[0245] Understandably, when multiple frames of game scene images generated by the game engine exist, the above steps can be followed to obtain the target image corresponding to each frame of the game scene image. The entity objects corresponding to the virtual scene images in each frame of the game scene image can be different, and can be set according to requirements.
[0246] The camera can export each frame of the target image to the computer for color correction, and then fuse the corrected images to generate the target game video.
[0247] In this embodiment, virtual production is an area where the real and digital worlds blend. It combines virtual reality and augmented reality with computer-generated imagery (CGI) and game engine technology, allowing production staff to see scenes unfold before them as if these scenes were actually composited and filmed on location. On the shooting set of the virtual production scene, LED screens are used to display virtual content, and actual props are placed in front of the LED screens. Characters perform against the backdrop of the content displayed on the LED screens. Cameras in the virtual production scene simultaneously capture the blended images of the LED screens and the physical objects, thereby generating videos that combine virtual and reality, such as game videos or film / television videos.
[0248] Traditional virtual production scenarios fail to consider the differences in color gamut between game scene images generated by computer game engines, game scene images displayed on screens, and content displayed on screens captured by cameras. In other words, they fail to consider the differences in color gamut caused by the differences in color spaces used by different devices, resulting in severe color distortion in the final generated images or videos.
[0249] In this embodiment, images generated by the game engine using various pure colors such as red, green, blue, and white are displayed on the LED screen. Corresponding images are captured by a camera under different shooting parameters, thus obtaining their respective shooting color values. Based on the shooting color values corresponding to red, green, blue, and white in the first color space, a color lookup table is formed for each shooting parameter.
[0250] Under the target shooting parameters, the camera captures a real scene formed by the virtual scene displayed on the LED screen as the background and the physical objects as the foreground, obtaining the target image. Through color mapping, the target image is color-corrected in real time and quickly, ensuring that the camera's captured image and the input image on the LED screen (which is the image generated by the game engine) are consistent in color. This effectively cancels out the color differences caused by different devices such as the computer game engine, the LED screen, and the on-site camera, resulting in a higher quality target game video.
[0251] In other embodiments, the application scenario can also be the shooting of film and television videos through an LED virtual studio, displaying special effects animations on an LED screen. A camera is used to record a realistic scene with the special effects animations displayed on the LED screen as the background and human figures as the foreground, under target shooting parameters, to obtain the target film and television video. Color correction is performed on each frame of the target image in the target film and television video using color mapping relationships, resulting in corrected images for each frame. These corrected images are then fused together to form the corrected film and television video.
[0252] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0253] Based on the same inventive concept, this application also provides a color lookup table generation apparatus based on shooting parameters for implementing the aforementioned color lookup table generation method based on shooting parameters. The solution provided by this apparatus is similar to the implementation described in the above method. Therefore, the specific limitations of one or more embodiments of the color lookup table generation apparatus based on shooting parameters provided below can be found in the limitations of the color lookup table generation method based on shooting parameters described above, and will not be repeated here.
[0254] In one embodiment, such as Figure 13 As shown, a color lookup table generation device 1300 based on shooting parameters is provided, including: an acquisition module 1302, an image capture module 1304, a color determination module 1306, and a generation module 1308, wherein:
[0255] The acquisition module 1302 is used to acquire solid color images generated based on multiple solid color values; the solid color images are used for display on a display device;
[0256] The image capture module 1304 is used to capture the image displayed on the display device when displaying different solid color images on the display device using each of the multiple capture parameters.
[0257] The color determination module 1306 is used to determine the shooting color value corresponding to each of the various pure color values under each shooting parameter based on the image captured under each shooting parameter.
[0258] The generation module 1308 is used to generate a color lookup table for each shooting parameter based on the shooting color values corresponding to various pure color values under each shooting parameter. The color lookup table includes the correspondence between each pure color value and the corresponding shooting color value. The color lookup table is used to perform color correction on the target image captured using the corresponding shooting parameters.
[0259] In this embodiment, solid color images generated based on multiple solid color values are acquired. These solid color images are used for display on a display device. The process involves capturing images displayed on the display device using each of the multiple shooting parameters while displaying different solid color images. Based on the images captured under each shooting parameter, the corresponding shooting color values for each of the multiple solid color values under each shooting parameter are determined, thus obtaining various shooting color values under different shooting parameters. According to the shooting color values corresponding to each of the multiple solid color values under each shooting parameter, a color lookup table can be generated for each shooting parameter, establishing a relationship between each shooting parameter and the color lookup table. This color lookup table includes the correspondence between each solid color value and its corresponding shooting color value. The color lookup table is used for color correction of the target image captured using the corresponding shooting parameters, enabling more accurate correction of the target image captured by the corresponding shooting parameters. This effectively reduces color differences caused by different devices displaying the same image, ensuring color consistency across different devices.
[0260] In one embodiment, the acquisition module 1302 is further configured to acquire solid color images generated based on multiple solid color values in a first color space;
[0261] The color determination module 1306 is also used to determine, based on the images captured under each shooting parameter, the intermediate color values corresponding to the various pure color values in the second color space under each shooting parameter; and to convert each intermediate color value in the second color space to the first color space to obtain each shooting color value in the first color space.
[0262] The generation module 1308 is also used to generate a color lookup table corresponding to each shooting parameter in the first color space based on the shooting color value corresponding to each of the multiple pure color values in the first color space under each shooting parameter.
[0263] In this embodiment, pure color images generated based on multiple pure color values in a first color space are obtained. Based on the images captured under each shooting parameter, intermediate color values corresponding to the multiple pure color values in a second color space under each shooting parameter are determined. The intermediate color values in the second color space are converted to the first color space to obtain the shooting color values in the first color space. This allows for conversion to the same color space when the pure color values and the captured color values correspond to different color spaces. This enables the accurate generation of a color lookup table corresponding to each shooting parameter in the first color space based on the shooting color values corresponding to the multiple pure color values in the first color space under each shooting parameter. This avoids the problem of inaccurate correction caused by directly using color values from different color spaces for image color correction.
[0264] In one embodiment, the color determination module 1306 is further configured to perform brightness conversion processing on each intermediate color value in the second color space to obtain brightness-converted intermediate color values; and perform color conversion processing on each brightness-converted intermediate color value to obtain each captured color value in the first color space.
[0265] In this embodiment, each intermediate color value is subjected to brightness conversion processing to obtain each intermediate color value with linear brightness, which can convert the brightness under the storage format into brightness that can be used for data calculation.
[0266] The intermediate color values, which are linearly oriented in brightness, undergo color conversion to transform them from the second color space to the first color space, accurately obtaining the corresponding color values for each captured image in the first color space. By first performing brightness conversion and then color converting the resulting color information, data from the second color space can be accurately mapped to the first color space.
[0267] In one embodiment, the generation module 1308 is further configured to generate a color lookup table corresponding to at least one shooting parameter between two shooting parameters of the same category, based on the difference between the color lookup tables corresponding to the two shooting parameters respectively.
[0268] In this embodiment, for two shooting parameters of the same category, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be predicted and generated based on the differences between their respective color lookup tables. This reduces the amount of data required for shooting and statistical analysis of each shooting parameter of the same category, improving processing efficiency. Furthermore, it can generate color lookup tables for more shooting parameters, providing color lookup tables suitable for image color correction in various shooting scenarios.
[0269] In one embodiment, the generation module 1308 is further configured to generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the difference between the color lookup tables corresponding to the two shooting parameters when the difference between two shooting parameters of the same category is greater than a preset threshold and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters.
[0270] In this embodiment, when the difference between two shooting parameters of the same category is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be accurately generated based on the difference between the color lookup tables corresponding to the two shooting parameters, so that dynamic and smooth transition can be achieved between the various color lookup tables.
[0271] In one embodiment, the generation module 1308 is further configured to, for the color lookup tables corresponding to two shooting parameters of the same category, determine the difference between the shooting color values corresponding to each pure color value in the two color lookup tables; and, based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each pure color value in the two color lookup tables, determine the color lookup table corresponding to at least one shooting parameter between the two shooting parameters.
[0272] In this embodiment, for the color lookup tables corresponding to two shooting parameters of the same category, the difference between the shooting color values corresponding to each pure color value in the two color lookup tables is determined. Based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each pure color value in the two color lookup tables, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be accurately determined, thereby providing more types and more numbers of color lookup tables, and better adapting to various shooting scenarios.
[0273] In one embodiment, multiple pure color values represent corresponding standard pure colors, multiple shooting parameters include at least one of aperture number, exposure time, color temperature or hue, the display device is a light-emitting diode display, the pure color values include first sub-color values in multiple color channels, and the shooting color values include second sub-color values in multiple color channels.
[0274] In this embodiment, multiple pure color values represent corresponding standard pure colors, and multiple shooting parameters include at least one of aperture number, exposure time, color temperature, or hue. The display device is a light-emitting diode display screen. The pure color values include first sub-color values on multiple color channels, and the shooting color values include second sub-color values on multiple color channels. This allows for accurate color calibration of red, green, blue, white, and other colors composed of these colors in the image through color calibration information. This ensures that color differences caused by different devices such as terminals, LED screens, and cameras are precisely canceled out, thereby maintaining color consistency in the images displayed on different display devices and effectively reducing color differences caused by images displayed on different devices.
[0275] Based on the same inventive concept, this application also provides an image color correction apparatus for implementing the image color correction method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more image color correction apparatus embodiments provided below can be found in the limitations of the image color correction method described above, and will not be repeated here.
[0276] In one embodiment, such as Figure 14 As shown, an image color correction device 1400 is provided, including: a display module 1402, a scene shooting module 1404, a relationship determination module 1406, and a correction module 1408, wherein:
[0277] Display module 1402 is used to display virtual scene images as virtual scene screens through a display device;
[0278] The scene shooting module 1404 is used to shoot a real scene against a background of a virtual scene displayed on a display device under target shooting parameters to obtain a target image;
[0279] The relationship determination module 1406 is used to obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table.
[0280] The correction module 1408 is used to perform color correction on the target image according to the target color mapping relationship to obtain the corrected image.
[0281] In this embodiment, a virtual scene image is displayed as a virtual scene image through a display device. Under the target shooting parameters, a real scene is captured against the background of the virtual scene image displayed on the display device. This allows the physical objects and the virtual image to be merged into the same image, thus cleverly combining the virtual scene and the real environment to generate a fused target image. A target color lookup table corresponding to the target shooting parameters is obtained. Based on the target color lookup table, the target color mapping relationship corresponding to the target shooting parameters is accurately determined. This target color mapping relationship is related to the shooting parameters used, and the target color mapping relationship determined by combining the shooting parameters used is more accurate. The target image is color-corrected according to the target color mapping relationship to obtain a corrected image, so that the images displayed on different devices can maintain color consistency, thereby effectively reducing the color differences caused by the images displayed on different devices.
[0282] In one embodiment, the scene shooting module 1404 is further configured to shoot a real scene formed by a virtual scene image displayed on a display device as the background and a physical object as the foreground under target shooting parameters, thereby obtaining a target image.
[0283] In this embodiment, under the target shooting parameters, the real scene formed by the virtual scene screen displayed on the display device as the background and the physical object as the foreground is captured to obtain the target image. After the physical object and the virtual screen are merged, they can coexist in the same screen and space, thereby cleverly combining virtual information and real environment.
[0284] In one embodiment, the relationship determination module 1406 is further configured to obtain the target format corresponding to the target image and the format corresponding to the target color lookup table; when the format of the target color lookup table is different from the target format, the target color lookup table is converted to the target format, and the target color mapping relationship corresponding to the target shooting parameters is determined based on the target color lookup table converted to the target format.
[0285] In this embodiment, the target format corresponding to the target image and the format corresponding to the target color lookup table are obtained to determine whether their data formats are the same. When the format of the target color lookup table is different from the target format, the target color lookup table is converted to the target format so that the data of both belong to the same category. Therefore, based on the target color lookup table converted to the target format, the target color mapping relationship corresponding to the target shooting parameters can be accurately determined.
[0286] In one embodiment, the target shooting parameters belong to multiple shooting parameters, and each shooting parameter has a corresponding color lookup table; the color lookup tables corresponding to the multiple shooting parameters are generated according to the aforementioned color lookup table generation devices based on the shooting parameters.
[0287] In this embodiment, a color lookup table corresponding to each shooting parameter is pre-generated according to the color lookup table generation method based on shooting parameters. This allows the target color lookup table to be quickly obtained based on the target shooting parameters used during shooting in practical applications. As a result, the target color mapping relationship can be calculated accurately and quickly based on the target color lookup table, thereby improving the speed of image color correction.
[0288] In one embodiment, the relationship determination module 1406 is further configured to determine the target color mapping relationship under the target shooting parameters based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value.
[0289] The correction module 1408 is also used to determine the target color value corresponding to each pixel in the target image; and to perform color correction on each target color value according to the target color mapping relationship to obtain the corrected image.
[0290] In this embodiment, based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value, the target color mapping relationship under the target shooting parameters can be accurately determined. Thus, after determining the target color value corresponding to each pixel in the target image, the target color value can be accurately corrected according to the target color mapping relationship, so that the corrected image is consistent with the image displayed by the display device in terms of color, avoiding color differences caused by different devices.
[0291] In one embodiment, the correction module 1408 is further configured to determine the channel color value corresponding to each pixel in the target image in each color channel; and to perform color correction on the channel color value of each pixel in the corresponding color channel based on the channel mapping relationship corresponding to multiple color channels, so as to obtain the corrected image.
[0292] In this embodiment, the channel color value corresponding to each pixel in the target image on each color channel is determined. Based on the channel mapping relationship corresponding to multiple color channels, the channel color value of each pixel on the corresponding color channel is color corrected. This allows for more detailed and accurate correction of the color value of each pixel, resulting in a more accurate corrected image.
[0293] The modules in the aforementioned color lookup table generation device and image color correction device based on shooting parameters can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0294] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 15 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a color lookup table generation method based on shooting parameters and an image color correction method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0295] Those skilled in the art will understand that Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0296] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0297] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0298] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0299] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0300] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0301] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0302] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for generating a color lookup table based on shooting parameters, characterized in that, The method includes: A solid color image is generated from multiple solid color values based on the sRGB color space; the solid color image is used for display on a display device, and the sRGB color space is the color space used by the display device. The image displayed on the display device is captured using each of a plurality of shooting parameter combinations of the shooting device while displaying different pure color images on the display device; each shooting parameter combination includes exposure time and color temperature; Based on the images captured under each of the aforementioned shooting parameter combinations, an intermediate color value corresponding to each of the various pure color values in the Gamma color space is determined for each of the aforementioned shooting parameter combinations; the Gamma color space is the color space used by the shooting device, and the intermediate color value is obtained by the shooting device capturing the images displayed on the display device. The intermediate color values in the Gamma color space are subjected to brightness conversion processing to convert them from the original type to the linear type, resulting in intermediate color values with linear brightness type; the original type brightness is used for storage and data transmission, and the linear type brightness is used for screen display; The intermediate color values of the linear type are converted to obtain the captured color values in the sRGB color space. Based on the shooting color values corresponding to the various pure color values in the sRGB color space under each shooting parameter combination, a color lookup table is generated for each shooting parameter combination in the sRGB color space. The color lookup table includes the correspondence between each pure color value and the corresponding shooting color value. When a target image is obtained by shooting with the corresponding shooting parameter combination, the color lookup table is used to determine the color mapping coefficient corresponding to the shooting parameter combination used, based on each pure color value in the color lookup table and the corresponding shooting color value, and to multiply the color mapping coefficient by the color value of each pixel in the target image to obtain the color-corrected image.
2. The method according to claim 1, characterized in that, The method further includes: For two shooting parameters of the same category, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters is generated based on the difference between the color lookup tables corresponding to the two shooting parameters.
3. The method according to claim 2, characterized in that, For two shooting parameters of the same category, generating a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the difference between their respective color lookup tables includes: When the difference between two shooting parameters of the same category is greater than a preset threshold, and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters is generated based on the difference between the color lookup tables corresponding to the two shooting parameters.
4. The method according to claim 2, characterized in that, For two shooting parameters of the same category, generating a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the difference between their respective color lookup tables includes: For the color lookup tables corresponding to two shooting parameters of the same category, determine the difference between the shooting color values corresponding to each pure color value in the two color lookup tables; Based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each of the pure color values in the two color lookup tables, determine the color lookup table corresponding to at least one shooting parameter that is between the two shooting parameters.
5. The method according to any one of claims 1 to 4, characterized in that, The multiple pure color values represent corresponding standard pure colors, the display device is a light-emitting diode display screen, the pure color values include first sub-color values on multiple color channels, and the captured color values include second sub-color values on multiple color channels.
6. An image color correction method, characterized in that, The method includes: Display virtual scene images as virtual scene screens through a display device; Under the target shooting parameters, a real scene with the virtual scene displayed on the display device as the background is captured to obtain a target image; Obtain the target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table; the target color lookup table is generated by the color lookup table generation method based on shooting parameters according to any one of claims 1-5; The target image is color-corrected according to the target color mapping relationship to obtain the corrected image.
7. The method according to claim 6, characterized in that, The step of capturing a real scene against the background of the virtual scene displayed on the display device under the target shooting parameters to obtain a target image includes: Under the target shooting parameters, a real scene is captured with the virtual scene displayed on the display device as the background and the physical objects as the foreground, to obtain the target image.
8. The method according to claim 6, characterized in that, Determining the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table includes: Obtain the target format corresponding to the target image and the format corresponding to the target color lookup table; When the format of the target color lookup table is different from the target format, the target color lookup table is converted to the target format, and the target color mapping relationship corresponding to the target shooting parameters is determined based on the target color lookup table converted to the target format.
9. The method according to claim 6, characterized in that, The target shooting parameters are a plurality of shooting parameters, and each shooting parameter has a corresponding color lookup table.
10. The method according to claim 9, characterized in that, Determining the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table includes: Based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value, the target color mapping relationship under the target shooting parameters is determined. The step of performing color correction on the target image according to the target color mapping relationship to obtain the corrected image includes: Determine the target color value corresponding to each pixel in the target image; The target color values are corrected according to the target color mapping relationship to obtain the corrected image.
11. The method according to claim 10, characterized in that, The target color mapping relationship includes channel mapping relationships corresponding to multiple color channels, and the target color value includes channel color values; determining the target color value corresponding to each pixel in the target image includes: Determine the channel color value corresponding to each pixel in the target image for each color channel; The step of performing color correction on each of the target color values according to the target color mapping relationship to obtain the corrected image includes: Based on the channel mapping relationship corresponding to the various color channels, the channel color value of each pixel in the corresponding color channel is color corrected to obtain the corrected image.
12. A color lookup table generation device based on shooting parameters, characterized in that, The device includes: The acquisition module is used to acquire solid color images generated from various solid color values based on the sRGB color space; the solid color images are used for display on a display device, and the sRGB color space is the color space used by the display device. The image capture module is used to capture the image displayed on the display device while displaying different pure color images using each of a plurality of shooting parameter combinations of the shooting device; each shooting parameter combination includes exposure time and color temperature; The color determination module is used to determine, based on the images captured under each combination of shooting parameters, the intermediate color values corresponding to the various pure color values in the Gamma color space for each combination of shooting parameters; the Gamma color space is the color space used by the shooting device, and the intermediate color values are obtained by the shooting device capturing the images displayed on the display device; the module performs brightness conversion processing on each of the intermediate color values in the Gamma color space to convert each of the intermediate color values from its original type to a linear type, resulting in intermediate color values with a linear brightness type; the original brightness type is used for storage and data transmission, and the linear brightness type is used for image display; the module then performs color conversion processing on each of the linear intermediate color values to obtain the captured color values in the sRGB color space. The generation module is used to generate a color lookup table corresponding to each shooting parameter combination in the sRGB color space based on the shooting color values corresponding to the various pure color values in the sRGB color space under each shooting parameter combination. The color lookup table includes the correspondence between each pure color value and the corresponding shooting color value. When a target image is obtained by shooting with the corresponding shooting parameter combination, the color lookup table is used to determine the color mapping coefficient corresponding to the shooting parameter combination used, based on each pure color value and the corresponding shooting color value in the color lookup table, and to multiply the color mapping coefficient by the color value of each pixel in the target image to obtain a color-corrected image.
13. The apparatus according to claim 12, characterized in that, The generation module is further configured to, for two shooting parameters of the same category, generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters based on the difference between the color lookup tables corresponding to the two shooting parameters.
14. The apparatus according to claim 13, characterized in that, The generation module is further configured to generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters when the difference between two shooting parameters of the same category is greater than a preset threshold and there is no corresponding color lookup table for the shooting parameter between the two shooting parameters, based on the difference between the color lookup tables corresponding to the two shooting parameters.
15. The apparatus according to claim 13, characterized in that, The generation module is also used to determine the difference between the shooting color values corresponding to each pure color value in the two color lookup tables corresponding to the two shooting parameters of the same category. Based on the difference between the two shooting parameters and the difference between the shooting color values corresponding to each of the pure color values in the two color lookup tables, determine the color lookup table corresponding to at least one shooting parameter that is between the two shooting parameters.
16. The apparatus according to any one of claims 12 to 15, characterized in that, The multiple pure color values represent corresponding standard pure colors, the display device is a light-emitting diode display screen, the pure color values include first sub-color values on multiple color channels, and the captured color values include second sub-color values on multiple color channels.
17. An image color correction device, characterized in that, The device includes: The display module is used to display virtual scene images as virtual scene screens through a display device; The scene shooting module is used to shoot a real scene against the background of the virtual scene displayed on the display device under the target shooting parameters, so as to obtain a target image; The relationship determination module is used to obtain a target color lookup table corresponding to the target shooting parameters, and determine the target color mapping relationship corresponding to the target shooting parameters based on the target color lookup table; the target color lookup table is generated by the color lookup table generation device based on shooting parameters according to any one of claims 12-16; The correction module is used to perform color correction on the target image according to the target color mapping relationship to obtain the corrected image.
18. The apparatus according to claim 17, characterized in that, The scene shooting module is also used to shoot a real scene formed by the virtual scene displayed on the display device as the background and the physical object as the foreground under the target shooting parameters, so as to obtain a target image.
19. The apparatus according to claim 17, characterized in that, The relationship determination module is further configured to obtain the target format corresponding to the target image and the format corresponding to the target color lookup table; when the format of the target color lookup table is different from the target format, the target color lookup table is converted to the target format, and the target color mapping relationship corresponding to the target shooting parameters is determined based on the target color lookup table converted to the target format.
20. The apparatus according to claim 17, characterized in that, The target shooting parameters are a plurality of shooting parameters, and each shooting parameter has a corresponding color lookup table.
21. The apparatus according to claim 20, characterized in that, The relationship determination module is also used to determine the target color mapping relationship under the target shooting parameters based on the difference between each pure color value in the target color lookup table and the corresponding shooting color value. The correction module is further configured to determine the target color value corresponding to each pixel in the target image; and to perform color correction on each target color value according to the target color mapping relationship to obtain the corrected image.
22. The apparatus according to claim 21, characterized in that, The target color mapping relationship includes channel mapping relationships corresponding to multiple color channels, and the target color value includes channel color values; the correction module is further used to determine the channel color value corresponding to each pixel in the target image on each color channel; based on the channel mapping relationships corresponding to the multiple color channels, color correction is performed on the channel color value of each pixel on the corresponding color channel to obtain the corrected image.
23. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
24. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.