【Mathematica】灰度图转色相图(Hue)
的有关信息介绍如下:如果对灰度图进行色彩赋值,会得到怎么样的图片?
给出如下图片:
分离色彩,得到一张灰度图:
pic=ColorSeparate[img][]
把图片转化为数据:
data = ImageData[pic];
用ArrayPlot绘制像素图:
采用Hue赋值的色相(彩色)图:
ArrayPlot[data,ColorFunction -> Hue]
ArrayPlot[1-data,ColorFunction -> Hue]
ArrayPlot[data^2,ColorFunction -> Hue]
ArrayPlot[1-data^2,ColorFunction -> Hue]
ArrayPlot[(1-data)^2,ColorFunction -> Hue]