CN112533025A - Image chromaticity restoration method, device and system - Google Patents

Image chromaticity restoration method, device and system Download PDF

Info

Publication number
CN112533025A
CN112533025A CN201910887621.9A CN201910887621A CN112533025A CN 112533025 A CN112533025 A CN 112533025A CN 201910887621 A CN201910887621 A CN 201910887621A CN 112533025 A CN112533025 A CN 112533025A
Authority
CN
China
Prior art keywords
image
chrominance
information
difference
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910887621.9A
Other languages
Chinese (zh)
Inventor
蒲威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Embedway Technologies Shanghai Corp
Original Assignee
Embedway Technologies Shanghai Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Embedway Technologies Shanghai Corp filed Critical Embedway Technologies Shanghai Corp
Priority to CN201910887621.9A priority Critical patent/CN112533025A/en
Publication of CN112533025A publication Critical patent/CN112533025A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Abstract

The application provides an image chromaticity restoration method, device and system, wherein the method comprises the following steps: converting a first image of a first color space to a second image of a second color space, wherein the second image has a loss of chroma compared to the first image; determining chrominance information of the second image lost compared with the first image as first chrominance information; and respectively encoding the second image and the first chrominance information, and sending the encoding result of the second image and the encoding result of the first chrominance information to the terminal, so that the terminal respectively decodes the encoding result of the second image and the encoding result of the first chrominance information, and restores the image without chrominance loss based on the decoding result. The method and the device not only send the coding result of the second image, but also send the coding result of the first chroma information of the second image loss at the same time, so that the terminal can restore the image without chroma loss according to the decoding result.

Description

Image chromaticity restoration method, device and system
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, and a system for restoring image chromaticity.
Background
In a virtualized desktop system, multiple virtual machines may run on one server, and images on the virtual machines may be compressed by an image encoder (e.g., a hardware encoder) of the server and then transmitted to a terminal for display and output.
In order to compress an image efficiently, an image encoder removes a large amount of chrominance information of the image during encoding, which causes the image decoded by a terminal to have chrominance loss, and thus, a display device of the terminal cannot display the color details of the image better.
Disclosure of Invention
In view of the above, the present application provides an image chroma restoration method, apparatus and system, so as to solve the problem that in the prior art, an image encoder may remove a large amount of chroma information of an image during encoding, resulting in a poor display effect of an image decoded by a terminal, and the technical scheme is as follows:
an image chroma restoration method is applied to a server and comprises the following steps:
converting a first image of a first color space to a second image of a second color space, wherein the second image has a loss of chroma compared to the first image;
determining chrominance information of the second image lost compared with the first image as first chrominance information;
and respectively encoding the second image and the first chrominance information, and sending the encoding result of the second image and the encoding result of the first chrominance information to a terminal, so that the terminal respectively decodes the encoding result of the second image and the encoding result of the first chrominance information, and restores an image without chrominance loss based on the decoding result.
Preferably, the determining chrominance information that the second image loses compared to the first image comprises:
converting a first image of the first color space to a third image of the second color space, wherein the third image has no loss of chroma compared to the first image;
determining a chrominance difference image from the second image and the third image, wherein the chrominance difference image is capable of characterizing chrominance information lost by the second image compared to the first image.
Preferably, the chrominance difference image comprises a first chrominance difference image and a second chrominance difference image, wherein the first chrominance difference image is capable of characterizing first chrominance information lost by the second image compared to the first image, and the second chrominance difference image is capable of characterizing second chrominance information lost by the second image compared to the first image;
determining a chrominance difference image from the second image and the third image, comprising:
taking any pixel in the second image as a target pixel, calculating a difference value between a first chrominance component of a corresponding pixel in the third image and the first chrominance component of the target pixel, and taking the difference value as a first chrominance difference value corresponding to the target pixel to obtain first chrominance difference values respectively corresponding to each pixel in the second image; forming a first chrominance difference image from first chrominance differences respectively corresponding to each pixel in the second image;
taking any pixel in the second image as a target pixel, calculating a difference value between a second chrominance component of a corresponding pixel in the third image and a second chrominance component of the target pixel, and taking the difference value as a second chrominance difference value corresponding to the target pixel to obtain second chrominance difference values respectively corresponding to each pixel in the second image; and forming a second chrominance difference image by the second chrominance difference values respectively corresponding to the pixels in the second image.
An image chroma restoration method is applied to a terminal and comprises the following steps:
receiving an encoding result of a second image and an encoding result of first chrominance information, wherein the encoding result of the second image and the encoding result of the first chrominance information are sent by a server, the second image is an image of a second color space, the second image is obtained by performing spatial conversion on a first image of a first color space by the server, and the first chrominance information is chrominance information lost by the second image compared with the first image;
decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information;
and restoring an image without chromaticity loss according to the fourth image and the second chromaticity information.
Preferably, the first chrominance information is characterized by a chrominance difference image, and an encoding result of the first chrominance information is an encoding result of the chrominance difference image;
the chrominance difference image is determined by the server according to the second image and a third image, wherein the third image is an image of the second color space, the third image is obtained by performing spatial conversion on the first image of the first color space by the server, and the third image has no chrominance loss compared with the first image.
Preferably, the chrominance difference image comprises a first chrominance difference image and a second chrominance difference image, the first chrominance difference image being capable of characterizing chrominance information of a first chrominance component loss of each pixel in the second image, the second chrominance difference image being capable of characterizing chrominance information of a second chrominance component loss of each pixel in the second image;
the encoding result of the first chrominance information comprises an encoding result of the first chrominance difference image and an encoding result of the second chrominance difference image;
the second chrominance information includes: a third chrominance difference image and a fourth chrominance difference image, wherein the third chrominance difference image is an image obtained by decoding the encoding result of the first chrominance difference image, and the fourth chrominance difference image is an image obtained by decoding the encoding result of the second chrominance difference image;
the restoring an image without chromaticity loss according to the fourth image and the second chromaticity information includes:
and performing chromaticity compensation on the first chromaticity component of each pixel in the fourth image by using the third chromaticity difference image, and performing chromaticity compensation on the second chromaticity component of each pixel in the fourth image by using the fourth chromaticity difference image to obtain an image without chromaticity loss.
Preferably, the performing chrominance compensation on the first chrominance components of the pixels in the fourth image by using the third chrominance difference image respectively includes:
for each pixel in the fourth image, obtaining a chrominance difference value corresponding to the pixel from the third chrominance difference image, and adding the chrominance difference value corresponding to the pixel to the first chrominance component of the pixel;
the performing chrominance compensation on the second chrominance components of the pixels in the fourth image by using the fourth chrominance difference image respectively includes:
and for each pixel in the fourth image, acquiring a chrominance difference value corresponding to the pixel from the fourth chrominance difference value image, and adding the chrominance difference value corresponding to the pixel to the second chrominance component of the pixel.
A chroma restoration device is applied to a server and comprises:
a conversion module to convert a first image of a first color space to a second image of a second color space, wherein the second image has a loss of chroma compared to the first image;
a color difference determining module, configured to determine, as first color information, color information of the second image lost compared to the first image;
an encoding module, configured to encode the second image and the first chrominance information respectively;
and the sending module is used for sending the coding result of the second image and the coding result of the first chrominance information to a terminal so that the terminal respectively decodes the coding result of the second image and the coding result of the first chrominance information and restores the image without chrominance loss based on the decoding result.
Preferably, the color difference determination module includes:
a conversion unit configured to convert a first image of the first color space into a third image of the second color space, wherein the third image has no chrominance loss compared to the first image;
a color difference image determination unit configured to determine a chrominance difference image according to the second image and the third image, wherein the chrominance difference image is capable of representing chrominance information lost by the second image compared to the first image.
Preferably, the chrominance difference image comprises a first chrominance difference image and a second chrominance difference image, wherein the first chrominance difference image is capable of characterizing first chrominance information lost by the second image compared to the first image, and the second chrominance difference image is capable of characterizing second chrominance information lost by the second image compared to the first image;
the color difference image determination unit includes:
a first calculating unit, configured to use any pixel in the second image as a first target pixel, and calculate a difference between a first chrominance component of a corresponding pixel in the third image and the first chrominance component of the target pixel, as a first chrominance difference corresponding to the target pixel, so as to obtain first chrominance differences respectively corresponding to each pixel in the second image; forming a first chrominance difference image from first chrominance differences respectively corresponding to each pixel in the second image;
a second calculating unit, configured to take any one pixel in the second image as a target pixel, calculate a difference between a second chrominance component of a corresponding pixel in the third image and the second chrominance component of the target pixel, as a second chrominance difference corresponding to the target pixel, so as to obtain second chrominance differences respectively corresponding to each pixel in the second image; and forming a second chrominance difference image by the second chrominance difference values respectively corresponding to the pixels in the second image.
A chroma restoration device applied to a terminal comprises:
a receiving module, configured to receive an encoding result of a second image and an encoding result of first chrominance information, where the second image is an image in a second color space, and the second image is obtained by performing spatial conversion on a first image in a first color space by the server, and the first chrominance information is chrominance information lost by the second image compared with the first image;
the decoding module is used for decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information;
and the restoring module is used for restoring the image without chromaticity loss according to the fourth image and the second chromaticity information.
Preferably, the first chrominance information is characterized by a chrominance difference image, and an encoding result of the first chrominance information is an encoding result of the chrominance difference image;
the chrominance difference image is determined by the server according to the second image and a third image, wherein the third image is an image of the second color space, the third image is obtained by performing spatial conversion on the first image of the first color space by the server, and the third image has no chrominance loss compared with the first image.
Preferably, the chrominance difference image comprises a first chrominance difference image and a second chrominance difference image, the first chrominance difference image being capable of characterizing chrominance information of a first chrominance component loss of each pixel in the second image, the second chrominance difference image being capable of characterizing chrominance information of a second chrominance component loss of each pixel in the second image;
the encoding result of the first chrominance information comprises an encoding result of the first chrominance difference image and an encoding result of the second chrominance difference image;
the second chrominance information includes: a third chrominance difference image and a fourth chrominance difference image, wherein the third chrominance difference image is an image obtained by decoding the encoding result of the first chrominance difference image, and the fourth chrominance difference image is an image obtained by decoding the encoding result of the second chrominance difference image;
the reduction module comprises:
and the chrominance compensation unit is used for performing chrominance compensation on the first chrominance components of the pixels in the fourth image by using the third chrominance difference image and performing chrominance compensation on the second chrominance components of the pixels in the fourth image by using the fourth chrominance difference image to obtain an image without chrominance loss.
Preferably, the process of performing, by the chrominance compensation unit, chrominance compensation on the first chrominance component of each pixel in the fourth image by using the third chrominance difference image includes:
for each pixel in the fourth image, obtaining a chrominance difference value corresponding to the pixel from the third chrominance difference image, and adding the chrominance difference value corresponding to the pixel to the first chrominance component of the pixel;
the process of the chrominance compensation unit performing chrominance compensation on the second chrominance components of each pixel in the fourth image by using the fourth chrominance difference image comprises the following steps:
and for each pixel in the fourth image, acquiring a chrominance difference value corresponding to the pixel from the fourth chrominance difference value image, and adding the chrominance difference value corresponding to the pixel to the second chrominance component of the pixel.
An image chroma restoration system comprising: a server and a terminal;
the server is used for converting a first image of a first color space into a second image of a second color space, wherein the second image has chromaticity loss compared with the first image; determining chrominance information of the second image lost compared with the first image as first chrominance information; respectively encoding the second image and the first chrominance information, and sending an encoding result of the second image and an encoding result of the first chrominance information to the terminal;
the terminal is used for receiving the coding result of the second image and the coding result of the first chrominance information; decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information; and restoring an image without chromaticity loss according to the fourth image and the second chromaticity information.
As can be seen from the above-mentioned solutions, the image chroma restoration method applied to the server according to the present application not only transmits the encoding result of the second image, but also simultaneously transmits the encoding result of the first chroma information lost by the second image compared to the first image, so that the terminal can decode the encoding result of the second image and the encoding result of the first chroma information, thereby restoring an image without chroma loss according to the decoding result. The image chromaticity restoration method can restore the color information lost by the original image, so that the terminal can display the color details of the image, and the user experience can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of an image chromaticity reduction method applied to a server according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a method for determining first chrominance information according to an embodiment of the present disclosure;
FIG. 3 is a schematic color space diagram of a third image according to an embodiment of the present disclosure;
FIG. 4 is a schematic color space diagram of a second image according to an embodiment of the present disclosure;
FIGS. 5a-5b are schematic diagrams of chrominance difference images provided in accordance with embodiments of the present disclosure;
fig. 6 is a schematic flowchart of an image chromaticity reduction method applied to a terminal according to an embodiment of the present disclosure;
FIG. 7 is a schematic color space diagram of a fourth image according to an embodiment of the present disclosure;
FIG. 8 is a schematic color space diagram of an image with no chromaticity loss after restoration according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an image chrominance restoration system according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an image chromaticity reduction apparatus applied to a server according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of an image chromaticity reducing apparatus applied to a terminal according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application provides an image chromaticity reduction method applied to a server, and correspondingly provides an image chromaticity reduction method applied to a terminal, the image chromaticity reduction method is suitable for a virtual desktop system, under the scenes that users edit images, make PPT and the like have high requirements on image chromaticity, it can be understood that the images on the server are transmitted to the terminal for display and output after being compressed, and in the image compression process, a large amount of chromaticity information is lost, which causes the images finally displayed and output by a client to have chromaticity loss, and further causes poor desktop use experience of the users, therefore, the application provides that the server not only transmits the images with chromaticity loss to the terminal, but also transmits the lost chromaticity information, so that the terminal can perform image chromaticity reduction according to the lost chromaticity information to display the images without chromaticity loss, and further, the desktop using experience of the user is improved.
Based on the image chromaticity restoration method provided by the application, the application also provides an image chromaticity restoration device applied to the server, an image chromaticity restoration device applied to the terminal and an image chromaticity restoration system comprising the server and the terminal. The terminal may be an electronic device such as a smart phone, a computer, a PAD, a desktop, and the like, and in one example, the image chromaticity reduction apparatus applied to the terminal may be a client running in the terminal, and the client may be an application client or a web page client. The server may be one server, or a server cluster composed of a plurality of servers, or a cloud computing service center. The server may be connected to the terminals through a network including, but not limited to: a wide area network, a metropolitan area network, or a local area network. In an alternative embodiment, a virtual machine runs on the server, and a display image on the virtual machine needs to be subjected to image compression and then transmitted to the client for display output.
The following describes, with reference to specific embodiments, an image chromaticity reduction method applied to a server and an image chromaticity information reduction method applied to a terminal, which are provided by the present application.
First, a process of an image chroma restoration method applied to a server is described.
Referring to fig. 1, a flow chart of an image chroma restoration method applied to a server is shown, where the method may include:
step S101: a first image of a first color space is converted to a second image of a second color space.
Wherein the second image has a loss of chrominance compared to the first image.
Before encoding an image, a first image in a first color space needs to be converted into a second image in a second color space.
Converting a first image of a first color space to a second image of a second color space provides at least the following two benefits: first, converting an image to a second color space may decorrelate luminance and chrominance components in pixels of the image to facilitate image compression; second, since the human eye is not sensitive to the chrominance information of the image and is not easily perceived by the human eye even if part of the chrominance information is lost, converting the image to the second color space can separate the luminance component from the chrominance component in the pixels of the image, so that a lower resolution can be sampled for the chrominance component without affecting the human perception of the image.
Optionally, the first color space may be an RGB color space, the second color space may be a YUV color space or a YCbCr color space, and optionally, the second image may be an image in YUV420 format.
In the virtual desktop system, considering the characteristic that human eyes are insensitive to chrominance information of an image, when a hardware encoder of a server is designed, in order to simplify the design and efficiently compress the image, the hardware encoder in the server removes a large amount of chrominance information during encoding. Typically, a desktop image is an RGB-formatted image that needs to be first converted into a YUV-formatted image that can be used for video encoding, and for the YUV-formatted image, the color of one pixel is represented by Y, U, V three components, specifically, Y represents luminance, and U and V represent two different chromaticities. Currently, most hardware codecs only support the YUV420 input format, such images retain data on the Y component of each pixel, but for data on the chrominance U, V component, a large amount of color loss results from using the same chrominance U, V component value for every 4 two-dimensional spatially adjacent pixels sharing through chrominance sampling.
Optionally, the hardware encoder may be an encoding Unit on a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit).
Step S102: chrominance information of the second image lost compared to the first image is determined as the first chrominance information.
As described above, the second image has a chrominance loss compared to the first image, and if the server encodes and transmits only the second image, the image received by the terminal has a chrominance loss, which results in a poor desktop use experience for the user.
The inventor thinks that: chrominance information of the second image lost compared to the first image may also be transmitted to the terminal, so that chrominance restoration may be performed according to the first chrominance information.
Based on this, the present application may compare the chrominance information of the second image with the first image to determine the chrominance information lost by the second image compared to the first image.
It should be noted that the chrominance information determined by the present application that the second image is lost compared to the first image may be organized in the form of a bitmap, that is, the chrominance information that the second image is lost compared to the first image is represented by the chrominance difference image, so that the hardware encoder may encode the chrominance difference image.
Step S103: and respectively encoding the second image and the first chrominance information, and sending the encoding result of the second image and the encoding result of the first chrominance information to the terminal, so that the terminal respectively decodes the encoding result of the second image and the encoding result of the first chrominance information, and restores the image without chrominance loss based on the decoding result.
In an optional embodiment, before the encoding result of the second image and the encoding result of the first chrominance information are sent to the terminal, the encoding result of the second image and the encoding result of the first chrominance information may be packed, and the packed result is sent to the terminal, so that the terminal may more accurately determine the correspondence between the encoding result of the second image and the encoding result of the first chrominance information from a plurality of pieces of information.
The image chroma restoration method applied to the server not only sends the coding result of the second image, but also sends the coding result of the first chroma information at the same time, and the first chroma information can represent the chroma information of the second image, which is lost compared with the first image, so that the terminal can restore the image without chroma loss according to the decoding result. The image chromaticity restoration method provided by the embodiment of the application can restore the color information lost by the original image, so that the terminal can display the color details of the image, and the user experience can be improved.
In an embodiment of the present application, a description will be given of a procedure of "step S102, determining chromaticity information of a second image lost compared to a first image as first chromaticity information" in the above-described embodiment.
Referring to fig. 2, a flow chart illustrating a process of determining chrominance information lost by a second image compared to a first image may include:
step S201, converting the first image in the first color space into a third image in the second color space.
Wherein the third image has no chrominance loss compared to the first image.
In order to obtain the chrominance information of the second image loss, the present embodiment converts the first image of the first color space into the third image of the second color space without chrominance loss compared to the first image.
Taking the first image as an RGB format image and the second image as a YUV420 format image as an example, this step may convert the RGB format first image into a YUV444 format third image.
Step S202, determining a chromaticity difference image according to the second image and the third image.
Wherein the chrominance difference image is capable of characterizing chrominance information lost by the second image compared to the first image.
In an embodiment of the present application, the chrominance difference image may include a first chrominance difference image and a second chrominance difference image, where the first chrominance difference image may represent first chrominance information lost by the second image compared to the first image, and the second chrominance difference image may represent second chrominance information lost by the second image compared to the first image. Taking the second image as an image in YUV420 format and the third image as an image in YUV444 format as an example, the first chrominance difference image may be a chrominance difference image corresponding to the U component and the second chrominance difference image may be a chrominance difference image corresponding to the V component.
Based on this, in one possible implementation, the process of determining the chrominance difference image according to the second image and the third image may include:
taking any pixel in the second image as a target pixel, calculating a difference value between a first chrominance component of a corresponding pixel in the third image and the first chrominance component of the target pixel, and taking the difference value as a first chrominance difference value corresponding to the target pixel to obtain first chrominance difference values respectively corresponding to each pixel in the second image; forming a first chrominance difference image by first chrominance differences respectively corresponding to each pixel in the second image;
taking any pixel in the second image as a target pixel, calculating a difference value between a second chrominance component of a corresponding pixel in the third image and a second chrominance component of the target pixel, and taking the difference value as a second chrominance difference value corresponding to the target pixel to obtain second chrominance difference values respectively corresponding to each pixel in the second image; a second chrominance difference image is composed of second chrominance difference values respectively corresponding to the pixels in the second image.
The process of "determining a chrominance difference image from a second image and a third image" as described above will be described below by taking an example in which the second image is an image in YUV420 format and the third image is an image in YUV444 format.
Before describing the second image in YUV420 format and the third image in YUV444 format, determining the chrominance difference image ", the second image in YUV420 format and the third image in YUV444 format are first described as follows, respectively:
referring to FIG. 3, a color space diagram of a third image is shown. Third image at the time of sampling, each pixel samples a set of U component (i.e., a first chrominance component), V component (i.e., a second chrominance component), and Y component (i.e., a luminance component). Referring to FIG. 4, a color space diagram of a second image is shown. Unlike the third image, the second image samples a set of U component (i.e., the first chrominance component) and V component (i.e., the second chrominance component) every 4 pixels, and samples a Y component (i.e., the luminance component) every 1 pixel. For the second image, the physically similar 4 pixels b1, b2, b5, b6 share the same Ub1 component and Vb1 component, similar b3, b4, b7, b8 share the same U b2 component sum V b2 component, similar b9, b10, b13, b14 share the same Ub3 component sum Vb3 component, similar b11, b12, b15, b16 share the same U b4 component sum V b4 components.
It should be noted that, although the second image samples a set of U and V components for every 4 pixels, there are three components for each pixel, except that the U and V components for every 4 pixels are equal in size, that is: for the b1, b2, b5 and b6 pixels, the sizes of the corresponding first chrominance components are all Ub1, second degree of colorThe magnitude of the components are all Vb1, and the luminance component corresponding to the b1 pixel is YbThe luminance component corresponding to the 1, b2 pixel is Y b2, b5 pixel corresponds to a luminance component of YbThe luminance component corresponding to the 5, b6 pixel is Y b6; …, respectively; by analogy, for the b11, b12, b15 and b16 pixels, the sizes of the corresponding first chrominance components are all U b4, the second chrominance components are all V b4, and the luminance component corresponding to the b11 pixel is YbThe luminance component corresponding to the 11, b12 pixel is YbThe luminance component corresponding to the 12, b15 pixel is Y b15, b16 pixel corresponds to a luminance component of Y b16。
It should be noted that, since the second image and the third image are both converted from the first image, the number of pixels of the second image and the third image is the same, and the pixels at the same positions in the second image and the third image correspond to each other, that is, the a1 pixel corresponds to the b1 pixel, the a2 pixel corresponds to the b2 pixel, …, and so on, the a16 pixel corresponds to the b16 pixel.
Based on the above description, the process of determining a chrominance difference image from the second image in YUV420 format and the third image in YUV444 format may include:
calculating a first chrominance difference value U1-U corresponding to b1 pixels for b1 pixels in the second imagea1-Ub1, and calculates a second chrominance difference value V1 ═ V corresponding to the b1 pixela1-Vb1;
Calculating a first chrominance difference value corresponding to b2 pixels as U2 ═ U for b2 pixels in the second imagea2-Ub1, and calculates a second chrominance difference value V2 ═ V corresponding to the b2 pixelsa2-Vb1;
Calculating a first chrominance difference value U3-U corresponding to b3 pixels for b3 pixels in the second imagea3-U b2 and calculates a second chrominance difference value V3 ═ V corresponding to the b3 pixela3-V b2;
For b16 pixels in the second image, a first chrominance difference value corresponding to b16 pixels is calculated as,and calculates a second chrominance difference value V16 ═ V corresponding to the b16 pixelsa16-V b4。
In summary, the obtained first chrominance difference image composed of the first chrominance difference values respectively corresponding to the b1 pixels to the b16 pixels can be referred to as fig. 5a, and similarly, the obtained second chrominance difference image composed of the second chrominance difference values respectively corresponding to the b1 pixels to the b16 pixels can be referred to as fig. 5b, and the first chrominance difference image and the second chrominance difference image are the chrominance difference images determined in this step.
Next, a procedure of the image chromaticity reduction method applied to the terminal is described.
It should be noted that some basic concepts in the present embodiment may correspond to the concepts in the server corresponding embodiment described above, and are described in the following description.
Referring to fig. 6, a flowchart of an image chroma restoration method applied to a terminal is shown, where the method may include:
step S601: and receiving the encoding result of the second image and the encoding result of the first chrominance information sent by the server.
The second image is an image of a second color space, the server performs spatial conversion on the first image of the first color space to obtain the first image, and the first chrominance information is chrominance information lost by the second image compared with the first image.
In combination with the above description, the server may encode the second image and the first chrominance information respectively, and transmit the encoding result of the second image and the encoding result of the first chrominance information to the terminal, so that the embodiment may receive the encoding result of the second image and the encoding result of the first chrominance information transmitted by the server.
The second image and the first chrominance information are the same as the second image and the first chrominance information, and the detailed description thereof can be referred to the foregoing description, and will not be repeated herein.
Step S602: and decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information.
Optionally, the encoding result of the second image may be decoded by a hardware decoder, and the encoding result of the first chrominance information may be decoded by the hardware decoder.
In the embodiment of the present application, the decoding process and the process in which the server encodes the second image and the first chrominance information respectively are reverse processes, so that the fourth image corresponds to the second image, and the second chrominance information corresponds to the first chrominance information.
It should be noted that, if the server packages the encoding result of the second image and the encoding result of the first chrominance information before sending the encoding result of the second image and the encoding result of the first chrominance information to the terminal, in this step, the packaging result needs to be analyzed first to obtain the analyzed encoding result of the second image and the analyzed encoding result of the first chrominance information, and then the encoding result of the second image and the encoding result of the first chrominance information are decoded respectively.
Step S603: and restoring the image without chromaticity loss according to the fourth image and the second chromaticity information.
In the embodiment of the present application, the second chrominance information can represent chrominance information of the fourth image lost compared with the first image, and therefore, an image without chrominance loss can be restored based on the fourth image and the second chrominance information.
In the image chroma restoration method applied to the terminal provided by the embodiment of the application, the terminal may receive the encoding result of the second image and the encoding result of the first chroma information; decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information; since the second chrominance information can represent the chrominance information of the fourth image lost compared with the first image, the image without chrominance loss can be restored according to the fourth image and the second chrominance information. The image chromaticity restoration method provided by the embodiment of the application can restore the color information lost by the original image, so that the terminal can display the color details of the image, and the user experience can be improved.
Next, as to "step S603" in the above embodiment: and restoring an image without chromaticity loss based on the fourth image and the second chromaticity information.
Before describing the above step S603, several basic concepts and relationships between the basic concepts will be described first.
First, the relationship between the first chrominance information and the chrominance difference image.
It has been explained above that the first chrominance information is the chrominance information lost by the second image compared to the first image. Corresponding to the server, the first chrominance information in the embodiment of the present application may also be represented by a chrominance difference image, and then the encoding result of the first chrominance information is the encoding result of the chrominance difference image. Specifically, the chrominance difference image is determined by the server according to the second image and a third image, wherein the third image is an image of the second color space, the third image is obtained by spatially converting the first image of the first color space by the server, and the third image has no chrominance loss compared with the first image.
And secondly, the relationship between the chromaticity difference image and the first chromaticity difference image as well as the second chromaticity difference image.
In an alternative embodiment, the chrominance difference image comprises a first chrominance difference image and a second chrominance difference image, the first chrominance difference image being capable of characterizing chrominance information of a first chrominance component loss of each pixel in the second image, and the second chrominance difference image being capable of characterizing chrominance information of a second chrominance component loss of each pixel in the second image. Accordingly, the encoding result of the first chrominance information includes an encoding result of the first chrominance difference image and an encoding result of the second chrominance difference image. For the process of acquiring the first chrominance difference image and the second chrominance difference image, reference may be made in detail to the process of acquiring the first chrominance difference image and the second chrominance difference image in the corresponding embodiment of the server, which is not repeated herein.
And thirdly, the second chroma information is related to the third chroma difference image and the fourth chroma difference image.
Optionally, the second chrominance information may include a third chrominance difference image and a fourth chrominance difference image, where the third chrominance difference image is an image obtained by decoding an encoding result of the first chrominance difference image, and the fourth chrominance difference image is an image obtained by decoding an encoding result of the second chrominance difference image.
Based on the basic concept, the step S603: the process of restoring an image without chrominance loss according to the fourth image and the second chrominance information may include: and performing chromaticity compensation on the first chromaticity component of each pixel in the fourth image by using the third chromaticity difference image, and performing chromaticity compensation on the second chromaticity component of each pixel in the fourth image by using the fourth chromaticity difference image to obtain an image without chromaticity loss.
As described above, the third chrominance difference image can represent the chrominance information of the first chrominance component loss of each pixel in the fourth image, and the fourth chrominance difference image can represent the chrominance information of the second chrominance component loss of each pixel in the fourth image. Therefore, the third chrominance difference image and the fourth chrominance difference image can be used for carrying out chrominance compensation on chrominance information lost by the fourth image so as to obtain an image without chrominance loss.
Assuming that the color space of the decoded fourth image is as shown in fig. 7, the pixel values are c1, c2, … and c16, respectively, and c1 pixels correspond to b1 pixels in the second image, c2 pixels correspond to b2 pixels in the second image, …, and so on, and c16 pixels correspond to b16 pixels in the second image; assuming that the transmission of the chrominance difference image from the server to the client is error-free, and the encoding and decoding processes are also error-free, the pixel data in the third chrominance difference image can still be referred to as shown in fig. 5a, and the pixel data in the fourth chrominance difference image can still be referred to as shown in fig. 5 b.
Then, the process of "performing chrominance compensation on the first chrominance components of the pixels in the fourth image by using the third chrominance difference image" may specifically include: for each pixel in the fourth image, obtaining a chrominance difference value corresponding to the pixel from the third chrominance difference image, and adding the chrominance difference value corresponding to the pixel to the first chrominance component of the pixel.
That is, for the c1 pixel in the fourth image, the chroma difference corresponding to the pixel is added to the first chroma component of the c1 pixel to obtain the compensated first chroma component Ud1=Uc1+U1;
For c2 pixel in the fourth image, adding the chroma difference corresponding to the pixel to the first chroma component of the c2 pixel to obtain a compensated first chroma component U d2=Uc1+U2;
For c3 pixel in the fourth image, adding the chroma difference corresponding to the pixel to the first chroma component of the c3 pixel to obtain a compensated first chroma component Ud3=U c2+U3;
For c16 pixels in the fourth image, adding the chrominance difference value corresponding to the pixel to the first chrominance component of the c16 pixels to obtain a compensated first chrominance component U d16=U c4+U16。
The process of performing the chrominance compensation on the second chrominance components of the pixels in the fourth image by using the fourth chrominance difference image may specifically include: and for each pixel in the fourth image, acquiring a chrominance difference value corresponding to the pixel from the fourth chrominance difference value image, and adding the chrominance difference value corresponding to the pixel to the second chrominance component of the pixel.
That is, for the c1 pixel in the fourth image, the chrominance difference value corresponding to the pixel is added to the second chrominance component of the c1 pixel to obtain the compensated second chrominance component Vd1=Vc1+V1;
For c2 pixels in the fourth image, adding the chrominance difference value corresponding to the pixel to the second chrominance component of the c2 pixels to obtain a compensated second chrominance component V d2=Vc1+V2;
For c3 pixels in the fourth image, adding the chrominance difference value corresponding to the pixel to the second chrominance component of the c3 pixels to obtain a compensated second chrominance component Vd3=V c2+V3;
For c16 pixels in the fourth image, adding the chrominance difference value corresponding to the pixel to the second chrominance component of the c16 pixels to obtain a compensated second chrominance component V d16=V c4+V16。
Through the above process, an image without chromaticity loss can be obtained, and its color space is as shown in fig. 8.
The present application further provides an image chromaticity restoration system, please refer to fig. 9, which shows a schematic structural diagram of the system, and the system may include: a server 901 and a terminal 902.
A server 901 for converting a first image of a first color space into a second image of a second color space, wherein the second image has a loss of chromaticity compared to the first image; determining chrominance information of the second image lost compared with the first image as first chrominance information; and respectively coding the second image and the first chrominance information, and sending the coding result of the second image and the coding result of the first chrominance information to the terminal.
A terminal 902, configured to receive an encoding result of the second image and an encoding result of the first chrominance information sent by the server; decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information; and restoring the image without chromaticity loss according to the fourth image and the second chromaticity information.
Specific operations executed by the server in the image chromaticity reduction system in the image chromaticity reduction process can be referred to the image chromaticity reduction method applied to the server; in addition, for specific operations executed by the terminal in the process of performing image chromaticity restoration, reference may be made to the image chromaticity restoration method applied to the terminal, and details of this embodiment are not described herein again.
Corresponding to the image chromaticity reduction method applied to the server, the image chromaticity reduction method applied to the terminal, and the image chromaticity reduction system, the embodiment of the present application further provides two apparatuses, and specific embodiments are described in detail below.
A first apparatus: fig. 10 is a schematic structural diagram illustrating an image chromaticity reducing apparatus applied to a server according to an embodiment of the present application.
As shown in fig. 10, the image chromaticity reduction apparatus applied to the server may include: a conversion module 1001, a color difference determination module 1002, an encoding module 1003 and a transmission module 1004.
A conversion module 1001 configured to convert a first image of a first color space into a second image of a second color space, wherein the second image has a loss of chromaticity compared to the first image;
a color difference determining module 1002, configured to determine, as first color information, color information of the second image lost compared to the first image;
an encoding module 1003, configured to encode the second image and the first chrominance information respectively.
A sending module 1004, configured to send the encoding result of the second image and the encoding result of the first chrominance information to a terminal, so that the terminal decodes the encoding result of the second image and the encoding result of the first chrominance information respectively, and restores an image without chrominance loss based on the decoding result.
Optionally, the color difference determining module may include:
a conversion unit configured to convert a first image of the first color space into a third image of the second color space, wherein the third image has no chrominance loss compared to the first image;
a color difference image determination unit configured to determine a chrominance difference image according to the second image and the third image, wherein the chrominance difference image is capable of representing chrominance information lost by the second image compared to the first image.
Optionally, the chrominance difference image includes a first chrominance difference image and a second chrominance difference image, where the first chrominance difference image can represent first chrominance information lost by the second image compared with the first image, and the second chrominance difference image can represent second chrominance information lost by the second image compared with the first image;
the color difference image determination unit may include:
a first calculating unit, configured to take any pixel in the second image as a target pixel, and calculate a difference between a first chrominance component of a pixel corresponding to a second target in the third image and the first chrominance component of the target pixel, as a first chrominance difference corresponding to the target pixel, so as to obtain first chrominance differences respectively corresponding to pixels in the second image; forming a first chrominance difference image from first chrominance differences respectively corresponding to each pixel in the second image;
a second calculating unit, configured to take any one pixel in the second image as a target pixel, calculate a difference between a second chrominance component of a corresponding pixel in the third image and the second chrominance component of the target pixel, as a second chrominance difference corresponding to the target pixel, so as to obtain second chrominance differences respectively corresponding to each pixel in the second image; and forming a second chrominance difference image by the second chrominance difference values respectively corresponding to the pixels in the second image.
The second device comprises: an embodiment of the present application further provides an image chromaticity reducing apparatus applied to a terminal, referring to fig. 11, where fig. 11 is a schematic structural diagram of the image chromaticity reducing apparatus applied to the terminal provided in the embodiment of the present application.
As shown in fig. 11, the image chromaticity reducing apparatus applied to the terminal may include: a receiving module 1101, a decoding module 1102 and a restoring module 1103.
A receiving module 1101, configured to receive an encoding result of a second image and an encoding result of first chrominance information, where the second image is an image in a second color space, and the second image is obtained by performing spatial conversion on a first image in a first color space by the server, and the first chrominance information is chrominance information lost by the second image compared with the first image;
a decoding module 1102, configured to decode an encoding result of the second image to obtain a fourth image, and decode an encoding result of the first chrominance information to obtain second chrominance information;
a restoring module 1103, configured to restore an image without chrominance loss according to the fourth image and the second chrominance information.
Optionally, the first chrominance information is represented by a chrominance difference image, and an encoding result of the first chrominance information is an encoding result of the chrominance difference image;
the chrominance difference image is determined by the server according to the second image and a third image, wherein the third image is an image of the second color space, the third image is obtained by performing spatial conversion on the first image of the first color space by the server, and the third image has no chrominance loss compared with the first image.
Optionally, the chrominance difference image includes a first chrominance difference image and a second chrominance difference image, the first chrominance difference image can represent chrominance information of a loss of a first chrominance component of each pixel in the second image, and the second chrominance difference image can represent chrominance information of a loss of a second chrominance component of each pixel in the second image;
the encoding result of the first chrominance information comprises an encoding result of the first chrominance difference image and an encoding result of the second chrominance difference image;
the second chrominance information includes: a third chrominance difference image and a fourth chrominance difference image, wherein the third chrominance difference image is an image obtained by decoding the encoding result of the first chrominance difference image, and the fourth chrominance difference image is an image obtained by decoding the encoding result of the second chrominance difference image;
the above-mentioned restoration module may include:
and the chrominance compensation unit is used for performing chrominance compensation on the first chrominance components of the pixels in the fourth image by using the third chrominance difference image and performing chrominance compensation on the second chrominance components of the pixels in the fourth image by using the fourth chrominance difference image to obtain an image without chrominance loss.
Optionally, the process of performing, by the chrominance compensation unit, chrominance compensation on the first chrominance component of each pixel in the fourth image by using the third chrominance difference image may include:
for each pixel in the fourth image, obtaining a chrominance difference value corresponding to the pixel from the third chrominance difference image, and adding the chrominance difference value corresponding to the pixel to the first chrominance component of the pixel;
the process of the chrominance compensation unit performing chrominance compensation on the second chrominance components of the pixels in the fourth image by using the fourth chrominance difference image may include:
and for each pixel in the fourth image, acquiring a chrominance difference value corresponding to the pixel from the fourth chrominance difference value image, and adding the chrominance difference value corresponding to the pixel to the second chrominance component of the pixel.
An embodiment of the present application further provides a server, where a hardware structure of the server may include: at least one processor, at least one communication interface, at least one memory, and at least one communication bus;
in the embodiment of the application, the number of the processor, the communication interface, the memory and the communication bus is at least one, and the processor, the communication interface and the memory complete mutual communication through the communication bus;
the processor may be a central processing unit CPU, or an application Specific Integrated circuit (asic), or one or more Integrated circuits configured to implement embodiments of the present invention, etc.;
the memory may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein the memory stores a program and the processor can call the program stored in the memory, the program for:
converting a first image of a first color space to a second image of a second color space, wherein the second image has a loss of chroma compared to the first image;
determining chrominance information of the second image lost compared with the first image as first chrominance information;
and respectively encoding the second image and the first chrominance information, and sending the encoding result of the second image and the encoding result of the first chrominance information to a terminal, so that the terminal respectively decodes the encoding result of the second image and the encoding result of the first chrominance information, and restores an image without chrominance loss based on the decoding result.
Alternatively, the detailed function and the extended function of the program may be as described above.
An embodiment of the present application further provides a terminal, where a hardware structure of the terminal may include: at least one processor, at least one communication interface, at least one memory, and at least one communication bus;
in the embodiment of the application, the number of the processor, the communication interface, the memory and the communication bus is at least one, and the processor, the communication interface and the memory complete mutual communication through the communication bus;
the processor may be a central processing unit CPU, or an application Specific Integrated circuit (asic), or one or more Integrated circuits configured to implement embodiments of the present invention, etc.;
the memory may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein the memory stores a program and the processor can call the program stored in the memory, the program for:
receiving an encoding result of a second image and an encoding result of first chrominance information, wherein the encoding result of the second image and the encoding result of the first chrominance information are sent by a server, the second image is an image of a second color space, the second image is obtained by performing spatial conversion on a first image of a first color space by the server, and the first chrominance information is chrominance information lost by the second image compared with the first image;
decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information;
and restoring an image without chromaticity loss according to the fourth image and the second chromaticity information.
Alternatively, the detailed function and the extended function of the program may be as described above.
The embodiment of the present application further provides a readable storage medium applied to a server, on which a computer program is stored, and when the computer program is executed by a processor, the method for restoring image chromaticity applied to the server is implemented.
The embodiment of the present application further provides a readable storage medium applied to a terminal, on which a computer program is stored, and when the computer program is executed by a processor, the method for restoring image chromaticity applied to the terminal is implemented.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An image chroma restoration method is applied to a server, and the method comprises the following steps:
converting a first image of a first color space to a second image of a second color space, wherein the second image has a loss of chroma compared to the first image;
determining chrominance information of the second image lost compared with the first image as first chrominance information;
and respectively encoding the second image and the first chrominance information, and sending the encoding result of the second image and the encoding result of the first chrominance information to a terminal, so that the terminal respectively decodes the encoding result of the second image and the encoding result of the first chrominance information, and restores an image without chrominance loss based on the decoding result.
2. The image chroma restoration method of claim 1, wherein the determining chroma information of the second image lost compared to the first image comprises:
converting a first image of the first color space to a third image of the second color space, wherein the third image has no loss of chroma compared to the first image;
determining a chrominance difference image from the second image and the third image, wherein the chrominance difference image is capable of characterizing chrominance information lost by the second image compared to the first image.
3. The image chrominance restoration method according to claim 2, wherein the chrominance difference image comprises a first chrominance difference image and a second chrominance difference image, wherein the first chrominance difference image is capable of representing first chrominance information lost by the second image compared to the first image, and the second chrominance difference image is capable of representing second chrominance information lost by the second image compared to the first image;
determining a chrominance difference image from the second image and the third image, comprising:
taking any pixel in the second image as a target pixel, calculating a difference value between a first chrominance component of a corresponding pixel in the third image and the first chrominance component of the target pixel, and taking the difference value as a first chrominance difference value corresponding to the target pixel to obtain first chrominance difference values respectively corresponding to each pixel in the second image; forming a first chrominance difference image from first chrominance differences respectively corresponding to each pixel in the second image;
taking any pixel in the second image as a target pixel, calculating a difference value between a second chrominance component of a corresponding pixel in the third image and a second chrominance component of the target pixel, and taking the difference value as a second chrominance difference value corresponding to the target pixel to obtain second chrominance difference values respectively corresponding to each pixel in the second image; and forming a second chrominance difference image by the second chrominance difference values respectively corresponding to the pixels in the second image.
4. An image chroma restoration method is applied to a terminal, and the method comprises the following steps:
receiving an encoding result of a second image and an encoding result of first chrominance information, wherein the encoding result of the second image and the encoding result of the first chrominance information are sent by a server, the second image is an image of a second color space, the second image is obtained by performing spatial conversion on a first image of a first color space by the server, and the first chrominance information is chrominance information lost by the second image compared with the first image;
decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information;
and restoring an image without chromaticity loss according to the fourth image and the second chromaticity information.
5. The method for chroma restoration according to claim 4, wherein the first chroma information is represented by a chroma difference image, and the encoding result of the first chroma information is the encoding result of the chroma difference image;
the chrominance difference image is determined by the server according to the second image and a third image, the third image is an image of the second color space, the third image is obtained by performing spatial conversion on the first image of the first color space by the server, and the third image has no chrominance loss compared with the first image.
6. The image chromaticity recovery method according to claim 5, wherein the chromaticity difference image includes a first chromaticity difference image and a second chromaticity difference image, the first chromaticity difference image being capable of representing chromaticity information of a first chromaticity component loss of each pixel in the second image, the second chromaticity difference image being capable of representing chromaticity information of a second chromaticity component loss of each pixel in the second image;
the encoding result of the first chrominance information comprises an encoding result of the first chrominance difference image and an encoding result of the second chrominance difference image;
the second chrominance information includes: a third chrominance difference image and a fourth chrominance difference image, wherein the third chrominance difference image is an image obtained by decoding the encoding result of the first chrominance difference image, and the fourth chrominance difference image is an image obtained by decoding the encoding result of the second chrominance difference image;
the restoring an image without chromaticity loss according to the fourth image and the second chromaticity information includes:
and performing chromaticity compensation on the first chromaticity component of each pixel in the fourth image by using the third chromaticity difference image, and performing chromaticity compensation on the second chromaticity component of each pixel in the fourth image by using the fourth chromaticity difference image to obtain an image without chromaticity loss.
7. The method as claimed in claim 6, wherein the performing chrominance compensation on the first chrominance components of the pixels in the fourth image respectively by using the third chrominance difference image comprises:
for each pixel in the fourth image, obtaining a chrominance difference value corresponding to the pixel from the third chrominance difference image, and adding the chrominance difference value corresponding to the pixel to the first chrominance component of the pixel;
the performing chrominance compensation on the second chrominance components of the pixels in the fourth image by using the fourth chrominance difference image respectively includes:
and for each pixel in the fourth image, acquiring a chrominance difference value corresponding to the pixel from the fourth chrominance difference value image, and adding the chrominance difference value corresponding to the pixel to the second chrominance component of the pixel.
8. A chroma restoration device applied to a server, the device comprising:
a conversion module to convert a first image of a first color space to a second image of a second color space, wherein the second image has a loss of chroma compared to the first image;
a color difference determining module, configured to determine, as first color information, color information of the second image lost compared to the first image;
an encoding module, configured to encode the second image and the first chrominance information respectively;
and the sending module is used for sending the coding result of the second image and the coding result of the first chrominance information to a terminal so that the terminal respectively decodes the coding result of the second image and the coding result of the first chrominance information and restores the image without chrominance loss based on the decoding result.
9. A chrominance restoration apparatus, applied to a terminal, the apparatus comprising:
a receiving module, configured to receive an encoding result of a second image and an encoding result of first chrominance information, where the second image is an image in a second color space, and the second image is obtained by performing spatial conversion on a first image in a first color space by the server, and the first chrominance information is chrominance information lost by the second image compared with the first image;
the decoding module is used for decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information;
and the restoring module is used for restoring the image without chromaticity loss according to the fourth image and the second chromaticity information.
10. An image chroma restoration system, comprising: a server and a terminal;
the server is used for converting a first image of a first color space into a second image of a second color space, wherein the second image has chromaticity loss compared with the first image; determining chrominance information of the second image lost compared with the first image as first chrominance information; respectively encoding the second image and the first chrominance information, and sending an encoding result of the second image and an encoding result of the first chrominance information to the terminal;
the terminal is used for receiving the coding result of the second image and the coding result of the first chrominance information; decoding the encoding result of the second image to obtain a fourth image, and decoding the encoding result of the first chrominance information to obtain second chrominance information; and restoring an image without chromaticity loss according to the fourth image and the second chromaticity information.
CN201910887621.9A 2019-09-19 2019-09-19 Image chromaticity restoration method, device and system Pending CN112533025A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910887621.9A CN112533025A (en) 2019-09-19 2019-09-19 Image chromaticity restoration method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910887621.9A CN112533025A (en) 2019-09-19 2019-09-19 Image chromaticity restoration method, device and system

Publications (1)

Publication Number Publication Date
CN112533025A true CN112533025A (en) 2021-03-19

Family

ID=74974184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910887621.9A Pending CN112533025A (en) 2019-09-19 2019-09-19 Image chromaticity restoration method, device and system

Country Status (1)

Country Link
CN (1) CN112533025A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103402091A (en) * 2013-07-31 2013-11-20 上海通途半导体科技有限公司 Cloud desktop image classifying and encoding method
CN104919804A (en) * 2012-10-01 2015-09-16 微软技术许可有限责任公司 Frame packing and unpacking higher-resolution chroma sampling formats
CN107665128A (en) * 2017-09-13 2018-02-06 深信服科技股份有限公司 Image processing method, system, server and readable storage medium storing program for executing
CN109951715A (en) * 2019-02-25 2019-06-28 北京新兴东方航空装备股份有限公司 It is a kind of based on YUV444 image coding/decoding method H.264
CN110798705A (en) * 2018-08-01 2020-02-14 深信服科技股份有限公司 Video image transmission method, device and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104919804A (en) * 2012-10-01 2015-09-16 微软技术许可有限责任公司 Frame packing and unpacking higher-resolution chroma sampling formats
CN103402091A (en) * 2013-07-31 2013-11-20 上海通途半导体科技有限公司 Cloud desktop image classifying and encoding method
CN107665128A (en) * 2017-09-13 2018-02-06 深信服科技股份有限公司 Image processing method, system, server and readable storage medium storing program for executing
CN110798705A (en) * 2018-08-01 2020-02-14 深信服科技股份有限公司 Video image transmission method, device and equipment
CN109951715A (en) * 2019-02-25 2019-06-28 北京新兴东方航空装备股份有限公司 It is a kind of based on YUV444 image coding/decoding method H.264

Similar Documents

Publication Publication Date Title
CN111681167B (en) Image quality adjusting method and device, storage medium and electronic equipment
JP6303176B2 (en) Method for decoding signal, computer program, and decoder
CN107665128B (en) Image processing method, system, server and readable storage medium
US8995763B2 (en) Systems and methods for determining compression methods to use for an image
CN103281539A (en) Method, device and terminal for image encoding and decoding processing
US11265528B2 (en) Methods and systems for color smoothing for point cloud compression
WO2020224551A1 (en) Information compression/decompression methods and apparatuses, and storage medium
CN106713922B (en) Image processing method and electronic device
CN110399511A (en) Image cache method, equipment, storage medium and device based on Redis
EP3180910B1 (en) Method for optimized chroma subsampling, apparatus for optimized chroma subsampling and storage device
CN109274976B (en) Data processing method and device, electronic equipment and storage medium
JP7261732B2 (en) Method and apparatus for determining character color
US20210383574A1 (en) Method and apparatus for enhanced patch boundary identification for point cloud compression
CN110798497A (en) Mixed reality interaction system and method
CN110769241B (en) Video frame processing method and device, user side and storage medium
CN110891195B (en) Method, device and equipment for generating screen image and storage medium
CN112653905B (en) Image processing method, device, equipment and storage medium
CN110267038B (en) Encoding method and device, and decoding method and device
CN112533025A (en) Image chromaticity restoration method, device and system
KR20160082521A (en) Chroma down-conversion and up-conversion processing
CN109413445A (en) A kind of video transmission method and device
CN113487524B (en) Image format conversion method, apparatus, device, storage medium, and program product
US8582906B2 (en) Image data compression and decompression
CN110545446A (en) desktop image encoding and decoding methods, related devices and storage medium
CN114782249A (en) Super-resolution reconstruction method, device and equipment for image and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210319