How to identify the type of the Histogram?

Hi All,
I have medical images,I've plotted it's histograms,now I need to identify the type of these histograms(e.g. One may be like Gaussian distribution, Normal distribution.etce...),is there a builtin Matlab function or any code does that?thank All in advance for time and support.

Respuestas (1)

Mischa Kim
Mischa Kim el 16 de En. de 2014

0 votos

Check out this tool on File Exchange. Alternatively, ktest2 might be an option.

12 comentarios

hamed abdulaziz
hamed abdulaziz el 16 de En. de 2014
Thank you Mr.Mischa Kim for quick answer,in fact my goal of this qestion is: I have two algorithms for image segmentation,so if the distribution was Gaussian type I will use the first algorithms else use the second algorithm,please could you guide me to do this job.thank in advance for time and support
hamed abdulaziz
hamed abdulaziz el 16 de En. de 2014
I am waiting your comment,please guide me
Walter Roberson
Walter Roberson el 16 de En. de 2014
As Wayne King answered in your duplicate of the question, the solution for what you ask here is kstest as that tests whether the data comes from a normal (== Gaussian) distribution.
hamed abdulaziz
hamed abdulaziz el 20 de En. de 2014
I tried this code:
test_cdf = makedist('normal','mu',10,'sigma',1);
Image1 = imread('d:\200.bmp');
[x1,counts1] = imhist(Image1(:,:,1));
stem(counts1,x1);
[h] = kstest(counts1,test_cdf);
my question is : should I get h=1 if the data seta are fit?
hamed abdulaziz
hamed abdulaziz el 20 de En. de 2014
please I am waiting your answeres...
h = kstest(counts1, 'CDF', test_cdf );
would return 1 if there is a 95% or greater likelyhood that the data came from the given cdf.
Note: When you wait 3 1/2 days to reply, it is not fair to expect the volunteers to reply within 1 hour. We cannot be checking every hour for days on end. We are still debating whether Wayne King or Image Analyst ever sleep, but we have it on good authority that they do stop to eat.
hamed abdulaziz
hamed abdulaziz el 20 de En. de 2014
Thank you, and I am sorry for bothering Mathworks community,
Please do you mean there is a probability of the similarity equals to 95% ?
Walter Roberson
Walter Roberson el 20 de En. de 2014
If h returns as 1, then the probability of a false match is less than 5%, so the probability of a correct match is at least 95% (not exactly 95%)
hamed abdulaziz
hamed abdulaziz el 20 de En. de 2014
Ok, but I tried another binary image (bit depth = 1 bit) bitmap type, and also h returns as 1
hamed abdulaziz
hamed abdulaziz el 20 de En. de 2014
I was suppose I will get a different value of h (i.e h will be equal zero)
Walter Roberson
Walter Roberson el 20 de En. de 2014
imhist returns [counts, x] not [x, counts]
For a binary image (datatype logical) you would only have 2 bins, so you would be working out the probability that the two counts are consistent with a Gaussian distribution. With only two samples, the probability calculations are not statistically meaningful.
hamed abdulaziz
hamed abdulaziz el 20 de En. de 2014
Thank very much Dr.Walter Roberson,for clarification,and I promise you if I asked another question I'll be patient for waiting reply . Regards

Iniciar sesión para comentar.

Preguntada:

el 16 de En. de 2014

Comentada:

el 20 de En. de 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by