当前位置:网站首页>[image segmentation] retinal vessel segmentation based on morphology with matlab code
[image segmentation] retinal vessel segmentation based on morphology with matlab code
2022-06-24 07:21:00 【Matlab scientific research studio】
1 brief introduction
Purpose Segmentation and feature extraction of blood vessels in images , It is of great significance for the early diagnosis of diseases . For many retinal blood vessel extraction algorithms, the segmentation accuracy is not high , The method of high hat transformation in mathematical morphology is proposed to detect it . Method First , Select the structure element as " Disc shaped " High hat transformation of the image based on morphology , The image after high hat transform smoothes the background of the image , At the same time, the contrast of blood vessels in the image is enhanced . secondly , Use the transformed image Otsu's The automatic segmentation method performs threshold segmentation on the image to obtain the binary image of the blood vessel . Again , According to the structural and geometric information of blood vessels in the image , Using the method based on connected domain measurement , Set the " area " and " Aspect ratio " Two thresholds , Remove false targets . Last , To maintain the continuity of blood vessels , Perform an expansion operation on the image , It can connect the broken blood vessels , The experimental error is reduced . result Through the above steps, the extraction of blood vessels is realized . Conclusion It turns out that , This algorithm can effectively extract the vascular network of retinal fundus images , It has strong segmentation accuracy .
2 Part of the code
%%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 Simulation results


4 reference
[1] Li Lihua , Wang Kai . Retinal vessel extraction algorithm based on mathematical morphology [J]. Beijing Biomedical Engineering , 2014, 33(5):5.
About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .
Some theories cite network literature , If there is infringement, contact the blogger to delete .
边栏推荐
- 自动化测试是什么?什么软件项目适合自动化测试?
- Summary of 2022 blue team HW elementary interview questions
- App management platform app host
- PCL 计算多边形的面积
- The third session of freshman engineering education seminar is under registration
- OMX的初始化流程
- Maui uses Masa blazor component library
- JVM調試工具-Arthas
- PIP install XXX on the terminal but no module named XXX on pycharm
- JVM调试工具-jvisualvm
猜你喜欢
随机推荐
0 foundation a literature club low code development member management applet (III)
Accelerate large-scale data analysis based on Apache iceberg through data organization optimization
The third session of freshman engineering education seminar is under registration
Deploy loglistener in tke container to collect logs to CLS
Arduino raised $32million to enter the enterprise market
【图像融合】基于NSST结合PCNN实现图像融合附matlab代码
buuctf misc [UTCTF2020]docx
Accumulateur Spark et variables de diffusion
How can genetic testing help patients fight disease?
Leetcode概率题面试突击系列11~15
RDD基础知识点
第三方软件测试公司如何选择?2022国内软件测试机构排名
What is the mentality of spot gold worth learning from
[problem solving] virtual machine configuration static IP
Prefix and topic training
MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等
JVM debugging tool -jmap
[WordPress website] 5 Set code highlight
内网学习笔记(4)
【图像分割】基于形态学实现视网膜血管分割附matlab代码


![[WUSTCTF2020]爬](/img/b6/4a0582144c3125e7a0666bbbbfe29d.png)






