Hello, Can someone suggest me how I can do 2SD threshold for CARDIAC MRI.

3 views (last 30 days)
NOTE: The mean and SD of the normal tissue intensities are first estimated by the maximum value of the lower part of the intensity histogram.The threshold value is then calculated as 2SD above the mean. Pixels darker than the threshold are then removed from further analysis.

Accepted Answer

Image Analyst
Image Analyst on 17 Jul 2016
Try this:
theMean = mean2(grayImage);
sd = std2(grayImage);
threshold = theMean + 2 * sd;
binaryImage = grayImage < threshold;
Now it's not clear what "Pixels darker than the threshold are then removed from further analysis." means, but for example if you wanted to blacken those pixels and leave pixels above the threshold as the original gray level, you could do
grayImage(binaryImage) = 0;
If you simply wanted a list of gray levels above the threshold then you could do this:
pixelsToUse = grayImage(~binaryImage);
Note however that that is a vector, not a 2-D image. Please explain exactly what "removed from further analysis" means.
  1 Comment
A-J KHAN
A-J KHAN on 18 Jul 2016
a threshold value was defined to classify healthy and pathological tissues after the fitting process. the code is attach here.. clear;clear all;close all; %%I=dicomread('IM_0001.dcm'); I = imread('A001.jpg'); %% convert the .JPG format to .dcm for furthure processing dicomwrite(I,'A001.dcm'); imshow(I) max(I(:),0); min(I(:),1); hist(double(I(:)),50);
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) %%[c1,c2]=hist(double(I(:)),50);%%f=fit(c1',c2', 'gauss1');%%gauss1=f.a*exp( - (c2-f.b).^2/ (2*f.c^2) ); %%hist(I(:),50),hold on, plot(c2,gauss1,c2,rayl) theMean = mean2(I); sd = std2(I); threshold = theMean + 2 * sd; binaryImage = I < threshold;
For each pixel, if intensity value I is less than μ n , then the pixel is classified as unaffected myocardium, and I map =0; if I is greater than μ e , then it is classified as oedema tissue, and I map =1; I map varies linearly from μ n to μ e . In this study, a membership value of I map ≥ 0.7 was defined as the thresholding value for the regions of oedema. For each pixel, if intensity value I is less than μ n , then the pixel is classified as unaffected myocardium, and I map =0; if I is greater than μ e , then it is classified as oedema tissue, and I map =1; I map varies linearly from μ n to μ e . In this study, a membership value of I map ≥ 0.7 define the regions of oedema. For each pixel, if intensity value I is less than μ n , then the pixel is classified as unaffected myocardium, and I map =0; if I is greater than μ e , then it is classified as oedema tissue, and I map =1; I map varies linearly from μ n to μ e . In this study, a membership value of I map ≥ 0.7 defined for the regions of oedema.value selected from 0.6 to 0.9.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!