⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util_unpack_filter.m

📁 Standard model object recognition matlab code
💻 M
字号:
function [f1, f2] = util_unpack_filter (f, which_scale)% FUNCTION [f1, f2] = util_unpack_filter (f)%% Given the filter structure f, reconstruct f1 and f2 in a 4-D% format, which is more intuitive than a sparse format, created by% filt_package function.  Note that this function will not work for% an extremely large filter (that's why we sparsify in the first% place); in other words, this function is good for looking at low% level filters.scales = aux_get_filt_info (fieldnames(f));if length(find(scales==which_scale)) ~= 1  error('Scale not found');endscale_tag = ['s' num2str(which_scale)];f_f1 = getfield(f, ['f1_' scale_tag]);f_f2 = getfield(f, ['f2_' scale_tag]);f_i1 = getfield(f, ['i1_' scale_tag]);f_i2 = getfield(f, ['i2_' scale_tag]);f_i3 = getfield(f, ['i3_' scale_tag]);f_size = getfield(f, ['size_' scale_tag]);f1 = zeros(f_size);f2 = zeros(f_size);for i = 1:f_size(4)  zero_idx = find(f_i1(:,i)==0);  for j = 1:zero_idx(1)-1    f1(f_i1(j,i), f_i2(j,i), f_i3(j,i),i) = f_f1(j,i);    f2(f_i1(j,i), f_i2(j,i), f_i3(j,i),i) = f_f2(j,i);  endend  

⌨️ 快捷键说明

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