how can I show the denoised image after applying pca to a noisy image.
Show older comments
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 Comments
Image Analyst
on 31 Jan 2016
In this uncommented, unformatted code, what is the denoised image? Which variable and what is its size? To show it you'd use imshow().
Shaveta Arora
on 31 Jan 2016
Shaveta Arora
on 31 Jan 2016
Answers (1)
Image Analyst
on 31 Jan 2016
figure;
imshow(PC, [], 'InitialMagnification', 1600);
title('PC Image', 'FontSize', 20);
2 Comments
Yadi Yang
on 5 Aug 2021
This is not working....
Image Analyst
on 5 Aug 2021
@Yadi Yang it should work. If you need help, start a new discussion after you read this:
Categories
Find more on Image Category Classification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!