From 688db69c2dd3d619ed527c317464e2b718a0f182 Mon Sep 17 00:00:00 2001 From: ser1zw Date: Sat, 3 Aug 2013 01:24:56 +0900 Subject: [PATCH] update OpenCV version --- README.md | 2 +- ext/opencv/opencv.cpp | 5 +++++ test/test_opencv.rb | 9 +++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 956c490..3de548b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ An OpenCV wrapper for Ruby. * Web site: -* Ruby 1.9.3, 2.0.0 and OpenCV 2.4.5 are supported. +* Ruby 1.9.3, 2.0.0 and OpenCV 2.4.6.1 are supported. ## Requirement diff --git a/ext/opencv/opencv.cpp b/ext/opencv/opencv.cpp index c19bbf4..024354f 100644 --- a/ext/opencv/opencv.cpp +++ b/ext/opencv/opencv.cpp @@ -166,6 +166,11 @@ define_ruby_module() rb_define_const(rb_module, "CV_MINOR_VERSION", INT2FIX(CV_MINOR_VERSION)); rb_define_const(rb_module, "CV_SUBMINOR_VERSION", INT2FIX(CV_SUBMINOR_VERSION)); + rb_define_const(rb_module, "CV_VERSION_EPOCH", INT2FIX(CV_VERSION_EPOCH)); + rb_define_const(rb_module, "CV_VERSION_MAJOR", INT2FIX(CV_VERSION_MAJOR)); + rb_define_const(rb_module, "CV_VERSION_MINOR", INT2FIX(CV_VERSION_MINOR)); + rb_define_const(rb_module, "CV_VERSION_REVISION", INT2FIX(CV_VERSION_REVISION)); + /* 0: 8bit unsigned */ rb_define_const(rb_module, "CV_8U", INT2FIX(CV_8U)); /* 1: 8bit signed */ diff --git a/test/test_opencv.rb b/test/test_opencv.rb index 8da8f63..6f5df34 100755 --- a/test/test_opencv.rb +++ b/test/test_opencv.rb @@ -9,10 +9,15 @@ include OpenCV class TestOpenCV < OpenCVTestCase def test_constants # OpenCV version - assert_equal('2.4.3', CV_VERSION) + assert_equal('2.4.6.1', CV_VERSION) assert_equal(2, CV_MAJOR_VERSION) assert_equal(4, CV_MINOR_VERSION) - assert_equal(3, CV_SUBMINOR_VERSION) + assert_equal(6, CV_SUBMINOR_VERSION) + + assert_equal(2, CV_VERSION_EPOCH) + assert_equal(4, CV_VERSION_MAJOR) + assert_equal(6, CV_VERSION_MINOR) + assert_equal(1, CV_VERSION_REVISION) # Depths assert_equal(0, CV_8U)