2013年12月13日金曜日

Raspberry Pi (その前に Mac で)+ OpenCV + OpenNI + Xtion Pro Live

まず、Mac でいろいろやってみる。
OpenCV は MacPorts で opencv @2.4.7_1+openni+python27 をインストールする。
OpenNI も MacPorts で一応入れたものの・・・openni @1.5.7.10_0
OpenNI-MacOSX-x64-2.2 をダウンロード。
「OpenNI-MacOSX-x64-2.2/Samples/Bin」にあるサンプルは動作している。

次に、Samples のソースをいじる前に、make できることを確認する。
make すると deprecated のエラーがでてしまう。
Makefile を修正してコンパイルオプションに「-Wno-deprecated」を追加する。
例を示す。
<<修正前>>
CFLAGS += -Wall -D_CLOSEST_POINT
<<修正後>>
CFLAGS += -Wall -D_CLOSEST_POINT -Wno-deprecated



ClosestPointViewer を make するには、MWClosestPoint を先に make しておかなければならない。
MWClosetPointApp を make するときも、先に MWClosestPoint を make しておかなければならない。

まず、MWClosestPoint/Bin は削除してから、MWClosestPoint を make する。

次に、ClosestPointViewer/Bin/ にある Intermediate と x64-Release の二つのディレクトリは空にする。
MWClosestPoint/Bin/x64-Release/libMWClosestPoint.dylib を、先ほど空にした ClosestPointViewer/Bin/x64-Release/ にコピーする。
コピーコマンドはこれ。
$ cp MWClosestPoint/Bin/x64-Release/libMWClosestPoint.dylib ClosestPointViewer/Bin/x64-Release/
そして、ClosestPointViewer を make する。

同様に、MWClosestPointApp/Bin/ にある Intermediate と x64-Release の二つのディレクトリは空にする。
MWClosestPoint/Bin/x64-Release/libMWClosestPoint.dylib を、先ほど空にした MWClosestPointApp/Bin/x64-Release/ にコピーする。
コピーコマンドはこれ。
$ cp MWClosestPoint/Bin/x64-Release/libMWClosestPoint.dylib MWClosestPointApp/Bin/x64-Release/
MWClosetPointApp を make する。

make できることが確認できたので、ソースをいろいろいじってみることにする。

0 件のコメント:

コメントを投稿