[go: up one dir, main page]

CN103379346A - Chrominance information processing method, device and system of images in YUV format - Google Patents

Chrominance information processing method, device and system of images in YUV format Download PDF

Info

Publication number
CN103379346A
CN103379346A CN 201210119524 CN201210119524A CN103379346A CN 103379346 A CN103379346 A CN 103379346A CN 201210119524 CN201210119524 CN 201210119524 CN 201210119524 A CN201210119524 A CN 201210119524A CN 103379346 A CN103379346 A CN 103379346A
Authority
CN
China
Prior art keywords
chroma
frame
image
color
component
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
CN 201210119524
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.)
Shenzhen Temobi Science and Technology Co Ltd
Academy of Broadcasting Science Research Institute
Original Assignee
Shenzhen Temobi Science and Technology Co Ltd
Academy of Broadcasting Science Research Institute
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 Shenzhen Temobi Science and Technology Co Ltd, Academy of Broadcasting Science Research Institute filed Critical Shenzhen Temobi Science and Technology Co Ltd
Priority to CN 201210119524 priority Critical patent/CN103379346A/en
Publication of CN103379346A publication Critical patent/CN103379346A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

本发明提供一种YUV格式图像的色度信息处理方法,所述的方法包括:获取第一当前图像帧的色度饱和度信息κ;根据所述的色度饱和度信息κ获取调节参数;通过预先获取的所需增强色彩分布的经验区间[θ1,θ2],获取权重函数;通过所述的色度饱和度信息κ、调节参数、权重函数及预先构建的色度变换函数进行色度变换。本发明还提供一种YUV格式图像的色度信息处理装置,包括:第一获取单元、第二获取单元、第三获取单元、第四获取单元、色度变换单元。因为本发明是基于此模型上的色度处理方法,无论是去色彩噪声还是偏色判断,色彩增强都是基于此模型,相比较于基于其他色彩模型的方法,减少了模型转换上的计算量。

Figure 201210119524

The present invention provides a method for processing chroma information of a YUV format image, the method comprising: obtaining chroma-saturation information κ of the first current image frame; obtaining adjustment parameters according to the chroma-saturation information κ; by Pre-acquired the empirical interval [θ 1 , θ 2 ] of the required enhanced color distribution, and obtain the weight function; perform chroma saturation by using the chroma-saturation information κ, adjustment parameters, weight function and the pre-built chroma transformation function. transform. The present invention also provides a device for processing chroma information of images in YUV format, including: a first acquisition unit, a second acquisition unit, a third acquisition unit, a fourth acquisition unit, and a chroma conversion unit. Because the present invention is based on the chromaticity processing method on this model, whether it is to remove color noise or judge color cast, color enhancement is based on this model, compared with methods based on other color models, the amount of calculation on model conversion is reduced .

Figure 201210119524

Description

一种YUV格式图像的色度信息处理方法、装置及系统Chromaticity information processing method, device and system of a YUV format image

技术领域 technical field

本发明涉及视频编解码领域,尤其涉及一种YUV格式图像的色度信息处理方法、装置及系统。The present invention relates to the field of video encoding and decoding, in particular to a method, device and system for processing chrominance information of images in YUV format.

背景技术 Background technique

目前数字影像以像素为单位,而每一像素的色彩为由三原色(R、G、B)所构成,且每一像素色彩皆具有亮度以及色度,数字影像品质的好坏则是主要取决于其所呈现画面的亮度、对比度以及饱和度。At present, the unit of digital image is pixel, and the color of each pixel is composed of three primary colors (R, G, B), and each pixel color has brightness and chromaticity. The quality of digital image mainly depends on The brightness, contrast, and saturation of the picture it presents.

至于现有对数字影像的处理,是先将数字影像第一像素的R、G、B值转换为亮度(Y)信号以及色度(U,V)信号,再直接调整亮度信号、色度信号,以提高数字影像的亮度、对比度及色度。通常若直接对数字影像每一像素所代表的亮度信号,色度信号作调整时,会出现一些问题。传统上亮度(Y)信号以及色度(U,V)或(Cb,Cr)都会分开处理,不会一起考虑。As for the existing digital image processing, the R, G, and B values of the first pixel of the digital image are first converted into luminance (Y) signals and chrominance (U, V) signals, and then the luminance and chrominance signals are directly adjusted. , to improve the brightness, contrast and chroma of digital images. Usually, if the luminance signal and chrominance signal represented by each pixel of the digital image are directly adjusted, some problems will occur. Traditionally the luminance (Y) signal and chrominance (U, V) or (Cb, Cr) are handled separately and not considered together.

从人的视觉系统看,色彩可用亮度、色调和饱和度来描述,通常把色调和饱和度通称为色度,用来表示颜色的类别与深浅程度。虽然人的视觉对亮度的敏感程度远强于对颜色浓淡的敏感程度,但有时视频编码器所处理的图像序列携带的色度信息不足,如摄像头获得的图像,经常由于室内光源的不同而造成色彩噪声、偏色等问题,从而需要利用色彩处理方法,增强图像的色彩。目前的色彩处理手段多为基于RGB、HSV色彩模型,而目前在视频压缩技术领域,视频源格式多为采取亮度信息与色度信息的分离表示模式即YUV。虽然通过色彩空间转换方法可以实现各种模型之间的转换,但由此变换与反变换而带来的计算量也是很大的。From the perspective of the human visual system, color can be described by brightness, hue, and saturation. Usually, hue and saturation are commonly referred to as chroma, which is used to indicate the category and depth of color. Although human vision is much more sensitive to brightness than to color shades, sometimes the chromaticity information carried by the image sequence processed by the video encoder is insufficient. For example, the images obtained by the camera are often caused by different indoor light sources. Color noise, color cast and other problems, so it is necessary to use color processing methods to enhance the color of the image. Most of the current color processing methods are based on RGB and HSV color models, and currently in the field of video compression technology, the video source format mostly adopts the separate representation mode of luminance information and chrominance information, that is, YUV. Although the conversion between various models can be realized through the color space conversion method, the calculation amount caused by the conversion and inverse conversion is also very large.

考虑到实际应用中,人们有时候需要采取不同的增强处理强度来处理不同的色彩域信息。若将算法依赖于现有技术中色彩区域的检测,一则增加了计算量,二则没有一种准确率100%区域检测算法、而且会产生由离散点域错判带来的平衡过渡问题等。Considering that in practical applications, people sometimes need to adopt different enhancement processing intensities to process different color gamut information. If the algorithm relies on the detection of color regions in the prior art, it will increase the amount of calculation, and second, there will be no region detection algorithm with 100% accuracy, and it will cause balance transition problems caused by misjudgment in discrete point domains, etc. .

因此,需要提出一种改进的方法方案来解决现有方法中存在的上述问题。Therefore, it is necessary to propose an improved method solution to solve the above-mentioned problems existing in the existing methods.

发明内容 Contents of the invention

本发明实施例的目的是提出一种新的YUV格式图像的色度信息处理方法。The purpose of the embodiment of the present invention is to propose a new method for processing chrominance information of an image in YUV format.

所述的方法包括:The methods described include:

获取第一当前图像帧的色度饱和度信息κ;Obtain the chroma-saturation information κ of the first current image frame;

根据所述的色度饱和度信息κ获取调节参数;Acquiring adjustment parameters according to the chroma-saturation information κ;

通过预先获取的所需增强色彩分布的经验区间[θ1,θ2],获取权重函数;Obtain the weight function through the pre-acquired empirical interval [θ 1 , θ 2 ] of the required enhanced color distribution;

通过所述的色度饱和度信息κ、调节参数、权重函数及预先构建的色度变换函数进行色度变换。The chroma transformation is performed through the chroma-saturation information κ, the adjustment parameter, the weight function and the pre-built chroma transformation function.

本发明还提供一种YUV格式图像的色度信息处理装置,所述装置包括:第一获取单元、第二获取单元、第三获取单元、第四获取单元、色度变换单元;The present invention also provides a device for processing chroma information of images in YUV format, the device comprising: a first acquisition unit, a second acquisition unit, a third acquisition unit, a fourth acquisition unit, and a chroma conversion unit;

第一获取单元,用于预先获取所需增强色彩的经验区间[θ1,θ2];The first acquisition unit is used to pre-acquire the empirical interval [θ 1 , θ 2 ] of the color to be enhanced;

第二获取单元,用于获取第一当前图像帧的色度饱和度信息κ;A second acquiring unit, configured to acquire the hue-saturation information κ of the first current image frame;

第三获取单元,用于根据所述的色度饱和度信息κ获取调节参数;A third acquisition unit, configured to acquire adjustment parameters according to the chroma-saturation information κ;

第四获取单元,用于获取权重函数;The fourth obtaining unit is used to obtain the weight function;

色度变换单元,用于通过所述的色度饱和度信息κ、调节参数、权重函数及预先构建的色度变换函数进行色度变换。The chroma conversion unit is configured to perform chroma conversion through the chroma-saturation information κ, adjustment parameters, weight functions and pre-built chroma conversion functions.

通过本发明提供的新的YUV格式图像的色度信息处理方法,第一减少了计算量,因为目前在视频压缩技术领域,视频源格式多为YUV格式图像,本发明是基于此模型上的色度处理方法,无论是去色彩噪声还是偏色判断,色彩增强都是基于此模型,相比较于基于其他色彩模型的方法,减少了模型转换上的计算量。The chrominance information processing method of the new YUV format image provided by the present invention reduces the amount of calculation, because at present in the field of video compression technology, the video source format is mostly YUV format image, and the present invention is based on the chromaticity information on this model. Whether it is color noise removal or color cast judgment, color enhancement is based on this model. Compared with methods based on other color models, the amount of calculation on model conversion is reduced.

第二避免了现有技术中区域检测准确率的问题:①因为不采用区域检测法,这样就避免了区域检测误判带来的问题;②此外因为图像是由像素构成的,如果采用基于像素的区域检测法,就会有一些离散的点出现;③基于区域检测的色度增强法,就会出现区域边界色彩增强强度不同,带来的色彩变化跳变的问题,如果出现区域检测错误,就更明显。而本发明采用的是基于色彩的权重增强的法,可以随着色彩变化平衡过渡。同时也减少了区域检测带来的计算量。The second avoids the problem of area detection accuracy in the prior art: ① because the area detection method is not used, the problems caused by area detection misjudgment are avoided; ② in addition, because the image is composed of pixels, if the pixel-based In the region detection method, some discrete points will appear; ③The chromaticity enhancement method based on region detection will cause the color enhancement intensity of the region border to be different, resulting in the problem of color change jump. If there is a region detection error, It's even more obvious. But what the present invention adopts is the method based on the weight enhancement of color, can balance transition along with color change. At the same time, it also reduces the amount of calculation brought by the area detection.

附图说明 Description of drawings

图1是本发明实施例1的方法流程图;Fig. 1 is the method flowchart of embodiment 1 of the present invention;

图2是本发明实施例2的方法流程图;Fig. 2 is the method flowchart of embodiment 2 of the present invention;

图3是本发明实施例2中进行偏色矫正方法流程图;3 is a flow chart of a method for correcting color cast in Embodiment 2 of the present invention;

图4是本发明实施例3的结构示意图;Fig. 4 is the structural representation of embodiment 3 of the present invention;

图5是本发明实施例4的结构示意图;Fig. 5 is a schematic structural view of Embodiment 4 of the present invention;

图6是本发明实施例5的结构示意图;Fig. 6 is a schematic structural view of Embodiment 5 of the present invention;

图7是本发明实施例5中第一统计区域获取单元的结构示意图;7 is a schematic structural diagram of the first statistical area acquisition unit in Embodiment 5 of the present invention;

图8是本发明实施例6的结构示意图。Fig. 8 is a schematic structural diagram of Embodiment 6 of the present invention.

具体实施方式 Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图和实施例,对本发明进行进一步详细说明,为了便于说明,仅示出了与本发明实施例相关的部分。应当理解,此处所描写的具体实施例,仅仅用于解释本发明,并不用以限制本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments. For ease of description, only the parts related to the embodiments of the present invention are shown. It should be understood that the specific embodiments described here are only used to explain the present invention, and are not intended to limit the present invention.

实施例一Embodiment one

本发明提供一种YUV格式图像的色度信息处理方法,该方法中编码源采集的图像为YUV空间上数据模型,色度信号包括色彩信号(即色相信号)与色饱和度信号。YUV格式信号的色彩信号用角度来表示,即一个像素点的色彩相位角通过表示。YUV格式信号中一个像素点的色饱和度为 ( u ( i , j ) - 128 ) 2 + ( v ( i , j ) - 128 ) 2 . The invention provides a method for processing chroma information of a YUV format image. In the method, the image collected by a coding source is a data model on a YUV space, and the chroma signal includes a color signal (ie, a hue signal) and a color saturation signal. The color signal of the YUV format signal is represented by an angle, that is, the color phase angle of a pixel is passed express. The color saturation of a pixel in a YUV format signal is ( u ( i , j ) - 128 ) 2 + ( v ( i , j ) - 128 ) 2 .

实施例1提供的方法应用于采集的YUV格式图像是无噪声和偏色,对于YUV格式图像无噪声和偏色的定义是本领域技术人员的公知常识,并且也不属于本发明的范围,因此在此不进行描述。下面结合附图来说明本发明具体实施。The YUV format image that the method provided in embodiment 1 is applied to collection is noise-free and color cast, and the definition of noise-free and color cast for YUV format image is common knowledge of those skilled in the art, and also does not belong to the scope of the present invention, therefore It is not described here. The specific implementation of the present invention will be described below in conjunction with the accompanying drawings.

参见图1,参见图1:,该方法可以为:See Figure 1, see Figure 1:, the method can be:

步骤100:获取所需增强色彩分布的经验区间[θ1,θ2];Step 100: Obtain the empirical interval [θ 1 , θ 2 ] of the required enhanced color distribution;

具体为:离线获取色彩分布的经验区间;Specifically: Obtain the empirical range of color distribution offline;

步骤100是步骤101--步骤104的准备部分,它只在初次进行步骤101--步骤104之前进行,此后,只要使用者还是增强同一种色彩,那么步骤100将不再进行,因为步骤101--步骤104所用到的色彩分布的经验区间[θ1,θ2]已经在初次进行色彩增强的时候获取了;Step 100 is the preparatory part of step 101--step 104, it is only carried out before step 101--step 104 for the first time, after this, as long as the user still strengthens the same color, then step 100 will not be carried out again, because step 101- - The empirical interval [θ 1 , θ 2 ] of the color distribution used in step 104 has been obtained when the color enhancement is performed for the first time;

步骤100其原理是通过统计大量(至少25个YUV图像,具体要求请见步骤1001中的描述)的图像的色彩分布规律,获取色彩分布的经验区间[θ1,θ2];The principle of step 100 is to obtain the empirical interval [θ 1 , θ 2 ] of color distribution by counting the color distribution rules of a large number of images (at least 25 YUV images, please refer to the description in step 1001 for specific requirements);

此处所谓离线是指预先统计大量图像,并且统计过程中用到的图像与后续色彩增强的图像无关。The so-called off-line here refers to counting a large number of images in advance, and the images used in the counting process have nothing to do with the subsequent color-enhanced images.

所述“获取所需增强色彩分布的经验区间[θ1,θ2]”的方法可以为:The method of "obtaining the empirical interval [θ 1 , θ 2 ] of the required enhanced color distribution" can be:

步骤1001:获取满足如下条件的P个YUV格式图像(P>=25)Step 1001: Acquiring P pieces of YUV format images that meet the following conditions (P>=25)

此处所述的获取即指同时满足任何下述条件1和2的图像,均可以;The acquisition mentioned here refers to the images that meet any of the following conditions 1 and 2 at the same time, both are acceptable;

条件1:选取的图像为无噪声、无偏色图像(无噪声、无偏色图像都是通用含义);Condition 1: The selected image is a noise-free and color-cast image (noise-free and color-cast images are common meanings);

条件2:选取含有所需增强色彩的图像,即如果用户想增强图像的人的肤色,那么此时应选取含有人的肤色信息的图像.Condition 2: Select an image containing the color to be enhanced, that is, if the user wants to enhance the skin color of the person in the image, then the image containing the skin color information of the person should be selected at this time.

步骤1002;获取P个YUV格式图像中第m个(即P个图像中第m个,m=1,2,…,P)图像中所需增强色彩,其所在区域中所有像素的角度 θ i , j = arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) Step 1002; Obtain the mth (that is, the mth in the P image, m=1, 2, ..., P) image in the P YUV format image to enhance the color, and the angle of all pixels in the area where it is located θ i , j = arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 )

步骤1003:获取步骤1002所求取的所有θi,j的最小值记为 θ 1 = min ( arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ) 获取步骤1002所求取的所有θi,j的最大值记为 θ 2 = max ( arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ) Step 1003: Obtain the minimum value of all θ i,j calculated in step 1002 and denote as θ 1 = min ( arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ) Obtain the maximum value of all θ i and j obtained in step 1002 as θ 2 = max ( arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )

其中u(i,j):表示YUV格式的图像,色度u分量在i行j列的像素值;v(i,j):表示YUV格式的图像,色度v分量在i行j列的像素值;θi,j为P个YUV格式图像中第m个图像中所需增强色彩,其所在区域中当前像素的角度;i为当前像素的行标,j为当前像素的列标。Where u(i, j): represents an image in YUV format, the pixel value of the chroma u component in row i and column j; v(i, j): represents an image in YUV format, and the chroma v component is in row i and column j Pixel value; θi , j is the angle of the current pixel in the area where the color needs to be enhanced in the mth image in the P YUV format images; i is the row label of the current pixel, and j is the column label of the current pixel.

步骤101:获取第一当前图像帧frame的色度饱和度信息κ;Step 101: Obtain the chroma-saturation information κ of the first current image frame frame;

κ = mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) 和vframe(i,)∈frame) κ = mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) and v frame (i,) ∈ frame)

frame为第一当前图像帧、κ为第一当前图像帧frame的色度饱和度信息、frame is the first current image frame, κ is the hue saturation information of the first current image frame,

mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) 和vframe(i,j)∈frame)为对所有属于第一当前图像帧frame的色度分量uframe(i,j)和vframe(i,j)其对应的变量

Figure BDA0000155952570000046
求均值;uframe(i,j)为第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j)为第一当前图像帧frame,色度v分量在i行j列的像素值。 mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) and v frame (i, j) ∈ frame) are the corresponding variables for all chrominance components u frame (i, j) and v frame (i, j) belonging to the first current image frame
Figure BDA0000155952570000046
Find the mean value; u frame (i, j) is the first current image frame frame, the pixel value of the chroma u component in i row j column; v frame (i, j) is the first current image frame frame, the chroma v component The pixel value at row i and column j.

步骤102:根据所述的色度饱和度信息κ获取调节参数;Step 102: Acquiring adjustment parameters according to the chroma-saturation information κ;

ββ uu == 22 ** γγ uu // κκ

ββ vv == 22 ** γγ vv // κκ

βu为色度分量u的调节参数、βv为色度分量v的调节参数、γu为色度分量u的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γu<80、γv为色度分量v的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γv<80;κ为第一当前图像帧frame的色度饱和度信息;β u is the adjustment parameter of the chroma component u, β v is the adjustment parameter of the chroma component v, and γ u is the target chroma saturation constant of the chroma component u, which is determined by the user according to actual needs. Considering that the color is too strong, Human eyes will feel uncomfortable, generally γ u < 80, γ v is the target chroma saturation constant of chroma component v, which is determined by the user according to actual needs. Considering that the color is too strong, human eyes will feel uncomfortable, Generally, γ v <80; κ is the chroma saturation information of the first current image frame frame;

步骤103:按照下列要求构建权重函数w=η(θ);Step 103: construct weight function w=η(θ) according to the following requirements;

条件1:η(θ)为连续函数Condition 1: η(θ) is a continuous function

条件2:η(θ)只有一个最大值点Condition 2: η(θ) has only one maximum point

条件3:η(θ)的最大值点位于(θ12)/2,Condition 3: The maximum point of η(θ) is located at (θ 12 )/2,

同时满足上述条件的η(θ)均可以作为权重函数w;若不能同时满足上述3个条件,则当前η(θ)不能作为权重函数,重新设置函数η(θ),继续上诉判断,直到η(θ)满足条件,即此时η(θ)为权重函数w。η(θ) that satisfies the above conditions at the same time can be used as the weight function w; if the above three conditions cannot be satisfied at the same time, the current η(θ) cannot be used as the weight function, and the function η(θ) is reset, and the appeal judgment is continued until η (θ) satisfies the condition, that is, at this time η(θ) is the weight function w.

其中[θ1,θ2]为所需增强色彩的色度增强的最小经验值区间(在步骤100获取);Wherein [θ 1 , θ 2 ] is the minimum empirical value interval of the chroma enhancement of the desired enhanced color (obtained in step 100);

步骤104:通过所述的色度饱和度信息κ、调节参数、权重函数及色度变换函数进行色度变换。Step 104: Carry out chroma transformation through the chroma-saturation information κ, adjustment parameters, weight function and chroma transformation function.

预先构建的色度变换函数为:The pre-built chroma transform function is:

u3(i,j)=clip(w*((uframe(i,j)-128)*βu+128),0,255),u3(i,j)=clip(w*((u frame (i,j)-128)*β u +128),0,255),

v3(i,j)=clip(w*((vframe(i,j)-128)*βv+128),0,255);v3(i,j)=clip(w*((v frame (i,j)-128)*β v +128),0,255);

其中w为所述的权重函数、βu为色度分量u的调节参数、βv为色度分量v的调节参数;Wherein w is the weight function described, β u is the adjustment parameter of chroma component u, and β v is the adjustment parameter of chroma component v;

其中uframe(i,j)为第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j)为第一当前图像帧frame,色度v分量在i行j列的像素值;u3(i,j)、v3(i,j)分别为将uframe(i,j)、vframe(i,j)通过色彩增强以后的像素值, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 . Wherein u frame (i, j) is the first current image frame frame, and the chroma u component is at the pixel value of i row j column; v frame (i, j) is the first current image frame frame, and the chroma v component is at i The pixel value of row j and column; u3(i, j), v3(i, j) are respectively the pixel values after u frame (i, j) and v frame (i, j) are enhanced by color, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 .

即利用所述的色度变换函数进行色度变换,增强图像的色度信息。That is, the chromaticity transformation is performed by using the chromaticity transformation function to enhance the chromaticity information of the image.

实施例二Embodiment two

本发明提供一种YUV格式图像的色度信息处理方法,该方法中编码源采集的图像为YUV空间上数据模型,色度信号包括色彩信号(即色相信号)与色饱和度信号。YUV格式信号的色彩信号用角度来表示,即一个像素点的色彩相位角通过

Figure BDA0000155952570000052
表示。YUV格式信号中一个像素点的色饱和度为 ( u ( i , j ) - 128 ) 2 + ( v ( i , h ) - 128 ) 2 . The invention provides a method for processing chroma information of a YUV format image. In the method, the image collected by a coding source is a data model on a YUV space, and the chroma signal includes a color signal (ie, a hue signal) and a color saturation signal. The color signal of the YUV format signal is represented by an angle, that is, the color phase angle of a pixel is passed
Figure BDA0000155952570000052
express. The color saturation of a pixel in a YUV format signal is ( u ( i , j ) - 128 ) 2 + ( v ( i , h ) - 128 ) 2 .

实施例2提供的方法适用于采集的YUV格式图像一般是有色彩噪声或有偏色、或者同时有色彩噪声和偏色的情况,对于无色彩噪声无偏色的情况即实施例1提供的方法。对于YUV格式图像有噪声和偏色的定义是本领域技术人员的公知常识,并且也不属于本发明的范围,因此在此不进行描述。下面结合附图来说明本发明具体实施。The method provided in Embodiment 2 is applicable to the case where the captured YUV format image generally has color noise or color cast, or has color noise and color cast at the same time. For the case of no color noise and no color cast, the method provided in Embodiment 1 . The definition of noise and color cast in a YUV format image is common knowledge of those skilled in the art, and does not belong to the scope of the present invention, so it will not be described here. The specific implementation of the present invention will be described below in conjunction with the accompanying drawings.

参见图2,实施例2在实施例1的基础上增加了色彩噪声处理方法和偏色矫正方法。Referring to FIG. 2 , embodiment 2 adds a color noise processing method and a color cast correction method on the basis of embodiment 1.

这里在不同的情况下,对步骤201及步骤202进行几种情况的说明:Here, under different circumstances, step 201 and step 202 are described in several situations:

(1)当第一图像帧(原始图像)没有色彩噪声且不偏色,则不进行步骤201与步骤202操作,整个YUV格式图像的色度信息处理方法即实施例1(也就是步骤203)的整个方法,那么相应的实施例1中所述的第一当前图像帧就是第一图像帧(即原始图像);(1) When the first image frame (original image) has no color noise and no color cast, then step 201 and step 202 are not performed, and the chrominance information processing method of the entire YUV format image is the embodiment 1 (that is, step 203) whole method, then the first current image frame described in the corresponding embodiment 1 is exactly the first image frame (i.e. original image);

(2)当第一图像帧(原始图像)有色彩噪声且不偏色,则只进行步骤201的操作,此时实施例1(也就是步骤203)中所述的第一当前图像帧就是第二图像帧;(2) When the first image frame (original image) has color noise and no color cast, then only the operation of step 201 is performed, and the first current image frame described in embodiment 1 (that is, step 203) is the second image frame;

(3)当第一图像帧(原始图像)有色彩噪声且偏色,则进行步骤201以及步骤202的操作,此时实施例1(也就是步骤203)所述的第一当前图像帧就是第三图像帧;(3) When the first image frame (original image) has color noise and color cast, then perform the operations of step 201 and step 202, and now the first current image frame described in embodiment 1 (that is, step 203) is the first current image frame three image frames;

(4)当第一图像帧(原始图像),没有色彩噪声但有偏色,则只进行步骤202的操作,此时实施例1(也就是步骤203)中所述的第一当前图像帧就是第三图像帧。(4) When the first image frame (original image), there is no color noise but color cast, then only the operation of step 202 is carried out, and the first current image frame described in embodiment 1 (that is, step 203) is now The third image frame.

为了简洁的对整个方法进行表述,下面将步骤201、步骤202、步骤203放在一个流程里面进行描述,但是根据不同的情况,执行时遵从上述的特殊说明。In order to describe the whole method concisely, step 201, step 202, and step 203 are described in one process below, but according to different situations, the above-mentioned special instructions shall be followed during execution.

步骤201:去除第一图像帧(即当前图像帧)的色彩噪声,得到第二图像帧;Step 201: remove the color noise of the first image frame (i.e. the current image frame) to obtain the second image frame;

去除第一图像帧(即原始图像)的色彩噪声的方法可以为:The method for removing the color noise of the first image frame (ie original image) can be:

利用低通滤波器去除色彩噪声Remove color noise with a low-pass filter

u1(i,j)=filter(u0(i,j)),v1(i,j0=filter(v0(i,j))u1(i,j)=filter(u0(i,j)), v1(i,j0=filter(v0(i,j))

其中:u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波器变换后的色度值,filter(x)可为图像去噪中常用的低通滤波器,如中值、均值滤波器等;Among them: u1(i, j), v1(i, j) are the chroma values transformed by u0(i, j), v0(i, j) respectively through the low-pass filter, and filter(x) can be the image Low-pass filters commonly used in denoising, such as median and mean filters;

u0(i,j):表示第一图像帧(原始图像),色度u分量在i行j列的像素值;u0(i, j): represents the first image frame (original image), the pixel value of the chroma u component in row i and column j;

v0(i,j):表示第一图像帧(原始图像),色度v分量在i行j列的像素值;v0(i, j): represents the first image frame (original image), the pixel value of the chroma v component in row i and column j;

u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波后的像素值;filter(x);可以选择本行业内公知的、常用的图像去噪低通滤波器,如中值、均值滤波器等。u1(i, j), v1(i, j) are respectively the pixel values of u0(i, j), v0(i, j) after low-pass filtering; filter(x); can choose the well-known in the industry , Commonly used image denoising low-pass filters, such as median and mean filters.

步骤202:对所述第二图像帧(在有色彩噪声的情况下,第二图像帧即为步骤201中获取的第二图像帧,即已去除色彩噪声的当前图像帧;没有色彩噪声时第二图像帧即为第一图像帧)进行偏色矫正,获取第三图像帧;Step 202: For the second image frame (in the case of color noise, the second image frame is the second image frame obtained in step 201, that is, the current image frame that has removed color noise; when there is no color noise, the second image frame The second image frame is the first image frame) for color cast correction to obtain the third image frame;

参见图3,进行偏色矫正的方法可以为:Referring to Figure 3, the method for color cast correction can be:

步骤2021:获取第二图像帧的偏色矫正统计区域;该方法可以为:Step 2021: Obtain the color cast correction statistical area of the second image frame; the method can be:

步骤2021A:在所述第二图像帧中筛选偏色统计像素点:其中筛选方法为:判断第二图像帧的像素点是否同时满足筛选条件;若满足则为偏色统计像素点;Step 2021A: Screening the color cast statistical pixel points in the second image frame: the screening method is: judging whether the pixel points of the second image frame meet the screening conditions at the same time; if so, it is the color cast statistical pixel point;

其中所述筛选条件为:Wherein the filter conditions are:

y(i,j)>Thresy|uframe2(i,j)-128|<Thresu y(i,j)>Thres y |u frame2 (i,j)-128|<Thres u

|vframe2(i,j)-128|<Thresv |v frame2 (i, j)-128|<Thres v

|(uframe2(i,j)-128)+(vframe2(i,j)-128)|<Thresuv |(u frame2 (i, j)-128)+(v frame2 (i, j)-128)|<Thres uv

y(i,j)-|uframe2(i,j)-128|-|vframe2(i,j)-128|>Thresyuv y(i, j)-|u frame2 (i, j)-128|-|v frame2 (i, j)-128|>Thres yuv

其中,Thresj,j=y,u,v,uv,yuv分别为相应的统计门限;Among them, Thres j , j=y, u, v, uv, yuv are the corresponding statistical thresholds;

y(i,j):表示第二图像帧,亮度y分量在i行j列的像素值;uframe2(i,j)、为第二图像帧,色度u分量在i行j列的像素值;vframe2(i,j)为第二图像帧,色度v分量在i行j列的像素值。y(i, j): represents the second image frame, the pixel value of the luminance y component in row i and column j; u frame2 (i, j), is the second image frame, the pixel value of chrominance u component in row i and column j value; v frame2 (i, j) is the second image frame, the pixel value of the chroma v component in row i and column j.

Thresy表示偏色统计像素点亮度分量y的统计门限;Thres y represents the statistical threshold of the color cast statistical pixel brightness component y;

Thresu表示偏色统计像素点色度分量u的统计门限;Thres u represents the statistical threshold of color cast statistical pixel chroma component u;

Thresv表示偏色统计像素点色度分量v的统计门限;Thres v represents the statistical threshold of color cast statistical pixel chroma component v;

Thresuv表示偏色统计像素点色度分量u和色度分量v的统计门限;Thres uv represents the statistical threshold of color cast statistical pixel chroma component u and chroma component v;

Thresyuv表示偏色统计像素点亮度分量y和色度分量u、色度分量v的统计门限。Thres yuv represents the statistical threshold of the luminance component y, the chrominance component u, and the chrominance component v of the color cast statistical pixel point.

上述统计门限门限的获取方法为:The method of obtaining the above statistical threshold is as follows:

步骤301:获取第一数量n(n>=25)有偏色且没有色彩噪声的图像;Step 301: Obtain a first number n (n>=25) of images with color cast and no color noise;

步骤302:计算上述图像中第k(k=1,2,…,n)个图像中所有像素其亮度分量y(i,j)的最小值;Step 302: Calculate the minimum value of the luminance component y (i, j) of all pixels in the kth (k=1, 2, ..., n) image in the above image;

所述最小值记为yk,min;k=1,2,......,n,yk,min为第k个图像中所有像素其亮度分量y(i, j)的最小值,

Figure BDA0000155952570000071
Figure BDA0000155952570000072
表示对属于第k个图像所有像素其亮度分量y(i,j)求最小值;The minimum value is recorded as y k, min ; k=1, 2, ..., n, y k, min is the minimum value of its luminance component y (i, j) of all pixels in the kth image ,
Figure BDA0000155952570000071
Figure BDA0000155952570000072
Represents the minimum value of the brightness component y(i, j) of all pixels belonging to the kth image;

步骤303;计算上述图像中第k个图像中所有像素其色度分量u(i,j)对应变量|u(i,j)-128|的最大值;Step 303; Calculate the maximum value of the chroma component u(i, j) corresponding variable |u(i, j)-128| of all pixels in the kth image in the above image;

所述最大值记为uk,max;k=1,2,......,n,uk,max为第k个图像中所有像素其色度分量u(i,j)对应变量|u(i,j)-128|的最大值,

Figure BDA0000155952570000081
Figure BDA0000155952570000082
表示对属于第k个图像所有像素其色度分量u(i,j)对应变量|u(i,j)-128|求最大值,|u(i,j)-128|表示对u(i,j)-128求绝对值。The maximum value is recorded as u k, max ; k=1, 2, ..., n, u k, max is the corresponding variable of the chrominance component u(i, j) of all pixels in the kth image the maximum value of |u(i,j)-128|,
Figure BDA0000155952570000081
Figure BDA0000155952570000082
Represents the maximum value of the chrominance component u(i, j) corresponding variable |u(i, j)-128| for all pixels belonging to the k-th image, and |u(i, j)-128| represents the value of u(i , j)-128 seeks the absolute value.

步骤304:计算上述图像中第k个图像中所有像素其色度分量v(i,j)对应变量|v(i,j)-128|的最大值;Step 304: Calculate the maximum value of the variable |v(i, j)-128| corresponding to the chrominance component v(i, j) of all pixels in the kth image in the above image;

所述最大值记为vk,max;k=1,2,......,n,vk,max为第k个图像中所有像素其色度分量v(i,j)对应变量|v(i,j)-128|的最大值,

Figure BDA0000155952570000084
表示对属于第k个图像所有像素其色度分量v(i,j)对应变量|v(i,j))-128|求最大值,|v(i,j)-128|表示对v(i,j)-128求绝对值;The maximum value is recorded as v k, max ; k=1, 2, ..., n, v k, max is the corresponding variable of the chroma component v (i, j) of all pixels in the k image the maximum value of |v(i,j)-128|,
Figure BDA0000155952570000084
Represents the maximum value of the chrominance component v(i, j) corresponding variable |v(i, j))-128| for all pixels belonging to the k-th image, and |v(i, j)-128| represents the value of v( i, j)-128 to find the absolute value;

步骤305:计算第k个图像中所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|的最大值;Step 305: Calculate the corresponding variables of the chrominance components u(i, j) and v(i, j) of all pixels in the kth image|(u(i, j)-128)+(v(i, j)- 128)|The maximum value;

所述最大值记为uvk,max;k=1,2,......,n,uvk,max为第k个图像中所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|的最大值,

Figure BDA0000155952570000085
Figure BDA0000155952570000086
表示对属于第k个图像所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|求最大值,|(u(i,j)-128)+(v(i,j)-128)|表示对(u(i,j)-128)+(v(i,j)-128)求绝对值;The maximum value is denoted as uv k, max ; k=1, 2, ..., n, uv k, max is the chrominance components u(i, j), v of all pixels in the kth image (i, j) corresponds to the maximum value of the variable |(u(i, j)-128)+(v(i, j)-128)|,
Figure BDA0000155952570000085
Figure BDA0000155952570000086
Represents the corresponding variables of the chrominance components u(i, j) and v(i, j) for all pixels belonging to the kth image|(u(i, j)-128)+(v(i, j)-128) | Find the maximum value, |(u(i, j)-128)+(v(i, j)-128)| means pair (u(i, j)-128)+(v(i, j)-128 ) to find the absolute value;

步骤306:计算第k个图像中所有像素其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|的最小值;Step 306: Calculate the corresponding variable y(i, j)-|u( The minimum value of i, j)-128|-|v(i, j)-128|;

所述最小值记为yuvk,min;k=1,2,......,n,yuvk,min为第k个图像中所有像素其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|的最小值,

Figure BDA0000155952570000087
表示对属于第k个图像所有其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|求最小值,|u(i,j)-128|表示对u(i,j)-128求绝对值,|v(i,j)-128|表示对v(i,j)-128求绝对值;The minimum value is denoted as yuv k, min ; k=1, 2, ..., n, yuv k, min is the luminance component y (i, j) and its color of all pixels in the kth image The minimum value of the degree component u(i, j) and v(i, j) corresponding to the variable y(i, j)-|u(i, j)-128|-|v(i, j)-128|,
Figure BDA0000155952570000087
Indicates the corresponding variable y(i, j)-|u(i, j) for all the luminance components y(i, j) and their chrominance components u(i, j), v(i, j) belonging to the kth image )-128|-|v(i, j)-128| seeks the minimum value, |u(i, j)-128| means to seek the absolute value of u(i, j)-128, |v(i, j) -128| means to find the absolute value of v(i, j)-128;

步骤307:Step 307:

Step31:将上述n个最小值yk,min,k=1,2,......,n降序排列,选择排列中第ceil(95%*n)位置的最小值作为Thresy,即Thresy=yceil(95%*n),minStep31: Arrange the above n minimum values y k, min , k=1, 2, ..., n in descending order, and select the minimum value at the ceil(95%*n) position in the arrangement as Thres y , namely Thres y = y ceil(95%*n), min ;

step32:将所述n个最大值uk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresu,即Thresu=uceil(95%*n),maxStep32: Arrange the n maximum values u k, max , k=1, 2, . That is Thres u = u ceil(95%*n), max ;

step33:将所述n个最大值vk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresv,即Thresv=vceil(95%*n),maxStep33: Arrange the n maximum values v k, max , k=1, 2, ..., n in ascending order, and select the maximum value at the ceil(95%*n) position in the arrangement as Thres v , That is Thres v = v ceil(95%*n), max ;

step34:将所述n个最大值uvk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresuv,即Thresuv=uvceil(95%*n),maxStep34: Arrange the n maximum values uv k, max , k=1, 2, ..., n in ascending order, and select the maximum value at the ceil(95%*n) position in the arrangement as Thres uv , That is Thres uv = uv ceil (95%*n), max ;

step35:将所述n个最小值yuvk,min,k=1,2,......,n降序排列,选择排列中第ceil(95%*n)位置的最小值作为Thresyuv,即Thresyuv=yuvceil(95%*n),minStep35: Arrange the n minimum values yuv k, min , k=1, 2, ..., n in descending order, and select the minimum value at the ceil (95%*n) position in the arrangement as Thres yuv , That is Thres yuv = yuv ceil (95%*n), min ;

其中上述符号ceil(x),表示对x作向上取整操作,即如果95%*n为整数则ceil(x)=95%*n;如果95%*n为含有小数的实数则ceil(x)=【95%*n】+1,其中【95%*n】表示实数95%*n为整数部分;此处百分比;可以选择95%也可以选择其他的数值,但一般不建议不选低于90%的或者高于99%的。Wherein the above-mentioned symbol ceil(x) means that x is rounded up, that is, if 95%*n is an integer then ceil(x)=95%*n; if 95%*n is a real number containing a decimal, then ceil(x )=[95%*n]+1, where [95%*n] means the real number 95%*n is the integer part; the percentage here; you can choose 95% or other values, but it is generally not recommended not to choose low less than 90% or higher than 99%.

上述步骤301至307是一种获取所述统计门限值的方法,也可以采用其他公知门限的统计方法,在此不再累述。The above steps 301 to 307 are a method for obtaining the statistical threshold, and other known statistical methods for the threshold may also be used, which will not be repeated here.

步骤2021B;然后,获取偏色校正统计区域:

Figure BDA0000155952570000091
即所有偏色统计像素点的u分量的集合就是偏色校正统计区域而所有偏色统计像素点的v分量的集合就是偏色校正统计区域
Figure BDA0000155952570000093
Step 2021B; Then, obtain the statistical area of color cast correction:
Figure BDA0000155952570000091
That is, the set of u components of all color cast statistical pixels is the color cast correction statistical area The set of v components of all color cast statistical pixels is the color cast correction statistical area
Figure BDA0000155952570000093

步骤2022:根据所述的偏色矫正统计区域获取色度偏差矫正参数;Step 2022: Acquire chromaticity deviation correction parameters according to the color cast correction statistics area;

该获取方法可以为:The acquisition method can be:

Figure BDA0000155952570000094
Figure BDA0000155952570000094

αu为色度分量u(i,j)对应的偏色校正参数α u is the color cast correction parameter corresponding to the chroma component u(i, j)

αv为色度分量v(i,j)对应的偏色校正参数α v is the color cast correction parameter corresponding to the chroma component v(i, j)

Figure BDA0000155952570000096
为对属于校正统计区域的所有uframe2(i,j)求均值
Figure BDA0000155952570000096
For the pair belonging to the corrected statistical area All u frame2 (i, j) mean

Figure BDA0000155952570000098
为对属于校正统计区域的所有vframe2(i,j)求均值;所有偏色统计像素点的u分量的集合就是偏色校正统计区域所有偏色统计像素点的v分量的集合就是偏色校正统计区域
Figure BDA0000155952570000098
For the pair belonging to the corrected statistical area All v frame2 (i, j) of all v frame2 (i, j) are averaged; the set of u components of all color cast statistical pixels is the color cast correction statistical area The set of v components of all color cast statistical pixels is the color cast correction statistical area

步骤2023:根据所述的色度偏差矫正参数进行偏色矫正;Step 2023: Perform color cast correction according to the chromaticity deviation correction parameters;

该步骤中所述的进行偏色矫正的方法可以采用目前本领域技术人员公知的偏色矫正方法,因此在此不再累述。The method for correcting the color cast described in this step can adopt a color cast correction method known to those skilled in the art, so it will not be repeated here.

步骤203:获取的第三图像帧进行自适应色度信息增强处理。Step 203: Perform adaptive chroma information enhancement processing on the acquired third image frame.

将YUV格式图像进行自适应色度信息增强处理的方法即本发明提供的实施例1中的方法,在此不再累述。The method for performing adaptive chroma information enhancement processing on a YUV format image is the method in Embodiment 1 provided by the present invention, and will not be repeated here.

实施例3、对应于实施例1,本发明提供一种YUV格式图像的色度信息处理装置,参见图4所述装置包括:第一获取单元、第二获取单元、第三获取单元、第四获取单元、色度变换单元;Embodiment 3. Corresponding to Embodiment 1, the present invention provides a device for processing chroma information of images in YUV format. Referring to FIG. 4, the device includes: a first acquisition unit, a second acquisition unit, a third acquisition unit, and a fourth acquisition unit. Acquisition unit, chroma transformation unit;

第一获取单元,用于预先获取所需增强色彩的经验区间[θ1,θ2];The first acquisition unit is used to pre-acquire the empirical interval [θ 1 , θ 2 ] of the color to be enhanced;

第二获取单元,用于获取第一当前图像帧frame的色度饱和度信息κ;The second obtaining unit is used to obtain the chroma saturation information κ of the first current image frame frame;

第三获取单元,用于根据所述的色度饱和度信息κ获取调节参数;A third acquisition unit, configured to acquire adjustment parameters according to the chroma-saturation information κ;

第四获取单元,用于获取权重函数;The fourth obtaining unit is used to obtain the weight function;

色度变换单元,用于通过所述的色度饱和度信息κ、调节参数、权重函数及预先构建的色度变换函数进行色度变换。The chroma conversion unit is configured to perform chroma conversion through the chroma-saturation information κ, adjustment parameters, weight functions and pre-built chroma conversion functions.

其中:所述的第一获取单元包括:第一图像获取单元、增强色彩获取单元、经验区间获取单元;Wherein: the first acquisition unit includes: a first image acquisition unit, an enhanced color acquisition unit, and an experience interval acquisition unit;

第一图像获取单元,用于获取P个(P>=25)YUV格式图像,所述P个图像为无噪声、无偏色、且有所需增强色彩的图像;The first image acquisition unit is used to acquire P (P>=25) YUV format images, and the P images are images without noise, without color cast, and with required enhanced colors;

增强色彩获取单元,用于获取第m(m=1,2,…,P)个图像中所需增强色彩,其所在区域中所有像素的角度

Figure BDA0000155952570000101
Enhanced color acquisition unit, used to acquire the required enhanced color in the mth (m=1, 2, ..., P) image, and the angles of all pixels in the area where it is located
Figure BDA0000155952570000101

经验区间获取单元,用于根据

Figure BDA0000155952570000102
获取所有θi,j的最小值,记为 &theta; 1 = min ( arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ) The empirical interval acquisition unit is used for
Figure BDA0000155952570000102
Get the minimum value of all θ i, j , denoted as &theta; 1 = min ( arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )

根据

Figure BDA0000155952570000104
获取所有θi,j的最大值,记为according to
Figure BDA0000155952570000104
Obtain the maximum value of all θ i, j , denoted as

&theta;&theta; 22 == maxmax (( aracarac tanthe tan (( vv (( ii ,, jj )) -- 128128 uu (( ii ,, jj )) -- 128128 )) )) ;;

其中u(i,j);表示YUV格式的图像,色度u分量在i行j列的像素值;v(i,j):表示YUV格式的图像,色度v分量在i行j列的像素值;θi,j为第m个图像中所需增强色彩,其所在区域中当前像素的角度;i为当前像素的行标,j为当前像素的列标。Among them, u(i, j): represents an image in YUV format, the pixel value of the chroma u component in row i and column j; v(i, j): represents an image in YUV format, and the chroma v component is in row i and column j Pixel value; θi , j is the angle of the current pixel in the area where the color needs to be enhanced in the mth image; i is the row label of the current pixel, and j is the column label of the current pixel.

其中,所述的第二获取单元用于获取第一当前图像帧frame的色度饱和度信息κ具体为:Wherein, the second obtaining unit is used to obtain the color saturation information κ of the first current image frame frame specifically as follows:

&kappa; = mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) 和vframe(i,j)∈frame) &kappa; = mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) and v frame (i, j) ∈ frame)

frame为第一当前图像帧、κ为第一当前图像帧frame的色度饱和度信息、frame is the first current image frame, κ is the hue saturation information of the first current image frame,

mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) 和vframe(i,j)∈frame)为对所有属于第一当前图像帧frame的色度分量uframe(i,j)和vframe(i,j)其对应的变量

Figure BDA0000155952570000108
求均值;uframe(i,j)为第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j)为第一当前图像帧frame,色度v分量在i行j列的像素值。 mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) and v frame (i, j) ∈ frame) are the corresponding variables for all chrominance components u frame (i, j) and v frame (i, j) belonging to the first current image frame
Figure BDA0000155952570000108
Find the mean value; u frame (i, j) is the first current image frame frame, the pixel value of the chroma u component in i row j column; v frame (i, j) is the first current image frame frame, the chroma v component The pixel value at row i and column j.

其中,本实施例中所述的第三获取单元包括第一参数获取单元、第二参数获取单元;Wherein, the third acquisition unit described in this embodiment includes a first parameter acquisition unit and a second parameter acquisition unit;

第一参数获取单元,用于

Figure BDA0000155952570000111
The first parameter acquisition unit is used for
Figure BDA0000155952570000111

第二参数获取单元,用于 The second parameter gets the unit for

βu为色度分量u的调节参数、βv为色度分量v的调节参数、γu为色度分量u的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γu<80、γv为色度分量v的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γv<80;κ为第一当前图像帧的色度饱和度信息。β u is the adjustment parameter of the chroma component u, β v is the adjustment parameter of the chroma component v, and γ u is the target chroma saturation constant of the chroma component u, which is determined by the user according to actual needs. Considering that the color is too strong, Human eyes will feel uncomfortable, generally γ u < 80, γ v is the target chroma saturation constant of chroma component v, which is determined by the user according to actual needs. Considering that the color is too strong, human eyes will feel uncomfortable, Generally, γ v <80; κ is the chroma saturation information of the first current image frame.

其中,本实施例所述的第四获取单元包括:设置单元,判断单元;确定单元;Wherein, the fourth acquiring unit described in this embodiment includes: a setting unit, a judging unit; a determining unit;

设置单元,用于设置权重函数w=η(θ);A setting unit is used to set the weight function w=η(θ);

判断单元,用于判断η(θ)是否为连续函数、且η(θ)只有一个最大值点、且η(θ)的最大值点位于(θ12)/2;若是则通知确定单元η(θ)为权重函数w;否则重新进入设置单元;Judgment unit, used to judge whether η(θ) is a continuous function, and η(θ) has only one maximum point, and the maximum point of η(θ) is located at (θ 12 )/2; if so, notify and confirm Unit η(θ) is the weight function w; otherwise re-enter the setup unit;

确定单元,根据判断单元的结果,确定η(θ)为权重函数w。The determining unit determines η(θ) as the weight function w according to the result of the judging unit.

其中,本实施例中所述的色度变换单元中所述的“预先构建的色度变函数”具体为:Wherein, the "pre-built chromaticity transformation function" described in the chromaticity transformation unit described in this embodiment is specifically:

u3(i,j)=clip(w*((uframe(i,j)-128)*βu+128),0,255),v3(i,j)=clip(w*((vframe(i,j)-128)*βv+128),0,255);u3(i,j)=clip(w*((u frame (i,j)-128)*β u +128),0,255), v3(i,j)=clip(w*((v frame (i ,j)-128)* βv +128),0,255);

其中w为所述的权重函数、βu为色度分量u的调节参数、βv为色度分量v的调节参数;Wherein w is the weight function described, β u is the adjustment parameter of chroma component u, and β v is the adjustment parameter of chroma component v;

其中uframe(i,j)为第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j)为第一当前图像帧frame,色度v分量在i行j列的像素值;u3(i,j)、v3(i,j)分别为将uframe(i,j)、vframe(i,j)通过色彩增强以后的像素值, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 . Wherein u frame (i, j) is the first current image frame frame, and the chroma u component is at the pixel value of i row j column; v frame (i, j) is the first current image frame frame, and the chroma v component is at i The pixel value of row j and column; u3(i, j), v3(i, j) are respectively the pixel values after u frame (i, j) and v frame (i, j) are enhanced by color, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 .

实施例4,参见图5,对应于实施例2,在实施例3提供的YUV格式图像的色度信息处理装置基础上进一步包括去除色彩噪声单元;Embodiment 4, referring to FIG. 5, corresponds to Embodiment 2, and further includes a color noise removal unit on the basis of the chrominance information processing device of the YUV format image provided in Embodiment 3;

去除色彩噪声单元,用于去除第一图像帧的色彩条噪声,得到第二图像帧;The color noise removal unit is used to remove the color bar noise of the first image frame to obtain the second image frame;

其中,本实施例所述的去除色彩噪声单元,包括;第一去除单元,、第二去除单元;Wherein, the color noise removal unit described in this embodiment includes: a first removal unit, and a second removal unit;

第一去除单元,用于利用低通滤波器去除色彩条噪声u1(i,j)=filter(u0(i,j));The first removal unit is used to remove the color bar noise u1(i, j)=filter(u0(i, j)) using a low-pass filter;

第二去除单元,用于利用低通滤波器去除色彩条噪声v1(i,j)=filter(v0(i,j))The second removal unit is used to remove color bar noise v1(i, j)=filter(v0(i, j)) using a low-pass filter

其中:u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波器变换后的色度值,filter(x)可为图像去噪中常用的低通滤波器,如中值、均值滤波器等;Among them: u1(i, j), v1(i, j) are the chroma values transformed by u0(i, j), v0(i, j) respectively through the low-pass filter, and filter(x) can be the image Low-pass filters commonly used in denoising, such as median and mean filters;

u0(i,j);表示第一图像帧(原始图像),色度u分量在i行j列的像素值;u0(i, j); represents the first image frame (original image), the pixel value of the chroma u component in row i and column j;

v0(i,j):表示第一图像帧(原始图像),色度v分量在i行j列的像素值;v0(i, j): represents the first image frame (original image), the pixel value of the chroma v component in row i and column j;

u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波后的像素值;filter(x)可为图像去噪中常用的低通滤波器。u1(i, j), v1(i, j) are the pixel values after u0(i, j), v0(i, j) are low-pass filtered, respectively; filter(x) can be commonly used in image denoising low pass filter.

实施例5、对应于实施例2,参见图6、在实施例3提供的YUV格式图像的色度信息处理装置基础上进一步包括去第一偏色矫正单元;Embodiment 5, corresponding to Embodiment 2, referring to FIG. 6 , on the basis of the chromaticity information processing device of the YUV format image provided in Embodiment 3, it further includes a first color cast correction unit;

第一偏色矫正单元;用于对所述第二图像帧进行偏色矫正,获取第三图像帧A first color cast correction unit; used to correct the color cast of the second image frame and obtain a third image frame

其中,本实施例所述的第一偏色矫正单元包括:第一统计区域获取单元、矫正参数获取单元、第二偏色矫正单元;Wherein, the first color cast correction unit described in this embodiment includes: a first statistical area acquisition unit, a correction parameter acquisition unit, and a second color cast correction unit;

第一统计区域获取单元,用于获取所述第二图像帧的偏色矫正统计区域;A first statistical area acquisition unit, configured to acquire the color cast correction statistical area of the second image frame;

矫正参数获取单元,用于根据所述的偏色矫正统计区域获取色度偏差矫正参数;A correction parameter acquisition unit, configured to acquire chromaticity deviation correction parameters according to the color cast correction statistical area;

第二偏色矫正单元,用于根据所述的色度偏差矫正参数进行偏色矫正。The second color cast correction unit is configured to correct the color cast according to the chromaticity deviation correction parameters.

其中,参见图7,本实施例所述的第一统计区域获取单元包括:统计像素点单元、第二统计区域获取单元;Wherein, referring to FIG. 7 , the first statistical area acquisition unit described in this embodiment includes: a statistical pixel point unit, and a second statistical area acquisition unit;

统计像素点单元,用于在所述的第二图像帧中筛选偏色统计像素点;A statistical pixel point unit, configured to screen color cast statistical pixels in the second image frame;

第二统计区域获取单元,用于获取所述的偏色统计像素点的U分量的集合、V分量的集合;所有偏色统计像素点的u分量的集合就是偏色校正统计区域

Figure BDA0000155952570000121
所有偏色统计像素点的v分量的集合就是偏色校正统计区域
Figure BDA0000155952570000122
The second statistical area acquisition unit is used to obtain the set of U components and the set of V components of the color cast statistical pixels; the set of u components of all color cast statistical pixels is the color cast correction statistical area
Figure BDA0000155952570000121
The set of v components of all color cast statistical pixels is the color cast correction statistical area
Figure BDA0000155952570000122

其中,本实施例所述的统计像素点单元包括:判断单元、统计门限获取单元;Wherein, the statistical pixel point unit described in this embodiment includes: a judging unit, a statistical threshold acquisition unit;

判断单元,用于判断第二图像帧的像素点是否同时满足筛选条件;若满足则为偏色统计像素点;A judging unit, configured to judge whether the pixels of the second image frame meet the screening conditions at the same time; if so, it is a color cast statistical pixel;

其中筛选条件为:The filter criteria are:

y(i,j)>Thresy|uframe2(i,j)-128|<Thresu y(i,j)>Thres y |u frame2 (i,j)-128|<Thres u

|vframe2(i,j)-128|<Thresv |v frame2 (i, j)-128|<Thres v

|(uframe2(i,j)-128)+(vframe2(i,)-128)|<Thresuv |(u frame2 (i, j)-128)+(v frame2 (i,)-128)|<Thres uv

y(i,j)-|uframe2(i,j)-128|-|vframe2(i,j)-128|>Thresyuv y(i, j)-|u frame2 (i, j)-128|-|v frame2 (i, j)-128|>Thres yuv

其中,Thresj,j=y,u,v,uv,yuv分别为相应的统计门限;Among them, Thres j , j=y, u, v, uv, yuv are the corresponding statistical thresholds;

y(i,j):表示第二图像帧,亮度y分最在i行j列的像素值;uframe2(i,j)、为第二图像帧,色度u分量在i行j列的像素值;vframe2(i,j)为第二图像帧,色度v分量在i行j列的像素值。y(i, j): Indicates the second image frame, the brightness y is the pixel value in row i and column j; u frame2 (i, j) is the second image frame, and the chroma u component is in row i and column j Pixel value; v frame2 (i, j) is the second image frame, the pixel value of the chroma v component in row i and column j.

Thresy表示偏色统计像素点亮度分量y的统计门限;Thres y represents the statistical threshold of the color cast statistical pixel brightness component y;

Thresu表示偏色统计像素点色度分量u的统计门限;Thres u represents the statistical threshold of color cast statistical pixel chroma component u;

Thresv表示偏色统计像素点色度分量v的统计门限;Thres v represents the statistical threshold of color cast statistical pixel chroma component v;

Thresuv表示偏色统计像素点色度分量u和色度分量v的统计门限;Thres uv represents the statistical threshold of color cast statistical pixel chroma component u and chroma component v;

Thresyuv表示偏色统计像素点亮度分量y和色度分量u、色度分量v的统计门限;Thres yuv represents the statistical threshold of the luminance component y, the chrominance component u, and the chrominance component v of the color cast statistical pixel point;

统计门限获取单元,用于获取第一数量n(n>=25)有偏色且没有色彩噪声的YUV格式图像;Statistical threshold acquisition unit, used to acquire first number n (n>=25) YUV format images with color cast and no color noise;

计算上述图像中第k个图像中所有像素其亮度分量y(i,j)的最小值;Calculate the minimum value of the brightness component y(i, j) of all pixels in the kth image in the above image;

所述最小值记为yk,min;k=1,2,......,n,yk,min为第k个图像中所有像素其亮度分量y(i,j)的最小值,

Figure BDA0000155952570000131
Figure BDA0000155952570000132
表示对属于第k个图像所有像素其亮度分量y(i,j)求最小值;The minimum value is recorded as y k, min ; k=1, 2, ..., n, y k, min is the minimum value of its luminance component y(i, j) of all pixels in the kth image ,
Figure BDA0000155952570000131
Figure BDA0000155952570000132
Represents the minimum value of the brightness component y(i, j) of all pixels belonging to the kth image;

计算上述图像中第k个图像中所有像素其色度分量u(i,j)对应变量|u(i,j)-128|的最大值;Calculate the maximum value of the variable |u(i, j)-128| corresponding to the chroma component u(i, j) of all pixels in the kth image in the above image;

所述最大值记为uk,max;k=1,2,......,n,uk,max为第k个图像中所有像素其色度分量u(i,j)对应变量|u(i,j)-128|的最大值,

Figure BDA0000155952570000133
Figure BDA0000155952570000134
表示对属于第k个图像所有像素其色度分量u(i,j)对应变量|u(i,j)-128|求最大值,|u(i,j)-128|表示对u(i,j)-128求绝对值。The maximum value is recorded as u k, max ; k=1, 2, ..., n, u k, max is the corresponding variable of the chrominance component u(i, j) of all pixels in the kth image the maximum value of |u(i,j)-128|,
Figure BDA0000155952570000133
Figure BDA0000155952570000134
Represents the maximum value of the chrominance component u(i, j) corresponding variable |u(i, j)-128| for all pixels belonging to the k-th image, and |u(i, j)-128| represents the value of u(i , j)-128 seeks the absolute value.

计算上述图像中第k个图像中所有像素其色度分量v(i,j)对应变量|v(i,j)-128|的最大值;Calculate the maximum value of the variable |v(i, j)-128| corresponding to the chrominance component v(i, j) of all pixels in the kth image in the above image;

所述最大值记为vk,max;k=1,2,......,n,vk,max为第k个图像中所有像素其色度分量v(i,j)对应变量|v(i,j)-128|的最大值,

Figure BDA0000155952570000135
Figure BDA0000155952570000136
表示对属于第k个图像所有像素其色度分量v(i,j)对应变量|v(i,j)-128|求最大值,|v(i,j)-128|表示对v(i,j)-128求绝对值;The maximum value is recorded as v k, max ; k=1, 2, ..., n, v k, max is the corresponding variable of the chroma component v (i, j) of all pixels in the k image the maximum value of |v(i,j)-128|,
Figure BDA0000155952570000135
Figure BDA0000155952570000136
Represents the maximum value of the chrominance component v(i, j) corresponding variable |v(i, j)-128| for all pixels belonging to the kth image, and |v(i, j)-128| represents the value of v(i , j)-128 seeks the absolute value;

计算第k个图像中所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|的最大值;Calculate the corresponding variables of the chrominance components u(i,j) and v(i,j) of all pixels in the kth image |(u(i,j)-128)+(v(i,j)-128)| the maximum value;

所述最大值记为uvk,max;k=1,2,......,n,uvk,max为第k个图像中所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|的最大值,

Figure BDA0000155952570000141
Figure BDA0000155952570000142
表示对属于第k个图像所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|求最大值,|(u(i,j)-128)+(v(i,j)-128)|表示对(u(i,j)-128)+(v(i,j)-128)求绝对值;The maximum value is denoted as uv k, max ; k=1, 2, ..., n, uv k, max is the chrominance components u(i, j), v of all pixels in the kth image (i, j) corresponds to the maximum value of the variable |(u(i, j)-128)+(v(i, j)-128)|,
Figure BDA0000155952570000141
Figure BDA0000155952570000142
Represents the corresponding variables of the chrominance components u(i, j) and v(i, j) for all pixels belonging to the kth image|(u(i, j)-128)+(v(i, j)-128) | Find the maximum value, |(u(i, j)-128)+(v(i, j)-128)| means pair (u(i, j)-128)+(v(i, j)-128 ) to find the absolute value;

计算第k个图像中所有像素其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|的最小值;Calculate the luminance component y(i, j) and its chrominance component u(i, j), v(i, j) corresponding variable y(i, j)-|u(i, j) of all pixels in the kth image )-128|-|v(i,j)-128|minimum value;

所述最小值记为yuvk,min;k=1,2,......,n,yuvk,min为第k个图像中所有像素其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|的最小值,

Figure BDA0000155952570000143
Figure BDA0000155952570000144
表示对属于第k个图像所有其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|求最小值,|u(i,j)-128|表示对u(i,j)-128求绝对值,|v(i,j)-128|表示对v(i,j)-128求绝对值;The minimum value is denoted as yuv k, min ; k=1, 2, ..., n, yuv k, min is the luminance component y (i, j) and its color of all pixels in the kth image The minimum value of the degree component u(i, j) and v(i, j) corresponding to the variable y(i, j)-|u(i, j)-128|-|v(i, j)-128|,
Figure BDA0000155952570000143
Figure BDA0000155952570000144
Indicates the corresponding variable y(i, j)-|u(i, j) for all the luminance components y(i, j) and their chrominance components u(i, j), v(i, j) belonging to the kth image )-128|-|v(i, j)-128| seeks the minimum value, |u(i, j)-128| means to seek the absolute value of u(i, j)-128, |v(i, j) -128| means to find the absolute value of v(i, j)-128;

其中将上述n个最小值yk,min,k=1,2,......,n降序排列,选择排列中第ceil(95%*n)位置的最小值作为Thresy,即Thresy=yceil(95%*n),minAmong them, the above n minimum values y k, min , k=1, 2, ..., n are arranged in descending order, and the minimum value at the ceil (95%*n) position in the arrangement is selected as Thres y , namely Thres y = y ceil(95%*n), min ;

将所述n个最大值uk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresu,即Thresu=uceil(95%*n),maxArrange the n maximum values u k, max , k=1, 2, . u = u ceil(95%*n), max ;

将所述n个最大值vk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresv,即Thresv=vceil(95%*n),maxArrange the n maximum values v k, max , k=1, 2, ..., n in ascending order, select the maximum value at the ceil(95%*n) position in the arrangement as Thres v , namely v = v ceil(95%*n), max ;

将所述n个最大值uvk,max,k=1,2,.....,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresuv,即Thresuv=uvceil(95%*n),maxArrange the n maximum values uv k, max , k=1, 2, ..., n in ascending order, and select the maximum value at the ceil (95%*n) position in the arrangement as Thres uv , namely Thres uv = uv ceil(95%*n), max ;

将所述n个最小值yuvk,min,k=1,2,......,n降序排列,选择排列中第ceil(95%*n)位置的最小值作为Thresyuv,即Thresyuv=yuvceil(95%*n),minArrange the n minimum values yuv k, min , k=1, 2, ..., n in descending order, and select the minimum value at the ceil (95%*n) position in the arrangement as Thres yuv , namely Thres yuv = yuv ceil(95%*n), min ;

其中上述符号ceil(x),表示对x作向上取整操作。The above-mentioned symbol ceil(x) indicates that x is rounded up.

实施例6、对应于实施例2,参见图8、在实施例3、4、5提供的YUV格式图像的色度信息处理装置基础上,本实施例同时包括了去除色彩噪声单元、第一偏色矫正单元、第一获取单元、第二获取单元、第三获取单元、第四获取单元、色度变换单元。Embodiment 6, corresponding to Embodiment 2, referring to FIG. 8 , on the basis of the chrominance information processing device for YUV format images provided in Embodiments 3, 4, and 5, this embodiment also includes a color noise removal unit, a first offset A color correction unit, a first acquisition unit, a second acquisition unit, a third acquisition unit, a fourth acquisition unit, and a chroma transformation unit.

以上各个单元在实施例3至实施例5中已经全部详细描述过,在此不再累述。Each of the above units has been described in detail in Embodiment 3 to Embodiment 5, and will not be repeated here.

综上所述,通过本发明提供的新的YUV格式图像的色度信息处理方法,第一减少了计算量,因为目前在视频压缩技术领域,视频源格式多为YUV格式图像,本发明是基于此模型上的色度处理方法,无论是去色彩噪声还是偏色判断,色彩增强都是基于此模型,相比较于基于其他色彩模型的方法,减少了模型转换上的计算量。In summary, through the chrominance information processing method of the new YUV format image provided by the present invention, the amount of calculation is first reduced, because at present in the field of video compression technology, the video source format is mostly YUV format image, and the present invention is based on The chromaticity processing method on this model, whether it is color noise removal or color cast judgment, color enhancement is based on this model. Compared with methods based on other color models, the amount of calculation on model conversion is reduced.

第二避免了现有技术中区域检测准确率的问题;①因为不采用区域检测法,这样就避免了区域检测误判带来的问题;②此外因为图像是由像素构成的,如果采用基于像素的区域检测法,就会有一些离散的点出现;③基于区域检测的色度增强法,就会出现区域边界色彩增强强度不同,带来的色彩变化跳变的问题,如果出现区域检测错误,就更明显。而本发明采用的是基于色彩的权重增强的法,可以随着色彩变化平衡过渡。同时也减少了区域检测带来的计算量。The second avoids the problem of area detection accuracy in the prior art; ① because the area detection method is not used, the problem caused by area detection misjudgment is avoided; ② in addition, because the image is composed of pixels, if the pixel-based In the region detection method, some discrete points will appear; ③The chromaticity enhancement method based on region detection will cause the color enhancement intensity of the region border to be different, resulting in the problem of color change jump. If there is a region detection error, It's even more obvious. But what the present invention adopts is the method based on the weight enhancement of color, can balance transition along with color change. At the same time, it also reduces the amount of calculation brought by the area detection.

本领域的普通技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序指令相关硬件来完成的,所述的程序可以存储于一计算机可读取存储介质中,所述的存储介质可以为ROM、RAM、磁盘、光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by program instructions and related hardware, and the program can be stored in a computer-readable storage medium. The storage medium can be ROM, RAM, magnetic disk, optical disk, etc.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.

Claims (26)

1.一种YUV格式图像的色度信息处理方法,其特征在于,所述的方法包括:1. a chromaticity information processing method of a YUV format image, is characterized in that, described method comprises: 获取第一当前图像帧的色度饱和度信息κ;Obtain the chroma-saturation information κ of the first current image frame; 根据所述的色度饱和度信息κ获取调节参数;Acquiring adjustment parameters according to the chroma-saturation information κ; 通过预先获取的所需增强色彩分布的经验区间[θ1,θ2],获取权重函数;Obtain the weight function through the pre-acquired empirical interval [θ 1 , θ 2 ] of the required enhanced color distribution; 通过所述的色度饱和度信息κ、调节参数、权重函数及预先构建的色度变换函数进行色度变换。The chroma transformation is performed through the chroma-saturation information κ, the adjustment parameter, the weight function and the pre-built chroma transformation function. 2.根据权利要求1所述的YUV格式图像的色度信息处理方法,其特征在于,所述的“预先获取的所需增强色彩分布的经验区间[θ1,θ2]”的获取方法为:2. The chromaticity information processing method of the YUV format image according to claim 1, is characterized in that, the acquisition method of described " the empirical interval [θ 1 , θ 2 ] of the desired enhanced color distribution acquired in advance" is : 获取P个(P>=25)YUV格式图像,所述P个图像为无噪声、无偏色、且有增强色彩的图像;Acquiring P (P>=25) YUV format images, the P images are noise-free, without color cast, and have enhanced color images; 获取所述P个YUV格式图像中,第m个图像中所需增强色彩,其所在区域中所有像素的角度 &theta; i , j = arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ; Obtain the angles of all pixels in the area where the enhanced color is required in the mth image among the P YUV format images &theta; i , j = arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ; 根据
Figure FDA0000155952560000012
获取所有θi,j的最小值,记为 &theta; 1 = min ( arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )
according to
Figure FDA0000155952560000012
Get the minimum value of all θ i, j , denoted as &theta; 1 = min ( arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )
根据
Figure FDA0000155952560000014
获取所有θi,j的最大值,记为 &theta; 2 = max ( arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )
according to
Figure FDA0000155952560000014
Obtain the maximum value of all θ i, j , denoted as &theta; 2 = max ( arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )
其中u(i,j):表示YUV格式的图像,色度u分量在i行j列的像素值;v(i,j):表示YUV格式的图像,色度v分量在i行j列的像素值;θi,j为第m个图像中所需增强色彩,其所在区域中当前像素的角度;i为当前像素的行标,j为当前像素的列标。Where u(i, j): represents an image in YUV format, the pixel value of the chroma u component in row i and column j; v(i, j): represents an image in YUV format, and the chroma v component is in row i and column j Pixel value; θi , j is the angle of the current pixel in the area where the color needs to be enhanced in the mth image; i is the row label of the current pixel, and j is the column label of the current pixel.
3.根据权利要求2所述的YUV格式图像的色度信息处理方法,其特征在于,所述的“获取第一当前图像帧的色度饱和度信息κ”具体为:3. the chroma information processing method of YUV format image according to claim 2, is characterized in that, described " obtaining the chroma saturation information κ of the first current image frame " is specifically: &kappa; = mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) 和vframe(i,j)∈frame) &kappa; = mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) and v frame (i, j) ∈ frame) frame为第一当前图像帧、κ为第一当前图像帧frame的色度饱和度信息、frame is the first current image frame, κ is the hue saturation information of the first current image frame, mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) 和vframe(i,)∈frame)为对所有属于第一当前图像帧frame的色度分量uframe(i,j)和vframe(i,j)其对应的变量
Figure FDA0000155952560000018
求均值;uframe(i,j)为第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j)为第一当前图像帧frame,色度v分量在i行j列的像素值。
mean ( ( u frame ( i , j ) - 128 ) 2 + ( v frame ( i , j ) - 128 ) 2 | u frame ( i , j ) and v frame (i,) ∈ frame) are the corresponding variables for all chrominance components u frame (i, j) and v frame (i, j) belonging to the first current image frame
Figure FDA0000155952560000018
Find the mean value; u frame (i, j) is the first current image frame frame, the pixel value of the chroma u component in i row j column; v frame (i, j) is the first current image frame frame, the chroma v component The pixel value at row i and column j.
4.根据权利要求3所述的YUV格式图像的色度信息处理方法,其特征在于,所述的“根据所述的色度饱和度信息κ获取调节参数”具体为:4. the chroma information processing method of YUV format image according to claim 3, is characterized in that, described " obtain adjustment parameter according to described chroma saturation information κ " be specifically: &beta;&beta; uu == 22 ** &gamma;&gamma; uu // &kappa;&kappa; &beta;&beta; vv == 22 ** &gamma;&gamma; vv // &kappa;&kappa; βu为色度分量u的调节参数、βv为色度分量v的调节参数、γu为色度分量u的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γu<80、γv为色度分量v的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γv<80;κ为第一当前图像帧的色度饱和度信息。β u is the adjustment parameter of the chroma component u, β v is the adjustment parameter of the chroma component v, and γ u is the target chroma saturation constant of the chroma component u, which is determined by the user according to actual needs. Considering that the color is too strong, Human eyes will feel uncomfortable, generally γ u < 80, γ v is the target chroma saturation constant of chroma component v, which is determined by the user according to actual needs. Considering that the color is too strong, human eyes will feel uncomfortable, Generally, γ v <80; κ is the chroma saturation information of the first current image frame. 5.根据权利要求4所述的YUV格式图像的色度信息处理方法,其特征在于,所述的“获取权重函数”具体为:5. the chroma information processing method of YUV format image according to claim 4, is characterized in that, described " obtaining weight function " is specifically: 设置函数η(θ);set function η(θ); 判断η(θ)是否为连续函数、η(θ)只有一个最大值点、且η(θ)的最大值点位于(θ12)/2;Determine whether η(θ) is a continuous function, η(θ) has only one maximum point, and the maximum point of η(θ) is located at (θ 12 )/2; 若是则η(θ)为权重函数w;If so, η(θ) is the weight function w; 其中[θ1,θ2]为所需增强色彩的经验区间。Wherein [θ 1 , θ 2 ] is the empirical interval of the required enhanced color. 6.根据权利要求5所述的YUV格式图像的色度信息处理方法,其特征在于,所述的预先构建的色度变函数为:6. the chromaticity information processing method of YUV format image according to claim 5, is characterized in that, described pre-built chromaticity variable function is: u3(i,j)=clip(w*((uframe(i,j)-128)*βu+128),0,255),v3(i,j)=c1ip(w*((vframe(i,j)-128)*βv+128),0,255);u3(i,j)=clip(w*((u frame (i,j)-128)*β u +128),0,255), v3(i,j)=c1ip(w*((v frame (i ,j)-128)* βv +128),0,255); 其中w为所述的权重函数、βu为色度分量u的调节参数、βv为色度分量v的调节参数;Wherein w is the weight function described, β u is the adjustment parameter of chroma component u, and β v is the adjustment parameter of chroma component v; 其中uframe(i,j)为第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j)为第一当前图像帧frame,色度v分量在i行j列的像素值;u3(i,j)、v3(i,j)分别为将uframe(i,j)、vframe(i,j)通过色彩增强以后的像素值, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 . Wherein u frame (i, j) is the first current image frame frame, and the chroma u component is at the pixel value of i row j column; v frame (i, j) is the first current image frame frame, and the chroma v component is at i The pixel value of row j and column; u3(i, j), v3(i, j) are respectively the pixel values after u frame (i, j) and v frame (i, j) are enhanced by color, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 . 7.根据权利要求6其中之一所述的YUV格式图像的色度信息处理方法,其特征在于,在“通过当前YUV格式图像的的色度信息,获取第一当前图像帧图像帧的色度饱和度信息κ”前进一步包括:7. The chromaticity information processing method of one of the YUV format images according to claim 6, characterized in that, in "by the chromaticity information of the current YUV format image, obtain the chromaticity of the first current image frame image frame Saturation information κ" further includes: 去除第一图像帧(即原始图像)的色彩噪声,得到第二图像帧。The color noise of the first image frame (that is, the original image) is removed to obtain the second image frame. 8.根据权利要求6或7所述的YUV格式图像的色度信息处理方法,其特征在于,所述的“去除第一图像帧(即原始图像)的色彩噪声,得到第二图像帧”之后进一步包括:8. The chroma information processing method of the YUV format image according to claim 6 or 7, is characterized in that, after the described "remove the color noise of the first image frame (ie original image), obtain the second image frame" Further includes: 对第二图像帧,进行偏色矫正,得到第三图像帧。Perform color cast correction on the second image frame to obtain a third image frame. 9.根据权利要求7所述的YUV格式图像的色度信息处理方法,其特征在于,所述的“去除第一图像帧的色彩噪声”具体为:9. The chromaticity information processing method of YUV format image according to claim 7, is characterized in that, described " remove the color noise of the first image frame " be specifically: 利用低通滤波器去除色彩噪声u1(i,j)=filter(u0(i,j)),v1(i,j)=filter(v0(i,j))Use low-pass filter to remove color noise u1(i, j)=filter(u0(i, j)), v1(i, j)=filter(v0(i, j)) 其中:u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波器变换后的色度值,filter(x)可为图像去噪中常用的低通滤波器,如中值、均值滤波器等;Among them: u1(i, j), v1(i, j) are the chroma values transformed by u0(i, j), v0(i, j) respectively through the low-pass filter, and filter(x) can be the image Low-pass filters commonly used in denoising, such as median and mean filters; u0(i,j):表示第一图像帧(原始图像),色度u分量在i行j列的像素值;u0(i, j): represents the first image frame (original image), the pixel value of the chroma u component in row i and column j; v0(i,j):表示第一图像帧(原始图像),色度v分量在i行j列的像素值;v0(i, j): represents the first image frame (original image), the pixel value of the chroma v component in row i and column j; u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波后的像素值;filter(x)可为图像去噪中常用的低通滤波器。u1(i, j), v1(i, j) are the pixel values after u0(i, j), v0(i, j) are low-pass filtered, respectively; filter(x) can be commonly used in image denoising low pass filter. 10.根据权利要求8所述的YUV格式图像的色度信息处理方法,其特征在于,所述的“对第二图像帧,进行偏色矫正,得到第三图像帧”具体为:10. The chromaticity information processing method of YUV format image according to claim 8, is characterized in that, described " carries out color cast correction to the second image frame, obtains the 3rd image frame " specifically is: 获取所述第二图像帧的偏色矫正统计区域;Acquiring the color cast correction statistical area of the second image frame; 根据所述的偏色矫正统计区域获取色度偏差矫正参数;Acquiring chromaticity deviation correction parameters according to the color cast correction statistics area; 根据所述的色度偏差矫正参数进行偏色矫正。Color cast correction is performed according to the chromaticity deviation correction parameters. 11.根据权利要求10所述的YUV格式图像的色度信息处理方法,特征在于,所述的“获取所述第二图像帧的偏色矫正统计区域”具体为:11. The chromaticity information processing method of YUV format image according to claim 10, it is characterized in that, described " obtain the color cast correction statistics area of described second image frame " be specifically: 在所述的第二图像帧中筛选偏色统计像素点;Screening color cast statistical pixels in the second image frame; 获取所述的偏色统计像素点的U分量的集合、V分量的集合;所有偏色统计像素点的u分量的集合就是偏色校正统计区域
Figure FDA0000155952560000031
所有偏色统计像素点的v分量的集合就是偏色校正统计区域
Figure FDA0000155952560000032
Obtain the set of U components and the set of V components of the color cast statistical pixels; the set of u components of all color cast statistical pixels is the color cast correction statistical area
Figure FDA0000155952560000031
The set of v components of all color cast statistical pixels is the color cast correction statistical area
Figure FDA0000155952560000032
12.根据权利要求11所述的YUV格式图像的色度信息处理方法,特征在于,所述的“在所述的第二图像帧中筛选偏色统计像素点”具体为:12. The chromaticity information processing method of YUV format image according to claim 11, it is characterized in that, described " screening color cast statistics pixel point in described second image frame " is specifically: 判断第二图像帧的像素点是否同时满足筛选条件;若满足则为偏色统计像素点;Judging whether the pixels of the second image frame meet the screening conditions at the same time; if so, it is a statistical pixel of color cast; 其中所述筛选条件为:Wherein the filter conditions are: y(i,j)>Thresy|uframe2(i,j)-128|<Thresu y(i,j)>Thres y |u frame2 (i,j)-128|<Thres u |vframe2(i,j)-128|<Thresv |v frame2 (i, j)-128|<Thres v |(uframe2(i,j)-128)+(vframe2(i,j)-128)|<Thresuv |(u frame2 (i, j)-128)+(v frame2 (i, j)-128)|<Thres uv y(i,j)-|uframe2(i,j)-128|-|vframe2(i,j)-128|>Thresyuv y(i, j)-|u frame2 (i, j)-128|-|v frame2 (i, j)-128|>Thres yuv 其中,Thresj,j=y,u,v,uv,yuv分别为相应的统计门限;Among them, Thres j , j=y, u, v, uv, yuv are the corresponding statistical thresholds; y(i,j):表示第二图像帧,亮度y分量在i行j列的像素值;uframe2(i,j)、为第二图像帧,色度u分量在i行j列的像素值;vframe2(i,j)为第二图像帧,色度v分量在i行j列的像素值,y(i, j): represents the second image frame, the pixel value of the luminance y component in row i and column j; u frame2 (i, j), is the second image frame, the pixel value of chrominance u component in row i and column j Value; v frame2 (i, j) is the second image frame, the pixel value of the chroma v component in row i and column j, Thresy表示偏色统计像素点亮度分量y的统计门限;Thres y represents the statistical threshold of the color cast statistical pixel brightness component y; Thresu表示偏色统计像素点色度分量u的统计门限;Thres u represents the statistical threshold of color cast statistical pixel chroma component u; Thresv表示偏色统计像素点色度分量v的统计门限;Thres v represents the statistical threshold of color cast statistical pixel chroma component v; Thresuv表示偏色统计像素点色度分量u和色度分量v的统计门限;Thres uv represents the statistical threshold of color cast statistical pixel chroma component u and chroma component v; Thresyuv表示偏色统计像素点亮度分量y和色度分量u、色度分量v的统计门限。Thres yuv represents the statistical threshold of the luminance component y, the chrominance component u, and the chrominance component v of the color cast statistical pixel point. 13.根据权利要求12所述的YUV格式图像的色度信息处理方法,特征在于,所述的“Thresy表示偏色统计像素点亮度分量y的统计门限;Thresu表示偏色统计像素点色度分量u的统计门限;Thresv表示偏色统计像素点色度分量v的统计门限;Thresuv表示偏色统计像素点色度分量u和色度分量v的统计门限;Thresyuv表示偏色统计像素点亮度分量y和色度分量u、色度分量v的统计门限”获取方法具体为:13. The chromaticity information processing method of YUV format image according to claim 12 is characterized in that, described " Thres y represents the statistical threshold of color cast statistics pixel point luminance component y; Thres u represents color cast statistics pixel point color Statistical threshold of degree component u; Thres v represents the statistical threshold of color cast statistical pixel chroma component v; Thres uv represents statistical threshold of color cast statistical pixel chroma component u and chrominance component v; Thres yuv represents color cast statistics The statistical threshold of the pixel luminance component y, chrominance component u, and chrominance component v” is obtained specifically as follows: 获取第一数量n(n>=25)有偏色且没有色彩噪声的图像;Acquiring a first number n (n>=25) of images with color cast and no color noise; 计算上述图像中第k个图像中所有像素其亮度分量y(i,j)的最小值;Calculate the minimum value of the luminance component y(i, j) of all pixels in the kth image in the above image; 所述最小值记为yk,min;k=1,2,......,n,yk,min为第k个图像中所有像素其亮度分量y(i,j)的最小值,
Figure FDA0000155952560000041
表示对属于第k个图像所有像素其亮度分量y(i,j)求最小值;
The minimum value is recorded as y k, min ; k=1, 2, ..., n, y k, min is the minimum value of its luminance component y(i, j) of all pixels in the kth image ,
Figure FDA0000155952560000041
Represents the minimum value of the brightness component y(i, j) of all pixels belonging to the kth image;
计算上述图像中第k个图像中所有像素其色度分量u(i,j)对应变量|u(i,j)-128|的最大值;Calculate the maximum value of the variable |u(i, j)-128| corresponding to the chroma component u(i, j) of all pixels in the kth image in the above image; 所述最大值记为uk,max;k=1,2,......,n,uk,max为第k个图像中所有像素其色度分量u(i,j)对应变量|u(i,j)-128|的最大值,
Figure FDA0000155952560000043
Figure FDA0000155952560000044
表示对属于第k个图像所有像素其色度分量u(i,j)对应变量|u(i,j)-128|求最大值,|u(i,j)-128|表示对u(i,j)-128求绝对值,
The maximum value is recorded as u k, max ; k=1, 2, ..., n, u k, max is the corresponding variable of the chrominance component u(i, j) of all pixels in the kth image the maximum value of |u(i,j)-128|,
Figure FDA0000155952560000043
Figure FDA0000155952560000044
Represents the maximum value of the chrominance component u(i, j) corresponding variable |u(i, j)-128| for all pixels belonging to the k-th image, and |u(i, j)-128| represents the value of u(i , j)-128 to find the absolute value,
计算上述图像中第k个图像中所有像素其色度分量v(i,j)对应变量|v(i,j)-128|的最大值;Calculate the maximum value of the variable |v(i, j)-128| corresponding to the chrominance component v(i, j) of all pixels in the kth image in the above image; 所述最大值记为vk,max;k=1,2,......,n,vk,max为第k个图像中所有像素其色度分量v(i,j)对应变量|v(i,j)-128|的最大值,
Figure FDA0000155952560000045
表示对属于第k个图像所有像素其色度分量v(i,j)对应变量|v(i,j)-128|求最大值,|v(i,j)-128|表示对v(i,j)-128求绝对值;
The maximum value is recorded as v k, max ; k=1, 2, ..., n, v k, max is the corresponding variable of the chroma component v (i, j) of all pixels in the k image the maximum value of |v(i,j)-128|,
Figure FDA0000155952560000045
Represents the maximum value of the chrominance component v(i, j) corresponding variable |v(i, j)-128| for all pixels belonging to the kth image, and |v(i, j)-128| represents the value of v(i , j)-128 seeks the absolute value;
计算第k个图像中所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|的最大值;Calculate the corresponding variables of the chrominance components u(i,j) and v(i,j) of all pixels in the kth image |(u(i,j)-128)+(v(i,j)-128)| the maximum value; 所述最大值记为uvk,max;k=1,2,......,n,uvk,max为第k个图像中所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)|的最大值,
Figure FDA0000155952560000047
Figure FDA0000155952560000051
表示对属于第k个图像所有像素其色度分量u(i,j)、v(i,j)对应变量|(u(i,j)-128)+(v(i,j)-128)求最大值,|(u(i,j)-128)+(v(i,j)-128)|表示对(u(i,j)-128)+(v(i,j)-128)求绝对值;
The maximum value is denoted as uv k, max ; k=1, 2, ..., n, uv k, max is the chrominance components u(i, j), v of all pixels in the kth image (i, j) corresponds to the maximum value of the variable |(u(i, j)-128)+(v(i, j)-128)|,
Figure FDA0000155952560000047
Figure FDA0000155952560000051
Represents the corresponding variables of the chrominance components u(i, j) and v(i, j) for all pixels belonging to the kth image|(u(i, j)-128)+(v(i, j)-128) Find the maximum value, |(u(i, j)-128)+(v(i, j)-128)| means (u(i, j)-128)+(v(i, j)-128) Find the absolute value;
计算第k个图像中所有像素其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|的最小值;Calculate the luminance component y(i,j) and its chrominance component u(i,j), v(i,j) of all pixels in the kth image corresponding to the variable y(i,j)-|u(i,j) The minimum value of -128|-|v(i,j)-128|; 所述最小值记为yuvk,min;k=1,2,......,n,yuvk,min为第k个图像中所有像素其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128|的最小值,
Figure FDA0000155952560000052
Figure FDA0000155952560000053
表示对属于第k个图像所有其亮度分量y(i,j)及其色度分量u(i,j)、v(i,j)对应变量y(i,j)-|u(i,j)-128|-|v(i,j)-128求最小值,|u(i,j)-128|表示对u(i,j)-128求绝对值,|v(i,j)-128|表示对v(i,j)-128求绝对值;
The minimum value is denoted as yuv k, min ; k=1, 2, ..., n, yuv k, min is the luminance component y (i, j) and its color of all pixels in the kth image The minimum value of the degree component u(i, j) and v(i, j) corresponding to the variable y(i, j)-|u(i, j)-128|-|v(i, j)-128|,
Figure FDA0000155952560000052
Figure FDA0000155952560000053
Indicates the corresponding variable y(i, j)-|u(i, j) for all the luminance components y(i, j) and their chrominance components u(i, j), v(i, j) belonging to the kth image )-128|-|v(i, j)-128 to find the minimum value, |u(i, j)-128| means to find the absolute value of u(i, j)-128, |v(i, j)- 128| means to find the absolute value of v(i, j)-128;
其中将上述n个最小值yk,min,k=1,2,......,n降序排列,选择排列中第ceil(95%*n)位置的最小值作为Thresy,即Thresy=yceil(95%*n),minAmong them, the above n minimum values y k, min , k=1, 2, ..., n are arranged in descending order, and the minimum value at the ceil (95%*n) position in the arrangement is selected as Thres y , namely Thres y = y ceil(95%*n), min ; 将所述n个最大值uk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresu,即Thresu=uceil(95%*n),maxArrange the n maximum values u k, max , k=1, 2, . u = u ceil(95%*n), max ; 将所述n个最大值vk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresv,即Thresv=vceil(95%*n),maxArrange the n maximum values v k, max , k=1, 2, ..., n in ascending order, select the maximum value at the ceil(95%*n) position in the arrangement as Thres v , namely v = v ceil(95%*n), max ; 将所述n个最大值uvk,max,k=1,2,......,n升序排列,选择排列中第ceil(95%*n)位置的最大值作为Thresuv,即Thresuv=uvceil(95%*n),maxArrange the n maximum values uv k, max , k=1, 2, ..., n in ascending order, and select the maximum value at the ceil(95%*n) position in the arrangement as Thres uv , namely Thres uv = uv ceil(95%*n), max ; 将所述n个最小值yuvk,min,k=1,2,......,n降序排列,选择排列中第ceil(95%*n)位置的最小值作为Thresyuv,即Thresyuv=yuvceil(95%*n),minArrange the n minimum values yuv k, min , k=1, 2, ..., n in descending order, and select the minimum value at the ceil (95%*n) position in the arrangement as Thres yuv , namely Thres yuv = yuv ceil(95%*n), min ; 其中上述符号ceil(x),表示对x作向上取整操作。The above-mentioned symbol ceil(x) indicates that x is rounded up.
14.根据权利要求13所述的YUV格式图像的色度信息处理方法,特征在于,所述的“根据所述的偏色矫正统计区域获取色度偏差矫正参数”具体为:14. The chromaticity information processing method of YUV format image according to claim 13, is characterized in that, described " obtains chromaticity deviation correction parameter according to described color cast correction statistics area " is specifically:
Figure FDA0000155952560000054
Figure FDA0000155952560000054
Figure FDA0000155952560000055
Figure FDA0000155952560000055
αu为色度分量u(i,j)对应的偏色校正参数α u is the color cast correction parameter corresponding to the chroma component u(i, j) αv为色度分量v(i,j)对应的偏色校正参数α v is the color cast correction parameter corresponding to the chroma component v(i, j)
Figure FDA0000155952560000056
为对属于校正统计区域
Figure FDA0000155952560000057
的所有uframe2(i,j)求均值
Figure FDA0000155952560000056
For the pair belonging to the corrected statistical area
Figure FDA0000155952560000057
All u frame2 (i, j) mean
Figure FDA0000155952560000058
为对属于校正统计区域
Figure FDA0000155952560000059
的所有vframe2(i,j)求均值;所有偏色统计像素点的u分量的集合就是偏色校正统计区域
Figure FDA00001559525600000510
所有偏色统计像素点的v分量的集合就是偏色校正统计区域
Figure FDA0000155952560000061
Figure FDA0000155952560000058
For the pair belonging to the corrected statistical area
Figure FDA0000155952560000059
All v frame2 (i, j) of all v frame2 (i, j) are averaged; the set of u components of all color cast statistical pixels is the color cast correction statistical area
Figure FDA00001559525600000510
The set of v components of all color cast statistical pixels is the color cast correction statistical area
Figure FDA0000155952560000061
15.一种YUV格式图像的色度信息处理装置,其特征在于,所述装置包括:第一获取单元、第二获取单元、第三获取单元、第四获取单元、色度变换单元;15. A device for processing chroma information of an image in YUV format, characterized in that the device comprises: a first acquisition unit, a second acquisition unit, a third acquisition unit, a fourth acquisition unit, and a chroma conversion unit; 第一获取单元,用于预先获取所需增强色彩的经验区间[θ1,θ2];The first acquisition unit is used to pre-acquire the empirical interval [θ 1 , θ 2 ] of the color to be enhanced; 第二获取单元,用于获取第一当前图像帧的色度饱和度信息κ;A second acquiring unit, configured to acquire the hue-saturation information κ of the first current image frame; 第三获取单元,用于根据所述的色度饱和度信息κ获取调节参数;A third acquisition unit, configured to acquire adjustment parameters according to the chroma-saturation information κ; 第四获取单元,用于获取权重函数;The fourth obtaining unit is used to obtain the weight function; 色度变换单元,用于通过所述的色度饱和度信息κ、调节参数、权重函数及预先构建的色度变换函数进行色度变换。The chroma conversion unit is configured to perform chroma conversion through the chroma-saturation information κ, adjustment parameters, weight functions and pre-built chroma conversion functions. 16.根据权利要求15所述的YUV格式图像的色度信息处理装置,其特征在于,所述的第一获取单元包括:第一图像获取单元、增强色彩获取单元、经验区间获取单元;16. The chromaticity information processing device of YUV format image according to claim 15, characterized in that, the first acquisition unit comprises: a first image acquisition unit, an enhanced color acquisition unit, and an experience interval acquisition unit; 第一图像获取单元,用于获取P个(P>=25)YUV格式图像,所述P个图像为无噪声、无偏色、且有增强色彩的图像;The first image acquisition unit is used to acquire P (P>=25) YUV format images, and the P images are images without noise, without color cast, and with enhanced colors; 增强色彩获取单元,用于获取第m(m=1,2,…,P)个图像中所需增强色彩,其所在区域中所有像素的角度 Enhanced color acquisition unit, used to acquire the required enhanced color in the mth (m=1, 2, ..., P) image, and the angles of all pixels in the area where it is located 经验区间获取单元,用于根据
Figure FDA0000155952560000063
获取所有θi,j的最小值,记为 &theta; 1 = min ( arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )
The empirical interval acquisition unit is used for
Figure FDA0000155952560000063
Get the minimum value of all θ i, j , denoted as &theta; 1 = min ( arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) )
根据
Figure FDA0000155952560000065
获取所有θi,j的最大值,记为 &theta; 2 = max ( arac tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ) ;
according to
Figure FDA0000155952560000065
Obtain the maximum value of all θ i, j , denoted as &theta; 2 = max ( arac the tan ( v ( i , j ) - 128 u ( i , j ) - 128 ) ) ;
其中u(i,j):表示YUV格式的图像,色度u分量在i行j列的像素值;v(i,j):表示YUV格式的图像,色度v分量在i行j列的像素值;θi,j为第m个图像中所需增强色彩,其所在区域中当前像素的角度;i为当前像素的行标,j为当前像素的列标。Where u(i, j): represents an image in YUV format, the pixel value of the chroma u component in row i and column j; v(i, j): represents an image in YUV format, and the chroma v component is in row i and column j Pixel value; θi , j is the angle of the current pixel in the area where the color needs to be enhanced in the mth image; i is the row label of the current pixel, and j is the column label of the current pixel.
17.根据权利要求16所述的YUV格式图像的色度信息处理装置,其特征在于,所述的第二获取单元用于获取第一当前图像帧frame的色度饱和度信息κ具体为:和vframe(i,j)∈frame)17. The chroma information processing device of YUV format image according to claim 16, characterized in that, the second acquisition unit is used to acquire the chroma saturation information κ of the first current image frame frame is specifically: and v frame (i, j) ∈ frame) frame为第一当前图像帧、κ为第一当前图像帧frame的色度饱和度信息、frame is the first current image frame, κ is the hue saturation information of the first current image frame,
Figure FDA0000155952560000068
和vframe(i,j)∈frame)为对所有属于第一当前图像帧frame的色度分量uframe(i,j)和vframe(i,j)其对应的变量求均值;uframe(i,j)为第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j)为第一当前图像帧frame,色度v分量在i行j列的像素值。
Figure FDA0000155952560000068
and v frame (i, j) ∈ frame) are the corresponding variables for all chrominance components u frame (i, j) and v frame (i, j) belonging to the first current image frame Find the mean value; u frame (i, j) is the first current image frame frame, the pixel value of the chroma u component in i row j column; v frame (i, j) is the first current image frame frame, the chroma v component The pixel value at row i and column j.
18.根据权利要求17所述的YUV格式图像的色度信息处理装置,其特征在于,所述的第三获取单元包括第一参数获取单元、第二参数获取单元;18. The chrominance information processing device of YUV format image according to claim 17, characterized in that, the third acquisition unit comprises a first parameter acquisition unit and a second parameter acquisition unit; 第一参数获取单元,用于
Figure FDA0000155952560000071
The first parameter acquisition unit is used for
Figure FDA0000155952560000071
第二参数获取单元,用于
Figure FDA0000155952560000072
The second parameter gets the unit for
Figure FDA0000155952560000072
βu为色度分量u的调节参数、βv为色度分量v的调节参数、γu为色度分量u的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γu<80、γv为色度分量v的目标色度饱和度常数,由用户根据实际需求确定,考虑到色彩过于浓烈,人眼会产生不舒适感,一般γv<80;κ为第一当前图像帧的色度饱和度信息。β u is the adjustment parameter of the chroma component u, β v is the adjustment parameter of the chroma component v, and γ u is the target chroma saturation constant of the chroma component u, which is determined by the user according to actual needs. Considering that the color is too strong, Human eyes will feel uncomfortable, generally γ u < 80, γ v is the target chroma saturation constant of chroma component v, which is determined by the user according to actual needs. Considering that the color is too strong, human eyes will feel uncomfortable, Generally, γ v <80; κ is the chroma saturation information of the first current image frame.
19.根据权利要求18所述的YUV格式图像的色度信息处理装置,其特征在于,所述的第四获取单元包括:设置单元,判断单元;确定单元;19. The chromaticity information processing device of YUV format image according to claim 18, is characterized in that, described fourth acquisition unit comprises: setting unit, judging unit; Determining unit; 设置单元,用于设置函数η(θ);Setting unit for setting function η(θ); 判断单元,用于判断η(θ)是否为连续函数、且η(θ)只有一个最大值点、且η(θ)的最大值点位于(θ12)/2;若是则通知确定单元η(θ)为权重函数w;否则,重新进入设置单元;Judgment unit, used to judge whether η(θ) is a continuous function, and η(θ) has only one maximum point, and the maximum point of η(θ) is located at (θ 12 )/2; if so, notify and confirm Unit η(θ) is the weight function w; otherwise, re-enter the setup unit; 确定单元,根据判断单元的结果,确定η(θ)为权重函数w。The determining unit determines η(θ) as the weight function w according to the result of the judging unit. 20.根据权利要求19所述的YUV格式图像的色度信息处理装置,其特征在于,所述的色度变换单元中所述的“预先构建的色度变换函数”具体为:20. The chromaticity information processing device of YUV format image according to claim 19, is characterized in that, described in described chromaticity transformation unit " pre-built chromaticity transformation function " is specifically: u3(i,j)=clip(w*((uframe(i,j)-128)*βu+128),0,255),u3(i,j)=clip(w*((u frame (i,j)-128)*β u +128),0,255), v3(i,j)=clip(w*((vframe(i,j)-128)*βv+128),0,255);v3(i,j)=clip(w*((v frame (i,j)-128)*β v +128),0,255); 其中w为所述的权重函数、βu为色度分量u的调节参数、βv为色度分量v的调节参数;Wherein w is the weight function described, β u is the adjustment parameter of chroma component u, and β v is the adjustment parameter of chroma component v; 其中uframe(i,j):第一当前图像帧frame,色度u分量在i行j列的像素值;vframe(i,j):第一当前图像帧frame,色度v分量在i行j列的像素值;u3(i,j)、v3(i,j)分别为将uframe(i,j)、vframe(i,j)通过色彩增强以后的像素值, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 . Among them, u frame (i, j): the first current image frame frame, the pixel value of the chroma u component in row i and column j; v frame (i, j): the first current image frame frame, the chroma v component in i The pixel value of row j and column; u3(i, j), v3(i, j) are respectively the pixel values after u frame (i, j) and v frame (i, j) are enhanced by color, clip ( x , 0,255 ) = 0 , x < 0 x , 0 &le; x &le; 255 255 , x > 255 . 21.根据权利要求20所述的YUV格式图像的色度信息处理装置,其特征在于,所述的装置进一步包括去除色彩噪声单元;21. The chrominance information processing device of YUV format image according to claim 20, is characterized in that, described device further comprises the color noise removal unit; 去除色彩噪声单元,用于去除第一图像帧的色彩条噪声,得到第二图像帧。The color noise removal unit is used to remove the color stripe noise of the first image frame to obtain the second image frame. 22.根据权利要求20或21所述的YUV格式图像的色度信息处理装置,其特征在于,所述的装置进一步包括第一偏色矫正单元;22. The chrominance information processing device of YUV format image according to claim 20 or 21, characterized in that, the device further comprises a first color cast correction unit; 第一偏色矫正单元;用于将所述第二图像帧进行偏色矫正,得到第三图像帧。A first color cast correction unit; configured to perform color cast correction on the second image frame to obtain a third image frame. 23.根据权利要求21所述的YUV格式图像的色度信息处理装置,其特征在于,所述的去除色彩噪声单元,包括:第一去除单元,、第二去除单元;23. The chrominance information processing device of YUV format image according to claim 21, characterized in that, said color noise removal unit comprises: a first removal unit, a second removal unit; 第一去除单元,用于利用低通滤波器去除色彩条噪声u1(i,j)=filter(u0(i,j));The first removal unit is used to remove the color bar noise u1(i, j)=filter(u0(i, j)) using a low-pass filter; 第二去除单元,用于利用低通滤波器去除色彩条噪声v1(i,j)=filter(v0(i,j))The second removal unit is used to remove color bar noise v1(i, j)=filter(v0(i, j)) using a low-pass filter 其中:u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波器变换后的色度值,filter(x)可为图像去噪中常用的低通滤波器,如中值、均值滤波器等;Among them: u1(i, j), v1(i, j) are the chroma values transformed by u0(i, j), v0(i, j) respectively through the low-pass filter, and filter(x) can be the image Low-pass filters commonly used in denoising, such as median and mean filters; u0(i,j):表示第一图像帧(原始图像),色度u分量在i行j列的像素值;u0(i, j): represents the first image frame (original image), the pixel value of the chroma u component in row i and column j; v0(i,j):表示第一图像帧(原始图像),色度v分量在i行j列的像素值;v0(i, j): represents the first image frame (original image), the pixel value of the chroma v component in row i and column j; u1(i,j)、v1(i,j)分别为将u0(i,j)、v0(i,j)通过低通滤波后的像素值,filter(x)可为图像去噪中常用的低通滤波器。u1(i, j), v1(i, j) are the pixel values after u0(i, j), v0(i, j) are low-pass filtered respectively, filter(x) can be commonly used in image denoising low pass filter. 24.根据权利要求22所述的YUV格式图像的色度信息处理装置,其特征在于,所述的第一偏色矫正单元包括:第一统计区域获取单元、矫正参数获取单元、第二偏色矫正单元;24. The chromaticity information processing device of YUV format image according to claim 22, characterized in that, the first color cast correction unit comprises: a first statistical area acquisition unit, a correction parameter acquisition unit, a second color cast correction unit; 第一统计区域获取单元,用于获取所述第二图像帧的偏色矫正统计区域;A first statistical area acquisition unit, configured to acquire the color cast correction statistical area of the second image frame; 矫正参数获取单元,用于根据所述的偏色矫正统计区域获取色度偏差矫正参数;A correction parameter acquisition unit, configured to acquire chromaticity deviation correction parameters according to the color cast correction statistical area; 第二偏色矫正单元,用于根据所述的色度偏差矫正参数进行偏色矫正。The second color cast correction unit is configured to correct the color cast according to the chromaticity deviation correction parameters. 25.根据权利要求24所述的YUV格式图像的色度信息处理装置,其特征在于,第一统计区域获取单元包括:统计像素点单元、第二统计区域获取单元;25. The chromaticity information processing device of YUV format image according to claim 24, is characterized in that, the first statistical area acquisition unit comprises: statistical pixel point unit, the second statistical area acquisition unit; 统计像素点单元,用于在所述的第二图像帧中筛选偏色统计像素点;A statistical pixel point unit, configured to screen color cast statistical pixels in the second image frame; 第二统计区域获取单元,用于获取所述的偏色统计像素点的U分量的集合、V分量的集合;所有偏色统计像素点的u分量的集合就是偏色校正统计区域
Figure FDA0000155952560000081
所有偏色统计像素点的v分量的集合就是偏色校正统计区域
Figure FDA0000155952560000082
The second statistical area acquisition unit is used to obtain the set of U components and the set of V components of the color cast statistical pixels; the set of u components of all color cast statistical pixels is the color cast correction statistical area
Figure FDA0000155952560000081
The set of v components of all color cast statistical pixels is the color cast correction statistical area
Figure FDA0000155952560000082
26.根据权利要求25所述的YUV格式图像的色度信息处理装置,其特征在于,所述的统计像素点单元包括:判断单元、统计门限获取单元;26. The chromaticity information processing device of YUV format image according to claim 25, is characterized in that, described statistical pixel point unit comprises: judging unit, statistical threshold acquisition unit; 判断单元,用于判断第二图像帧的像素点是否同时满足筛选条件;若满足则为偏色统计像素点;A judging unit, configured to judge whether the pixels of the second image frame meet the screening conditions at the same time; if so, it is a color cast statistical pixel; 其中所述筛选条件为:Wherein the filter conditions are: y(i,j)>Thresy|uframe2(i,j)-128|<Thresu y(i,j)>Thres y |u frame2 (i,j)-128|<Thres u |vframe2(i,j)-128|<Thresv |v frame2 (i, j)-128|<Thres v |(uframe2(i,j)-128)+(vframe2(i,j)-128)|<Thresuv |(u frame2 (i, j)-128)+(v frame2 (i, j)-128)|<Thres uv y(i,j)-|uframe2(i,j)-128|-|vframe2(i,j)-128|>Thresyuv y(i, j)-|u frame2 (i, j)-128|-|v frame2 (i, j)-128|>Thres yuv
CN 201210119524 2012-04-23 2012-04-23 Chrominance information processing method, device and system of images in YUV format Pending CN103379346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201210119524 CN103379346A (en) 2012-04-23 2012-04-23 Chrominance information processing method, device and system of images in YUV format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201210119524 CN103379346A (en) 2012-04-23 2012-04-23 Chrominance information processing method, device and system of images in YUV format

Publications (1)

Publication Number Publication Date
CN103379346A true CN103379346A (en) 2013-10-30

Family

ID=49463832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201210119524 Pending CN103379346A (en) 2012-04-23 2012-04-23 Chrominance information processing method, device and system of images in YUV format

Country Status (1)

Country Link
CN (1) CN103379346A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225203A (en) * 2014-06-23 2016-01-06 展讯通信(上海)有限公司 Noise suppressing method and device
CN107211130A (en) * 2015-01-30 2017-09-26 汤姆逊许可公司 The method and apparatus coded and decoded to colour picture
CN107393504A (en) * 2017-09-11 2017-11-24 青岛海信电器股份有限公司 Picture adjustment methods and device based on RGBW panels
CN111147924A (en) * 2019-12-24 2020-05-12 书行科技(北京)有限公司 Video enhancement processing method and system
CN113379608A (en) * 2020-03-10 2021-09-10 Tcl科技集团股份有限公司 Image processing method, storage medium and terminal equipment
CN113891054A (en) * 2016-12-30 2022-01-04 德州仪器公司 Efficient and flexible color processor
CN114511459A (en) * 2022-01-18 2022-05-17 中国科学院合肥物质科学研究院 Color image contrast information calculation method and device
US12322073B2 (en) 2020-03-10 2025-06-03 Tcl Technology Group Corporation Image processing model generation method, processing method, storage medium, and terminal

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225203A (en) * 2014-06-23 2016-01-06 展讯通信(上海)有限公司 Noise suppressing method and device
CN105225203B (en) * 2014-06-23 2018-01-26 展讯通信(上海)有限公司 Noise suppressing method and device
CN107211130A (en) * 2015-01-30 2017-09-26 汤姆逊许可公司 The method and apparatus coded and decoded to colour picture
CN107211130B (en) * 2015-01-30 2020-07-24 交互数字Vc控股公司 Method and apparatus for encoding and decoding color pictures
CN113891054A (en) * 2016-12-30 2022-01-04 德州仪器公司 Efficient and flexible color processor
CN107393504A (en) * 2017-09-11 2017-11-24 青岛海信电器股份有限公司 Picture adjustment methods and device based on RGBW panels
CN107393504B (en) * 2017-09-11 2020-02-14 青岛海信电器股份有限公司 RGBW panel-based image adjusting method and device
CN111147924A (en) * 2019-12-24 2020-05-12 书行科技(北京)有限公司 Video enhancement processing method and system
CN113379608A (en) * 2020-03-10 2021-09-10 Tcl科技集团股份有限公司 Image processing method, storage medium and terminal equipment
CN113379608B (en) * 2020-03-10 2024-12-13 Tcl科技集团股份有限公司 Image processing method, storage medium and terminal device
US12322073B2 (en) 2020-03-10 2025-06-03 Tcl Technology Group Corporation Image processing model generation method, processing method, storage medium, and terminal
CN114511459A (en) * 2022-01-18 2022-05-17 中国科学院合肥物质科学研究院 Color image contrast information calculation method and device

Similar Documents

Publication Publication Date Title
CN103379346A (en) Chrominance information processing method, device and system of images in YUV format
CN107038680B (en) Self-adaptive illumination beautifying method and system
EP4050558A1 (en) Image fusion method and apparatus, storage medium, and electronic device
EP3570539B1 (en) Image purple fringe eliminating system, method, computer-readable storage medium, and photographing device
CN106846270B (en) Image edge enhancement method and device
CN110246087B (en) System and method for removing image chroma noise by referring to multi-resolution of multiple channels
CN103714520B (en) Digital video image strengthening system and its method are realized based on FPGA
CN104123699A (en) Method of reducing image noise and device
CN105096273A (en) Automatic adjustment method of color image brightness
CN103716547A (en) Smart mode photographing method
CN107820069A (en) A kind of video monitoring equipment ISP adjustment methods
CN106570838A (en) Image brightness optimization method and device
CN101854536A (en) Method for improving image visual effect for video encoding and decoding
CN103886565A (en) Nighttime color image enhancement method based on purpose optimization and histogram equalization
US8471933B2 (en) Image processing apparatus, image processing method and computer program
CN104392425B (en) A kind of image enchancing method of the adjust automatically contrast based on face
CN102447815B (en) Video image processing method and device
CN110136079A (en) Image dehazing method based on scene depth segmentation
CN110298812A (en) A kind of method and device of image co-registration processing
CN101968849B (en) Picture red eye removal method based on 3G smart phone
CN106550227A (en) A kind of image saturation method of adjustment and device
CN110782400A (en) A kind of self-adaptive illumination uniform realization method and device
CN105208362B (en) Image colour cast auto-correction method based on gray balance principle
EP2472876A2 (en) Apparatus and method for improving image quality based on definition and chroma
US7876364B2 (en) False color suppression method for digital image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20131030