filt_get_s2b_nn1999.m

来自「Standard model object recognition matlab」· M 代码 · 共 39 行

M
39
字号
function [f1, f2, shift] = filt_get_S2b_NN1999% FUNCTION [f1, f2, shift] = filt_get_S2b_NN1999%% This function creates the S2b filters based on the original "HMAX"% S2b convention that appeared in 1999 Nature Neuroscience% (Riesenhuber and Poggio).  Namely, each S2b unit pools from 2x2% grid of C1 units.num_orientation = 4;num_scale_bands = 4;num_old_feature = num_orientation;num_new_feature = 256;% Overlap of 2, and we want to take adjacent C1's.f = zeros(3,3,num_old_feature,num_new_feature);idx = 0;for i = [1:num_orientation]  for j = [1:num_orientation]    for k = [1:num_orientation]      for l = [1:num_orientation]	idx = idx+1;	f(1,1,i,idx) = 1;	f(1,3,j,idx) = 1;	f(3,1,k,idx) = 1;	f(3,3,l,idx) = 1;      end    end  endendf1 = f;f2 = f;shift = 1;% Save in the packaged format.f = [];f = filt_package(f,f1,f2,shift,'s1');save f_S2b_NN1999 f;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?