From: Milchkaffee on
Hi all,
I have 12-bit images, and I want to calculate the probability of each intensity value which appears in this image? Is there any good idea?

thanks a looooot :-)
From: Jan Simon on
Dear Milchkaffee!

> I have 12-bit images, and I want to calculate the probability of each intensity value which appears in this image? Is there any good idea?

help histc

Or equivalent function:
S = sort(reshape(Image, 1, []));
F = find([1, diff(S)]);
A = S(F); % Sorted intensities
N = diff([F, length(S) + 1]); % Number of occurrences

Kind regards, Jan
From: Bruno Luong on
"Milchkaffee " <zhengzhu_(a)hotmail.com> wrote in message <heeceh$etj$1(a)fred.mathworks.com>...
> Hi all,
> I have 12-bit images, and I want to calculate the probability of each intensity value which appears in this image? Is there any good idea?
>
> thanks a looooot :-)

Use HIST or HISTC

Bruno
From: Milchkaffee on
Dear Jan,
thank you very much for your fast answer, I'll try it immediately... :-D

best wishies!
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <heefr1$hro$1(a)fred.mathworks.com>...
> Dear Milchkaffee!
>
> > I have 12-bit images, and I want to calculate the probability of each intensity value which appears in this image? Is there any good idea?
>
> help histc
>
> Or equivalent function:
> S = sort(reshape(Image, 1, []));
> F = find([1, diff(S)]);
> A = S(F); % Sorted intensities
> N = diff([F, length(S) + 1]); % Number of occurrences
>
> Kind regards, Jan
 | 
Pages: 1
Prev: spfun
Next: mxArray ou mwArray?