From: Prashant sangulgi on
clc;
close all;
clear all;
A=imread('PG1.JPG');
%B=mean2(X);
%disp(B);
%A = rand(1,280);
%var(A)
%var(A(:))
K = cov(double(A));
disp(K);


i am getting the error as
??? Error using ==> cov at 37
Inputs must be 2-D.

Error in ==> PRS at 10
K = cov(double(A));

From: ImageAnalyst on
It's probably a 3D image because it's probably a rgb color image.
Convert it to 2D gray with rgb2gray().

From: Prashant sangulgi on
"Prashant sangulgi" <psangulgi(a)gmail.com> wrote in message <i4063q$rij$1(a)fred.mathworks.com>...
> clc;
> close all;
> clear all;
> A=imread('PG1.JPG');
> %B=mean2(X);
> %disp(B);
> %A = rand(1,280);
> %var(A)
> %var(A(:))
> K = cov(double(A));
> disp(K);
>
>
> i am getting the error as
> ??? Error using ==> cov at 37
> Inputs must be 2-D.
>
> Error in ==> PRS at 10
> K = cov(double(A));
i have sent a message to you with the image what i have used.... Let me ask something to you that what are the steps required in getting the image fusion using PCA.... I mean whether to take both the images at a time or at different instant....
From: ImageAnalyst on
I don't know. Well, er, rather, I'm not going to do a brain dump of
all I know on the subject here. I suggest you do some research, like
a web search on "PCA images." Sorry, but I don't have any demo code
to help you with PCA.

I don't monitor that email address and replying from it is impossible
(it's just a spam prevention account).
From: Walter Roberson on
Prashant sangulgi wrote:
> "Prashant sangulgi" <psangulgi(a)gmail.com> wrote in message
> <i4063q$rij$1(a)fred.mathworks.com>...
>> clc;
>> close all;
>> clear all;
>> A=imread('PG1.JPG');
>> %B=mean2(X);
>> %disp(B);
>> %A = rand(1,280);
>> %var(A)
>> %var(A(:))
>> K = cov(double(A));
>> disp(K);
>>
>>
>> i am getting the error as
>> ??? Error using ==> cov at 37
>> Inputs must be 2-D.
>>
>> Error in ==> PRS at 10
>> K = cov(double(A));
> i have sent a message to you with the image what i have used.... Let
> me ask something to you that what are the steps required in getting the
> image fusion using PCA.... I mean whether to take both the images at a
> time or at different instant....

First you start by defining what you mean by the covariance of a 3 dimensional
array. Covariance over XY, XZ, YZ, or something else?