I am Charmie

メモとログ

FLANN

FLANN autotuned

I had a run time error when using flann::AutotunedIndex for a small set of 2d points (like 10-20 points). Possible solution is not to use flann::AutotunedIndex for such low dimensional data as mentioned here and here. The cause might be fl…

convert 2d vector to flann::Matrix

[code lang="cpp"] template <typename ValueType> flann::Matrix<ValueType> convertVector2Flann( const std::vector< std::vector< ValueType> >& v ) { size_t rows = v.size(); size_t cols = v[0].size(); size_t size = rows*cols; flann::Matrix<ValueType>m(new ValueType[size], rows, cols);</valuetype></valuetype></typename>…

convert Eigen::Matrix to flann::Matrix

The following functions convert (note the matrix size!!) a column-major NxM Eigen::Matrix to a row-major MxN flann::Matrix. a row-major NxM Eigen::Matrix to a row-major NxM flann::Matrix. [code lang="cpp"] template <typename ValueType> flann::Matrix<ValueType> convertEi</valuetype></typename>…

FLANN: sample code to try different search algorithms

[code lang="cpp"] include <iostream> include <string> include <vector> include <map> include <flann/flann.hpp> include <flann/io/hdf5.h> std::vector<flann::flann_algorithm_t> indexFlannAlgorithm = { flann::FLANN_INDEX_LINEAR, flann::FLANN_INDEX_KDTREE, flann::FLANN_INDEX_KMEANS, flann::FLANN_INDEX_C…</flann::flann_algorithm_t></flann/io/hdf5.h></flann/flann.hpp></map></vector></string></iostream>

FLANN

IndexParam: LinearIndexParams: 全探索(brute-force) KDTreeIndexParams: randomized kd-treesの集合をparallelに探索 treesの数は1-16が良い KMeansIndexParams: 階層k-means tree CompositeIndexParams: randomized kd-treeと階層k-meansの組み合わせ KDT…

CMakeLists.txt for FLANN example

http://people.cs.ubc.ca/~mariusm/uploads/FLANN/datasets/dataset.hdf5 http://people.cs.ubc.ca/~mariusm/uploads/FLANN/datasets/dataset.dat http://people.cs.ubc.ca/~mariusm/uploads/FLANN/datasets/testset.dat [code lang="bash"] cmake_minimum_r…

FLANN installation on Ubuntu 14.04

http://www.cs.ubc.ca/research/flann/#download [code lang="bash"] sudo apt-get install libgtest-dev mkdir flann-1.8.4-build cd flann-1.8.4-build cmake ../flann-1.8.4-src make make install [/code]