Convert RGB images to Gray Scale with Principle Component Analysis:Convert RGB to Gray using the function impca(image)-matlab开发

时间:2021-05-30 06:45:38
【文件属性】:
文件名称:Convert RGB images to Gray Scale with Principle Component Analysis:Convert RGB to Gray using the function impca(image)-matlab开发
文件大小:1KB
文件格式:ZIP
更新时间:2021-05-30 06:45:38
matlab % 该函数使用主成分分析转换RGB图像% 到灰度图像。 % 版权所有 Tyler L. Coye 函数 [灰色] = impca(im) im = im2double(im); 实验室 = rgb2lab(im); f = 0; wlab = reshape(bsxfun(@times,cat(3,1-f,f/2,f/2),lab),[],3); [C,S] = pca(wlab); S = reshape(S,size(lab)); S = S(:,:,1); 灰色 = (S-min(S(:)))./(max(S(:))-min(S(:))); 结尾
【文件预览】:
impca.zip

网友评论