2011-08-11 57 views

回答

2

你可以分离在R,G和B通道中的图像,和由零替换红色通道,只留下G和B通道。

例在数学:

i = Import["http://tinyurl.com/3wqklof"]; 
[email protected]{ImageSubtract[#[[1]], #[[1]]], #[[2]], #[[3]]} &@ [email protected] 

enter image description here

编辑

,或者,如果你需要一个 “精确” 蓝色图像,在 “HSB” 色彩空间分离,更换所有H矩阵的非零值为2/3(蓝色),使S和B分量保持不变。

例子:

ColorCombine[{Image[2/3 [email protected][#[[1]], #[[1]]]], #[[2]], #[[3]]} &@ 
       ColorSeparate[i, "HSB"], "HSB"] 

enter image description here

+0

天才!感谢您也附上了解释代码。但是,与原始输入相比,为什么输出更小/降级? – Alede

+0

@Alede我使用默认的Mathematica输出图像大小。简单的老懒惰。 –

相关问题