Would it be possible to change the greyscale to a blue scale?
8 次查看(过去 30 天)
显示 更早的评论
Would it be possible to change this greyscale picture into a other color scale like in the two images? I tried some codes to make the binary into a color but i am trying to have something more clear to look than greyscale... Thank you
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/852690/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/852695/image.png)
0 个评论
采纳的回答
Turlough Hughes
2022-1-4
I don't think MATLAB has a blue scale colormap. You could do something custom, like the following. I'll use camerman for illustration:
I = imread('cameraman.tif');
imshow(I)
n = 128;
blueMap = [zeros(n/2,1) linspace(0,0.5,n/2).' linspace(0.5,1,n/2).';...
linspace(0,1,n/2).' linspace(0.5,1,n/2).' ones(n/2,1)];
figure()
imshow(I)
colormap(blueMap)
imshow(I)
colormap('copper') % or parula, hsv, bone, jet, etc.
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!