【发布时间】:2014-07-16 17:26:52
【问题描述】:
我没有太多使用matlab,我需要从给定的心脏图像中提取心脏的左右冠状动脉部分。
这是我的头像,
基于形态学运算,这是我想出来的,
f=imread('heart.jpg');
diam=strel('diamond',19);
line=strel('line',10,90);
linef=imclose(f,line);
line120=strel('line',10,120);
line120f= imclose(f,line120);
bothline=linef+line120f;
diamf=imclose(f,diam);
arterybm=diamf-bothline;
binaryartery= im2bw(arterybm,0);
mask=cast(binaryartery,class(f));
redPlane=f(:,:,1);
greenPlane=f(:,:,2);
bluePlane=f(:,:,3);
maskedRed=redPlane.*mask;
maskedGreen=greenPlane.*mask;
maskedBlue=bluePlane.*mask;
maskedRGBImage=cat(3,maskedRed,maskedGreen,maskedBlue);
subplot(2,3,1);imshow(f);title('Input Image');subplot(2,3,2);imshow(diamf);title('imclose with Diamond Mask');subplot(2,3,3);imshow(bothline);title('imclose with Line 120 and 90 mask');subplot(2,3,4);imshow(arterybm);title('Difference of line and diamond');subplot(2,3,5);imshow(binaryartery);title('Convert to binary image');subplot(2,3,6);imshow(maskedRGBImage);title('Apply mask to input image');
有没有更好的方法?
【问题讨论】:
-
心脏的左右冠状动脉分别是哪些?你能在图片中标记它们吗?
-
我很困惑,你标记了一个完全不同的图像!您正在使用什么图像?请向我们展示输入和预期输出..
标签: matlab image-processing image-segmentation morphological-analysis