How to implement gray level probability density function?
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
chitresh
le 18 Fév 2014
Réponse apportée : Image Analyst
le 18 Fév 2014
the gray-level probability density function given as P(g) = h(g)/M, where h(g) is the number of pixels with gray level g and M is the total number of pixels in the image.
I want to implement this on a gray scale image, my question is what is h(g) in my case and what are gray level g... i know M is (row*colum) please answer
0 commentaires
Réponse acceptée
Image Analyst
le 18 Fév 2014
% Get histogram:
[pixelCounts, grayLevels] = imhist(grayImage);
% Computer probability density function:
pdf = pixelCounts / numel(grayImage);
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!