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.
The B-COSFIRE filters can be used for detection of any elongated patterns in images:
- blood vessels in medical images
- roads and rivers in aerial images
- leaf nerves in natural images
- tiles in mosaics and textured images
The code is continuosly updated in the GitLab repository https://gitlab.com/nicstrisc/B-COSFIRE-MATLAB
If you use this script please cite the following papers:
 "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"
 "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
V1.4: Added CrackDetectionCluster.m - Experimental code (and data) to replicate results in the CAIP17 paper.
V1.3: Examples added, which are in the paper "N. Strisciuglio, N.Petkov - Delineation of line patterns in images using B-COSFIRE filters, IWOBI 2017". Correction of the approximated computation of the shifting vectors.
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.
Nicola Strisciuglio (2021). Trainable COSFIRE filters for curvilinear structure delineation in images (https://www.mathworks.com/matlabcentral/fileexchange/49172-trainable-cosfire-filters-for-curvilinear-structure-delineation-in-images), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- Sciences > Biological and Health Sciences > Biomedical Imaging >
- Sciences > Neuroscience > Behavior and Psychophysics >
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Image Arithmetic >
- Sciences > Biological and Health Sciences > Biomedical Imaging > Retinal Imaging >
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!