i am trying to implement probality density function on an image but i can not understand how to calculate data, mu and sigma.here is my code is it right to take data as pixl value

1 Ansicht (letzte 30 Tage)
k = imread('2.jpg');
img2=rgb2gray(k);
sigma =?;
mu=?
pd = makedist('Normal',mu,sigma);
data = img2(I,j)
y = pdf(pd,data);
figure,
plot(data,y,'LineWidth',2)

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 23 Aug. 2015
mu = mean2(img2);
sigma = std2(img2);
  4 Kommentare

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Geometric Transformation and Image Registration finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by