?? main.m
字號:
par.VSize = 300; %Vocabulary Size
par.M = 10; %setp between pixels
par.BW = 1; % gray level vocabulary = 0; color vocabulary = 1;
par.nRegions =4; %number of support regions per pixel
par.nPosImages = 30; %number of positive examples per class to build the vocabulary
par.nFeatures = 300; %number of features (within and image) to use to build the vocabulary
par.L = 2;%pyramid level
par.directoriImatges = 'Images/';%directory where the source images are
par.directoriSupport = 'Support/';%direcotry where to save the files containing the support regions
par.directoriSift = 'Sift/';%direcotry where to save the files containing the SIFT features
par.directoriVocabulary = 'vocabulary/';%directory where to save the vocabulary
par.directoriBoW = sprintf('BoW_%d/',par.BW);%directory where to save the Bag of Words
par.directoriPHOW = sprintf('PHOW_%d',par.BW);%directory where to save the pyramid histogram of words
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Extract support regions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fprintf('feature extraction\n');
do_feature_extraction(par);%extract features for all the images in directori Images
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Vocabulary
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fprintf('build vocabulary\n');
do_build_vocabulary(par);%builds a vocabulary using par.nPosImages from directori Images
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%BoW
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fprintf('BoW\n');
do_bag_of_words(par);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%PHOW
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fprintf('PHOW\n');
%have a look to this function if you want compute the descriptor for a ROI
%(and not for the whole image)
vgg_phowDescriptor(par);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -