CN116489328A - Shooting parameter-based color lookup table generation method and device and computer equipment - Google Patents

Shooting parameter-based color lookup table generation method and device and computer equipment Download PDF

Info

Publication number
CN116489328A
CN116489328A CN202211463439.9A CN202211463439A CN116489328A CN 116489328 A CN116489328 A CN 116489328A CN 202211463439 A CN202211463439 A CN 202211463439A CN 116489328 A CN116489328 A CN 116489328A
Authority
CN
China
Prior art keywords
color
shooting
target
lookup table
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211463439.9A
Other languages
Chinese (zh)
Inventor
余倞璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211463439.9A priority Critical patent/CN116489328A/en
Publication of CN116489328A publication Critical patent/CN116489328A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Of Color Television Signals (AREA)
  • Image Processing (AREA)

Abstract

A color lookup table generation method based on shooting parameters comprises the following steps: acquiring solid-color images respectively generated based on a plurality of solid-color values to be displayed on a display device; taking a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in the plurality of shooting parameters; determining photographing color values corresponding to the plurality of pure color values respectively under each photographing parameter based on the pictures photographed under each photographing parameter; generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to various pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters. The color lookup table generated by the method can more accurately correct the color of the image.

Description

Shooting parameter-based color lookup table generation method and device and computer equipment
Technical Field
The present invention relates to the field of computer technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for generating a color lookup table based on shooting parameters, and an image color correction method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
With the development of computer technology, photographing apparatuses for photographing and display apparatuses for displaying information are widely used in various fields. For example, an image is displayed by a display device, and the image displayed by the display device is photographed using a photographing device, and the resulting image data is used for color calibration to reduce color differences when different devices use the same image.
However, there is also a certain difference in color of the photographed image when the photographing apparatus uses different parameters, and even after color calibration is performed using the photographed image data and the image data displayed by the display apparatus, there is still a problem in that the color calibration is not accurate enough.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a photographing parameter-based color lookup table generation method, apparatus, computer device, computer readable storage medium, and computer program product that are capable of generating a more accurate color lookup table, and an image color correction method, apparatus, computer device, computer readable storage medium, and computer program product that are capable of effectively correcting the color of a photographed image.
The application provides a color lookup table generation method based on shooting parameters, which comprises the following steps:
acquiring solid-color images respectively generated based on a plurality of solid-color values; the solid image is for display on a display device;
taking a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in a plurality of shooting parameters;
determining shooting color values corresponding to the plurality of pure color values respectively under each shooting parameter based on the picture shot under each shooting parameter;
generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
The application also provides a device for generating a color lookup table based on shooting parameters, which comprises:
the acquisition module is used for acquiring the solid-color images respectively generated based on the plurality of solid-color values; the solid image is for display on a display device;
A picture shooting module, configured to take a picture displayed by the display device when different solid-color images are respectively displayed on the display device, using each of a plurality of shooting parameters;
the color determining module is used for determining shooting color values corresponding to the plurality of pure color values respectively under each shooting parameter based on the picture shot under each shooting parameter;
the generation module is used for generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
In one embodiment, the acquiring module is further configured to acquire solid images respectively generated based on a plurality of solid color values in the first color space;
the color determining module is further configured to determine, based on the pictures captured under each of the capturing parameters, intermediate color values corresponding to the plurality of solid color values in a second color space under each of the capturing parameters; converting each intermediate color value of the second color space into the first color space to obtain each shooting color value in the first color space;
The generating module is further configured to generate a corresponding color lookup table of each shooting parameter in the first color space according to shooting color values corresponding to the multiple solid color values in the first color space under each shooting parameter.
In one embodiment, the color determining module is further configured to perform a luminance conversion process on each of the intermediate color values in the second color space to obtain a luminance converted intermediate color value; and performing color conversion processing on the intermediate color values after the brightness conversion to obtain shooting color values in the first color space.
In one embodiment, the generating module is further configured to generate, for two shooting parameters of the same class, a color lookup table corresponding to at least one shooting parameter located between the two shooting parameters according to a difference between color lookup tables corresponding to the two shooting parameters.
In one embodiment, the generating module is further configured to generate, when a difference between two shooting parameters of the same class is greater than a preset threshold and a corresponding color lookup table does not exist in the shooting parameters between the two shooting parameters, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to a difference between color lookup tables corresponding to the two shooting parameters.
In one embodiment, the generating module is further configured to determine, for a color lookup table corresponding to each of the two photographing parameters of the same class, a difference value between photographing color values corresponding to each of the solid color values in the two color lookup tables; and determining a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference value between the two shooting parameters and the difference value between the shooting color values corresponding to each pure color value in the two color lookup tables.
In one embodiment, the plurality of solid color values characterizes a respective standard solid color, the plurality of capture parameters includes at least one of f-number, exposure time, color temperature, or hue, the display device is a light emitting diode display, the solid color values include first sub-color values on a plurality of color channels, and the capture color values include second sub-color values on the plurality of color channels.
The application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
Acquiring solid-color images respectively generated based on a plurality of solid-color values; the solid image is for display on a display device;
taking a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in a plurality of shooting parameters;
determining shooting color values corresponding to the plurality of pure color values respectively under each shooting parameter based on the picture shot under each shooting parameter;
generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring solid-color images respectively generated based on a plurality of solid-color values; the solid image is for display on a display device;
Taking a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in a plurality of shooting parameters;
determining shooting color values corresponding to the plurality of pure color values respectively under each shooting parameter based on the picture shot under each shooting parameter;
generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
acquiring solid-color images respectively generated based on a plurality of solid-color values; the solid image is for display on a display device;
taking a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in a plurality of shooting parameters;
Determining shooting color values corresponding to the plurality of pure color values respectively under each shooting parameter based on the picture shot under each shooting parameter;
generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
The color lookup table generating method, apparatus, computer device, storage medium and computer program product based on shooting parameters described above, by acquiring solid-color images respectively generated based on a plurality of solid-color values, the solid-color images being for display on a display device to take a picture displayed by the display device when respectively displaying different solid-color images on the display device using each of the plurality of shooting parameters. Based on the pictures photographed under each photographing parameter, photographing color values corresponding to the respective plurality of solid color values under each photographing parameter are determined, thereby obtaining the respective photographing color values under different photographing parameters. According to shooting color values corresponding to various pure color values under each shooting parameter, a color lookup table corresponding to each shooting parameter can be generated, so that association between each shooting parameter and the color lookup table is established, and the generated color lookup table is more accurate. The color lookup table comprises the corresponding relation between each pure color value and the corresponding shooting color value, and is used for correcting the color of the target image shot by adopting the corresponding shooting parameters, so that the target image shot by the corresponding shooting parameters can be corrected more accurately, the color difference caused by the display pictures of different equipment can be effectively reduced, and the pictures displayed by the different equipment are kept consistent in color.
The application provides an image color correction method, which comprises the following steps:
displaying the virtual scene image as a virtual scene picture through a display device;
shooting a real scene taking the virtual scene picture displayed by the display equipment as a background under a target shooting parameter to obtain a target image;
acquiring a target color lookup table corresponding to the target shooting parameters, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table;
and carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image.
The application also provides an image color correction device, the device comprising:
the display module is used for displaying the virtual scene image into a virtual scene picture through the display equipment;
the scene shooting module is used for shooting a real scene taking the virtual scene picture displayed by the display equipment as a background under the target shooting parameters to obtain a target image;
the relation determining module is used for acquiring a target color lookup table corresponding to the target shooting parameter and determining a target color mapping relation corresponding to the target shooting parameter based on the target color lookup table;
And the correction module is used for carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image.
In an embodiment, the scene shooting module is further configured to shoot, under a target shooting parameter, a real scene formed by taking the virtual scene picture displayed by the display device as a background and taking the entity object as a foreground, so as to obtain a target image.
In one embodiment, the relationship determining module is further configured to obtain a target format corresponding to the target image and a format corresponding to the target color lookup table; and when the format of the target color lookup table is different from the target format, converting the target color lookup table into the target format, and determining a target color mapping relation corresponding to the target shooting parameter based on the target color lookup table converted into the target format.
In one embodiment, the target shooting parameters belong to a plurality of shooting parameters, and each shooting parameter has a corresponding color lookup table; the color lookup tables corresponding to the shooting parameters are generated according to the shooting parameter-based color lookup table generation method.
In one embodiment, the relationship determination module is further configured to determine a corresponding target color mapping relationship under the target shooting parameter based on a difference between each solid color value and a corresponding shooting color value in the target color lookup table;
the correction module is further used for determining target color values corresponding to all pixel points in the target image respectively; and carrying out color correction on each target color value according to the target color mapping relation to obtain a corrected image.
In one embodiment, the correction module is further configured to determine a channel color value corresponding to each pixel point in the target image on each color channel; and carrying out color correction on the channel color value of each pixel point on the corresponding color channel based on the channel mapping relation respectively corresponding to the plurality of color channels so as to obtain a corrected image.
The application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
displaying the virtual scene image as a virtual scene picture through a display device;
Shooting a real scene taking the virtual scene picture displayed by the display equipment as a background under a target shooting parameter to obtain a target image;
acquiring a target color lookup table corresponding to the target shooting parameters, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table;
and carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
displaying the virtual scene image as a virtual scene picture through a display device;
shooting a real scene taking the virtual scene picture displayed by the display equipment as a background under a target shooting parameter to obtain a target image;
acquiring a target color lookup table corresponding to the target shooting parameters, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table;
and carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
displaying the virtual scene image as a virtual scene picture through a display device;
shooting a real scene taking the virtual scene picture displayed by the display equipment as a background under a target shooting parameter to obtain a target image;
acquiring a target color lookup table corresponding to the target shooting parameters, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table;
and carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image.
According to the image color correction method, the device, the computer equipment, the storage medium and the computer program product, the virtual scene image is displayed as the virtual scene picture through the display equipment, the real scene taking the virtual scene picture displayed by the display equipment as the background is shot under the target shooting parameters, so that the entity object and the virtual picture can be fused into the same picture, the virtual scene and the real environment can be combined ingeniously, and the fused target image is generated. The target color lookup table corresponding to the target shooting parameters is obtained, the target color mapping relation corresponding to the target shooting parameters is accurately determined based on the target color lookup table, the target color mapping relation is related to the used shooting parameters, and the target color mapping relation determined by combining the used shooting parameters is more accurate. And carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image, so that the colors of pictures displayed by different equipment can be kept consistent, and the color difference caused by the pictures displayed by different equipment can be effectively reduced.
Drawings
FIG. 1 is an application environment diagram of a method for generating a color lookup table based on shooting parameters in one embodiment;
FIG. 2 is a flowchart of a method for generating a color lookup table based on shooting parameters in one embodiment;
FIG. 3 is a schematic diagram of partial data of a color lookup table in one embodiment;
FIG. 4 is a flow chart of generating a corresponding color lookup table for each shooting parameter in a first color space according to one embodiment;
FIG. 5 is a schematic diagram of an sRGB color space in one embodiment;
FIG. 6 is a diagram of a color lookup table corresponding to different color temperatures in an embodiment;
FIG. 7 is a schematic diagram showing color lookup tables corresponding to different categories of shooting parameters 1 and 2 according to an embodiment;
FIG. 8 is a flow chart of an image color correction method according to one embodiment;
FIG. 9 is an interface schematic diagram of capturing a real scene formed by taking a virtual scene image displayed by a display device as a background and taking a physical object as a foreground in one embodiment;
FIG. 10 is a schematic diagram of color correction of channel color values by a channel mapping relationship in one embodiment;
FIG. 11 is a flowchart of an image color correction method according to another embodiment;
FIG. 12 is a schematic diagram of images before and after color correction in one embodiment;
FIG. 13 is a block diagram showing a configuration of a color lookup table generating apparatus based on photographing parameters in one embodiment;
FIG. 14 is a block diagram showing the structure of an image color correction device in one embodiment;
fig. 15 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The embodiments of the present application may be applied to various scenarios including, but not limited to, cloud technology, artificial intelligence, intelligent transportation, assisted driving, and the like. For example, it is applicable to the field of artificial intelligence (Artificial Intelligence, AI) technology, where artificial intelligence is a theory, method, technique, and application system that simulates, extends, and extends human intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge, and uses the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision. The scheme provided by the embodiment of the application relates to an artificial intelligence color lookup table generation method based on shooting parameters, and specifically is explained through the following embodiments.
The color lookup table generation method based on shooting parameters, which is provided by the embodiment of the application, can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on the cloud or other servers. The terminal 102 and the server 104 may each independently perform the photographing parameter-based color lookup table generation method provided in the embodiments of the present application. The terminal 102 and the server 104 may also cooperate to perform the shooting parameter-based color lookup table generation method provided in the embodiments of the present application. When the terminal 102 and the server 104 cooperate to execute the color lookup table generation method based on shooting parameters provided in the embodiment of the present application, the terminal 102 acquires a solid-color image generated based on a plurality of solid-color values, respectively; the solid image is for display on a display device. And shooting a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in the plurality of shooting parameters. Based on the pictures photographed under each photographing parameter, photographing color values corresponding to the respective plurality of solid color values under each photographing parameter are determined. The server 104 generates a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to various pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters. The terminal 102 may be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be display devices, smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms, and the like.
It should be noted that the numbers of "plural" and the like mentioned in the embodiments of the present application each refer to the number of "at least two".
In one embodiment, as shown in fig. 2, a method for generating a color lookup table based on shooting parameters is provided, and the method is applied to the computer device in fig. 1 (the computer device may be the terminal in fig. 1) for illustration, and includes the following steps:
step S202, obtaining solid color images respectively generated based on a plurality of solid color values; the solid image is for display on a display device.
Wherein, the solid color value refers to a color value used for forming a solid color. The solid color means a single color, and the solid color may be, but is not limited to, white, red, orange, yellow, green, cyan, blue, violet, gray, black, and the like. The solid color may be a standard solid color in a defined color space.
The plurality of solid color values correspond to the same color space, i.e. color values belonging to a color range defined by the same color space. Color is the different perception of light of different frequencies by the human eye. The color space is also called "gamut" and refers to a range of areas of color composition that a certain color rendering mode can express. In colorimetry, a certain color is represented by one-dimensional, two-dimensional, three-dimensional or even four-dimensional space coordinates by establishing various color models, and the color range or color space can be defined by the coordinate system. A color space such as RGB (Red Green Blue) color space, sRGB (Standard Red Green Blue) color space, CMYK color space, lab color space, gamma (Gamma) color space, and the like, but is not limited thereto. The color models used in the different devices may not be the same, and the different devices are displayed as respective pictures through the respective color spaces used. The picture is an avatar presented in the device, such as a picture taken by the terminal, a picture presented by the display device. A solid image is an image formed of solid color values in a color range defined by a color space.
A display device is a device that can output images and may also be referred to as a display, or as a display screen, etc.
Specifically, the terminal may generate a corresponding solid-color image based on solid-color values of each solid-color in the same color space, so as to obtain solid-color images corresponding to each solid-color respectively, so as to obtain a plurality of solid-color images. The generated solid image is for display on a display device.
In step S204, a picture displayed by the display device is photographed when different solid-color images are respectively displayed on the display device using each of the plurality of photographing parameters.
The shooting parameters refer to parameters of a camera for image shooting, and include at least one of aperture type, f-number, exposure time, color temperature or tone. The aperture is a component for controlling the light quantity of light transmitted through the lens and entering the photosensitive surface in the body, and the aperture is used for determining the light quantity of the lens. The aperture size is denoted by F number and is denoted as F. The aperture is not equal to the F-number, but the size of the aperture is inversely proportional to the size of the F-number, which is also known as F-number. If the lens with a large aperture is used, the F number is small, and the aperture number is small; the F-number of the lens with small aperture is large. The exposure time refers to the length of time for which the shutter is to be opened, by projecting light onto the photosensitive surface of the photographic photosensitive material.
Color temperature, i.e., the temperature of the color, refers to the temperature of the light source of the photographing environment. The unit of measure of the color temperature is "K" (Kelvin). Hue refers to which color the overall tendency of colors in an image is biased to, such as cool hue, warm hue.
The plurality of photographing parameters may refer to photographing parameters of different categories, or may refer to different parameter values under the same category. For example, a color temperature of 1800K and a color temperature of 2000K belong to two different shooting parameters under the same category.
Specifically, the terminal respectively displays each solid-color image through the display device, and respectively shoots each solid-color image displayed by the display device through each shooting parameter in a plurality of shooting parameters of the shooting device, so as to obtain corresponding shooting images.
In this embodiment, when the display device displays a solid-color image, the photographing device may respectively use each photographing parameter to photograph the picture presented when the display device displays the solid-color image, so as to obtain a photographed image formed by photographing the same picture presented by the display device under different photographing parameters. The same processing is performed on each solid-color image, and a photographed image formed by photographing a screen presented when the display device displays each solid-color image under each photographing parameter can be obtained.
In this embodiment, the display device may display multiple solid-color images in a traversing manner, and the same photographing parameters of the photographing device may be used to photograph the picture presented by each solid-color image displayed in the traversing manner by the display device, so as to obtain the photographed image corresponding to each solid-color image under the same photographing parameters. And traversing each shooting parameter of the shooting equipment in the same way to obtain shooting images corresponding to each solid-color image under each shooting parameter.
In step S206, based on the frames photographed under each photographing parameter, photographing color values corresponding to the plurality of solid color values under each photographing parameter are determined.
The shooting color value refers to a color value obtained by shooting a picture presented by a display device by a shooting device and used for forming a shooting image. The plurality of photographic color values correspond to the same color space, i.e. color values belonging to a color range defined by the same color space.
Specifically, the terminal determines, based on the picture photographed under each photographing parameter of the photographing apparatus, photographing color values corresponding to the respective plurality of solid color values under each photographing parameter.
Step S208, generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to various pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
The color Lookup table, i.e., LUT, is called a "look up table" as a color conversion method. The color lookup table is used for recording shooting color values corresponding to various pure color values, and can also record the corresponding relation between each pure color value and the corresponding shooting color value. For example, a correspondence between red and a photographic color value corresponding to red may be recorded.
Specifically, the terminal may select, from among the photographing color values corresponding to the plurality of solid color values under each photographing parameter, the photographing color value corresponding to the same photographing parameter and corresponding to the plurality of solid color values. And generating a color lookup table corresponding to the shooting parameters according to the shooting color values corresponding to the same shooting parameters and corresponding to the various pure color values. For example, when the color temperature is 1800K, a shooting color value corresponding to each solid color value is selected, and the selected shooting color value and each solid color value are recorded in a color lookup table according to a corresponding relation, so as to obtain a color lookup table corresponding to the color temperature of 1800K.
FIG. 3 is a schematic diagram of a portion of data of a color lookup table in one embodiment. In fig. 3, shooting color values corresponding to 13 solid colors are shown, "0.000808728,0,0.0106966" represents shooting color values corresponding to 1 st color, "0.00236515,0,0.00926223" represents shooting color values corresponding to 2 nd color, and so on. It will be appreciated that a greater variety of solid colors and corresponding photographic color values may also be included in the color lookup table.
In other embodiments, the color lookup table may record a solid color value of each solid color and a photographed color value corresponding to each solid color.
According to the same processing mode, a color lookup table corresponding to each shooting parameter can be obtained. The color lookup table is used for carrying out color correction on a target image shot by adopting corresponding shooting parameters to obtain a corrected image.
In this embodiment, solid-color images respectively generated based on a plurality of solid-color values are acquired and used for display on a display device, so that a picture displayed by the display device is photographed when different solid-color images are respectively displayed on the display device using each of a plurality of photographing parameters. Based on the pictures photographed under each photographing parameter, photographing color values corresponding to the respective plurality of solid color values under each photographing parameter are determined, thereby obtaining the respective photographing color values under different photographing parameters. According to shooting color values corresponding to the various pure color values under each shooting parameter, a color lookup table corresponding to each shooting parameter can be generated, so that association between each shooting parameter and the color lookup table is established. The color lookup table comprises the corresponding relation between each pure color value and the corresponding shooting color value, and is used for correcting the color of the target image shot by adopting the corresponding shooting parameters, so that the target image shot by the corresponding shooting parameters can be corrected more accurately, the color difference caused by the display pictures of different equipment can be effectively reduced, and the pictures displayed by the different equipment are kept consistent in color.
In this embodiment, the respective color lookup tables are generated by combining different shooting parameters, so that the dimensions of the color lookup tables can be improved on the basis of the original color lookup tables, and a multi-dimensional color lookup table is obtained. The multi-dimension is a plurality of shooting parameters.
In one embodiment, as shown in fig. 4, acquiring a solid image respectively generated based on a plurality of solid color values includes step S402:
in step S402, a solid image respectively generated based on a plurality of solid color values of the first color space is acquired.
Specifically, the terminal may generate a corresponding solid image based on one solid color value of the first color space, and the generated solid image corresponds to the first color space. For different solid colors, the terminal generates respective corresponding solid color images for each solid color based on the first color space, and obtains respective corresponding solid color images for each solid color.
Based on the picture photographed under each photographing parameter, a photographing color value corresponding to each of the plurality of solid color values under each photographing parameter is determined, including steps S404 to S406:
in step S404, based on the picture photographed under each photographing parameter, an intermediate color value corresponding to each of the plurality of pure color values in the second color space under each photographing parameter is determined.
Wherein the second color space is different from the first color space. The first color space and the second color space represent different color ranges, respectively. For example, the first color space is an sRGB color space, and the second color space is a Gamma color space.
The second color space is a color space used when the photographing apparatus presents color information of a picture, i.e., the photographing apparatus presents color information of a photographed picture through the second color space. The photographing apparatus photographs a generated photographed image, which is an image formed by each color value within a color range defined by the second color space.
Specifically, the color space supported by the display device is a first color space, and the color space supported by the photographing device is a second color space. The terminal respectively displays each solid-color image through the display device, and respectively shoots each solid-color image displayed by the display device through each shooting parameter in a plurality of shooting parameters of the shooting device, so as to obtain corresponding shooting images. Each captured image is formed based on the intermediate color values of the second color space.
The terminal determines intermediate color values corresponding to the plurality of pure color values in the second color space respectively under each photographing parameter based on a picture presented by a display device photographed by the photographing device under each photographing parameter.
Step S406, converting each intermediate color value of the second color space into the first color space, to obtain each photographing color value in the first color space.
Specifically, the computer device converts each intermediate color value from the second color space to the first color space, so as to convert each photographed image from the second color space to the first color space, and obtain photographed color values corresponding to the plurality of pure color values in the first color space under each photographing parameter. Each of the captured color values forms a captured image in the second color space.
According to the shooting color values corresponding to the multiple pure color values under each shooting parameter, a color lookup table corresponding to each shooting parameter is generated, including step S408:
in step S408, a corresponding color lookup table of each photographing parameter in the first color space is generated according to the photographing color values corresponding to the plurality of solid color values in the first color space.
Specifically, if the plurality of pure color values and the corresponding photographed color values belong to the color values in the first color space, a corresponding color lookup table in the first color space may be generated.
Further, for a plurality of solid color values and corresponding shooting color values in the first color space, the terminal may select shooting color values corresponding to the same shooting parameters and corresponding to the plurality of solid color values from the plurality of solid color values and corresponding shooting color values. And generating a corresponding color lookup table of the shooting parameters under the first color space according to shooting color values corresponding to the same shooting parameters and corresponding to the plurality of pure color values. According to the same processing mode, a corresponding color lookup table of each shooting parameter under the first color space can be obtained.
In this embodiment, a solid-color image generated based on a plurality of solid-color values in a first color space is obtained, based on a picture photographed under each photographing parameter, an intermediate color value corresponding to the plurality of solid-color values in a second color space under each photographing parameter is determined, each intermediate color value in the second color space is converted into the first color space, and each photographing color value in the first color space is obtained, so that when the solid-color value and the photographed color value correspond to different color spaces, the same color space can be converted first, so that a corresponding color lookup table of each photographing parameter under the first color space can be accurately generated according to the photographing color value corresponding to each of the plurality of solid-color values in the first color space under each photographing parameter, and the problem of inaccurate correction caused by direct use of different color values in the color space for image color correction is avoided.
As shown in fig. 5, the sRGB color space and the coordinates corresponding to the standard red, green, blue, and white in the sRGB color space are respectively shown. Such as Red (0.640,0.330), green (0.300,0.600), blue (0.150,0.060), white [0.3127,0.3290 (D65) ].
In one embodiment, converting each intermediate color value of the second color space to the first color space to obtain each photographic color value in the first color space comprises:
performing brightness conversion processing on each intermediate color value of the second color space to obtain a brightness converted intermediate color value; and performing color conversion processing on the intermediate color values after the brightness conversion to obtain shooting color values in a first color space.
Specifically, the terminal performs brightness conversion processing on each intermediate color value of the second color space to obtain each intermediate color value with linear brightness; and performing color conversion processing on each intermediate color value with linear brightness to obtain shooting color values corresponding to the first color space.
Specifically, the brightness corresponding to each intermediate color value is an original type, and the brightness of the original type is used for storage and data transmission. Whereas in the actual processing, the luminance of the linear type is used for picture display, participation in the calculation processing, and the like, the terminal needs to convert the luminance of the intermediate color value from the original type to the linear type.
The original type and the linear type are two different expression forms of brightness, the original type can be a storage format corresponding to the brightness when the picture is stored, and the linear type can be a display format of the brightness when the picture is displayed. The original type of brightness refers to a value corresponding to brightness in a certain storage format when the picture is stored, for example, brightness is stored as a corresponding value in an 8-bit integer format. The linear type of brightness refers to the actual brightness exhibited by the picture when displayed.
And the terminal determines the brightness corresponding to each intermediate color value respectively, and performs brightness conversion processing on each brightness so as to convert each brightness from an original type to a linear type and obtain each intermediate color value with the brightness of the linear type.
And the shooting picture corresponds to the second color space to present color information, and the original color information corresponding to the pixel points of the shooting picture is the color information in the second color space. The intermediate color value is determined based on the original color information of the pixel point, and then the intermediate color value also corresponds to the second color space. And the terminal performs color conversion processing on each intermediate color value with the linear brightness so as to convert each intermediate color value from the second color space to the first color space, and obtains shooting color values respectively corresponding to each shooting picture in the first color space. The photographing color value is color information in a first color space, and the brightness of the photographing color is of a linear type.
It can be appreciated that the color information is unchanged when the brightness conversion is performed; the brightness does not change when the color conversion is performed.
In this embodiment, the luminance conversion process is performed on each intermediate color value to obtain each intermediate color value with a linear type luminance, so that the luminance in the storage format can be converted into a luminance that can be used for data calculation.
And performing color conversion processing on each intermediate color value with linear brightness so as to convert each intermediate color value from the second color space to the first color space, and accurately obtaining shooting color values corresponding to each shooting picture in the first color space. By performing the luminance conversion first and performing the color conversion on the color information after the luminance conversion, the data in the second color space can be accurately mapped to the first color space.
In one embodiment, the method further comprises:
and 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 according to the difference between the color lookup tables corresponding to the two shooting parameters.
Specifically, for two shooting parameters of the same category, the terminal may determine color lookup tables corresponding to the two shooting parameters respectively, and generate a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to a difference between the two shooting parameters and a difference between the two color lookup tables.
As shown in fig. 6, the shooting parameters are color temperatures, and after generating color look-up tables LUT1 and LUT2 corresponding to color look-up tables LUT1 and LUT 2800K corresponding to color temperatures 1800K, LUT3 corresponding to color look-up tables LUT 5000K, LUT4 corresponding to color look-up tables LUT 6500K, LUT5 corresponding to color temperatures 8000K, a color look-up table LUTA corresponding to color temperatures 4000K between 2800K and 5000K can be generated according to the color temperature difference between 2800K and 5000K and the difference between the color look-up tables LUT2 and LUT 3. According to the color temperature difference between 6500K and 8000K and the difference between the color lookup table LUT4 and the color lookup table LUT5, a color lookup table LUTB corresponding to the color temperature 7000K between 6500K and 8000K is generated. Based on the difference between the two color lookup tables, a new color lookup table is generated so that the difference between the respective photographing parameters is not too large, and the transition between the respective color lookup tables is smoother.
In this embodiment, for two shooting parameters of the same class, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters may be predicted and generated according to the difference between the color lookup tables corresponding to the two shooting parameters, so that the amount of data for shooting and counting each shooting parameter of the same class may be reduced, and the processing efficiency may be improved. Further, a color lookup table corresponding to more photographing parameters can be generated, and a color lookup table suitable for performing image color correction in various photographing scenes can be provided.
In one embodiment, 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 according to a difference between color lookup tables corresponding to the two shooting parameters, includes:
when the difference value between two shooting parameters of the same category is larger than a preset threshold value and the shooting parameters between the two shooting parameters do not have corresponding color lookup tables, generating a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference between the color lookup tables corresponding to the two shooting parameters.
Specifically, after generating the color lookup table respectively corresponding to each photographing parameter, the terminal may determine whether other photographing parameters between two photographing parameters in the same category have the corresponding color lookup table, and if not, determine the difference between the two photographing parameters.
When the difference between the two shooting parameters is greater than the preset threshold, and the shooting parameters between the two shooting parameters do not have the corresponding color lookup tables, the terminal can generate the color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference between the two shooting parameters and the difference between the color lookup tables corresponding to the two shooting parameters.
In this embodiment, when the difference between two shooting parameters of the same class is greater than a preset threshold, and the shooting parameters between the two shooting parameters do not have corresponding color lookup tables, according to the difference between the color lookup tables corresponding to the two shooting parameters, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be accurately generated, so that dynamic smooth transition between the color lookup tables can be realized.
In one embodiment, 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 according to a difference between color lookup tables corresponding to the two shooting parameters, includes:
for the color lookup tables corresponding to the two shooting parameters of the same class, determining the difference value between shooting color values corresponding to each pure color value in the two color lookup tables; and determining a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference value between the two shooting parameters and the difference value between the shooting color values corresponding to each pure color value in the two color lookup tables.
Specifically, the color lookup table includes a correspondence between each solid color value and a corresponding photographed color value.
For two photographing parameters of the same category, the terminal may determine a difference between the two photographing parameters, and a color lookup table to which the two photographing parameters respectively correspond. The terminal determines a difference between the photographed color values corresponding to each of the pure color values in the two color lookup tables to obtain a difference between the corresponding two photographed color values in the two color lookup tables. And the terminal determines each shooting color value corresponding to at least one shooting parameter between the two shooting parameters according to the difference value between the two shooting parameters and the difference value corresponding to each shooting color, thereby forming a color lookup table corresponding to the at least one shooting parameter.
In this embodiment, when the difference between two photographing parameters of the same class is greater than a preset threshold, and the photographing parameter between the two photographing parameters does not have a corresponding color lookup table, determining a color lookup table corresponding to at least one photographing parameter between the two photographing parameters according to the difference between the two photographing parameters and the difference between the photographing color values corresponding to each pure color value in the two color lookup tables.
In this embodiment, for the color lookup tables corresponding to the two photographing parameters of the same class, the difference between the photographing color values corresponding to each of the pure color values in the two color lookup tables is determined, and according to the difference between the two photographing parameters and the difference between the photographing color values corresponding to each of the pure color values in the two color lookup tables, the color lookup table corresponding to at least one photographing parameter located between the two photographing parameters can be accurately determined, so that more kinds and more numbers of color lookup tables can be provided, and various photographing scenes can be adapted.
In one embodiment, the terminal may record a color lookup table corresponding to each group of photographing parameters. Each group of shooting parameters comprises at least two different categories of shooting parameters. As shown in fig. 7, color lookup tables corresponding to photographing parameters 1 and photographing parameters 2 of different categories are displayed. The horizontal axis and the vertical axis represent different kinds of photographing 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, and represent the color lookup table corresponding to a certain color temperature value and a certain exposure time.
In one embodiment, the plurality of solid color values characterize a respective standard solid color, the plurality of capture parameters includes at least one of f-number, exposure time, color temperature, or hue, the display device is a light emitting diode display, the solid color values include first sub-color values over the plurality of color channels, and the capture color values include second sub-color values over the plurality of color channels.
Specifically, the standard solid color may be white, red, orange, yellow, green, cyan, blue, violet, gray, black, etc., but is not limited thereto. The terminal obtains a respective corresponding solid color value for each standard solid color, each solid color value including a first sub-color value on a plurality of color channels, such as a first sub-color value on a red color channel, a first sub-color value on a green color channel, and a first sub-color value on a blue color channel. And respectively generating a corresponding solid-color image based on each solid-color value, and respectively displaying each solid-color image on the light-emitting diode display screen. The LED display screen is the LED display screen.
The terminal shoots a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in a plurality of shooting parameters by the shooting device. The plurality of photographing parameters includes at least one of f-number, exposure time, color temperature, or hue.
Determining photographing color values corresponding to the plurality of pure color values respectively under each photographing parameter based on the pictures photographed under each photographing parameter;
the terminal obtains a plurality of color channels, and the plurality of color channels are respectively corresponding to the plurality of solid color values according to the plurality of color channels. And if the corresponding relationship exists between the pure color value and the shooting color value of the same pure color, generating a color lookup table corresponding to each shooting parameter, wherein the color lookup table comprises the corresponding relationship between each pure color value and the corresponding shooting color value.
In this embodiment, the plurality of solid color values represent corresponding standard solid colors, the plurality of shooting parameters include at least one of f-number, exposure time, color temperature or hue, the display device is a light emitting diode display screen, the solid color values include first sub-color values on the plurality of color channels, and the shooting color values include second sub-color values on the plurality of color channels, so that red, green, blue and white in a picture and other colors formed by the plurality of colors can be accurately calibrated through color calibration information, color differences caused by different devices such as a terminal, an LED screen and shooting devices are exactly offset, so that pictures displayed by different display devices are kept consistent in color, and color differences caused by pictures displayed by different devices can be effectively reduced.
In one embodiment, as shown in fig. 8, an image color correction method is provided, which is described by taking as an example that the method is applied to the computer device in fig. 1 (the computer device may be the terminal in fig. 1), and includes the following steps:
in step S802, the virtual scene image is displayed as a virtual scene screen through the display device.
The virtual scene image refers to an image presenting a virtual interaction scene, and specifically may be an image frame in a video. A virtual scene picture refers to a picture presented by a display device displaying a virtual scene image.
Specifically, the terminal acquires a virtual scene image, and transmits the virtual scene image to the display device to be displayed as a virtual scene picture through the display device.
In step S804, under the target shooting parameters, a real scene with the virtual scene picture displayed by the display device as a background is shot to obtain a target image.
The target shooting parameters refer to parameters used when shooting is performed by the shooting device, and include at least one of aperture type, aperture number, exposure time, color temperature, or hue.
Specifically, the user can adjust the photographing parameters of the photographing apparatus to adjust to the target photographing parameters required by the user. And forming a real scene by taking the virtual scene picture displayed by the display device as a background, and shooting the real scene by taking the virtual scene picture displayed by the display device as the background by using target shooting parameters by the shooting device to obtain a target image.
In this embodiment, the virtual scene image may be an image frame in the virtual interactive video, and the terminal acquires the virtual interactive video and transmits the virtual interactive video to the display device, so as to play the virtual interactive video through the display device, thereby presenting the virtual scene image on the display device. The shooting device shoots and records a real scene taking a virtual scene picture displayed by the display device as a background by adopting target shooting parameters to obtain a target video, wherein an image frame in the target video is taken as a target image.
Step S806, a target color lookup table corresponding to the target shooting parameters is obtained, and a target color mapping relation corresponding to the target shooting parameters is determined based on the target color lookup table.
Specifically, the terminal generates color lookup tables corresponding to a plurality of shooting parameters in advance. The terminal may obtain a target color lookup table corresponding to the target shooting parameter, where the target color lookup table includes a correspondence between each solid color value and a corresponding shooting color value. The terminal determines a corresponding target color mapping relationship under the target shooting parameters based on differences between each solid color value and the corresponding shooting color value in the target color lookup table.
Step S808, performing color correction on the target image according to the target color mapping relation to obtain a corrected image.
Specifically, the terminal may perform color correction on color values corresponding to each pixel point of the target image through the target color mapping relationship, so as to obtain a corrected image. For example, the mapping relation of the target color is represented by a mapping coefficient, the mapping coefficient and the color value of each pixel point of the target image are multiplied respectively, and the color value obtained after multiplication is used for replacing the corresponding color value in the target image, so that the corrected image is obtained.
In this embodiment, the virtual scene image is displayed as a virtual scene picture through the display device, and the real scene with the virtual scene picture displayed by the display device as the background is shot under the target shooting parameter, so that the entity object and the virtual picture can be fused into the same picture, and the virtual scene and the real environment can be combined skillfully to generate the fused target image. The target color lookup table corresponding to the target shooting parameters is obtained, the target color mapping relation corresponding to the target shooting parameters is accurately determined based on the target color lookup table, the target color mapping relation is related to the used shooting parameters, and the target color mapping relation determined by combining the used shooting parameters is more accurate. And carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image, so that the colors of pictures displayed by different equipment can be kept consistent, and the color difference caused by the pictures displayed by different equipment can be effectively reduced.
In one embodiment, shooting a real scene with a virtual scene picture displayed by a display device as a background under a target shooting parameter to obtain a target image includes:
and shooting a real scene formed by taking a virtual scene picture displayed by the display equipment as a background and taking a physical object as a foreground under the target shooting parameters to obtain a target image.
Wherein the entity object is an entity prop, a character object and the like in the real scene.
Specifically, the terminal presents a virtual scene picture through the display device, and places a physical object in front of the virtual scene picture presented by the display device. And capturing and shooting a real scene formed by taking a virtual scene picture displayed by the display device as a background and taking an entity object as a foreground by the terminal under the target shooting parameters through the shooting device to obtain a target image comprising the virtual scene picture and the entity object.
As shown in fig. 9, a virtual scene picture is displayed through an LED screen, an entity prop is placed in front of the LED screen, a character object performs in front of the LED screen with the virtual scene picture displayed by a display device as a background, and a shooting device shoots a real scene formed by taking the virtual scene picture displayed by the display device as a background and taking the entity prop and the character object as a foreground under a target shooting parameter, so as to obtain a target image including the virtual scene picture, the entity prop and the character object.
In this embodiment, under the target shooting parameters, a real scene formed by taking a virtual scene picture displayed by a display device as a background and taking an entity object as a foreground is shot to obtain a target image, and after the entity object and the virtual picture are fused, the virtual scene picture and the entity object can coexist in the same picture and space, so that virtual information and the real environment can be combined skillfully.
In one embodiment, determining the target color mapping relationship corresponding to the target shooting parameter based on the target color lookup table includes:
acquiring a target format corresponding to a target image and a format corresponding to a target color lookup table; when the format of the target color lookup table is different from the target format, converting the target color lookup table into the target format, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table converted into the target format.
The format of the color lookup table may be ". Spi3d", ".3dl", ". Clf", ". Ctf", ". Csp", ". Lut", ". Cube", ". Itx", ". Icc", etc., but is not limited thereto.
Specifically, after the terminal obtains the target image through the photographing device, the terminal may determine a target format corresponding to the target image, where the target format may be a data format used when the photographing device photographs and forms the target image.
The terminal may acquire a target color lookup table corresponding to a target shooting parameter when the shooting device shoots the target image, and determine a format corresponding to the target color lookup table. And comparing the target format corresponding to the target image with the format corresponding to the target color lookup table, and converting the target color lookup table into the target format when the target format corresponding to the target image is different from the format corresponding to the target color lookup table, so as to obtain the target color lookup table in the target format. And the terminal determines a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table converted into the target format.
In this embodiment, the corresponding target color mapping relationship under the target shooting parameters is determined based on the difference between each solid color value and the corresponding shooting color value in the target color lookup table converted into the target format.
Further, based on each solid color value in the target color lookup table converted into the target format and the channel color difference value of the corresponding shooting color value on each color channel, the channel mapping relation corresponding to each color channel under the target shooting parameters is determined.
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 parameter is determined based on the target color lookup table.
For example, if the data format used by the photographing apparatus is a RAW format, the image data corresponding to the target image obtained by photographing by the photographing apparatus is a RAW format. The terminal can acquire a target color lookup table corresponding to a target shooting parameter when the shooting device shoots the target image, and determine a target 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 will
In this embodiment, a target format corresponding to the target image and a format corresponding to the target color lookup table are obtained to determine whether the data formats of the target image and the target color lookup table 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 into the target format, so that the data of the target color lookup table and the target color lookup table belong to the same data, and the target color mapping relation corresponding to the target shooting parameters can be accurately determined based on the target color lookup table converted into the target format.
In one embodiment, the target shooting parameters belong to a plurality of shooting parameters, and each shooting parameter has a corresponding color lookup table; the color lookup table corresponding to each of the plurality of photographing parameters is generated according to the photographing parameter-based color lookup table generation method in the above-described respective embodiments.
Specifically, the computer device acquires solid color images respectively generated based on a plurality of solid color values; the solid-color image is used for being displayed on the display device, and each shooting parameter in the plurality of shooting parameters is adopted to shoot a picture displayed by the display device when different solid-color images are respectively displayed on the display device. The computer device determines a photographing color value corresponding to each of the plurality of solid color values under each photographing parameter based on the picture photographed under each photographing parameter. The computer equipment generates a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to various pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value.
In this embodiment, the color lookup table generating method based on the shooting parameters generates the corresponding color lookup table under each shooting parameter in advance, so that the corresponding target color lookup table can be quickly obtained based on the target shooting parameters used during shooting in practical application, and the target color mapping relationship can be accurately, quickly and accurately calculated based on the target color lookup table, thereby improving the speed of image color correction.
In one embodiment, determining the target color mapping relationship corresponding to the target shooting parameter based on the target color lookup table includes:
determining a corresponding target color mapping relationship under the target shooting parameters based on the difference between each solid color value and the corresponding shooting color value in the target color lookup table;
performing color correction on the target image according to the target color mapping relation to obtain a corrected image, including:
determining target color values corresponding to all pixel points in a target image respectively; and carrying out color correction on each target color value according to the target color mapping relation to obtain a corrected image.
Specifically, the target color lookup table includes a correspondence between each solid color value and a corresponding photographed color value. The terminal may calculate the difference between each of the pure color values and the corresponding photographed color value in the target color lookup table to obtain each difference. And determining a corresponding target color mapping relation under the target shooting parameters according to the difference values.
The terminal may determine each pixel in the target image, and a target color value corresponding to each pixel. And respectively carrying out color correction on the target color value of each pixel point according to the target color mapping relation to obtain each pixel point after the color correction, wherein each pixel point after the color correction forms a corrected image.
In this embodiment, based on the difference between each solid color value and the corresponding shooting color value in the target color lookup table, the corresponding target color mapping relation under the target shooting parameters can be accurately determined, so that after the target color values corresponding to the pixel points in the target image are determined, the color correction can be accurately performed on the target color values according to the target color mapping relation, so that the corrected image and the image displayed by the display device keep consistent in color, and the color difference caused by different devices is avoided.
In one embodiment, the target color mapping relationship includes channel mapping relationships corresponding to the plurality of color channels, respectively, and the target color value includes a channel color value; determining a target color value corresponding to each pixel point in the target image, including:
determining channel color values corresponding to each pixel point in the target image on each color channel respectively;
performing color correction on each target color value according to the target color mapping relation to obtain a corrected image, wherein the method comprises the following steps: and carrying out color correction on the channel color value of each pixel point on the corresponding color channel based on the channel mapping relation respectively corresponding to the plurality of color channels so as to obtain a corrected image.
Specifically, the target color lookup table includes a correspondence between each solid color value and a corresponding photographed color value. The solid color values include first sub-color values on the plurality of color channels and the capture color values include second sub-color values on the plurality of color channels.
The target color mapping relationship comprises channel mapping relationships corresponding to the color channels respectively. For each solid color value and the corresponding shooting color value in the target color lookup table, the terminal calculates the channel color difference value between the first sub-color value and the second sub-color value on the same color channel to obtain the channel color difference value respectively corresponding to each color channel. And determining the channel mapping relation corresponding to each color channel under the target shooting parameters according to the channel color difference value corresponding to each color channel.
The terminal may determine each pixel point in the target image, and a target color value corresponding to each pixel point, where the target color value includes channel color values corresponding to multiple color channels. And the terminal performs color correction on the channel color value of each pixel point on the corresponding color channel according to the channel mapping relation corresponding to each color channel, so as to obtain each pixel point after the color correction, and each pixel point after the color correction forms a corrected image.
As shown in fig. 10, the solid color values include first sub-color values respectively corresponding to the red, green, and blue color channels R, G, and B, and the photographed color values include second sub-color values respectively corresponding to the red, green, and blue color channels R, G, and B. And the terminal calculates a channel mapping relation corresponding to the red channel R according to the first sub-color value and the second sub-color value on the red channel R. And calculating a channel mapping relation corresponding to the green channel G according to the first sub-color value and the second sub-color value on the green channel G. And calculating a channel mapping relation corresponding to the blue channel B according to the first sub-color value and the second sub-color value on the blue channel B.
The target color value for each pixel in the target image includes the respective corresponding channel color values on red channel R, green channel G, and blue channel B. And the terminal performs color correction on the channel color value of each pixel point of the target image on the red channel R through the channel mapping relation corresponding to the red channel R to obtain the corrected channel color value on the red channel R. And the terminal performs color correction on the channel color value of each pixel point of the target image on the green channel G through the channel mapping relation corresponding to the green channel G, so as to obtain the channel color value corrected on the green channel. And the terminal performs color correction on the channel color value of each pixel point of the target image on the blue channel B through the channel mapping relation corresponding to the blue channel B, and obtains the corrected channel color value on the blue channel.
In this embodiment, the channel color values of each pixel point in the target image corresponding to each color channel are determined, so that the color correction is performed on the channel color values of each pixel point on the corresponding color channel based on the channel mapping relations corresponding to the color channels, and the color values of each pixel point can be corrected more carefully and accurately, so that a more accurate corrected image is obtained.
As shown in fig. 11, there is provided an image color correction method including a color correction period and an application period. The shooting parameters required by the user, that is, the LUT accuracy required by the user, the format of the 3D LUT used, and the shooting parameters to be adjusted, such as the f-number, type, exposure time of the shutter, color temperature, hue, and the like of the camera, are acquired. The required dimensions are calculated and the time required to generate the entire LUT system:
dimension of LUT to be generated=3+number of shooting parameters to be adjusted
Required 3DLUT total = LUT accuracy ≡dimension
Time required = time required for a single color correction × total number of 3 DLUTs required
After obtaining these data, the color correction work is started, namely, the color correction period is entered: acquiring solid-color images respectively generated based on a plurality of solid-color values; the solid-color image is used for being displayed on the display device, each shooting parameter in a plurality of shooting parameters is adopted, pictures displayed by the display device are shot when different solid-color images are respectively displayed on the display device, shooting color values corresponding to the plurality of solid-color values under each shooting parameter are determined based on the pictures shot under each shooting parameter, and a color lookup table corresponding to each shooting parameter is generated according to the shooting color values corresponding to the plurality of solid-color values under each shooting parameter. And forming a dynamic lookup table system by using the color lookup tables corresponding to the shooting parameters.
Application period: the photographer adjusts the picture displayed on the display device, determines a target color lookup table, namely a target 3DLUT, according to the current feedback camera state, namely the current target shooting parameter, through the target shooting parameter, and sends the target 3DLUT to the current image correction system to carry out color correction on the shot target image.
In this embodiment, the effect of coping with different situations is achieved by mixing a plurality of LUTs into a "dynamic" LUT in one system, i.e. by increasing the dimensions of the LUTs. And the difference value calculation is also carried out among a plurality of LUTs, so that more LUTs are generated, and a dynamic color correction system capable of adjusting shooting parameters is provided, so that each LUT is smoothly shifted to the next LUT, and therefore one LUT which is most suitable for the current application scene can be selected from the plurality of LUTs.
It will be appreciated that the color lookup table may be three-dimensional, and becomes a four-dimensional color lookup table, i.e., a 4DLUT, when generating a color lookup table corresponding to one photographing parameter. When the color lookup tables corresponding to the two photographing parameters are generated, the five-dimensional color lookup table, namely, the 5DLUT is changed. Similarly, 6DLUT and 7DLUT can be obtained, so that the dimension rise of the LUT table is realized.
In one embodiment, there is provided an image color correction method applied to a terminal, including:
acquiring solid-color images respectively generated based on a plurality of solid-color values; the solid image is for display on a display device;
taking a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in the plurality of shooting parameters;
determining photographing color values corresponding to the plurality of pure color values respectively under each photographing parameter based on the pictures photographed under each photographing parameter;
and generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value.
When the difference value between the two shooting parameters of the same class is larger than a preset threshold value and the corresponding color lookup table does not exist in the shooting parameters between the two shooting parameters, determining the difference value between shooting color values corresponding to each pure color value in the two color lookup tables for the color lookup tables respectively corresponding to the two shooting parameters of the same class;
And determining a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference value between the two shooting parameters and the difference value between the shooting color values corresponding to each pure color value in the two color lookup tables.
Displaying the virtual scene image as a virtual scene picture through a display device;
shooting a real scene formed by taking a virtual scene picture displayed by display equipment as a background and taking an entity object as a foreground under a target shooting parameter to obtain a target image;
acquiring a target color lookup table corresponding to the target shooting parameters, and acquiring a target format corresponding to the target image and a format corresponding to the target color lookup table;
when the format of the target color lookup table is different from the target format, converting the target color lookup table into the target format, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table converted into the target format.
Determining a corresponding target color mapping relationship under the target shooting parameters based on the difference between each solid color value and the corresponding shooting color value in the target color lookup table;
determining channel color values corresponding to each pixel point in the target image on each color channel respectively;
And carrying out color correction on the channel color value of each pixel point on the corresponding color channel based on the channel mapping relation respectively corresponding to the plurality of color channels so as to obtain a corrected image.
In this embodiment, solid-color images respectively generated based on a plurality of solid-color values are acquired and used for display on a display device, so that a picture displayed by the display device is photographed when different solid-color images are respectively displayed on the display device using each of a plurality of photographing parameters. Based on the pictures photographed under each photographing parameter, photographing color values corresponding to the respective plurality of solid color values under each photographing parameter are determined, thereby obtaining the respective photographing color values under different photographing parameters. According to shooting color values corresponding to the various pure color values under each shooting parameter, a color lookup table corresponding to each shooting parameter can be generated, so that association between each shooting parameter and the color lookup table is established. And, combine different shooting parameters to produce respective color lookup table, can promote the dimension of the color lookup table on the basis of original color lookup table, obtain the color lookup table of the multiple dimensions. The multi-dimension is a plurality of shooting parameters.
When the difference value between two shooting parameters in the same category is larger than a preset threshold value and the corresponding color lookup table does not exist in the shooting parameters 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 according to the difference between the color lookup tables corresponding to the two shooting parameters, more color lookup tables can be generated, and dynamic smooth transition between the color lookup tables can be realized.
In the application process of the color lookup table, the virtual scene image is displayed as a virtual scene picture through the display device, and the real scene taking the virtual scene picture displayed by the display device as the background is shot under the target shooting parameters, so that the entity object and the virtual picture can be fused into the same picture, and the virtual scene and the real environment can be combined skillfully to generate a fused target image. The target color lookup table corresponding to the target shooting parameters is obtained, the corresponding target color mapping relation under the target shooting parameters can be accurately determined based on the difference between each pure color value and the corresponding shooting color value in the target color lookup table, the target color mapping relation is related to the used shooting parameters, and the target color mapping relation determined by combining the used shooting parameters is more accurate.
The channel color values of each pixel point in the target image on each color channel are determined, so that the channel color values of each pixel point on the corresponding color channel are corrected based on the channel mapping relation corresponding to the color channels, the color values of each pixel point can be corrected more carefully and accurately, a more accurate corrected image is obtained, pictures displayed by different equipment can be kept consistent in color, and color differences caused by the pictures displayed by different equipment can be effectively reduced.
The image color correction method in the present embodiment can be applied to a color correction scene of an arbitrary image. As shown in fig. 12, the virtual scene image a is transmitted to the LED screen by a computer, so that the LED screen is displayed as a virtual scene image, and the real scene with the virtual scene image displayed by the LED screen as a background is shot by a camera under the target shooting parameters, so as to obtain a target image B.
And acquiring a target color lookup table corresponding to the target shooting parameters, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table. As can be seen from fig. 12, after the color correction of the target image B, the color of the corrected image C and the color of the virtual scene image a can be kept consistent, that is, the color difference caused by different devices can be avoided by the color correction.
The application scene of the image color correction method in this embodiment may be an LED virtual studio, where the LED virtual studio may perform virtual production, and the required devices include a computer configured with a game engine, an LED screen, a physical object, and a camera. The camera is shooting equipment. Wherein, virtual production refers to a series of computer-aided production and visual film production methods. The game engine refers to the core components of some compiled editable computer game systems or some interactive real-time image applications. The LED screen is a large-sized LED screen in a virtual film-making shooting site and is used for displaying virtual contents generated by a game engine. The physical object refers to a physical object arranged in front of the LED screen, and comprises a physical prop and a character object. The camera is used in virtual production, and takes a real scene formed by taking a virtual scene picture displayed by a display device as a background and taking a physical object as a foreground under a target shooting parameter to obtain a target image. When the image color correction method in the embodiment is applied to an LED virtual film studio scene, a plurality of solid colors such as red, green, blue, white and the like can be respectively output through a game engine in a computer, and solid-color images respectively generated based on the plurality of solid-color values can be obtained; the solid-color image is used for being displayed on the LED screen, each shooting parameter in a plurality of shooting parameters of the camera is adopted, and when different solid-color images are respectively displayed on the LED screen, the picture displayed by the LED screen is shot. Based on pictures taken by the camera under each of the photographing parameters, photographing color values corresponding to the respective plurality of solid color values under each of the photographing parameters are determined. And generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value. It can be appreciated that the camera used in the process of processing the LED virtual studio scene is the camera.
After each color lookup table is obtained, the computer outputs a game scene image generated by the game engine and displays the game scene image as a game scene picture through the LED screen.
And the camera shoots a real scene formed by taking a game scene picture displayed by the LED screen as a background and taking an entity object as a foreground under the target shooting parameters to obtain a target image.
And acquiring a target color lookup table corresponding to the target shooting parameter, and determining a corresponding target color mapping relation under the target shooting parameter based on the difference between each pure color value and the corresponding shooting color value in the target color lookup table. The target color mapping relationship comprises channel mapping relationships corresponding to the color channels respectively.
And determining channel color values of each pixel point in the target image, which correspond to each color channel, and performing color correction on the channel color values of each pixel point on the corresponding color channel based on the channel mapping relations of the plurality of color channels, so as to obtain a corrected image.
It will be appreciated that when there are multiple frames of game scene images generated by the game engine, the processing may be performed according to the above steps to obtain a target image corresponding to each frame of game scene image. The physical objects corresponding to the virtual scene images of each frame of game scene image can be different, and can be specifically set according to the requirements.
The camera can export each frame of target image to the computer for color correction, and generates a target game video based on the image fusion after each frame correction.
In this embodiment, the virtual production is a region where the real world and the digital world are blended, and the virtual reality and the augmented reality are combined with the computer synthesized image CGI (Computer Generation Image) and the game engine technology, so that the producer can see the scenes to develop in front of them as if they were synthesized and photographed in real scenes. An LED screen is arranged in a shooting site of the virtual film making scene and used for displaying virtual contents, actual furnishing props are placed in front of the LED screen, and character objects perform with the contents displayed by the LED screen as the background. The camera of the virtual production scene can capture the fusion picture of the picture presented by the LED screen and the physical object at the same time, so that a video combining the virtual with the reality, such as a game video, a film video and the like, is generated.
The traditional virtual film making scene does not pay attention to the difference of the game scene picture generated by a game engine of a computer, the game scene picture displayed on a display screen and the content displayed by a camera shooting display screen in a color range, namely the difference of the generated picture and the display picture in the color range caused by the difference of color spaces used by different devices, so that the finally generated picture or video has serious color distortion.
In this embodiment, the images generated by the game engine and generated by the multiple pure colors such as red, green, blue and white are displayed on the LED screen, so that the corresponding photographed images are obtained by photographing with the camera under different photographing parameters, and thus the respective corresponding photographed color values are obtained. And forming a color lookup table corresponding to each shooting parameter based on shooting color values respectively corresponding to red, green, blue and white in the first color space.
The camera shoots a real scene formed by taking a virtual scene picture displayed by the LED screen as a background and taking a physical object as a foreground under the target shooting parameters to obtain a target image, and the target image is subjected to color correction in real time and quickly through a color mapping relation, so that the shooting picture of the camera can keep consistent with the input picture of the LED screen (the input picture is a picture generated by a game engine), the color difference caused by different devices such as the computer game engine, the LED screen, the field camera and the like is exactly counteracted, and the quality of the generated target game video is higher.
In other embodiments, the application scene may also be shooting of video through an LED virtual studio, and displaying special effect animation through an LED screen. And recording a real scene formed by taking the special effect animation displayed by the LED screen as a background and taking the person object as a foreground by using a camera under the target shooting parameters to obtain a target film and television video. And carrying out color correction on each frame of target image in the target video through the color mapping relation, correspondingly obtaining each frame of corrected image, and fusing the corrected images based on each frame of corrected image to form the corrected video.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a device for generating the color lookup table based on shooting parameters, which is used for realizing the method for generating the color lookup table based on shooting parameters. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the device for generating a color lookup table based on shooting parameters provided below may be referred to the limitation of the method for generating a color lookup table based on shooting parameters hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 13, there is provided a color lookup table generating apparatus 1300 based on photographing parameters, including: an acquisition module 1302, a picture taking module 1304, a color determination module 1306, and a generation module 1308, wherein:
an acquisition module 1302 for acquiring solid images respectively generated based on the plurality of solid color values; the solid image is for display on a display device;
a picture photographing module 1304 for photographing a picture displayed by the display device when different solid-color images are respectively displayed on the display device using each of the plurality of photographing parameters;
a color determining module 1306, configured to determine, based on the frames captured under each capturing parameter, capturing color values corresponding to the multiple solid color values under each capturing parameter;
a generating module 1308, configured to generate a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to multiple pure color values under each shooting parameter, where the color lookup table includes a correspondence between each pure color value and a corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
In this embodiment, solid-color images respectively generated based on a plurality of solid-color values are acquired and used for display on a display device, so that a picture displayed by the display device is photographed when different solid-color images are respectively displayed on the display device using each of a plurality of photographing parameters. Based on the pictures photographed under each photographing parameter, photographing color values corresponding to the respective plurality of solid color values under each photographing parameter are determined, thereby obtaining the respective photographing color values under different photographing parameters. According to shooting color values corresponding to the various pure color values under each shooting parameter, a color lookup table corresponding to each shooting parameter can be generated, so that association between each shooting parameter and the color lookup table is established. The color lookup table comprises the corresponding relation between each pure color value and the corresponding shooting color value, and is used for correcting the color of the target image shot by adopting the corresponding shooting parameters, so that the target image shot by the corresponding shooting parameters can be corrected more accurately, the color difference caused by the display pictures of different equipment can be effectively reduced, and the pictures displayed by the different equipment are kept consistent in color.
In one embodiment, the obtaining module 1302 is further configured to obtain a solid image respectively generated based on a plurality of solid color values in the first color space;
the color determining module 1306 is further configured to determine, based on the picture captured under each capturing parameter, an intermediate color value corresponding to each of the plurality of pure color values in the second color space under each capturing parameter; converting each intermediate color value of the second color space into the first color space to obtain each shooting color value in the first color space;
the generating module 1308 is further configured to generate a corresponding color lookup table of each shooting parameter in the first color space according to shooting color values corresponding to the plurality of pure color values in the first color space respectively.
In this embodiment, a solid-color image generated based on a plurality of solid-color values in a first color space is obtained, based on a picture photographed under each photographing parameter, an intermediate color value corresponding to the plurality of solid-color values in a second color space under each photographing parameter is determined, each intermediate color value in the second color space is converted into the first color space, and each photographing color value in the first color space is obtained, so that when the solid-color value and the photographed color value correspond to different color spaces, the same color space can be converted first, so that a corresponding color lookup table of each photographing parameter under the first color space can be accurately generated according to the photographing color value corresponding to each of the plurality of solid-color values in the first color space under each photographing parameter, and the problem of inaccurate correction caused by direct use of different color values in the color space for image color correction is avoided.
In one embodiment, the color determining module 1306 is further configured to perform a luminance conversion process on each intermediate color value of the second color space, to obtain a luminance converted intermediate color value; and performing color conversion processing on the intermediate color values after the brightness conversion to obtain shooting color values in a first color space.
In this embodiment, the luminance conversion process is performed on each intermediate color value to obtain each intermediate color value with a linear type luminance, so that the luminance in the storage format can be converted into a luminance that can be used for data calculation.
And performing color conversion processing on each intermediate color value with linear brightness so as to convert each intermediate color value from the second color space to the first color space, and accurately obtaining shooting color values corresponding to each shooting picture in the first color space. By performing the luminance conversion first and performing the color conversion on the color information after the luminance conversion, the data in the second color space can be accurately mapped to the first color space.
In one embodiment, the generating module 1308 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 according to a difference between the color lookup tables corresponding to the two shooting parameters.
In this embodiment, for two shooting parameters of the same class, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters may be predicted and generated according to the difference between the color lookup tables corresponding to the two shooting parameters, so that the amount of data for shooting and counting each shooting parameter of the same class may be reduced, and the processing efficiency may be improved. Further, a color lookup table corresponding to more photographing parameters can be generated, and a color lookup table suitable for performing image color correction in various photographing scenes can be provided.
In one embodiment, the generating module 1308 is further configured to generate, when the difference between two shooting parameters in the same category is greater than a preset threshold, and the shooting parameters between the two shooting parameters do not have a corresponding color lookup table, a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference between the color lookup tables corresponding to the two shooting parameters.
In this embodiment, when the difference between two shooting parameters of the same class is greater than a preset threshold, and the shooting parameters between the two shooting parameters do not have corresponding color lookup tables, according to the difference between the color lookup tables corresponding to the two shooting parameters, the color lookup table corresponding to at least one shooting parameter between the two shooting parameters can be accurately generated, so that dynamic smooth transition between the color lookup tables can be realized.
In one embodiment, the generating module 1308 is further configured to determine, for the color lookup tables corresponding to the two shooting parameters of the same class, a difference value between the shooting color values corresponding to each of the pure color values in the two color lookup tables; and determining a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference value between the two shooting parameters and the difference value between the shooting color values corresponding to each pure color value in the two color lookup tables.
In this embodiment, for the color lookup tables corresponding to the two photographing parameters of the same class, the difference between the photographing color values corresponding to each of the pure color values in the two color lookup tables is determined, and according to the difference between the two photographing parameters and the difference between the photographing color values corresponding to each of the pure color values in the two color lookup tables, the color lookup table corresponding to at least one photographing parameter located between the two photographing parameters can be accurately determined, so that more kinds and more numbers of color lookup tables can be provided, and various photographing scenes can be adapted.
In one embodiment, the plurality of solid color values characterize a respective standard solid color, the plurality of capture parameters includes at least one of f-number, exposure time, color temperature, or hue, the display device is a light emitting diode display, the solid color values include first sub-color values over the plurality of color channels, and the capture color values include second sub-color values over the plurality of color channels.
In this embodiment, the plurality of solid color values represent corresponding standard solid colors, the plurality of shooting parameters include at least one of f-number, exposure time, color temperature or hue, the display device is a light emitting diode display screen, the solid color values include first sub-color values on the plurality of color channels, and the shooting color values include second sub-color values on the plurality of color channels, so that red, green, blue and white in a picture and other colors formed by the plurality of colors can be accurately color calibrated through color calibration information, color differences caused by different devices such as a terminal, an LED screen and a camera are exactly offset, so that pictures displayed by different display devices are kept consistent in color, and color differences caused by pictures displayed by different devices can be effectively reduced.
Based on the same inventive concept, the embodiments of the present application also provide an image color correction apparatus for implementing the above-mentioned related image color correction method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the image color correction device provided below may be referred to the limitation of the image color correction method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 14, there is provided an image color correction apparatus 1400 comprising: a display module 1402, a scene capture module 1404, a relationship determination module 1406, and a correction module 1408, wherein:
a display module 1402, configured to display the virtual scene image as a virtual scene picture through a display device;
a scene shooting module 1404, configured to shoot a real scene with a virtual scene picture displayed by the display device as a background under a target shooting parameter, to obtain a target image;
the relationship determining module 1406 is configured to obtain a target color lookup table corresponding to the target shooting parameter, and determine a target color mapping relationship corresponding to the target shooting parameter based on the target color lookup table;
the correction module 1408 is configured to perform color correction on the target image according to the target color mapping relationship, so as to obtain a corrected image.
In this embodiment, the virtual scene image is displayed as a virtual scene picture through the display device, and the real scene with the virtual scene picture displayed by the display device as the background is shot under the target shooting parameter, so that the entity object and the virtual picture can be fused into the same picture, and the virtual scene and the real environment can be combined skillfully to generate the fused target image. The target color lookup table corresponding to the target shooting parameters is obtained, the target color mapping relation corresponding to the target shooting parameters is accurately determined based on the target color lookup table, the target color mapping relation is related to the used shooting parameters, and the target color mapping relation determined by combining the used shooting parameters is more accurate. And carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image, so that the colors of pictures displayed by different equipment can be kept consistent, and the color difference caused by the pictures displayed by different equipment can be effectively reduced.
In one embodiment, the scene shooting module 1404 is further configured to shoot, under the target shooting parameter, a real scene formed by taking a virtual scene picture displayed by the display device as a background and taking a physical object as a foreground, so as to obtain a target image.
In this embodiment, under the target shooting parameters, a real scene formed by taking a virtual scene picture displayed by a display device as a background and taking an entity object as a foreground is shot to obtain a target image, and after the entity object and the virtual picture are fused, the virtual scene picture and the entity object can coexist in the same picture and space, so that virtual information and the real environment can be combined skillfully.
In one embodiment, the relationship determination module 1406 is further configured to obtain a target format corresponding to the target image and a format corresponding to the target color lookup table; when the format of the target color lookup table is different from the target format, converting the target color lookup table into the target format, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table converted into the target format.
In this embodiment, a target format corresponding to the target image and a format corresponding to the target color lookup table are obtained to determine whether the data formats of the target image and the target color lookup table 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 into the target format, so that the data of the target color lookup table and the target color lookup table belong to the same data, and the target color mapping relation corresponding to the target shooting parameters can be accurately determined based on the target color lookup table converted into the target format.
In one embodiment, the target shooting parameters belong to a plurality of shooting parameters, and each shooting parameter has a corresponding color lookup table; the color lookup tables corresponding to the shooting parameters are generated according to the color lookup table generating devices based on the shooting parameters.
In this embodiment, according to the method for generating the color lookup table based on the shooting parameters, the corresponding color lookup table under each shooting parameter is generated in advance, so that in practical application, the corresponding target color lookup table can be quickly obtained based on the target shooting parameters used during shooting, and the target color mapping relationship can be accurately, quickly and accurately calculated based on the target color lookup table, thereby improving the speed of image color correction.
In one embodiment, the relationship determination module 1406 is further configured to determine a corresponding target color mapping relationship under the target shooting parameters based on differences between each of the solid color values and the corresponding shooting color values in the target color lookup table;
the correction module 1408 is further configured to determine a target color value corresponding to each pixel point in the target image; and carrying out color correction on each target color value according to the target color mapping relation to obtain a corrected image.
In this embodiment, based on the difference between each solid color value and the corresponding shooting color value in the target color lookup table, the corresponding target color mapping relation under the target shooting parameters can be accurately determined, so that after the target color values corresponding to the pixel points in the target image are determined, the color correction can be accurately performed on the target color values according to the target color mapping relation, so that the corrected image and the image displayed by the display device keep consistent in color, and the color difference caused by different devices is avoided.
In one embodiment, the correction module 1408 is further configured to determine a channel color value corresponding to each pixel point in the target image on each color channel; and carrying out color correction on the channel color value of each pixel point on the corresponding color channel based on the channel mapping relation respectively corresponding to the plurality of color channels so as to obtain a corrected image.
In this embodiment, the channel color values of each pixel point in the target image corresponding to each color channel are determined, so that the color correction is performed on the channel color values of each pixel point on the corresponding color channel based on the channel mapping relations corresponding to the color channels, and the color values of each pixel point can be corrected more carefully and accurately, so that a more accurate corrected image is obtained.
The above-described respective modules in the photographing parameter-based color lookup table generation device, the image color correction device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 15. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by the processor, implements a method of generating a color look-up table based on photographing parameters, and implements a method of correcting colors of an image. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 15 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application is applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive RandomAccess Memory, MRAM), ferroelectric Memory (Ferroelectric RandomAccess Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (RandomAccess Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static RandomAccess Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (18)

1. A method for generating a color lookup table based on shooting parameters, the method comprising:
acquiring solid-color images respectively generated based on a plurality of solid-color values; the solid image is for display on a display device;
taking a picture displayed by the display device when different solid-color images are respectively displayed on the display device by adopting each shooting parameter in a plurality of shooting parameters;
Determining shooting color values corresponding to the plurality of pure color values respectively under each shooting parameter based on the picture shot under each shooting parameter;
generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
2. The method of claim 1, wherein the acquiring a solid image generated based on the plurality of solid color values, respectively, comprises:
acquiring a solid color image respectively generated based on a plurality of solid color values of a first color space;
the determining, based on the pictures photographed under each photographing parameter, photographing color values corresponding to the plurality of solid color values, respectively, under each photographing parameter includes:
determining intermediate color values respectively corresponding to the plurality of pure color values in a second color space under each shooting parameter based on the picture shot under each shooting parameter;
Converting each intermediate color value of the second color space into the first color space to obtain each shooting color value in the first color space;
the generating a color lookup table corresponding to each shooting parameter according to the shooting color values corresponding to the plurality of pure color values under each shooting parameter comprises:
and generating a corresponding color lookup table of each shooting parameter in the first color space according to shooting color values corresponding to the plurality of pure color values in the first color space under each shooting parameter.
3. The method of claim 2, wherein said converting each of said intermediate color values of said second color space to said first color space results in each of said captured color values in said first color space, comprising:
performing brightness conversion processing on each intermediate color value of the second color space to obtain a brightness converted intermediate color value;
and performing color conversion processing on the intermediate color values after the brightness conversion to obtain shooting color values in the first color space.
4. The method according to claim 1, wherein the method further comprises:
And 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 according to the difference between the color lookup tables corresponding to the two shooting parameters.
5. The method of claim 4, wherein for two photographing parameters of the same category, generating a color lookup table corresponding to at least one photographing parameter between the two photographing parameters according to a difference between color lookup tables corresponding to the two photographing parameters, comprises:
when the difference value between two shooting parameters of the same category is larger than a preset threshold value and the corresponding color lookup table does not exist in the shooting parameters between the two shooting parameters, generating a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference between the color lookup tables corresponding to the two shooting parameters.
6. The method of claim 4, wherein for two photographing parameters of the same category, generating a color lookup table corresponding to at least one photographing parameter between the two photographing parameters according to a difference between color lookup tables corresponding to the two photographing parameters, comprises:
For the color lookup tables corresponding to the two shooting parameters of the same class, determining the difference value between shooting color values corresponding to each pure color value in the two color lookup tables;
and determining a color lookup table corresponding to at least one shooting parameter between the two shooting parameters according to the difference value between the two shooting parameters and the difference value between the shooting color values corresponding to each pure color value in the two color lookup tables.
7. The method of any one of claims 1 to 6, wherein the plurality of solid color values characterize a respective standard solid color, the plurality of capture parameters includes at least one of f-number, exposure time, color temperature, or hue, the display device is a light emitting diode display, the solid color values include first sub-color values over a plurality of color channels, and the capture color values include second sub-color values over the plurality of color channels.
8. An image color correction method, the method comprising:
displaying the virtual scene image as a virtual scene picture through a display device;
shooting a real scene taking the virtual scene picture displayed by the display equipment as a background under a target shooting parameter to obtain a target image;
Acquiring a target color lookup table corresponding to the target shooting parameters, and determining a target color mapping relation corresponding to the target shooting parameters based on the target color lookup table;
and carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image.
9. The method according to claim 8, wherein capturing the real scene with the virtual scene picture displayed by the display device as a background under the target capturing parameter, to obtain the target image, includes:
and shooting a real scene formed by taking the virtual scene picture displayed by the display equipment as a background and taking the entity object as a foreground under the target shooting parameters to obtain a target image.
10. The method of claim 8, wherein determining the target color mapping relationship corresponding to the target shooting parameter based on the target color lookup table comprises:
acquiring a target format corresponding to the target image and a format corresponding to the target color lookup table;
and when the format of the target color lookup table is different from the target format, converting the target color lookup table into the target format, and determining a target color mapping relation corresponding to the target shooting parameter based on the target color lookup table converted into the target format.
11. The method of claim 8, wherein the target shooting parameters belong to a plurality of shooting parameters, each of the shooting parameters having a corresponding color lookup table; the color lookup table corresponding to each of the plurality of photographing parameters is generated according to the photographing parameter-based color lookup table generation method of any one of claims 1 to 7.
12. The method of claim 11, wherein determining the target color mapping relationship corresponding to the target shooting parameter based on the target color lookup table comprises:
determining a corresponding target color mapping relationship under the target shooting parameters based on differences between each pure color value and the corresponding shooting color value in the target color lookup table;
performing color correction on the target image according to the target color mapping relationship to obtain a corrected image, including:
determining target color values corresponding to all pixel points in the target image respectively;
and carrying out color correction on each target color value according to the target color mapping relation to obtain a corrected image.
13. The method of claim 12, wherein the target color mapping relationship comprises channel mapping relationships for respective ones of a plurality of color channels, and wherein the target color value comprises a channel color value; the determining the target color value corresponding to each pixel point in the target image includes:
Determining channel color values corresponding to each pixel point in the target image on each color channel respectively;
performing color correction on each target color value according to the target color mapping relation to obtain a corrected image, including:
and carrying out color correction on the channel color value of each pixel point on the corresponding color channel based on the channel mapping relation respectively corresponding to the plurality of color channels so as to obtain a corrected image.
14. A color look-up table generating apparatus based on photographing parameters, the apparatus comprising:
the acquisition module is used for acquiring the solid-color images respectively generated based on the plurality of solid-color values; the solid image is for display on a display device;
a picture shooting module, configured to take a picture displayed by the display device when different solid-color images are respectively displayed on the display device, using each of a plurality of shooting parameters;
the color determining module is used for determining shooting color values corresponding to the plurality of pure color values respectively under each shooting parameter based on the picture shot under each shooting parameter;
the generation module is used for generating a color lookup table corresponding to each shooting parameter according to shooting color values corresponding to the plurality of pure color values under each shooting parameter, wherein the color lookup table comprises the corresponding relation of each pure color value and the corresponding shooting color value; the color lookup table is used for performing color correction on a target image shot by adopting corresponding shooting parameters.
15. An image color correction device, the device comprising:
the display module is used for displaying the virtual scene image into a virtual scene picture through the display equipment;
the scene shooting module is used for shooting a real scene taking the virtual scene picture displayed by the display equipment as a background under the target shooting parameters to obtain a target image;
the relation determining module is used for acquiring a target color lookup table corresponding to the target shooting parameter and determining a target color mapping relation corresponding to the target shooting parameter based on the target color lookup table;
and the correction module is used for carrying out color correction on the target image according to the target color mapping relation to obtain a corrected image.
16. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 13 when the computer program is executed.
17. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 13.
18. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 13.
CN202211463439.9A 2022-11-22 2022-11-22 Shooting parameter-based color lookup table generation method and device and computer equipment Pending CN116489328A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211463439.9A CN116489328A (en) 2022-11-22 2022-11-22 Shooting parameter-based color lookup table generation method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211463439.9A CN116489328A (en) 2022-11-22 2022-11-22 Shooting parameter-based color lookup table generation method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN116489328A true CN116489328A (en) 2023-07-25

Family

ID=87216605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211463439.9A Pending CN116489328A (en) 2022-11-22 2022-11-22 Shooting parameter-based color lookup table generation method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN116489328A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117478860A (en) * 2023-10-25 2024-01-30 神力视界(深圳)文化科技有限公司 Method for establishing color calibration mapping relation, virtual shooting system and related device
CN117478861A (en) * 2023-10-25 2024-01-30 神力视界(深圳)文化科技有限公司 Method for establishing color calibration mapping relation, virtual shooting system and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117478860A (en) * 2023-10-25 2024-01-30 神力视界(深圳)文化科技有限公司 Method for establishing color calibration mapping relation, virtual shooting system and related device
CN117478861A (en) * 2023-10-25 2024-01-30 神力视界(深圳)文化科技有限公司 Method for establishing color calibration mapping relation, virtual shooting system and related device

Similar Documents

Publication Publication Date Title
CN110447051B (en) Perceptually preserving contrast and chroma of a reference scene
CN116489328A (en) Shooting parameter-based color lookup table generation method and device and computer equipment
WO2023016035A1 (en) Video processing method and apparatus, electronic device, and storage medium
KR101680254B1 (en) Method of calibration of a target color reproduction device
WO2023016037A1 (en) Video processing method and apparatus, electronic device, and storage medium
KR101303874B1 (en) Apparatus and method for gamut mapping
CN113824914B (en) Video processing method and device, electronic equipment and storage medium
JP2005210495A (en) Image processing apparatus, method, and program
US20160286090A1 (en) Image processing method, image processing apparatus, and image processing program
Sajadi et al. ADICT: Accurate direct and inverse color transformation
WO2023016040A1 (en) Video processing method and apparatus, electronic device, and storage medium
CN109792474A (en) Based on the determination of the shade mapping function for the hue angle sector for dividing universe mapped color space
Ejaz et al. Development of a camera system for the acquisition of high-fidelity colors
WO2023016044A1 (en) Video processing method and apparatus, electronic device, and storage medium
Vandenberg et al. A Review of 3D-LUT Performance in 10-bit and 12-bit HDR BT. 2100 PQ
TWI513326B (en) Method for correcting high dynamic range synthetic images
US20240037795A1 (en) Color calibration method and apparatus, computer device, and computer-readable storage medium
Rodríguez et al. Color-matching shots from different cameras having unknown gamma or logarithmic encoding curves
WO2023016041A1 (en) Video processing method and apparatus, electronic device, and storage medium
CN115706764B (en) Video processing method, device, electronic equipment and storage medium
CN115706766B (en) Video processing method, device, electronic equipment and storage medium
WO2023016042A1 (en) Video processing method and apparatus, electronic device, and storage medium
Vandenberg et al. A survey on 3d-lut performance in 10-bit and 12-bit hdr bt. 2100 pq
WO2022267784A1 (en) Systems and methods for image correction
CN118115360A (en) Multi-path processing method, device, computer equipment and storage medium for image data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40091421

Country of ref document: HK