ruby-opencv 0.0.8-x86-mingw32 → 0.0.9.pre2-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/DEVELOPERS_NOTE.md +29 -12
  3. data/Gemfile +1 -2
  4. data/License.txt +30 -30
  5. data/Manifest.txt +5 -4
  6. data/README.md +1 -1
  7. data/Rakefile +62 -4
  8. data/config.yml +7 -0
  9. data/examples/alpha_blend.rb +21 -21
  10. data/examples/find_obj.rb +169 -169
  11. data/examples/match_kdtree.rb +88 -88
  12. data/ext/opencv/cvcapture.cpp +19 -12
  13. data/ext/opencv/cvutils.cpp +192 -194
  14. data/ext/opencv/cvutils.h +30 -29
  15. data/{extconf.rb → ext/opencv/extconf.rb} +12 -4
  16. data/lib/opencv.rb +12 -3
  17. data/lib/opencv/psyched_yaml.rb +22 -22
  18. data/lib/opencv/version.rb +1 -1
  19. data/ruby-opencv.gemspec +17 -16
  20. data/test/helper.rb +1 -1
  21. data/test/runner.rb +30 -30
  22. data/test/test_curve.rb +1 -1
  23. data/test/test_cvavgcomp.rb +24 -24
  24. data/test/test_cvbox2d.rb +76 -76
  25. data/test/test_cvcapture.rb +183 -183
  26. data/test/test_cvchain.rb +108 -108
  27. data/test/test_cvcircle32f.rb +41 -41
  28. data/test/test_cvconnectedcomp.rb +61 -61
  29. data/test/test_cvcontour.rb +150 -150
  30. data/test/test_cvcontourtree.rb +43 -43
  31. data/test/test_cverror.rb +1 -1
  32. data/test/test_cvfeaturetree.rb +65 -65
  33. data/test/test_cvfont.rb +58 -58
  34. data/test/test_cvhaarclassifiercascade.rb +63 -63
  35. data/test/test_cvhistogram.rb +1 -1
  36. data/test/test_cvhumoments.rb +83 -83
  37. data/test/test_cvline.rb +50 -50
  38. data/test/test_cvmat.rb +1 -1
  39. data/test/test_cvmat_drawing.rb +1 -1
  40. data/test/test_cvmat_dxt.rb +1 -1
  41. data/test/test_cvmat_imageprocessing.rb +1 -1
  42. data/test/test_cvmat_matching.rb +1 -1
  43. data/test/test_cvmoments.rb +180 -180
  44. data/test/test_cvpoint.rb +75 -75
  45. data/test/test_cvpoint2d32f.rb +75 -75
  46. data/test/test_cvpoint3d32f.rb +93 -93
  47. data/test/test_cvrect.rb +144 -144
  48. data/test/test_cvscalar.rb +113 -113
  49. data/test/test_cvseq.rb +295 -295
  50. data/test/test_cvsize.rb +75 -75
  51. data/test/test_cvsize2d32f.rb +75 -75
  52. data/test/test_cvslice.rb +31 -31
  53. data/test/test_cvsurfparams.rb +57 -57
  54. data/test/test_cvsurfpoint.rb +66 -66
  55. data/test/test_cvtermcriteria.rb +56 -56
  56. data/test/test_cvtwopoints.rb +40 -40
  57. data/test/test_cvvideowriter.rb +58 -58
  58. data/test/test_iplconvkernel.rb +54 -54
  59. data/test/test_iplimage.rb +1 -1
  60. data/test/test_mouseevent.rb +17 -17
  61. data/test/test_opencv.rb +1 -1
  62. data/test/test_pointset.rb +1 -1
  63. data/test/test_preliminary.rb +130 -130
  64. data/test/test_trackbar.rb +47 -47
  65. data/test/test_window.rb +115 -115
  66. metadata +26 -54
  67. data/ext/opencv/lib/opencv.rb +0 -3
  68. data/ext/opencv/lib/opencv/psyched_yaml.rb +0 -22
  69. data/ext/opencv/lib/opencv/version.rb +0 -3
@@ -1,29 +1,30 @@
1
- /************************************************************
2
-
3
- cvutils.h -
4
-
5
- $Author: ser1zw $
6
-
7
- Copyright (C) 2011 ser1zw
8
-
9
- ************************************************************/
10
-
11
- #include <ruby.h>
12
- #include "opencv2/core/core_c.h"
13
- #include "opencv2/core/core.hpp"
14
- #include "opencv2/imgproc/imgproc_c.h"
15
- #include "opencv2/imgproc/imgproc.hpp"
16
-
17
- #define raise_cverror(e) cCvError::raise(e)
18
-
19
- void raise_typeerror(VALUE object, VALUE expected_class);
20
- void raise_typeerror(VALUE object, const char* expected_class_name);
21
- void raise_compatible_typeerror(VALUE object, VALUE expected_class);
22
- void raise_compatible_typeerror(VALUE object, const char* expected_class_name);
23
- void* rb_cvAlloc(size_t size);
24
- CvMat* rb_cvCreateMat(int height, int width, int type);
25
- IplImage* rb_cvCreateImage(CvSize size, int depth, int channels);
26
- IplConvKernel* rb_cvCreateStructuringElementEx(int cols, int rows, int anchorX, int anchorY, int shape, int *values);
27
- CvMemStorage* rb_cvCreateMemStorage(int block_size);
28
- VALUE rb_get_option_table(VALUE klass, const char* table_name, VALUE option);
29
-
1
+ /************************************************************
2
+
3
+ cvutils.h -
4
+
5
+ $Author: ser1zw $
6
+
7
+ Copyright (C) 2011 ser1zw
8
+
9
+ ************************************************************/
10
+
11
+ #include <ruby.h>
12
+ #include "opencv2/core/core_c.h"
13
+ #include "opencv2/core/core.hpp"
14
+ #include "opencv2/core/internal.hpp"
15
+ #include "opencv2/imgproc/imgproc_c.h"
16
+ #include "opencv2/imgproc/imgproc.hpp"
17
+
18
+ #define raise_cverror(e) cCvError::raise(e)
19
+
20
+ void raise_typeerror(VALUE object, VALUE expected_class);
21
+ void raise_typeerror(VALUE object, const char* expected_class_name);
22
+ void raise_compatible_typeerror(VALUE object, VALUE expected_class);
23
+ void raise_compatible_typeerror(VALUE object, const char* expected_class_name);
24
+ void* rb_cvAlloc(size_t size);
25
+ CvMat* rb_cvCreateMat(int height, int width, int type);
26
+ IplImage* rb_cvCreateImage(CvSize size, int depth, int channels);
27
+ IplConvKernel* rb_cvCreateStructuringElementEx(int cols, int rows, int anchorX, int anchorY, int shape, int *values);
28
+ CvMemStorage* rb_cvCreateMemStorage(int block_size);
29
+ VALUE rb_get_option_table(VALUE klass, const char* table_name, VALUE option);
30
+
@@ -5,14 +5,17 @@ def cv_version_suffix(incdir)
5
5
  major, minor, subminor = nil, nil, nil
6
6
  open("#{incdir}/opencv2/core/version.hpp", 'r') { |f|
7
7
  f.read.lines.each { |line|
8
- major = $1.to_s if line =~ /\A#define\s+CV_MAJOR_VERSION\s+(\d+)\s*\Z/
9
- minor = $1.to_s if line =~ /\A#define\s+CV_MINOR_VERSION\s+(\d+)\s*\Z/
10
- subminor = $1.to_s if line =~ /\A#define\s+CV_SUBMINOR_VERSION\s+(\d+)\s*\Z/
8
+ major = $1.to_s if line =~ /\A#define\s+(?:CV_VERSION_EPOCH|CV_MAJOR_VERSION)\s+(\d+)\s*\Z/
9
+ minor = $1.to_s if line =~ /\A#define\s+(?:CV_VERSION_MAJOR|CV_MINOR_VERSION)\s+(\d+)\s*\Z/
10
+ subminor = $1.to_s if line =~ /\A#define\s+(?:CV_VERSION_MINOR|CV_SUBMINOR_VERSION)\s+(\d+)\s*\Z/
11
11
  }
12
12
  }
13
13
  major + minor + subminor
14
14
  end
15
15
 
16
+ # Quick fix for 2.0.0
17
+ # @libdir_basename is set to nil and dir_config() sets invalid libdir '${opencv-dir}/' when --with-opencv-dir option passed.
18
+ @libdir_basename ||= 'lib'
16
19
  incdir, libdir = dir_config("opencv", "/usr/local/include", "/usr/local/lib")
17
20
  dir_config("libxml2", "/usr/include", "/usr/lib")
18
21
 
@@ -67,9 +70,14 @@ opencv_headers.each {|header|
67
70
  }
68
71
  have_header("stdarg.h")
69
72
 
73
+ if $warnflags
74
+ $warnflags.slice!('-Wdeclaration-after-statement')
75
+ $warnflags.slice!('-Wimplicit-function-declaration')
76
+ end
77
+
70
78
  # Quick fix for 1.8.7
71
79
  $CFLAGS << " -I#{File.dirname(__FILE__)}/ext/opencv"
72
80
 
73
81
  # Create Makefile
74
- create_makefile("opencv", "./ext/opencv")
82
+ create_makefile('opencv')
75
83
 
@@ -1,3 +1,12 @@
1
- require (File.dirname(__FILE__) + '/opencv/version')
2
- require 'opencv.so'
3
-
1
+ require (File.dirname(__FILE__) + '/opencv/version')
2
+
3
+ if RUBY_PLATFORM =~ /mingw|mswin/
4
+ major, minor, subminor = RUBY_VERSION.split('.')
5
+ begin
6
+ require "#{major}.#{minor}/opencv.so"
7
+ rescue LoadError
8
+ require 'opencv.so'
9
+ end
10
+ else
11
+ require 'opencv.so'
12
+ end
@@ -1,22 +1,22 @@
1
- # -*- mode: ruby; coding: utf-8-unix -*-
2
- # Psych loader for avoiding loading problem
3
- # (borrowed from Bundler 1.1.rc.7 https://github.com/carlhuda/bundler/blob/v1.1.rc.7/lib/bundler/psyched_yaml.rb )
4
- #
5
- # See: https://github.com/ruby-opencv/ruby-opencv/pull/6
6
-
7
- # Psych could be a gem
8
- begin
9
- gem 'psych'
10
- rescue Gem::LoadError
11
- end if defined?(Gem)
12
-
13
- # Psych could be a stdlib
14
- begin
15
- # it's too late if Syck is already loaded
16
- require 'psych' unless defined?(Syck)
17
- rescue LoadError
18
- end
19
-
20
- # Psych might NOT EXIST AT ALL
21
- require 'yaml'
22
-
1
+ # -*- mode: ruby; coding: utf-8 -*-
2
+ # Psych loader for avoiding loading problem
3
+ # (borrowed from Bundler 1.1.rc.7 https://github.com/carlhuda/bundler/blob/v1.1.rc.7/lib/bundler/psyched_yaml.rb )
4
+ #
5
+ # See: https://github.com/ruby-opencv/ruby-opencv/pull/6
6
+
7
+ # Psych could be a gem
8
+ begin
9
+ gem 'psych'
10
+ rescue Gem::LoadError
11
+ end if defined?(Gem)
12
+
13
+ # Psych could be a stdlib
14
+ begin
15
+ # it's too late if Syck is already loaded
16
+ require 'psych' unless defined?(Syck)
17
+ rescue LoadError
18
+ end
19
+
20
+ # Psych might NOT EXIST AT ALL
21
+ require 'yaml'
22
+
@@ -1,3 +1,3 @@
1
1
  module OpenCV
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9.pre2'
3
3
  end
@@ -2,42 +2,43 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "ruby-opencv"
5
- s.version = "0.0.8.20130127124736"
5
+ s.version = "0.0.9.pre2.20130505044041"
6
6
 
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
7
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["lsxi", "ser1zw", "pcting"]
9
- s.date = "2013-01-27"
10
- s.description = ""
9
+ s.date = "2013-05-04"
10
+ s.description = "ruby-opencv is a wrapper of OpenCV for Ruby. It helps you to write computer vision programs (e.g. detecting faces from pictures) with Ruby."
11
11
  s.email = ["masakazu.yonekura@gmail.com", "azariahsawtikes@gmail.com", "pcting@gmail.com"]
12
- s.extensions = ["extconf.rb"]
13
- s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "examples/matching_to_many_images/train/trainImages.txt"]
14
- 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"]
12
+ s.extensions = ["ext/opencv/extconf.rb"]
13
+ s.extra_rdoc_files = ["DEVELOPERS_NOTE.md", "History.txt", "License.txt", "Manifest.txt", "README.md", "examples/matching_to_many_images/train/trainImages.txt"]
14
+ s.files = [".gitignore", "DEVELOPERS_NOTE.md", "Gemfile", "History.txt", "License.txt", "Manifest.txt", "README.md", "Rakefile", "config.yml", "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/extconf.rb", "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/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", "images/CvMat_sobel.png", "images/CvMat_sub_rect.png", "images/CvSeq_relationmap.png", "images/face_detect_from_lena.jpg", "lib/opencv.rb", "lib/opencv/psyched_yaml.rb", "lib/opencv/version.rb", "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"]
15
15
  s.homepage = "https://github.com/ruby-opencv/ruby-opencv/"
16
+ s.licenses = ["The BSD License"]
16
17
  s.rdoc_options = ["--main", "README.md"]
17
18
  s.require_paths = ["lib"]
18
19
  s.rubyforge_project = "ruby-opencv"
19
- s.rubygems_version = "1.8.24"
20
+ s.rubygems_version = "2.0.3"
20
21
  s.summary = "OpenCV wrapper for Ruby"
21
- 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"]
22
+ s.test_files = ["test/test_cvhistogram.rb", "test/test_cvconnectedcomp.rb", "test/test_mouseevent.rb", "test/test_opencv.rb", "test/test_cvmat_imageprocessing.rb", "test/test_cvmat.rb", "test/test_cvfeaturetree.rb", "test/test_iplconvkernel.rb", "test/test_cvchain.rb", "test/test_cvmat_drawing.rb", "test/test_cvpoint.rb", "test/test_trackbar.rb", "test/test_cvsize2d32f.rb", "test/test_cvsurfparams.rb", "test/test_cvscalar.rb", "test/test_cverror.rb", "test/test_cvhumoments.rb", "test/test_iplimage.rb", "test/test_cvslice.rb", "test/test_cvtwopoints.rb", "test/test_cvfont.rb", "test/test_cvseq.rb", "test/test_cvcontour.rb", "test/test_curve.rb", "test/test_cvsize.rb", "test/test_window.rb", "test/test_cvbox2d.rb", "test/test_cvpoint2d32f.rb", "test/test_cvcapture.rb", "test/test_pointset.rb", "test/test_cvcontourtree.rb", "test/test_cvavgcomp.rb", "test/test_cvsurfpoint.rb", "test/test_cvrect.rb", "test/test_cvline.rb", "test/test_cvvideowriter.rb", "test/test_cvpoint3d32f.rb", "test/test_cvmat_matching.rb", "test/test_cvcircle32f.rb", "test/test_preliminary.rb", "test/test_cvmat_dxt.rb", "test/test_cvmoments.rb", "test/test_cvtermcriteria.rb", "test/test_cvhaarclassifiercascade.rb"]
22
23
 
23
24
  if s.respond_to? :specification_version then
24
- s.specification_version = 3
25
+ s.specification_version = 4
25
26
 
26
27
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
- s.add_development_dependency(%q<rdoc>, ["~> 3.10"])
28
+ s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
28
29
  s.add_development_dependency(%q<rake-compiler>, [">= 0"])
29
30
  s.add_development_dependency(%q<hoe-gemspec>, [">= 0"])
30
- s.add_development_dependency(%q<hoe>, ["~> 3.5"])
31
+ s.add_development_dependency(%q<hoe>, ["~> 3.6"])
31
32
  else
32
- s.add_dependency(%q<rdoc>, ["~> 3.10"])
33
+ s.add_dependency(%q<rdoc>, ["~> 4.0"])
33
34
  s.add_dependency(%q<rake-compiler>, [">= 0"])
34
35
  s.add_dependency(%q<hoe-gemspec>, [">= 0"])
35
- s.add_dependency(%q<hoe>, ["~> 3.5"])
36
+ s.add_dependency(%q<hoe>, ["~> 3.6"])
36
37
  end
37
38
  else
38
- s.add_dependency(%q<rdoc>, ["~> 3.10"])
39
+ s.add_dependency(%q<rdoc>, ["~> 4.0"])
39
40
  s.add_dependency(%q<rake-compiler>, [">= 0"])
40
41
  s.add_dependency(%q<hoe-gemspec>, [">= 0"])
41
- s.add_dependency(%q<hoe>, ["~> 3.5"])
42
+ s.add_dependency(%q<hoe>, ["~> 3.6"])
42
43
  end
43
44
  end
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # -*- mode: ruby; coding: utf-8-unix -*-
2
+ # -*- mode: ruby; coding: utf-8 -*-
3
3
  require 'test/unit'
4
4
  require 'digest/md5'
5
5
  require 'opencv'
@@ -1,30 +1,30 @@
1
- #!/usr/bin/env ruby
2
- # -*- mode: ruby; coding: utf-8-unix -*-
3
- require 'test/unit'
4
-
5
- src_testdir = File.dirname(File.expand_path(__FILE__))
6
- if Test::Unit.methods.include? :setup_argv
7
- srcdir = File.dirname(src_testdir)
8
- Test::Unit.setup_argv {|files|
9
- if files.empty?
10
- [src_testdir]
11
- else
12
- files.map {|f|
13
- if File.exist? "#{src_testdir}/#{f}"
14
- "#{src_testdir}/#{f}"
15
- elsif File.exist? "#{srcdir}/#{f}"
16
- "#{srcdir}/#{f}"
17
- elsif File.exist? f
18
- f
19
- else
20
- raise ArgumentError, "not found: #{f}"
21
- end
22
- }
23
- end
24
- }
25
- elsif Test::Unit.constants.map {|c| c.to_sym }.include? :AutoRunner
26
- Test::Unit::AutoRunner.run(true, src_testdir)
27
- else
28
- raise 'Test runner not found'
29
- end
30
-
1
+ #!/usr/bin/env ruby
2
+ # -*- mode: ruby; coding: utf-8 -*-
3
+ require 'test/unit'
4
+
5
+ src_testdir = File.dirname(File.expand_path(__FILE__))
6
+ if Test::Unit.methods.include? :setup_argv
7
+ srcdir = File.dirname(src_testdir)
8
+ Test::Unit.setup_argv {|files|
9
+ if files.empty?
10
+ [src_testdir]
11
+ else
12
+ files.map {|f|
13
+ if File.exist? "#{src_testdir}/#{f}"
14
+ "#{src_testdir}/#{f}"
15
+ elsif File.exist? "#{srcdir}/#{f}"
16
+ "#{srcdir}/#{f}"
17
+ elsif File.exist? f
18
+ f
19
+ else
20
+ raise ArgumentError, "not found: #{f}"
21
+ end
22
+ }
23
+ end
24
+ }
25
+ elsif Test::Unit.constants.map {|c| c.to_sym }.include? :AutoRunner
26
+ Test::Unit::AutoRunner.run(true, src_testdir)
27
+ else
28
+ raise 'Test runner not found'
29
+ end
30
+
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # -*- mode: ruby; coding: utf-8-unix -*-
2
+ # -*- mode: ruby; coding: utf-8 -*-
3
3
  require 'test/unit'
4
4
  require 'opencv'
5
5
  require File.expand_path(File.dirname(__FILE__)) + '/helper'
@@ -1,24 +1,24 @@
1
- #!/usr/bin/env ruby
2
- # -*- mode: ruby; coding: utf-8-unix -*-
3
- require 'test/unit'
4
- require 'opencv'
5
- require File.expand_path(File.dirname(__FILE__)) + '/helper'
6
-
7
- include OpenCV
8
-
9
- # Tests for OpenCV::CvAvgComp
10
- class TestCvAvgComp < OpenCVTestCase
11
- def setup
12
- @avgcomp = CvAvgComp.new
13
- end
14
-
15
- def test_initialize
16
- assert_equal(CvAvgComp, @avgcomp.class)
17
- assert(@avgcomp.is_a? CvRect)
18
- end
19
-
20
- def test_neighbors
21
- assert_equal(Fixnum, @avgcomp.neighbors.class)
22
- end
23
- end
24
-
1
+ #!/usr/bin/env ruby
2
+ # -*- mode: ruby; coding: utf-8 -*-
3
+ require 'test/unit'
4
+ require 'opencv'
5
+ require File.expand_path(File.dirname(__FILE__)) + '/helper'
6
+
7
+ include OpenCV
8
+
9
+ # Tests for OpenCV::CvAvgComp
10
+ class TestCvAvgComp < OpenCVTestCase
11
+ def setup
12
+ @avgcomp = CvAvgComp.new
13
+ end
14
+
15
+ def test_initialize
16
+ assert_equal(CvAvgComp, @avgcomp.class)
17
+ assert(@avgcomp.is_a? CvRect)
18
+ end
19
+
20
+ def test_neighbors
21
+ assert_equal(Fixnum, @avgcomp.neighbors.class)
22
+ end
23
+ end
24
+
@@ -1,76 +1,76 @@
1
- #!/usr/bin/env ruby
2
- # -*- mode: ruby; coding: utf-8-unix -*-
3
- require 'test/unit'
4
- require 'opencv'
5
- require File.expand_path(File.dirname(__FILE__)) + '/helper'
6
-
7
- include OpenCV
8
-
9
- # Tests for OpenCV::CvBox2D
10
- class TestCvBox2D < OpenCVTestCase
11
- class MyPoint; end
12
- def test_initialize
13
- box = CvBox2D.new
14
- assert_in_delta(0, box.center.x, 0.001)
15
- assert_in_delta(0, box.center.y, 0.001)
16
- assert_in_delta(0, box.size.width, 0.001)
17
- assert_in_delta(0, box.size.height, 0.001)
18
- assert_in_delta(0, box.angle, 0.001)
19
-
20
- box = CvBox2D.new(CvPoint2D32f.new(1.1, 2.2), CvSize2D32f.new(3.3, 4.4), 5.5)
21
- assert_in_delta(1.1, box.center.x, 0.001)
22
- assert_in_delta(2.2, box.center.y, 0.001)
23
- assert_in_delta(3.3, box.size.width, 0.001)
24
- assert_in_delta(4.4, box.size.height, 0.001)
25
- assert_in_delta(5.5, box.angle, 0.001)
26
- end
27
-
28
- def test_center
29
- box = CvBox2D.new
30
- box.center = CvPoint2D32f.new(1.1, 2.2)
31
- assert_in_delta(1.1, box.center.x, 0.001)
32
- assert_in_delta(2.2, box.center.y, 0.001)
33
-
34
- box.center.x = 3.3
35
- box.center.y = 4.4
36
- assert_in_delta(3.3, box.center.x, 0.001)
37
- assert_in_delta(4.4, box.center.y, 0.001)
38
- end
39
-
40
- def test_size
41
- box = CvBox2D.new
42
- box.size = CvSize2D32f.new(1.1, 2.2)
43
- assert_in_delta(1.1, box.size.width, 0.001)
44
- assert_in_delta(2.2, box.size.height, 0.001)
45
-
46
- box.size.width = 3.3
47
- box.size.height = 4.4
48
- assert_in_delta(3.3, box.size.width, 0.001)
49
- assert_in_delta(4.4, box.size.height, 0.001)
50
- end
51
-
52
- def test_angle
53
- box = CvBox2D.new
54
- box.angle = 1.1
55
- assert_in_delta(1.1, box.angle, 0.001)
56
- end
57
-
58
- def test_points
59
- box = CvBox2D.new
60
- box.center = CvPoint2D32f.new(10, 20)
61
- box.size = CvSize2D32f.new(5, 7)
62
- pt = box.points
63
-
64
- assert_equal(4, pt.size)
65
- assert_in_delta(7.5, pt[0].x, 0.001)
66
- assert_in_delta(23.5, pt[0].y, 0.001)
67
- assert_in_delta(7.5, pt[1].x, 0.001)
68
- assert_in_delta(16.5, pt[1].y, 0.001)
69
- assert_in_delta(12.5, pt[2].x, 0.001)
70
- assert_in_delta(16.5, pt[2].y, 0.001)
71
- assert_in_delta(12.5, pt[3].x, 0.001)
72
- assert_in_delta(23.5, pt[3].y, 0.001)
73
- end
74
- end
75
-
76
-
1
+ #!/usr/bin/env ruby
2
+ # -*- mode: ruby; coding: utf-8 -*-
3
+ require 'test/unit'
4
+ require 'opencv'
5
+ require File.expand_path(File.dirname(__FILE__)) + '/helper'
6
+
7
+ include OpenCV
8
+
9
+ # Tests for OpenCV::CvBox2D
10
+ class TestCvBox2D < OpenCVTestCase
11
+ class MyPoint; end
12
+ def test_initialize
13
+ box = CvBox2D.new
14
+ assert_in_delta(0, box.center.x, 0.001)
15
+ assert_in_delta(0, box.center.y, 0.001)
16
+ assert_in_delta(0, box.size.width, 0.001)
17
+ assert_in_delta(0, box.size.height, 0.001)
18
+ assert_in_delta(0, box.angle, 0.001)
19
+
20
+ box = CvBox2D.new(CvPoint2D32f.new(1.1, 2.2), CvSize2D32f.new(3.3, 4.4), 5.5)
21
+ assert_in_delta(1.1, box.center.x, 0.001)
22
+ assert_in_delta(2.2, box.center.y, 0.001)
23
+ assert_in_delta(3.3, box.size.width, 0.001)
24
+ assert_in_delta(4.4, box.size.height, 0.001)
25
+ assert_in_delta(5.5, box.angle, 0.001)
26
+ end
27
+
28
+ def test_center
29
+ box = CvBox2D.new
30
+ box.center = CvPoint2D32f.new(1.1, 2.2)
31
+ assert_in_delta(1.1, box.center.x, 0.001)
32
+ assert_in_delta(2.2, box.center.y, 0.001)
33
+
34
+ box.center.x = 3.3
35
+ box.center.y = 4.4
36
+ assert_in_delta(3.3, box.center.x, 0.001)
37
+ assert_in_delta(4.4, box.center.y, 0.001)
38
+ end
39
+
40
+ def test_size
41
+ box = CvBox2D.new
42
+ box.size = CvSize2D32f.new(1.1, 2.2)
43
+ assert_in_delta(1.1, box.size.width, 0.001)
44
+ assert_in_delta(2.2, box.size.height, 0.001)
45
+
46
+ box.size.width = 3.3
47
+ box.size.height = 4.4
48
+ assert_in_delta(3.3, box.size.width, 0.001)
49
+ assert_in_delta(4.4, box.size.height, 0.001)
50
+ end
51
+
52
+ def test_angle
53
+ box = CvBox2D.new
54
+ box.angle = 1.1
55
+ assert_in_delta(1.1, box.angle, 0.001)
56
+ end
57
+
58
+ def test_points
59
+ box = CvBox2D.new
60
+ box.center = CvPoint2D32f.new(10, 20)
61
+ box.size = CvSize2D32f.new(5, 7)
62
+ pt = box.points
63
+
64
+ assert_equal(4, pt.size)
65
+ assert_in_delta(7.5, pt[0].x, 0.001)
66
+ assert_in_delta(23.5, pt[0].y, 0.001)
67
+ assert_in_delta(7.5, pt[1].x, 0.001)
68
+ assert_in_delta(16.5, pt[1].y, 0.001)
69
+ assert_in_delta(12.5, pt[2].x, 0.001)
70
+ assert_in_delta(16.5, pt[2].y, 0.001)
71
+ assert_in_delta(12.5, pt[3].x, 0.001)
72
+ assert_in_delta(23.5, pt[3].y, 0.001)
73
+ end
74
+ end
75
+
76
+