desccuboid_imdesc.m

来自「cuboid democuboid democuboid democuboid 」· M 代码 · 共 33 行

M
33 行
字号
% Cuboid descriptor based on a concatentation of the types of frames present.%% That is imdesc must be an image (ie frame) descriptor, furthermore it must contain% clusters, so that the descriptor of the frame is a clusters assignment.  Hence each% frame gets assigned to a cluster, and then the cuboid descriptor is simply a histogram% of the frames present (alternatively, implementation could preserve order).%% INPUTS%   I               - MxNxT double array (cuboid) with most vals in range [-1,1]%   imdesc          - frame descriptor%% OUTPUTS%   desc            - 1xp feature vector%% See also IMAGEDESC, DESCCUBOID_GRAD, DESCCUBOID_WWfunction desc = desccuboid_imdesc( I, imdesc )    if( ndims(I)~=3 ) error('I must be MxNxT'); end;    if( ~isa(I,'double') ) error('I must be of type double'); end;    if(~isfield(imdesc,'clusters'))          error( 'imdesc must have clusters' ); end;         % get descriptor for frames of cuboids, will be of size TxP    fdesc = imagedesc( I, imdesc );     if( size(fdesc,2)==1 )        k = size(imdesc.clusters,1);        desc = histc1D( fdesc, [.5:(k+.5)] );     else        desc = sum( fdesc, 1 );    end;                

⌨️ 快捷键说明

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