ruby-opencv 0.0.10 → 0.0.11.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/Manifest.txt +32 -8
- data/README.md +1 -1
- data/examples/alpha_blend.rb +2 -2
- data/examples/contours/bounding-box-detect-canny.rb +0 -0
- data/examples/contours/contour_retrieval_modes.rb +0 -0
- data/examples/convexhull.rb +0 -0
- data/examples/face_detect.rb +0 -0
- data/examples/facerec/create_csv.rb +43 -0
- data/examples/facerec/facerec_eigenfaces.rb +132 -0
- data/examples/facerec/facerec_fisherfaces.rb +131 -0
- data/examples/facerec/facerec_lbph.rb +116 -0
- data/examples/facerec/readme.md +111 -0
- data/examples/find_obj.rb +2 -2
- data/examples/houghcircle.rb +1 -1
- data/examples/{box.png → images/box.png} +0 -0
- data/examples/{box_in_scene.png → images/box_in_scene.png} +0 -0
- data/examples/{inpaint.png → images/inpaint.png} +0 -0
- data/examples/images/lena-256x256.jpg +0 -0
- data/examples/images/lena-eyes.jpg +0 -0
- data/examples/{lenna-rotated.jpg → images/lenna-rotated.jpg} +0 -0
- data/examples/{lenna.jpg → images/lenna.jpg} +0 -0
- data/examples/{stuff.jpg → images/stuff.jpg} +0 -0
- data/examples/{tiffany.jpg → images/tiffany.jpg} +0 -0
- data/examples/inpaint.rb +1 -1
- data/examples/match_kdtree.rb +2 -2
- data/examples/match_template.rb +26 -0
- data/examples/{matching_to_many_images.rb → matching_to_many_images/matching_to_many_images.rb} +3 -3
- data/examples/matching_to_many_images/query.png +0 -0
- data/examples/matching_to_many_images/train/1.png +0 -0
- data/examples/matching_to_many_images/train/2.png +0 -0
- data/examples/matching_to_many_images/train/3.png +0 -0
- data/examples/matching_to_many_images/train/trainImages.txt +0 -0
- data/examples/paint.rb +0 -0
- data/examples/snake.rb +0 -0
- data/ext/opencv/algorithm.cpp +286 -0
- data/ext/opencv/algorithm.h +38 -0
- data/ext/opencv/cvmat.cpp +205 -76
- data/ext/opencv/cvmat.h +8 -1
- data/ext/opencv/eigenfaces.cpp +67 -0
- data/ext/opencv/eigenfaces.h +30 -0
- data/ext/opencv/extconf.rb +0 -0
- data/ext/opencv/facerecognizer.cpp +174 -0
- data/ext/opencv/facerecognizer.h +46 -0
- data/ext/opencv/fisherfaces.cpp +67 -0
- data/ext/opencv/fisherfaces.h +30 -0
- data/ext/opencv/lbph.cpp +70 -0
- data/ext/opencv/lbph.h +30 -0
- data/ext/opencv/opencv.cpp +51 -1
- data/ext/opencv/opencv.h +6 -0
- data/lib/opencv.rb +0 -0
- data/lib/opencv/version.rb +1 -1
- data/ruby-opencv.gemspec +8 -7
- data/test/eigenfaces_save.xml +7524 -0
- data/test/fisherfaces_save.xml +7530 -0
- data/test/helper.rb +0 -0
- data/test/lbph_save.xml +4304 -0
- data/test/runner.rb +0 -0
- data/test/test_curve.rb +0 -0
- data/test/test_cvavgcomp.rb +0 -0
- data/test/test_cvbox2d.rb +0 -0
- data/test/test_cvcapture.rb +0 -0
- data/test/test_cvchain.rb +0 -0
- data/test/test_cvcircle32f.rb +0 -0
- data/test/test_cvconnectedcomp.rb +0 -0
- data/test/test_cvcontour.rb +0 -0
- data/test/test_cvcontourtree.rb +0 -0
- data/test/test_cverror.rb +0 -0
- data/test/test_cvfeaturetree.rb +0 -0
- data/test/test_cvfont.rb +0 -0
- data/test/test_cvhaarclassifiercascade.rb +0 -0
- data/test/test_cvhistogram.rb +0 -0
- data/test/test_cvhumoments.rb +0 -0
- data/test/test_cvline.rb +0 -0
- data/test/test_cvmat.rb +72 -16
- data/test/test_cvmat_drawing.rb +0 -0
- data/test/test_cvmat_dxt.rb +0 -0
- data/test/test_cvmat_imageprocessing.rb +72 -2
- data/test/test_cvmat_matching.rb +1 -1
- data/test/test_cvmoments.rb +0 -0
- data/test/test_cvpoint.rb +0 -0
- data/test/test_cvpoint2d32f.rb +0 -0
- data/test/test_cvpoint3d32f.rb +0 -0
- data/test/test_cvrect.rb +0 -0
- data/test/test_cvscalar.rb +0 -0
- data/test/test_cvseq.rb +0 -0
- data/test/test_cvsize.rb +0 -0
- data/test/test_cvsize2d32f.rb +0 -0
- data/test/test_cvslice.rb +0 -0
- data/test/test_cvsurfparams.rb +0 -0
- data/test/test_cvsurfpoint.rb +0 -0
- data/test/test_cvtermcriteria.rb +0 -0
- data/test/test_cvtwopoints.rb +0 -0
- data/test/test_cvvideowriter.rb +0 -0
- data/test/test_eigenfaces.rb +93 -0
- data/test/test_fisherfaces.rb +93 -0
- data/test/test_iplconvkernel.rb +0 -0
- data/test/test_iplimage.rb +0 -4
- data/test/test_lbph.rb +152 -0
- data/test/test_mouseevent.rb +0 -0
- data/test/test_opencv.rb +33 -4
- data/test/test_pointset.rb +7 -5
- data/test/test_preliminary.rb +0 -0
- data/test/test_trackbar.rb +0 -0
- data/test/test_window.rb +0 -0
- metadata +84 -56
@@ -0,0 +1,93 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- mode: ruby; coding: utf-8-unix -*-
|
3
|
+
require 'test/unit'
|
4
|
+
require 'opencv'
|
5
|
+
require 'date'
|
6
|
+
require File.expand_path(File.dirname(__FILE__)) + '/helper'
|
7
|
+
|
8
|
+
include OpenCV
|
9
|
+
|
10
|
+
# Tests for OpenCV::FisherFaces
|
11
|
+
class TestFisherFaces < OpenCVTestCase
|
12
|
+
def setup
|
13
|
+
@fisherfaces = FisherFaces.new
|
14
|
+
|
15
|
+
@fisherfaces_trained = FisherFaces.new
|
16
|
+
@images = [CvMat.load(FILENAME_LENA256x256, CV_LOAD_IMAGE_GRAYSCALE)] * 2
|
17
|
+
@labels = [1, 2]
|
18
|
+
@fisherfaces_trained.train(@images, @labels)
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_initialize
|
22
|
+
[FisherFaces.new, FisherFaces.new(1), FisherFaces.new(1, 99999)].each { |ff|
|
23
|
+
assert_equal(FisherFaces, ff.class)
|
24
|
+
}
|
25
|
+
|
26
|
+
assert_raise(TypeError) {
|
27
|
+
FisherFaces.new(DUMMY_OBJ)
|
28
|
+
}
|
29
|
+
|
30
|
+
assert_raise(TypeError) {
|
31
|
+
FisherFaces.new(1, DUMMY_OBJ)
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_train
|
36
|
+
assert_nil(@fisherfaces.train(@images, @labels))
|
37
|
+
|
38
|
+
assert_raise(TypeError) {
|
39
|
+
@fisherfaces.train(DUMMY_OBJ, @labels)
|
40
|
+
}
|
41
|
+
|
42
|
+
assert_raise(TypeError) {
|
43
|
+
@fisherfaces.train(@images, DUMMY_OBJ)
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_predict
|
48
|
+
predicted_label, predicted_confidence = @fisherfaces_trained.predict(@images[0])
|
49
|
+
assert_equal(@labels[0], predicted_label)
|
50
|
+
assert_in_delta(0.0, predicted_confidence, 0.01)
|
51
|
+
|
52
|
+
assert_raise(TypeError) {
|
53
|
+
@fisherfaces_trained.predict(DUMMY_OBJ)
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_save
|
58
|
+
filename = "fisherfaces_save-#{DateTime.now.strftime('%Y%m%d%H%M%S')}.xml"
|
59
|
+
begin
|
60
|
+
@fisherfaces_trained.save(filename)
|
61
|
+
assert(File.exist? filename)
|
62
|
+
ensure
|
63
|
+
File.delete filename
|
64
|
+
end
|
65
|
+
assert_raise(TypeError) {
|
66
|
+
@fisherfaces_trained.save(DUMMY_OBJ)
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_load
|
71
|
+
assert_nothing_raised {
|
72
|
+
@fisherfaces.load('fisherfaces_save.xml')
|
73
|
+
}
|
74
|
+
assert_raise(TypeError) {
|
75
|
+
@fisherfaces.load(DUMMY_OBJ)
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_name
|
80
|
+
assert_equal('FaceRecognizer.Fisherfaces', @fisherfaces.name)
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_get_mat
|
84
|
+
mat = @fisherfaces_trained.get_mat('eigenvalues')
|
85
|
+
assert_not_nil(mat)
|
86
|
+
assert_equal(CvMat, mat.class)
|
87
|
+
|
88
|
+
assert_raise(TypeError) {
|
89
|
+
@fisherfaces_trained.get_mat(DUMMY_OBJ)
|
90
|
+
}
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
data/test/test_iplconvkernel.rb
CHANGED
File without changes
|
data/test/test_iplimage.rb
CHANGED
@@ -80,28 +80,24 @@ class TestIplImage < OpenCVTestCase
|
|
80
80
|
img4 = IplImage.decode(data, CV_LOAD_IMAGE_COLOR)
|
81
81
|
img5 = IplImage.decode(data_ary, CV_LOAD_IMAGE_COLOR)
|
82
82
|
img6 = IplImage.decode(data_mat, CV_LOAD_IMAGE_COLOR)
|
83
|
-
expected_hash = hash_img(expected)
|
84
83
|
|
85
84
|
[img1, img2, img3, img4, img5, img6].each { |img|
|
86
85
|
assert_equal(IplImage, img.class)
|
87
86
|
assert_equal(expected.rows, img.rows)
|
88
87
|
assert_equal(expected.cols, img.cols)
|
89
88
|
assert_equal(expected.channel, img.channel)
|
90
|
-
assert_equal(expected_hash, hash_img(img))
|
91
89
|
}
|
92
90
|
|
93
91
|
expected_c1 = IplImage.load(FILENAME_CAT, CV_LOAD_IMAGE_GRAYSCALE)
|
94
92
|
img1c1 = IplImage.decode(data, CV_LOAD_IMAGE_GRAYSCALE)
|
95
93
|
img2c1 = IplImage.decode(data_ary, CV_LOAD_IMAGE_GRAYSCALE)
|
96
94
|
img3c1 = IplImage.decode(data_mat, CV_LOAD_IMAGE_GRAYSCALE)
|
97
|
-
expected_hash_c1 = hash_img(expected_c1)
|
98
95
|
|
99
96
|
[img1c1, img2c1, img3c1].each { |img|
|
100
97
|
assert_equal(IplImage, img.class)
|
101
98
|
assert_equal(expected_c1.rows, img.rows)
|
102
99
|
assert_equal(expected_c1.cols, img.cols)
|
103
100
|
assert_equal(expected_c1.channel, img.channel)
|
104
|
-
assert_equal(expected_hash_c1, hash_img(img))
|
105
101
|
}
|
106
102
|
|
107
103
|
assert_raise(TypeError) {
|
data/test/test_lbph.rb
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- mode: ruby; coding: utf-8-unix -*-
|
3
|
+
require 'test/unit'
|
4
|
+
require 'opencv'
|
5
|
+
require 'date'
|
6
|
+
require File.expand_path(File.dirname(__FILE__)) + '/helper'
|
7
|
+
|
8
|
+
include OpenCV
|
9
|
+
|
10
|
+
# Tests for OpenCV::LBPH
|
11
|
+
class TestLBPH < OpenCVTestCase
|
12
|
+
def setup
|
13
|
+
@lbph = LBPH.new
|
14
|
+
|
15
|
+
@lbph_trained = LBPH.new
|
16
|
+
@images = [CvMat.load(FILENAME_LENA256x256, CV_LOAD_IMAGE_GRAYSCALE)] * 2
|
17
|
+
@labels = [1, 2]
|
18
|
+
@lbph_trained.train(@images, @labels)
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_initialize
|
22
|
+
[LBPH.new, LBPH.new(1), LBPH.new(1, 2, 3, 4, 5.0)].each { |lbph|
|
23
|
+
assert_equal(LBPH, lbph.class)
|
24
|
+
}
|
25
|
+
|
26
|
+
assert_raise(TypeError) {
|
27
|
+
LBPH.new(DUMMY_OBJ)
|
28
|
+
}
|
29
|
+
assert_raise(TypeError) {
|
30
|
+
LBPH.new(1, DUMMY_OBJ)
|
31
|
+
}
|
32
|
+
assert_raise(TypeError) {
|
33
|
+
LBPH.new(1, 2, DUMMY_OBJ)
|
34
|
+
}
|
35
|
+
assert_raise(TypeError) {
|
36
|
+
LBPH.new(1, 2, 3, DUMMY_OBJ)
|
37
|
+
}
|
38
|
+
assert_raise(TypeError) {
|
39
|
+
LBPH.new(1, 2, 3, 4, DUMMY_OBJ)
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_train
|
44
|
+
assert_nil(@lbph.train(@images, @labels))
|
45
|
+
|
46
|
+
assert_raise(TypeError) {
|
47
|
+
@lbph.train(DUMMY_OBJ, @labels)
|
48
|
+
}
|
49
|
+
|
50
|
+
assert_raise(TypeError) {
|
51
|
+
@lbph.train(@images, DUMMY_OBJ)
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_predict
|
56
|
+
predicted_label, predicted_confidence = @lbph_trained.predict(@images[0])
|
57
|
+
assert_equal(@labels[0], predicted_label)
|
58
|
+
assert_in_delta(0.0, predicted_confidence, 0.01)
|
59
|
+
|
60
|
+
assert_raise(TypeError) {
|
61
|
+
@lbph_trained.predict(DUMMY_OBJ)
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_save
|
66
|
+
filename = "lbph_save-#{DateTime.now.strftime('%Y%m%d%H%M%S')}.xml"
|
67
|
+
begin
|
68
|
+
@lbph_trained.save(filename)
|
69
|
+
assert(File.exist? filename)
|
70
|
+
ensure
|
71
|
+
File.delete filename
|
72
|
+
end
|
73
|
+
assert_raise(TypeError) {
|
74
|
+
@lbph_trained.save(DUMMY_OBJ)
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_load
|
79
|
+
assert_nothing_raised {
|
80
|
+
@lbph.load('lbph_save.xml')
|
81
|
+
}
|
82
|
+
assert_raise(TypeError) {
|
83
|
+
@lbph.load(DUMMY_OBJ)
|
84
|
+
}
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_name
|
88
|
+
assert_equal('FaceRecognizer.LBPH', @lbph.name)
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_get_int
|
92
|
+
assert_equal(1, @lbph.get_int('radius'))
|
93
|
+
assert_equal(8, @lbph.get_int('neighbors'))
|
94
|
+
assert_equal(8, @lbph.get_int('grid_x'))
|
95
|
+
assert_equal(8, @lbph.get_int('grid_y'))
|
96
|
+
|
97
|
+
assert_raise(TypeError) {
|
98
|
+
@lbph.get_int(DUMMY_OBJ)
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_get_double
|
103
|
+
assert_equal(Float::MAX, @lbph.get_double('threshold'))
|
104
|
+
|
105
|
+
assert_raise(TypeError) {
|
106
|
+
@lbph.get_double(DUMMY_OBJ)
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
def test_get_matvector
|
111
|
+
histgrams = @lbph_trained.get_matvector('histograms')
|
112
|
+
assert_equal(Array, histgrams.class)
|
113
|
+
assert_equal(2, histgrams.size)
|
114
|
+
assert_equal(CvMat, histgrams[0].class)
|
115
|
+
|
116
|
+
assert_raise(TypeError) {
|
117
|
+
@lbph.get_matvector(DUMMY_OBJ)
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
def test_set_int
|
122
|
+
@lbph.set_int('radius', 2)
|
123
|
+
@lbph.set_int('neighbors', 3)
|
124
|
+
@lbph.set_int('grid_x', 4)
|
125
|
+
@lbph.set_int('grid_y', 5)
|
126
|
+
|
127
|
+
assert_equal(2, @lbph.get_int('radius'))
|
128
|
+
assert_equal(3, @lbph.get_int('neighbors'))
|
129
|
+
assert_equal(4, @lbph.get_int('grid_x'))
|
130
|
+
assert_equal(5, @lbph.get_int('grid_y'))
|
131
|
+
|
132
|
+
assert_raise(TypeError) {
|
133
|
+
@lbph.set_int(DUMMY_OBJ, 1)
|
134
|
+
}
|
135
|
+
assert_raise(TypeError) {
|
136
|
+
@lbph.set_int('radius', DUMMY_OBJ)
|
137
|
+
}
|
138
|
+
end
|
139
|
+
|
140
|
+
def test_set_double
|
141
|
+
@lbph.set_double('threshold', 1.0)
|
142
|
+
assert_in_delta(1.0, @lbph.get_double('threshold'), 0.001)
|
143
|
+
|
144
|
+
assert_raise(TypeError) {
|
145
|
+
@lbph.set_double(DUMMY_OBJ, 1.0)
|
146
|
+
}
|
147
|
+
assert_raise(TypeError) {
|
148
|
+
@lbph.set_double('threshold', DUMMY_OBJ)
|
149
|
+
}
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
data/test/test_mouseevent.rb
CHANGED
File without changes
|
data/test/test_opencv.rb
CHANGED
@@ -9,15 +9,15 @@ include OpenCV
|
|
9
9
|
class TestOpenCV < OpenCVTestCase
|
10
10
|
def test_constants
|
11
11
|
# OpenCV version
|
12
|
-
assert_equal('2.4.
|
12
|
+
assert_equal('2.4.7', CV_VERSION)
|
13
13
|
assert_equal(2, CV_MAJOR_VERSION)
|
14
14
|
assert_equal(4, CV_MINOR_VERSION)
|
15
|
-
assert_equal(
|
15
|
+
assert_equal(7, CV_SUBMINOR_VERSION)
|
16
16
|
|
17
17
|
assert_equal(2, CV_VERSION_EPOCH)
|
18
18
|
assert_equal(4, CV_VERSION_MAJOR)
|
19
|
-
assert_equal(
|
20
|
-
assert_equal(
|
19
|
+
assert_equal(7, CV_VERSION_MINOR)
|
20
|
+
assert_equal(0, CV_VERSION_REVISION)
|
21
21
|
|
22
22
|
# Depths
|
23
23
|
assert_equal(0, CV_8U)
|
@@ -28,6 +28,35 @@ class TestOpenCV < OpenCVTestCase
|
|
28
28
|
assert_equal(5, CV_32F)
|
29
29
|
assert_equal(6, CV_64F)
|
30
30
|
|
31
|
+
assert_equal(0, CV_8UC1)
|
32
|
+
assert_equal(8, CV_8UC2)
|
33
|
+
assert_equal(16, CV_8UC3)
|
34
|
+
assert_equal(24, CV_8UC4)
|
35
|
+
assert_equal(1, CV_8SC1)
|
36
|
+
assert_equal(9, CV_8SC2)
|
37
|
+
assert_equal(17, CV_8SC3)
|
38
|
+
assert_equal(25, CV_8SC4)
|
39
|
+
assert_equal(2, CV_16UC1)
|
40
|
+
assert_equal(10, CV_16UC2)
|
41
|
+
assert_equal(18, CV_16UC3)
|
42
|
+
assert_equal(26, CV_16UC4)
|
43
|
+
assert_equal(3, CV_16SC1)
|
44
|
+
assert_equal(11, CV_16SC2)
|
45
|
+
assert_equal(19, CV_16SC3)
|
46
|
+
assert_equal(27, CV_16SC4)
|
47
|
+
assert_equal(4, CV_32SC1)
|
48
|
+
assert_equal(12, CV_32SC2)
|
49
|
+
assert_equal(20, CV_32SC3)
|
50
|
+
assert_equal(28, CV_32SC4)
|
51
|
+
assert_equal(5, CV_32FC1)
|
52
|
+
assert_equal(13, CV_32FC2)
|
53
|
+
assert_equal(21, CV_32FC3)
|
54
|
+
assert_equal(29, CV_32FC4)
|
55
|
+
assert_equal(6, CV_64FC1)
|
56
|
+
assert_equal(14, CV_64FC2)
|
57
|
+
assert_equal(22, CV_64FC3)
|
58
|
+
assert_equal(30, CV_64FC4)
|
59
|
+
|
31
60
|
# Load image flags
|
32
61
|
assert_equal(-1, CV_LOAD_IMAGE_UNCHANGED)
|
33
62
|
assert_equal(0, CV_LOAD_IMAGE_GRAYSCALE)
|
data/test/test_pointset.rb
CHANGED
@@ -38,11 +38,13 @@ class TestPointSet < OpenCVTestCase
|
|
38
38
|
assert_equal(64, center.y.to_i)
|
39
39
|
|
40
40
|
size = box.size
|
41
|
-
assert_in_delta(63
|
42
|
-
assert_in_delta(63
|
43
|
-
assert_in_delta(180, box.angle, 0.001)
|
41
|
+
assert_in_delta(63, size.width, 1.0)
|
42
|
+
assert_in_delta(63, size.height, 1.0)
|
44
43
|
|
45
|
-
|
44
|
+
angle = [box.angle, 180 - box.angle].min
|
45
|
+
assert_in_delta(0, angle, 0.1)
|
46
|
+
|
47
|
+
assert_raise(CvStsBadSize) {
|
46
48
|
@contour2.fit_ellipse2
|
47
49
|
}
|
48
50
|
end
|
@@ -102,7 +104,7 @@ class TestPointSet < OpenCVTestCase
|
|
102
104
|
size = box.size
|
103
105
|
assert_in_delta(63.356, size.width, 0.001)
|
104
106
|
assert_in_delta(63.356, size.height, 0.001)
|
105
|
-
assert_in_delta(-
|
107
|
+
assert_in_delta(-81.30, box.angle, 1.0)
|
106
108
|
|
107
109
|
flunk('FIXME: Currently PointSet#min_area_rect2 causes segmentation fault when "self" is invalid.')
|
108
110
|
assert_raise(CvStsBadSize) {
|
data/test/test_preliminary.rb
CHANGED
File without changes
|
data/test/test_trackbar.rb
CHANGED
File without changes
|
data/test/test_window.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-opencv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lsxi
|
@@ -10,62 +10,62 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-08
|
13
|
+
date: 2013-12-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdoc
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - ~>
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '4.0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - ~>
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '4.0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rake-compiler
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '0'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: hoe-gemspec
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- -
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: hoe
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - ~>
|
61
|
+
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '3.7'
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- - ~>
|
68
|
+
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '3.7'
|
71
71
|
description: ruby-opencv is a wrapper of OpenCV for Ruby. It helps you to write computer
|
@@ -83,9 +83,10 @@ extra_rdoc_files:
|
|
83
83
|
- License.txt
|
84
84
|
- Manifest.txt
|
85
85
|
- README.md
|
86
|
+
- examples/facerec/readme.md
|
86
87
|
- examples/matching_to_many_images/train/trainImages.txt
|
87
88
|
files:
|
88
|
-
- .gitignore
|
89
|
+
- ".gitignore"
|
89
90
|
- DEVELOPERS_NOTE.md
|
90
91
|
- Gemfile
|
91
92
|
- History.txt
|
@@ -95,8 +96,6 @@ files:
|
|
95
96
|
- Rakefile
|
96
97
|
- config.yml
|
97
98
|
- examples/alpha_blend.rb
|
98
|
-
- examples/box.png
|
99
|
-
- examples/box_in_scene.png
|
100
99
|
- examples/contours/bitmap-contours-with-labels.png
|
101
100
|
- examples/contours/bitmap-contours.png
|
102
101
|
- examples/contours/bounding-box-detect-canny.rb
|
@@ -104,14 +103,26 @@ files:
|
|
104
103
|
- examples/contours/rotated-boxes.jpg
|
105
104
|
- examples/convexhull.rb
|
106
105
|
- examples/face_detect.rb
|
106
|
+
- examples/facerec/create_csv.rb
|
107
|
+
- examples/facerec/facerec_eigenfaces.rb
|
108
|
+
- examples/facerec/facerec_fisherfaces.rb
|
109
|
+
- examples/facerec/facerec_lbph.rb
|
110
|
+
- examples/facerec/readme.md
|
107
111
|
- examples/find_obj.rb
|
108
112
|
- examples/houghcircle.rb
|
109
|
-
- examples/
|
113
|
+
- examples/images/box.png
|
114
|
+
- examples/images/box_in_scene.png
|
115
|
+
- examples/images/inpaint.png
|
116
|
+
- examples/images/lena-256x256.jpg
|
117
|
+
- examples/images/lena-eyes.jpg
|
118
|
+
- examples/images/lenna-rotated.jpg
|
119
|
+
- examples/images/lenna.jpg
|
120
|
+
- examples/images/stuff.jpg
|
121
|
+
- examples/images/tiffany.jpg
|
110
122
|
- examples/inpaint.rb
|
111
|
-
- examples/lenna-rotated.jpg
|
112
|
-
- examples/lenna.jpg
|
113
123
|
- examples/match_kdtree.rb
|
114
|
-
- examples/
|
124
|
+
- examples/match_template.rb
|
125
|
+
- examples/matching_to_many_images/matching_to_many_images.rb
|
115
126
|
- examples/matching_to_many_images/query.png
|
116
127
|
- examples/matching_to_many_images/train/1.png
|
117
128
|
- examples/matching_to_many_images/train/2.png
|
@@ -119,8 +130,8 @@ files:
|
|
119
130
|
- examples/matching_to_many_images/train/trainImages.txt
|
120
131
|
- examples/paint.rb
|
121
132
|
- examples/snake.rb
|
122
|
-
-
|
123
|
-
-
|
133
|
+
- ext/opencv/algorithm.cpp
|
134
|
+
- ext/opencv/algorithm.h
|
124
135
|
- ext/opencv/curve.cpp
|
125
136
|
- ext/opencv/curve.h
|
126
137
|
- ext/opencv/cvavgcomp.cpp
|
@@ -197,13 +208,21 @@ files:
|
|
197
208
|
- ext/opencv/cvutils.h
|
198
209
|
- ext/opencv/cvvideowriter.cpp
|
199
210
|
- ext/opencv/cvvideowriter.h
|
211
|
+
- ext/opencv/eigenfaces.cpp
|
212
|
+
- ext/opencv/eigenfaces.h
|
200
213
|
- ext/opencv/extconf.rb
|
214
|
+
- ext/opencv/facerecognizer.cpp
|
215
|
+
- ext/opencv/facerecognizer.h
|
216
|
+
- ext/opencv/fisherfaces.cpp
|
217
|
+
- ext/opencv/fisherfaces.h
|
201
218
|
- ext/opencv/gui.cpp
|
202
219
|
- ext/opencv/gui.h
|
203
220
|
- ext/opencv/iplconvkernel.cpp
|
204
221
|
- ext/opencv/iplconvkernel.h
|
205
222
|
- ext/opencv/iplimage.cpp
|
206
223
|
- ext/opencv/iplimage.h
|
224
|
+
- ext/opencv/lbph.cpp
|
225
|
+
- ext/opencv/lbph.h
|
207
226
|
- ext/opencv/mouseevent.cpp
|
208
227
|
- ext/opencv/mouseevent.h
|
209
228
|
- ext/opencv/opencv.cpp
|
@@ -222,7 +241,10 @@ files:
|
|
222
241
|
- lib/opencv/psyched_yaml.rb
|
223
242
|
- lib/opencv/version.rb
|
224
243
|
- ruby-opencv.gemspec
|
244
|
+
- test/eigenfaces_save.xml
|
245
|
+
- test/fisherfaces_save.xml
|
225
246
|
- test/helper.rb
|
247
|
+
- test/lbph_save.xml
|
226
248
|
- test/runner.rb
|
227
249
|
- test/samples/airplane.jpg
|
228
250
|
- test/samples/baboon.jpg
|
@@ -304,8 +326,11 @@ files:
|
|
304
326
|
- test/test_cvtermcriteria.rb
|
305
327
|
- test/test_cvtwopoints.rb
|
306
328
|
- test/test_cvvideowriter.rb
|
329
|
+
- test/test_eigenfaces.rb
|
330
|
+
- test/test_fisherfaces.rb
|
307
331
|
- test/test_iplconvkernel.rb
|
308
332
|
- test/test_iplimage.rb
|
333
|
+
- test/test_lbph.rb
|
309
334
|
- test/test_mouseevent.rb
|
310
335
|
- test/test_opencv.rb
|
311
336
|
- test/test_pointset.rb
|
@@ -318,68 +343,71 @@ licenses:
|
|
318
343
|
metadata: {}
|
319
344
|
post_install_message:
|
320
345
|
rdoc_options:
|
321
|
-
- --main
|
346
|
+
- "--main"
|
322
347
|
- README.md
|
323
348
|
require_paths:
|
324
349
|
- lib
|
325
350
|
required_ruby_version: !ruby/object:Gem::Requirement
|
326
351
|
requirements:
|
327
|
-
- -
|
352
|
+
- - ">="
|
328
353
|
- !ruby/object:Gem::Version
|
329
354
|
version: '0'
|
330
355
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
331
356
|
requirements:
|
332
|
-
- -
|
357
|
+
- - ">"
|
333
358
|
- !ruby/object:Gem::Version
|
334
|
-
version:
|
359
|
+
version: 1.3.1
|
335
360
|
requirements: []
|
336
361
|
rubyforge_project: ruby-opencv
|
337
|
-
rubygems_version: 2.
|
362
|
+
rubygems_version: 2.1.11
|
338
363
|
signing_key:
|
339
364
|
specification_version: 4
|
340
365
|
summary: OpenCV wrapper for Ruby
|
341
366
|
test_files:
|
342
|
-
- test/test_curve.rb
|
343
|
-
- test/test_cvavgcomp.rb
|
344
|
-
- test/test_cvbox2d.rb
|
345
|
-
- test/test_cvcapture.rb
|
346
|
-
- test/test_cvchain.rb
|
347
|
-
- test/test_cvcircle32f.rb
|
348
|
-
- test/test_cvconnectedcomp.rb
|
349
367
|
- test/test_cvcontour.rb
|
368
|
+
- test/test_eigenfaces.rb
|
369
|
+
- test/test_cvmoments.rb
|
370
|
+
- test/test_cvseq.rb
|
350
371
|
- test/test_cvcontourtree.rb
|
351
|
-
- test/
|
352
|
-
- test/
|
372
|
+
- test/test_cvbox2d.rb
|
373
|
+
- test/test_iplimage.rb
|
374
|
+
- test/test_cvvideowriter.rb
|
375
|
+
- test/test_cvline.rb
|
376
|
+
- test/test_cvhumoments.rb
|
353
377
|
- test/test_cvfont.rb
|
354
|
-
- test/
|
378
|
+
- test/test_cvconnectedcomp.rb
|
355
379
|
- test/test_cvhistogram.rb
|
356
|
-
- test/
|
357
|
-
- test/test_cvline.rb
|
358
|
-
- test/test_cvmat.rb
|
359
|
-
- test/test_cvmat_drawing.rb
|
360
|
-
- test/test_cvmat_dxt.rb
|
380
|
+
- test/test_trackbar.rb
|
361
381
|
- test/test_cvmat_imageprocessing.rb
|
362
|
-
- test/
|
363
|
-
- test/
|
364
|
-
- test/
|
365
|
-
- test/
|
366
|
-
- test/test_cvpoint3d32f.rb
|
382
|
+
- test/test_cvhaarclassifiercascade.rb
|
383
|
+
- test/test_cvcircle32f.rb
|
384
|
+
- test/test_cvcapture.rb
|
385
|
+
- test/test_cvmat_dxt.rb
|
367
386
|
- test/test_cvrect.rb
|
368
|
-
- test/
|
369
|
-
- test/test_cvseq.rb
|
370
|
-
- test/test_cvsize.rb
|
371
|
-
- test/test_cvsize2d32f.rb
|
372
|
-
- test/test_cvslice.rb
|
373
|
-
- test/test_cvsurfparams.rb
|
387
|
+
- test/test_iplconvkernel.rb
|
374
388
|
- test/test_cvsurfpoint.rb
|
389
|
+
- test/test_cvavgcomp.rb
|
390
|
+
- test/test_cvscalar.rb
|
391
|
+
- test/test_pointset.rb
|
392
|
+
- test/test_curve.rb
|
375
393
|
- test/test_cvtermcriteria.rb
|
376
394
|
- test/test_cvtwopoints.rb
|
377
|
-
- test/
|
378
|
-
- test/
|
379
|
-
- test/
|
395
|
+
- test/test_cvsurfparams.rb
|
396
|
+
- test/test_cvpoint2d32f.rb
|
397
|
+
- test/test_cvpoint3d32f.rb
|
398
|
+
- test/test_cvfeaturetree.rb
|
380
399
|
- test/test_mouseevent.rb
|
381
|
-
- test/
|
382
|
-
- test/
|
400
|
+
- test/test_cvchain.rb
|
401
|
+
- test/test_cvmat.rb
|
402
|
+
- test/test_fisherfaces.rb
|
403
|
+
- test/test_cvmat_matching.rb
|
404
|
+
- test/test_cverror.rb
|
405
|
+
- test/test_cvpoint.rb
|
406
|
+
- test/test_cvsize2d32f.rb
|
383
407
|
- test/test_preliminary.rb
|
384
|
-
- test/
|
408
|
+
- test/test_cvmat_drawing.rb
|
409
|
+
- test/test_lbph.rb
|
410
|
+
- test/test_cvsize.rb
|
385
411
|
- test/test_window.rb
|
412
|
+
- test/test_cvslice.rb
|
413
|
+
- test/test_opencv.rb
|