Technical discussion about Matlab and issues related to Digital Signal Processing.
|
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. |
|
|
|
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 Gonçalez Tenório 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 Yahoo! Mail Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus, proteção contra spam. |