Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

matlab code for image fusion using PCA

794 views
Skip to first unread message

Prashant sangulgi

unread,
Aug 11, 2010, 6:16:06 AM8/11/10
to
hello...
iam working on image fusion using PCA(principal component analysis) but iam not getting correct way to complete the code Ex: finding Mean, Variance, covariance and eigen vector... so my request to you that send me matlab code for IMAGE FUSION USING PCA from that i can complete my PROJECT WORK.. please..

Prashant sangulgi

unread,
Aug 11, 2010, 6:52:07 AM8/11/10
to
plzzzz send the code for image fusion using PCA..... plzzzz

us

unread,
Aug 11, 2010, 7:07:07 AM8/11/10
to
"Prashant sangulgi" <psan...@gmail.com> wrote in message <i3tt95$dqk$1...@fred.mathworks.com>...

> hello...
> iam working on image fusion using PCA(principal component analysis) but iam not getting correct way to complete the code Ex: finding Mean, Variance, covariance and eigen vector... so my request to you that send me matlab code for IMAGE FUSION USING PCA from that i can complete my PROJECT WORK.. please..

who do you think you are(?)...
show CSSM what YOU have done so far to solve YOUR particular problem...
then, maybe(!), you deserve to present yourself as brash as you do...

us

us

unread,
Aug 11, 2010, 7:07:08 AM8/11/10
to
"Prashant sangulgi" <psan...@gmail.com> wrote in message <i3tvcn$q3l$1...@fred.mathworks.com>...

> plzzzz send the code for image fusion using PCA..... plzzzz

what have YOU done so far to solve YOUR particular problem...

us

Steven_Lord

unread,
Aug 11, 2010, 9:13:23 AM8/11/10
to

"Prashant sangulgi" <psan...@gmail.com> wrote in message

news:i3tt95$dqk$1...@fred.mathworks.com...

But if we did that, it wouldn't be YOUR project work, it would be OUR
project work. Plus, if the person for whom you're doing this project asked
you to explain the code, you wouldn't be able to -- and that would be a Bad
Thing.

This newsgroup does not simply provide people with code upon request; show
what you've tried to solve the problem yourself and describe where you got
stuck during that process and you may receive some help.

--
Steve Lord
sl...@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

abhaysin...@gmail.com

unread,
Mar 7, 2014, 12:49:33 AM3/7/14
to
sir, Iam a student of Engineering, from Pune University. I need some of your help to perform inverse PCA..

I have done up to here..

clc
clear all;
img=rand(4,4,3)
%img = imread('E:\ms.jpg');
figure,imshow(img);

img1=img(:,:,1);
[m n]=size(img1);
%figure,imshow(img1);
img2=img(:,:,2);
%figure,imshow(img2);
img3=img(:,:,3);
%figure,imshow(img3);

%to get elements along rows we take imagg'
temp1=reshape(img1',m*n,1);
%figure,imshow(temp1);
temp2=reshape(img2',m*n,1);
%figure,imshow(temp2);
temp3=reshape(img3',m*n,1);
%figure,imshow(temp3);

I=[temp1 temp2 temp3];
figure,imshow(I);

%to get mean
m1=mean(I,2);
figure,imshow(m1);

%subtract mean
temp=double(I);
for i=1:3
I1(:,i)=(temp(:,i)-m1);
end
a1=double(I1);
figure(6),imshow(I1);

a=a1';
covv = a*a';

[eigenvec eigenvalue]=eig(covv);

abhi=eigenvalue;

eigenvalue = diag(eigenvalue);

[egn,index]=sort(-1*eigenvalue);

eigenvalue=eigenvalue(index);

eigenvec=eigenvec(:,index);
figure,imshow(eigenvec);

pcaoutput=a1*eigenvalue;

vt=transpose(eigenvalue);
for i=1:size(pcaoutput,2)
ima=reshape(pcaoutput(:,i)',n,m);
ima=ima';

imshow(ima,[]);
end


hp=imread('E:\pan.jpg');
original=inv(abhi)*pcaoutput;
%origin=transpose(original)+m1;
imshow(original);


Thank you..
0 new messages