该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
function [gauss_pyr] = build_gauss_pyr(base, octvs,intvls,sigma)
sig = zeros(1,intvls+3);
gauss_pyr = cell(octvs,intvls+3);
sig(1) = sigma;
k = 2^(1/intvls);
index = 1:intvls +2;
sig_prev = k.^(index-1)*sigma;
sig_total = sig_prev*k;
sig(index+1)=sqrt(sig_total.^2-sig_prev.^2);
for oc =1:octvs
for in = 1:intvls+3
if oc ==1 && in ==1
gauss_pyr{oc,in} = base;
elseif in ==1
subSize = floor(size(gauss_pyr{oc-1,intvls+1})/2);
gauss_pyr{oc,in} = imresize(gauss_pyr{oc-1,intvls+1},subSize,'bicubic');
else
g=gaussian_filter(sig(in));
tmp=imfilter(gauss_pyr{oc,in-1},g,'conv','replicate'); % run the filter across rows
gauss_pyr{oc,in}=imfilter(tmp,g','conv','replicate'); % and then across columns
end
end
end
这篇博客详细介绍了如何使用Matlab构建高斯金字塔,包括设置不同尺度和间隔,应用高斯滤波器对图像进行下采样和上采样,以及在不同层之间进行卷积操作。通过这些步骤,可以实现对图像的多尺度处理,为图像分析和特征提取打下基础。

536

被折叠的 条评论
为什么被折叠?



