-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateDictionaries.m
33 lines (28 loc) · 934 Bytes
/
createDictionaries.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function [] = createDictionaries(params, varargin)
% CREATEDICTIONARIES select the right method and calls the adequate
% clusterDescriptors to construct bag of visual words (BOVW) dictionaries.
%
% Parameters to be used:
%
% params
%
% See also private/CLUSTERDESCRIPTORS, private/CLUSTERDESCRIPTORSSPARSE
% Author: Jose Rivera-Rubio
% Date: March, 2015
if nargin > 1
trainingSet = varargin{1};
else
trainingSet = params.trainingSet;
end
dictPath = fullfile(params.dictPath,num2str(params.dictionarySize));
if strcmpi(params.descriptor,'SIFT')
clusterDescriptorsSparse(...
params.descrDir,params.descriptor,params.corridors,...
params.dictionarySize,trainingSet,dictPath)
else % dense
clusterDescriptors(...
params.descrDir,params.descriptor,params.corridors,...
params.dictionarySize,trainingSet,dictPath)
end
end % end createDictionaries