CN114827620A - Image processing method, apparatus, device and medium - Google Patents
Image processing method, apparatus, device and medium Download PDFInfo
- Publication number
- CN114827620A CN114827620A CN202210764273.8A CN202210764273A CN114827620A CN 114827620 A CN114827620 A CN 114827620A CN 202210764273 A CN202210764273 A CN 202210764273A CN 114827620 A CN114827620 A CN 114827620A
- Authority
- CN
- China
- Prior art keywords
- image
- standard
- format
- custom
- yuv444
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Abstract
The invention relates to the technical field of image processing, and discloses an image processing method, an image processing device, image processing equipment and an image processing medium. The method comprises the steps of obtaining an original YUV444 or YUV422 format image, and carrying out image splitting on the original YUV444 or YUV422 format image according to attribute parameters of the original YUV444 or YUV422 format image to generate a YUV420 format standard image and a custom image; the YUV420 format standard image and the custom image are coded and decoded through a YUV420 format coder-decoder to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image; carrying out image fusion on the standard decoded image and the custom decoded image to generate a high-quality image; therefore, the YUV420 hardware codec is used for realizing the encoding and decoding of YUV444 or YUV422 format images, and high-quality images are generated by fusion.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image processing method, an image processing apparatus, an image processing device, and an image processing medium.
Background
Video coding techniques have very wide use in many industries, such as film and television, animation, television stations, media, and the like. Video coding techniques can significantly reduce the amount of raw video data while maintaining acceptable sharpness for the human eye.
At present, the YCbCr4:2: 0 H.26x hardware codec is built-in capability of a plurality of media chips, such as Hisi and RK chips, and is widely applied to the monitoring industry. A common monitoring application is that the camera images are converted to YCbCr4:2: 0 format for encoding and remote transmission, decoded by NVR and displayed on the screen. Compared with the monitoring industry, the audio and video application field has higher requirements on image effects, like the splicing of a KVM seat and an LED large screen, related images of the audio and video application field are not only cameras, but also related to computer desktop signals, high-definition 3D modeling signals and the like, and the YCbCr4:2: 0 format and a corresponding H.26x hardware coding and decoding technology cannot meet the requirements of high-quality image acquisition and display. Since the media chip is a built-in hardware codec, the codec method cannot be adjusted from a software layer, and even if the H.26x itself supports YCbCr4:2:2 or 4:4:4, the media chip cannot be directly used on the media chip.
Disclosure of Invention
The invention mainly aims to provide an image processing method, device, equipment and medium, aiming at realizing the coding and decoding of images in YUV444 or YUV422 formats by a YUV420 hardware coder-decoder, fusing and generating high-quality images and reducing the loss of image information.
In order to achieve the above object, the present invention provides an image processing method, including the steps of:
acquiring an original YUV444 or YUV422 format image, splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image, and generating a YUV420 format standard image and a custom image;
based on the YUV420 format standard image and the custom image, a YUV420 format codec is used for coding and decoding to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image;
and carrying out image fusion on the standard decoded image and the custom decoded image to generate a high-quality image.
Preferably, the attribute parameters of the original YUV444 or YUV422 format image include brightness, blue chrominance and red chrominance, and the step of splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image to obtain a standard image and a custom image includes:
extracting a YUV420 format standard image from the original YUV444 or YUV422 format image according to a first preset component, the brightness, the blue chrominance and the red chrominance;
and extracting a self-defined image from the original YUV444 or YUV422 format image according to a second preset component, the blue chroma and the red chroma.
Preferably, the custom image comprises first image data and second image data;
and converting the attribute parameters in the second image data into first digital information corresponding to the attribute parameters.
Preferably, the YUV 420-format standard image includes third image data and fourth image data;
and converting the attribute parameters in the fourth image data into second digital information corresponding to the attribute parameters.
Preferably, the YUV420 format codec includes a first codec and a second codec, and the step of obtaining the standard decoded image corresponding to the YUV420 format standard image and the custom decoded image corresponding to the custom image by encoding and decoding the YUV420 format standard image and the custom image based on the YUV420 format standard image and the custom image includes:
encoding the YUV 420-format standard image through an encoding unit of the first codec to generate a standard image stream; decoding the standard image stream through a decoding unit of the first coder-decoder to generate a standard decoding image;
segmenting the user-defined image to generate a user-defined segmented image; coding the user-defined segmentation image through a coding unit of the second coder-decoder to generate a user-defined image stream; and decoding the self-defined image stream through a decoding unit of the second codec to generate a self-defined decoded image.
Preferably, the step of fusing the standard decoded image and the image custom decoded image to generate a high-quality image includes:
and carrying out image fusion on the standard decoded image and the image custom-decoded image according to a preset inverse conversion algorithm, the attribute parameters of the standard decoded image and the attribute parameters of the custom image to generate a corresponding high-quality image.
Preferably, after the step of fusing the standard decoded image and the custom decoded image to generate a high-quality image, the image processing method further includes:
and outputting the high-quality image to a display device for displaying.
Further, to achieve the above object, the present invention also provides an image processing apparatus comprising:
the splitting module is used for acquiring an original YUV444 or YUV422 format image, splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image, and generating a YUV420 format standard image and a custom image;
the encoding and decoding module is used for encoding and decoding the YUV420 format standard image and the custom image through a YUV420 format encoder and decoder to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image;
and the fusion module is used for carrying out image fusion on the standard decoding image and the custom decoding image to generate a high-quality image.
Further, to achieve the above object, the present invention also provides an apparatus which is an image processing apparatus including: a memory, a processor and an image processing program stored on the memory and executable on the processor, the image processing program, when executed by the processor, implementing the steps of the image processing method as described above.
Further, to achieve the above object, the present invention also provides a medium which is a computer readable storage medium having stored thereon an image processing program which, when executed by a processor, implements the steps of the image processing method as described above.
The invention provides an image processing method, device, equipment and medium; the image processing method comprises the following steps: acquiring an original image, splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image, and generating a YUV420 format standard image and a custom image; based on the YUV420 format standard image and the custom image, a YUV420 format codec is used for coding and decoding to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image; and carrying out image fusion on the standard decoded image and the custom decoded image to generate a high-quality image. The method comprises the steps of obtaining an original YUV444 or YUV422 format image, and carrying out image splitting on the original YUV444 or YUV422 format image according to attribute parameters of the original YUV444 or YUV422 format image to generate a YUV420 format standard image and a custom image; transmitting the YUV420 format standard image and the custom image to a coder-decoder, coding and decoding the YUV420 format standard image through the YUV420 format coder-decoder to obtain a standard decoded image corresponding to the YUV420 format standard image, and coding and decoding the custom image through the coder-decoder to obtain a custom decoded image corresponding to the custom image; carrying out image fusion on the standard decoded image and the custom decoded image to generate a high-quality image; therefore, the YUV420 hardware codec is used for realizing the encoding and decoding of YUV444 or YUV422 format images, and high-quality images are generated by fusion, so that the loss of image information is reduced.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of an image processing method according to the present invention;
FIG. 3 is a schematic sub-flowchart of a first embodiment of an image processing method according to the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of an image processing method according to the present invention;
FIG. 5 is a diagram illustrating digital information corresponding to set colors according to a second embodiment of the image processing method of the present invention;
FIG. 6 is a diagram illustrating an image splitting effect according to a second embodiment of the image processing method of the present invention;
FIG. 7 is a flowchart illustrating a third embodiment of an image processing method according to the present invention;
FIG. 8 is a flowchart illustrating a fourth embodiment of an image processing method according to the present invention;
fig. 9 is a functional block diagram of an image processing apparatus according to a first embodiment of the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
The device of the embodiment of the invention can be a mobile terminal or a server device.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an image processing program.
The operating system is a program for managing and controlling the image processing equipment and software resources, and supports the running of a network communication module, a user interface module, an image processing program and other programs or software; the network communication module is used for managing and controlling the network interface 1002; the user interface module is used to manage and control the user interface 1003.
In the image processing apparatus shown in fig. 1, the image processing apparatus calls an image processing program stored in a memory 1005 by a processor 1001 and performs operations in the respective embodiments of the image processing method described below.
Based on the hardware structure, the embodiment of the image processing method is provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of an image processing method according to the present invention, where the image processing method includes:
step S10, acquiring an original YUV444 or YUV422 format image, splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image, and generating a YUV420 format standard image and a custom image;
step S20, based on the YUV420 format standard image and the custom image, encoding and decoding through a YUV420 format codec to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image;
and step S30, fusing the standard decoded image and the custom decoded image to generate a high-quality image.
In the embodiment, an original YUV444 or YUV422 format image is obtained, and the original YUV444 or YUV422 format image is subjected to image splitting according to the attribute parameters of the original YUV444 or YUV422 format image, so that a YUV420 format standard image and a custom image are generated; the YUV420 format standard image and the custom image are coded and decoded through a YUV420 format coder-decoder to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image; carrying out image fusion on the standard decoded image and the custom decoded image to generate a high-quality image; therefore, the YUV420 hardware codec is used for realizing the encoding and decoding of YUV444 or YUV422 format images, and high-quality images are generated by fusion, so that the loss of image information is reduced.
The respective steps will be described in detail below:
step S10, acquiring an original YUV444 or YUV422 format image, splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image, and generating a YUV420 format standard image and a custom image.
In the embodiment, the method uses two standard YCbCr4:2: 0 H.26x hardware coding units to realize one path of YCbCr4:2:2 or 4:4:4 coding and decoding. It should be noted that, the method is independent of the resolution and frame rate of the image, a 1080P @30fps image can be processed by one standard YCbCr4:2: 0 h.26x hardware coding unit, and then the YCbCr4:2: 0 h.26x hardware coding units of two standards can realize YCbCr4:2:2 or 4:4:4 coding of the same resolution and frame rate.
Obtaining original YUV444 or YUV422 format images from different channels, wherein the original YUV444 or YUV422 format images can be obtained from a database in a system, or the original YUV444 or YUV422 format images can be obtained from client sides of different users; wherein, different users comprise business personnel, clients and third party institution personnel. The present embodiment does not limit the channel for obtaining the image in the original YUV444 or YUV422 format.
Wherein YUV is a kind of color space (color space) of a compiled true-color, and the proper terms such as Y' UV, YUV, YCbCr, YPbPr, etc. can be called YUV, and they overlap each other. "Y" represents Luminance (Luma) that is a gray scale value, "U" and "V" represent blue chromaticity and red chromaticity, respectively, and are used to describe image color and saturation for specifying the color of a pixel. YUV is often used in various video processing components.
Carrying out image splitting on the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image to generate a YUV420 format standard image corresponding to the original YUV444 or YUV422 format image and a custom image in a custom format; the attribute parameters of the original YUV444 or YUV422 format image are preferably brightness Y, blue chroma U and red chroma V; commonly used YUV formats are YCbCr4:4:4, YCbCr4:2:2, YCbCr4:2: 0 and YCbCr4: 1:1, wherein YCbCr4:4:4 indicates complete sampling; YCbCr4:2:2 represents 2:1 horizontal sampling, no vertical sampling; YCbCr4:2: 0 denotes 2:1 horizontal sampling, 2:1 vertical sampling; YCbCr4: 1:1 represents 4:1 horizontal samples, no vertical samples.
In the present embodiment, the YUV420 format standard image is preferably in the YUV420 format standard.
The self-defined image is a format image self-defined according to the requirements of subsequent image coding and decoding, so that the loss rate of image information in the image coding and decoding process can be reduced; the size of the image data of the custom image is the same as that of the standard image in the standard YUV420 format, and when the original YUV444 or YUV422 format image is split according to the attribute parameters of the original YUV444 or YUV422 format image, the subsequent reduction is ensured not to lose information.
after splitting: the first part is a standard YUV420 format standard image, namely, a YUV420 format standard image: ();
And step S20, based on the YUV420 format standard image and the custom image, encoding and decoding by a YUV420 format codec to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image.
In this embodiment, a YUV420 format standard image and a custom image are encoded by an encoding unit of a YUV420 format codec, so as to generate a standard image stream corresponding to the YUV420 format standard image and a custom image stream corresponding to the custom image; respectively decoding the standard image stream and the custom image stream by a decoding unit of a YUV420 format codec to generate a standard decoded image corresponding to the standard image and a custom decoded image corresponding to the custom image; the YUV420 format codec is a standard YCbCr4:2: 0 H.26x hardware coding unit, and the standard YCbCr4:2: 0 H.26x hardware coding unit can realize the encoding and decoding of a YUV4:2:2 or YUV4:4:4 format image, thereby realizing a high image quality effect.
The standard decoded image is preferably image data in a standard YUV420 format;
the custom image is preferably the same size image data as the standard image.
And step S30, fusing the standard decoded image and the custom decoded image to generate a high-quality image.
In this embodiment, the standard decoded image and the custom decoded image are subjected to image fusion according to the attribute parameters of the standard decoded image and the attribute parameters of the custom decoded image, and a path of high-quality image in the standard YCbCr4:4:4 format is generated by fusion.
Further, referring to fig. 3, in another embodiment, after step S30, the image processing method further includes:
in step S40, the high-quality image is output to a display device and displayed.
In the embodiment, after the high-quality image in the standard YCbCr4:4:4 format is generated, the high-quality image can be output to a display device for display; wherein, display devices include, but are not limited to, computers, tablets, and televisions; thereby achieving a high picture quality effect without introducing new information loss.
In the embodiment, an original YUV444 or YUV422 format image is obtained, and the original YUV444 or YUV422 format image is subjected to image splitting according to the attribute parameters of the original YUV444 or YUV422 format image, so that a YUV420 format standard image and a custom image are generated; the YUV420 format standard image and the custom image are coded and decoded through a YUV420 format coder-decoder to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image; carrying out image fusion on the standard decoded image and the custom decoded image to generate a high-quality image; therefore, the YUV420 hardware codec is used for realizing the encoding and decoding of YUV444 or YUV422 format images, and high-quality images are generated by fusion, so that the loss of image information is reduced.
Further, based on the first embodiment of the image processing method of the present invention, a second embodiment of the image processing method of the present invention is proposed.
The difference between the second embodiment of the image processing method and the first embodiment of the image processing method is that in this embodiment, step S10 is performed, the original YUV444 or YUV422 format image is split according to the attribute parameters of the original YUV444 or YUV422 format image, and a YUV420 format standard image and a customized image are generated, referring to fig. 4, the step specifically includes:
step S11, extracting a YUV420 format standard image from the raw YUV444 or YUV422 format image according to a first preset component, the luminance, the blue chrominance, and the red chrominance;
step S12, extracting a customized image from the original YUV444 or YUV422 format image according to a second preset component, the blue chromaticity, and the red chromaticity.
In the embodiment, a YUV420 format standard image is extracted from an original YUV444 or YUV422 format image through a first preset component, brightness, blue chrominance and red chrominance; extracting a custom image from the original YUV444 or YUV422 format image through a second preset component, blue chroma and red chroma; thereby reducing the loss of image information for the original YUV444 or YUV422 format image splitting process.
The respective steps will be described in detail below:
step S11, extracting a standard image from the raw YUV444 or YUV422 format image according to the first preset component, the luminance, the blue chrominance, and the red chrominance.
In the present embodiment, the attribute parameters of the raw YUV444 or YUV422 format image include luminance Y, blue chrominance U, and red chrominance V; the original YUV444 or YUV422 format image can be a YUV4:2:2 format image or a YUV4:4:4 format image; extracting a YUV420 format standard image from an original YUV444 or YUV422 format image according to a first preset component, brightness Y, blue chroma U and red chroma V; the first preset component is the ratio of the brightness Y, the blue chroma U and the red chroma V in the original YUV444 or YUV422 format image.
That is, the YUV420 format standard image includes a raw YUV444 or YUV422 format imageOr YUV420 format standard images include raw YUV444 or YUV422 format imagesOr YUV420 format standard images including raw YUV444 or YUV422 format imagesThe amount of data of (a).
Further, in another embodiment, the YUV420 format standard image includes third image data and fourth image data, and the attribute parameter in the fourth image data is converted into second digital information corresponding thereto.
In this embodiment, the YUV420 format standard image is composed of 100% of a Y component of the raw YUV444 or YUV422 format image as a Y Plane part, and a UV component of the raw YUV444 or YUV422 format image ¼ as a UV Plane part, that is, the YUV420 format standard image includes a Y Plane part and a UV Plane part; wherein the third image data is preferably a Y Plane part; the fourth image data is preferably a UV Plane fraction; the third image data is preferably the Y Plane portion of the standard image and the fourth image data is preferably the UV Plane portion of the YUV420 format standard image.
When a YCbCr4: 0:0 encoder is used for encoding and decoding, the attribute parameters in the fourth image data can be converted into second digital information corresponding to the attribute parameters, namely, the UV Plane part of the YUV420 format standard image is set as digital information corresponding to fixed pure color; therefore, the complex calculation in the encoding and decoding process is reduced, and the operation amount of encoding and decoding is reduced.
YUV420 format standard image: ( ) (ii) a Wherein, the Y Plane part in the YUV420 format standard image isThe UV Plane part in the YUV420 format standard image isAnd the UV Plane portion is set to fix the numerical information corresponding to the solid color.
Step S12, extracting a customized image from the original YUV444 or YUV422 format image according to a second preset component, the blue chromaticity, and the red chromaticity.
In the present embodiment, the attribute parameters of the raw YUV444 or YUV422 format image include luminance Y, blue chrominance U, and red chrominance V; the original YUV444 or YUV422 format image can be a YUV4:2:2 format image or a YUV4:4:4 format image; extracting a user-defined image from the original YUV444 or YUV422 format image according to the second preset component, the blue chrominance U and the red chrominance V; the second preset component is the ratio of brightness Y, blue chroma U and red chroma V in the original YUV444 or YUV422 format image; the self-defined image is a format image self-defined according to the requirements of subsequent image coding and decoding, and the loss rate of image information in the image coding and decoding process can be reduced.
That is, the custom image comprises a raw YUV444 or YUV422 format imageOr the custom image comprises a raw YUV444 or YUV422 format imageOr the custom image comprises a raw YUV444 or YUV422 format imageThe amount of data of (a).
Further, referring to fig. 5, fig. 5 is a schematic diagram of digital information corresponding to a set color, and in another embodiment, the custom image includes first image data and second image data; and converting the attribute parameters in the second image data into first digital information corresponding to the attribute parameters.
In this embodiment, the custom image is composed of the UV component of raw YUV444 or YUV422 format image, as Y Plane part, and the UV component of raw YUV444 or YUV422 format image, ¼, as UV Plane part, i.e., the custom image includes Y Plane part and UV Plane part; wherein the first image data is preferably a Y Plane part; the second image data is preferably a UV Plane part.
Setting the attribute parameters in the second image data as digital information corresponding to the fixed pure color, namely setting the UV Plane part in the user-defined image as the digital information corresponding to the fixed pure color; therefore, the complex calculation in the encoding and decoding process is reduced, and a better encoding and decoding effect is obtained.
self-defining the image: (ii) a Wherein the Y Plane part in the custom image isThe UV Plane part in the custom image isAnd the UV Plane portion is set to the number 0 corresponding to black.
In the embodiment, a YUV420 format standard image is extracted from an original YUV444 or YUV422 format image through a first preset component, brightness, blue chrominance and red chrominance; extracting a custom image from the original YUV444 or YUV422 format image through a second preset component, blue chroma and red chroma; thereby reducing the loss of image information for the original YUV444 or YUV422 format image splitting process.
Further, in another embodiment, the sum of the first preset component and the second preset component is equal to the component of the attribute parameter in the original image; therefore, the loss rate of image information in the subsequent coding and decoding process is reduced, and a better coding and decoding effect is realized.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating the effect of image splitting when the sum of the first preset component and the second preset component is equal to the component of the attribute parameter in the original YUV444 or YUV422 format image.
When the sum of the first preset component and the second preset component is equal to the component of the attribute parameter in the original YUV444 or YUV422 format image, that is, the ratio of the luminance Y, the blue chrominance U and the red chrominance V in the first preset component and the second preset component is equal to the ratio of the luminance Y, the blue chrominance U and the red chrominance V in the original YUV444 or YUV422 format image, the first preset component is preferably the original YUV444 or YUV422 format imageBrightness Y, raw YUV444 or YUV422 format imageAnd raw YUV444 or YUV422 format imagesIs saturated withDegree V, that is YUV420 format standard image includes original YUV444 or YUV422 format imageThe amount of data of (a);
the second preset component is preferably a raw YUV444 or YUV422 format imageAnd raw YUV444 or YUV422 format imagesI.e., the custom image comprises a raw YUV444 or YUV422 format imageThe amount of data of (a); the image data size of the custom image is the same as that of the YUV420 format standard image.
by selecting images in original YUV444 or YUV422 formatThe UV is used as a Y Plane part, and original YUV444 or YUV422 format images are selected for the restUV forms a custom image as part of the UV Plane.
New data are formed by preferably interlaced UV, so that the influence of a YUV420 format codec on the coding processing difference of a Y Plane part and a UV Plane part in a custom image can be effectively reduced;
in the process of splitting the original YUV444 or YUV422 format image, the same rule is preferably adopted for the decomposition of the V component and the U component.
In this embodiment, the sum of the first preset component and the second preset component is equal to the component of the attribute parameter in the raw YUV444 or YUV422 format image; therefore, the loss rate of image information in the subsequent coding and decoding process is reduced, and a better coding and decoding effect is realized.
Further, in another embodiment, the sum of the first preset component and the second preset component is not equal to the component of the attribute parameter in the raw YUV444 or YUV422 format image. The sum of the first preset component and the second preset component is not equal to the component of the attribute parameter in the original YUV444 or YUV422 format image; therefore, the loss rate of image information in the subsequent coding and decoding process is reduced, and a better coding and decoding effect is realized.
In the present embodiment, when the sum of the first preset component and the second preset component is not equal to the component of the attribute parameter in the original YUV444 or YUV422 format image; wherein the first preset component is preferably a YUV444 or YUV422 format imageY, the average value of the blue chrominance U of the original image and the average value of the red chrominance V of the original image, i.e. the YUV420 format standard image comprises the raw YUV444 or YUV422 format imageThe amount of data of (a).
The second preset component is preferably a raw YUV444 or YUV422 format imageAnd raw YUV444 or YUV422 format imagesI.e., the custom image comprises a raw YUV444 or YUV422 format imageThe amount of data of (a); the image data size of the custom image is the same as that of the YUV420 format standard image.
Wherein the content of the first and second substances,,,,,(ii) a It should be noted that in the subsequent image fusion reduction, the image fusion reduction is utilizedAnd restoring is carried out, so that the loss of image information is effectively reduced.
By selecting images in original YUV444 or YUV422 formatThe UV is used as a Y Plane part, and original YUV444 or YUV422 format images are selected for the restUV forms a custom image as part of the UV Plane.
New data are formed by preferably interlaced UV, so that the influence of a YUV420 format codec on the coding processing difference of a Y Plane part and a UV Plane part in a custom image can be effectively reduced;
in the process of splitting the original YUV444 or YUV422 format image, the same rule is preferably adopted for the decomposition of the V component and the U component.
In the present embodiment, the sum of the first preset component and the second preset component is not equal to the component of the attribute parameter in the original YUV444 or YUV422 format image; therefore, the loss rate of image information in the subsequent coding and decoding process is reduced, and a better coding and decoding effect is realized.
Further, based on the first and second embodiments of the image processing method of the present invention, a third embodiment of the image processing method of the present invention is provided.
The third embodiment of the image processing method is different from the first and second embodiments of the image processing method in that, in this embodiment, in step S20, based on the YUV 420-format standard image and the custom image, the YUV 420-format codec is used for encoding and decoding to generate a standard decoded image corresponding to the YUV 420-format standard image and a refinement of the custom decoded image corresponding to the custom image, with reference to fig. 7, the step specifically includes:
step S21, encoding the YUV420 format standard image by the encoding unit of the first codec, and generating a standard image stream; decoding the standard image stream through a decoding unit of the first coder-decoder to generate a standard decoding image;
step S22, the user-defined image is segmented to generate a user-defined segmented image; coding the user-defined segmentation image through a coding unit of the second coder-decoder to generate a user-defined image stream; and decoding the self-defined image stream through a decoding unit of the second codec to generate a self-defined decoded image.
In the embodiment, a YUV420 format standard image is encoded and decoded by a first codec to generate a standard decoded image; segmenting the user-defined image to generate a corresponding user-defined segmented image; coding and decoding the user-defined segmentation image through a second coder-decoder to generate a user-defined decoding image; thereby reducing the loss rate of image information of the standard decoded image and the custom decoded image.
The respective steps will be described in detail below:
step S21, encoding the YUV420 format standard image by the encoding unit of the first codec, and generating a standard image stream; and decoding the standard image stream through a decoding unit of the first codec to generate a standard decoded image.
In this embodiment, the YUV420 format codec is preferably a YUV4:2: 0 h.26x hardware coding unit of two standards, that is, the YUV420 format codec includes a first codec and a second codec; thereby realizing the encoding of one-way YUV4:4:4 format image or YUV4:2:2 format image through two YUV420 format codecs (the decoding process is the same principle). Wherein the first codec includes an encoding unit and a decoding unit.
Encoding the YUV 420-format standard image by an encoding unit of a first codec to generate a standard image stream, and transmitting the standard image stream to a decoding unit of the first codec; decoding the standard image stream through a decoding unit of a first coder-decoder to generate a standard decoding image; thereby reducing the loss of image information in the encoding and decoding process.
Step S22, the user-defined image is segmented to generate a user-defined segmented image; coding the user-defined segmentation image through a coding unit of the second coder-decoder to generate a user-defined image stream; and decoding the self-defined image stream through a decoding unit of the second codec to generate a self-defined decoded image.
In this embodiment, the U component and the V component in the custom image have no correlation, and in order to improve the coding effect of the custom image, the custom image is segmented by two segment segmentation methods to generate a corresponding custom segmented image; the slicing division is preferably a multi-Slice slicing division method.
The multi-Slice partitioning manner may be a manner of a fixed number of MBs (macroblocks), or may be a manner of partitioning an MB by taking the number of bytes accumulated after encoding the MB as a basis 1. Embodied as one continuous area block on the image, the length of the area block (in MB) may vary.
The user-defined image comprises a Y Plane part and a UV Plane part; the original image is processedUV as Y Plane moiety, binding remainsThe UV is used as a UV Plane part, and the image data size of the custom image is the same as that of a YUV420 format standard image.
Self-defining the image: ( ) Wherein, in the step (A),is the Y Plane portion of the custom image;the UV Plane portion of the custom image.
the second coder-decoder comprises a coding unit and a decoding unit, and the coding unit of the second coder-decoder codes the user-defined segmentation image to generate a corresponding user-defined image stream; decoding the self-defined image stream through a decoding unit of a second coder-decoder to generate a corresponding self-defined decoded image; therefore, the loss of image information in the encoding and decoding processes is reduced, and the definition of detail textures such as picture color saturation, characters, lines and the like of the decoded image is ensured.
In the embodiment, a YUV420 format standard image is encoded and decoded by a first codec to generate a standard decoded image; segmenting the user-defined image to generate a corresponding user-defined segmented image; coding and decoding the user-defined segmentation image through a second coder-decoder to generate a user-defined decoding image; thereby reducing the loss rate of image information of the standard decoded image and the custom decoded image.
Further, based on the first, second, and third embodiments of the image processing method of the present invention, a fourth embodiment of the image processing method of the present invention is provided.
The fourth embodiment of the image processing method differs from the first, second, and third embodiments of the image processing method in that in this embodiment, in step S30, the standard decoded image and the custom decoded image are subjected to image fusion to generate a high-quality image, and the high-quality image is displayed in a refined manner, and with reference to fig. 8, the step specifically includes:
and step S31, fusing the standard decoded image and the custom decoded image according to a preset inverse transform algorithm, the attribute parameters of the standard decoded image and the attribute parameters of the custom image to generate a corresponding high-quality image.
In the embodiment, the standard decoded image and the custom decoded image are subjected to image fusion according to a preset inversion algorithm, the attribute parameters of the standard decoded image and the attribute parameters of the custom image to generate a corresponding high-quality image; thereby realizing the high image quality effect of image coding and decoding.
The respective steps will be described in detail below:
and step S31, fusing the standard decoded image and the custom decoded image according to a preset inverse transform algorithm, the attribute parameters of the standard decoded image and the attribute parameters of the custom image to generate a corresponding high-quality image.
In the embodiment, the standard decoded image and the custom decoded image are subjected to image fusion according to a preset inversion algorithm, the brightness Y, the blue chroma U and the red chroma V of the standard decoded image and the brightness Y, the blue chroma U and the red chroma V of the custom image, and a path of standard YCbCr4:4:4 or standard YCbCr4:2:2 high-quality image is generated by fusion; the attribute parameters of the standard decoded image are preferably luminance Y, blue chrominance U and red chrominance V; the attribute parameters of the custom image are preferably luminance Y, blue chrominance U, and red chrominance V.
The preset inversion algorithm is an inverse algorithm of image splitting; in the image splitting process, splitting is carried out according to components of brightness Y, blue chroma U and red chroma V of an original image, and a YUV420 format standard image and a custom image are generated. The preset inversion algorithm is to perform image fusion on the standard decoded image and the custom decoded image based on components of brightness Y, blue chroma U and red chroma V, and to generate a path of high-quality image in a standard YCbCr4:4:4 format; the components of the luminance Y, the blue chrominance U and the red chrominance V in the high-quality image are approximate to the components of the luminance Y, the blue chrominance U and the red chrominance V in the original image; thereby realizing the high image quality effect of image coding and decoding.
After a path of standard YCbCr4:4:4 format high-quality image is generated, the high-quality image can be output to a display device for displaying, wherein the display device comprises but is not limited to a computer, a panel and a television; therefore, the standard YCbCr4:2: 0 H.26x hardware codec is utilized to realize the coding and decoding functions of the standard YCbCr4:4:4 or the standard YCbCr4:2:2, no new information loss is introduced, and the high-image quality effect is realized.
In the embodiment, the standard decoded image and the custom decoded image are subjected to image fusion according to a preset inversion algorithm, the attribute parameters of the standard decoded image and the attribute parameters of the custom image to generate a corresponding high-quality image; thereby realizing the high image quality effect of image coding and decoding.
The invention also provides an image processing device. Referring to fig. 9, the image processing apparatus of the present invention includes:
the splitting module 10 is configured to obtain an original YUV444 or YUV422 format image, split the original YUV444 or YUV422 format image according to attribute parameters of the original YUV444 or YUV422 format image, and generate a YUV420 format standard image and a custom image;
the encoding and decoding module 20 is configured to perform encoding and decoding through a YUV420 format encoder and decoder based on the YUV420 format standard image and the custom image to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image;
and the fusion module 30 is configured to perform image fusion on the standard decoded image and the custom decoded image to generate a high-quality image.
Furthermore, the present invention also provides a medium, which is a computer-readable storage medium, on which an image processing program is stored, the image processing program, when executed by a processor, implementing the steps of the image processing method as described above.
The method implemented when the image processing program running on the processor is executed may refer to each embodiment of the image processing method of the present invention, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. An image processing method, characterized by comprising the steps of:
acquiring an original YUV444 or YUV422 format image, splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image, and generating a YUV420 format standard image and a custom image;
based on the YUV420 format standard image and the custom image, a YUV420 format codec is used for coding and decoding to obtain a standard decoded image corresponding to the YUV420 format standard image and a custom decoded image corresponding to the custom image;
and carrying out image fusion on the standard decoded image and the custom decoded image to generate a high-quality image.
2. The image processing method of claim 1, wherein the attribute parameters of the raw YUV444 or YUV422 format image comprise luminance, chrominance of blue and chrominance of red, and the step of splitting the raw YUV444 or YUV422 format image according to the attribute parameters of the raw YUV444 or YUV422 format image to obtain the YUV420 format standard image and the custom image comprises:
extracting a YUV420 format standard image from the original YUV444 or YUV422 format image according to a first preset component, the brightness, the blue chrominance and the red chrominance;
and extracting a self-defined image from the original YUV444 or YUV422 format image according to a second preset component, the blue chroma and the red chroma.
3. The image processing method of claim 2, wherein the custom image comprises first image data and second image data;
and converting the attribute parameters in the second image data into first digital information corresponding to the attribute parameters.
4. The image processing method according to claim 2, wherein the YUV 420-format standard image includes third image data and fourth image data;
and converting the attribute parameters in the fourth image data into second digital information corresponding to the attribute parameters.
5. The image processing method of claim 1, wherein the YUV 420-format codec comprises a first codec and a second codec, and the step of obtaining the standard decoded image corresponding to the YUV 420-format standard image and the custom decoded image corresponding to the custom image by encoding and decoding through the YUV 420-format codec based on the YUV 420-format standard image and the custom image comprises:
encoding the YUV 420-format standard image through an encoding unit of the first codec to generate a standard image stream; decoding the standard image stream through a decoding unit of the first coder-decoder to generate a standard decoding image;
segmenting the user-defined image to generate a user-defined segmented image; coding the user-defined segmentation image through a coding unit of the second coder-decoder to generate a user-defined image stream; and decoding the self-defined image stream through a decoding unit of the second codec to generate a self-defined decoded image.
6. The image processing method according to claim 1, wherein the step of performing image fusion on the standard decoded image and the custom decoded image to generate a high-quality image comprises:
and carrying out image fusion on the standard decoded image and the custom decoded image according to a preset inverse conversion algorithm, the attribute parameters of the standard decoded image and the attribute parameters of the custom decoded image to generate a corresponding high-quality image.
7. The image processing method according to claim 1, wherein after the step of performing image fusion on the standard decoded image and the custom decoded image to generate a high-quality image, the image processing method further comprises:
and outputting the high-quality image to a display device for displaying.
8. An image processing apparatus characterized by comprising:
the splitting module is used for acquiring an original YUV444 or YUV422 format image, splitting the original YUV444 or YUV422 format image according to the attribute parameters of the original YUV444 or YUV422 format image, and generating a YUV420 format standard image and a custom image;
the encoding and decoding module is used for encoding and decoding the standard image in the YUV420 format and the custom image through a YUV420 format encoder-decoder to obtain a standard decoded image corresponding to the standard image and a custom decoded image corresponding to the custom image;
and the fusion module is used for carrying out image fusion on the standard decoding image and the custom decoding image to generate a high-quality image.
9. An apparatus which is an image processing apparatus characterized by comprising: memory, a processor and an image processing program stored on the memory and executable on the processor, the image processing program, when executed by the processor, implementing the steps of the image processing method according to any one of claims 1 to 7.
10. A medium which is a computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an image processing program which, when executed by a processor, implements the steps of the image processing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210764273.8A CN114827620A (en) | 2022-07-01 | 2022-07-01 | Image processing method, apparatus, device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210764273.8A CN114827620A (en) | 2022-07-01 | 2022-07-01 | Image processing method, apparatus, device and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114827620A true CN114827620A (en) | 2022-07-29 |
Family
ID=82522240
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210764273.8A Pending CN114827620A (en) | 2022-07-01 | 2022-07-01 | Image processing method, apparatus, device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114827620A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117201789A (en) * | 2023-11-07 | 2023-12-08 | 南京美乐威电子科技有限公司 | Video stream generating and decoding method, computer storage medium, and codec |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060268001A1 (en) * | 2005-05-31 | 2006-11-30 | Canon Kabushiki Kaisha | Image processing apparatus and image processing method |
CN106375759A (en) * | 2016-08-31 | 2017-02-01 | 深圳超多维科技有限公司 | Video image data coding method and device, and video image data decoding method and device |
JP2018160909A (en) * | 2018-05-23 | 2018-10-11 | 株式会社ニコン | Encoding device, decoding device, encoding method, and decoding method |
CN109951715A (en) * | 2019-02-25 | 2019-06-28 | 北京新兴东方航空装备股份有限公司 | It is a kind of based on YUV444 image coding/decoding method H.264 |
CN111935483A (en) * | 2020-09-29 | 2020-11-13 | 北京泽塔云科技股份有限公司 | Video image lossless coding and decoding method and system |
CN113014920A (en) * | 2021-02-01 | 2021-06-22 | 西安万像电子科技有限公司 | Image coding and decoding method and device |
CN113973208A (en) * | 2021-10-11 | 2022-01-25 | 西安万像电子科技有限公司 | Data encoding and decoding method and device |
CN114125448A (en) * | 2020-08-31 | 2022-03-01 | 华为技术有限公司 | Video encoding method, decoding method and related devices |
-
2022
- 2022-07-01 CN CN202210764273.8A patent/CN114827620A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060268001A1 (en) * | 2005-05-31 | 2006-11-30 | Canon Kabushiki Kaisha | Image processing apparatus and image processing method |
CN106375759A (en) * | 2016-08-31 | 2017-02-01 | 深圳超多维科技有限公司 | Video image data coding method and device, and video image data decoding method and device |
JP2018160909A (en) * | 2018-05-23 | 2018-10-11 | 株式会社ニコン | Encoding device, decoding device, encoding method, and decoding method |
CN109951715A (en) * | 2019-02-25 | 2019-06-28 | 北京新兴东方航空装备股份有限公司 | It is a kind of based on YUV444 image coding/decoding method H.264 |
CN114125448A (en) * | 2020-08-31 | 2022-03-01 | 华为技术有限公司 | Video encoding method, decoding method and related devices |
CN111935483A (en) * | 2020-09-29 | 2020-11-13 | 北京泽塔云科技股份有限公司 | Video image lossless coding and decoding method and system |
CN113014920A (en) * | 2021-02-01 | 2021-06-22 | 西安万像电子科技有限公司 | Image coding and decoding method and device |
CN113973208A (en) * | 2021-10-11 | 2022-01-25 | 西安万像电子科技有限公司 | Data encoding and decoding method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117201789A (en) * | 2023-11-07 | 2023-12-08 | 南京美乐威电子科技有限公司 | Video stream generating and decoding method, computer storage medium, and codec |
CN117201789B (en) * | 2023-11-07 | 2024-01-26 | 南京美乐威电子科技有限公司 | Video code stream generating method, computer storage medium and encoder |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10887612B2 (en) | Hybrid backward-compatible signal encoding and decoding | |
CN108833938B (en) | Method and apparatus for selecting video covers | |
WO2019210822A1 (en) | Video encoding and decoding method, device, and system, and storage medium | |
US8139081B1 (en) | Method for conversion between YUV 4:4:4 and YUV 4:2:0 | |
RU2758035C2 (en) | Method and device for reconstructing image data by decoded image data | |
CA2990988A1 (en) | Methods and devices for encoding and decoding a hdr color picture | |
CN110830804B (en) | Method and apparatus for signaling picture/video formats | |
WO2020135357A1 (en) | Data compression method and apparatus, and data encoding/decoding method and apparatus | |
US11115691B2 (en) | Custom data indicating nominal range of samples of media content | |
US20180124289A1 (en) | Chroma-Based Video Converter | |
JP6401777B2 (en) | Send and receive composite images | |
WO2018151970A1 (en) | Content mastering with an energy-preserving bloom operator during playback of high dynamic range video | |
US20220318965A1 (en) | Method and device for obtaining a second image from a first image when the dynamic range of the luminance of the first image is greater than the dynamic range of the luminance of the second image | |
US9161030B1 (en) | Graphics overlay system for multiple displays using compressed video | |
US8630500B2 (en) | Method for the encoding by segmentation of a picture | |
CN114827620A (en) | Image processing method, apparatus, device and medium | |
US8483389B1 (en) | Graphics overlay system for multiple displays using compressed video | |
CN110719484B (en) | Image processing method | |
US9053752B1 (en) | Architecture for multiple graphics planes | |
US11582464B2 (en) | Using morphological operations to process frame masks in video content | |
GB2512657A (en) | Transmitting and receiving a composite image | |
US11601665B2 (en) | Embedding frame masks in a video stream | |
CN116489132A (en) | Virtual desktop data transmission method, server, client and storage medium | |
CN112399126A (en) | Video processing method and device, terminal equipment and storage medium | |
CN113450293A (en) | Video information processing method, device and system, electronic equipment 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 |
Application publication date: 20220729 |
|
RJ01 | Rejection of invention patent application after publication |