1. 首页
  2. 编程语言
  3. 其他
  4. RGB转换HSV matlab实现

RGB转换HSV matlab实现

上传者: 2018-12-09 09:20:38上传 TXT文件 1.08KB 热度 46次
% 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
用户评论
码姐姐匿名网友 2018-12-09 09:20:38

thank you for sharing!

码姐姐匿名网友 2018-12-09 09:20:38

There is no problem in the program, but it does not work very well. I mean the result is not as well as the function hsv2rgb provided by matlab.

码姐姐匿名网友 2018-12-09 09:20:38

可以直接使用,谢谢!