颜色的三要素:色调,饱和度,和亮度 HSI/HSV

来源:互联网 发布:域名dns劫持检测 编辑:程序博客网 时间:2024/04/29 19:24
  1. 1
  2. 颜色要素色调饱和度亮度
  3. The3 colour directories: hue,saturation, and brightness.
  4. danci.911cha.com
  5. 同时使用色调饱和度亮度组合情况这些区域定义

    Each of theseregions is definableusing a combinationof hue,saturation andluminance valuessimultaneously.

    Provided by gtcom

  6. 可以更改色调饱和度亮度透明度流动比例其他许多方面

    You can change color hue,saturation, lightness, opacity,fluidity scale,and many moreaspects.

    www.ibm.com

  7. 背景视频包括像素每个像素表示色调饱和度亮度hsl

    The background video is comprisedof pixels,each of whichrepresents a valueof hue,saturation andluminance ( hsl).

    Provided by gtcom

  8. 这种颜色空间示例使用者更有直观意义hsl色调饱和度亮度空间

    An example of one such color space is the hsl ( h ue,saturation, luminance) space,which is moreintuitively meaningful tothe user.

    Provided by gtcom

  9. 本文提出基于色调饱和度亮度联合概率分布彩色图象分割方法

    In this paper, we propose a new color image segmentationmethod, whichbases on unionprobability density ofhue, lightand saturation.

    dict.cnki.net

  10. 本文快速HSI色调饱和度亮度变换空间基础采用利用移动网格动态窗口技术结合算法进行目标识别达到预期效果

    Based on rapid HSI transformspace, a target identification algorithmis adopted,which combined amobile grid anddynamic window technology.

    www.fabiao.net

  11. 纹理图象探讨基于色调饱和度亮度联合概率分布彩色图象分割方法

    To non-texture images, a new color image segmentation method isproposed in thischapter, whichbased on unionprobability density ofhue, lightand saturation.

    dict.cnki.net

  12. 图像RGB转换色调饱和度亮度色调饱和度结合产生融合图像消除地表天空背景影响

    The color image was translatedfrom RGB systemto HSI system,and the hue,lightness andsaturation imageswere acquired.In order toeliminate the influenceof background ofsoil and sky,the hue andsaturation data wascombined and producedfusion image.

    dict.cnki.net

  13. 由于RGB空间利用亮度信息较少利用颜色信息并且空间分量高度相关人类视觉倾向色调饱和度亮度共同描述彩色物体一致适合边缘检测任务

    RGB color space using onlythe brightness informationand less useof color information,and the spacethree components arehighly correlated,human vision prefersto use hue,saturation andbrightness to describe the colorobject is inconsistent,not suitable foredge detection task.

    www.fabiao.net

  14. 本文通过HSI空间色调饱和度进行合理划分图像色调饱和度亮度进行匹配加权给出根据局部累积直方图计算图片相似具体算法

    Through experiment,we provide aconcrete colorimage retrieval algorithm,which divides thehue and saturationin HSI colorspace, usesmatching algorithm totwo pictures andcalculates similar amount.

    dict.cnki.net

  15. 本文介绍适用PAL制式电视终端模拟实时装置装置色调饱和度亮度彩色图象进行分解显示显示背景适当处理

    A real time analogue apparatusis presented,which can besuitable for terminalsof PAL televisionsystem and cansegment-display color imageswith appropriate backgroundby hue,saturation andbrightness.

    dict.cnki.net

  16. 本文提出系统评价思路方案整体外观表现颜色多少分布特征均匀程度颜色要素色调饱和度亮度结合成因进行讨论

    A systemic way is suggestedfor appraisement,from the appearanceto the 3elements of color,i.e. from theamount, distributing,uniformity to thetone, saturation, brightness, and include thecausing of color.

    dict.cnki.net

  17. 图形背景除了色调不同饱和度亮度应有区别如果可能尽量避免彩色背景运用彩色文本

    Objects and background should varyin brightnessor saturation,in addition tohue, and color texton color backgroundsshould also beavoided when possible.

    Provided by gtcom

  18. 亮度饱和度大于各自阈值颜色色调饱和度代表忽略不同亮度影响

    Otherwise coloris represented byits hue and saturation,thus the influenceof intensityis ignored.

    dict.cnki.net

  19. 研究四诊客观采用数码采集计算机图像软件PHOTOSHOP60分别计算RGB数值然后换算色调H饱和度S亮度V进行分析

    To objectify the Chinese medicaldiagnosis, theRGB values ofhind paws werecalculated by Photoshop6.0 and convertedinto hue,saturation andluminance, and contrasted withpaw color.

    dict.cnki.net

  20. 结果表明样品色调主要集中绿色其中3样品饱和度亮度最高色调

    The result shows that thecolor toneof the brokenfilms mainly focuseson green.The saturationand brightnessof sample No.3 is thehighest, butits color toneis somewhat yellow.

    dict.cnki.net

  21. 色调饱和度投影直方图反映颜色空间分布亮度投影直方图体现图像形状

    The projectivehistograms of hueand saturationdiscribe the colordistribution in space,and the projectivehistogram of intensityreflects the shapeof the image.

    dict.cnki.net

  22. 对于给定色调具有包括颜色空间集中饱和度亮度范围进行加宽效果

    This would have the effect,for a givenhue, of widening theranges of saturationand luminancethat are tobe included inthe subset ofthe color space.

    Provided by gtcom

  23. 通过球体彩色图像亮度色调饱和度分布特征分析发现球体图像颜色失真主要颜色亮度分量有关色调饱和度分量关系不大

    After analyzingthe distribution characteristicsof brightness,hue andsaturation ofball images,it was foundthat the imagecolor distortion wasonly related tobrightness, but hue and saturation of images.

    dict.cnki.net

openCv RGB到HSV空间的学习


标签: opencvRGBHSV
556人阅读 评论(0)收藏举报
本文章已收录于:


分类:
作者同类文章X


    这次我主要说说颜色空间,包括三个方面:RGB颜色空间,HSV颜色空间以及颜色空间的转换


    RGB颜色空间介绍:


    1:RGB颜色空间简介



             三基色原理:大多数的颜色可以通过红、绿、蓝<数学中基的概念>三色按照不同的比例合成产生,同样绝大多数单色光也可以分解成红绿蓝三种色光


             红绿蓝三基色按照不同的比例相加合成混色称为相加混色。其中一些混色的规律有:


                       红色+绿色 = 黄色


                       绿色+蓝色 = 青色


                       红色+蓝色 = 品红


                       红色+绿色+蓝色 = 白色


                       红色+青色 = 白色


                       绿色+品红 = 白色


                       蓝色+黄色 = 白色


    2:互补光的定义:


             当两种光按照适当比例混合得到白光时,称这两种光为互补光。所以上述的混色规律我们可以得到青色、黄色、品红分别是红色、蓝色、绿色的补色。


     


    3:亮度的定义:


             单色光的亮度强度各不相同,根据人的感受是:绿光最高,红光次之,蓝光最弱,假设得到的白光的强度为100%。如果用Y表示景物的亮度,则通常有:


                       Y= 0.299R + 0.587G + 0.114B


    因为红﹑绿﹑蓝三基色能够合成自然界所有的色彩,因此在电子设备和软件中,经常使用红绿蓝三基色合成五颜六色的图像。用以上的相加混色所表示的颜色模式成为RGB模式


    注意:


    1:CvLoadImage(“”,0)所得到的图像即为灰度单通道图像,所对应的像素即为Y;而与split函数得到的单通道图像R,G,B不一样,但其亮度显示也是按照下图的直线来显示的<即为RGB空间的直线>


    2:三通道图像也可能是灰度图像,当三通道值相等时,所对应的三通道图像就是灰度图像<可以通过以下程序画出来>。即RGB space空间中(0,0,0)和(1,1,1)两线上所有点就是灰度图像—>三通道图不一定是彩色的,彩色图一定是三通道的



    3:单通道图像亮度显示也是通过下图来显示的



    得到上图的代码为:


    [cpp] view plain copy print?
    1. #include <iostream>  
    2. #include "cv.h"  
    3. #include "highgui.h"  
    4. #include "cxcore.h"  
    5. using namespace std;  
    6. int main()  
    7. {  
    8.     IplImage *dst = cvCreateImage(cvSize(255, 255), 8, 3);  
    9.     for(int y = dst->height - 1; y >= 0; y--)  
    10.     {  
    11.         cvSet2D(dst, y,  dst->height - y - 1, cvScalar(255-y, 255-y, 255-y));  
    12.     }  
    13.     cvNamedWindow("show");  
    14.     cvShowImage("show", dst);  
    15.     cvWaitKey(0);  
    16.     cvReleaseImage(&dst);  
    17.     cvDestroyWindow("show");  
    18.     return 0;  
    19. }  





    HSV颜色空间



    H:色调 0°对应红色, 120°对应绿色, 240°对应蓝色---对应不同的颜色 取值范围0~360


    S:饱和度  比若说:红色的纯度,越白纯度越低,取值范围0~1


    V:亮度  比如你穿了一件红色衣服 在白天亮度较高(0~255之间)傍晚或者黄昏就比较低(0~255之间)即多少的光照上去反射出来被看见,取值范围0~255


    如图:


    颜色空间的转换


    用到的核心函数有: cvConvertScale, cvSplit, cvMerge, cvCvtColor


    需要注意的是:由于加载进来图像是uchar,最多只能是255,而opencv正常程序的结构显示H色调都会小于等于180<因为程序知道表示不了360,直接全部缩小到180>,而H色调的取值范围0~360,因此我们需要将图像转换成float类型,而cvConvertScale 可以实现放大缩小偏移同时可以做类型转换;之后我们可以将hsv各通道转换到0~255之间,使用到的函数仍然是cvConvertScale 。最后需要注意的一点是:CvShowImage显示的图像都会被当做RGB颜色空间的图像来处理.


    下面给出这之间范围变化的代码:


    1:没有考虑H(色调)范围的代码,此时H的范围只能在0~180之间。


    代码:



    [cpp] view plain copy print?
    1. #include <iostream>  
    2. #include "cv.h"  
    3. #include "highgui.h"  
    4. #include "cxcore.h"  
    5.   
    6. using namespace std;  
    7.   
    8. int main()  
    9. {  
    10.     IplImage *src = cvLoadImage("F:\\tongtong.jpg", 1);  
    11.     IplImage *hsv_img = cvCreateImage(cvGetSize(src), 8 , 3);  
    12.     IplImage *h_img = cvCreateImage(cvGetSize(src), 8, 1);  
    13.     IplImage *s_img = cvCreateImage(cvGetSize(src), 8, 1);  
    14.     IplImage *v_img = cvCreateImage(cvGetSize(src), 8, 1);  
    15.   
    16.     cvCvtColor(src, hsv_img, CV_BGR2HSV);  
    17.     cvSplit(hsv_img, h_img, s_img, v_img, NULL);  
    18.     for(int y = 0; y < hsv_img->height; y++){  
    19.         for(int x = 0; x < hsv_img->width; x++)  
    20.         {  
    21.             cout << cvGetReal2D(h_img, y, x) << " ";  
    22.         }  
    23.         cout << endl;  
    24.     }  
    25.     cvNamedWindow("src", 0);  
    26.     cvShowImage("src", hsv_img);  
    27.     cvWaitKey(0);  
    28.     cvReleaseImage(&src);  
    29.     cvDestroyWindow("src");  
    30.     return 0;  
    31. }  


    2:将色调H的取值范围转换到0~360之间



    [cpp] view plain copy print?
    1. #include <iostream>  
    2. #include "cv.h"  
    3. #include "highgui.h"  
    4. #include "cxcore.h"  
    5.   
    6. using namespace std;  
    7.   
    8. int main()  
    9. {  
    10.     IplImage *src = cvLoadImage("F:\\tongtong.jpg", 1);  
    11.     IplImage *src_float = cvCreateImage(cvGetSize(src),IPL_DEPTH_32F, 3);  
    12.     <span style="color: rgb(255, 0, 0);">cvConvertScale(src, src_float, 1.0, 0.0);  
    13.     IplImage *hsv_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F , 3);  
    14.     IplImage *h_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);  
    15.     IplImage *s_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);  
    16.     IplImage *v_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);  
    17. </span>  
    18.     cvCvtColor(src_float, hsv_img, CV_BGR2HSV);  
    19.     cvSplit(hsv_img, h_img, s_img, v_img, NULL);  
    20.     for(int y = 0; y < hsv_img->height; y++){  
    21.         for(int x = 0; x < hsv_img->width; x++)  
    22.         {  
    23.             cout << cvGetReal2D(h_img, y, x) << " ";  
    24.         }  
    25.         cout << endl;  
    26.     }  
    27.     cvNamedWindow("src", 0);  
    28.     cvShowImage("src", hsv_img);  
    29.     cvWaitKey(0);  
    30.     cvReleaseImage(&src);  
    31.     cvDestroyWindow("src");  
    32.     return 0;  
    33. }  

    3:将H,S,V的范围转化到0~255之间


    [cpp] view plain copy print?
    1. #include <iostream>  
    2. #include "cv.h"  
    3. #include "highgui.h"  
    4. #include "cxcore.h"  
    5.   
    6. using namespace std;  
    7.   
    8. int main()  
    9. {  
    10.     IplImage *src = cvLoadImage("F:\\tongtong.jpg", 1);  
    11.     IplImage *src_float = cvCreateImage(cvGetSize(src),IPL_DEPTH_32F, 3);  
    12.     cvConvertScale(src, src_float, 1.0, 0.0);  
    13.     IplImage *hsv_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F , 3);  
    14.     IplImage *h_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);  
    15.     IplImage *s_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);  
    16.     IplImage *v_img = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);  
    17. <span style="color: rgb(255, 0, 0);">  
    18.     IplImage *h = cvCreateImage(cvGetSize(src), 8, 1);  
    19.     IplImage *s = cvCreateImage(cvGetSize(src), 8, 1);  
    20.     IplImage *v = cvCreateImage(cvGetSize(src), 8, 1);  
    21.   
    22.     cvCvtColor(src_float, hsv_img, CV_BGR2HSV);  
    23.     cvSplit(hsv_img, h_img, s_img, v_img, NULL);  
    24.     cvConvertScale(h_img, h, (1.0/360)*255, 0.0);  
    25.     cvConvertScale(s_img, s, 255.0, 0.0);  // 因为S的取值范围为0~1  
    26.     cvConvertScale(v_img, v, 1.0, 0.0);</span>  
    27.     for(int y = 0; y < hsv_img->height; y++){  
    28.         for(int x = 0; x < hsv_img->width; x++)  
    29.         {  
    30.             if(cvGetReal2D(h, y, x) > 200)cout << cvGetReal2D(h, y, x) << " ";  
    31.         }  
    32.         cout << endl;  
    33.     }  
    34.     cvNamedWindow("src", 0);  
    35.     cvShowImage("src", hsv_img);  
    36.     cvWaitKey(0);  
    37.     cvReleaseImage(&src);  
    38.     cvDestroyWindow("src");  
    39.     return 0;  
    40.   
    41. }  


    0 0
    原创粉丝点击