I am Charmie

メモとログ

2015-01-01から1年間の記事一覧

Python: pairwise distances between observations in n-dimensional space

Suppose we have an n-dimensional vector v = (v[0], ..., v[N-1]) and we would like to compute a 2D matrix D whose element D[i,j] denotes the distance between v[i] and v[j]. A simple solution combines 2 scipy.spatial.distance functions squar…

ICP algorithm

a list of material explaining ICP algorithm: simple and easy-to-understand explanation on both ICP and its variants blog post explaining each step of the ICP algorithm (in Japanese) (1の内容を簡潔にまとめたブログ記事) Robust Registration o…

TensorFlow installation using Anaconda on Ubuntu

TensorFlow, python package of deep learning, is installable via Anaconda. See the stackoverflow discussion. [code lang="bash"] conda install -c https://conda.anaconda.org/jjhelmus tensorflow [/code]

Sublime Text 3 using Japanese

[code lang="bash"] install ibus-mozc sudo apt-get install -y ibus-mozc reboot ibus ibus-daemon -drx ibus-setup install ibus-mozc sudo apt-get install -y emacs-mozc [/code] Run sublime text 3 and menu->View->Show Console [code lang="bash"] …

OpenCV-Python Tutorials (ver 3.0.0)の和訳

研究室の学生のためにOpenCV-Python Tutorialsの和訳を試みる.githubでチュートリアルのソース1式が公開されているので,このファイルを翻訳→内部ネットワークに公開という手順でいこう.

python 2.7 + OpenCV 3.0.0 on Ubuntu using Anaconda

install anaconda install python packages download OpenCV 3.0.0 source compile OpenCV 3.0.0 with BUILD_opencv_python2 ON (BUILD_opencv_python3 may work with python 3 but I didn't try yet) With default settings, OpenCV package for python 2 i…

python: tensor packages

theano sub-module of theano, used for deep learning. rank: prepared types for rank 0 to 4. higher ranks (>4) tensor must be self-defined. type: dense operations: documentation pytensor the implementation is based on MatLab Tensor Toolbox s…

学術情報交換用変体仮名

変体仮名の文字画像データベース IPAとNINJALが共同開発 クリエイティブ・コモンズ表示−継承21日本ライセンスによって提供 URL

install OCR Tesseract on Ubuntu 14.04

[code lang="bash"] sudo apt-get install tesseract-ocr sudo apt-get install tesseract-ocr-eng tesseract-ocr-deu tesseract-ocr-jpn [/code]

Python: scipy.spatial.KDTree test

this is a short script to test scipy.spatial.KDTree that synthesizes a set of database points builds a kd-tree synthesizes a set of query points runs kNN search using the built kd-tree plots the found kNN points The result plot is like [co…

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…

ウルトラQ 5話 ペギラが来た!

5話 ペギラが来た! 南極の観測船?みたいな状況. 黒煙をまき散らしながら飛行する物体. エンジンが故障したと体調を呼びに来る船員. 船がガタガタ揺れる中,「故郷の土をまくんだ」と東京から来た女性. 船の前に何か巨大な物体(ペギラ)が登場. 何故か…

ウルトラQ 4話 マンモスフラワー

4話 マンモスフラワー 何かよくわからんけど,植物の蔦みたいなもんが町に現れて人を捕まえる事件が発生. 蔦に捕まえられた人を助けるために割ったビンでグサグサ,消火器をかける. 救出後に現れた警官が発表. 場面変わって,採取?した蔦の一部を前に会…

ウルトラQ 3話 宇宙からの贈りもの

3話 宇宙からの贈りもの 小型飛行機で遊覧中の二人組が正体不明のパラシュートが海に落下するのを見つけるところからスタート.ナレーションで「地球に到達した」と言っているので,これが宇宙からの贈りものとやらで間違いなし. かつて日本が打ち上げたロ…

ウルトラQ 2話 五郎とゴロー

2話 五郎とゴロー ロープウェイのロープにでかい猿(ロープウェイの何倍)がぶら下がり,ロープウェイ乗り場がパニックに陥るシーンからスタート. でかい猿は睡眠薬で眠らせてからどっかの島に送ろうと解決.