bonanza-ruby-opencv 0.0.13.20160621111908 → 0.0.13.20160627234042
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 +14 -0
- 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: 9d7ecce3c50d33f67eaa351e32a2bc562203c9ec
|
4
|
+
data.tar.gz: dabfb5e08f516da564e9309b40bc54d0e55a539b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 199202edb9d324d5d987022345d2c9f1b0619975d83ca1998bf73e19b833d10bb363c63d2867dc1fd764492912a7cd0947d2e9dee5c8fa56e6a615d18f65f7c2
|
7
|
+
data.tar.gz: d83c0bed5148e56ef34160625ffbee24c2d60c5e401ee85dde5f1e0a5eda8baf019d69fbbe13aaeb5b6afd5f3ddc321bff94bb33be408c797ec7d87fceb4cda1
|
data/ext/opencv/cvmat.cpp
CHANGED
@@ -5432,6 +5432,19 @@ rb_watershed(VALUE self, VALUE markers)
|
|
5432
5432
|
return markers;
|
5433
5433
|
}
|
5434
5434
|
|
5435
|
+
VALUE
|
5436
|
+
rb_kmeans(VALUE self, VALUE k, VALUE termcrit)
|
5437
|
+
{
|
5438
|
+
VALUE labels = new_object(CVMAT(self)->height, 1, CV_32SC1);
|
5439
|
+
try {
|
5440
|
+
cvKMeans2(CVARR(self), NUM2INT(k), CVARR(labels), *CVTERMCRITERIA(termcrit));
|
5441
|
+
}
|
5442
|
+
catch (cv::Exception& e) {
|
5443
|
+
raise_cverror(e);
|
5444
|
+
}
|
5445
|
+
return labels;
|
5446
|
+
}
|
5447
|
+
|
5435
5448
|
/*
|
5436
5449
|
* call-seq:
|
5437
5450
|
* grab_cut -> cvmat(mask:cv8uc1)
|
@@ -6840,6 +6853,7 @@ init_ruby_class()
|
|
6840
6853
|
rb_define_method(rb_klass, "draw_chessboard_corners!", RUBY_METHOD_FUNC(rb_draw_chessboard_corners_bang), 3);
|
6841
6854
|
rb_define_method(rb_klass, "pyr_mean_shift_filtering", RUBY_METHOD_FUNC(rb_pyr_mean_shift_filtering), -1);
|
6842
6855
|
rb_define_method(rb_klass, "watershed", RUBY_METHOD_FUNC(rb_watershed), 1);
|
6856
|
+
rb_define_method(rb_klass, "kmeans", RUBY_METHOD_FUNC(rb_kmeans), 2);
|
6843
6857
|
rb_define_method(rb_klass, "grab_cut", RUBY_METHOD_FUNC(rb_grab_cut), 6);
|
6844
6858
|
rb_define_method(rb_klass, "grab_cut2", RUBY_METHOD_FUNC(rb_grab_cut2), 10);
|
6845
6859
|
|
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.20160627234042
|
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-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdoc
|