Re: Kurtosis and variance of an image
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Sun, 22 Jun 2008 14:14:02 +0000 (UTC)
"Ratnakar Dash" <newsreader@xxxxxxxxxxxxx> wrote in message
<g3lds6$4e5$1@xxxxxxxxxxxxxxxxxx>...
Calculate the variance of an image in this way /
var(var(matrix)). you will get a single value .. if you
write like you have given it will calculate the variance of
each column . so it produces 1X256 values.
bye..
WRONG!!!
That is not the true variance. It is not even close!
The operation proposed by the responder does
compute the variance of the variances of each
column. But that is a wildly different number
than is the variance of the entire image.
For example, lets consider a simple random
array.
A = rand(10,10);
The variance of the entire array is
var(A(:))
ans =
0.077627
var(var(A))
ans =
0.00044343
In var(A(:)) I have unrolled the array first into
a single column, then computed the variance.
In the var(var(A)), note that each estimate of
the variance is roughly the same number.
var(A)
ans =
Columns 1 through 6
0.10951 0.070793 0.048005 0.10292 0.054316 0.065199
Columns 7 through 10
0.09793 0.082046 0.063051 0.085977
Then we compute the variance of that, and
we get a much smaller number, with different
units on it.
The variance of the variances is not at all the
same as taking the mean of a set of means!
Again, do NOT follow the advice you got from
the previous response.
Even worse, do NOT compute the kurtosis in
that way, as kurtosis(kurtosis(A)).
Finally, if you have an image, perhaps as a 3
channel RGB image, what do you mean when
you ask for the variance? Do you wish to see
the variance in each channel? Or is your image
a single channel gray scale image.
John
.
- References:
- Kurtosis and variance of an image
- From: Dev
- Re: Kurtosis and variance of an image
- From: Ratnakar Dash
- Kurtosis and variance of an image
- Prev by Date: isolate
- Next by Date: wpt
- Previous by thread: Re: Kurtosis and variance of an image
- Next by thread: Re: extra output arguments to ode functions?
- Index(es):
Relevant Pages
|