二值化:
bw = im2bw(f); %默认的二值
bw1 = im2bw(f,graythresh(f)); %使用全局阈值处理的logical图像
?...从RGB空间到HSV空间:
hsv = rgb2hsv(f);
?...获得其相应的H 、S和 V分量
subplot(2,2,1),imshow(hsv(:,:,1))
subplot(2,2,2),imshow(hsv(:,:,2))
subplot(2,2,3),imshow...(hsv(:,:,3))
subplot(2,2,4),imshow(hsv)
?...当然还可以转到YCbCr空间,
cbr = rgb2ycbcr(f);
?
转到NTSC彩色空间,
ntsc = rgb2ntsc(f);
?