如何找到图像的色调图?
在文献综述的基础上,将HSV图像的“S”面和“V”面设为1,得到色差图。请告诉我这段代码是否给出了正确的结果。如果下面给出的代码是错误的,那么我恳请您发送matlab代码来查找huemap。
I = imread ('D:\image1.png');
figure, imshow(I);
title ('RGB image1')
rir = size (I, 1);
cic = size (I, 2);
imnm = rgb2hsv (I);
figure, imshow (imnm);
title ('HSV image1');
imhm = imnm;
for ih = 1 : rir
for jh=1 : cic
imhm (ih, jh, 2) = 1;
imhm (ih, jh, 3) = 1;
end
end
figure, imshow (imhm);
title ('Hue map');发布于 2017-06-10 14:08:37
如果你只想想象hsv空间中的色调,那就不需要这些了。
I = imread ('image.png');
HSV = rgb2hsv (I);
imagesc (HSV(:, :, 1));
colormap (hsv);或者实际转换回RGB:
HSV(:,:,2:3) = 1;
RGB = hsv2rgb (HSV);
imagesc (RGB);https://stackoverflow.com/questions/44473646
复制相似问题