当前位置:网站首页>【图像分割】基于形态学实现视网膜血管分割附matlab代码
【图像分割】基于形态学实现视网膜血管分割附matlab代码
2022-06-24 06:41:00 【Matlab科研工作室】
1 简介
目的 影像中血管的分割与特征提取,对疾病的早期诊断具有重要意义.针对很多视网膜血管提取算法分割精度不高的问题,提出了运用数学形态学中的高帽变换的方法对其进行检测.方法 首先,选取结构元素为"圆盘形"的形态学对图像进行高帽变换,经过高帽变换后的图像平滑了图像的背景,同时增强了血管在图像中的对比度.其次,对变换后的图像利用Otsu's自动分割法对图像进行阈值分割得到血管的二值图像.再次,根据血管在图像中的结构信息和几何信息,利用基于连通域度量的方法,设置连通域的"面积"和"长宽比"两个阈值,去除虚假目标.最后,为保持血管的连续性,对图像进行一次膨胀运算,可将断裂的血管连接起来,减小了实验的误差.结果 通过上述步骤实现了对血管的提取.结论 结果表明,本文算法能有效提取视网膜眼底图像的血管网络,有较强的分割精度.
2 部分代码
%%clearclcim=imread('Retina_drive_1.tif');bw_mask=imread('Retina_drive_1_mask.gif');bw_mask=logical(bw_mask);ref_im=imread('Retina_drive_1_Ref.gif');%im=im(:,:,2);im=mat2gray(im).*mat2gray(bw_mask);im=imcomplement(im);% Assume vessels are lighter than backgroundim=im2double(im);ref_bw=im2bw(ref_im,0.5);%%DEG_NUM=12;LEN_c=11;LEN_o=11;LEN_diff=7;%ic1=reconstruction_by_dilation(im,LEN_c,DEG_NUM);io1=min_openings(im,LEN_o,DEG_NUM);iv=mat2gray(ic1-io1);imDiff=smooth_cross_section(iv,LEN_diff,LEN_c);imL=reconstruction_by_dilation(imDiff,LEN_c,DEG_NUM);imF=reconstruction_by_erosion(imL,LEN_c,DEG_NUM);%figure,imshow(iv);title('iv');figure,imshow(imDiff);title('imDiff');figure,imshow(imL);title('imL');figure,imshow(imF);title('imF');%% Hysteresis thresholdingTH_LOW=30;TH_HIGH=40;min_obj=180;min_hole=10;%mask=im2bw(imF,TH_LOW/255);marker=im2bw(imF,TH_HIGH/255);bw_result=imreconstruct(marker,mask);%% some extra cleaning on the result.bw_result=bw_result& bw_mask;bw_result = clear_bw(bw_result, min_obj, min_hole);%figure,imshow(bw_result);title('result');r=eval_metrics(bw_result,ref_bw,bw_mask);fprintf('TPR=%g\n FPR=%g\n accuracy=%g\n precision=%g\n',...r(1),r(2),r(3),r(4));
3 仿真结果


4 参考文献
[1]李丽华, 王凯. 基于数学形态学的视网膜血管提取算法[J]. 北京生物医学工程, 2014, 33(5):5.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
- How do I turn off win10 automatic update? What are the good ways?
- Spark项目打包优化实践
- 【帧率倍频】基于FPGA的视频帧率倍频系统verilog开发实现
- Introduction to game design and development - layered quaternion - dynamic layer
- JVM调试工具-Arthas
- On update current in MySQL_ TIMESTAMP
- How to build an app at low cost
- Oracle SQL comprehensive application exercises
- 华为云图引擎服务
- High energy ahead: Figure 18 shows you how to use the waterfall chart to visually reflect data changes
猜你喜欢

setInterval里面的函数不能有括号

Unexpected token u in JSON at position 0

关于取模数据序号定位的说明 区码定位是指GBK编码

面渣逆袭:MySQL六十六问,两万字+五十图详解

Arduino raised $32million to enter the enterprise market
![[Yugong series] June 2022 asp Basic introduction and use of cellreport reporting tool under net core](/img/18/1576cb7bdae5740828d1db5b283aee.png)
[Yugong series] June 2022 asp Basic introduction and use of cellreport reporting tool under net core

内网学习笔记(4)

Win11笔记本省电模式怎么开启?Win11电脑节电模式打开方法

【云驻共创】华为云HCIA-IoT V2.5培训系列内容之物联网概览

Localized operation on cloud, the sea going experience of kilimall, the largest e-commerce platform in East Africa
随机推荐
0 foundation a literature club low code development member management applet (II)
[problem solving] virtual machine configuration static IP
Accumulateur Spark et variables de diffusion
App management platform app host
puzzle(019.1)Hook、Gear
Vmware tools still exist after normal uninstallation for many times. How to solve it
Big factories are not the only way to measure ability. The three years' experience of Shangcai's graduation
【云驻共创】华为云HCIA-IoT V2.5培训系列内容之物联网概览
JVM debugging tool -jvisualvm
毕业季进击的技术
成为 TD Hero,做用技术改变世界的超级英雄 | 来自 TDengine 社区的邀请函
What is JSP technology? Advantages of JSP technology
In the middle of the year, I have prepared a small number of automated interview questions. Welcome to the self-test
System design: partition or data partition
. Net7 miniapi (special part):preview5 optimizes JWT verification (Part 1)
【pointNet】基于pointNet的三维点云目标分类识别matlab仿真
Tencent host security captures Yapi remote code execution 0day vulnerability for wild exploitation. The attack is spreading and can be intercepted by firewall
华为云图引擎服务
On update current in MySQL_ TIMESTAMP
FreeRTOS MPU makes the system more robust!