1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00
Versioned fork of the OpenCV gem for Ruby
Find a file
2011-01-19 01:27:25 +09:00
examples Remove unnecesary "gem" calls in examples 2010-12-30 03:45:44 +09:00
ext changed method name CvMat.rotation to CvMat.rotation_matrix2D (because this method returns a rotation matrix), and added some tests 2011-01-19 00:50:27 +09:00
images Unflip binary files 2008-08-19 11:08:07 -04:00
lib Initial commit, with some minor changes from orig (date, exec bit, line endings, /usr/bin/env) 2008-08-19 11:01:28 -04:00
setup Initial commit, with some minor changes from orig (date, exec bit, line endings, /usr/bin/env) 2008-08-19 11:01:28 -04:00
test added some tests for CvMat 2011-01-19 01:27:25 +09:00
.gitignore Ruby 1.9.x fixes 2010-12-30 03:39:15 +09:00
History.txt Initial commit, with some minor changes from orig (date, exec bit, line endings, /usr/bin/env) 2008-08-19 11:01:28 -04:00
License.txt Initial commit, with some minor changes from orig (date, exec bit, line endings, /usr/bin/env) 2008-08-19 11:01:28 -04:00
Manifest.txt Initial commit, with some minor changes from orig (date, exec bit, line endings, /usr/bin/env) 2008-08-19 11:01:28 -04:00
metadata Initial commit, with some minor changes from orig (date, exec bit, line endings, /usr/bin/env) 2008-08-19 11:01:28 -04:00
Rakefile Initial commit, with some minor changes from orig (date, exec bit, line endings, /usr/bin/env) 2008-08-19 11:01:28 -04:00
README.rdoc modified README.rdoc 2011-01-01 22:21:38 +09:00

= OpenCV

The initial Open Computer Vision library was originally developed by Intel 
Corporation. Recent development has been headed by Willow Garage, Inc.

OpenCV Sourceforge Project
http://opencv.willowgarage.com/wiki/

Sourceforge
http://sourceforge.net/projects/opencvlibrary/

Ruby/OpenCV Author's Web Page
http://blueruby.mydns.jp/opencv

== DESCRIPTION:

OpenCV Ruby Wrapper

== FEATURES/PROBLEMS:

* First release rubygems, Some OpenCV functions wrapped.
* Ruby 1.8.7, 1.9.2 and OpenCV 2.2 are supported.
* Mouse interaction often causes segfaults on my Ubuntu 10.10 (Ruby 1.9.2).

== DEPENDENCIES:

This library relies on the OpenCV project. The following page shows how to install it:

http://opencv.willowgarage.com/wiki/InstallGuide

== INSTALLATION:

You can install by cloning this repository:

  git clone git://github.com/ser1zw/ruby-opencv.git
  
Then inside the ruby-opencv folder run:

  ruby ext/extconf.rb
  make
  sudo make install

== SYNOPSIS:

Once installed it is possible to show images via GUI Window.

  require "opencv"

  image = OpenCV::IplImage.load("sample.jpg")
  window = OpenCV::GUI::Window.new("preview")
  window.show(image)
  OpenCV::GUI::wait_key

For more samples, see examples/*.rb

== FACE DETECTION:

Here is a sample face detection program that doesn't rely on the GUI components.
In order for this to work you must copy the OpenCV haarcascades data into a 
subfolder called data.

  #!/usr/bin/env ruby
  require "opencv"

  if ARGV.length < 2
    puts "Usage: your_app_name source dest"
    exit
  end
 
  data = "./data/haarcascades/haarcascade_frontalface_alt.xml"
  detector = OpenCV::CvHaarClassifierCascade::load(data)
  image = OpenCV::IplImage.load(ARGV[0])
  detector.detect_objects(image) do |region|
    color = OpenCV::CvColor::Blue
    image.rectangle! region.top_left, region.bottom_right, :color => color
  end
  image.save_image(ARGV[1])

== REQUIREMENTS:

* OpenCV 2.2 or later
  http://opencv.willowgarage.com/wiki/
* ffcall (optional)
  http://www.haible.de/bruno/packages-ffcall.html

== LICENSE:

The BSD Liscense

see LICENSE.txt