From: Prashant sangulgi on
Ok.... I'll think.... Just send me some clue how to find variance of image.... I have mean right now... That is clc: close all; clear all; A=imread('pg.jpg'); C=mean2(A); K= var(A); HERE IAM GETTING PROBLEM....
From: us on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <e169045d-b7cd-42ec-8fb9-c5d68dedc9ff(a)z28g2000yqh.googlegroups.com>...
> On Aug 11, 9:23 am, "Prashant sangulgi" <psangu...(a)gmail.com> wrote:
> > That was me who is thanking you... For your response.... I hope you can feel my problem... Send the source code as soon as possible.... Thank you sir....
> ----------------------------------------------------------------------------------------------------------
> OK - here's my best shot at it given what you have supplied so far (in
> a multitude of separate threads for some unknown reason):
>
> weight1 = 0.5;
> weight2 = 0.5;
> fusedImage = weight1 * pcaImage1 + weight2 * pcaImage2;
>
> How does that sound?

ia(!!!!!)
you completely missed the point(!!!!!)
the correct snippet, of course, should be

weight1=0.5-eps(0.5);
% rest of code

how could you...
urs
From: Sean on
"Prashant sangulgi" <psangulgi(a)gmail.com> wrote in message <i3u9r1$9lh$1(a)fred.mathworks.com>...
> Ok.... I'll think.... Just send me some clue how to find variance of image.... I have mean right now... That is clc: close all; clear all; A=imread('pg.jpg'); C=mean2(A); K= var(A); HERE IAM GETTING PROBLEM....

Weird. I'm not.
From: Walter Roberson on
Prashant sangulgi wrote:
> Ok.... I'll think.... Just send me some clue how to find variance of
> image.... I have mean right now... That
> is
> clc: close all;
> clear all; A=imread('pg.jpg');
> C=mean2(A); K= var(A); HERE IAM GETTING PROBLEM....

A = rand(3,5);
var(A)
var(A(:))
From: ImageAnalyst on
On Aug 11, 9:50 am, "Prashant sangulgi" <psangu...(a)gmail.com> wrote:
> Ok.... I'll think.... Just send me some clue how to find variance of image.... I have mean right now... That is                                    clc:                                 close all;                       clear all;                        A=imread('pg.jpg');      C=mean2(A);               K= var(A);  HERE IAM GETTING PROBLEM....    

-----------------------------------------------------------------------------------------------
A is most likely going to be uint8. You need to convert it to single
or double just like the error message says:
??? Error using ==> var at 56
First argument must be single or double.
K = var(double(A))
Plus, it's likely that A is a 3D color array (jpg's usually are).
Taking the variance of a color image like that does not make sense.
Make sure to extract out just the one color band that you are
interested in, or else convert your image to monochrome using the
rgb2gray() function.

Finally, use more descriptive variable names. It makes it hard for
others to understand or maintain your code when the whole program just
uses cryptic one letter variable names.