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

📄 desccuboid_grad.m

📁 cuboid democuboid democuboid democuboid demo
💻 M
字号:
% Cuboid descriptor based on histogrammed gradient.%% Adaptation of Lowe's SIFT descriptor for cuboids.  Creates a descriptor for an cuboid% that is fairly robust to small perturbations of the cuboid.  No histogramming (if% histflag==-1) See "PCA-SIFT: A More Distinctive Representation for Local Image% Descriptors" by Yan Ke for why this might be a good idea. Should not be called directly,% instead use imagedesc.%% INPUTS%   I               - MxNxT double array (cuboid) with most vals in range [-1,1]%   sigmas          - n-element vector of spatial scales at which to look at gradient%   taus            - n-element vector of temporal scales at which to look at gradient%   ch2params       - see imagedesc_ch2desc%   ignGt           - if 1 the temporal gradient is ignored%% OUTPUTS%   desc            - 1xp feature vector, where p=n*prod(size(cuboid))%% See also IMAGEDESC, IMAGEDESC_CH2DESCfunction desc = desccuboid_GRAD( I, sigmas, taus, ch2params, ignGt )    if( ndims(I)~=3 ) error('I must be MxNxT'); end;    if( ~isa(I,'double') ) error('I must be of type double'); end;    %%% create gradient images    nsigmas = length(sigmas);    for s=1:nsigmas        L = gauss_smooth( I, [sigmas(s) sigmas(s) taus(s)], 'same', 2 );        [Gx,Gy,Gz] = gradient(L);          G = cat(4,Gx,Gy);  if(~ignGt) G=cat(4,G,Gz); end;        if(s==1) GS=repmat(G,[1 1 1 1 nsigmas]); else GS(:,:,:,:,s)=G; end;                end;    %%% call imagedesc_ch2desc      if( ignGt ) nch=2;  else  nch=3;  end;    desc = imagedesc_ch2desc( GS, ch2params, 1, nch, nsigmas );    

⌨️ 快捷键说明

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