Convert RGB images to Gray Scale with Principle Component Analysis
バージョン 1.0.0.0 (378 Bytes) 作成者:
Tyler Coye
Convert RGB to Gray using the function impca(image)
% This function uses principle component analysis to convert an RGB image
% to a gray scale image.
% Copyrighted by Tyler L. Coye
function [gray] = impca(im)
im = im2double(im);
lab = 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);
gray = (S-min(S(:)))./(max(S(:))-min(S(:)));
end
引用
Tyler Coye (2026). Convert RGB images to Gray Scale with Principle Component Analysis (https://jp.mathworks.com/matlabcentral/fileexchange/50874-convert-rgb-images-to-gray-scale-with-principle-component-analysis), MATLAB Central File Exchange. に取得済み.
MATLAB リリースの互換性
作成:
R2014b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linuxカテゴリ
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis >
- MATLAB > Graphics > Images > Convert Image Type >
- MATLAB > Graphics > Images > Modify Image Colors >
Help Center および MATLAB Answers で Image Segmentation and Analysis についてさらに検索
タグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!| バージョン | 公開済み | リリース ノート | |
|---|---|---|---|
| 1.0.0.0 | text updates |
