C++ codes, implement bag of features algorithm, using SVM classifier