Reply by June 22, 20032003-06-22
You can use instead of probability, the counting of each pixel, I mean, what you need is calculate the histogram of the image. Take a look in the code below where S is the histogram.
 
N=sum(sum(S)); 
if ((N>0) & (min(S(:))>=0))
   Snz=nonzeros(S);
   H=log2(N)-sum(Snz.*log2(Snz))/N;
else
   H=0;
endPrateek Shrivastava <p...@indiatimes.com> wrote:
Hi all,

In the calculation of the entropy of an image,
ENTROPY = - SIGMA(p log p )
j j 2 j
how can we define the parameter 'probability' for an image?

Regards,

Prateek.

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: m...@yahoogroups.com

To Post: m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3


-------------------------
Aurio Gonlez Tenio
M. Sc. Student
Department of Communications - Decom
Faculty of Electrical and Computer Engineering - FEEC
State University of Campinas - UNICAMP, SP - Brazil
a...@decom.fee.unicamp.br




Mais espa, mais seguran e gratuito: caixa postal de 6MB, antivus, proteo contra spam.

Reply by Prateek Shrivastava June 18, 20032003-06-18
Hi all,

In the calculation of the entropy of an image,
ENTROPY = - SIGMA(p log p )
j j 2 j
how can we define the parameter 'probability' for an image?

Regards,

Prateek.