how can I show the denoised image after applying pca to a noisy image.

조회 수: 6 (최근 30일)
Shaveta Arora
Shaveta Arora 2016년 1월 31일
댓글: Image Analyst 2021년 8월 5일
im=imread('cameraman.tif'); im1=imresize(im,[50,50]); im=double(im1); figure(1);imshow(im,[]); sig=10; noi=sig*randn(size(im)); data=im+noi; figure(2);imshow(data,[]);
[m,n]=size(data);
mn = mean(data,2); data = data-repmat(mn,1,n); covari=data*data'/n-1; [PC,V] = eig(covari); diav = diag(V); [junk, rindices] = sort(-1*diav); V = diav(rindices); PC = PC(:,rindices);
  댓글 수: 3
Shaveta Arora
Shaveta Arora 2016년 1월 31일
im=imread('cameraman.tif');
im1=imresize(im,[50,50]);
im=double(im1);
figure(1);imshow(im,[]);
sig=10;
noi=sig*randn(size(im));
data=im+noi; %noised image
figure(2);
imshow(data,[]);
[m,n]=size(data);
mn = mean(data,2);
data = data-repmat(mn,1,n);
covari=data*data'/n-1;
[PC,V] = eig(covari);
diav = diag(V);
[junk, rindices] = sort(-1*diav);
V = diav(rindices);
PC = PC(:,rindices);
Shaveta Arora
Shaveta Arora 2016년 1월 31일
PC represents principal components of noisy image i.e data. Now pls help me how to get the image from these PCs.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2016년 1월 31일
figure;
imshow(PC, [], 'InitialMagnification', 1600);
title('PC Image', 'FontSize', 20);

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by