ultrasound image processing: how can I obtain a 2D plot of mean gray level of lesions vs. nominal contrast values of scattering lesions in an ecographic image?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anita De Pisi
el 17 de Mayo de 2020
Comentada: Image Analyst
el 18 de Mayo de 2020
Hi guys, I am a student of biomedical engineering.
I'm dealing with an issue related to an ecographic image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293597/image.png)
It represent scatter lesions of test objects. The specifications of the gray scale ultrasound phantom are the following:
- values of nominal contrast:-9, -6, -3, +3, +6, +9 dB (with respect to background)
- Diameters: 2.4, 4, and 6.4 mm
I had to evaluate the contrast by using this formula:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293598/image.png)
where: "the numerator shows the difference of the mean echo levels of a circular area of surrounding (background) tissue (B) and of lesion (L) and the denominator the the sum of the svariances of the mean linear gray levels of background disk (B) and of lesion disk (L), respectively."
In order to do it, I had started applying the formula referring to only a cyst and then I repeated the procedure for all the objects:
clear
clc
Image = im2double(imread('_032.tif'));
subplot(2, 2, 1);
imshow(Image);
Image_BlackWhite=rgb2gray(Image);
subplot(2, 2, 2);
imshow(Image_BlackWhite);
hold on
subplot(2, 2, 2);
lesion=imcrop(Image_BlackWhite);
background=imcrop(Image_BlackWhite);
%after running the firs part of the code I had taken the dimension of lesion from the workspace
%and cropped a background of the same dimension
backgrond_same_dimension_of_lesion=background(1:60,1:59);
hold off
subplot(2, 2, 3);
imshow(lesion);
subplot(2,2,4);
imshow(background);
lesion_mean=mean(lesion);
background_mean=mean(background);
var_lesion=var(lesion);
var_background=var(background);
%formula:
SNR = (lesion_mean - background_mean)./sqrt(var_lesion+var_background);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293599/image.png)
The first question I have is: is it correct to draw a rectangular area instead of a circular one? Because if I select circular areas, the related matrices will show some zeroes inside due to the conversion from a circular crop image to a matrix.
The second question is: How can I get a 2D plot of the SNR data versus absolute values of nominal contrast ?
Thanks a lot for your help!!
0 comentarios
Respuesta aceptada
Image Analyst
el 17 de Mayo de 2020
The formula looks right but you aren't getting the regions correctly. It's okay to use a rectangular box for inside the region IF you make sure it does not contain any background. However it looks like your larger, outer box contains both the background plus the signal region. So you'll need to use drawcircle to get both the inner and outer masks and the pixels in them. Sum up both lists of pixels. From the outer sum, you'll need to subtract the inner sum to exclude the signal pixels and get only the background pixels. Then also subtract the number of pixels to get the proper area for the outer ring. Now you can get the means and variances correctly for both regions and do your formula. Pretty easy, but let me know if you can't figure it out.
2 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!