1.opencv函数cvCvtColor(rgb_im,hsv_im,CV_BGR2HSV)中使用的RGB颜色空间转到HSV算法: max=max(R,G,B) min=min(R,G,B) if R = max, H = (G-B)/(max-min) if G = max, H = 2 + (B-R)/(max-min) if B = max, H = 4 + (R-G)/(max-min) H = H * 60 if H < 0, H = H + 360 V=max(R,G,B) S=(…
参考来源: 1.https://blog.csdn.net/Eroslol/article/details/52525541 2.https://www.cnblogs.com/hustdc/p/6855051.html 1. // make a 7x7 complex matrix filled with 1+3j. Mat M(7,7,CV_32FC2,Scalar(1,3)); 解释如下:创建一个M矩阵,7行7列,类型为CV_32F,C2表示有2个通道.Scalar(1,3)是对矩阵进行初…