彩色图像处理的两个重要应用:
1、彩色边缘检测
[VG,A,PPG]=colorgrad(fc);
imshow(VG);
figure,imshow(PPG);
2、区域处理
RGB彩色图像分割
mask=roipoly(fc);
red=immultiply(mask,fc(:,:,1));
green=immultiply(mask,fc(:,:,2));
blue=immultiply(mask,fc(:,:,3));
g=cat(3,red,green,blue);
figure,imshow(g);
[M,N,K]=size(g);
I=reshape(g,M*N,3);
idx=find(mask);
I=double(I(idx,1:3));
[C,m]=covmatrix(I);