I am Charmie

メモとログ

2015-09-30から1日間の記事一覧

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>…