MacOSX ã« OpenCV ãå ¥ã㦠ruby ã§éãã§ã¿ã
OpenCV ã Macbook ã«å ¥ããä½æ¥åå¿é²ã§ãã
OpenCV ã¨ã¯ãªãããï¼ã¨ããæ¹ã¯ãwikipedia: OpenCV ãè¦ã¦ãã ãããå»å¹´ããããã®ã¼ã¯ãªæ¹éã®éã§ãã¿ã¼ã³èªèã«ããé¡æ¤åºãæµè¡ã£ã¦ãã¢ã¬ã§ããä»æ´ã§ãããèªåãããã§éãã§ã¿ããã¨æã£ãããã§ãã
ã¾ããOpenCV ãå ¥ãã¾ãã
$ sudo port install jpeg $ sudo port install libpng $ sudo port install tiff $ wget http://downloads.sourceforge.net/opencvlibrary/opencv-1.0.0.tar.gz $ tar zxvf opencv-1.0.0.tar.gz $ cd opencv-1.0.0 $ ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include $ make $ sudo make install $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig $ cd samples/c/ $ sh build_all.sh $ ./facedetect --cascade='../../data/haarcascades/haarcascade_frontalface_default.xml' # ãµã³ãã«ã§åä½ç¢ºèª
次ã«ãOpenCV ã ruby ãã使ããããã«ãã¾ãã
$ sudo port install ImageMagick $ sudo gem install rmagick $ sudo gem install objectdetect <- error
ããããobjectdetect ã gem ã§å ¥ããæã«ãããªã¨ã©ã¼ãã
objectdetect.c:6:16: error: cv.h: No such file or directory objectdetect.c:7:21: error: highgui.h: No such file or directory
include ãããã¹ãéãã¨ãããè¦ã«è¡ã£ã¡ãã£ã¦ãã£ã½ããããããããã£ã¦ã¿ããã®ã®ä¸æãã¤ã³ã¹ãã¼ã«ã§ããããããªããã§ãgem çã®å ã«ãªã£ãæ¹ã® detector ãå ¥ãã¾ããã
[facedetector] OpenCVã§ç©ä½èªèãè¡ãRubyæ¡å¼µã©ã¤ãã©ãªã®ã½ã¼ã¹
http://d.hatena.ne.jp/darashi/20070223/1172232765
ã¨ãããããruby ãã OpenCV ãããããããã«ãªã£ãã®ã§ãªããä½ã£ã¦ã¿ã¾ãã