📄 steerchannels.m
字号:
function [fpyr, ch, combineGH] = steerChannels(ipyr, ch)%foo %if not pyramid input if(strcmp(class(ipyr),'cell')==1) pyr = ipyr; else pyr{1}=ipyr; end combineGH=0; if(ch<0) combineGH=1; ch=-ch; end if(length(ch)==1) ch = linspace(-pi/2, pi/2, ch+1); ch = ch(1:end-1); end for l=1:length(pyr) theta =[]; strength=[]; G2=[]; H2=[]; im = mean(pyr{l},3); basis = steerable_gauss(im,1); for d=1:length(ch) [G2 H2] = steer(ch(d),basis); if(combineGH) fpyr{l}(:,:,d,1) = sqrt(G2.^2+H2.^2); fpyr{l}(:,:,d,2) = abs(atan2(H2,G2)); else fpyr{l}(:,:,d,1) = G2; fpyr{l}(:,:,d,2) = H2; end end if(combineGH) maxmap = max(fpyr{l}(:,:,:,1),[],3)+eps; fpyr{l}(:,:,:,1) = min(0.4,fpyr{l}(:,:,:,1).^2./... repmat(maxmap, [1,1,length(ch)])); else maxmap = max(max(abs(fpyr{l}),[],4),[],3)+eps; fpyr{l} = max(-0.4, min(0.4,fpyr{l}.*abs(fpyr{l})./... repmat(maxmap, [1,1,length(ch),2]))); end end if(strcmp(class(pyr),'cell')==1) fpyr = fpyr{1}; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -