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

📄 main.m

📁 phow is the code for extracting pyramid features from image
💻 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 + -