Util provides create_voc_step0 for batch generation features and save, CREATE_VOC_STEP1 read into features regeneration PLA Class Center, more suitable for a large number of Corpus clustering center generation.
The characteristics of extracting a picture are as follows:
The first line is the file header, with 32bit representation of the feature from several graphs (1), feature descriptor Length (128bit,=32b), feature length (89), feature type (cv8u)
./utils/create_voc_step0 orb fea0 zs00.jpgextracting features...reading image:zs00.jpgextracting features[ INFO:01 0
So a feature is a 89 row *32 column of Cv::mat, such a feature in the voc.transform to generate the word vector before the need to lengthen into (32 rows) of the 89-dimensional vector, like this:
Std::vector<cv::mat> VF (features.rows); // change to this format to use Voc.transform
Printing results:
Feature size:rows = the; cols = +The 0th of VF: [ +X1]the 1th of VF: [ +X1]the 2th of VF: [ +X1]the 3th of VF: [ +X1]the 4th of VF: [ +X1]the 5th of VF: [ +X1]the 6th of VF: [ +X1]the 7th of VF: [ +X1]the 8th of VF: [ +X1]
QueryL1:
For each EntryID, the most recent in the search for the origin from word weights and entryid weights, the implementation in the accumulator program is
Add |qvalue-dvalue|-|qvalue|-|dvalue|, last minus/2
Open source Word bag Model DBOW3 principle & source Code (ii) preservation and reading of ORB features