diff --git a/.gitignore b/.gitignore index 4de4188..0c43f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ GRTAGS GSYMS GTAGS OpenCV-* -ruby-* +ruby-*.*.* ext/opencv/test.txt pkg/ doc/ diff --git a/DEVELOPERS_NOTE.md b/DEVELOPERS_NOTE.md new file mode 100644 index 0000000..b3a26fd --- /dev/null +++ b/DEVELOPERS_NOTE.md @@ -0,0 +1,120 @@ +# DEVELOPER'S NOTE + +## Requirement to develop ruby-opencv + +* OpenCV +* Git +* Microsoft Visual C++ (for mswin32) + * +* MinGW and MSYS (for mingw32) + * gcc, g++ and MSYS are needed. + * +* Some gems (see Gemfile) + * [bundler](https://github.com/carlhuda/bundler/) + * [hoe](https://github.com/seattlerb/hoe) + * [hoe-gemspec](https://github.com/flavorjones/hoe-gemspec) + * [rake-compiler](https://github.com/luislavena/rake-compiler) + * [gem-compile](https://github.com/frsyuki/gem-compile) + + +## Create ruby-opencv gem +Run the following commands. +When you use mingw32, use **MSYS console**, or when you use mswin32, +use [**Visual Studio Command Prompt**](http://msdn.microsoft.com/en-us/library/ms229859.aspx) +instead of cmd.exe. + +``` +$ git clone git://github.com/ruby-opencv/ruby-opencv.git +$ cd ruby-opencv +$ git checkout master +$ bundle install +$ git ls-files > Manifest.txt +$ rake gem:spec +$ rake gem +``` +**ruby-opencv-x.y.z.gem** will be created in pkg/ directory. + +To create pre-build binaries, run the following commands in Windows. + +``` +$ cd pkg +$ gem compile ruby-opencv-*.gem +``` + +**ruby-opencv-x.y.z-x86-mingw32.gem** will be created when you use mingw32, or +**ruby-opencv-x.y.z-x86-mswin32.gem** when you use mswin32. + + +## Install ruby-opencv manually +### Linux/Mac + +``` +$ git clone git://github.com/ruby-opencv/ruby-opencv.git +$ cd ruby-opencv +$ git checkout master +$ ruby extconf.rb --with-opencv-dir=/path/to/opencvdir +$ make +$ make install +``` + +Note: **/path/to/opencvdir** is the directory where you installed OpenCV. + + +### Windows (mswin32) + +Run the following commands on [**Visual Studio Command Prompt**](http://msdn.microsoft.com/en-us/library/ms229859.aspx). + +``` +$ git clone git://github.com/ruby-opencv/ruby-opencv.git +$ cd ruby-opencv +$ git checkout master +$ ruby extconf.rb --with-opencv-dir=C:\path\to\opencvdir\install # for your own built OpenCV library +$ nmake +$ nmake install +``` + +To use pre-built OpenCV libraries, set the following option to extconf.rb. + +``` +$ ruby extconf.rb --with-opencv-include=C:\path\to\opencvdir\build\include --with-opencv-lib=C:\path\to\opencvdir\build\x86\vc10\lib +``` + + +### Windows (mingw32) + +Run the following commands on **MSYS console**. + +``` +$ git clone git://github.com/ruby-opencv/ruby-opencv.git +$ cd ruby-opencv +$ git checkout master +$ ruby extconf.rb --with-opencv-dir=/C/path/to/opencvdir/install # for your own built OpenCV library +$ make +$ make install +``` + +To use pre-built OpenCV libraries, set the following option to extconf.rb. + +``` +$ ruby extconf.rb --with-opencv-include=/c/path/to/opencvdir/build/include --with-opencv-lib=/c/path/to/opencvdir/build/x86/mingw/lib +``` + + +## Run tests + +To run all tests, run **test/runner.rb** + +``` +$ cd ruby-opencv/test +$ ruby runner.rb +``` + +To run tests of the specified function, run a specific test with --name option. + +The following sample runs tests for CvMat#initialize + +``` +$ cd ruby-opencv/test +$ ruby test_cvmat.rb --name=test_initialize +``` + diff --git a/Gemfile b/Gemfile index 977b3ec..1824c31 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,9 @@ source :gemcutter -gem "hoe" -gem "hoe-gemspec" -gem "rake-compiler" -gem "yard" +group :development do + gem "hoe" + gem "hoe-gemspec" + gem "rake-compiler" + gem "gem-compile" +end + diff --git a/Manifest.txt b/Manifest.txt index 1913632..9e748d2 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -1,9 +1,10 @@ .gitignore +DEVELOPERS_NOTE.md Gemfile History.txt License.txt Manifest.txt -README.rdoc +README.md Rakefile examples/alpha_blend.rb examples/box.png @@ -22,6 +23,12 @@ examples/inpaint.rb examples/lenna-rotated.jpg examples/lenna.jpg examples/match_kdtree.rb +examples/matching_to_many_images.rb +examples/matching_to_many_images/query.png +examples/matching_to_many_images/train/1.png +examples/matching_to_many_images/train/2.png +examples/matching_to_many_images/train/3.png +examples/matching_to_many_images/train/trainImages.txt examples/paint.rb examples/snake.rb examples/stuff.jpg @@ -126,7 +133,7 @@ images/CvMat_sobel.png images/CvMat_sub_rect.png images/CvSeq_relationmap.png images/face_detect_from_lena.jpg -opencv.gemspec +ruby-opencv.gemspec test/helper.rb test/runner.rb test/samples/airplane.jpg @@ -144,6 +151,7 @@ test/samples/blank7.jpg test/samples/blank8.jpg test/samples/blank9.jpg test/samples/cat.jpg +test/samples/chessboard.jpg test/samples/contours.jpg test/samples/fruits.jpg test/samples/haarcascade_frontalface_alt.xml.gz @@ -192,6 +200,7 @@ test/test_cvmat.rb test/test_cvmat_drawing.rb test/test_cvmat_dxt.rb test/test_cvmat_imageprocessing.rb +test/test_cvmat_matching.rb test/test_cvmoments.rb test/test_cvpoint.rb test/test_cvpoint2d32f.rb diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f68ad2 --- /dev/null +++ b/README.md @@ -0,0 +1,98 @@ +# ruby-opencv + +An OpenCV wrapper for Ruby. + +* Web site: +* Ruby 1.8.7, 1.9.3 and OpenCV 2.4.3 are supported. + +## Requirement + +* OpenCV + * [Download](http://sourceforge.net/projects/opencvlibrary/) + * [Install guide](http://docs.opencv.org/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction) + +## Install +### Linux/Mac +1. Install [OpenCV](http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/) +2. Install ruby-opencv + +``` +$ gem install ruby-opencv -- --with-opencv-dir=/path/to/opencvdir +``` + +Note: **/path/to/opencvdir** is the directory where you installed OpenCV. + + +### Windows +You can use pre-build binary for Windows (mswin32, mingw32). + +1. Install [OpenCV](http://sourceforge.net/projects/opencvlibrary/files/opencv-win/) +2. Set path to OpenCV libraries. When you installed OpenCV to **C:\opencv**, add **C:\opencv\build\x86\vc10\bin (for mswin32)** or **C:\opencv\build\x86\mingw\bin (for mingw32)** to the systems path. +3. Install ruby-opencv + +``` +$ gem install ruby-opencv +``` + +## Sample code +### Load and Display an Image + +A sample to load and display an image. An equivalent code of [this tutorial](http://docs.opencv.org/doc/tutorials/introduction/display_image/display_image.html#display-image). + +```ruby +require 'opencv' +include OpenCV + +if ARGV.size == 0 + puts "Usage: ruby #{__FILE__} ImageToLoadAndDisplay" + exit +end + +image = nil +begin + image = CvMat.load(ARGV[0], CV_LOAD_IMAGE_COLOR) # Read the file. +rescue + puts 'Could not open or find the image.' + exit +end + +window = GUI::Window.new('Display window') # Create a window for display. +window.show(image) # Show our image inside it. +GUI::wait_key # Wait for a keystroke in the window. +``` + +### Face Detection + +A sample to detect faces from an image. + +```ruby +require 'opencv' +include OpenCV + +if ARGV.length < 2 + puts "Usage: ruby #{__FILE__} source dest" + exit +end + +data = './data/haarcascades/haarcascade_frontalface_alt.xml' +detector = CvHaarClassifierCascade::load(data) +image = CvMat.load(ARGV[0]) +detector.detect_objects(image).each do |region| + color = CvColor::Blue + image.rectangle! region.top_left, region.bottom_right, :color => color +end + +image.save_image(ARGV[1]) +window = GUI::Window.new('Face detection') +window.show(image) +GUI::wait_key +``` + +For more samples, see examples/*.rb + +## LICENSE: + +The BSD Liscense + +see LICENSE.txt + diff --git a/README.rdoc b/README.rdoc deleted file mode 100644 index 1584155..0000000 --- a/README.rdoc +++ /dev/null @@ -1,149 +0,0 @@ -= OpenCV - -The initial Open Computer Vision library was originally developed by Intel -Corporation. Recent development has been headed by Willow Garage, Inc. - -* OpenCV project home http://opencv.willowgarage.com/wiki/ - * Download http://sourceforge.net/projects/opencvlibrary/ -* Ruby/OpenCV original author's web page http://blueruby.mydns.jp/opencv - -== DESCRIPTION: - -OpenCV wrapper for Ruby - -== FEATURES/PROBLEMS: - -* Some OpenCV functions are wrapped. -* Ruby 1.8.7, 1.9.3 and OpenCV 2.4.3 are supported. - -== DEPENDENCIES: - -* OpenCV (required) - * Ruby/OpenCV relies on the OpenCV library http://opencv.willowgarage.com/wiki/InstallGuide - -* Microsoft Visual C++ (for mswin32) - * http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express - -* MinGW and MSYS (for mingw32) - * gcc, g++ and MSYS are needed. - * http://www.mingw.org - - -== INSTALLATION: -=== Install Ruby/OpenCV manually -==== Unix/Linux/Mac - - $ git clone git://github.com/ruby-opencv/ruby-opencv.git - $ cd ruby-opencv - $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead - $ ruby extconf.rb --with-opencv-dir=/path/to/opencvdir - $ make - $ make install - -==== Windows (mswin32) - -Use *nmake* instead of *make*. - - $ git clone git://github.com/ruby-opencv/ruby-opencv.git - $ cd ruby-opencv - $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead - $ ruby extconf.rb --with-opencv-dir=C:\path\to\opencvdir\install # for your own built OpenCV library - $ nmake - $ nmake install - -To use pre-built OpenCV libraries, set the following option to extconf.rb. - - $ ruby extconf.rb --with-opencv-include=C:\path\to\opencvdir\build\include --with-opencv-lib=C:\path\to\opencvdir\build\x86\vc10\lib - - -==== Windows (mingw32) - -Type the following commands on the *MSYS* *console*. - - $ git clone git://github.com/ruby-opencv/ruby-opencv.git - $ cd ruby-opencv - $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead - $ ruby extconf.rb --with-opencv-dir=/C/path/to/opencvdir/install # for your own built OpenCV library - $ make - $ make install - -To use pre-built OpenCV libraries, set the following option to extconf.rb. - - $ ruby extconf.rb --with-opencv-include=/c/path/to/opencvdir/build/include --with-opencv-lib=/c/path/to/opencvdir/build/x86/mingw/lib - - -==== NOTE: - -*/path/to/opencvdir* is the path you installs OpenCV library (default: /usr/local). - -For example, if you install OpenCV library to */opt/local/* like: - - $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/opt/local/ ./OpenCV-2.4.2 - $ make - $ make install - -Install Ruby/OpenCV with the following command: - - $ ruby extconf.rb --with-opencv-dir=/opt/local - $ make - $ make install - - -=== Create Ruby/OpenCV Gem -You can also install this library creating a gem like: - - $ git clone git://github.com/ruby-opencv/ruby-opencv.git - $ cd ruby-opencv - $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead - $ bundle install - $ rake gem - $ gem install pkg/opencv-*.gem -- --with-opencv-dir=/path/to/opencvdir - -To add ruby-opencv in your Gemfile: - - $ echo -e "\n"'gem "opencv", :git => "https://github.com/ruby-opencv/ruby-opencv"' >> Gemfile - $ bundle config build.opencv --with-opencv-dir=/path/to/opencvdir - $ bundle install # or bundle update - -== SYNOPSIS: -=== Show Image using GUI Component - - #!/usr/bin/env ruby - require "opencv" - - image = OpenCV::IplImage.load("sample.jpg") - window = OpenCV::GUI::Window.new("preview") - window.show(image) - OpenCV::GUI::wait_key - -=== 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).each do |region| - color = OpenCV::CvColor::Blue - image.rectangle! region.top_left, region.bottom_right, :color => color - end - image.save_image(ARGV[1]) - -For more samples, see examples/*.rb - -== LICENSE: - -The BSD Liscense - -see LICENSE.txt - diff --git a/Rakefile b/Rakefile index 2acc252..b0e24d4 100644 --- a/Rakefile +++ b/Rakefile @@ -1,57 +1,32 @@ -# -*- ruby -*- +# -*- mode: ruby; coding: utf-8-unix -*- require 'rubygems' require './ext/opencv/lib/opencv/psyched_yaml' require 'hoe' require 'rake/extensiontask' -require './ext/opencv/lib/opencv/version' -require 'yard' -require 'yard/rake/yardoc_task' -require File.dirname(__FILE__) + '/yard_extension' Hoe.plugin :gemspec -hoespec = Hoe.spec 'opencv' do |p| - p.version = OpenCV::VERSION - p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n") - p.description = < %w{extconf.rb} - } - p.summary = 'OpenCV wrapper for Ruby.' - p.test_globs = ['test/test_*.rb'] - p.clean_globs << 'lib/*.so' << 'tmp' + s.readme_file = 'README.md' + s.history_file = 'History.txt' + s.spec_extras = { :extensions => ['extconf.rb'] } + s.test_globs = ['test/test_*.rb'] + s.urls = ['https://github.com/ruby-opencv/ruby-opencv/'] - p.urls = ['http://blueruby.mydns.jp/opencv'] - - p.extra_dev_deps << ['rake-compiler', '>= 0'] << ['hoe-gemspec'] + s.extra_dev_deps << ['rake-compiler', '>= 0'] << ['hoe-gemspec'] Rake::ExtensionTask.new('opencv', spec) do |ext| ext.lib_dir = File.join('lib', 'opencv') end - end hoespec.spec.files.delete('.gemtest') -hoespec.spec.files.delete('ruby-opencv.gemspec') -hoespec.spec.files.delete('opencv.gemspec') -hoespec.spec.cert_chain = [] -hoespec.spec.signing_key = nil Rake::Task[:test].prerequisites << :compile -YARD::Rake::YardocTask.new do |t| - t.files = ['ext/opencv/*.cpp', 'ext/opencv/lib/*.rb'] -end - -# vim: syntax=Ruby +# vim: syntax=ruby diff --git a/ext/opencv/lib/opencv/version.rb b/ext/opencv/lib/opencv/version.rb index 54f73d4..29a1e5a 100755 --- a/ext/opencv/lib/opencv/version.rb +++ b/ext/opencv/lib/opencv/version.rb @@ -1,3 +1,3 @@ module OpenCV - VERSION = '0.0.6' + VERSION = '0.0.8' end diff --git a/opencv.gemspec b/opencv.gemspec deleted file mode 100644 index 10f7f74..0000000 --- a/opencv.gemspec +++ /dev/null @@ -1,43 +0,0 @@ -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = "opencv" - s.version = "0.0.6.20121028113239" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["lsxi", "ser1zw", "pcting"] - s.date = "2012-10-28" - s.description = "OpenCV wrapper for Ruby\n" - s.email = ["masakazu.yonekura@gmail.com", "", "pcting@gmail.com"] - s.extensions = ["extconf.rb"] - s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc"] - s.files = [".gitignore", "Gemfile", "History.txt", "License.txt", "Manifest.txt", "README.rdoc", "Rakefile", "examples/alpha_blend.rb", "examples/box.png", "examples/box_in_scene.png", "examples/contours/bitmap-contours-with-labels.png", "examples/contours/bitmap-contours.png", "examples/contours/bounding-box-detect-canny.rb", "examples/contours/contour_retrieval_modes.rb", "examples/contours/rotated-boxes.jpg", "examples/convexhull.rb", "examples/face_detect.rb", "examples/find_obj.rb", "examples/houghcircle.rb", "examples/inpaint.png", "examples/inpaint.rb", "examples/lenna-rotated.jpg", "examples/lenna.jpg", "examples/match_kdtree.rb", "examples/paint.rb", "examples/snake.rb", "examples/stuff.jpg", "examples/tiffany.jpg", "ext/opencv/curve.cpp", "ext/opencv/curve.h", "ext/opencv/cvavgcomp.cpp", "ext/opencv/cvavgcomp.h", "ext/opencv/cvbox2d.cpp", "ext/opencv/cvbox2d.h", "ext/opencv/cvcapture.cpp", "ext/opencv/cvcapture.h", "ext/opencv/cvchain.cpp", "ext/opencv/cvchain.h", "ext/opencv/cvcircle32f.cpp", "ext/opencv/cvcircle32f.h", "ext/opencv/cvcondensation.cpp", "ext/opencv/cvcondensation.h", "ext/opencv/cvconnectedcomp.cpp", "ext/opencv/cvconnectedcomp.h", "ext/opencv/cvcontour.cpp", "ext/opencv/cvcontour.h", "ext/opencv/cvcontourtree.cpp", "ext/opencv/cvcontourtree.h", "ext/opencv/cvconvexitydefect.cpp", "ext/opencv/cvconvexitydefect.h", "ext/opencv/cverror.cpp", "ext/opencv/cverror.h", "ext/opencv/cvfeaturetree.cpp", "ext/opencv/cvfeaturetree.h", "ext/opencv/cvfont.cpp", "ext/opencv/cvfont.h", "ext/opencv/cvhaarclassifiercascade.cpp", "ext/opencv/cvhaarclassifiercascade.h", "ext/opencv/cvhistogram.cpp", "ext/opencv/cvhistogram.h", "ext/opencv/cvhumoments.cpp", "ext/opencv/cvhumoments.h", "ext/opencv/cvline.cpp", "ext/opencv/cvline.h", "ext/opencv/cvmat.cpp", "ext/opencv/cvmat.h", "ext/opencv/cvmatnd.cpp", "ext/opencv/cvmatnd.h", "ext/opencv/cvmemstorage.cpp", "ext/opencv/cvmemstorage.h", "ext/opencv/cvmoments.cpp", "ext/opencv/cvmoments.h", "ext/opencv/cvpoint.cpp", "ext/opencv/cvpoint.h", "ext/opencv/cvpoint2d32f.cpp", "ext/opencv/cvpoint2d32f.h", "ext/opencv/cvpoint3d32f.cpp", "ext/opencv/cvpoint3d32f.h", "ext/opencv/cvrect.cpp", "ext/opencv/cvrect.h", "ext/opencv/cvscalar.cpp", "ext/opencv/cvscalar.h", "ext/opencv/cvseq.cpp", "ext/opencv/cvseq.h", "ext/opencv/cvsize.cpp", "ext/opencv/cvsize.h", "ext/opencv/cvsize2d32f.cpp", "ext/opencv/cvsize2d32f.h", "ext/opencv/cvslice.cpp", "ext/opencv/cvslice.h", "ext/opencv/cvsparsemat.cpp", "ext/opencv/cvsparsemat.h", "ext/opencv/cvsurfparams.cpp", "ext/opencv/cvsurfparams.h", "ext/opencv/cvsurfpoint.cpp", "ext/opencv/cvsurfpoint.h", "ext/opencv/cvtermcriteria.cpp", "ext/opencv/cvtermcriteria.h", "ext/opencv/cvtwopoints.cpp", "ext/opencv/cvtwopoints.h", "ext/opencv/cvutils.cpp", "ext/opencv/cvutils.h", "ext/opencv/cvvideowriter.cpp", "ext/opencv/cvvideowriter.h", "ext/opencv/gui.cpp", "ext/opencv/gui.h", "ext/opencv/iplconvkernel.cpp", "ext/opencv/iplconvkernel.h", "ext/opencv/iplimage.cpp", "ext/opencv/iplimage.h", "ext/opencv/lib/opencv.rb", "ext/opencv/lib/opencv/psyched_yaml.rb", "ext/opencv/lib/opencv/version.rb", "ext/opencv/mouseevent.cpp", "ext/opencv/mouseevent.h", "ext/opencv/opencv.cpp", "ext/opencv/opencv.h", "ext/opencv/pointset.cpp", "ext/opencv/pointset.h", "ext/opencv/trackbar.cpp", "ext/opencv/trackbar.h", "ext/opencv/window.cpp", "ext/opencv/window.h", "extconf.rb", "images/CvMat_sobel.png", "images/CvMat_sub_rect.png", "images/CvSeq_relationmap.png", "images/face_detect_from_lena.jpg", "test/helper.rb", "test/runner.rb", "test/samples/airplane.jpg", "test/samples/baboon.jpg", "test/samples/baboon200.jpg", "test/samples/baboon200_rotated.jpg", "test/samples/blank0.jpg", "test/samples/blank1.jpg", "test/samples/blank2.jpg", "test/samples/blank3.jpg", "test/samples/blank4.jpg", "test/samples/blank5.jpg", "test/samples/blank6.jpg", "test/samples/blank7.jpg", "test/samples/blank8.jpg", "test/samples/blank9.jpg", "test/samples/cat.jpg", "test/samples/contours.jpg", "test/samples/fruits.jpg", "test/samples/haarcascade_frontalface_alt.xml.gz", "test/samples/inpaint-mask.bmp", "test/samples/lena-256x256.jpg", "test/samples/lena-32x32.jpg", "test/samples/lena-eyes.jpg", "test/samples/lena-inpaint.jpg", "test/samples/lena.jpg", "test/samples/lines.jpg", "test/samples/messy0.jpg", "test/samples/messy1.jpg", "test/samples/movie_sample.avi", "test/samples/one_way_train_0000.jpg", "test/samples/one_way_train_0001.jpg", "test/samples/partially_blank0.jpg", "test/samples/partially_blank1.jpg", "test/samples/smooth0.jpg", "test/samples/smooth1.jpg", "test/samples/smooth2.jpg", "test/samples/smooth3.jpg", "test/samples/smooth4.jpg", "test/samples/smooth5.jpg", "test/samples/smooth6.jpg", "test/samples/str-cv-rotated.jpg", "test/samples/str-cv.jpg", "test/samples/str-ov.jpg", "test/samples/stuff.jpg", "test/test_curve.rb", "test/test_cvavgcomp.rb", "test/test_cvbox2d.rb", "test/test_cvcapture.rb", "test/test_cvchain.rb", "test/test_cvcircle32f.rb", "test/test_cvconnectedcomp.rb", "test/test_cvcontour.rb", "test/test_cvcontourtree.rb", "test/test_cverror.rb", "test/test_cvfeaturetree.rb", "test/test_cvfont.rb", "test/test_cvhaarclassifiercascade.rb", "test/test_cvhistogram.rb", "test/test_cvhumoments.rb", "test/test_cvline.rb", "test/test_cvmat.rb", "test/test_cvmat_drawing.rb", "test/test_cvmat_dxt.rb", "test/test_cvmat_imageprocessing.rb", "test/test_cvmoments.rb", "test/test_cvpoint.rb", "test/test_cvpoint2d32f.rb", "test/test_cvpoint3d32f.rb", "test/test_cvrect.rb", "test/test_cvscalar.rb", "test/test_cvseq.rb", "test/test_cvsize.rb", "test/test_cvsize2d32f.rb", "test/test_cvslice.rb", "test/test_cvsurfparams.rb", "test/test_cvsurfpoint.rb", "test/test_cvtermcriteria.rb", "test/test_cvtwopoints.rb", "test/test_cvvideowriter.rb", "test/test_iplconvkernel.rb", "test/test_iplimage.rb", "test/test_mouseevent.rb", "test/test_opencv.rb", "test/test_pointset.rb", "test/test_preliminary.rb", "test/test_trackbar.rb", "test/test_window.rb", "test/test_cvmat_matching.rb"] - s.homepage = "http://blueruby.mydns.jp/opencv" - s.rdoc_options = ["--main", "README.rdoc"] - s.require_paths = ["lib"] - s.rubyforge_project = "opencv" - s.rubygems_version = "1.8.24" - s.summary = "OpenCV wrapper for Ruby." - s.test_files = ["test/test_cvcontourtree.rb", "test/test_iplconvkernel.rb", "test/test_cvsize2d32f.rb", "test/test_cvconnectedcomp.rb", "test/test_cvcontour.rb", "test/test_cvslice.rb", "test/test_cvmat_matching.rb", "test/test_trackbar.rb", "test/test_cvpoint3d32f.rb", "test/test_cvpoint2d32f.rb", "test/test_cvcapture.rb", "test/test_cvfont.rb", "test/test_cvhumoments.rb", "test/test_cvmat_dxt.rb", "test/test_cvbox2d.rb", "test/test_iplimage.rb", "test/test_preliminary.rb", "test/test_cvmat_drawing.rb", "test/test_cvsurfparams.rb", "test/test_cvcircle32f.rb", "test/test_pointset.rb", "test/test_cvmat.rb", "test/test_cvhistogram.rb", "test/test_cverror.rb", "test/test_cvtermcriteria.rb", "test/test_cvmoments.rb", "test/test_cvchain.rb", "test/test_cvpoint.rb", "test/test_cvavgcomp.rb", "test/test_cvrect.rb", "test/test_cvvideowriter.rb", "test/test_curve.rb", "test/test_window.rb", "test/test_cvline.rb", "test/test_opencv.rb", "test/test_cvfeaturetree.rb", "test/test_cvseq.rb", "test/test_cvsize.rb", "test/test_mouseevent.rb", "test/test_cvmat_imageprocessing.rb", "test/test_cvtwopoints.rb", "test/test_cvscalar.rb", "test/test_cvsurfpoint.rb", "test/test_cvhaarclassifiercascade.rb"] - - if s.respond_to? :specification_version then - s.specification_version = 3 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q, ["~> 3.10"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, ["~> 3.1"]) - else - s.add_dependency(%q, ["~> 3.10"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, ["~> 3.1"]) - end - else - s.add_dependency(%q, ["~> 3.10"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, ["~> 3.1"]) - end -end diff --git a/ruby-opencv.gemspec b/ruby-opencv.gemspec new file mode 100644 index 0000000..ec76a17 --- /dev/null +++ b/ruby-opencv.gemspec @@ -0,0 +1,43 @@ +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = "ruby-opencv" + s.version = "0.0.8.20130127124736" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["lsxi", "ser1zw", "pcting"] + s.date = "2013-01-27" + s.description = "" + s.email = ["masakazu.yonekura@gmail.com", "azariahsawtikes@gmail.com", "pcting@gmail.com"] + s.extensions = ["extconf.rb"] + s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "examples/matching_to_many_images/train/trainImages.txt"] + s.files = [".gitignore", "DEVELOPERS_NOTE.md", "Gemfile", "History.txt", "License.txt", "Manifest.txt", "README.md", "Rakefile", "examples/alpha_blend.rb", "examples/box.png", "examples/box_in_scene.png", "examples/contours/bitmap-contours-with-labels.png", "examples/contours/bitmap-contours.png", "examples/contours/bounding-box-detect-canny.rb", "examples/contours/contour_retrieval_modes.rb", "examples/contours/rotated-boxes.jpg", "examples/convexhull.rb", "examples/face_detect.rb", "examples/find_obj.rb", "examples/houghcircle.rb", "examples/inpaint.png", "examples/inpaint.rb", "examples/lenna-rotated.jpg", "examples/lenna.jpg", "examples/match_kdtree.rb", "examples/matching_to_many_images.rb", "examples/matching_to_many_images/query.png", "examples/matching_to_many_images/train/1.png", "examples/matching_to_many_images/train/2.png", "examples/matching_to_many_images/train/3.png", "examples/matching_to_many_images/train/trainImages.txt", "examples/paint.rb", "examples/snake.rb", "examples/stuff.jpg", "examples/tiffany.jpg", "ext/opencv/curve.cpp", "ext/opencv/curve.h", "ext/opencv/cvavgcomp.cpp", "ext/opencv/cvavgcomp.h", "ext/opencv/cvbox2d.cpp", "ext/opencv/cvbox2d.h", "ext/opencv/cvcapture.cpp", "ext/opencv/cvcapture.h", "ext/opencv/cvchain.cpp", "ext/opencv/cvchain.h", "ext/opencv/cvcircle32f.cpp", "ext/opencv/cvcircle32f.h", "ext/opencv/cvcondensation.cpp", "ext/opencv/cvcondensation.h", "ext/opencv/cvconnectedcomp.cpp", "ext/opencv/cvconnectedcomp.h", "ext/opencv/cvcontour.cpp", "ext/opencv/cvcontour.h", "ext/opencv/cvcontourtree.cpp", "ext/opencv/cvcontourtree.h", "ext/opencv/cvconvexitydefect.cpp", "ext/opencv/cvconvexitydefect.h", "ext/opencv/cverror.cpp", "ext/opencv/cverror.h", "ext/opencv/cvfeaturetree.cpp", "ext/opencv/cvfeaturetree.h", "ext/opencv/cvfont.cpp", "ext/opencv/cvfont.h", "ext/opencv/cvhaarclassifiercascade.cpp", "ext/opencv/cvhaarclassifiercascade.h", "ext/opencv/cvhistogram.cpp", "ext/opencv/cvhistogram.h", "ext/opencv/cvhumoments.cpp", "ext/opencv/cvhumoments.h", "ext/opencv/cvline.cpp", "ext/opencv/cvline.h", "ext/opencv/cvmat.cpp", "ext/opencv/cvmat.h", "ext/opencv/cvmatnd.cpp", "ext/opencv/cvmatnd.h", "ext/opencv/cvmemstorage.cpp", "ext/opencv/cvmemstorage.h", "ext/opencv/cvmoments.cpp", "ext/opencv/cvmoments.h", "ext/opencv/cvpoint.cpp", "ext/opencv/cvpoint.h", "ext/opencv/cvpoint2d32f.cpp", "ext/opencv/cvpoint2d32f.h", "ext/opencv/cvpoint3d32f.cpp", "ext/opencv/cvpoint3d32f.h", "ext/opencv/cvrect.cpp", "ext/opencv/cvrect.h", "ext/opencv/cvscalar.cpp", "ext/opencv/cvscalar.h", "ext/opencv/cvseq.cpp", "ext/opencv/cvseq.h", "ext/opencv/cvsize.cpp", "ext/opencv/cvsize.h", "ext/opencv/cvsize2d32f.cpp", "ext/opencv/cvsize2d32f.h", "ext/opencv/cvslice.cpp", "ext/opencv/cvslice.h", "ext/opencv/cvsparsemat.cpp", "ext/opencv/cvsparsemat.h", "ext/opencv/cvsurfparams.cpp", "ext/opencv/cvsurfparams.h", "ext/opencv/cvsurfpoint.cpp", "ext/opencv/cvsurfpoint.h", "ext/opencv/cvtermcriteria.cpp", "ext/opencv/cvtermcriteria.h", "ext/opencv/cvtwopoints.cpp", "ext/opencv/cvtwopoints.h", "ext/opencv/cvutils.cpp", "ext/opencv/cvutils.h", "ext/opencv/cvvideowriter.cpp", "ext/opencv/cvvideowriter.h", "ext/opencv/gui.cpp", "ext/opencv/gui.h", "ext/opencv/iplconvkernel.cpp", "ext/opencv/iplconvkernel.h", "ext/opencv/iplimage.cpp", "ext/opencv/iplimage.h", "ext/opencv/lib/opencv.rb", "ext/opencv/lib/opencv/psyched_yaml.rb", "ext/opencv/lib/opencv/version.rb", "ext/opencv/mouseevent.cpp", "ext/opencv/mouseevent.h", "ext/opencv/opencv.cpp", "ext/opencv/opencv.h", "ext/opencv/pointset.cpp", "ext/opencv/pointset.h", "ext/opencv/trackbar.cpp", "ext/opencv/trackbar.h", "ext/opencv/window.cpp", "ext/opencv/window.h", "extconf.rb", "images/CvMat_sobel.png", "images/CvMat_sub_rect.png", "images/CvSeq_relationmap.png", "images/face_detect_from_lena.jpg", "ruby-opencv.gemspec", "test/helper.rb", "test/runner.rb", "test/samples/airplane.jpg", "test/samples/baboon.jpg", "test/samples/baboon200.jpg", "test/samples/baboon200_rotated.jpg", "test/samples/blank0.jpg", "test/samples/blank1.jpg", "test/samples/blank2.jpg", "test/samples/blank3.jpg", "test/samples/blank4.jpg", "test/samples/blank5.jpg", "test/samples/blank6.jpg", "test/samples/blank7.jpg", "test/samples/blank8.jpg", "test/samples/blank9.jpg", "test/samples/cat.jpg", "test/samples/chessboard.jpg", "test/samples/contours.jpg", "test/samples/fruits.jpg", "test/samples/haarcascade_frontalface_alt.xml.gz", "test/samples/inpaint-mask.bmp", "test/samples/lena-256x256.jpg", "test/samples/lena-32x32.jpg", "test/samples/lena-eyes.jpg", "test/samples/lena-inpaint.jpg", "test/samples/lena.jpg", "test/samples/lines.jpg", "test/samples/messy0.jpg", "test/samples/messy1.jpg", "test/samples/movie_sample.avi", "test/samples/one_way_train_0000.jpg", "test/samples/one_way_train_0001.jpg", "test/samples/partially_blank0.jpg", "test/samples/partially_blank1.jpg", "test/samples/smooth0.jpg", "test/samples/smooth1.jpg", "test/samples/smooth2.jpg", "test/samples/smooth3.jpg", "test/samples/smooth4.jpg", "test/samples/smooth5.jpg", "test/samples/smooth6.jpg", "test/samples/str-cv-rotated.jpg", "test/samples/str-cv.jpg", "test/samples/str-ov.jpg", "test/samples/stuff.jpg", "test/test_curve.rb", "test/test_cvavgcomp.rb", "test/test_cvbox2d.rb", "test/test_cvcapture.rb", "test/test_cvchain.rb", "test/test_cvcircle32f.rb", "test/test_cvconnectedcomp.rb", "test/test_cvcontour.rb", "test/test_cvcontourtree.rb", "test/test_cverror.rb", "test/test_cvfeaturetree.rb", "test/test_cvfont.rb", "test/test_cvhaarclassifiercascade.rb", "test/test_cvhistogram.rb", "test/test_cvhumoments.rb", "test/test_cvline.rb", "test/test_cvmat.rb", "test/test_cvmat_drawing.rb", "test/test_cvmat_dxt.rb", "test/test_cvmat_imageprocessing.rb", "test/test_cvmat_matching.rb", "test/test_cvmoments.rb", "test/test_cvpoint.rb", "test/test_cvpoint2d32f.rb", "test/test_cvpoint3d32f.rb", "test/test_cvrect.rb", "test/test_cvscalar.rb", "test/test_cvseq.rb", "test/test_cvsize.rb", "test/test_cvsize2d32f.rb", "test/test_cvslice.rb", "test/test_cvsurfparams.rb", "test/test_cvsurfpoint.rb", "test/test_cvtermcriteria.rb", "test/test_cvtwopoints.rb", "test/test_cvvideowriter.rb", "test/test_iplconvkernel.rb", "test/test_iplimage.rb", "test/test_mouseevent.rb", "test/test_opencv.rb", "test/test_pointset.rb", "test/test_preliminary.rb", "test/test_trackbar.rb", "test/test_window.rb"] + s.homepage = "https://github.com/ruby-opencv/ruby-opencv/" + s.rdoc_options = ["--main", "README.md"] + s.require_paths = ["lib"] + s.rubyforge_project = "ruby-opencv" + s.rubygems_version = "1.8.24" + s.summary = "OpenCV wrapper for Ruby" + s.test_files = ["test/test_cvcontourtree.rb", "test/test_iplconvkernel.rb", "test/test_cvsize2d32f.rb", "test/test_cvconnectedcomp.rb", "test/test_cvcontour.rb", "test/test_cvslice.rb", "test/test_cvmat_matching.rb", "test/test_trackbar.rb", "test/test_cvpoint3d32f.rb", "test/test_cvpoint2d32f.rb", "test/test_cvcapture.rb", "test/test_cvfont.rb", "test/test_cvhumoments.rb", "test/test_cvmat_dxt.rb", "test/test_cvbox2d.rb", "test/test_iplimage.rb", "test/test_preliminary.rb", "test/test_cvmat_drawing.rb", "test/test_cvsurfparams.rb", "test/test_cvcircle32f.rb", "test/test_pointset.rb", "test/test_cvmat.rb", "test/test_cvhistogram.rb", "test/test_cverror.rb", "test/test_cvtermcriteria.rb", "test/test_cvmoments.rb", "test/test_cvchain.rb", "test/test_cvpoint.rb", "test/test_cvavgcomp.rb", "test/test_cvrect.rb", "test/test_cvvideowriter.rb", "test/test_curve.rb", "test/test_window.rb", "test/test_cvline.rb", "test/test_opencv.rb", "test/test_cvfeaturetree.rb", "test/test_cvseq.rb", "test/test_cvsize.rb", "test/test_mouseevent.rb", "test/test_cvmat_imageprocessing.rb", "test/test_cvtwopoints.rb", "test/test_cvscalar.rb", "test/test_cvsurfpoint.rb", "test/test_cvhaarclassifiercascade.rb"] + + if s.respond_to? :specification_version then + s.specification_version = 3 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + s.add_development_dependency(%q, ["~> 3.10"]) + s.add_development_dependency(%q, [">= 0"]) + s.add_development_dependency(%q, [">= 0"]) + s.add_development_dependency(%q, ["~> 3.5"]) + else + s.add_dependency(%q, ["~> 3.10"]) + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, ["~> 3.5"]) + end + else + s.add_dependency(%q, ["~> 3.10"]) + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, ["~> 3.5"]) + end +end