File Exchange

image thumbnail

Retinal Blood Vessel Extraction

version 1.1 (32.3 KB) by

Extracts blood vessels from a retina image using Kirsch's Templates



View License

This program extracts blood vessels from a retina image using Kirsch's Templates. Filtering of the input retina image is done with the Kirsch's Templates in different orientations. The threshold used in the program, can be varied to fine tune the output blood vessel extracted image.

Comments and Ratings (36)

zhou kangpeng

Vineet Singh

how it is work in matlab (both)

Vineet Singh

an error in function vesselextraction

Jemima Jeba

5x5 kernel gives better results than 3x3 kernel based approach.

jayani dhaya

jayani dhaya

sachin kunthe

doesn't work for stare database

Maira Radu

Hello!Can anyone help me with detection of blood vessels in retinal images using two-dimensional matched filters (matlab code)?Thanks! :D

@Chris Jademan You should run the main.m file not vesselextract.m

Mahadi Hasan

nice work

sir plz tell me how i run this code .it give me error (undefine function vesselsExtraction)when i run main part .plz help me.

good work

Chris Jademan

After I run VesselExtract.m, an error message was displayed: Not Enough Input Arguments.

Would you mind tell me what should I do to fix this error? I appreciate it if you help me.

Nakul Gaikwad

Nice code. how do i generate a code to get the same results in real time.

Sree laksmi

this code is not working please do check

Rashid Khan


La Thien


nazia (view profile)

excellent code


nazia (view profile)

Thanks for share,It really a good program for study!


lisa (view profile)

no access


Chen (view profile)

a good program.


Mahdi (view profile)

hi all.thanks for code but this code is weak and it cant find all vessels in the image. you can use morphological operator and curvelet transform for improving results.

Nima Azar

I'm very to matlab. I would like to test this program, can you tell me how I need to run this?


i have taken retinal blood vessel extraction as ma project using median filter and gaussian filter too. i wul lyk to know hoe to implement them in our project,

pankaj badoni

the same thing could have been achieved with the help of canny edge and then giving the threshold values as input.

Ahmed Ghorab

I need your help in fiding a code for optic disc extraction and to claculate the ODR.

am working on retinal images . first i need to remove the optic disc from my image and then find the region of lesions..i worked on many methods but doesnt seem to get what i please help me out..
the above is the kind of image am working on.. desperately in need of help!!!!!

thanks in advance!! :)

Cippo Lippo

To speed the program up you should not use the for loops in VesselExtract.m:60-68

You can easily vectorise the code with:
bloodVessels = max(t1,t2);
bloodVessels = max(bloodVessels,t3);
bloodVessels = max(bloodVessels,t4);
bloodVessels = max(bloodVessels,t5);
bloodVessels = max(bloodVessels,t6);
bloodVessels = max(bloodVessels,t7);
bloodVessels = max(bloodVessels,t8);


Its an excellent program.



Author Info Updated.

MATLAB Release
MATLAB 6.5 (R13)

Inspired: Retinal Blood Vessels Extraction

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video