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);
  2 件のコメント
Yadi Yang
Yadi Yang 2021 年 8 月 5 日
This is not working....
Image Analyst
Image Analyst 2021 年 8 月 5 日
@Yadi Yang it should work. If you need help, start a new discussion after you read this:

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDimensionality 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