Based on:
[**Object Retrieval with Large Vocabularies **]
- MATLAB
- VLFeat (MATLAB API)
$ cd BoWImageMatching $ matlab
In MATLAB:
```matlab
>> cd src
>> edit bow_getDefaultParams.m % change the path to vlfeat's vl_setup script
>> bow_getDefaultParams; % get the params variable with default settings
>> model = bow_computeVocab('~/imagesDir', params);Alternate option: Train only on subset of images from imagesDir/, given from a list
>> model = bow_computeVocab('~/imagesDir', params, 'imgsListFpath', '/path/to/TrainSet.txt');>> iindex = bow_buildInvIndex('~/imagesDir', model);Alternate option: Train only on subset of images from imagesDir/, given from a list
>>
Note: Geometric reranking done by fitting a fundamental matrix using RANSAC, and counting the number of inliers.