How to implement gray level probability density function?
12 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Image Analyst
2014 年 2 月 18 日
% Get histogram:
[pixelCounts, grayLevels] = imhist(grayImage);
% Computer probability density function:
pdf = pixelCounts / numel(grayImage);
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!