文件名称:RGB转换HSV matlab实现
文件大小:1KB
文件格式:TXT
更新时间:2012-12-12 06:54:51
RGB转换hsv matlab代码
% 1: max=max(R,G,B) % 2: min=min(R,G,B) % 3: if R = max, H = (G-B)/(max-min) % 4: if G = max, H = 2 + (B-R)/(max-min) % 5: if B = max, H = 4 + (R-G)/(max-min) % 6: % 7: H = H * 60 % 8: if H < 0, H = H + 360 % 9: %10: V=max(R,G,B)/255 %11: S=(max-min)/max