我有一个图像说“X”(RGB),我想使用 Imagick 从中获取红色 channel 的图像
我试过引用 http://www.imagemagick.org/Usage/quantize
最佳答案
您需要的命令可以在 ImageMagick 文档中找到 https://www.imagemagick.org/Usage/color_basics/#separate :
Separating Channel Images
The easiest way separating out the individual color channels is to use the "-separate" operator to extract the current contents of each channel as a gray-scale image.
convert rose: -channel R -separate separate_red.gif convert rose: -channel G -separate separate_green.gif convert rose: -channel B -separate separate_blue.gif
(在这些示例中,
rose:
参数使其使用小 built-in image 玫瑰作为输入。)
关于rgb - 从图像中提取红色 channel ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9919956/