Image processing method and related device
By metadata-driven conversion of the basic layer data and enhancement layer data of the HDR image, the abnormal problem in the HDR image transcoding process is solved, and higher quality image restoration and adaptation are achieved.
Patent Information
- Application Number
- PCT/CN2024/111111
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-06
- Filing Date
- 2024-08-09
- Publication Date
- 2025-02-20
AI Technical Summary
Existing HDR images or HDR videos may cause abnormalities during the transcoding process, affecting the user experience, and the prior art is difficult to effectively solve this problem.
By acquiring the basic layer data, enhancement layer data and metadata of the HDR image, converting the target data based on the metadata, determining a higher quality HDR image, and adapting to the display device.
It improves the restoration of HDR images, making them more suitable for display devices, and improves the user experience.
Smart Images

Figure CN2024111111_20022025_PF_FP_ABST
Abstract
Description
Image processing method and related device
[0001] This application claims priority to the Chinese patent application with application number 202311037386.9 filed with the State Intellectual Property Office of China on August 15, 2023, priority to the Chinese patent application with invention name “Encoding method and related equipment”, priority to the Chinese patent application with application number 202411074857.8 filed with the State Intellectual Property Office of China on August 6, 2024, and priority to the Chinese patent application with invention name “Image processing method and related equipment”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of coding and decoding, and more specifically to image processing methods and related devices. Background Art
[0003] Dynamic range is used in many fields to express the ratio of the maximum value to the minimum value of a variable. In digital images, dynamic range represents the ratio between the maximum grayscale value and the minimum grayscale value within the displayable range of the image. The dynamic range in nature is quite large. The brightness of the night scene under the starry sky is about 0.001cd / m2, and the brightness of the sun itself is as high as 1,000,000,000cd / m2. Such a dynamic range reaches the order of 1,000,000,000 / 0.001=1013. However, in real scenes in nature, the brightness of the sun and the brightness of starlight will not be obtained at the same time. For natural scenes in the real world, the dynamic range is between 10 -3 to 10 6 In most color digital images, each channel of red (R), green (G), and blue (B) is stored in an 8-bit byte. That is, the range of each channel is 0 to 255 gray levels. Here, 0 to 255 is the dynamic range of the image. In the real world, the dynamic range of the same scene is between 10 -3 to 10 6 The dynamic range of an ordinary picture or video is called low dynamic range (LDR).
[0004] HDR images or HDR videos may need to be transcoded during the distribution or transmission process. The current HDR transcoding solution is to directly transcode HDR images or HDR videos. After decoding, the HDR image or HDR video obtains HDR pixel values and HDR format identifiers and information. HDR pixel values usually need to be processed (such as image up- and down sampling, enhancement, etc.). The HDR format identifier and information, as well as the processed HDR pixel values are then sent to the encoder for re-encoding. The re-encoded HDR image or HDR video is distributed to other devices. This solution of directly transcoding HDR images or HDR videos (which can be called a "single-layer transcoding solution") may cause abnormalities in the transcoded HDR image or HDR video, affecting the user experience.
[0005] Therefore, how to provide a more efficient encoding / decoding solution is a problem that needs to be solved urgently in this field.
[0006] Summary of the Invention
[0007] The present application provides an image processing method and related equipment, which are conducive to more efficient and reasonable encoding.
[0008] In a first aspect, an embodiment of the present application provides an image processing method, comprising: acquiring first base layer data, first enhancement layer data, and first metadata, wherein the first base layer data is base layer data corresponding to a first HDR image, and the first enhancement layer data is enhancement layer data corresponding to the first HDR image; converting target data according to the first metadata to obtain target conversion data, the target data being the first base layer data and / or the first enhancement layer data; and determining a second HDR image according to the target conversion data.
[0009] Through the above technical solution, when processing the dual-layer image of the HDR image, the base layer data and / or the enhancement layer data can be first converted according to the metadata, so that the final synthesized HDR image has a higher degree of restoration and is more compatible with the display device.
[0010] In combination with the first aspect, in a possible implementation of the first aspect, converting the target data according to the first metadata includes: determining to convert the target data according to the first metadata, and then converting the target data to obtain target converted data.
[0011] Through the above technical solution, when processing the dual-layer image of the HDR image, the base layer data and / or the enhancement layer data can be first converted according to the metadata, and then the base layer data and / or the enhancement layer data can be converted according to the determination result, so that the final synthesized HDR image has a higher degree of restoration and is more compatible with the display device.
[0012] In combination with the first aspect, in a possible implementation of the first aspect, the first metadata includes conversion location information, and the conversion location information is used to indicate the location where the conversion occurs. The converting of the target data according to the first metadata includes: converting the target data according to the conversion location information.
[0013] By indicating the conversion location through metadata, the flexibility of target data processing can be improved.
[0014] In combination with the first aspect, in a possible implementation of the first aspect, the first metadata includes first conversion judgment information, and the first indication information is used to indicate that the target data needs to be converted; determining to convert the target data based on the first metadata includes: converting the target data based on the first conversion judgment information.
[0015] In combination with the first aspect, in a possible implementation manner of the first aspect, the conversion includes one or more of the following: color space conversion, color gamut conversion, or color compensation.
[0016] In combination with the first aspect, in a possible implementation of the first aspect, when the target data is the first basic layer data and the conversion includes the color space conversion, the target data is converted to obtain target conversion data, including: performing the color space conversion on the first basic layer data to obtain the target conversion data, and the color space of the target conversion data is an RGB color space.
[0017] In combination with the first aspect, in a possible implementation of the first aspect, when the target data is the first basic layer data and the conversion includes the color gamut conversion, the target data is converted to obtain target conversion data, including: performing the color gamut conversion on the first basic layer data through T() to obtain the target conversion data, where T() is a default matrix or a conversion matrix indicated by the first metadata.
[0018] In combination with the first aspect, in a possible implementation of the first aspect, when the target data includes the first enhancement layer data, the conversion further includes channel conversion, and the channel conversion is used to restore the channel of the first enhancement layer data to the original channel.
[0019] In combination with the first aspect, in a possible implementation manner of the first aspect, the first metadata further includes conversion parameters used when performing the conversion.
[0020] In combination with the first aspect, in a possible implementation manner of the first aspect, when the conversion includes the color compensation, the conversion parameters include: a color compensation matrix; a conversion function; or a compensation value and a compensation method.
[0021] In combination with the first aspect, in a possible implementation manner of the first aspect, the method further includes: performing color gamut conversion and / or color compensation on the second HDR image.
[0022] In a second aspect, an embodiment of the present application provides an image processing method, the method comprising: determining, based on an acquired first HDR image, first base layer data, first enhancement layer data, and first metadata corresponding to the first HDR image, wherein the first metadata is used to convert target data, the target object including the first base layer data and / or the first enhancement layer data; encoding the target data to obtain a code stream.
[0023] The above technical solution can improve coding efficiency when processing a dual-layer image of an HDR image by transmitting information for determining conversion of base layer data and / or enhancement layer data through metadata. The decoding side can determine whether to convert the base layer data and / or enhancement layer data based on the metadata, and convert the base layer data and / or enhancement layer data based on the determination result, so that the final synthesized HDR image has a higher degree of restoration and is more compatible with the display device.
[0024] In combination with the second aspect, in a possible implementation manner of the second aspect, the first metadata includes conversion position information, where the conversion position information is used to indicate a position where the conversion occurs.
[0025] In combination with the second aspect, in a possible implementation of the second aspect, the first metadata includes first conversion judgment information, and the first indication information is used to indicate that the first basic layer data and / or the first enhancement layer data need to be converted.
[0026] In combination with the second aspect, in a possible implementation manner of the second aspect, the conversion includes one or more of the following: color space conversion, color gamut conversion, or color compensation.
[0027] In combination with the second aspect, in a possible implementation manner of the second aspect, the first metadata further includes conversion parameters used when performing the conversion.
[0028] In combination with the second aspect, in a possible implementation manner of the second aspect, when the conversion includes the color gamut conversion, the conversion parameter includes a conversion matrix.
[0029] In combination with the second aspect, in a possible implementation manner of the second aspect, when the conversion includes the color compensation, the conversion parameters include: a color compensation matrix; a conversion function; or a compensation value and a compensation method.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, which includes a unit for implementing the first aspect or any possible implementation manner of the first aspect.
[0031] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a unit for implementing the second aspect or any possible implementation method of the second aspect.
[0032] In a fifth aspect, an embodiment of the present application provides a computer device, which includes a processor, which is used to couple with a memory, read and execute instructions and / or program codes in the memory to execute the first aspect or any possible implementation of the first aspect.
[0033] In a sixth aspect, an embodiment of the present application provides a computer device, which includes a processor, which is used to couple with a memory, read and execute instructions and / or program codes in the memory to execute the second aspect or any possible implementation of the second aspect.
[0034] In the seventh aspect, an embodiment of the present application provides a chip system, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the first aspect or any possible implementation method of the first aspect.
[0035] In an eighth aspect, an embodiment of the present application provides a chip system, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the second aspect or any possible implementation method of the second aspect.
[0036] In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program code. When the program code stored in the computer storage medium is run on a computer, the computer executes the first aspect or any possible implementation of the first aspect.
[0037] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program code. When the program code stored in the computer storage medium is run on a computer, the computer executes the second aspect or any possible implementation of the second aspect.
[0038] In the eleventh aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when running on a computer, enables the computer to execute the second aspect or any possible implementation of the second aspect.
[0039] In a twelfth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when running on a computer, enables the computer to execute the second aspect or any possible implementation of the second aspect.
[0040] In a thirteenth aspect, an embodiment of the present application provides a code stream, which is determined according to the second aspect or any possible implementation manner of the second aspect.
[0041] In a fourteenth aspect, an embodiment of the present application provides a code stream, which includes first base layer data, first enhancement layer data, and first metadata, wherein the first metadata is used to convert the first base layer data and / or the first enhancement layer data.
[0042] In a fifteenth aspect, an embodiment of the present application provides a device for storing a code stream, which is used to store the code stream of the thirteenth aspect or the fourteenth aspect.
[0043] In a sixteenth aspect, an embodiment of the present application provides a device for transmitting a code stream, the device comprising: a transmitter and a receiver, the receiver being used to receive a code stream generated according to the method described in the second aspect above, and the transmitter being used to send the code stream to a client device via a transmission medium.
[0044] In the seventeenth aspect, an embodiment of the present application provides a device for transmitting a code stream, the device comprising: a transmitter and at least one storage medium, the at least one storage medium being used to store the code stream generated according to the method described in the second aspect above, the transmitter being used to obtain the code stream from the storage medium and send the code stream to a client device via a transmission medium.
[0045] In aspect 18, an embodiment of the present application provides a system for distributing code streams, the system comprising: at least one storage medium for storing the code stream generated according to the method described in aspect 2 above, a streaming media server for obtaining a target code stream from the at least one storage medium and sending the target code stream to a client device, wherein the streaming media server comprises a content server or a content distribution server. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a schematic diagram of dynamic range mapping.
[0047] Figure 2 is an image of the PQ photoelectric transfer function.
[0048] Figure 3 is an image of the HLG photoelectric transfer function.
[0049] FIG4 is an image of the SLF photoelectric transfer function.
[0050] FIG5 is a schematic block diagram of a coding solution system used in an embodiment of the present application.
[0051] FIG6 is a block diagram of a content providing system for implementing content distribution services used in an embodiment of the present application.
[0052] FIG7 is a schematic diagram of a workflow of a streaming media system applicable to an embodiment of the present application.
[0053] FIG8 is a schematic diagram illustrating an exemplary end-to-end process of the present application.
[0054] FIG9 describes an exemplary streaming media system architecture of the present application.
[0055] FIG10 is a schematic diagram of a possible system architecture applicable to an embodiment of the present application.
[0056] FIG11 is a flow chart of an image processing process provided according to an embodiment of the present application.
[0057] FIG12 is a schematic flowchart of an image processing method provided according to an embodiment of the present application.
[0058] FIG13 is a schematic flowchart of an image processing method provided according to an embodiment of the present application.
[0059] FIG14 is a schematic flowchart of an image processing method provided according to an embodiment of the present application.
[0060] FIG15 is a schematic structural block diagram of an electronic device provided according to an embodiment of the present application.
[0061] FIG16 is a schematic structural block diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0062] The technical solution in this application will be described below with reference to the accompanying drawings.
[0063] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0064] First, in order to facilitate understanding of the embodiments of the present application, some concepts or terms involved in the embodiments of the present application are explained.
[0065] Color value: A numerical value corresponding to a specific image primary color component (such as R, G, B, or Y).
[0066] Digital code value: A digital representation of an image signal. Digital code value is used to represent nonlinear primary color values.
[0067] Linear color value: A linear color value that is proportional to the light intensity. In an optional case, its value should be normalized to [0,1], referred to as E.
[0068] Nonlinear primary color value: A nonlinear primary color value is a normalized digital expression of image information, which is proportional to the digital coding value. In an optional case, its value should be normalized to [0,1], referred to as E′.
[0069] Electro-optical transfer function (EOTF): A conversion relationship from nonlinear primary color values to linear primary color values.
[0070] Metadata: Data that describes the video source information carried in the video signal.
[0071] Dynamic metadata: metadata associated with each frame of an image that changes from frame to frame.
[0072] Static metadata: Metadata associated with an image sequence that remains unchanged within the image sequence.
[0073] Luminance signal (luma): represents the combination of nonlinear primary color signals, symbolized by Y'.
[0074] Luminance mapping: The luminance of the source image is mapped to the luminance of the target system.
[0075] Display adaptation: Processing of the video signal to adapt it to the display characteristics of the target display.
[0076] Source picture: The image input to the HDR pre-processing stage.
[0077] Mastering display: A reference display used when editing and producing video signals to determine the effects of video editing and production.
[0078] Linear scene light signal: In HDR video technology, the HDR video signal with content as scene light refers to the scene light captured by the camera / camera sensor, which is generally a relative value; the linear scene light signal is encoded by hybrid log-gamma (HLG) to obtain the HLG signal, which is a scene light signal and is nonlinear; the scene light signal generally needs to be converted into a display light signal through OOTF before being displayed on the display device.
[0079] Linear display light signal: In HDR video technology, the HDR video signal with content as display light refers to the display light emitted by the display device, generally expressed as an absolute value, measured in nits. The linear display light signal is encoded using perceptual quantization (PQ) to obtain a PQ signal, which is a nonlinear display light signal. The display light signal is generally displayed on the display device according to its absolute brightness.
[0080] Opto-optical transfer function (OOTF): In video technology, the curve that converts one optical signal into another.
[0081] Dynamic range: The ratio of the maximum brightness to the minimum brightness in a video signal.
[0082] Luma-chroma-chroma (LCC) separates the three components of a video signal into luminance and chrominance.
[0083] The optical-electro transfer function (OETF) represents the conversion relationship between linear signals and nonlinear signals of image pixels. Currently, the commonly used OETFs include the following three:
[0084] The perceptual quantizer (PQ), hybrid log-gamma (HLG), and scene luminance fidelity (SLF) OTFs are defined by the audio and video coding standard (AVS).
[0085] Dynamic range is used in many fields to express the ratio of the maximum value to the minimum value of a variable. In digital images, dynamic range represents the ratio between the maximum grayscale value and the minimum grayscale value within the displayable range of the image. The dynamic range in nature is quite large. The brightness of the night scene under the starry sky is about 0.001cd / m2, and the brightness of the sun itself is as high as 1,000,000,000cd / m2. Such a dynamic range reaches the order of 1,000,000,000 / 0.001=1013. However, in real scenes in nature, the brightness of the sun and the brightness of starlight will not be obtained at the same time. For natural scenes in the real world, the dynamic range is between 10 -3 to 10 6 In most color digital images, each channel of R, G, and B is stored in an 8-bit byte. That is, the range of each channel is 0 to 255 gray levels. Here, 0 to 255 is the dynamic range of the image. In the real world, the dynamic range of the same scene is between 10 and 255. -3 to 10 6 The range of real-world dynamic range is called high dynamic range (HDR), while the dynamic range of ordinary images is called low dynamic range (LDR). The imaging process of a digital camera is actually a mapping from the high dynamic range of the real world to the low dynamic range of the photograph. This is often a nonlinear process.
[0086] FIG1 is a schematic diagram of dynamic range mapping.
[0087] The PQ photoelectric transfer function (PQPTF) is a perceptually quantized PQPTF based on the human eye's brightness perception model. See Figure 2, which shows an image of the PQPTF. The PQPTF represents the conversion of linear signal values from image pixels to nonlinear signal values in the PQ domain.
[0088] The HLG photoelectric transfer function (PTF) is an improvement on the traditional gamma curve. See Figure 3, which shows an image of the HLG PTF. The HLG PTF uses a traditional gamma curve in the low-frequency range and supplements it with a logarithmic curve in the high-frequency range. The HLG PTF represents the conversion between linear signal values in an image pixel and nonlinear signal values in the HLG domain.
[0089] The SLF photoelectric transfer function (SLF) is an optimal curve obtained based on the HDR scene brightness distribution, while satisfying the optical characteristics of the human eye. See Figure 4, which shows an image of the SLF photoelectric transfer function. The SLF photoelectric transfer curve represents the conversion relationship between the linear signal value of an image pixel and the nonlinear signal value in the SLF domain.
[0090] Linear space: In this application, linear space refers to the space where linear light signals are located.
[0091] Nonlinear space: In this application, nonlinear space refers to the space resulting from the conversion of linear light signals using nonlinear curves. Commonly used nonlinear curves for HDR include the PQ EOTF-1 curve and the HLG OETF curve, while common nonlinear curves for SDR include the gamma curve. It is generally believed that linear light signals encoded using these nonlinear curves are visually linear relative to the human eye. It should be understood that nonlinear space can be considered a visually linear space.
[0092] Gamma correction: Gamma correction is a method of nonlinearly editing the tonal range of an image. It detects dark and light portions of the image signal and increases their ratio, thereby improving image contrast. The photoelectric conversion characteristics of current display screens, photographic film, and many electronic cameras can be nonlinear. The relationship between the output and input of these nonlinear components can be expressed as a power function: output = (input)γ.
[0093] The nonlinear conversion of the color values output by the device is due to the nonlinear nature of the human visual system. Humans perceive visual stimuli through comparison. External stimuli are intensified at a certain rate, resulting in a uniform increase in the stimulus. Therefore, physical quantities that increase in geometric progression appear uniform to human perception. To display input colors in accordance with human visual principles, the aforementioned nonlinear conversion using the power function is necessary, converting linear color values to nonlinear ones. The gamma value, γ, can be determined based on the photoelectric conversion curve in the color space.
[0094] Color space: Color can be the different perceptions of the eye for light of different frequencies, or it can represent objectively existing light of different frequencies. A color space is a range of colors defined by a coordinate system established by humans to represent colors. A color gamut and a color model together define a color space. A color model is an abstract mathematical model that represents color using a set of color components. Color models can include, for example, the three primary color modes (red, green, and blue, RGB) and the four-color mode (cyan, magenta, and yellow keyplate, CMYK). A color gamut refers to the total number of colors that a system can produce. For example, Adobe RGB and sRGB are two different color spaces based on the RGB model. Each device, such as a monitor or printer, has its own color space and can only generate colors within its color gamut. When an image is moved from one device to another, the color of the image may change on different devices because each device converts and displays RGB or CMYK according to its own color space.
[0095] RGB space refers to a space that uses the brightness of the three primary colors of red, green, and blue to quantitatively represent video signals; YCC space is a color space that represents the separation of brightness and color. The three components of the YCC space video signal represent brightness, chroma, and chroma, respectively. Common YCC space video signals include YUV, YCbCr, ICtCp, etc.
[0096] To obtain images with a higher dynamic range, the image bit width is usually greater than or equal to 10 bits. Common coding standards that support HDR include H.266, H.265, and the High Efficiency Image Format (HEIF). The common Joint Photographic Experts Group (JPEG) and H.264 only support 8-bit encoding, so they cannot well support HDR video and HDR images.
[0097] HDR images or videos may require transcoding during distribution or transmission. Current HDR transcoding solutions directly transcode HDR images or videos. After decoding, the HDR image or video is decoded to obtain HDR pixel values, along with HDR format identifiers and information. These HDR pixel values typically undergo processing (such as image upsampling, downsampling, and enhancement). The HDR format identifier and information, along with the processed HDR pixel values, are then sent to the encoder for re-encoding. The re-encoded HDR image or video is then distributed to other devices. This direct transcoding solution (referred to as a "single-layer transcoding solution") can cause anomalies in the transcoded HDR image or video, impacting the user experience. This is because transcoding (decoding and then re-encoding) a single-layer HDR stream relies on the transcoding system to correctly transmit all HDR information obtained by the decoder to the encoder. If this information is lost, the transcoding system may not re-encode the video in the correct format, resulting in an erroneous bitstream. This can cause visual anomalies when viewed by users, severely impacting the user experience. Because many of the distribution and transcoding systems on the market have not been upgraded to support the correct transmission of HDR information from decoding to encoding, mainstream mobile phone and application manufacturers have received many user complaints in this regard.
[0098] For ease of description, the term "HDR object" is used in some embodiments of this application. An HDR object can be a static HDR image (also known as an HDR image, HDR photo, HDR picture, etc.), an HDR video, or other types of dynamic HDR images, or a frame within an HDR video or dynamic HDR image.
[0099] It is understood that for ease of description, some embodiments of the present application use HDR images as an example to introduce the technical solutions of the present application. However, it is understood that these embodiments can be applied not only to HDR images, but also to other HDR objects, such as HDR videos, dynamic HDR images, and a frame of an HDR video or dynamic HDR image.
[0100] The following describes the codec system used in the present application in conjunction with FIG5 , which is a schematic block diagram of a codec system used in an embodiment of the present application, such as a video codec system 10 (or simply codec system 10) that can utilize the techniques of the present application. The video encoder 20 (or simply encoder 20) and video decoder 30 (or simply decoder 30) in the video codec system 10 represent devices that can be used to perform various techniques according to the various examples described in this application.
[0101] As shown in FIG5 , the codec system 10 includes a source device 12 , which is configured to provide coded data such as coded image data 21 to a target device 14 for decoding the coded data.
[0102] The source device 12 includes an encoder 20 . Optionally, the source device 12 may further include an image source 16 , a pre-processor 18 (or a pre-processing unit), and a communication interface or a communication unit 22 .
[0103] The image source 16 may include or may be any type of image capture device for capturing real-world images, etc., and / or any type of image generation device, such as a computer graphics processor for generating computer-animated images, or any type of device for acquiring and / or providing real-world images, computer-generated images (e.g., screen content, virtual reality (VR) images, and / or any combination thereof (e.g., augmented reality (AR) images). The image source may be any type of memory or storage that stores any of the above images.
[0104] In order to distinguish the processing performed by the pre-processor 18 or the pre-processing unit 18 , the image or image data 17 may also be referred to as a raw image or raw image data 17 .
[0105] The preprocessor 18 is configured to receive (raw) image data 17 and preprocess the image data 17 to obtain preprocessed image data 19 or preprocessed image data 19. For example, the preprocessing performed by the preprocessor 18 may include cropping, color format conversion (e.g., from RGB to YCbCr), color grading, or denoising. It will be appreciated that the preprocessor 18 may be an optional component.
[0106] The video encoder 20 is configured to receive the pre-processed image data 19 and provide encoded image data 21 .
[0107] The communication interface 22 in the source device 12 can be used to receive the encoded image data 21 and send the encoded image data 21 (or any other processed version) to another device such as the target device 14 or any other device through the communication channel 13 for storage or reconstruction.
[0108] Target device 14 includes a decoder 30 (eg, video decoder 30 ) and, in addition or alternatively, may include a communication interface or communication unit 28 , a post-processor 32 (or post-processing unit 32 ), and a display device 34 .
[0109] The communication interface 28 in the target device 14 is used to receive the encoded image data 21 (or any other processed version) directly from the source device 12 or from any other source device such as a storage device, for example, the storage device is an encoded image data storage device, and provide the encoded image data 21 to the decoder 30.
[0110] Communication interface 22 and communication interface 28 may be used to transmit or receive encoded image data 21 or encoded data via a direct communication link between source device 12 and destination device 14, such as a direct wired or wireless connection, or via any type of network, such as a wired network, a wireless network, any combination thereof, any type of private network, a public network, or any combination thereof. For example, communication interface 22 may be used to encapsulate encoded image data 21 into a suitable format, such as a message, and / or process the encoded image data using any type of transport coding or processing for transmission over a communication link or network. Communication interface 28 corresponds to communication interface 22 and may, for example, be used to receive the transmitted data and process the transmitted data using any type of corresponding transport decoding or processing and / or decapsulation to obtain the encoded image data 21. Both the communication interface 22 and the communication interface 28 may be configured as a unidirectional communication interface as indicated by the arrow pointing from the source device 12 to the corresponding communication channel 13 of the target device 14 in FIG5 , or a bidirectional communication interface, and may be used to send and receive messages, etc., to establish a connection, confirm and exchange any other information related to the communication link and / or data transmission, such as the transmission of encoded image data, etc.
[0111] The decoder 30 is configured to receive the encoded image data 21 and provide decoded image data 31 or a decoded image 31 .
[0112] The post-processor 32 in the target device 14 is configured to post-process the decoded image data 31 (also referred to as reconstructed image data), such as the decoded image, to obtain post-processed image data 33, such as the post-processed image. The post-processing performed by the post-processor 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color grading, cropping, or resampling, or any other processing for generating the decoded image data 31 for display on a display device 34 or the like.
[0113] The display device 34 in the target device 14 is configured to receive the post-processed image data 33 and display the image to a user or viewer. The display device 34 may be or include any type of display for displaying the reconstructed image, such as an integrated or external display screen or monitor. For example, the display screen may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro-LED display, a liquid crystal on silicon (LCoS) display, a digital light processor (DLP), or any other type of display screen.
[0114] Although FIG5 shows the source device 12 and the target device 14 as separate devices, device embodiments may also include both the source device 12 and the target device 14 or the functions of both the source device 12 and the target device 14, that is, both the source device 12 or the corresponding functions and the target device 14 or the corresponding functions. In these embodiments, the source device 12 or the corresponding functions and the target device 14 or the corresponding functions may be implemented using the same hardware and / or software or through separate hardware and / or software or any combination thereof.
[0115] According to the description, the existence and (accurate) division of different units or functions in the source device 12 and / or the target device 14 shown in FIG. 5 may vary depending on actual devices and applications, which is obvious to those skilled in the art.
[0116] The content providing system of the content distribution service used in the present application is described below in conjunction with Figure 6. Figure 6 is a block diagram of a content providing system for implementing the content distribution service used in an embodiment of the present application. The content providing system 2100 includes a capture device 2102, a terminal device 2106, and an (optional) display 2126. The capture device 2102 communicates with the terminal device 2106 via a communication link 2104. The communication link may include the above-mentioned communication channel 13. The communication link 2104 includes but is not limited to WiFi, Ethernet, wired, wireless (3G / 4G / 5G), USB, or any combination thereof.
[0117] The capture device 2102 may encode the captured data using the encoding method described in the embodiments of the present application. Alternatively, the capture device 2102 may distribute the captured data to a streaming media server (not shown), which encodes the data and transmits the encoded data to the terminal device 2106. The capture device 2102 includes, but is not limited to, a camera, a smartphone or tablet computer, a computer or laptop computer, a video conferencing system, a personal digital assistant (PDA), an in-vehicle device, or any combination thereof. In some embodiments, the capture device 2102 may include the source device 12 described above.
[0118] The terminal device 2106 in the content providing system 2100 receives and regenerates the decoded data. The terminal device 2106 can be a device with data reception and recovery capabilities, such as a smart phone or tablet computer, a computer / laptop 2110, a network video recorder (NVR) / digital video recorder (DVR) 2112, a television 2114, a set-top box (STB) 2116, a video conferencing system 2118, a video surveillance system 2120, a personal digital assistant 2122, an in-vehicle device 2124, or any combination thereof, or such a device capable of decoding the above-mentioned encoded data. In some embodiments, the terminal device 2106 can include the above-mentioned target device 14. The terminal device 2106 can decode the received data. In some embodiments, the terminal device 2106 can be a video playback application, a streaming media playback application, a streaming media playback platform, or a live broadcast platform running on the terminal device.
[0119] For end devices with displays, such as smartphones or tablets, computers or laptops 2110, NVRs / DVRs 2112, TVs 2114, PDAs 2122, or in-vehicle devices 2124, the end device can send the decoded data to its display. For end devices without displays, such as STBs 2116, video conferencing systems 3118, or video surveillance systems 2120, the device can be connected to an external display 2126 to receive and display the decoded data.
[0120] When each device in this system performs encoding or decoding, the image encoding device or image decoding device shown in the embodiments of the present application can be used.
[0121] The following describes a streaming media system applicable to the embodiment of the present application in conjunction with Figure 7. Figure 7 is a schematic diagram of a workflow of a streaming media system applicable to the embodiment of the present application.
[0122] The streaming media system includes a content creation module that generates the required content data, such as video or audio. The streaming media system also includes a video encoding module that encodes the generated content through an encoder. The streaming media system also includes a video stream transmission module that transmits the encoded video in the form of a code stream. Optionally, the format of the video stream can be converted into a code stream format of a commonly used transmission protocol for OTT (over-the-top) devices, for example, the protocol includes but is not limited to Real Time Streaming Protocol (RTSP), Hyper Text Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG HTTP Dynamic Adaptive Streaming over HTTP (MPEG-DASH), Real-time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP) or any combination thereof. Optionally, the video stream can be stored to store the original format of the video stream and / or the converted multiple code stream formats for easy use. Furthermore, the streaming system also includes a video stream encapsulation module for encapsulating the video stream to generate an encapsulated video stream. The encapsulated video stream can be referred to as a video streaming package. Exemplarily, the video streaming package can be generated based on a transcoded video stream or a stored video stream. Furthermore, the streaming system also includes a content distribution network (CDN) for distributing the video streaming package to multiple OTT devices, such as mobile phones, computers, tablets, and home projectors.
[0123] It should be noted that video encoding, video streaming transmission, video stream transcoding, video stream storage, video streaming package generation and content distribution network can all be implemented on cloud servers.
[0124] An exemplary end-to-end process diagram of the present application is described below with reference to FIG8 .
[0125] As shown in Figure 8, the original video file (also known as the master file) is obtained through procedures such as material production (e.g., shooting a video, producing a computer graphics (CG) video, etc.), editing, and color grading. Then, based on the original video file, the corresponding dynamic metadata is obtained. After encoding the original video file and the dynamic metadata, a compressed video is obtained. The compressed video is distributed / transmitted to a terminal device (e.g., a computer, set-top box, mobile phone, tablet computer, etc.). The terminal device decodes the compressed video to obtain a decompressed video, which is then displayed to the user through a display device (e.g., a monitor, a TV, etc.).
[0126] An exemplary streaming media system architecture of the present application is described below in conjunction with FIG9 . The streaming media system architecture includes: a client device, a content distribution network, and a cloud server.
[0127] The user on the client device sends a play or playback request to the cloud platform.
[0128] The cloud platform makes a decision, responds to the client device, and sends the address of the client-requested content on the CDN to the client device.
[0129] The client device then requests the CDN to play the content based on the address, and the CDN provides the content to the client device, ultimately completing the client device's request.
[0130] The following describes the system architecture applicable to the embodiment of the present application in conjunction with Figure 10. Figure 10 is a schematic diagram of a possible system architecture applicable to the embodiment of the present application. The system architecture of the embodiment of the present application includes: front-end equipment, transmission links, and terminal display equipment.
[0131] Among them, the front-end equipment is used to capture or produce HDR / SDR content (for example, HDR / SDR video or images).
[0132] In a possible embodiment, the front-end device can also be used to extract corresponding metadata from the HDR content. The metadata may include global mapping information, local mapping information, and dynamic metadata and static metadata corresponding to the HDR content. The front-end device can send the HDR content and metadata to the terminal display device via a transmission link. Specifically, the HDR content and metadata can be transmitted in the form of one data packet, or respectively in two data packets, which is not specifically limited in the embodiment of the present application.
[0133] Optionally, the terminal display device can be used to receive metadata and HDR content, and extract the global mapping information, local mapping information, and the terminal display device information contained in the corresponding metadata according to the HDR content, obtain a mapping curve to perform global tone mapping and local tone mapping on the HDR content, convert it into display content adapted for the HDR display device or SDR device in the terminal display device, and display it. It should be understood that in different embodiments, the terminal display device may include a display device with a display capability of a lower dynamic range or a higher dynamic range than the HDR content generated by the front-end device, and this application is not limited thereto.
[0134] Optionally, the front-end device and the terminal display device in this application can be independent and different physical devices. For example, the front-end device can be a video capture device or a video production device, where the video capture device can be a video camera, a camera, an image rendering machine, etc. The terminal display device can be a device with video playback function, such as virtual reality (VR) glasses, a mobile phone, a tablet, a television, a projector, etc.
[0135] Optionally, the transmission link between the front-end device and the terminal display device can be a wireless connection or a wired connection, wherein the wireless connection can adopt technologies such as long term evolution (LTE), fifth generation (5G) mobile communications, and future mobile communications. Wireless connections can also include wireless fidelity (WiFi), Bluetooth, near field communication (NFC), and other technologies. Wired connections can include Ethernet connections, local area network connections, etc. There is no specific limitation on this.
[0136] The present application may also integrate the functions of the front-end device and the terminal display device into the same physical device, for example, a terminal device such as a mobile phone or tablet with a video capture function. The present application may also integrate some functions of the front-end device and some functions of the terminal display device into the same physical device. This is not specifically limited.
[0137] Figure 11 is a schematic diagram of an image processing method provided according to an embodiment of the present application. As shown in Figure 11, the image processing method provided by the embodiment of the present application can be applied at a decoding end.
[0138] The decoding module (also called decoder) can obtain base layer data, enhancement layer data and metadata from the received bitstream. Then, the decoding module can synthesize the base layer data and enhancement layer data to obtain an HDR image.
[0139] The graphics processing module can process the HDR image and send the processed HDR image and base layer data to the display module. The graphics processing module can also process the base layer data and send the processed HDR image and base layer data to the display module.
[0140] The display module may present an HDR image based on the received data (eg, the processed HDR image, or the processed HDR image and processed base layer data, etc.).
[0141] For the sake of convenience of description, the HDR image obtained by the decoding module based on the basic layer data and the enhancement layer data can be called HDR image 1, the HDR image obtained after the graphics processing module processes the HDR image 1 can be called HDR image 2, and the HDR image displayed by the display module can be called HDR image 3.
[0142] The base layer data, which may also be referred to as a base layer image, a base image or a basic image, may be an SDR image or an HDR image with a lower dynamic range.
[0143] The enhancement layer data, also known as enhancement data, enhancement layer image, or enhancement image, may include some image detail information. The image detail information contained in the enhancement layer data is then used to supplement the base layer data, thereby synthesizing an HDR image with better contrast (i.e., HDR image 1 mentioned above).
[0144] The dynamic range of the base layer data is smaller than the dynamic range of the HDR image (ie, HDR image 1) determined based on the base layer data and the enhancement layer data.
[0145] For example, in some embodiments, the base layer data may be an SDR image, and the HDR image 1 may be an HDR image.
[0146] For another example, in some other embodiments, the base layer data may be an HDR image, but the dynamic range of the HDR image is smaller than the dynamic range of the HDR image 1 .
[0147] For example, assuming the dynamic range of the base layer data is DR x1 to DR x2 , the dynamic range of HDR image 1 is DR y1 to DR y2 In some embodiments, DR y1 Less than DR x1 , DR y2 Greater than DR x2 In other embodiments, DR y1 Less than DR x1 , DR y2 Equal to DR x2 In other embodiments, DRy1 Equal to DR x1 , DR y2 Greater than DR x2 In other words, the base layer data can be considered to be an image with a smaller dynamic range than the HDR image 1.
[0148] FIG12 is a schematic flow chart of an image processing method according to an embodiment of the present application. The method shown in FIG12 can be performed by an electronic device or a component (such as a chip, SoC, etc.) in an electronic device. The electronic device can be the target device 14 in FIG5 , the terminal device 2106 as shown in FIG6 , or the terminal display device as shown in FIG10 . For ease of description, the method embodiment shown in FIG12 is described below as being performed by an electronic device.
[0149] 1201. Acquire first base layer data, first enhancement layer data, and first metadata.
[0150] The first base layer data is the base layer data corresponding to the first HDR image, and the first enhancement layer data is the enhancement layer data corresponding to the first HDR image. In other words, the first base layer data and the first enhancement layer data are the base layer data and enhancement layer data corresponding to the same HDR image.
[0151] The first base layer data, the first enhancement layer data, and the first metadata can be obtained from a bitstream.
[0152] For example, if the code stream is obtained by encoding using HEVC or VVC, the electronic device can obtain the first metadata from the SEI of HEVC or VVC. For another example, in some embodiments, if the code stream is obtained by encoding using AVC / H.264, the electronic device can obtain the first metadata from the NAL unit or the reserved packet unit. For another example, in some embodiments, the electronic device can obtain the first metadata from the APP extension information encapsulated in the JPEG file interchange format (JPEG file interchange format). For another example, in some embodiments, the electronic device can obtain the first metadata from the data segment encapsulated by the Moving Picture Experts Group (MPEG)-Part 14 (MPEG-4 part 14, MP4).
[0153] The electronic device may decode the code stream to obtain the first base layer data, the first enhancement layer data, and the first metadata. The electronic device may decode the received code stream through a decoder (e.g., HEVC, JPEG, HEIF, etc.) to obtain the first base layer data, the first enhancement layer data, and the first metadata.
[0154] The embodiment of the present application does not limit the code stream format of the first base layer data and the first enhancement layer data. In terms of color space, it can be YUV, RGB, Lab, HSV, etc. In terms of data bit width, it can be 8 bits, 10 bits, or 12 bits, etc. In terms of value domain, it can be PQ, HLG, gamma, or log, etc.
[0155] 1202. Convert target data according to the first metadata to obtain target converted data.
[0156] The target data may be the first base layer data and / or the first enhancement layer data. That is, in some embodiments, the electronic device may convert the first base layer data based on the first metadata. In other embodiments, the electronic device may convert the first enhancement layer data based on the first metadata. In other embodiments, the electronic device may determine to convert the first base layer data and the first enhancement layer data based on the first metadata.
[0157] In some embodiments, the conversion performed on the target data may include one or more of the following: color space conversion, color gamut conversion, or color compensation.
[0158] In some embodiments, the first metadata may include conversion location information. The conversion location information is used to indicate the location where the conversion occurs. For example, the location where the conversion occurs may be before determining the second HDR image and / or after determining the second HDR image. If the location where the conversion occurs occurs before determining the second HDR image, the target data may be converted. If the location where the conversion occurs occurs after determining the second HDR image, the second HDR image may be converted.
[0159] In other embodiments, the location where the conversion occurs may be pre-set or pre-negotiated. In this case, the corresponding target data may be converted directly according to the pre-set or pre-negotiated location where the conversion occurs. For example, if the pre-set or pre-negotiated location is before the second HDR image is determined, then the target data may be converted before the second HDR image is determined; if the pre-set or pre-negotiated location is after the second HDR image is determined, then the conversion may be performed on the determined second HDR image after the second HDR image is determined.
[0160] In some embodiments, the target data is determined based on the conversion position information. For example, if the conversion occurs after the second HDR image is determined, the target data includes the second HDR data. For another example, if the conversion occurs before the second HDR image is determined, the target data includes the first base layer data and / or the first enhancement layer data.
[0161] In some embodiments, the first metadata may include conversion judgment information, which is used to indicate whether to convert the target data. Exemplarily, according to the content of the indication, the conversion judgment information can be divided into first conversion judgment information or second conversion judgment information, the first conversion judgment information is used to indicate whether to convert the target data, and the second conversion judgment information is used to indicate not to convert the target data. For example, if the conversion indication carried in the first metadata is the first conversion judgment information, then the target data can be converted, and then a second HDR image can be obtained based on the converted data; if the conversion judgment information carried in the first metadata is the second conversion judgment information, then there is no need to convert the target data.
[0162] In other embodiments, whether to convert the target data may also be predetermined, pre-negotiated, or determined based on the target data. For example, in some embodiments, it may be determined by default or pre-set that the first base layer data is always converted while the first enhancement layer data is not converted (in this case, the target data is the first base layer data). For another example, in other embodiments, it may be determined based on the target data whether the target data needs to be converted. For example, assuming that the target data is the first base layer data and the color space needs to be converted. If it is determined that the color space of the first base layer data is different from the target color space (e.g., RGB color space), the first base layer data needs to be converted to obtain the converted first base layer data; if it is determined that the color space of the first base layer data is the same as the target color space, the first base layer data does not need to be converted.
[0163] In some embodiments, the first metadata may further include conversion object information. The conversion object information is used to indicate the target data on which conversion needs to be performed. For example, in some embodiments, the conversion object information may be used to indicate that the target data to be converted is the first base layer data. For another example, in some embodiments, the conversion object information may be used to indicate that the target data to be converted is the first enhancement layer data. For another example, in some embodiments, the conversion object information may be used to indicate that the target data to be converted is the first base layer data and the first enhancement layer data. For another example, in some embodiments, the conversion object information may be used to indicate that the target data to be converted is the second HDR image data.
[0164] In other embodiments, the target data may be preset or pre-negotiated. In this case, the target data may be directly converted. For example, in some embodiments, the preset or pre-negotiated target data is the first basic layer data. In this case, the first basic layer data may be directly converted.
[0165] In some embodiments, the first metadata may further include conversion scheme information. The conversion scheme information is used to indicate a conversion scheme for the target data. The conversion scheme includes one or more of the following: color space conversion, color gamut conversion, or color compensation.
[0166] In other embodiments, the conversion scheme may be preset or pre-negotiated. In this case, the target data may be directly converted according to the preset or pre-negotiated conversion scheme.
[0167] In some embodiments, the first metadata may carry conversion indication information. In some embodiments, the conversion indication information may include one or more of the following information: conversion location information, conversion judgment information, conversion target information, and conversion scheme information. In some embodiments, the conversion indication information may include the conversion location information, conversion judgment information, conversion target information, or conversion scheme information. In other words, the first metadata may carry these four pieces of information. The electronic device may determine the location where the conversion will occur, whether conversion is required, and the target data based on these four pieces of information carried by the first metadata. In other embodiments, the conversion indication information may include some of these four pieces of information. For example, in some embodiments, the conversion indication information may include the conversion location information among the four pieces of information mentioned above. In this case, the electronic device may determine the location where the conversion will occur based on the conversion location information. The electronic device may then determine the target data, the conversion scheme, and whether conversion is required based on a preset or pre-negotiated result. For another example, in other embodiments, the conversion indication information may include both the conversion location information and the conversion scheme information. In this case, the electronic device may determine the target data based on a preset or pre-negotiated result, and determine the conversion location and conversion scheme based on the conversion location information and the conversion scheme information. Furthermore, upon receiving the conversion indication information, the electronic device may determine that conversion of the target data is required. In other words, in this case, it can be considered that the conversion instruction information indicates that the target data needs to be converted. For another example, in some embodiments, the conversion instruction information may include conversion location information, conversion scheme information, and conversion object information. In this case, the electronic device can determine the conversion location, conversion object, and target data based on the conversion instruction information. Similarly, the electronic device can determine that the target data needs to be converted upon receiving the conversion instruction information. In other words, in this case, it can be considered that the conversion instruction information indicates that the target data needs to be converted.
[0168] In some embodiments, a target data conversion is determined based on the first metadata, and then the target data is converted to obtain a target conversion result. Exemplarily, the first metadata may include the aforementioned conversion indication information. Exemplarily, the first metadata may include one or more of the aforementioned conversion location information, conversion judgment information, conversion object information, and conversion scheme information.
[0169] In some embodiments, some of the above information may be implicitly indicated by other information. For example, in some embodiments, if the conversion position information in the first metadata indicates that the conversion position occurs before the second HDR image is determined, this may indicate that the target data needs to be converted. For example, assume that two bits in the first metadata can be used to carry this conversion position information. If the values of these two bits are 01, this indicates that the conversion position occurs before the second HDR image is determined; if the values of these two bits are 10, this indicates that the conversion position occurs after the second HDR image is determined (i.e., the second HDR image needs to be converted); if the values of these two bits are 00 or 11, this indicates that the target data or the second HDR image does not need to be converted. For another example, as described above, the target data may be first base layer data and / or first enhancement layer data. If the conversion judgment information indicates that the target data needs to be converted, it can be determined that the conversion occurs before the second HDR image is determined. In some embodiments, the conversion judgment information can also be used to determine whether the second HDR image needs to be converted. For example, if the conversion judgment information indicates that the target data does not need to be converted, it can be determined that the second HDR image needs to be converted. Of course, in other embodiments, whether the second HDR image needs to be converted can also be determined based on other information. For example, the conversion position information, conversion object information, or a separate indication information for indicating whether to convert the second HDR image can be used. For another example, in some embodiments, if the target data indicated by the conversion object information is the first base layer data, then it indicates that the first base layer data needs to be converted; if the target data indicated by the conversion object information is the first enhancement layer data, then it indicates that the first enhancement layer data needs to be converted; if the conversion object information indicates the first base layer data and the first enhancement layer data, then it indicates that the first base layer data and the first enhancement layer data need to be converted. For example, two bits in the first metadata can be used to carry the conversion object information. If the values of these two bits are 01, it indicates that the target data is the first base layer data; if the values of these two bits are 10, it indicates that the target data is the first enhancement layer data; if the values of these two bits are 11, it indicates that the target data is the first base layer data and the first enhancement layer data; if the values of these two bits are 00, it indicates that the first base layer data and the first enhancement data do not need to be converted.
[0170] It is understood that, in addition to the above information, the first metadata may also carry other information, such as data format, region division information, region traversal order information, image features, encoding compression format, curve parameters, and one or more metadata information units. The first metadata information unit may also include coordinate information, image features, curve parameters, and other data.
[0171] As described above, the target data may be first base layer data and / or first enhancement layer data. The following describes how to convert the target data.
[0172] Convert the first basic layer data:
[0173] Color space conversion:
[0174] Exemplarily, the first basic layer data is in a first color space. The first basic layer data can be converted from the first color space to a second color space through color space conversion. The first color space is different from the second color space.
[0175] For example, in some embodiments, the first base layer data can be subjected to color space conversion using K() to obtain the converted first base layer data (i.e., target conversion data). K() can be a default matrix or a conversion matrix indicated by the first metadata. The first metadata can carry parameters of the conversion matrix. The color space described in this application does not specify a specific occurrence, including but not limited to RGB, Lab, YUV, HSV, etc.
[0176] For example, in some other embodiments, the color space of the first base layer can be converted to a specified color space. For ease of description, the specified color space can be referred to as a target color space. The target color space can be one of RGB, Lab, YUV, HSV, etc. For example, in some embodiments, assuming that the target color space is an RGB color space, the electronic device can perform color space conversion on the first base layer data to obtain the target converted data, and the color space of the target converted data is an RGB color space.
[0177] In some embodiments, the target color space may be pre-set or pre-negotiated.
[0178] In some other embodiments, the target color space may also be determined based on the first enhancement layer data. The target color space is the color space of the first enhancement layer data.
[0179] In some other embodiments, the first metadata may further carry indication information, where the indication information is used to indicate the target color space.
[0180] Color gamut conversion:
[0181] Exemplarily, the first basic layer data is in a first color gamut space. By color gamut conversion, the first basic layer data can be converted from the first color gamut space to a second color gamut space. The first color gamut space is different from the second color gamut space.
[0182] For example, in some embodiments, the first base layer data can be converted to a color gamut by T() to obtain the converted first base layer data (i.e., target conversion data). T() can be a default matrix or a conversion matrix indicated by the first metadata. The first metadata can carry the parameters of the conversion matrix. The color gamut space described in this application does not specify a specific occurrence, including but not limited to BT.2020, BT.709, DCI-P3, sRGB, etc.
[0183] For example, in some other embodiments, the color gamut space of the first base layer can be converted to a specified color gamut space. For ease of description, the specified color gamut space can be referred to as a target color gamut space. The target color gamut space can be one of BT.2020, BT.709, DCI-P3, sRGB, etc. For example, in some embodiments, assuming that the target color gamut space is the sRGB color gamut space, the electronic device can perform color gamut space conversion on the first base layer data to obtain the target conversion data, and the color gamut space of the target conversion data is the sRGB color gamut space.
[0184] In some embodiments, the color gamut space may be pre-set or pre-negotiated.
[0185] In some other embodiments, the color gamut space may also be determined according to the first enhancement layer data. The color gamut space is the color gamut space of the first enhancement layer data.
[0186] In some other embodiments, the conversion scheme information may further include indication information, where the indication information is used to indicate the color gamut space.
[0187] Color compensation:
[0188] For example, in some embodiments, color compensation may be performed on the first basic layer data using a compensation method C() to obtain converted first basic layer data (ie, target converted data).
[0189] In some embodiments, the compensation method C() may be a color compensation matrix. The color compensation matrix may be preset or indicated by the first metadata.
[0190] In some embodiments, the compensation method C() can be a conversion function. For example, the conversion function can be a logarithmic function, an exponential function, etc. The conversion function can be preset (or pre-negotiated) or indicated by the first metadata. For example, in some embodiments, the conversion function can be preset, and the parameters of the conversion function (such as the exponent) can be indicated by the first metadata. For another example, in some embodiments, the parameters of the conversion function can be preset, and the conversion function is indicated by the first metadata. For another example, in other embodiments, both the conversion function and the parameters are preset or indicated by the first metadata.
[0191] In some embodiments, the compensation method C() may be a compensation value and a corresponding compensation method. For example, the data of one or more channels in the base layer data are added, subtracted, multiplied, and / or divided by the compensation value. The compensation value and the corresponding compensation method may be preset (or pre-negotiated) or indicated by the first metadata. For example, in some embodiments, the compensation method may be preset, and the first metadata may carry the compensation value. For another example, in some embodiments, the compensation value is preset, and the compensation method is indicated by the first metadata. For another example, in some embodiments, both the compensation value and the compensation method may be preset or indicated by the first metadata.
[0192] It is understood that if multiple conversions are required on the first base layer data, the first conversion targets the first base layer data, and the objects of each subsequent conversion are the results of the previous conversion. For example, suppose the first base layer data needs to be converted to both color space and color gamut. In this case, the first base layer data can first be color-space converted to obtain the first base layer data with the converted color space; then, the converted first base layer data can be converted to obtain the final conversion result (i.e., the target converted data).
[0193] Convert the first enhancement layer data:
[0194] Color space conversion:
[0195] The method for performing color space conversion on the first enhancement layer data is similar to the method for performing color space conversion on the first basic layer data. For example, a default matrix or a conversion matrix indicated by the first metadata can be used to perform color space conversion on the first enhancement layer data to obtain the converted first enhancement layer data. For another example, the color space of the first enhancement layer data can be converted to a specified color space. The specified color space can be pre-set or pre-negotiated, or determined based on the first basic layer data, or indicated by the first metadata. The method for performing color space conversion on the first enhancement layer data can refer to the above-mentioned method for performing color space conversion on the first basic layer data. For the sake of brevity, it will not be repeated here.
[0196] Color gamut conversion:
[0197] Similarly, the color gamut conversion method of the first enhancement layer data is similar to the color gamut conversion method of the first basic layer data. For example, a default matrix or a conversion matrix indicated by the first metadata can be used to perform color gamut conversion on the first enhancement layer data to obtain the converted first enhancement layer data. For another example, the color gamut of the first enhancement layer data can be converted to a specified color gamut space. The specified color gamut space can be pre-set or pre-negotiated, or it can be determined based on the first basic layer data, or it can be indicated by the first metadata. The method for performing color gamut conversion on the first enhancement layer data can refer to the above-mentioned method for performing color space conversion on the first basic layer data. For the sake of brevity, it will not be repeated here.
[0198] Color compensation
[0199] Similarly, the first enhancement layer data can be color compensated using a compensation method C() to obtain converted first enhancement layer data. The compensation method C() can be a color compensation matrix, a conversion function, or a compensation value and a corresponding compensation method. The color compensation matrix, conversion function, compensation value, and corresponding compensation method can be preset (or pre-negotiated) or indicated by the first metadata. The specific method for color compensation of the first enhancement layer data can refer to the above-mentioned method for color compensation of the first basic layer data. For the sake of brevity, it will not be repeated here.
[0200] Similarly, multiple conversions can also be performed on the first enhancement layer data. The specific conversion method can refer to the conversion method of the first basic layer data, and for the sake of brevity, it will not be repeated here.
[0201] In some embodiments, the first enhancement layer data may be subjected to channel conversion. The first enhancement layer data may be reorganized data. For ease of description, the first enhancement layer data before reorganization may be referred to as original enhancement layer data.
[0202] In some embodiments, the reconstructing method may be to replace some of the original channels in the original enhanced data with the difference or sum of several of these channels. For example, if the original channels are RGB, the reconstructed channels may be R, R+P1×G, and R+P2×B. In other words, the channels of the first enhanced layer data are R, R+P1×G, and R+P2×B. The electronic device can restore the channels of the first enhanced data to the original channels by performing channel conversion on the first enhanced data. P1 and P2 may be constants or values indicated in the first metadata.
[0203] In other embodiments, the reconstructing method may be to replace some of the original channels in the original enhanced data with the product or quotient of several of the channels. For example, if the original channels are RGB, the reconstructed channels may be R, R×P3×G, R×P4×B, or R, R / (P3×G), R / (P4×B). The electronic device may perform channel conversion on the first enhanced data to restore the channels of the first enhanced data to the original channels. P3 and P4 are constants or values indicated in the first metadata.
[0204] Therefore, the channels of the first enhancement layer data can be restored to the original channels according to the channel reorganization information. The channel reorganization information may exemplarily include the parameters P1, P2 or P3, P4 in the above embodiment or the values indicated in the first metadata.
[0205] In summary, in some embodiments, some or all of the parameters used in the conversion process may be preset (or pre-negotiated). In other embodiments, the first metadata may further include conversion parameters, which are used to convert the target data. For example, the conversion parameters may include one or more of a conversion matrix, a color compensation matrix, a conversion function, a compensation value and compensation method, channel reorganization information, and the like.
[0206] 1203 : Determine a second HDR image according to the target conversion data.
[0207] For example, if the target data includes first base layer data, the target conversion data includes the converted first base layer data. In this case, the second HDR image can be determined based on the first enhancement layer data and the converted first base layer data.
[0208] For another example, if the target data includes first enhancement layer data, the target conversion data includes the converted first enhancement layer data. In this case, the second HDR image can be determined based on the first base layer data and the converted first enhancement layer data.
[0209] For another example, if the target data includes first enhancement layer data and first base layer data, the target conversion data includes the converted first enhancement layer data and the converted first base layer data. In this case, the second HDR image can be determined based on the converted first enhancement layer data and the converted first base layer data.
[0210] For ease of description, the terms "second base layer data" and "second enhancement layer data" are introduced. At least one of the second base layer data and the second enhancement layer data is the target conversion data. In other words, in some embodiments, the second base layer data is the converted first base layer data, and the second enhancement layer data is the same as the first enhancement layer data. In other embodiments, the second base layer data is the same as the first base layer data, and the second enhancement layer data is the converted first enhancement layer data. In other embodiments, the second base layer data is the converted first base layer data, and the second enhancement layer data is the converted first enhancement layer data. In this case, the second HDR image can be determined based on the second base layer data and the second enhancement layer data.
[0211] For ease of description, Base[i] may be used to represent the value of the i-th pixel in the second base layer data, Enhance[i] may be used to represent the value of the i-th pixel in the second enhancement layer data, and newPicture[i] may be used to represent the value of the i-th pixel in the second HDR image. In some embodiments, newPicture[i], Base[i], and Enhance[i] satisfy the following relationship: newPicture[i] = Base[i] × f(Enhance[i]), (Formula 1.1)
[0212] f() may be a default conversion function or a conversion function indicated by the first metadata.
[0213] In some other embodiments, newPicture[i], Base[i] and Enhance[i] satisfy the following relationship: newPicture[i]=Base[i]+f(Enhance[i]), (Formula 1.2)
[0214] f() may be a default conversion function or a conversion function indicated by the first metadata.
[0215] In some embodiments, the second base layer data and the second enhancement layer data may also be processed, and then the processed data may be used to determine the second HDR image. For ease of description, the third base layer data is used to represent the processed second base layer data, and the third enhancement layer data is used to represent the processed second enhancement layer data. BaseAfter[i] is used to represent the value of the i-th pixel in the third base layer data, EnhanceAfter[i] is used to represent the value of the i-th pixel of the third enhancement layer data, and newPicture[i] is used to represent the value of the i-th pixel of the second HDR image. In some embodiments, newPicture[i], BaseAfter[i], and EnhanceAfter[i] satisfy the following relationship: newPicture[i]=BaseAfter[i]×f(EnhanceAfter[i]), (Formula 2.1)
[0216] f() may be a default conversion function or a conversion function indicated by the first metadata.
[0217] In some other embodiments, newPicture[i], Base[i] and Enhance[i] satisfy the following relationship: newPicture[i]=BaseAfter[i]+f(EnhanceAfter[i]), (Formula 2.2)
[0218] f() may be a default conversion function or a conversion function indicated by the first metadata.
[0219] In some embodiments, the second base layer data or the second enhancement layer data may be processed, and then the processed data may be used to determine the second HDR image. That is, in some embodiments, the second base layer data may be processed to obtain third base layer data, and then the second HDR image may be determined based on the third base layer data and the second enhancement layer data. In this case, EnhanceAfter[i] in Formula 2.1 and Formula 2.2 may be replaced with Enhance[i]. In other embodiments, the second enhancement layer data may be processed to obtain third enhancement layer data, and then the second HDR image may be determined based on the second base layer data and the third enhancement layer data. In this case, BaseAfter[i] in Formula 2.1 and Formula 2.2 may be replaced with Base[i].
[0220] The method for processing the second base layer data to obtain the third base layer data is the same as the method for processing the second enhancement layer data to obtain the third enhancement layer data. For the sake of simplicity, the following uses the enhancement layer as an example to describe how to obtain the third enhancement layer data. The method for determining the third base layer data can refer to the method for determining the third enhancement layer data.
[0221] In some embodiments, the second enhancement layer data is normalized data. In this case, the first metadata may include a first parameter THH and a second parameter THL. In this case, the third enhancement layer data may be determined according to the following formula: EnhanceAfter[i] = Enhance[i] × THH + (A - Enhance[i]) × THL, (Formula 3.1)
[0222] Where A is the maximum value in the second enhancement layer data. When the second enhancement layer data is normalized to between 0 and 1.0, A is 1.0.
[0223] In other embodiments, the second enhancement layer data may be encoded data. For example, the second enhancement layer data may be nonlinearly encoded data such as PQ / HLG / LOG / Gamma. In this case, the second enhancement layer data may be converted to a linear domain to obtain the third enhancement layer data. If the second enhancement layer data is normalized before being encoded to obtain nonlinear data, the first metadata may include the first parameter THH and the second parameter THL. Then, after converting the second enhancement layer data to the linear domain, the third enhancement data may be determined using Equation 3.1.
[0224] In some other embodiments, the first metadata may further include a second parameter THL. In this case, the second parameter THL, EnhanceAfter[i], and Enhance[i] satisfy the following relationship: EnhanceAfter[i]=Enhance[i]+THL, (Formula 3.2).
[0225] In some other embodiments, the first metadata may further include a first parameter THH. In this case, the first parameter THH, EnhanceAfter[i], and Enhance[i] satisfy the following relationship: EnhanceAfter[i]=THH+A-Enhance[i], (Formula 3.3)
[0226] Where A is the maximum value in the second enhancement layer data. When the second enhancement layer data is normalized to between 0 and 1.0, A is 1.0.
[0227] In some other embodiments, the first metadata may be used to indicate a mapping function TMB(). In this case, the third enhancement layer data may be determined according to the mapping function TMB() indicated by the first metadata.
[0228] In some embodiments, the mapping functions TMB(), EnhanceAfter[i] and Enhance[i] satisfy the following relationship: EnhanceAfterβ[i]=TMB(Enhanceβ[i]), (Formula 3.4).
[0229] In some other embodiments, the mapping functions TMB(), EnhanceAfter[i] and Enhance[i] satisfy the following relationship: EnhanceAfter[i]=TMB()×Enhanceβ[i] (Formula 3.5).
[0230] During the encoding process, a mapping relationship can be determined based on the histogram of the intermediate enhanced data, and then the intermediate enhanced data can be mapped to another numerical range interval based on the mapping relationship. The first interval is still used to represent the numerical range interval of the intermediate enhanced data, and the second interval is used to represent the numerical range interval after mapping. The numerical range of the second enhanced layer data is within the second interval. Through the above technical solution, the second enhanced layer data can be remapped to the first interval. TMB() is the inverse function of the mapping relationship. In some embodiments, TMB() can be directly carried in the first metadata. In other embodiments, the first metadata can carry the mapping relationship and / or the parameters of the mapping relationship. TMB() can be inferred based on the mapping relationship and / or the parameters of the mapping relationship.
[0231] In some embodiments, after determining the second HDR image, the second HDR image may be further processed to obtain a third HDR image. For example, in some embodiments, the second HDR image may be subjected to color gamut conversion and / or color compensation to obtain the third HDR image. The implementation of color gamut conversion and / or color compensation can refer to the description of the first base layer data or the first enhancement layer data above, and will not be repeated here.
[0232] Unless otherwise specified, the embodiments of the present application do not limit the third enhancement layer data and the third base layer data to any domain, and may be a linear domain, a PQ domain, a log domain, etc. The present application also does not limit the color space of the third enhancement layer data and the third base layer data, and may be a YUV, RGB, Lab, HSV, or other color space.
[0233] Figure 13 is a schematic flow chart of an image processing method according to an embodiment of the present application. As shown in Figure 13, after acquiring the first base layer data, the first enhancement layer data and the first metadata, the electronic device may first determine whether the target data needs to be converted.
[0234] If it is determined that the target data needs to be converted, a conversion position is determined. If the conversion position is before the second HDR image is determined, the target data may be the first base layer data and / or the first enhancement layer data. After the target data is determined, the target data may be converted to obtain target conversion data. The second HDR image is then determined based on the target conversion data.
[0235] If the conversion position is after the second HDR image is determined, then the second HDR image can be determined according to the first enhancement layer data and the first base layer data, and then the second HDR image is converted.
[0236] If it is determined that the target data does not need to be converted, an HDR image may be determined based on the first enhancement layer data and the first base layer data.
[0237] FIG14 is a schematic flow chart of another image processing method provided according to an embodiment of the present application. The method shown in FIG14 can be performed by an electronic device or a component (e.g., a chip, SoC, etc.) in an electronic device. The electronic device can be the source device 12 in FIG5 , the capture device 2102 as shown in FIG6 , or the front-end device as shown in FIG10 . For ease of description, the following embodiments assume that the method shown in FIG14 is performed by an electronic device.
[0238] 1401. Determine, based on an acquired first HDR image, first base layer data, first enhancement layer data, and first metadata corresponding to the first HDR image, wherein the first metadata is used to convert target data, the target data including the first base layer data and / or the first enhancement layer data.
[0239] The embodiment of the present application does not limit the location of the first metadata. For example, if the code stream is obtained by encoding using HEVC or VVC, then the first hospital data can be located in the SEI of HEVC or VVC. For another example, if the code stream is obtained by encoding using AVC / H.264, then the first metadata can be located in the NAL unit or the reserved packet unit. For another example, the first metadata can also be located in the APP extension information encapsulated in the JPEG file interchange format. For another example, in some embodiments, the first metadata can also be located in the data segment encapsulated by the Moving Picture Experts Group (MPEG)-Part 14 (MPEG-4part 14, MP4).
[0240] The embodiments of the present application do not limit the encoder, for example, HEVC, JPEG, HEIF, etc. can be used.
[0241] The embodiment of the present application does not limit the code stream format of the first base layer data and the first enhancement layer data. In terms of color space, it can be YUV, RGB, Lab, HSV, etc. In terms of data bit width, it can be 8 bits, 10 bits, or 12 bits, etc. In terms of value domain, it can be PQ, HLG, gamma, or log, etc.
[0242] The conversion performed on the target data may include one or more of the following: color space conversion, color gamut conversion, or color compensation.
[0243] The first metadata may carry one or more of the following information: conversion position information, conversion judgment information, conversion object information, and conversion solution information.
[0244] For the specific contents of the conversion position information, conversion judgment information, conversion object information and conversion scheme information, please refer to the above embodiments. For the sake of brevity, they will not be repeated here.
[0245] In some embodiments, the first metadata is used to determine a conversion to be performed on the target data.
[0246] In some embodiments, the first metadata is used to determine target data and convert the target data.
[0247] 1402. Encode the first base layer data, the first enhancement layer data, and the first metadata to obtain a code stream.
[0248] FIG15 is a schematic structural block diagram of an electronic device according to an embodiment of the present application. As shown in FIG15 , the electronic device 1500 includes an acquisition unit 1501 and a processing unit 1502 .
[0249] The acquisition unit 1501 is configured to acquire first base layer data, first enhancement layer data, and first metadata, wherein the first base layer data is base layer data of a first HDR image, and the first enhancement layer data is enhancement layer data of the first HDR image.
[0250] The processing unit 1502 is configured to convert target data according to the first metadata to obtain target converted data, where the target data is the first base layer data and / or the first enhancement layer data.
[0251] The processing unit 1502 is further configured to determine a second HDR image according to the target conversion data.
[0252] The specific functions and beneficial effects of the acquisition unit 1501 and the processing unit 1302 can be referred to the above method embodiment, and for the sake of brevity, they will not be repeated here.
[0253] In some embodiments, the acquisition unit 1501 and the processing unit 1502 may be implemented by a processor.
[0254] In some embodiments, the electronic device may be a decoder.
[0255] In some embodiments, the electronic device may be the target device 14 shown in FIG. 5 , the terminal device 2106 shown in FIG. 6 , or the terminal display device shown in FIG. 10 .
[0256] FIG16 is a schematic structural block diagram of an electronic device according to an embodiment of the present application. As shown in FIG16 , the electronic device 1600 includes a processing unit 1601 and an encoding unit 1602 .
[0257] The processing unit 1601 is configured to determine first base layer data, first enhancement layer data, and first metadata based on the acquired first HDR image, wherein the first metadata is used to convert target data, and the target data includes the first base layer data and / or the first enhancement layer data.
[0258] The encoding unit 1602 is configured to encode the first base layer data, the first enhancement layer data, and the first metadata to obtain a code stream.
[0259] The specific functions and beneficial effects of the processing unit 1601 and the encoding unit 1602 can be referred to the above method embodiment, and for the sake of brevity, they will not be repeated here.
[0260] In some embodiments, the processing unit 1601 and the encoding unit 1602 may be implemented by a processor.
[0261] In some embodiments, the electronic device may be an encoder.
[0262] In some embodiments, the electronic device may be the source device 12 in FIG. 5 , the capture device 2102 in FIG. 6 , or the front-end device in FIG. 10 .
[0263] An embodiment of the present application also provides an electronic device. The electronic device can be used to implement the embodiment of the image processing method (which can be called an encoding method) shown in Figure 14 above. The electronic device includes a processor and a memory. The processor is used to execute the computer program or instructions stored in the memory, or read the data / signaling stored in the memory to execute the method in the above method embodiments. The memory can be integrated with the processor, or can also be set separately. The memory can also be used to store the code stream determined by the processor. Optionally, there are one or more processors. Optionally, there are one or more memories. Optionally, the electronic device may also include a transceiver (or communication interface), which is used to receive and / or send signals. For example, the transceiver can be used to send the code stream determined by the processor to another electronic device.
[0264] An embodiment of the present application also provides an electronic device. The electronic device can be used to implement the embodiment of the image processing method (which can be called a decoding method) shown in Figure 12 or Figure 13. The electronic device includes a processor and a memory. The processor is used to execute the computer program or instructions stored in the memory, or read the data / signaling stored in the memory to execute the method in the above method embodiments. The memory can be integrated with the processor, or can also be set separately. Optionally, there are one or more processors. Optionally, there are one or more memories. Optionally, the electronic device may also include a transceiver (or communication interface), which is used to receive and / or send signals. For example, the transceiver can be used to receive a code stream.
[0265] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0266] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM includes the following forms: static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0267] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) can be integrated into the processor.
[0268] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0269] The embodiment of the present application further provides a chip system. The chip system (or also referred to as a processing system) includes a logic circuit and an input / output interface.
[0270] The logic circuit may be a processing circuit in a chip system. The logic circuit may be coupled to a storage unit and call instructions in the storage unit so that the chip system can implement the methods and functions of each embodiment of the present application. The input / output interface may be an input / output circuit in a chip system that outputs information processed by the chip system or inputs data or signaling information to be processed into the chip system for processing.
[0271] As a solution, the chip system is used to implement the embodiments of the above-mentioned image processing methods. For example, the chip system is used to implement the processing-related operations performed by the source device, capture device or front-end device in the above-mentioned method embodiments.
[0272] As a solution, the chip system is used to implement the embodiments of the above-mentioned image processing methods. For example, the chip system is used to implement the processing-related operations performed by the target device, terminal device or terminal display device in the above-mentioned method embodiments.
[0273] An embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored for implementing the methods executed by an encoding end device (such as a source device, a capture device, or a front-end device) in the above-mentioned method embodiments.
[0274] An embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored for implementing the methods executed by a decoding end device (such as a target device, a terminal device, or a terminal display device) in the above-mentioned method embodiments.
[0275] An embodiment of the present application also provides a computer program product, comprising instructions, which, when executed by a computer, implement the methods performed by the encoding end device in the above-mentioned method embodiments.
[0276] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed by a computer, implement the methods performed by a decoding end device in the above-mentioned method embodiments.
[0277] An embodiment of the present application also provides a communication system, including the aforementioned encoding end device and decoding end device.
[0278] The embodiment of the present application further provides a code stream, which is determined by the above-mentioned image processing method (encoding method).
[0279] An embodiment of the present application further provides a memory, which is used to store the code stream determined by the above encoding method.
[0280] The present application also provides a computer device, which includes a memory for storing a code stream determined by the above encoding method.
[0281] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can be referred to the corresponding method embodiments provided above, which will not be repeated here.
[0282] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0283] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. For example, the computer can be a personal computer, a server, or a network device, etc. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)). For example, the aforementioned available medium includes, but is not limited to, various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0284] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for image processing, characterized in that: include: Acquire first base layer data, first enhancement layer data, and first metadata, wherein the first base layer data is base layer data corresponding to the first HDR image, and the first enhancement layer data is enhancement layer data corresponding to the first HDR image; Converting target data according to the first metadata to obtain target converted data, where the target data is the first basic layer data and / or the first enhanced layer data; A second HDR image is determined according to the target conversion data.
2. The method according to claim 1, characterized in that The first metadata includes conversion position information, where the conversion position information is used to indicate a position where the conversion occurs. The converting the target data according to the first metadata includes: The target data is converted according to the conversion position information.
3. The method according to claim 1 or 2, characterized in that: The first metadata includes first conversion judgment information, and the first conversion judgment information is used to indicate that the target data needs to be converted; The converting the target data according to the first metadata includes: The target data is converted according to the first conversion judgment information.
4. The method according to any one of claims 1 to 3, characterized in that The conversion includes one or more of the following: Color space conversion, color gamut conversion, or color compensation.
5. The method according to claim 4, characterized in that In a case where the target data is the first basic layer data and the conversion includes color space conversion, converting the target data according to the first metadata comprises: The color space conversion is performed on the first basic layer data to obtain the target conversion data, and the color space of the target conversion data is an RGB color space.
6. The method according to claim 4 or 5, characterized in that: In a case where the target data is the first basic layer data and the conversion includes the color gamut conversion, converting the target data according to the first metadata includes: The target conversion data is obtained by performing the color gamut conversion on the first basic layer data through T(), where T() is a default matrix or a conversion matrix indicated by the first metadata.
7. The method according to claim 4, characterized in that In a case where the target data includes the first enhancement layer data, the conversion further includes channel conversion, and the channel conversion is used to restore channels of the first enhancement layer data to original channels.
8. The method according to claims 1 to 7, characterized in that The first metadata also includes conversion parameters used when performing the conversion.
9. The method according to claim 8, characterized in that In case the conversion includes the color compensation, the conversion parameters include: Color compensation matrix; a conversion function; or Compensation value and compensation method.
10. The method according to any one of claims 1 to 9, characterized in that The method further includes: performing color gamut conversion and / or color compensation on the second HDR image.
11. A method for image processing, characterized in that: The method comprises: Determine, according to the acquired first HDR image, first base layer data, first enhancement layer data, and first metadata corresponding to the first HDR image, wherein the first metadata is used to convert target data, and the target data is the first base layer data and / or the first enhancement layer data; The first basic layer data, the first enhancement layer data, and the first metadata are encoded to obtain a code stream.
12. The method according to claim 11, characterized in that The first metadata includes conversion position information, where the conversion position information is used to indicate a position where the conversion occurs.
13. The method according to claim 11 or 12, characterized in that: The first metadata includes first conversion judgment information, where the first conversion judgment information is used to indicate that the target data needs to be converted.
14. The method according to any one of claims 11 to 13, characterized in that The conversion includes one or more of the following: Color space conversion, color gamut conversion, or color compensation.
15. The method according to claim 14, characterized in that The first metadata also includes conversion parameters used when performing the conversion.
16. The method according to claim 15, characterized in that In case the conversion comprises the color gamut conversion, the conversion parameters comprise a conversion matrix.
17. The method according to claim 15, characterized in that In case the conversion includes the color compensation, the conversion parameters include: Color compensation matrix; a conversion function; or Compensation value and compensation method.
18. An electronic device, characterized in that: The electronic device is used to implement the method as claimed in any one of claims 1 to 10, and / or is used to implement the method as claimed in any one of claims 11 to 17.
19. A computer device, characterized in that: include: A processor, the processor being configured to be coupled to a memory, read and execute instructions and / or program codes in the memory to execute the method according to any one of claims 1 to 10, and / or to execute the method according to any one of claims 11 to 17.
20. A chip system, characterized in that: include: A logic circuit, the logic circuit is used to be coupled to an input / output interface, and transmit data through the input / output interface to execute the method according to any one of claims 1 to 10, and / or to execute the method according to any one of claims 11 to 17.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program code, and when the computer program code is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 10 and / or to execute the method according to any one of claims 11 to 17.
22. A code stream, characterized in that: The code stream is determined according to the method according to any one of claims 11 to 17.
Citation Information
Patent Citations
Image processing method and related equipment
CN119496906A
Decoder and method for generating high dynamic range image, and storage medium
CN107896332A
Transmission device, transmission method, receiving device and receiving method
CN110915221A
Video encoding and decoding method, decoder, encoder and related equipment
CN111491168A
Data processing method, equipment and storage medium
CN112040240A