【图像检测】基于B-COSFIRE算法实现边缘检测matlab代码

339 阅读2分钟

1 简介

The inspection of retinal fundus images allowsmedical doctors to diagnose various pathologies. Computeraided diagnosis systems can be used to assist in this process.As a fifirst step, such systems delineate the vessel tree fromthe background. We propose a method for the delineation ofblood vessels in retinal images that is effective for vesselsof different thickness. In the proposed method, we employa set of B-COSFIRE fifilters selective for vessels and vesselendings. Such a set is determined in an automatic selectionprocess and can adapt to different applications. We comparethe performance of different selection methods based uponmachine learning and information theory. The results thatwe achieve by performing experiments on two public benchmark data sets, namely DRIVE and STARE, demonstrate theeffectiveness of the proposed approach.

2 部分代码

clc
clear all
close all
% Detection and segmentation of elongated structures in images
%
% Version:     v1.0
% Author:       Nicola Strisciuglio (nic.strisciuglio@gmail.com)
%
% Application of the B-COSFIRE filters for detection of elongated
% structures in images.
%
% This code provides the benchmark results on the images of the INRIA line network data
% set used in the paper Strisciuglio, N. Petkov, N. Delineation of line patterns in
% images using B-COSFIRE filters, IWOBI 2017".
%
% If you use this software please cite the following paper:
%
% George Azzopardi, Nicola Strisciuglio, Mario Vento, Nicolai Petkov,
% Trainable COSFIRE filters for vessel delineation with application to retinal images,
% Medical Image Analysis, Volume 19 , Issue 1 , 46 - 57, ISSN 1361-8415
%
% Strisciuglio, N. Petkov, N. "Delineation of line patterns in images
% using B-COSFIRE filters", IWOBI 2017

if ~isdeployed
   addpath('./COSFIRE');
   addpath('./Gabor');
   addpath('./Performance');
   addpath('./Preprocessing');
end

% NOTE: It requires a compiled mex-file of the fast implementation
% of the max-blurring function.
if ~exist('./COSFIRE/dilate')
   BeforeUsing();
end


%% Process images
LEAF = 1;
ROAD = 2;
RIVER = 3;
TILE = 4;
images = [LEAF, ROAD, RIVER, TILE];

for n = 1:numel(images)
  [dname, eval_radius, params] = GetParameters(images(n));
   
   disp(['Processing image: ' dname]);
  [img, response, GT, mask] = ProcessImage(images(n), dname, params);
  [th, tpr, fpr, mcc] = ComputePerformance(response, GT, mask, eval_radius);
   
   figure;
   subplot(1,3,1); imagesc(img); axis off; axis image; title(['Image: ' dname]);
   subplot(1,3,2); imagesc(response); colormap gray; axis off; axis image; title('B-COSFIRE response');
   subplot(1,3,3); imagesc((rescaleImage(response, 0255) + 1) .* mask > th); colormap gray; axis off; axis image; title(['Binary - Mcc: ' num2str(mcc)]);
   
   disp(['TPR: ' num2str(tpr) ' - FPR: ' num2str(fpr) ' - MCC: ' num2str(mcc)]);
end

3 仿真结果

4 参考文献

[1]王妍力等. "基于MATLAB数字图像边缘检测算法的研究与对比分析." 居舍 29(2017):2.​

部分理论引用网络文献,若有侵权联系博主删除。

5 MATLAB代码与数据下载地址

见博客主页