当前位置:网站首页>【图像分割】基于形态学实现视网膜血管分割附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代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
- 【帧率倍频】基于FPGA的视频帧率倍频系统verilog开发实现
- Big factories are not the only way to measure ability. The three years' experience of Shangcai's graduation
- Leetcode概率题面试突击系列11~15
- How to build an app at low cost
- [problem solving] virtual machine configuration static IP
- Unexpected token u in JSON at position 0
- 【pointNet】基于pointNet的三维点云目标分类识别matlab仿真
- Bay area enterprises quick look! The focus of the data regulations of Shenzhen Special Economic Zone just released is coming!
- You have a chance, here is a stage
- Counter attack of flour dregs: MySQL 66 questions, 20000 words + 50 pictures
猜你喜欢
随机推荐
JVM调试工具-jps
c#:互斥锁的使用
RealNetworks vs. 微软:早期流媒体行业之争
你有一个机会,这里有一个舞台
Kaseya of the United States was attacked by hackers, and 1500 downstream enterprises were damaged. How can small and medium-sized enterprises prevent extortion virus?
MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等
Spark参数调优实践
SAP实施项目上的内部顾问与外部顾问,相互为难还是相互成就?【英文版】
Decryption of the original divine square stone mechanism
[binary number learning] - Introduction to trees
華為雲數據庫進階學習
Nine unique skills of Huawei cloud low latency Technology
[Yugong series] June 2022 asp Basic introduction and use of cellreport reporting tool under net core
智能视觉组A4纸识别样例
数据同步工具 DataX 已经正式支持读写 TDengine
Command ‘[‘where‘, ‘cl‘]‘ returned non-zero exit status 1.
JSON online parsing and the structure of JSON
What is JSP technology? Advantages of JSP technology
Another double win! Tencent's three security achievements were selected into the 2021 wechat independent innovation achievements recommendation manual
【云驻共创】华为云HCIA-IoT V2.5培训系列内容之物联网概览









