diff --git a/Gemfile b/Gemfile
index 648b7a1..977b3ec 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,6 +2,5 @@ source :gemcutter
gem "hoe"
gem "hoe-gemspec"
-gem "rspec"
gem "rake-compiler"
-gem "yard"
\ No newline at end of file
+gem "yard"
diff --git a/Rakefile b/Rakefile
index 6e2049b..2acc252 100644
--- a/Rakefile
+++ b/Rakefile
@@ -34,7 +34,7 @@ EOF
p.urls = ['http://blueruby.mydns.jp/opencv']
- p.extra_dev_deps << ['rake-compiler', '>= 0'] << ['hoe-gemspec'] << ['rspec']
+ p.extra_dev_deps << ['rake-compiler', '>= 0'] << ['hoe-gemspec']
Rake::ExtensionTask.new('opencv', spec) do |ext|
ext.lib_dir = File.join('lib', 'opencv')
diff --git a/ext/opencv/cvmat.cpp b/ext/opencv/cvmat.cpp
index e4fead9..72b4081 100644
--- a/ext/opencv/cvmat.cpp
+++ b/ext/opencv/cvmat.cpp
@@ -2512,25 +2512,27 @@ rb_invert(int argc, VALUE *argv, VALUE self)
/*
* Solves one or more linear systems or least-squares problems.
*
- * @overload solve(mat, inversion_method = :lu)
- * @param mat [CvMat] Input matrix on the right-hand side of the system.
+ * @overload solve(src1, src2, inversion_method = :lu)
+ * @param src1 [CvMat] Input matrix on the left-hand side of the system.
+ * @param src2 [CvMat] Input matrix on the right-hand side of the system.
* @param inversion_method [Symbol] Inversion method.
* * :lu - Gaussian elimincation with optimal pivot element chose.
* * :svd - Singular value decomposition(SVD) method.
* * :svd_sym - SVD method for a symmetric positively-defined matrix.
* @return [Number] Output solution.
- * @opencv_func cvInvert
+ * @scope class
+ * @opencv_func cvSolve
*/
VALUE
rb_solve(int argc, VALUE *argv, VALUE self)
{
- VALUE mat, symbol;
- rb_scan_args(argc, argv, "11", &mat, &symbol);
+ VALUE src1, src2, symbol;
+ rb_scan_args(argc, argv, "21", &src1, &src2, &symbol);
VALUE dest = Qnil;
- CvArr* arr_ptr = CVARR_WITH_CHECK(mat);
+ CvArr* src2_ptr = CVARR_WITH_CHECK(src2);
try {
- dest = new_mat_kind_object(cvGetSize(arr_ptr), self);
- cvSolve(CVARR(self), arr_ptr, CVARR(dest), CVMETHOD("INVERSION_METHOD", symbol, CV_LU));
+ dest = new_mat_kind_object(cvGetSize(src2_ptr), src2);
+ cvSolve(CVARR_WITH_CHECK(src1), src2_ptr, CVARR(dest), CVMETHOD("INVERSION_METHOD", symbol, CV_LU));
}
catch (cv::Exception& e) {
raise_cverror(e);
@@ -5768,7 +5770,7 @@ init_ruby_class()
rb_define_method(rb_klass, "det", RUBY_METHOD_FUNC(rb_det), 0);
rb_define_alias(rb_klass, "determinant", "det");
rb_define_method(rb_klass, "invert", RUBY_METHOD_FUNC(rb_invert), -1);
- rb_define_method(rb_klass, "solve", RUBY_METHOD_FUNC(rb_solve), -1);
+ rb_define_singleton_method(rb_klass, "solve", RUBY_METHOD_FUNC(rb_solve), -1);
rb_define_method(rb_klass, "svd", RUBY_METHOD_FUNC(rb_svd), -1);
rb_define_method(rb_klass, "svbksb", RUBY_METHOD_FUNC(rb_svbksb), -1);
rb_define_method(rb_klass, "eigenvv", RUBY_METHOD_FUNC(rb_eigenvv), -1);
diff --git a/ext/opencv/cvseq.cpp b/ext/opencv/cvseq.cpp
index 28645f0..7343297 100644
--- a/ext/opencv/cvseq.cpp
+++ b/ext/opencv/cvseq.cpp
@@ -332,13 +332,13 @@ rb_seq_push(VALUE self, VALUE args, int flag)
{
CvSeq *seq = CVSEQ(self);
VALUE klass = seqblock_class(seq), object;
- void *elem = NULL;
+ volatile void *elem = NULL;
int len = RARRAY_LEN(args);
for (int i = 0; i < len; ++i) {
object = RARRAY_PTR(args)[i];
if (CLASS_OF(object) == klass) {
if (TYPE(object) == T_FIXNUM) {
- int int_elem = FIX2INT(object);
+ volatile int int_elem = FIX2INT(object);
elem = &int_elem;
}
else {
@@ -346,9 +346,9 @@ rb_seq_push(VALUE self, VALUE args, int flag)
}
try {
if (flag == CV_FRONT)
- cvSeqPushFront(seq, elem);
+ cvSeqPushFront(seq, (const void*)elem);
else
- cvSeqPush(seq, elem);
+ cvSeqPush(seq, (const void*)elem);
}
catch (cv::Exception& e) {
raise_cverror(e);
diff --git a/opencv.gemspec b/opencv.gemspec
index 8a4dbc2..10f7f74 100644
--- a/opencv.gemspec
+++ b/opencv.gemspec
@@ -2,23 +2,23 @@
Gem::Specification.new do |s|
s.name = "opencv"
- s.version = "0.0.6.20120501011158"
+ 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-04-30"
+ 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"]
+ 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_cvpoint3d32f.rb", "test/test_cvfont.rb", "test/test_iplconvkernel.rb", "test/test_cvfeaturetree.rb", "test/test_cvchain.rb", "test/test_cvmoments.rb", "test/test_cvcontour.rb", "test/test_cvmat_dxt.rb", "test/test_cverror.rb", "test/test_cvcontourtree.rb", "test/test_cvbox2d.rb", "test/test_curve.rb", "test/test_iplimage.rb", "test/test_cvmat_imageprocessing.rb", "test/test_window.rb", "test/test_cvcapture.rb", "test/test_cvscalar.rb", "test/test_cvcircle32f.rb", "test/test_mouseevent.rb", "test/test_opencv.rb", "test/test_cvpoint.rb", "test/test_cvsize.rb", "test/test_cvmat.rb", "test/test_cvsize2d32f.rb", "test/test_cvsurfpoint.rb", "test/test_trackbar.rb", "test/test_pointset.rb", "test/test_cvslice.rb", "test/test_cvhistogram.rb", "test/test_cvsurfparams.rb", "test/test_preliminary.rb", "test/test_cvtwopoints.rb", "test/test_cvhaarclassifiercascade.rb", "test/test_cvpoint2d32f.rb", "test/test_cvline.rb", "test/test_cvconnectedcomp.rb", "test/test_cvavgcomp.rb", "test/test_cvmat_drawing.rb", "test/test_cvtermcriteria.rb", "test/test_cvrect.rb", "test/test_cvhumoments.rb", "test/test_cvseq.rb", "test/test_cvvideowriter.rb"]
+ 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
@@ -27,20 +27,17 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q, ["~> 3.10"])
s.add_development_dependency(%q, [">= 0"])
s.add_development_dependency(%q, [">= 0"])
- s.add_development_dependency(%q, [">= 0"])
- s.add_development_dependency(%q, ["~> 3.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, [">= 0"])
- s.add_dependency(%q, ["~> 3.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, [">= 0"])
- s.add_dependency(%q, ["~> 3.0"])
+ s.add_dependency(%q, ["~> 3.1"])
end
end
diff --git a/test/test_cvmat.rb b/test/test_cvmat.rb
index f6aa9d8..3b103ad 100755
--- a/test/test_cvmat.rb
+++ b/test/test_cvmat.rb
@@ -2353,29 +2353,35 @@ class TestCvMat < OpenCVTestCase
elems2 = [3,
4,
5]
- m0 = create_cvmat(3, 3, :cv32f, 1) { |j, i, c|
+ a = create_cvmat(3, 3, :cv32f, 1) { |j, i, c|
CvScalar.new(elems1[c])
}
b = create_cvmat(3, 1, :cv32f, 1) { |j, i, c|
CvScalar.new(elems2[c])
}
- m1 = m0.solve(b)
- m2 = m0.solve(b, :lu)
- m3 = m0.solve(b, :svd)
- m4 = m0.solve(b, :svd_sym)
- m5 = m0.solve(b, :svd_symmetric)
+ m1 = CvMat.solve(a, b)
+ m2 = CvMat.solve(a, b, :lu)
+ m3 = CvMat.solve(a, b, :svd)
+ m4 = CvMat.solve(a, b, :svd_sym)
+ m5 = CvMat.solve(a, b, :svd_symmetric)
expected = [2, -2, 1]
- [m1, m2, m3, m4, m5].each { |m|
+ [m1, m2, m3].each { |m|
assert_equal(b.width, m.width)
- assert_equal(m0.height, m.height)
+ assert_equal(a.height, m.height)
assert_each_cvscalar(m, 0.001) { |j, i, c|
CvScalar.new(expected[c])
}
}
assert_raise(TypeError) {
- m0.solve(b, DUMMY_OBJ)
+ CvMat.solve(DUMMY_OBJ, b)
+ }
+ assert_raise(TypeError) {
+ CvMat.solve(a, DUMMY_OBJ)
+ }
+ assert_raise(TypeError) {
+ CvMat.solve(a, b, DUMMY_OBJ)
}
end
diff --git a/test/test_pointset.rb b/test/test_pointset.rb
index 696ee51..1799684 100755
--- a/test/test_pointset.rb
+++ b/test/test_pointset.rb
@@ -118,7 +118,7 @@ class TestPointSet < OpenCVTestCase
assert_equal(64, center.y.to_i)
assert_in_delta(32.959, circle.radius, 0.001)
- assert_raise(CvStsBadArg) {
+ assert_raise(CvStsBadSize) {
@contour2.min_enclosing_circle
}
end