发明名称 视频质量诊断系统检测视频图像偏色的方法
摘要 本发明为视频质量诊断系统检测视频图像偏色的方法,用于解决视频质量诊断系统中视频图像发生偏色的情况。包括如下步骤:a、将图像由RGB颜色空间转换到Lab颜色空间;b、计算a、b分量的颜色直方图;c、计算图像偏色因子。偏色因子大于设定阈值的图像认为存在偏色并报警。
申请公布号 CN103067734B 申请公布日期 2014.10.08
申请号 CN201210532307.7 申请日期 2012.12.12
申请人 成都三泰电子实业股份有限公司 发明人 师改梅;杨云;胡入幻;缪泽;补建;罗安;周聪俊;楼伽
分类号 H04N17/00(2006.01)I;H04N17/02(2006.01)I 主分类号 H04N17/00(2006.01)I
代理机构 成都立信专利事务所有限公司 51100 代理人 冯忠亮
主权项 视频质量诊断系统检测视频图像偏色的方法,其特征在于系统包括:视频图像采集单元:用模拟摄像头从监控场景获取模拟视频图像,模拟视频图像通过视频采集卡转换为数字图像数据,视频图像偏色检测单元:将数字图像数据由RGB颜色空间转换为Lab颜色空间,在Lab颜色空间计算视频图像的偏色因子,检测到偏色因子大于设定阈值,将当前视频图像传报警单元,报警单元:发出报警信号,检测方法包括如下步骤:(1)RGB颜色空间向Lab颜色空间转换:Lab颜色空间中的L分量用于表示像素的亮度,表示从纯黑到纯白,a表示从红色到绿色的范围,b表示从黄色到蓝色的范围,用<img file="79835dest_path_image001.GIF" wi="9" he="18" />表示彩色图像中某点的横坐标位置,<img file="415002dest_path_image002.GIF" wi="14" he="21" />表示彩色图像中某点的纵坐标位置,<img file="143923dest_path_image003.GIF" wi="45" he="22" />表示像素点<img file="160421dest_path_image004.GIF" wi="34" he="22" />处的RGB颜色空间的红色(R)分量值,<img file="658398dest_path_image005.GIF" wi="45" he="22" />表示像素点<img file="430045dest_path_image004.GIF" wi="34" he="22" />处的RGB颜色空间的绿色(G)分量值,<img file="66169dest_path_image006.GIF" wi="45" he="22" />表示像素点<img file="948675dest_path_image004.GIF" wi="34" he="22" />处的RGB颜色空间的蓝色(B)分量值,<img file="301159dest_path_image007.GIF" wi="44" he="22" />表示像素点<img file="181390dest_path_image004.GIF" wi="34" he="22" />处的Lab颜色空间的L分量值,<img file="619325dest_path_image008.GIF" wi="42" he="22" />表示像素点<img file="39942dest_path_image004.GIF" wi="34" he="22" />处的Lab颜色空间的a分量值,<img file="699462dest_path_image009.GIF" wi="41" he="22" />表示像素点<img file="812911dest_path_image004.GIF" wi="34" he="22" />处的Lab颜色空间的b分量值,<img file="738142dest_path_image004.GIF" wi="34" he="22" />遍历彩色图像的每个像素点,RGB颜色空间到Lab颜色空间转换的方法如下所示:<img file="900133dest_path_image010.GIF" wi="519" he="22" />,<img file="961630dest_path_image011.GIF" wi="537" he="19" />,<img file="245981dest_path_image012.GIF" wi="528" he="24" />,其中,<img file="346923dest_path_image013.GIF" wi="19" he="19" />为彩色图像的宽度,<img file="374922dest_path_image014.GIF" wi="19" he="18" />为彩色图像的高度,<img file="556505dest_path_image015.GIF" wi="105" he="22" />,<img file="683861dest_path_image016.GIF" wi="104" he="22" />,<img file="583684dest_path_image017.GIF" wi="104" he="22" />,(2)Lab颜色空间计算颜色直方图:在Lab空间对图像的颜色信息进行统计,图像颜色的统计信息通过图像在Lab颜色空间中的a、b分量的直方图信息得到,用<img file="149794dest_path_image018.GIF" wi="45" he="25" />表示Lab颜色空间a分量取r时候的直方图统计值,用<img file="638413dest_path_image019.GIF" wi="43" he="25" />表示Lab颜色空间b分量取r时候的直方图统计值,用<img file="998987dest_path_image020.GIF" wi="69" he="28" />表示Lab颜色空间a分量取r,b分量取q时候的二维直方图,其中,r为变量,遍历0到255之间的所有整数值,q为变量,遍历0到255之间的所有整数值,左右均为闭区间,a分量的颜色直方图<img file="386106dest_path_image018.GIF" wi="45" he="25" />的计算方法如下:<img file="693591dest_path_image021.GIF" wi="136" he="47" />,<img file="584186dest_path_image022.GIF" wi="94" he="22" />,其中,<img file="381241dest_path_image023.GIF" wi="141" he="49" />,表示Lab颜色空间水平第i个像素点,垂直第j个像素点处a分量<img file="681422dest_path_image008.GIF" wi="42" he="22" />是否等于r,b分量的颜色直方图<img file="854915dest_path_image019.GIF" wi="43" he="25" />的计算方法如下:<img file="865596dest_path_image024.GIF" wi="136" he="47" />,<img file="771235dest_path_image022.GIF" wi="94" he="22" />,其中,<img file="867367dest_path_image025.GIF" wi="140" he="49" />,表示Lab颜色空间水平第i个像素点,垂直第j个像素点处b分量<img file="578971dest_path_image026.GIF" wi="42" he="22" />是否等于r,a,b分量的二维直方图<img file="631110dest_path_image020.GIF" wi="69" he="28" />的计算方法如下:<img file="769967dest_path_image027.GIF" wi="181" he="49" />,<img file="353395dest_path_image028.GIF" wi="100" he="22" />,<img file="540794dest_path_image029.GIF" wi="101" he="22" />,其中,<img file="526067dest_path_image030.GIF" wi="225" he="51" />,表示Lab颜色空间水平第i个像素点,垂直第j个像素点处a分量<img file="835826dest_path_image008.GIF" wi="42" he="22" />是否等于r且b分量<img file="594966dest_path_image026.GIF" wi="42" he="22" />是否等于q,<img file="648372dest_path_image031.GIF" wi="63" he="27" />是将256除以T的向上取整运算,表示将256个灰度区间分为T等分,T可以取2到256之间的任意整数,T的取值包括2、256,(3)计算偏色因子:在计算得到Lab颜色空间中的a、b分量的一维、二维直方图信息后,便可以根据一维直方图和二维直方图信息,分别计算图像一维和二维颜色分布的绝对中心矩,结合图像颜色信息的平均值便可以计算得到偏色因子,偏色因子用于描述图像是否存在偏色现象以及图像的偏色程度,计算过程如下:1)计算图像颜色信息的平均值,在Lab颜色空间中,图像a、b分量颜色信息的平均值计算方法如下:<img file="488152dest_path_image032.GIF" wi="157" he="48" />,<img file="dest_path_image033.GIF" wi="156" he="48" />,<img file="906495dest_path_image034.GIF" wi="94" he="32" />,其中,<img file="198937dest_path_image035.GIF" wi="20" he="25" />为Lab颜色空间中<i>a</i>分量的平均值,<img file="56034dest_path_image036.GIF" wi="20" he="25" />为Lab颜色空间中b分量的平均值,<i>D</i>为Lab颜色空间中图像<i>a</i>、<i>b</i>分量的平均值,2)计算图像一维颜色分布的绝对中心矩,图像一维颜色分布的绝对中心矩M的计算方法如下:<img file="937271dest_path_image037.GIF" wi="102" he="32" />,其中,<img file="588832dest_path_image038.GIF" wi="22" he="25" />为彩色图像在Lab颜色空间a分量的一维颜色分布绝对中心距,<img file="634149dest_path_image039.GIF" wi="148" he="46" />,<img file="967041dest_path_image040.GIF" wi="22" he="25" />为彩色图像在Lab颜色空间图像b分量的一维颜色分布绝对中心距,<img file="515834dest_path_image041.GIF" wi="146" he="46" />,<img file="603876dest_path_image042.GIF" wi="44" he="28" />为彩色图像在Lab颜色空间a分量取r的概率,<img file="556395dest_path_image043.GIF" wi="44" he="28" />为彩色图像在Lab颜色空间b分量取r的概率, r为变量,遍历0到255之间的所有值,计算方法如下:<img file="755295dest_path_image044.GIF" wi="293" he="46" />,<img file="158595dest_path_image022.GIF" wi="94" he="22" />,<img file="355221dest_path_image045.GIF" wi="290" he="46" />,<img file="109550dest_path_image022.GIF" wi="94" he="22" />,其中,t为变量,遍历0到255之间的所有整数值,左右均为闭区间,<img file="846562dest_path_image046.GIF" wi="42" he="25" />表示Lab颜色空间a分量取t时候的直方图统计值,计算方法与<img file="494581dest_path_image047.GIF" wi="44" he="25" />相同,用<img file="924425dest_path_image048.GIF" wi="42" he="25" />表示Lab颜色空间b分量取t时候的直方图统计值,计算方法与<img file="900472dest_path_image019.GIF" wi="43" he="25" />相同,3)图像二维颜色分布的绝对中心矩:图像二维颜色分布的绝对中心矩<i>ed</i>计算方法如下:<img file="129590dest_path_image049.GIF" wi="189" he="54" />,其中,<img file="773061dest_path_image050.GIF" wi="200" he="48" />,<img file="108227dest_path_image051.GIF" wi="197" he="48" />,T表示将256个灰度区间分为T等分,可以取2到256之间的任意整数,具体取值与前面T的取值一致,4)计算偏色因子:在计算得到图像颜色信息的平均值以及图像一维和二维颜色分布的绝对中心矩后,可得到偏色因子的计算公式如下:<img file="774832dest_path_image052.GIF" wi="97" he="24" />,其中,K为彩色图像的偏色因子,当<img file="853647dest_path_image053.GIF" wi="84" he="25" />时,认为图像存在偏色;当<img file="351624dest_path_image054.GIF" wi="84" he="25" />时,认为图像不存在偏色,K值越大,偏色现象越严重。
地址 610091 四川省成都市金牛区蜀西路42号