File Exchange

image thumbnail

Trainable COSFIRE filters for vessel delineation with application to retinal images

version 1.2 (838 KB) by

B-COSFIRE filters detect line at different orientations by combining the responses of DoG filters.

4.76923
15 Ratings

42 Downloads

Updated

View License

Retinal imaging provides a non-invasive opportunity for the diagnosis of several medical pathologies. The automatic segmentation of the vessel tree is an important pre-processing step which facilitates subsequent automatic processes that contribute to such diagnosis.
V1.2: Visualize B-COSFIRE output response and segmented image when Application() is called without output parameters.
V1.1: Computation of the orientation map added.
We introduce a novel method for the automatic segmentation of vessel trees in retinal fundus images. We propose a filter that selectively responds to vessels and that we call B-COSFIRE with B standing for bar which is an abstraction for a vessel. It is based on the existing COSFIRE (Combination Of Shifted Filter Responses) approach. A B-COSFIRE filter achieves orientation selectivity by computing the weighted geometric mean of the output of a pool of Difference-of-Gaussians filters, whose supports are aligned in a collinear manner. It achieves rotation invariance efficiently by simple shifting operations.
The proposed filter is versatile as its selectivity is determined from any given vessel-like prototype pattern in an automatic configuration process. We configure two B-COSFIRE filters, namely symmetric and asymmetric, that are selective for bars and bar-endings, respectively. We achieve vessel segmentation by summing up the responses of the two rotation-invariant B-COSFIRE filters followed by thresholding.
If you use this script please cite the following papers:
[1] "George Azzopardi, Nicola Strisciuglio, Mario Vento, Nicolai Petkov, Trainable COSFIRE filters for vessel delineation with application to retinal images, Medical Image Analysis, Available online 3 September 2014, ISSN 1361-8415, http://dx.doi.org/10.1016/j.media.2014.08.002"
[2] “N. Strisciuglio, G. Azzopardi, M. Vento, and N. Petkov” - Supervised vessel delineation in retinal fundus images with the automatic selection of B-cosfire filters. Machine Vision and Applications, doi:10.1007/s00138-016-0781-7

Comments and Ratings (26)

remaoun salim

Xingtian dong,
you can find instructions in the README file, where it says that you have to run the script BeforeRunning.m in order to compile a MEX file required by COSFIRE filters.

xingtian dong

I can't run it. It says you haven't define 'dilate'.
 blurshift>maxgaussianfilter (line 44)
        Z = dilate(dilate(Z1,gauss1D,f1(1)-1,f1(end),f2(1)-1,f2(end)),gauss1D',f1(1)-1,f1(end),f2(1)-1,f2(end));

Dear Haolin,
the problem was that you tried to call Application() without an output parameter.
If you wanted the B-COSFIRE response only, you could call
resp = Application();

If you wanted also the orientation map you could type
[resp, oriensmap] = Application();

Anyway, I corrected this bug and if you download the actual code, MATLAB will visualize the B-COSFIRE response image and the binary vessel map in two different windows when Application() is called without output parameters.

haolin

haolin (view profile)

Dear Muhammad, ‘Reference to non-existent field 'respimage'.

Error in Application (line 56)
output.segmented = (output.respimage > 37);’,i don't know what cuase that, please tell me , thank you

haolin

haolin (view profile)

Dear Muhammad, ‘Reference to non-existent field 'respimage'.

Error in Application (line 56)
output.segmented = (output.respimage > 37);’,i don't know what cuase that, please tell me , thank you

haolin

haolin (view profile)

Thanks for your research, it's extremely promote my work!!!

lei ru

lei ru (view profile)

good jop!

Ciro Mascolo

Dear Muhammad,
L is a parameter whose value has to be chosen by you. It should be the average width (in terms of pixels) of the vessels you want to detect in your images.

Hello Nicola,
can you please provide details that how to estimate a reasonable value of sigma. I have funds images having size of 2 MB. I got a lot of noise. I found an equation in section 3.6 to estimate sigma automatically but I don't understand that how to compute the value of "L" in that equation.

ting su

Philipp

Thanks for the submission, works great!
One comment/tip: the quality of the result improves significantly when applying illumination correction, i.e. subtracting from the grayscale image the median filtered image with large region size (I use 25 pixels).

Dear Michal,
The parameters of the filter, especially the sigma and the rho, are specific for the characteristics of the vessel-like structures that you want to detect. For high-resolution images, I would expect thicker vessels, so I would use lager values for "sigma". It is the same (more or less) if you reduce the resolution of the images: in this case the vessels become thinner and you can use lower values of sigma. By the way, in Section 3.4 of the paper "Trainable COSFIRE filters for vessel delineation with application to retinal images" there is a suggestion about how to estimate a reasonable value of sigma. Hope it was helpful.

Michal

Michal (view profile)

quick follow up on my previous comment. high resolution of picture causes the algorithm to break and pick up a lot of noise, upon re sizing <1000px works like charm and is super fast

Michal

Michal (view profile)

How should I select the symmfilter and asymmfilter parameters ? when i try to use the same as in demo for my fundus image the segmentation pick up a lot of noise. Or I'm missing some pre-processing step ? Any advice on how to segment this image will be appreciatted.
https://goo.gl/0A4pSe

Thank you
Michal

Very fast algorithm!

Astone

Astone (view profile)

ESTEFANÍA

Ugo Moschini

Hi zoaia asif, in the zip package you find a README file with the instructions.

zoaia asif

how to run these codes? and which m file to run initially?

We use a vector of the type 0:255 (so 256 values) in Matlab. It indicates the interval for the scaling of the response image and the set of thresholds to use for the evaluation of the algorithm.

Sana Alam

What is the value of span in getStatsData function?

Updates

1.2

V1.2: Visualize B-COSFIRE output response and segmented image when Application() is called without output parameters.

1.1

Changelog
v1.1
    1) Feature for the computation of the orientation map added.
    2) B-COSFIRE filter configuration performed on a vertical-oriented
        prototype pattern as described in [1]

1.0

this is not a toolbox

MATLAB Release
MATLAB 7.14 (R2012a)

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

» Watch video

v1.2/BCOSFIRE_matlab/

v1.2/BCOSFIRE_matlab/COSFIRE/

v1.2/BCOSFIRE_matlab/Gabor/

v1.2/BCOSFIRE_matlab/Performance/

v1.2/BCOSFIRE_matlab/Preprocessing/