資源簡介
Frangi濾波是基于Hessian矩陣構造出來的一種邊緣檢測增強濾波算法在上面的Hessian程序中,高斯平滑參數σ為標準差,對于血管這種線形結構,當尺度因子 σ 與血管的實際寬度最匹配時,濾波器的輸出最大。所以作為空間尺度因子,迭代可以得到不同尺度的輸出。局部特性分析的窗口矩形的半寬一般為 3σ。
代碼片段和文件信息
function?[outImwhatScaleDirection]?=?FrangiFilter2D(I?options)??
%?This?function?FRANGIFILTER2D?uses?the?eigenvectors?of?the?Hessian?to??
%?compute?the?likeliness?of?an?image?region?to?vessels?according??
%?to?the?method?described?by?Frangi:2001?(Chapter?2).??
%?[JScaleDirection]?=?FrangiFilter2D(I?Options)??
%?inputs??
%???I?:?The?input?image?(vessel?image)??
%???Options?:?Struct?with?input?options??
%???????.FrangiScaleRange?:?The?range?of?sigmas?used?default?[1?8]??
%???????.FrangiScaleRatio?:?Step?size?between?sigmas?default?2??
%???????.FrangiBetaOne?:?Frangi?correction?constant?default?0.5??
%???????.FrangiBetaTwo?:?Frangi?correction?constant?default?15??
%???????.BlackWhite?:?Detect?black?ridges?(default)?set?to?true?for??
%???????????????????????white?ridges?set?to?false.??
%???????.verbose?:?Show?debug?information?default?true??
%?outputs??
%???J?:?The?vessel?enhanced?image?(pixel?is?the?maximum?found?in?all?scales)??
%???Scale?:?Matrix?with?the?scales?on?which?the?maximum?intensity???
%???????????of?every?pixel?is?found??
%???Direction?:?Matrix?with?directions?(angles)?of?pixels?(from?minor?eigenvector)?????
%??
%?Written?by?Marc?Schrijver?2/11/2001??
%?Re-Written?by?D.Kroon?University?of?Twente?(May?2009)??
??
defaultoptions?=?struct(‘FrangiScaleRange‘?[1?5]?‘FrangiScaleRatio‘?2?‘FrangiBetaOne‘?0.5?‘FrangiBetaTwo‘?15?‘verbose‘true‘BlackWhite‘true);??
??
%?Process?inputs??
if(~exist(‘options‘‘var‘))???
????options=defaultoptions;???
else??
????tags?=?fieldnames(defaultoptions);??
????for?i=1:length(tags)??
?????????if(~isfield(optionstags{i}))??options.(tags{i})=defaultoptions.(tags{i});?end??
????end??
????if(length(tags)~=length(fieldnames(options)))???
????????warning(‘FrangiFilter2D:unknownoption‘‘unknown?options?found‘);??
????end??
end??
??
%sigam范圍從FrangiScaleRange(1)到FrangiScaleRange(2),步長為FrangiScaleRatio,具體要結合圖像??
??
sigmas=options.FrangiScaleRange(1):options.FrangiScaleRatio:options.FrangiScaleRange(2);??
sigmas?=
評論
共有 條評論