📄 steerfilterpyr.m
字号:
function fpyr = steerFilterPyr(ipyr)% fpyr = steerFilterPyr(pyr)% make filtered pyramid steered towards maximum energy from image% pyramid% pyr image pyramid (cell array of images)% where images may have multiple channels (z coord)% returns filtered image pyramid where each image has 3 channels:% (theta_max, G2^2, H2^2)% if image was multi channel (eg RGB), theta_max is the enegy max of% direction and channel while G2=sum(G2(:,:,channels).^2); % %if not pyramid input if(strcmp(class(ipyr),'cell')==1) pyr = ipyr; else pyr{1}=ipyr; end for l=1:length(pyr) theta =[]; strength=[]; G2=[]; H2=[]; for c = 1:length(pyr{l}(1,1,:)) basis{c} = steerable_gauss(pyr{l}(:,:,c),1); [theta(:,:,c) strength(:,:,c)] = steer_max(basis{c}); end [e,z] = max(strength,[],3); [x y]= meshgrid(1:size(strength,2),1:size(strength,1)); I = sub2ind(size(strength),y,x,z); fpyr{l}(:,:,1) = theta(I); for c = 1:length(pyr{l}(1,1,:)) [G2(:,:,c) H2(:,:,c)] = steer(fpyr{l}(:,:,1),basis{c}); end fpyr{l}(:,:,2) = sum(G2.^2,3)/3.0; fpyr{l}(:,:,3) = sum(H2.^2,3)/3.0; end if(strcmp(class(ipyr),'cell')==0) fpyr = fpyr{1}; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -