Platforms

Artoo has a extensible system for connecting to hardware devices.

OpenCV


Repository Issues

OpenCV is a real-time computer vision library.

+ info about OpenCV click here

How To Install

Installing artoo with OpenCV support is pretty easy using ruby gems.

gem install artoo-opencv

If you don't already have OpenCV installed

Ubuntu

#!/bin/bash
sudo apt-get -y install autoconf automake build-essential git libass-dev libgpac-dev \
  libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \
  libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev yasm libmp3lame-dev \
  libopus-dev libvpx-dev cmake libgtk2.0-dev pkg-config libjpeg8 libjpeg8-dev \
  libgstreamer0.10-0 libgstreamer0.10-dev gstreamer0.10-tools gstreamer0.10-plugins-base \
  libgstreamer-plugins-base0.10-dev gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly \
  gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://git.videolan.org/x264.git
cd x264
./configure --prefix="/usr/local" --bindir="/usr/local/bin" --enable-shared --enable-pic
make
sudo make install
cd ~/ffmpeg_sources
git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="/usr/local" --bindir="/usr/local/bin" --enable-shared --with-pic
make
sudo make install
cd ~/ffmpeg_sources
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
./configure --prefix="/usr/local"   --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib"   --bindir="/usr/local/bin" \
  --extra-libs="-ldl" --enable-gpl --enable-libass --enable-libfdk-aac   --enable-libmp3lame --enable-libopus --enable-libtheora \
  --enable-libvorbis --enable-libvpx   --enable-libx264 --enable-nonfree --enable-x11grab --enable-shared --enable-pic
make
sudo make install
hash -r
cd ~
git clone --depth 1 -b 2.4.6.2 https://github.com/Itseez/opencv.git
cd opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install

How To Use

This program displays your webcam video through OpenCV

  require 'artoo'

  connection :capture, :adaptor => :opencv_capture
  device :capture, :driver => :opencv_capture, :connection => :capture, :interval => 0.01

  connection :window, :adaptor => :opencv_window
  device :window, :driver => :opencv_window, :connection => :window, :title => "My Window", :interval => 0.01

  work do
    on capture, :frame => proc { |*value|
      window.image = value[1].image
    }
  end