问题
I'm trying to display a color disparity map, but it first displays black and white until I do 'colormap jet' then it's in color.
How can black and white image be suppressed?
imshow(disparityMap, DisparityRange );
title('DISPARITY MAP');
colormap jet;
回答1:
Specify the colormap
parameter to imshow
.
imshow(disparityMap, DisparityRange, 'colormap', jet);
Example use
im = imread('cameraman.tif');
imshow(im, [60,200], 'colormap', hsv);
We get this image:
来源:https://stackoverflow.com/questions/31975182/matlab-figure-flashes-back-and-forth-between-blackwhite-and-color