bonanza-ruby-opencv 0.0.13.20160606151615 → 0.0.13.20160621111908
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/opencv/cvmat.cpp +16 -3
- data/ext/opencv/cvmat.h +1 -1
- data/ruby-opencv.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9db0b94905f6087fa029acc9c129281308832420
|
4
|
+
data.tar.gz: 0a14b2216cfe58ca0eac122a4771fec9c5ef667d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c792de42ba8042d613b1821bf12f437bf7354736eb4347f458946eb8957f19cda09f3f642d26ed8e27b08d9bb229aa84b3a4c25603f3714b96b509db7fa0683
|
7
|
+
data.tar.gz: 62157065d7794ce7f3ec08ad8bd4fe94d7b17632621d7bc239bc7f79ffb7d8be81f10e5ba93d8afb38b018d2fe14f6411a965959965ee4eb0f8dc40964a14a16
|
data/ext/opencv/cvmat.cpp
CHANGED
@@ -1045,6 +1045,19 @@ rb_pixel_value(VALUE self, VALUE index)
|
|
1045
1045
|
return rb_float_new(scalar.val[0]);
|
1046
1046
|
}
|
1047
1047
|
|
1048
|
+
VALUE
|
1049
|
+
rb_zero_q(VALUE self, VALUE x, VALUE y)
|
1050
|
+
{
|
1051
|
+
CvScalar scalar;
|
1052
|
+
try {
|
1053
|
+
scalar = cvGet2D(CVARR(self), NUM2INT(y), NUM2INT(x));
|
1054
|
+
}
|
1055
|
+
catch (cv::Exception& e) {
|
1056
|
+
raise_cverror(e);
|
1057
|
+
}
|
1058
|
+
return (scalar.val[0] == 0 && scalar.val[1] == 0 && scalar.val[2] == 0 && scalar.val[3] == 0) ? Qtrue : Qfalse;
|
1059
|
+
}
|
1060
|
+
|
1048
1061
|
/*
|
1049
1062
|
* call-seq:
|
1050
1063
|
*
|
@@ -1282,9 +1295,8 @@ rb_save_image(int argc, VALUE *argv, VALUE self)
|
|
1282
1295
|
*
|
1283
1296
|
*/
|
1284
1297
|
VALUE
|
1285
|
-
rb_fit_line(VALUE self, VALUE distType, VALUE param, VALUE reps, VALUE aeps)
|
1298
|
+
rb_fit_line(VALUE self, VALUE dest, VALUE distType, VALUE param, VALUE reps, VALUE aeps)
|
1286
1299
|
{
|
1287
|
-
VALUE dest = new_mat_kind_object(cvGetSize(CVARR(self)), self);
|
1288
1300
|
try {
|
1289
1301
|
const cv::Mat selfMat(CVMAT(self));
|
1290
1302
|
cv::Mat destMat(CVMAT(dest));
|
@@ -6666,6 +6678,7 @@ init_ruby_class()
|
|
6666
6678
|
rb_define_alias(rb_klass, "at", "[]");
|
6667
6679
|
rb_define_method(rb_klass, "[]=", RUBY_METHOD_FUNC(rb_aset), -2);
|
6668
6680
|
rb_define_method(rb_klass, "pixel_value", RUBY_METHOD_FUNC(rb_pixel_value), 1);
|
6681
|
+
rb_define_method(rb_klass, "zero?", RUBY_METHOD_FUNC(rb_zero_q), 2);
|
6669
6682
|
rb_define_method(rb_klass, "vector_magnitude!", RUBY_METHOD_FUNC(rb_vector_magnitude), 0);
|
6670
6683
|
rb_define_method(rb_klass, "set_data", RUBY_METHOD_FUNC(rb_set_data), 1);
|
6671
6684
|
rb_define_method(rb_klass, "set", RUBY_METHOD_FUNC(rb_set), -1);
|
@@ -6863,7 +6876,7 @@ init_ruby_class()
|
|
6863
6876
|
rb_define_method(rb_klass, "subspace_reconstruct", RUBY_METHOD_FUNC(rb_subspace_reconstruct), 2);
|
6864
6877
|
|
6865
6878
|
rb_define_method(rb_klass, "fit_ellipse", RUBY_METHOD_FUNC(rb_fit_ellipse), 0);
|
6866
|
-
rb_define_method(rb_klass, "fit_line", RUBY_METHOD_FUNC(rb_fit_line),
|
6879
|
+
rb_define_method(rb_klass, "fit_line", RUBY_METHOD_FUNC(rb_fit_line), 5);
|
6867
6880
|
|
6868
6881
|
// Bonz TODO: reimplement if necessary
|
6869
6882
|
// rb_define_method(rb_klass, "connected_components", RUBY_METHOD_FUNC(rb_connected_components), -1);
|
data/ext/opencv/cvmat.h
CHANGED
@@ -273,7 +273,7 @@ VALUE rb_extract_orb(int argc, VALUE *argv, VALUE self);
|
|
273
273
|
// HighGUI function
|
274
274
|
VALUE rb_save_image(int argc, VALUE *argv, VALUE self);
|
275
275
|
|
276
|
-
VALUE rb_fit_line(VALUE self, VALUE distType, VALUE param, VALUE reps, VALUE aeps);
|
276
|
+
VALUE rb_fit_line(VALUE self, VALUE dest, VALUE distType, VALUE param, VALUE reps, VALUE aeps);
|
277
277
|
VALUE rb_fit_ellipse(VALUE self);
|
278
278
|
|
279
279
|
VALUE rb_connected_components(int argc, VALUE *argv, VALUE self);
|
data/ruby-opencv.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: ruby-opencv 0.0.13.
|
2
|
+
# stub: ruby-opencv 0.0.13.20160621111908 ruby lib
|
3
3
|
# stub: ext/opencv/extconf.rb
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "bonanza-ruby-opencv"
|
7
|
-
s.version = "0.0.13.
|
7
|
+
s.version = "0.0.13.20160621111908"
|
8
8
|
|
9
9
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
10
10
|
s.require_paths = ["lib"]
|
11
11
|
s.authors = ["lsxi", "ser1zw", "pcting"]
|
12
|
-
s.date = "2016-06-
|
12
|
+
s.date = "2016-06-21"
|
13
13
|
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."
|
14
14
|
s.email = ["masakazu.yonekura@gmail.com", "azariahsawtikes@gmail.com", "pcting@gmail.com"]
|
15
15
|
s.extensions = ["ext/opencv/extconf.rb"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bonanza-ruby-opencv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.13.
|
4
|
+
version: 0.0.13.20160621111908
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lsxi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-06-
|
13
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdoc
|