I am Charmie

メモとログ

2015-09-01から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>…

PyOpenGL, PyGame関連ページ

PyOpenGLについて分かりやすく日本語で書いてあるサイト PyOpenGL利用ノート PyOpenGL Tutorial PyGameについて分かりやすく日本語で書いてあるサイト Pythonでゲーム作りますが何か? pygameドキュメント

PyOpenGL installation using Anaconda

For Windows 32bit or other OS conda install pyopengl For WIndows 64bit The above command does not install some dll files to execute glut related function. So, a solution is (1) to copy necessary dll files to one of bin directory such as C:…

PyGame installation using Anaconda

[code lang="bash"] Search the packages by executing the following command. binstar search -t conda pygame For Linux 64bit conda install -c https://conda.binstar.org/tlatorre pygame For Windows 64bit conda install -c https://conda.binstar.o…

CMake: download a file

The following code download a file from URL as FILE. file(DOWNLOAD URL FILE) ex. file(DOWNLOAD http://www.data.com/download.txt ${CMAKE_SOURCE_DIR}/download.txt)

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]

CurveLab compilation on Ubuntu 14.04

Download the package from the official site. Note that the download requires user registration. Then, compile the package with the following command. make sure that FFTW was configured with ./configure --with-pic edit FFTW_DIR in makefile.…

FFTW installation

download fftw package from the official site and uncompress the file. Then, execute the following command to compile and install the package in the root directory of the uncompressed package. [code lang="bash"] ./configure make sudo make i…

pokemon database

pokedex Excel pkdx No.1-649

wget alternative on Windows 8

Using PowerShell software, the following command download from TARGET_URL as OUTPUT Invoke-WebRequest -Uri TARGET_URL -OutFile OUTPUT

Hashing

“Is there a transformed (rotated, translated, and scaled) subset of some model point-set which matches a subset of the scene point-set.” [4] Reference frame -> a 2D hash table Local affine frame [2] uses triplet of non-collinear points. Th…