忍者ブログ
MASTER →  ADMIN / NEW ENTRY / COMMENT
現代魔法(nearly equal 情報技術)を勉強中な人のメモ(チラシの裏)
/ 2024/03/29 (Fri) / 編集
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

/ 2008/05/30 (Fri) / 編集
さて、先生にOpenCVをインストールについて調べるように言われた訳だ、というわけでインストールしようとしたらなんかいろいろ必要らしい。

しかたないのでパッケージ管理ソフトを入れることにした、OpenCVのインストール法を紹介してるサイトではFinkを使ってたがあえてMacPortsにしてみる。

まぁインストール法と言っても簡単だ
まずは MacPortsのサイトからdmgファイルをダウンロードしてインストールする。
次にPortfile を Subversion リポジトリから取得するのだがLepardにはSubversionはデフォルトでインストールされてるので以下のコマンドをうつだけ。(注:死ぬほど時間かかります。)(注2:別にやらなくてもいいらしい。)
%cd ~/
%mkdir dports
%svn co http://www.cozmixng.org/repos/dports/trunk dports
%mkdir macports
%svn co http://svn.macports.org/repository/macports/trunk
それからこのportfileを参照するように設定ファイルをいじる。
%sudo vi /opt/local/etc/macports/sources.conf
ーー
# To enable your local ports repository, uncomment and customize the
# following line to point at your local dports directory
# Example: file:///Users/landonf/misc/darwinports/dports
#
file:///Users/your_user_name/dports # <- これ追加
file:///Users/e055717/macportsfile/dports # <- これも追加
# To get darwinports from the darwinports rsync server use:
# rsync://rsync.darwinports.org/dpupdate/dports
rsync://rsync.darwinports.org/dpupdate/dports
ーー

でもってMacPortsへのパスを通すために「~/.tcshrc」に追加
%vi ~/.tcshrc
ーー
setenv C_INCLUDE_PATH /opt/local/include
setenv LD_LIBRARY_PATH /opt/local/lib
setenv MANPATH /usr/local/man:/usr/share/man:/usr/local/share/man:/usr/X11/man:/opt/local/man:/opt/local/share/man/
set path = ($path /opt/local/bin/)
ーー
あとはMacPortsを最新版に更新
%sudo port -v selfupdate
%sudo port -d sync



というわけで試してみる
%port list | grep opencv
opencv @1.0.0 graphics/opencv
あったので情報みてみる
%port info opencv
Warning: Found 2 port opencv definitions, displaying first one.
opencv 1.0.0, graphics/opencv (Variants: universal)
http://www.intel.com/technology/computing/opencv/

opencv is a library that is mainly aimed at real time computer vision. Some example areas would be Human-Computer Interaction (HCI), Object Identification, Segmentation and Recognition, Face Recognition, Gesture Recognition, Motion Tracking, Ego Motion, Motion Understanding, Structure From Motion (SFM), and Mobile Robotics.

Library Dependencies: gtk2, zlib, jpeg, libpng, tiff
Platforms: darwin
Maintainers: stante@gmail.com
どうやらこれであってるようだ、インストールしてみよう!
%sudo port -v install opencv

インストール開始
1時間後:まだやってる
2時間後:ちょw いつまでかかるんだよww
3時間後:あれ?まだやってるよ?
4時間後:、、、、、 <= 今ここ

拍手[0回]

PR
忍者ブログ [PR]