Hello,
I am stuck with mri images that is why I ask for help.
I want to make Rayleigh and Gaussian distribution of intensities of the image and then fit it to the histogram but it does not work.
Below you can find my example and sample of code:
clc; clear all; close all;
I=dicomread('image.dcm'); I=uint8(round(double (I)));
I=I(:)'; [muhat, sigmahat]=normfit(I); mean_value=round(muhat); sigma_value=round(sigmahat);
x=0:1:29952; for i=1:size(x')
gauss(i)=100*exp( - (x(i)-mean_value)^2/(2*sigma_value^2)/(sigma_value*sqrt(2*pi)));
end
x=0:1:29952; for i=1:size(x')
rayl(i)=500*exp( - (x(i)^2/(2*sigma_value^2)*(x(i)/sigma_value^2)));
end
figure(3) plot(x,gauss, x,rayl) hold on imhist(I)
THANK YOU for your help in advance
1 Comment
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/39984-gaussian-and-rayleigh-distribution-mri-late-enhancement#comment_82630
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/39984-gaussian-and-rayleigh-distribution-mri-late-enhancement#comment_82630
Sign in to comment.