当前位置:网站首页>[image enhancement] vascular image enhancement based on frangi filter with matlab code
[image enhancement] vascular image enhancement based on frangi filter with matlab code
2022-07-02 01:12:00 【Matlab scientific research studio】
1 brief introduction
The contrast of retinal image is low , Disturbed by the boundary of the lesion area , It is difficult to extract the details of blood vessels correctly Frangi The method of retinal blood vessel segmentation based on filter , The simulation results show that the above method has a good effect on the extraction of small blood vessels , It has strong practical value .
2 Part of the code
function I=imgaussian(I,sigma,siz)
% IMGAUSSIAN filters an 1D, 2D color/greyscale or 3D image with an
% Gaussian filter. This function uses for filtering IMFILTER or if
% compiled the fast mex code imgaussian.c . Instead of using a
% multidimensional gaussian kernel, it uses the fact that a Gaussian
% filter can be separated in 1D gaussian kernels.
%
% J=IMGAUSSIAN(I,SIGMA,SIZE)
%
% inputs,
% I: The 1D, 2D greyscale/color, or 3D input image with
% data type Single or Double
% SIGMA: The sigma used for the Gaussian kernel
% SIZE: Kernel size (single value) (default: sigma*6)
%
% outputs,
% J: The gaussian filtered image
%
% note, compile the code with: mex imgaussian.c -v
%
% example,
% I = im2double(imread('peppers.png'));
% figure, imshow(imgaussian(I,10));
%
% Function is written by D.Kroon University of Twente (September 2009)
if(~exist('siz','var')), siz=sigma*6; end
if(sigma>0)
% Make 1D Gaussian kernel
x=-ceil(siz/2):ceil(siz/2);
H = exp(-(x.^2/(2*sigma^2)));
H = H/sum(H(:));
% Filter each dimension with the 1D Gaussian kernels\
if(ndims(I)==1)
I=imfilter(I,H, 'same' ,'replicate');
elseif(ndims(I)==2)
Hx=reshape(H,[length(H) 1]);
Hy=reshape(H,[1 length(H)]);
I=imfilter(imfilter(I,Hx, 'same' ,'replicate'),Hy, 'same' ,'replicate');
elseif(ndims(I)==3)
if(size(I,3)<4) % Detect if 3D or color image
Hx=reshape(H,[length(H) 1]);
Hy=reshape(H,[1 length(H)]);
for k=1:size(I,3)
I(:,:,k)=imfilter(imfilter(I(:,:,k),Hx, 'same' ,'replicate'),Hy, 'same' ,'replicate');
end
else
Hx=reshape(H,[length(H) 1 1]);
Hy=reshape(H,[1 length(H) 1]);
Hz=reshape(H,[1 1 length(H)]);
I=imfilter(imfilter(imfilter(I,Hx, 'same' ,'replicate'),Hy, 'same' ,'replicate'),Hz, 'same' ,'replicate');
end
else
error('imgaussian:input','unsupported input dimension');
end
end
3 Simulation results
4 reference
[1] Yuan pan , Chen Yi . Based on multi-scale Frangi Retinal blood vessel segmentation based on filter [J]. Modern information technology , 2020.
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 .
边栏推荐
- Develop a simple login logic based on SSM
- 工作中非常重要的测试策略,你大概没注意过吧
- BiLSTM-CRF代码实现
- [eight sorts ①] insert sort (direct insert sort, Hill sort)
- Random avatar encyclopedia, multi category wechat applet source code with history_ Support traffic master
- Bubble Sort Graph
- AIX存储管理之卷组属性的查看和修改(二)
- Recently, three articles in the nature sub Journal of protein and its omics knowledge map have solved the core problems of biology
- Viewing and modifying volume group attributes of Aix storage management (II)
- 【八大排序①】插入排序(直接插入排序、希尔排序)
猜你喜欢
Viewing and modifying volume group attributes of Aix storage management (II)
Sql--- related transactions
Advanced skills of testers: a guide to the application of unit test reports
Creating logical volumes and viewing and modifying attributes for AIX storage management
About asp Net core uses a small detail of datetime date type parameter
gradle
Collection: comprehensive summary of storage knowledge
学习笔记24--多传感器后融合技术
Datawhale community blackboard newspaper (issue 1)
[leetcode] number of maximum consecutive ones
随机推荐
XMIND mind map
Mitsubishi PLC FX3U pulse axis jog function block (mc_jog)
Load and domcontentloaded in JS
学习笔记25--多传感器前融合技术
Global and Chinese market of aircraft MRO software 2022-2028: Research Report on technology, participants, trends, market size and share
How does schedulerx help users solve the problem of distributed task scheduling?
AIX存储管理之卷组的创建(一)
2022 safety officer-a certificate examination questions and online simulation examination
Global and Chinese markets for context and location-based services 2022-2028: Research Report on technology, participants, trends, market size and share
Source code of Qiwei automatic card issuing system
Keepalived introduction and installation
[bottom pop-up selector] uniapp picker component - scroll selector popped up at the bottom
"C zero foundation introduction hundred knowledge hundred examples" (73) anonymous function -- lambda expression
Circular statements in shell programming
Docker安装Oracle_11g
2022 operation of simulated examination platform for melting welding and thermal cutting work license
How can programmers better plan their career development?
Basic usage of three JS high-order functions --filter---map---reduce
[eight sorting ③] quick sorting (dynamic graph deduction Hoare method, digging method, front and back pointer method)
程序员该如何更好的规划自己的职业发展?