当前位置:网站首页>[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 .
边栏推荐
- [problem solving] the connection to the server localhost:8080 was referred
- Implementation and usage analysis of static pod
- JVM調試工具-Arthas
- 20 not to be missed ES6 tips
- Prefix and topic training
- What is an intrusion detection system?
- 0 foundation a literature club low code development member management applet (6)
- Leetcode probability interview shock series 11~15
- Win11分磁盘怎么分?Win11系统怎么分磁盘?
- 1. go deep into tidb: see tidb for the first time
猜你喜欢

JVM調試工具-Arthas

Leetcode probability interview shock series 11~15
![[GUET-CTF2019]zips](/img/79/22ff5d4a3cdc3fa9e0957ccc9bad4b.png)
[GUET-CTF2019]zips

Introduction to raspberry pie 4B development board

简单使用Modbus转BACnet网关教程

电脑如何打开软键盘,教大家Win10如何打开软键盘的方法

How can genetic testing help patients fight disease?

What is the mentality of spot gold worth learning from
![[WUSTCTF2020]爬](/img/b6/4a0582144c3125e7a0666bbbbfe29d.png)
[WUSTCTF2020]爬

Learning to use BACnet gateway of building control system is not so difficult
随机推荐
[DDCTF2018](╯°□°)╯︵ ┻━┻
两个链表的第一个公共节点_链表中环的入口(剑指offer)
2022蓝队HW初级面试题总结
JVM debugging tool -jstack
MySQL enable binlog
Big factories are not the only way to measure ability. The three years' experience of Shangcai's graduation
Maui uses Masa blazor component library
在产业互联网时代不再有真正意义上的中心,这些中心仅仅只是化有形为无形而已
Accelerate large-scale data analysis based on Apache iceberg through data organization optimization
【信号识别】基于深度学习CNN实现信号调制分类附matlab代码
简单使用Modbus转BACnet网关教程
Decryption of the original divine square stone mechanism
[Yugong series] June 2022 asp Basic introduction and use of cellreport reporting tool under net core
取模软件 模拟显示验证取模数据正确性 逆向 把点阵数组bin文件转显示
Huawei cloud image engine service
What is an intrusion detection system?
[GUET-CTF2019]zips
树莓派4B开发板入门
【图像融合】基于像素显着性结合小波变换实现多焦点和多光谱图像融合附matlab代码
PCL 计算多边形的面积