Color card generation method, image processing method, device and readable storage medium

By converting colors from low color display standards to high color display standards and performing channel separation and adjustment, a target color chart suitable for high color display standards is generated, solving the problem that color charts in existing technologies cannot adapt to high color display standards, thus improving the visual effect of image materials and user experience.

CN115797154BActive Publication Date: 2026-06-05BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2021-09-10
Publication Date
2026-06-05

Smart Images

  • Figure CN115797154B_ABST
    Figure CN115797154B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a color card generation method, an image processing method, a device and a readable storage medium. The present disclosure converts each first standard color in a first color display standard into a color of a second color display standard to obtain a first color set, the color range of the first color display standard is smaller than the color range of the second color display standard; performs channel separation on each second standard color value included in the first color set, and adjusts the color component of a target color channel to obtain a second color set, and obtains a target color card based on the second color set. The present disclosure provides a solution to the problem of how to produce a target color card for realizing a target special effect of the second color display standard. In addition, since the target color card and the image material of the second color display standard are matched with each other, the image material with the target special effect has a more rich visual effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a color card generation method, image processing method, apparatus, and readable storage medium. Background Technology

[0002] With the continuous development of display technology, color display standards that meet users' higher display needs have been proposed. Smart terminals also support shooting photos and videos with high color display standards. Because photos and videos with high color display standards can present more details in both light and dark areas and have richer colors, they can reproduce realistic scenes to the greatest extent, and therefore are highly favored by users. Smart terminals support the use of filters, stickers, and other effects during the shooting process to obtain richer shooting effects; smart terminals also support editing of already captured image materials, such as adding filters, stickers, and other effects.

[0003] Currently, adding effects to image materials is achieved through color charts. However, the color charts used for existing effects have low color display standards and cannot be used for image materials with high color display standards. Summary of the Invention

[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a color card generation method, an image processing method, an apparatus, and a readable storage medium.

[0005] Firstly, this disclosure provides a method for generating a color chart, including:

[0006] Each first standard color in the first color display standard is converted to a color in the second color display standard to obtain a first color set; wherein, the first color set includes each second standard color in the second color display standard; the color range of the first color display standard is smaller than the color range of the second color display standard;

[0007] Channel separation is performed on each of the second standard colors included in the first color set to obtain the color components of each second standard color in the target color channel;

[0008] Adjust the color components of each of the second standard colors in the target color channel to obtain the second color set;

[0009] Based on the second color set, a target color chart in the second color display standard is generated, and the target color chart is used to achieve the target special effect.

[0010] In some possible implementations, converting each first standard color in the first color display standard to a color in the second color display standard to obtain the first color set includes:

[0011] Acquire the light signal data corresponding to each of the first standard colors;

[0012] Based on the photoelectric conversion function of the second color display standard, the light signal data corresponding to each of the first standard colors is converted to obtain the first color set.

[0013] In some possible implementations, before acquiring the light signal data corresponding to each of the first standard color values, the method further includes:

[0014] Obtain the electrical signal data corresponding to each of the first standard colors;

[0015] According to the electro-optical conversion function of the first color display standard, the electrical signal data corresponding to each of the first standard colors is converted to obtain the optical signal data corresponding to each of the first standard colors.

[0016] In some possible implementations, adjusting the color components of each of the second standard colors in the target color channel to obtain the second color set includes:

[0017] Obtain color chart configuration information, wherein the color chart configuration information is used to indicate the adjustment strategy corresponding to the color component of the target color channel;

[0018] Based on the color card configuration information, the color component values ​​of each of the second standard colors in the target color channel are adjusted to obtain the second color set.

[0019] In some possible implementations, the color card configuration information includes: the color components of each color in the target color channel of the second color set, and / or information for adjusting the function of each second standard color corresponding to the color component in the target color channel.

[0020] In some possible implementations, generating the target color chart in the second color display standard based on the second color set includes:

[0021] Obtain the coordinate positions of each of the second standard colors in its respective standard color chart;

[0022] Based on the correspondence between the second standard color and each color in the second color set, and the coordinate position of each second standard color in its respective standard color chart, obtain the coordinate position of each color in the second color set;

[0023] The target color chart is obtained based on each color in the second color set and the coordinate position of each color in the second color set.

[0024] In some possible implementations, the target color channel belongs to a target color space, which includes at least one of the following: RGB color space, YUV color space, and HSV color space.

[0025] In some possible implementations, the first color display standard includes the standard dynamic range (SDR) color display standard, and the second color display standard includes the high dynamic range (HDR) color display standard.

[0026] Secondly, this disclosure provides an image processing method, including:

[0027] The image material to be processed and the target color chart are obtained; wherein the target color chart is generated by the color chart generation method as described in any one of the first aspects;

[0028] For each pixel in the image material to be processed, the target color corresponding to the pixel is determined based on the original color of the pixel and the target color chart; both the original color of the pixel and the target color are colors in the second color display standard.

[0029] The target image material is obtained based on the target color corresponding to each pixel.

[0030] In some possible implementations, determining the target color of the pixel in the second color display standard based on the original color of the pixel and the target color chart includes:

[0031] Based on the original color and its coordinate position in the standard color chart, the coordinate position of the target color in the target color chart is obtained;

[0032] Based on the coordinate position of the target color in the target color chart, the target color chart is queried to obtain the target color.

[0033] In some possible implementations, the method further includes:

[0034] According to the electro-optical conversion function corresponding to the second color display standard, the electrical signal data of the target color corresponding to each pixel in the target image material is converted into optical signal data to display the target image material.

[0035] Thirdly, this disclosure provides a color card generating apparatus, comprising:

[0036] The color conversion module is used to convert each first standard color in the first color display standard into a color in the second color display standard to obtain a first color set; wherein, the first color set includes each second standard color in the second color display standard; the color range of the first color display standard is smaller than the color range of the second color display standard;

[0037] The channel separation module is used to perform channel separation on each of the second standard colors included in the first color set, and obtain the color components of each second standard color in the target color channel.

[0038] The adjustment module is used to adjust the color components of each of the second standard colors in the target color channel to obtain the second color set;

[0039] The color chart generation module is used to generate a target color chart in the second color display standard based on the second color set, and the target color chart is used to achieve the target special effect.

[0040] Fourthly, this disclosure provides an image processing apparatus, comprising:

[0041] An acquisition module is used to acquire the image material to be processed and the target color chart; wherein the target color chart is generated by the color chart generation method described in any one of the first aspects;

[0042] The color mapping module is used to determine the target color corresponding to each pixel in the image material to be processed, based on the original color of the pixel and the target color chart; the original color of the pixel and the target color are both colors in the second color display standard.

[0043] The image generation module is used to obtain target image material based on the target color corresponding to each pixel.

[0044] Fifthly, this disclosure provides an electronic device, including: a memory, a processor, and computer program instructions;

[0045] The memory is configured to store the computer program instructions;

[0046] The processor is configured to execute the computer program instructions to implement the color card generation method as described in any of the first aspects, or to implement the image processing method as described in any of the second aspects.

[0047] Sixthly, this disclosure provides a readable storage medium, including: a computer program;

[0048] When the computer program is executed by at least one processor of an electronic device, it implements the color card generation method as described in any of the first aspects, or the image processing method as described in any of the second aspects.

[0049] In a seventh aspect, this disclosure provides a program product, including: computer program instructions;

[0050] The computer program instructions are stored in a readable storage medium, and at least one processor of the electronic device reads the computer program instructions from the readable storage medium; the at least one processor executes the computer program instructions to implement the color card generation method as described in any of the first aspects, or the image processing method as described in any of the second aspects.

[0051] This disclosure provides a color chart generation method, image processing method, apparatus, and readable storage medium. The color chart generation method converts each first standard color of a first color display standard into colors of a second color display standard to obtain a first color set, where the color range of the first color display standard is smaller than that of the second color display standard. Then, it performs channel separation on each second standard color value included in the first color set and adjusts the color components of each second standard color on the target color channel to obtain a second color set. Based on the second color set, a target color chart capable of achieving the target special effects in the second color display standard is obtained. This disclosure solves the problem of how to produce a target color chart for achieving target special effects under the second color display standard. Furthermore, based on the target color chart of the second color display standard, special effects are added to image materials of the second color display standard. Since both the target color chart and the image materials belong to the second color display standard and are mutually compatible, the image materials with added special effects have richer visual effects, which is beneficial to improving the user experience. Attached Figure Description

[0052] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0053] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a flowchart of a color card generation method provided in an embodiment of the present disclosure;

[0055] Figure 2 A flowchart of a color card generation method provided in another embodiment of this disclosure;

[0056] Figure 3 A flowchart of a color card generation method provided in another embodiment of this disclosure;

[0057] Figure 4 A flowchart illustrating an image processing method provided in an embodiment of this disclosure;

[0058] Figure 5 This is a schematic diagram of the structure of a color card generating apparatus provided in an embodiment of the present disclosure;

[0059] Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of the present disclosure;

[0060] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0061] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0062] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0063] Currently, high color display standards typically allow for higher maximum brightness and wider color gamut, providing richer colors and maximizing the reproduction of real-world scenes. As a result, they are highly favored by users.

[0064] However, color charts used to achieve special effects in existing technologies typically employ low color display standards. If a color chart that uses low color display standards to achieve special effects is applied to image materials with high color display standards, the visual effect of the image materials with added effects may be abnormal due to the misalignment of the color gamuts of the two color display standards.

[0065] For example, the High Dynamic Range (HDR) color display standard uses the BT.2020nc color space, with the three primary colors being BT.2020, while the Standard Dynamic Range (SDR) color display standard uses the BT.709nc color space. HDR can express a wider range of colors and offers better visual effects. However, applying a color chart that uses the SDR color display standard for special effects to image materials using the HDR standard can result in the added effects appearing darker overall due to the misalignment of the SDR and HDR color gamuts. This negatively impacts the visual quality of the image and degrades the user experience.

[0066] In other words, color charts that use low color display standards to achieve special effects cannot be adapted to image materials with high color display standards.

[0067] Based on this, this disclosure provides a color chart generation method, image processing method, apparatus, electronic device, readable storage medium, and program product. The color chart generation method provides converts each first standard color of a first color display standard into colors of a second color display standard to obtain a first color set, where the color range of the first color display standard is smaller than that of the second color display standard. Then, it performs channel separation on each second standard color value included in the first color set and adjusts the color components of each second standard color on the target color channel to obtain a second color set. Based on the second color set, a target color chart capable of achieving the target effect in the second color display standard is obtained. This disclosure solves the problem of how to produce a target color chart for achieving the target effect under the second color display standard. Furthermore, based on the target color chart of the second color display standard, effects are added to image materials of the second color display standard. Since both the target color chart and the image materials belong to the second color display standard and are mutually compatible, the image materials with added effects have richer visual effects, which is beneficial to improving the user experience.

[0068] The color chart generation method provided in this disclosure can be executed by the color chart generation device provided in this disclosure. The color chart generation device can be a mobile phone, tablet computer, laptop computer, handheld computer, vehicle terminal, wearable device, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), personal computer (PC), etc., and this disclosure does not specifically limit it.

[0069] The color chart generation method provided in this disclosure is described in detail below through several specific embodiments. It should be noted that the color chart generation method provided in this disclosure is described using a scenario where a color chart with special effects implemented using the HDR color display standard is generated as an example. It should be understood that the color chart generation method provided in this disclosure is not only applicable to scenarios where color charts with special effects implemented using the HDR color display standard are generated, but also applicable to scenarios where color charts with special effects implemented using other higher or lower color display standards are generated. Furthermore, the following embodiments use electronic devices as examples for illustration.

[0070] Figure 1 This is a flowchart illustrating a color chart generation method according to an embodiment of this disclosure. (Refer to...) Figure 1 As shown, the color chart generation method provided in this embodiment may include:

[0071] S101. Convert each of the first standard colors in the first color display standard to the colors in the second color display standard to obtain the first color set; the color range of the first color display standard is smaller than the color range of the second color display standard.

[0072] This disclosure does not limit the first color display standard or the second color display standard. The first color display standard and the second color display standard can be any two color display standards. The color range of the first color display standard is smaller than the color range of the second color display standard. For example, the first color display standard includes the SDR color display standard, and the second color display standard includes the HDR color display standard; the color range of the SDR color display standard is smaller than the color range of the HDR color display standard.

[0073] One possible implementation involves converting the light signal data of each first standard color in the first color display standard based on the photoelectric conversion function corresponding to the second color display standard, so as to convert each first standard color into a color in the second color display standard and obtain a first color set.

[0074] Another possible implementation is to convert the standard color card image of the first color display standard based on the electro-optical conversion function corresponding to the first color display standard to obtain the light signal data corresponding to each first standard color, and then convert the light signal data of each first standard color in the first color display standard based on the photoelectric conversion function corresponding to the second color display standard to convert each first standard color into a color in the second color display standard, thereby obtaining the first color set.

[0075] It should be noted that when the encoding methods corresponding to the first color display standard are different (or can be understood as different formats), the electro-optical conversion functions are also different; similarly, when the encoding methods corresponding to the second color display standard are different (or can be understood as different formats), the photoelectric conversion functions are also different.

[0076] S102. Perform channel separation on each of the second standard colors included in the first color set to obtain the color component of each second standard color in the target color channel.

[0077] One possible implementation is as follows: First, the target color space can be determined based on the desired special effects of the target color card. After determining the target color space, the channels of each second standard color are separated to obtain the color components of the second standard color in the target color space, where the color components of the second standard color in the target color space include the color components of the target color channel.

[0078] The target color space may include, but is not limited to, at least one of the following color spaces: RGB color space, YUV color space, and HSV color space.

[0079] For example, if the desired effect of the target color chart is brightness, this can be achieved by adjusting the color components of each second standard color in the Y channel. Therefore, the target color space can include the YUV color space. Here, "Y" represents luminance (or luma), and "U" and "V" both represent chroma (or chroma).

[0080] For example, if the desired effect of the target color chart is a rosy hue, this can be achieved by adjusting the color components of each secondary standard color in the R channel. Therefore, the target color space can include the RGB color space. Here, "R" represents red, "G" represents green, and "B" represents blue.

[0081] For example, if the desired effect of the target color chart is vividness, this can be achieved by adjusting the color components of each second standard color in the S channel. Therefore, the target color space can include the HSV color space. Here, "H" represents Hue, "S" represents Saturation, and "V" represents Value.

[0082] S103. Adjust the color components of each second standard color in the target color channel to obtain the second color set.

[0083] When electronic devices adjust the color components of each second standard color in the target color channel, they may, but are not limited to, use linear or non-linear adjustment methods.

[0084] In one possible implementation, when adjusting the color components of each second standard color in the target color channel using a linear adjustment method, this can be achieved through a preset linear function. For example, the color component values ​​of each second standard color in the target color channel can be used as the independent variable of the linear function, and the adjusted color components can be obtained by calculating according to a preset linear function formula.

[0085] When using a linear function to achieve linear adjustment, the embodiments of this disclosure do not limit the specific implementation method of the linear function.

[0086] In another possible implementation, when adjusting the color components of the second standard color value in the target color channel using a non-linear adjustment method, it can be done according to a preset non-linear function, or it can be adjusted according to a preset correspondence.

[0087] The method of adjusting the color components of the second standard color in the target color channel using a nonlinear function is similar to the method of adjusting the color components of the second standard color in the target color channel using a linear function. The color components of each second standard color in the target color channel are used as independent variables, and the adjusted color components are obtained by calculation according to the nonlinear function formula.

[0088] When adjusting according to a preset correspondence, the preset correspondence may include: the correspondence between the color components of the target color channel before and after adjustment.

[0089] For example, taking the R channel as the target channel in the RGB space as an example, the preset correspondence is shown in Table 1 below:

[0090] Table 1

[0091] Second standard color (R channel) Target color (R channel) 0 0.2 1 0.8 2 1.6 3 2.4

[0092] Optionally, the preset correspondence may also include the correspondence between the color components of one or more color channels other than the target color channel in the target color space before and after adjustment.

[0093] For example, based on the example shown in Table 1, in addition to the correspondence between the color component values ​​of the R channel before and after adjustment, the preset correspondence can also include the correspondence between the color components of the G channel and the B channel before and after adjustment. For example, as shown in Table 2:

[0094] Table 2

[0095]

[0096] Tables 1 and 2 above are just examples. In practical applications, the preset correspondence can include more correspondences between the second standard color and the target color, and the values ​​of the color components of each color channel in the preset correspondence can also be flexibly set.

[0097] Combining the adjustment methods described above, electronic devices can determine the target color channel to be adjusted and the adjustment method to be used in the following ways.

[0098] In one possible implementation, the electronic device can obtain color chart configuration information, which specifies the adjustment strategy for the color components corresponding to the target color channel. For example, the color chart configuration information is used to indicate the adjustment strategy for the color components corresponding to the target color channel.

[0099] In some possible implementations, the color card configuration information may also include information for indicating the target color channel; the electronic device determines the target color channel to be adjusted and the adjustment strategy for the color components of the target color channel by parsing the color card configuration information; and then adjusts the color component values ​​of the second standard color value on the target color channel based on the adjustment method indicated by the adjustment strategy, thereby obtaining the second color set.

[0100] Furthermore, this disclosure does not limit the implementation method of electronic devices obtaining color card configuration information. For example, electronic devices can obtain color card configuration information from connected storage devices, or they can obtain color card configuration information based on user input.

[0101] In another possible implementation, if the adjustment of the color components of the second standard color in the target color channel is performed manually by the user, the electronic device can display a user interface for adjusting the color component values ​​of the target color channel according to the operation instructions input by the user. The user can adjust the color components of each second standard color in the target color channel by operating the options or controls displayed in the user interface, such as the adjustment options corresponding to linear adjustment, the input box corresponding to non-linear adjustment, etc.

[0102] In practical applications, the methods for adjusting the color components of each second standard color in the target color channel are not limited to the above examples, and this disclosure does not limit them.

[0103] S104. Based on the second color set, generate a target color chart in the second color display standard, wherein the target color chart is used to achieve the target special effect.

[0104] One possible implementation involves mapping each of the second standard colors in the second color display standard to a three-dimensional coordinate system to obtain a first color cube. Then, based on the correspondence between the second standard colors and the colors included in the second color set, the corresponding second standard colors are replaced using the colors from the second color set, thereby generating a second color cube. Next, based on the second color cube, sampling is performed along any coordinate axis of the three-dimensional coordinate system according to a preset method to obtain sub-color cards. Finally, the sub-color cards are arranged from left to right and from top to bottom to obtain the target color card.

[0105] Another possible implementation involves determining the coordinates of each color in the second color set based on the coordinates of the second standard color within its corresponding standard color chart, and the correspondence between the second standard color and each color in the second color set. The target color chart is then obtained based on the coordinates of each color in the second color set. Alternatively, the standard color chart to which the second standard color belongs can be obtained by sampling the first color cube as described above, and arranging the sampled standard sub-color charts from left to right and from top to bottom.

[0106] For example, the target color swatch can be stored in the form of a resource package. The resource package corresponding to the target color swatch may include the color information of the sub-color swatches, the arrangement order of the sub-color swatches, and so on.

[0107] The following is combined Figure 2 Taking the colors included in the second color set in the RGB space as an example, this paper illustrates how to obtain a sub-color card by sampling from the second color cube.

[0108] For example, refer to Figure 2 As shown, firstly, the color components of each second standard color in the R channel are mapped to the X-axis in a Cartesian 3D coordinate system, the color components of each second standard color in the G channel are mapped to the Y-axis in a Cartesian 3D coordinate system, and the color component values ​​of each second standard color in the B channel are mapped to the Z-axis in a Cartesian 3D coordinate system. Next, based on the correspondence between each color in the second color set and the second standard color, the second standard color is replaced with a color included in the second color set. Then, all color component values ​​on the X and Y axes are traversed, and sampling is performed along the Z-axis at a preset sampling rate (i.e., sampling interval) to obtain multiple sub-color cards 101. Finally, the multiple sub-color cards 101 are arranged in multiple rows and columns according to the sampling order, from left to right and from top to bottom, thereby generating the target color card. Correspondingly, the resource package of the target color card may include the RGB color values ​​of each sub-color card and the position information (such as coordinate values) of each sub-color card in the target color card.

[0109] Another possible implementation involves mapping the color components of each color in the second color set onto the respective color channels of the target color space to a pre-established three-dimensional coordinate system. Based on information indicating the sampling position, the RGB values ​​of the corresponding sampling positions are obtained in the three-dimensional coordinate system. Then, a resource package for the target color chart is generated based on the RGB color values ​​of the corresponding sampling positions. The information indicating the sampling positions may include, but is not limited to, one or more pieces of information such as the sampling order and the coordinates of the sampling positions.

[0110] For example, please continue to refer to Figure 2 The example shown maps the colors in the second color set to a three-dimensional coordinate system, allowing sampling along the Z-axis to obtain a sub-color chart. In practical applications, sampling is not limited to the Z-axis; for example, sampling can also be performed along the X-axis and Y-axis.

[0111] The method provided in this embodiment converts each first standard color of a first color display standard into colors of a second color display standard to obtain a first color set, where the color range of the first color display standard is smaller than that of the second color display standard. Then, it performs channel separation on each second standard color value included in the first color set and adjusts the color components of each second standard color on the target color channel to obtain a second color set. Based on the second color set, it obtains a target color chart in the second color display standard that can achieve the target special effects. This disclosure solves the problem of how to produce a target color chart for achieving target special effects under the second color display standard. Furthermore, based on the target color chart of the second color display standard, special effects are added to image materials of the second color display standard. Since both the target color chart and the image materials belong to the second color display standard and are mutually compatible, the image materials with added effects have richer visual effects, which is beneficial to improving the user experience.

[0112] Next, taking the generation of a target color chart that achieves the target effect using the HDR color display standard based on the first standard colors in the SDR color display standard as an example, the entire production process of the target color chart corresponding to the target effect will be illustrated.

[0113] For example, refer to Figure 3 The color chart generation method shown may include the following process:

[0114] (1) Perform channel separation on each first standard color in the SDR color display standard and adjust the color components of the target color channel to obtain a target color chart (i.e., a color chart that achieves the target effect using the SDR color display standard) Figure 3 (SDR target color chart).

[0115] (2) Convert each of the first standard colors in the SDR color display standard to obtain the corresponding second standard colors in the HDR color display standard, i.e., the first color set; by performing channel separation on each of the second standard colors in the HDR color display standard and adjusting the color components of the target color channel, based on the adjusted colors, obtain the target color chart (i.e., the target color card for achieving the target effect using the HDR color display standard). Figure 3 (HDR target color chart in the image).

[0116] Since the color value range of the SDR color display standard and the color value range of the HDR color display standard are different, the implementation methods for separating the channels of each first standard color in the SDR color display standard and adjusting the color components of the target color channel can be the same or different from the implementation methods for separating the channels of each second standard color in the HDR color display standard and adjusting the color components of the target color channel. This disclosure does not limit this.

[0117] Optionally, in order to detect the special effects achieved by the HDR target color chart, the image material can be added with both the SDR and HDR target color charts respectively. That is, the image material can be added with special effects based on both the SDR and HDR target color charts respectively, so as to obtain image material with target special effects added according to the SDR and HDR target color charts respectively.

[0118] Specifically, the original image material is parsed into images using the SDR color display standard format and images using the HDR color display standard format, respectively. If the original image material is a single image, the single image is parsed into both the SDR and HDR color display standard formats; if the original image material is a video, each video frame can be parsed into both the SDR and HDR color display standard format video frames.

[0119] Based on the SDR target color chart, add special effects to image materials in the SDR color display standard format to obtain an SDR target image with added target effects (i.e., Figure 3 (SDR target image).

[0120] Based on the HDR target color chart, effects are added to image materials in the HDR color display standard format to obtain an HDR target image with added target effects (i.e., Figure 3 (High-resolution HDR target image).

[0121] Then, by comparing the visual effects of the SDR target image and the HDR target image, it is determined whether the HDR target color chart meets production requirements. One possible implementation is to display the image on a screen for the user to determine if the HDR target color chart meets production requirements. Another possible implementation is to collect image information from both the SDR and HDR target images and automatically compare the collected image information to determine if the HDR target color chart meets production requirements.

[0122] By way of example, this disclosure also provides an image processing method.

[0123] Figure 4 This is a flowchart illustrating an image processing method according to an embodiment of the present disclosure. This embodiment uses an electronic device as an example for explanation. (Refer to...) Figure 4 As shown, the image processing method provided in this embodiment may include:

[0124] S401. Obtain the image material to be processed and the target color chart.

[0125] The image materials to be processed may include one or more types such as photos, videos, and pictures.

[0126] If the image to be processed includes photos and / or pictures, the photos and / or pictures may be obtained by the electronic device through real-time shooting or downloading, or they may be pre-stored in the storage module of the electronic device. This disclosure does not limit the method by which the electronic device acquires photos and / or pictures, or the number, storage format, size, resolution and other parameters of the photos and / or pictures.

[0127] If the image material to be processed includes video, it can be obtained by an electronic device through real-time shooting or downloading, or it can be pre-stored in the storage module of the electronic device. This disclosure does not limit the method of obtaining video, or the number of videos, storage format, video duration, resolution and other parameters.

[0128] The target color chart mentioned in step S401 can be obtained through the above... Figures 1 to 3 The color chart is generated by the color chart generation method shown in any of the embodiments. The electronic device can obtain the resource package corresponding to the target color chart. The resource package corresponding to the target color chart can be referred to in the detailed description in the foregoing embodiments, and will not be repeated here for the sake of brevity.

[0129] It should be noted that in this embodiment, the target color chart and the image material to be processed belong to the same color display standard, namely the second color display standard in the aforementioned embodiments. For example, both the target color chart and the image material to be processed belong to the HDR color display standard.

[0130] One possible implementation assumes that the resource package corresponding to the target color swatch is stored on a server device. The electronic device can obtain the resource package by sending a resource package retrieval request to the server device and based on the feedback information from the server device. The resource package retrieval request may include identification information of the resource package corresponding to the target color swatch, such as the name of the target color swatch, its numerical code, etc. The feedback information sent by the server device to the electronic device includes the resource package of the target color swatch.

[0131] Another possible implementation is that the electronic device can pre-store the resource package of the target color card, and the electronic device can obtain the resource package of the target color card from its own storage space.

[0132] S402. For each pixel in the image material to be processed, determine the target color corresponding to the pixel based on the original color of the pixel and the target color chart.

[0133] The original color and target color of the pixels in the image material to be processed are both colors in the second color display standard. That is, the target image material obtained by adding target effects based on the target color card is also an image of the second color display standard.

[0134] In one possible implementation, for each pixel in the image material to be processed, based on the original color corresponding to the pixel, the three-dimensional coordinate system mapped by each second standard color value in the second color display standard is queried to determine the position of the original color corresponding to the pixel in the three-dimensional coordinate system; based on the correspondence between the original color and the target color, the coordinate position of the target color in the target color chart is determined, the target color chart is queried, and the color value at the corresponding position in the target color chart is obtained, i.e., the target color.

[0135] The original color corresponding to a pixel can be understood as the second standard color; querying the target color chart to obtain the target color value can be understood as obtaining the target color corresponding to the second standard color through the target color chart.

[0136] Another possible implementation is to determine the coordinates of the target color in the target color chart based on the original color and its coordinates in the standard color chart; then, based on the determined coordinates of the target color in the target color chart, obtain the color at the corresponding position, i.e., the target color.

[0137] In some cases, the standard color chart to which the second standard color belongs is obtained through sampling. Therefore, some second standard colors included in the second color display standard are not included in the standard color chart, and the corresponding target color cannot be directly found in the target color chart. Therefore, based on the original color, one or more colors adjacent to the original color (called adjacent colors) can be determined. Based on one or more adjacent colors, the target color chart can be searched to obtain the target colors corresponding to the adjacent colors respectively. Then, the target color corresponding to the original color can be obtained by using the difference method or other methods to fit the target colors corresponding to the adjacent colors respectively.

[0138] S403. Obtain the target image material based on the target color value of each pixel.

[0139] Specifically, the original color value of each pixel is replaced with the target color value to obtain the target image material.

[0140] This embodiment acquires image materials to be processed and a target color chart, both belonging to the second color display standard. It then uses the target color chart to add special effects to the image materials to generate the target image material. Since the color space (or color gamut space) of the target color chart is aligned with the color space (or color gamut space) of the image materials to be processed, the target color chart can adapt to the image materials, thus ensuring that the obtained target image material has a better visual effect and avoiding display abnormalities such as color distortion after adding special effects.

[0141] Optionally, in Figure 4 Based on the illustrated embodiment, the image processing method further includes:

[0142] S404. Based on the electro-optical conversion function corresponding to the second color display standard, convert the electrical signal data of the target color corresponding to each pixel in the target image material into optical signal data to display the target image material.

[0143] In this embodiment, the hardware resources of the electronic device support the display of a second color display standard, such as the display of the HDR color display standard. The electronic device can convert the electrical signal data of the target color corresponding to each pixel of the target image material into light signal data by using the electro-optical conversion function corresponding to the second color display standard format, based on the target color value corresponding to each pixel of the target image material and the second color display standard format, thereby displaying the target image material.

[0144] By employing the image processing method of this disclosure embodiment, the displayed target material image can have richer visual effects, which is beneficial to improving user experience and increasing users' enthusiasm for using special effects.

[0145] By way of example, this disclosure also provides a color card generating apparatus.

[0146] Figure 5 This is a schematic diagram of a color card generating apparatus provided in one embodiment of the present disclosure. (Refer to...) Figure 5 As shown, the color card generating apparatus 500 provided in this embodiment includes:

[0147] Color conversion module 501 is used to convert each first standard color in the first color display standard into a color in the second color display standard to obtain a first color set; wherein, the first color set includes each second standard color in the second color display standard; the color range of the first color display standard is smaller than the color range of the second color display standard.

[0148] The channel separation module 502 is used to perform channel separation on each of the second standard colors included in the first color set, and obtain the color components of each second standard color in the target color channel.

[0149] The adjustment module 503 is used to adjust the color components of each of the second standard colors in the target color channel to obtain the second color set.

[0150] The color chart generation module 504 is used to generate a target color chart in the second color display standard based on the second color set, wherein the target color chart is used to achieve the target special effect.

[0151] In some possible implementations, the color conversion module 501 is specifically used to acquire the light signal data corresponding to each of the first standard colors; and to convert the light signal data corresponding to each of the first standard colors according to the photoelectric conversion function of the second color display standard to obtain the first color set.

[0152] In some possible implementations, the color conversion module 501 is further configured to acquire electrical signal data corresponding to each of the first standard colors; and to convert the electrical signal data corresponding to each of the first standard colors according to the electro-optical conversion function of the first color display standard to acquire optical signal data corresponding to each of the first standard colors.

[0153] In some possible implementations, the adjustment module 503 is specifically used to obtain color card configuration information, wherein the color card configuration information is used to indicate the adjustment strategy corresponding to the color component of the target color channel; according to the color card configuration information, the color component values ​​of each of the second standard colors in the target color channel are adjusted to obtain the second color set.

[0154] In some possible implementations, the color card configuration information includes: the color components of each color in the target color channel of the second color set, and / or information for adjusting the function of each second standard color corresponding to the color component in the target color channel.

[0155] In some possible implementations, the color chart generation module 504 is specifically used to obtain the coordinate positions of each of the second standard colors in its respective standard color chart; obtain the coordinate positions of each color in the second color set according to the correspondence between the second standard colors and each color in the second color set and the coordinate positions of each of the second standard colors in its respective standard color chart; and obtain the target color chart according to each color in the second color set and the coordinate positions of each color in the second color set.

[0156] In some possible implementations, the target color channel belongs to a target color space, which includes at least one of the following: RGB color space, YUV color space, and HSV color space.

[0157] In some possible implementations, the first color display standard includes the standard dynamic range (SDR) color display standard, and the second color display standard includes the high dynamic range (HDR) color display standard.

[0158] The color card generation device provided in this embodiment can be used to execute the color card generation method shown in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and can be referred to the detailed description of the foregoing embodiments. For the sake of brevity, it will not be repeated here.

[0159] By way of example, this disclosure also provides an image processing apparatus.

[0160] Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided according to an embodiment of the present disclosure. (Refer to...) Figure 6 As shown, the image processing apparatus 600 provided in this embodiment includes:

[0161] The acquisition module 601 is used to acquire the image material to be processed and the target color chart; wherein the target color chart is generated by the color chart generation method shown in any of the foregoing method embodiments.

[0162] The color mapping module 602 is used to determine the target color corresponding to each pixel in the image material to be processed, based on the original color of the pixel and the target color chart; the original color of the pixel and the target color are both colors in the second color display standard.

[0163] The image generation module 603 is used to obtain target image material based on the target color corresponding to each pixel.

[0164] In some possible implementations, the color mapping module 602 is specifically used to obtain the coordinate position of the target color in the target color chart based on the original color and the coordinate position of the original color in the standard color chart; and to query the target color chart based on the coordinate position of the target color in the target color chart to obtain the target color.

[0165] In some possible implementations, the image processing apparatus 600 further includes a display module 604, configured to convert the electrical signal data of the target color corresponding to each pixel in the target image material into optical signal data according to the electro-optical conversion function corresponding to the second color display standard, so as to display the target image material.

[0166] The image processing apparatus provided in this embodiment can be used to execute the image processing method shown in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and can be referred to the detailed description of the foregoing embodiments. For the sake of brevity, it will not be repeated here.

[0167] Figure 7 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present disclosure. (Refer to...) Figure 7 As shown, the electronic device 700 provided in this embodiment includes a memory 701 and a processor 702.

[0168] The memory 701 can be a separate physical unit, connected to the processor 702 via a bus 703. Alternatively, the memory 701 and processor 702 can be integrated together, implemented in hardware, etc.

[0169] The memory 701 is used to store program instructions, and the processor 702 calls the program instructions to execute the operations of any of the above method embodiments.

[0170] Optionally, when some or all of the methods in the above embodiments are implemented by software, the electronic device 700 may also include only the processor 702. The memory 701 for storing programs is located outside the electronic device 700, and the processor 702 is connected to the memory via circuits / wires to read and execute the programs stored in the memory.

[0171] The processor 702 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.

[0172] The processor 702 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0173] The memory 701 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory may also include a combination of the above types of memory.

[0174] This disclosure also provides a computer-readable storage medium (also referred to as a readable storage medium) including computer program instructions, which, when executed by at least one processor of an electronic device, cause the electronic device to perform the color card generation method provided in any of the above method embodiments.

[0175] This disclosure also provides a computer-readable storage medium (also referred to as a readable storage medium) including computer program instructions, which, when executed by at least one processor of an electronic device, cause the electronic device to perform the image processing method provided in any of the above method embodiments.

[0176] This disclosure also provides a computer program product including computer program instructions stored in a readable storage medium. At least one processor of the electronic device can read the computer program instructions from the readable storage medium, and the at least one processor executes the computer program instructions to cause the electronic device to perform the color card generation method provided in any of the above method embodiments.

[0177] This disclosure also provides a computer program product including computer program instructions stored in a readable storage medium. At least one processor of the electronic device can read the computer program instructions from the readable storage medium, and the at least one processor executes the computer program instructions to cause the electronic device to perform the image processing method provided in any of the above method embodiments.

[0178] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0179] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating color cards, characterized in that, include: Each first standard color in the first color display standard is converted to a color in the second color display standard to obtain a first color set; wherein, the first color set includes each second standard color in the second color display standard; the color range of the first color display standard is smaller than the color range of the second color display standard; Channel separation is performed on each of the second standard colors included in the first color set to obtain the color components of each second standard color in the target color channel; Adjust the color components of each of the second standard colors in the target color channel to obtain the second color set; Based on the second color set, a target color chart in the second color display standard is generated, and the target color chart is used to achieve the target special effect.

2. The method according to claim 1, characterized in that, The step of converting each first standard color in the first color display standard to a color in the second color display standard to obtain the first color set includes: Acquire the light signal data corresponding to each of the first standard colors; Based on the photoelectric conversion function of the second color display standard, the light signal data corresponding to each of the first standard colors is converted to obtain the first color set.

3. The method according to claim 2, characterized in that, Before acquiring the light signal data corresponding to each of the first standard colors, the method further includes: Obtain the electrical signal data corresponding to each of the first standard colors; According to the electro-optical conversion function of the first color display standard, the electrical signal data corresponding to each of the first standard colors is converted to obtain the optical signal data corresponding to each of the first standard colors.

4. The method according to any one of claims 1 to 3, characterized in that, The step of adjusting the color components of each of the second standard colors in the target color channel to obtain the second color set includes: Obtain color chart configuration information, wherein the color chart configuration information is used to indicate the adjustment strategy corresponding to the color component of the target color channel; Based on the color card configuration information, the color component values ​​of each of the second standard colors in the target color channel are adjusted to obtain the second color set.

5. The method according to claim 4, characterized in that, The color card configuration information includes: the color components of each color in the target color channel of the second color set, and / or information on functions used to adjust the color components of each of the second standard colors in the target color channel.

6. The method according to any one of claims 1 to 3, characterized in that, The step of generating the target color chart in the second color display standard based on the second color set includes: Obtain the coordinate positions of each of the second standard colors in its respective standard color chart; Based on the correspondence between the second standard color and each color in the second color set, and the coordinate position of each second standard color in its respective standard color chart, obtain the coordinate position of each color in the second color set; The target color chart is obtained based on each color in the second color set and the coordinate position of each color in the second color set.

7. The method according to any one of claims 1 to 3, characterized in that, The target color channel belongs to the target color space, which includes at least one of the following: RGB color space, YUV color space, and HSV color space.

8. The method according to claim 1, characterized in that, The first color display standard includes the Standard Dynamic Range (SDR) color display standard, and the second color display standard includes the High Dynamic Range (HDR) color display standard.

9. An image processing method, characterized in that, include: The image material to be processed and the target color chart are obtained; wherein the target color chart is generated by the color chart generation method as described in any one of claims 1 to 8; For each pixel in the image material to be processed, the target color corresponding to the pixel is determined based on the original color of the pixel and the target color chart; both the original color of the pixel and the target color are colors in the second color display standard. The target image material is obtained based on the target color corresponding to each pixel.

10. The method according to claim 9, characterized in that, Determining the target color of the pixel in the second color display standard based on the original color of the pixel and the target color chart includes: Based on the original color and its coordinate position in the standard color chart, the coordinate position of the target color in the target color chart is obtained; Based on the coordinate position of the target color in the target color chart, the target color chart is queried to obtain the target color.

11. The method according to claim 9 or 10, characterized in that, The method further includes: According to the electro-optical conversion function corresponding to the second color display standard, the electrical signal data of the target color corresponding to each pixel in the target image material is converted into optical signal data to display the target image material.

12. A color card generating device, characterized in that, include: The color conversion module is used to convert each first standard color in the first color display standard into a color in the second color display standard to obtain a first color set; wherein, the first color set includes each second standard color in the second color display standard; the color range of the first color display standard is smaller than the color range of the second color display standard; The channel separation module is used to perform channel separation on each of the second standard colors included in the first color set, and obtain the color components of each second standard color in the target color channel. The adjustment module is used to adjust the color components of each of the second standard colors in the target color channel to obtain the second color set; The color chart generation module is used to generate a target color chart in the second color display standard based on the second color set, and the target color chart is used to achieve the target special effect.

13. An image processing apparatus, characterized in that, include: An acquisition module is used to acquire the image material to be processed and the target color chart; wherein the target color chart is generated by the color chart generation method according to any one of claims 1 to 8; The color mapping module is used to determine the target color corresponding to each pixel in the image material to be processed, based on the original color of the pixel and the target color chart; the original color of the pixel and the target color are both colors in the second color display standard. The image generation module is used to obtain target image material based on the target color corresponding to each pixel.

14. An electronic device, characterized in that, include: Memory and processor; The memory is configured to store computer program instructions; The processor is configured to execute the computer program instructions to implement the color card generation method as described in any one of claims 1 to 8, or to implement the image processing method as described in any one of claims 9 to 11.

15. A readable storage medium, characterized in that, include: Computer programs; When the computer program is executed by at least one processor of an electronic device, it implements the color card generation method as described in any one of claims 1 to 8, or the image processing method as described in any one of claims 9 to 11.

16. A computer program product, characterized in that, When the computer program product is run on a computer, the computer implements the color card generation method as described in any one of claims 1 to 8, or the image processing method as described in any one of claims 9 to 11.