将图像从RGB转换为HSV色彩空间 [英] Converting image from RGB to HSV color space

查看:500
本文介绍了将图像从RGB转换为HSV色彩空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ScipyMatplotlib's文档中找不到这样的功能(即RGB_to_HSV()),并且Google除了[c3>配方中展示了rgb2hsv功能之外,没有显示指针,尽管在ActiveState上不可用Numpy数组保持不变.

I couldn't find such function (i.e. RGB_to_HSV()) in Scipy or Matplotlib's documentations, and Google doesn't show pointers, except ActiveState recipe which demonstrates rgb2hsv function, though not usable on Numpy array as is.

有人知道快捷方式吗?

对不起,刚刚找到matplotlib.colors.rgb_to_hsv(),这正是我想要的.我应该删除这个问题吗?

Sorry, just found matplotlib.colors.rgb_to_hsv() which is exactly what I was looking for. Should I delete this question?

推荐答案

Matplotlib提供RGB到HSV转换功能: matplotlib.colors.rgb_to_hsv():

Matplotlib provides RGB to HSV conversion function: matplotlib.colors.rgb_to_hsv():

matplotlib.colors.rgb_to_hsv(arr)

将numpy数组中的rgb值转换为hsv值,输入和输出数组应具有(M,N,3)形状

convert rgb values in a numpy array to hsv values input and output arrays should have shape (M,N,3)

这篇关于将图像从RGB转换为HSV色彩空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆