Matlab读取图像,显示H、S、V分量

转自:http://blog.csdn.net/tulun/article/details/6934995


程序代码:

a = imread('test.png');

hsva = rgb2hsv(a);
h = hsva(:,:,1);
s = hsva(:,:,2);
v = hsva(:,:,3);
figure,
subplot(2,2,1),imshow(hsva);title('hsv格式图');
subplot(2,2,2),imshow(h);title('h');
subplot(2,2,3),imshow(s);title('s');

subplot(2,2,4),imshow(v);title('v');


结果图:



你可能感兴趣的:(MATLAB相关)