Image processing method

文档序号:1559104 发布日期:2020-01-21 浏览:12次 中文

阅读说明:本技术 图像处理方法 (Image processing method ) 是由 方华 于 2019-09-17 设计创作,主要内容包括:本发明公开了一种图像处理方法,所述方法包括如下步骤:S1、将原始YCbCr4:4:4格式图像输入编码解码器;S2、将所述原始YCbCr4:4:4格式图像分解成YCbCr4:2:0格式图像和CbCr参数图像;S3、将所述YCbCr4:2:0格式图像和所述CbCr参数图像经H.265编码及解码;S4、将H.265解码后的图像以最终YCbCr4:4:4格式图像输出至显示设备。本方法使用廉价的YCbCr 4:2:0格式图像的编码解码器,合成具备YCbCr 4:4:4格式图像编码解码器色度表现能力的图像,使图像显示清晰度高、显示效果、成本低廉、带宽较低,且易于找到硬件实现平台。(The invention discloses an image processing method, which comprises the following steps: s1, inputting the original YCbCr4:4:4 format image into the codec; s2, decomposing the original YCbCr4:4:4 format image into a YCbCr4:2:0 format image and a CbCr parameter image; s3, encoding and decoding the YCbCr4:2:0 format image and the CbCr parameter image by H.265; and S4, outputting the H.265 decoded image to a display device in a final YCbCr4:4:4 format image. The method uses a cheap YCbCr4:2:0 format image codec to synthesize the image with the chrominance expression capability of the YCbCr4:4:4 format image codec, so that the image has high display definition, a display effect, low cost and lower bandwidth, and a hardware implementation platform is easy to find.)

1. An image processing method, characterized in that it comprises the steps of:

s1 inputting the original YCbCr4:4:4 format image into the codec;

s2 decomposing the original YCbCr4:4:4 format image into a YCbCr4:2:0 format image and a CbCr parameter image;

s3 encoding and decoding the YCbCr4:2:0 format image and the CbCr parameter image by H.265;

s4 outputs the h.265 decoded image to a display device as a final YCbCr4:4:4 format image.

2. The image processing method as claimed in claim 1, wherein in the YCbCr4:2:0 format image, the Cb value is an average of all Cb values in the original YCbCr4:4:4 format image, and the Cr value is an average of all Cr values in the original YCbCr4:4:4 format image at step S2.

3. The image processing method as claimed in claim 1, wherein in the CbCr parameter image, the Cb or Cr value is determined according to the color of the original YCbCr4:4:4 format image at step S2.

4. The method of claim 3, wherein when the original YCbCr4:4:4 format image is biased towards red, the CbCr parameter image takes the Cr value of the original YCbCr4:4:4 format image and sets constants A and B, where A is greater than B, the CbCr parameter image is labeled CrAB.

5. The method of claim 3, wherein when the original YCbCr4:4:4 format image is color biased towards blue, then the CbCr parameter image takes the Cb value of the original YCbCr4:4:4 format image and sets constants A and B, where A is greater than B, the CbCr parameter image is labeled CbBA.

6. The method of claim 4, wherein when the YCbCr4:2:0 format image is biased towards red and the CbCr parametric image is labeled CrAB, in the final YCbCr4:4:4 format image, Cb values are an average of all Cb values in the original YCbCr4:4:4 format image and Cr values are respective Cr values in the original YCbCr4:4:4 format image.

7. The method of claim 5, wherein when the YCbCr4:2:0 format image is biased toward blue and the CbCr parametric image is labeled CbBA, in the final YCbCr4:4:4 format image, Cb values are respective Cb values in the original YCbCr4:4:4 format image and Cr values are an average of all Cb values in the original YCbCr4:4:4 format image.

Technical Field

The present invention relates to image processing. In particular to an image processing method.

Background

YCbCr is a color space that is commonly used in video processing for continuous motion pictures or in digital photography systems. YCbCr where Y refers to the luminance component, Cb refers to the blue chrominance component, and Cr refers to the red chrominance component. The human eye is more sensitive to the Y component of the video and therefore the human eye will not perceive a change in image quality after the chrominance component is reduced by sub-sampling the chrominance component.

The main sub-sampling formats are YCbCr4:2:0, YCbCr4:2: 2, and YCbCr4:4: 4. 4:2:0 means 4 luminance components per 4 pixels, 2 chrominance components (YYYYCbCr), sampling only odd scan lines, are the most common formats for portable video devices (MPEG-4) and video conferencing (h.263); 4:2:2 denotes 4 luminance components per 4 pixels, 4 chrominance components (yyycbcrcbcr), the most common format for DVD, digital television, HDTV and other consumer video devices; 4:4:4 full pixel lattice (yyycbcrcbcrcbcrcbcr) for high quality video applications, studios and professional video production.

In a security system, images in the YCbCr4:2:0 format are often used, because the huge amount of the security system is used, the codecs of the images in the YCbCr4:2:0 format are very cheap and easy to obtain.

In implementation and use, the YCbCr4:2:0 format image codec restores colors, especially extracts relatively severe red (Cr) and blue (Cb) pure color pictures, so that the YCbCr4:4:4 format image has higher display definition than the YCbCr4:2:0 format image, and the YCbCr4:4:4 format image has good display effect, but equipment for encoding and decoding the YCbCr4:4:4 image is high in price and increases use cost.

Therefore, a solution with good image display effect and low use cost is needed.

Disclosure of Invention

Aiming at the problems in the prior art, the invention provides an image processing method, which synthesizes an image with the chromaticity representation capability of a YCbCr4:4:4 format image codec by using a cheap YCbCr4:2:0 format image codec, so that the image has high display definition, good display effect, low cost and lower bandwidth, and a hardware implementation platform is easy to find.

In order to achieve the above object, an embodiment of the present invention provides an image processing method, which mainly includes the following steps:

s1 inputting the original YCbCr4:4:4 format image into the codec;

s2 decomposing the original YCbCr4:4:4 format image into a YCbCr4:2:0 format image and a CbCr parameter image;

s3 encoding and decoding the YCbCr4:2:0 format image and the CbCr parameter image by H.265;

s4 outputs the h.265 decoded image to a display device as a final YCbCr4:4:4 format image.

In the step of S2, in the YCbCr4:2:0 format image, Cb values are the average of all Cb values in the original YCbCr4:4:4 format image, and Cr values are the average of all Cr values in the original YCbCr4:4:4 format image.

In the CbCr parameter image, the value of Cb or Cr is determined according to the color of the original YCbCr4:4:4 format image at step S2.

Further, when the color of the original YCbCr4:4:4 format image is biased to red, the CbCr parameter image takes the Cr value of the original YCbCr4:4:4 format image, and constants A and B are set, wherein A is larger than B, and the CbCr parameter image is marked as CrAB.

Further, when the color of the original YCbCr4:4:4 format image is biased to blue, the CbCr parameter image takes the Cb value of the original YCbCr4:4:4 format image, and constants A and B are set, wherein A is larger than B, and the CbCr parameter image is marked as CbBA.

When the YCbCr4:2:0 format image is biased to red and the CbCr parametric image is labeled CrAB, in the final YCbCr4:4:4 format image, the Cb value is the average of all Cb values in the original YCbCr4:4:4 format image and the Cr value is the respective Cr value in the original YCbCr4:4:4 format image.

When the YCbCr4:2:0 format image is biased to blue and the CbCr parametric image is labeled CbBA, in the final YCbCr4:4:4 format image, the Cb values are the respective Cb values in the original YCbCr4:4:4 format image and the Cr value is the average of all Cb values in the original YCbCr4:4:4 format image.

The beneficial technical effects of the invention are as follows: the method uses a cheap YCbCr4:2:0 format image codec to synthesize the image with the chrominance expression capability of the YCbCr4:4:4 format image codec, so that the image has high display definition, good display effect, low cost and lower bandwidth, and a hardware implementation platform is easy to find.

Drawings

FIG. 1 is a flow chart of an image processing method according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.

Fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention, where the method mainly includes the following steps:

s1, inputting the original YCbCr4:4:4 format image into the codec;

s2, decomposing the original YCbCr4:4:4 format image into a YCbCr4:2:0 format image and a CbCr parameter image;

s3, encoding and decoding the YCbCr4:2:0 format image and the CbCr parameter image by H.265;

and S4, outputting the H.265 decoded image to a display device in a final YCbCr4:4:4 format image.

In this embodiment, the original YCbCr4:4:4 format image is Y1Cb1Cr1、Y2Cb2Cr2、Y3Cb3Cr3、Y4Cb4Cr4And (4) showing.

In the step S2, in the YCbCr4:2:0 format image, the Cb value is the average value of all Cb values in the original YCbCr4:4:4 format image, and the Cr value is the average value of all Cr values in the original YCbCr4:4:4 format image, that is, Y for the YCbCr4:2:0 format image1C(b1+b2+b3+b4)/4 C(r1+r2+r3+r4)/4、Y2C(b1+b2+b3+b4)/4 C(r1+r2+r3+r4)/4、Y2C(b1+b2+b3+b4)/4 C(r1+r2+r3+r4)/4、Y4C(b1+b2+b3+b4)/4 C(r1+r2+r3+r4) And/4.

In the CbCr parameter image, the value of Cb or Cr is determined according to the color of the original YCbCr4:4:4 format image at step S2.

When the color of the original YCbCr4:4:4 format image is biased to red, the CbCr parameter image takes the Cr value of the original YCbCr4:4:4 format image, constants A and B are set, wherein A is larger than B, the CbCr parameter image is marked as CrAB, namely the CbCr parameter image is marked by Cr1AB、Cr2AB、Cr3AB、Cr4And AB indicates.

When the color of the original YCbCr4:4:4 format image is biased to blue, the CbCr parameter image takes the Cb value of the original YCbCr4:4:4 format image, constants A and B are set, wherein A is larger than B, the CbCr parameter image is marked as CbBA, namely the CbCr parameter image is marked as CbBA by Cb1BA、Cb2BA、Cb3BA、Cb4And BA.

When the YCbCr4:2:0 format image is biased to red and the CbCr parameter image is marked as CrAB, in the final YCbCr4:4:4 format image, Cb value is the average value of all Cb values in the original YCbCr4:4:4 format image, and Cr value is the respective Cr value in the original YCbCr4:4:4 format image, namely the final YCbCr4:4:4 format image is marked with Y1C(b1+b2+b3+b4)/4 Cr1、Y2C(b1+b2+b3+b4)/4 Cr2、Y2C(b1+b2+b3+b4)/4 Cr3、Y4C(b1+b2+b3+b4)/4Cr4And (4) showing.

When the YCbCr4:2:0 format image is biased to blue and the CbCr parametric image is labeled CbBA, in the final YCbCr4:4:4 format image, Cb values are the respective Cb values in the original YCbCr4:4:4 format image, and Cr values are the average of all Cb values in the original YCbCr4:4:4 format imageI.e. Y for final YCbCr4:4:4 format images1Cb1C(r1+r2+r3+r4)/4、Y2Cb2C(r1+r2+r3+r4)/4、Y2Cb3C(r1+r2+r3+r4)/4、Y4Cb4C(r1+r2+r3+r4) And/4.

The method uses a cheap YCbCr4:2:0 format image codec to synthesize the image with the chrominance expression capability of the YCbCr4:4:4 format image codec, so that the image has high display definition, good display effect, low cost and lower bandwidth, and a hardware implementation platform is easy to find.

While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频解码方法、装置及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类