afeld-opencv 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +23 -0
- data/Gemfile +6 -0
- data/History.txt +5 -0
- data/License.txt +30 -0
- data/Manifest.txt +217 -0
- data/README.rdoc +161 -0
- data/Rakefile +52 -0
- data/examples/alpha_blend.rb +21 -0
- data/examples/box.png +0 -0
- data/examples/box_in_scene.png +0 -0
- data/examples/contours/bitmap-contours-with-labels.png +0 -0
- data/examples/contours/bitmap-contours.png +0 -0
- data/examples/contours/bounding-box-detect-canny.rb +62 -0
- data/examples/contours/contour_retrieval_modes.rb +139 -0
- data/examples/contours/rotated-boxes.jpg +0 -0
- data/examples/convexhull.rb +47 -0
- data/examples/face_detect.rb +20 -0
- data/examples/find_obj.rb +169 -0
- data/examples/houghcircle.rb +22 -0
- data/examples/inpaint.png +0 -0
- data/examples/inpaint.rb +57 -0
- data/examples/lenna-rotated.jpg +0 -0
- data/examples/lenna.jpg +0 -0
- data/examples/match_kdtree.rb +88 -0
- data/examples/paint.rb +70 -0
- data/examples/snake.rb +43 -0
- data/examples/stuff.jpg +0 -0
- data/examples/tiffany.jpg +0 -0
- data/ext/opencv/curve.cpp +112 -0
- data/ext/opencv/curve.h +34 -0
- data/ext/opencv/cvavgcomp.cpp +67 -0
- data/ext/opencv/cvavgcomp.h +39 -0
- data/ext/opencv/cvbox2d.cpp +197 -0
- data/ext/opencv/cvbox2d.h +61 -0
- data/ext/opencv/cvcapture.cpp +499 -0
- data/ext/opencv/cvcapture.h +72 -0
- data/ext/opencv/cvchain.cpp +230 -0
- data/ext/opencv/cvchain.h +46 -0
- data/ext/opencv/cvcircle32f.cpp +116 -0
- data/ext/opencv/cvcircle32f.h +52 -0
- data/ext/opencv/cvcondensation.cpp +282 -0
- data/ext/opencv/cvcondensation.h +49 -0
- data/ext/opencv/cvconnectedcomp.cpp +143 -0
- data/ext/opencv/cvconnectedcomp.h +49 -0
- data/ext/opencv/cvcontour.cpp +297 -0
- data/ext/opencv/cvcontour.h +48 -0
- data/ext/opencv/cvcontourtree.cpp +91 -0
- data/ext/opencv/cvcontourtree.h +41 -0
- data/ext/opencv/cvconvexitydefect.cpp +103 -0
- data/ext/opencv/cvconvexitydefect.h +42 -0
- data/ext/opencv/cverror.cpp +159 -0
- data/ext/opencv/cverror.h +28 -0
- data/ext/opencv/cvfeaturetree.cpp +125 -0
- data/ext/opencv/cvfeaturetree.h +55 -0
- data/ext/opencv/cvfont.cpp +208 -0
- data/ext/opencv/cvfont.h +64 -0
- data/ext/opencv/cvhaarclassifiercascade.cpp +168 -0
- data/ext/opencv/cvhaarclassifiercascade.h +39 -0
- data/ext/opencv/cvhistogram.cpp +546 -0
- data/ext/opencv/cvhistogram.h +73 -0
- data/ext/opencv/cvhumoments.cpp +139 -0
- data/ext/opencv/cvhumoments.h +51 -0
- data/ext/opencv/cvline.cpp +154 -0
- data/ext/opencv/cvline.h +54 -0
- data/ext/opencv/cvmat.cpp +5627 -0
- data/ext/opencv/cvmat.h +280 -0
- data/ext/opencv/cvmatnd.cpp +44 -0
- data/ext/opencv/cvmatnd.h +28 -0
- data/ext/opencv/cvmemstorage.cpp +68 -0
- data/ext/opencv/cvmemstorage.h +53 -0
- data/ext/opencv/cvmoments.cpp +287 -0
- data/ext/opencv/cvmoments.h +75 -0
- data/ext/opencv/cvpoint.cpp +228 -0
- data/ext/opencv/cvpoint.h +64 -0
- data/ext/opencv/cvpoint2d32f.cpp +211 -0
- data/ext/opencv/cvpoint2d32f.h +63 -0
- data/ext/opencv/cvpoint3d32f.cpp +246 -0
- data/ext/opencv/cvpoint3d32f.h +66 -0
- data/ext/opencv/cvrect.cpp +333 -0
- data/ext/opencv/cvrect.h +79 -0
- data/ext/opencv/cvscalar.cpp +236 -0
- data/ext/opencv/cvscalar.h +71 -0
- data/ext/opencv/cvseq.cpp +599 -0
- data/ext/opencv/cvseq.h +72 -0
- data/ext/opencv/cvsize.cpp +221 -0
- data/ext/opencv/cvsize.h +65 -0
- data/ext/opencv/cvsize2d32f.cpp +209 -0
- data/ext/opencv/cvsize2d32f.h +64 -0
- data/ext/opencv/cvslice.cpp +120 -0
- data/ext/opencv/cvslice.h +61 -0
- data/ext/opencv/cvsparsemat.cpp +44 -0
- data/ext/opencv/cvsparsemat.h +28 -0
- data/ext/opencv/cvsurfparams.cpp +199 -0
- data/ext/opencv/cvsurfparams.h +58 -0
- data/ext/opencv/cvsurfpoint.cpp +223 -0
- data/ext/opencv/cvsurfpoint.h +52 -0
- data/ext/opencv/cvtermcriteria.cpp +192 -0
- data/ext/opencv/cvtermcriteria.h +71 -0
- data/ext/opencv/cvtwopoints.cpp +116 -0
- data/ext/opencv/cvtwopoints.h +51 -0
- data/ext/opencv/cvutils.cpp +194 -0
- data/ext/opencv/cvutils.h +29 -0
- data/ext/opencv/cvvideowriter.cpp +137 -0
- data/ext/opencv/cvvideowriter.h +43 -0
- data/ext/opencv/gui.cpp +68 -0
- data/ext/opencv/gui.h +30 -0
- data/ext/opencv/iplconvkernel.cpp +192 -0
- data/ext/opencv/iplconvkernel.h +71 -0
- data/ext/opencv/iplimage.cpp +576 -0
- data/ext/opencv/iplimage.h +70 -0
- data/ext/opencv/lib/opencv.rb +3 -0
- data/ext/opencv/lib/opencv/psyched_yaml.rb +22 -0
- data/ext/opencv/lib/opencv/version.rb +3 -0
- data/ext/opencv/mouseevent.cpp +181 -0
- data/ext/opencv/mouseevent.h +56 -0
- data/ext/opencv/opencv.cpp +710 -0
- data/ext/opencv/opencv.h +400 -0
- data/ext/opencv/pointset.cpp +284 -0
- data/ext/opencv/pointset.h +69 -0
- data/ext/opencv/trackbar.cpp +121 -0
- data/ext/opencv/trackbar.h +69 -0
- data/ext/opencv/window.cpp +357 -0
- data/ext/opencv/window.h +66 -0
- data/extconf.rb +65 -0
- data/images/CvMat_sobel.png +0 -0
- data/images/CvMat_sub_rect.png +0 -0
- data/images/CvSeq_relationmap.png +0 -0
- data/images/face_detect_from_lena.jpg +0 -0
- data/test/helper.rb +146 -0
- data/test/runner.rb +30 -0
- data/test/samples/airplane.jpg +0 -0
- data/test/samples/baboon.jpg +0 -0
- data/test/samples/baboon200.jpg +0 -0
- data/test/samples/baboon200_rotated.jpg +0 -0
- data/test/samples/blank0.jpg +0 -0
- data/test/samples/blank1.jpg +0 -0
- data/test/samples/blank2.jpg +0 -0
- data/test/samples/blank3.jpg +0 -0
- data/test/samples/blank4.jpg +0 -0
- data/test/samples/blank5.jpg +0 -0
- data/test/samples/blank6.jpg +0 -0
- data/test/samples/blank7.jpg +0 -0
- data/test/samples/blank8.jpg +0 -0
- data/test/samples/blank9.jpg +0 -0
- data/test/samples/cat.jpg +0 -0
- data/test/samples/contours.jpg +0 -0
- data/test/samples/fruits.jpg +0 -0
- data/test/samples/haarcascade_frontalface_alt.xml.gz +0 -0
- data/test/samples/inpaint-mask.bmp +0 -0
- data/test/samples/lena-256x256.jpg +0 -0
- data/test/samples/lena-32x32.jpg +0 -0
- data/test/samples/lena-eyes.jpg +0 -0
- data/test/samples/lena-inpaint.jpg +0 -0
- data/test/samples/lena.jpg +0 -0
- data/test/samples/lines.jpg +0 -0
- data/test/samples/messy0.jpg +0 -0
- data/test/samples/messy1.jpg +0 -0
- data/test/samples/movie_sample.avi +0 -0
- data/test/samples/one_way_train_0000.jpg +0 -0
- data/test/samples/one_way_train_0001.jpg +0 -0
- data/test/samples/partially_blank0.jpg +0 -0
- data/test/samples/partially_blank1.jpg +0 -0
- data/test/samples/smooth0.jpg +0 -0
- data/test/samples/smooth1.jpg +0 -0
- data/test/samples/smooth2.jpg +0 -0
- data/test/samples/smooth3.jpg +0 -0
- data/test/samples/smooth4.jpg +0 -0
- data/test/samples/smooth5.jpg +0 -0
- data/test/samples/smooth6.jpg +0 -0
- data/test/samples/str-cv-rotated.jpg +0 -0
- data/test/samples/str-cv.jpg +0 -0
- data/test/samples/str-ov.jpg +0 -0
- data/test/samples/stuff.jpg +0 -0
- data/test/test_curve.rb +43 -0
- data/test/test_cvavgcomp.rb +24 -0
- data/test/test_cvbox2d.rb +76 -0
- data/test/test_cvcapture.rb +183 -0
- data/test/test_cvchain.rb +108 -0
- data/test/test_cvcircle32f.rb +41 -0
- data/test/test_cvconnectedcomp.rb +61 -0
- data/test/test_cvcontour.rb +150 -0
- data/test/test_cvcontourtree.rb +43 -0
- data/test/test_cverror.rb +50 -0
- data/test/test_cvfeaturetree.rb +65 -0
- data/test/test_cvfont.rb +58 -0
- data/test/test_cvhaarclassifiercascade.rb +63 -0
- data/test/test_cvhistogram.rb +271 -0
- data/test/test_cvhumoments.rb +83 -0
- data/test/test_cvline.rb +50 -0
- data/test/test_cvmat.rb +2752 -0
- data/test/test_cvmat_drawing.rb +318 -0
- data/test/test_cvmat_dxt.rb +147 -0
- data/test/test_cvmat_imageprocessing.rb +1943 -0
- data/test/test_cvmoments.rb +180 -0
- data/test/test_cvpoint.rb +75 -0
- data/test/test_cvpoint2d32f.rb +75 -0
- data/test/test_cvpoint3d32f.rb +93 -0
- data/test/test_cvrect.rb +144 -0
- data/test/test_cvscalar.rb +113 -0
- data/test/test_cvseq.rb +295 -0
- data/test/test_cvsize.rb +75 -0
- data/test/test_cvsize2d32f.rb +75 -0
- data/test/test_cvslice.rb +31 -0
- data/test/test_cvsurfparams.rb +57 -0
- data/test/test_cvsurfpoint.rb +66 -0
- data/test/test_cvtermcriteria.rb +56 -0
- data/test/test_cvtwopoints.rb +40 -0
- data/test/test_cvvideowriter.rb +58 -0
- data/test/test_iplconvkernel.rb +54 -0
- data/test/test_iplimage.rb +156 -0
- data/test/test_mouseevent.rb +17 -0
- data/test/test_opencv.rb +340 -0
- data/test/test_pointset.rb +130 -0
- data/test/test_preliminary.rb +130 -0
- data/test/test_trackbar.rb +47 -0
- data/test/test_window.rb +115 -0
- metadata +399 -0
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
.DS_Store
|
2
|
+
.project
|
3
|
+
examples/data
|
4
|
+
*.o
|
5
|
+
*.so
|
6
|
+
*.obj
|
7
|
+
*.pdb
|
8
|
+
Makefile
|
9
|
+
mkmf.log
|
10
|
+
opencv.bundle
|
11
|
+
GPATH
|
12
|
+
GRTAGS
|
13
|
+
GSYMS
|
14
|
+
GTAGS
|
15
|
+
OpenCV-*
|
16
|
+
ruby-*
|
17
|
+
ext/opencv/test.txt
|
18
|
+
pkg/
|
19
|
+
doc/
|
20
|
+
log.txt
|
21
|
+
videowriter_result.avi
|
22
|
+
examples/contours/rotated-boxes-with-detected-bounding-rectangles.jpg
|
23
|
+
Gemfile.lock
|
data/Gemfile
ADDED
data/History.txt
ADDED
data/License.txt
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
The BSD Liscense
|
2
|
+
|
3
|
+
Copyright (c) 2008, Masakazu Yonekura
|
4
|
+
All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use of this software in source and binary forms, with or without modification, are
|
7
|
+
permitted provided that the following conditions are met:
|
8
|
+
|
9
|
+
* Redistributions of source code must retain the above
|
10
|
+
copyright notice, this list of conditions and the
|
11
|
+
following disclaimer.
|
12
|
+
|
13
|
+
* Redistributions in binary form must reproduce the above
|
14
|
+
copyright notice, this list of conditions and the
|
15
|
+
following disclaimer in the documentation and/or other
|
16
|
+
materials provided with the distribution.
|
17
|
+
|
18
|
+
* Neither the name of Masakazu Yonekura. nor the names of its
|
19
|
+
contributors may be used to endorse or promote products
|
20
|
+
derived from this software without specific prior
|
21
|
+
written permission of Masakazu Yonekura.
|
22
|
+
|
23
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
24
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
25
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
26
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
27
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
29
|
+
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
30
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/Manifest.txt
ADDED
@@ -0,0 +1,217 @@
|
|
1
|
+
.gitignore
|
2
|
+
Gemfile
|
3
|
+
History.txt
|
4
|
+
License.txt
|
5
|
+
Manifest.txt
|
6
|
+
README.rdoc
|
7
|
+
Rakefile
|
8
|
+
examples/alpha_blend.rb
|
9
|
+
examples/box.png
|
10
|
+
examples/box_in_scene.png
|
11
|
+
examples/contours/bitmap-contours-with-labels.png
|
12
|
+
examples/contours/bitmap-contours.png
|
13
|
+
examples/contours/bounding-box-detect-canny.rb
|
14
|
+
examples/contours/contour_retrieval_modes.rb
|
15
|
+
examples/contours/rotated-boxes.jpg
|
16
|
+
examples/convexhull.rb
|
17
|
+
examples/face_detect.rb
|
18
|
+
examples/find_obj.rb
|
19
|
+
examples/houghcircle.rb
|
20
|
+
examples/inpaint.png
|
21
|
+
examples/inpaint.rb
|
22
|
+
examples/lenna-rotated.jpg
|
23
|
+
examples/lenna.jpg
|
24
|
+
examples/match_kdtree.rb
|
25
|
+
examples/paint.rb
|
26
|
+
examples/snake.rb
|
27
|
+
examples/stuff.jpg
|
28
|
+
examples/tiffany.jpg
|
29
|
+
ext/opencv/curve.cpp
|
30
|
+
ext/opencv/curve.h
|
31
|
+
ext/opencv/cvavgcomp.cpp
|
32
|
+
ext/opencv/cvavgcomp.h
|
33
|
+
ext/opencv/cvbox2d.cpp
|
34
|
+
ext/opencv/cvbox2d.h
|
35
|
+
ext/opencv/cvcapture.cpp
|
36
|
+
ext/opencv/cvcapture.h
|
37
|
+
ext/opencv/cvchain.cpp
|
38
|
+
ext/opencv/cvchain.h
|
39
|
+
ext/opencv/cvcircle32f.cpp
|
40
|
+
ext/opencv/cvcircle32f.h
|
41
|
+
ext/opencv/cvcondensation.cpp
|
42
|
+
ext/opencv/cvcondensation.h
|
43
|
+
ext/opencv/cvconnectedcomp.cpp
|
44
|
+
ext/opencv/cvconnectedcomp.h
|
45
|
+
ext/opencv/cvcontour.cpp
|
46
|
+
ext/opencv/cvcontour.h
|
47
|
+
ext/opencv/cvcontourtree.cpp
|
48
|
+
ext/opencv/cvcontourtree.h
|
49
|
+
ext/opencv/cvconvexitydefect.cpp
|
50
|
+
ext/opencv/cvconvexitydefect.h
|
51
|
+
ext/opencv/cverror.cpp
|
52
|
+
ext/opencv/cverror.h
|
53
|
+
ext/opencv/cvfeaturetree.cpp
|
54
|
+
ext/opencv/cvfeaturetree.h
|
55
|
+
ext/opencv/cvfont.cpp
|
56
|
+
ext/opencv/cvfont.h
|
57
|
+
ext/opencv/cvhaarclassifiercascade.cpp
|
58
|
+
ext/opencv/cvhaarclassifiercascade.h
|
59
|
+
ext/opencv/cvhistogram.cpp
|
60
|
+
ext/opencv/cvhistogram.h
|
61
|
+
ext/opencv/cvhumoments.cpp
|
62
|
+
ext/opencv/cvhumoments.h
|
63
|
+
ext/opencv/cvline.cpp
|
64
|
+
ext/opencv/cvline.h
|
65
|
+
ext/opencv/cvmat.cpp
|
66
|
+
ext/opencv/cvmat.h
|
67
|
+
ext/opencv/cvmatnd.cpp
|
68
|
+
ext/opencv/cvmatnd.h
|
69
|
+
ext/opencv/cvmemstorage.cpp
|
70
|
+
ext/opencv/cvmemstorage.h
|
71
|
+
ext/opencv/cvmoments.cpp
|
72
|
+
ext/opencv/cvmoments.h
|
73
|
+
ext/opencv/cvpoint.cpp
|
74
|
+
ext/opencv/cvpoint.h
|
75
|
+
ext/opencv/cvpoint2d32f.cpp
|
76
|
+
ext/opencv/cvpoint2d32f.h
|
77
|
+
ext/opencv/cvpoint3d32f.cpp
|
78
|
+
ext/opencv/cvpoint3d32f.h
|
79
|
+
ext/opencv/cvrect.cpp
|
80
|
+
ext/opencv/cvrect.h
|
81
|
+
ext/opencv/cvscalar.cpp
|
82
|
+
ext/opencv/cvscalar.h
|
83
|
+
ext/opencv/cvseq.cpp
|
84
|
+
ext/opencv/cvseq.h
|
85
|
+
ext/opencv/cvsize.cpp
|
86
|
+
ext/opencv/cvsize.h
|
87
|
+
ext/opencv/cvsize2d32f.cpp
|
88
|
+
ext/opencv/cvsize2d32f.h
|
89
|
+
ext/opencv/cvslice.cpp
|
90
|
+
ext/opencv/cvslice.h
|
91
|
+
ext/opencv/cvsparsemat.cpp
|
92
|
+
ext/opencv/cvsparsemat.h
|
93
|
+
ext/opencv/cvsurfparams.cpp
|
94
|
+
ext/opencv/cvsurfparams.h
|
95
|
+
ext/opencv/cvsurfpoint.cpp
|
96
|
+
ext/opencv/cvsurfpoint.h
|
97
|
+
ext/opencv/cvtermcriteria.cpp
|
98
|
+
ext/opencv/cvtermcriteria.h
|
99
|
+
ext/opencv/cvtwopoints.cpp
|
100
|
+
ext/opencv/cvtwopoints.h
|
101
|
+
ext/opencv/cvutils.cpp
|
102
|
+
ext/opencv/cvutils.h
|
103
|
+
ext/opencv/cvvideowriter.cpp
|
104
|
+
ext/opencv/cvvideowriter.h
|
105
|
+
ext/opencv/gui.cpp
|
106
|
+
ext/opencv/gui.h
|
107
|
+
ext/opencv/iplconvkernel.cpp
|
108
|
+
ext/opencv/iplconvkernel.h
|
109
|
+
ext/opencv/iplimage.cpp
|
110
|
+
ext/opencv/iplimage.h
|
111
|
+
ext/opencv/lib/opencv.rb
|
112
|
+
ext/opencv/lib/opencv/psyched_yaml.rb
|
113
|
+
ext/opencv/lib/opencv/version.rb
|
114
|
+
ext/opencv/mouseevent.cpp
|
115
|
+
ext/opencv/mouseevent.h
|
116
|
+
ext/opencv/opencv.cpp
|
117
|
+
ext/opencv/opencv.h
|
118
|
+
ext/opencv/pointset.cpp
|
119
|
+
ext/opencv/pointset.h
|
120
|
+
ext/opencv/trackbar.cpp
|
121
|
+
ext/opencv/trackbar.h
|
122
|
+
ext/opencv/window.cpp
|
123
|
+
ext/opencv/window.h
|
124
|
+
extconf.rb
|
125
|
+
images/CvMat_sobel.png
|
126
|
+
images/CvMat_sub_rect.png
|
127
|
+
images/CvSeq_relationmap.png
|
128
|
+
images/face_detect_from_lena.jpg
|
129
|
+
afeld-opencv.gemspec
|
130
|
+
test/helper.rb
|
131
|
+
test/runner.rb
|
132
|
+
test/samples/airplane.jpg
|
133
|
+
test/samples/baboon.jpg
|
134
|
+
test/samples/baboon200.jpg
|
135
|
+
test/samples/baboon200_rotated.jpg
|
136
|
+
test/samples/blank0.jpg
|
137
|
+
test/samples/blank1.jpg
|
138
|
+
test/samples/blank2.jpg
|
139
|
+
test/samples/blank3.jpg
|
140
|
+
test/samples/blank4.jpg
|
141
|
+
test/samples/blank5.jpg
|
142
|
+
test/samples/blank6.jpg
|
143
|
+
test/samples/blank7.jpg
|
144
|
+
test/samples/blank8.jpg
|
145
|
+
test/samples/blank9.jpg
|
146
|
+
test/samples/cat.jpg
|
147
|
+
test/samples/contours.jpg
|
148
|
+
test/samples/fruits.jpg
|
149
|
+
test/samples/haarcascade_frontalface_alt.xml.gz
|
150
|
+
test/samples/inpaint-mask.bmp
|
151
|
+
test/samples/lena-256x256.jpg
|
152
|
+
test/samples/lena-32x32.jpg
|
153
|
+
test/samples/lena-eyes.jpg
|
154
|
+
test/samples/lena-inpaint.jpg
|
155
|
+
test/samples/lena.jpg
|
156
|
+
test/samples/lines.jpg
|
157
|
+
test/samples/messy0.jpg
|
158
|
+
test/samples/messy1.jpg
|
159
|
+
test/samples/movie_sample.avi
|
160
|
+
test/samples/one_way_train_0000.jpg
|
161
|
+
test/samples/one_way_train_0001.jpg
|
162
|
+
test/samples/partially_blank0.jpg
|
163
|
+
test/samples/partially_blank1.jpg
|
164
|
+
test/samples/smooth0.jpg
|
165
|
+
test/samples/smooth1.jpg
|
166
|
+
test/samples/smooth2.jpg
|
167
|
+
test/samples/smooth3.jpg
|
168
|
+
test/samples/smooth4.jpg
|
169
|
+
test/samples/smooth5.jpg
|
170
|
+
test/samples/smooth6.jpg
|
171
|
+
test/samples/str-cv-rotated.jpg
|
172
|
+
test/samples/str-cv.jpg
|
173
|
+
test/samples/str-ov.jpg
|
174
|
+
test/samples/stuff.jpg
|
175
|
+
test/test_curve.rb
|
176
|
+
test/test_cvavgcomp.rb
|
177
|
+
test/test_cvbox2d.rb
|
178
|
+
test/test_cvcapture.rb
|
179
|
+
test/test_cvchain.rb
|
180
|
+
test/test_cvcircle32f.rb
|
181
|
+
test/test_cvconnectedcomp.rb
|
182
|
+
test/test_cvcontour.rb
|
183
|
+
test/test_cvcontourtree.rb
|
184
|
+
test/test_cverror.rb
|
185
|
+
test/test_cvfeaturetree.rb
|
186
|
+
test/test_cvfont.rb
|
187
|
+
test/test_cvhaarclassifiercascade.rb
|
188
|
+
test/test_cvhistogram.rb
|
189
|
+
test/test_cvhumoments.rb
|
190
|
+
test/test_cvline.rb
|
191
|
+
test/test_cvmat.rb
|
192
|
+
test/test_cvmat_drawing.rb
|
193
|
+
test/test_cvmat_dxt.rb
|
194
|
+
test/test_cvmat_imageprocessing.rb
|
195
|
+
test/test_cvmoments.rb
|
196
|
+
test/test_cvpoint.rb
|
197
|
+
test/test_cvpoint2d32f.rb
|
198
|
+
test/test_cvpoint3d32f.rb
|
199
|
+
test/test_cvrect.rb
|
200
|
+
test/test_cvscalar.rb
|
201
|
+
test/test_cvseq.rb
|
202
|
+
test/test_cvsize.rb
|
203
|
+
test/test_cvsize2d32f.rb
|
204
|
+
test/test_cvslice.rb
|
205
|
+
test/test_cvsurfparams.rb
|
206
|
+
test/test_cvsurfpoint.rb
|
207
|
+
test/test_cvtermcriteria.rb
|
208
|
+
test/test_cvtwopoints.rb
|
209
|
+
test/test_cvvideowriter.rb
|
210
|
+
test/test_iplconvkernel.rb
|
211
|
+
test/test_iplimage.rb
|
212
|
+
test/test_mouseevent.rb
|
213
|
+
test/test_opencv.rb
|
214
|
+
test/test_pointset.rb
|
215
|
+
test/test_preliminary.rb
|
216
|
+
test/test_trackbar.rb
|
217
|
+
test/test_window.rb
|
data/README.rdoc
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
= Note
|
2
|
+
|
3
|
+
This fork was created solely to release an up-to-date version of ruby-opencv on rubygems. It can be installed as a gem via
|
4
|
+
|
5
|
+
$ gem install afeld-opencv
|
6
|
+
|
7
|
+
or added in a Gemfile with
|
8
|
+
|
9
|
+
gem 'afeld-opencv', '~> 0.8'
|
10
|
+
|
11
|
+
---------------
|
12
|
+
|
13
|
+
= OpenCV
|
14
|
+
|
15
|
+
The initial Open Computer Vision library was originally developed by Intel
|
16
|
+
Corporation. Recent development has been headed by Willow Garage, Inc.
|
17
|
+
|
18
|
+
* OpenCV project home http://opencv.willowgarage.com/wiki/
|
19
|
+
* Download http://sourceforge.net/projects/opencvlibrary/
|
20
|
+
* Ruby/OpenCV original author's web page http://blueruby.mydns.jp/opencv
|
21
|
+
|
22
|
+
== DESCRIPTION:
|
23
|
+
|
24
|
+
OpenCV wrapper for Ruby
|
25
|
+
|
26
|
+
== FEATURES/PROBLEMS:
|
27
|
+
|
28
|
+
* Some OpenCV functions are wrapped.
|
29
|
+
* Ruby 1.8.7, 1.9.3 and OpenCV 2.4.0 are supported.
|
30
|
+
|
31
|
+
== DEPENDENCIES:
|
32
|
+
|
33
|
+
* OpenCV (required)
|
34
|
+
* Ruby/OpenCV relies on the OpenCV library http://opencv.willowgarage.com/wiki/InstallGuide
|
35
|
+
|
36
|
+
* Microsoft Visual C++ (for mswin32)
|
37
|
+
* http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
|
38
|
+
|
39
|
+
* MinGW and MSYS (for mingw32)
|
40
|
+
* gcc, g++ and MSYS are needed.
|
41
|
+
* http://www.mingw.org
|
42
|
+
|
43
|
+
|
44
|
+
== INSTALLATION:
|
45
|
+
=== Install Ruby/OpenCV manually
|
46
|
+
==== Unix/Linux/Mac
|
47
|
+
|
48
|
+
$ git clone git://github.com/ruby-opencv/ruby-opencv.git
|
49
|
+
$ cd ruby-opencv
|
50
|
+
$ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
|
51
|
+
$ ruby extconf.rb --with-opencv-dir=/path/to/opencvdir
|
52
|
+
$ make
|
53
|
+
$ make install
|
54
|
+
|
55
|
+
==== Windows (mswin32)
|
56
|
+
|
57
|
+
Use *nmake* instead of *make*.
|
58
|
+
|
59
|
+
$ git clone git://github.com/ruby-opencv/ruby-opencv.git
|
60
|
+
$ cd ruby-opencv
|
61
|
+
$ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
|
62
|
+
$ ruby extconf.rb --with-opencv-dir=C:\path\to\opencvdir\install # for your own built OpenCV library
|
63
|
+
$ nmake
|
64
|
+
$ nmake install
|
65
|
+
|
66
|
+
To use pre-built OpenCV libraries, set the following option to extconf.rb.
|
67
|
+
|
68
|
+
$ ruby extconf.rb --with-opencv-include=C:\path\to\opencvdir\build\include --with-opencv-lib=C:\path\to\opencvdir\build\x86\vc10\lib
|
69
|
+
|
70
|
+
|
71
|
+
==== Windows (mingw32)
|
72
|
+
|
73
|
+
Type the following commands on the *MSYS* *console*.
|
74
|
+
|
75
|
+
$ git clone git://github.com/ruby-opencv/ruby-opencv.git
|
76
|
+
$ cd ruby-opencv
|
77
|
+
$ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
|
78
|
+
$ ruby extconf.rb --with-opencv-dir=/C/path/to/opencvdir/install # for your own built OpenCV library
|
79
|
+
$ make
|
80
|
+
$ make install
|
81
|
+
|
82
|
+
To use pre-built OpenCV libraries, set the following option to extconf.rb.
|
83
|
+
|
84
|
+
$ ruby extconf.rb --with-opencv-include=/c/path/to/opencvdir/build/include --with-opencv-lib=/c/path/to/opencvdir/build/x86/mingw/lib
|
85
|
+
|
86
|
+
|
87
|
+
==== NOTE:
|
88
|
+
|
89
|
+
*/path/to/opencvdir* is the path you installs OpenCV library (default: /usr/local).
|
90
|
+
|
91
|
+
For example, if you install OpenCV library to */opt/local/* like:
|
92
|
+
|
93
|
+
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/opt/local/ ./OpenCV-2.4.0
|
94
|
+
$ make
|
95
|
+
$ make install
|
96
|
+
|
97
|
+
Install Ruby/OpenCV with the following command:
|
98
|
+
|
99
|
+
$ ruby extconf.rb --with-opencv-dir=/opt/local
|
100
|
+
$ make
|
101
|
+
$ make install
|
102
|
+
|
103
|
+
|
104
|
+
=== Create Ruby/OpenCV Gem
|
105
|
+
You can also install this library creating a gem like:
|
106
|
+
|
107
|
+
$ git clone git://github.com/ruby-opencv/ruby-opencv.git
|
108
|
+
$ cd ruby-opencv
|
109
|
+
$ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
|
110
|
+
$ bundle install
|
111
|
+
$ rake gem
|
112
|
+
$ gem install pkg/opencv-*.gem -- --with-opencv-dir=/path/to/opencvdir
|
113
|
+
|
114
|
+
To add ruby-opencv in your Gemfile:
|
115
|
+
|
116
|
+
$ echo -e "\n"'gem "opencv", :git => "https://github.com/ruby-opencv/ruby-opencv"' >> Gemfile
|
117
|
+
$ bundle config build.opencv --with-opencv-dir=/path/to/opencvdir
|
118
|
+
$ bundle install # or bundle update
|
119
|
+
|
120
|
+
== SYNOPSIS:
|
121
|
+
=== Show Image using GUI Component
|
122
|
+
|
123
|
+
#!/usr/bin/env ruby
|
124
|
+
require "opencv"
|
125
|
+
|
126
|
+
image = OpenCV::IplImage.load("sample.jpg")
|
127
|
+
window = OpenCV::GUI::Window.new("preview")
|
128
|
+
window.show(image)
|
129
|
+
OpenCV::GUI::wait_key
|
130
|
+
|
131
|
+
=== Face Detection
|
132
|
+
|
133
|
+
Here is a sample face detection program that doesn't rely on the GUI components.
|
134
|
+
In order for this to work you must copy the OpenCV haarcascades data into a
|
135
|
+
subfolder called data.
|
136
|
+
|
137
|
+
#!/usr/bin/env ruby
|
138
|
+
require "opencv"
|
139
|
+
|
140
|
+
if ARGV.length < 2
|
141
|
+
puts "Usage: your_app_name source dest"
|
142
|
+
exit
|
143
|
+
end
|
144
|
+
|
145
|
+
data = "./data/haarcascades/haarcascade_frontalface_alt.xml"
|
146
|
+
detector = OpenCV::CvHaarClassifierCascade::load(data)
|
147
|
+
image = OpenCV::IplImage.load(ARGV[0])
|
148
|
+
detector.detect_objects(image).each do |region|
|
149
|
+
color = OpenCV::CvColor::Blue
|
150
|
+
image.rectangle! region.top_left, region.bottom_right, :color => color
|
151
|
+
end
|
152
|
+
image.save_image(ARGV[1])
|
153
|
+
|
154
|
+
For more samples, see examples/*.rb
|
155
|
+
|
156
|
+
== LICENSE:
|
157
|
+
|
158
|
+
The BSD Liscense
|
159
|
+
|
160
|
+
see LICENSE.txt
|
161
|
+
|