Itseez/opencv_contrib — pull request #116 by D-Alex (2014-10-17 18:02:34+00:00)
Title: ruby bindings: inital commit

### ffi ruby bindings for OpenCV (ruby, jruby, ...)

#### Binding process:
header files --> hdr_parser --> ruby code generator --> c code + ruby scripts (ffi integration)

#### Dependencies
compile time : ruby, python, g++ compiler
runtime: libopencv, ruby gem ffi

#### Ruby Example (more examples can be found in the test folder):

require 'opencv'
require 'pp'

include OpenCV

points1 = std::Vector.new(cv::Point2f)
points2 = std::Vector.new(cv::Point2f)

points1.push_back(cv::Point2f.new(1,1))
points1.push_back(cv::Point2f.new(3,1))
points1.push_back(cv::Point2f.new(4,2))
points1.push_back(cv::Point2f.new(10,1))

points1.each do |pt|
points2.push_back(pt*0.2)
end
pp cv::find_homography(points1,points2)

#### Notes:
* The source code is around for about a year (http://www.ropencv.aduda.eu/, https://github.com/D-Alex/ropencv)
* In principle the c layer is compatible to other languages like Haskell
* There is a ruby API for accessing objects being wrapped (https://github.com/D-Alex/rbind)

puts rbind.cv.randShuffle.cname
puts rbind.cv.randShuffle.csignature
rbind.cv.randShuffle.parameter(2).remove_const!
rbind.ml.StatModel.getParams.ignore = true

* the hdr_parser could be replaced by other parser like clang (prototype is included)