I = double(imread('peppers.png'));X = reshape(I,size(I,1)*size(I,2),3);coeff = pca(X);Itransformed = X*coeff;Ipc1 = reshape(Itransformed(:,1),size(I,1),size(I,2));Ipc2 = reshape(Itransformed(:,2),size(I,1),size(I,2));Ipc3 = reshape(Itransformed(:,3),size(I,1),size(I,2));figure, imshow(Ipc1,[]);figure, imshow(Ipc2,[]);figure, imshow(Ipc3,[]);
MATLAB: I found this code demo for pca and I think that it shows that pca is literally just making the dimensions really small. The line of code X is the one doing all fancy modes of the image not pca. Is the understnading correct or am I missing something
image analysisimage processingpca
Related Question
- Image Quality Decrease and pixelated
- What is difference between “orientation” of Regionprops and “principal component coefficients” of PCA
- Overlay two images of different type
- Should there be a residual when applying principal component analysis
- Applying thresholds simultaneously in SimpleColorDetectionByHue()
- How to match a small part of an image to its whole image
Best Answer