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. |
|
Entropy of image
Started by ●June 18, 2003
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, ------------------------- 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. |