afeld-opencv 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. data/.gitignore +23 -0
  2. data/Gemfile +6 -0
  3. data/History.txt +5 -0
  4. data/License.txt +30 -0
  5. data/Manifest.txt +217 -0
  6. data/README.rdoc +161 -0
  7. data/Rakefile +52 -0
  8. data/examples/alpha_blend.rb +21 -0
  9. data/examples/box.png +0 -0
  10. data/examples/box_in_scene.png +0 -0
  11. data/examples/contours/bitmap-contours-with-labels.png +0 -0
  12. data/examples/contours/bitmap-contours.png +0 -0
  13. data/examples/contours/bounding-box-detect-canny.rb +62 -0
  14. data/examples/contours/contour_retrieval_modes.rb +139 -0
  15. data/examples/contours/rotated-boxes.jpg +0 -0
  16. data/examples/convexhull.rb +47 -0
  17. data/examples/face_detect.rb +20 -0
  18. data/examples/find_obj.rb +169 -0
  19. data/examples/houghcircle.rb +22 -0
  20. data/examples/inpaint.png +0 -0
  21. data/examples/inpaint.rb +57 -0
  22. data/examples/lenna-rotated.jpg +0 -0
  23. data/examples/lenna.jpg +0 -0
  24. data/examples/match_kdtree.rb +88 -0
  25. data/examples/paint.rb +70 -0
  26. data/examples/snake.rb +43 -0
  27. data/examples/stuff.jpg +0 -0
  28. data/examples/tiffany.jpg +0 -0
  29. data/ext/opencv/curve.cpp +112 -0
  30. data/ext/opencv/curve.h +34 -0
  31. data/ext/opencv/cvavgcomp.cpp +67 -0
  32. data/ext/opencv/cvavgcomp.h +39 -0
  33. data/ext/opencv/cvbox2d.cpp +197 -0
  34. data/ext/opencv/cvbox2d.h +61 -0
  35. data/ext/opencv/cvcapture.cpp +499 -0
  36. data/ext/opencv/cvcapture.h +72 -0
  37. data/ext/opencv/cvchain.cpp +230 -0
  38. data/ext/opencv/cvchain.h +46 -0
  39. data/ext/opencv/cvcircle32f.cpp +116 -0
  40. data/ext/opencv/cvcircle32f.h +52 -0
  41. data/ext/opencv/cvcondensation.cpp +282 -0
  42. data/ext/opencv/cvcondensation.h +49 -0
  43. data/ext/opencv/cvconnectedcomp.cpp +143 -0
  44. data/ext/opencv/cvconnectedcomp.h +49 -0
  45. data/ext/opencv/cvcontour.cpp +297 -0
  46. data/ext/opencv/cvcontour.h +48 -0
  47. data/ext/opencv/cvcontourtree.cpp +91 -0
  48. data/ext/opencv/cvcontourtree.h +41 -0
  49. data/ext/opencv/cvconvexitydefect.cpp +103 -0
  50. data/ext/opencv/cvconvexitydefect.h +42 -0
  51. data/ext/opencv/cverror.cpp +159 -0
  52. data/ext/opencv/cverror.h +28 -0
  53. data/ext/opencv/cvfeaturetree.cpp +125 -0
  54. data/ext/opencv/cvfeaturetree.h +55 -0
  55. data/ext/opencv/cvfont.cpp +208 -0
  56. data/ext/opencv/cvfont.h +64 -0
  57. data/ext/opencv/cvhaarclassifiercascade.cpp +168 -0
  58. data/ext/opencv/cvhaarclassifiercascade.h +39 -0
  59. data/ext/opencv/cvhistogram.cpp +546 -0
  60. data/ext/opencv/cvhistogram.h +73 -0
  61. data/ext/opencv/cvhumoments.cpp +139 -0
  62. data/ext/opencv/cvhumoments.h +51 -0
  63. data/ext/opencv/cvline.cpp +154 -0
  64. data/ext/opencv/cvline.h +54 -0
  65. data/ext/opencv/cvmat.cpp +5627 -0
  66. data/ext/opencv/cvmat.h +280 -0
  67. data/ext/opencv/cvmatnd.cpp +44 -0
  68. data/ext/opencv/cvmatnd.h +28 -0
  69. data/ext/opencv/cvmemstorage.cpp +68 -0
  70. data/ext/opencv/cvmemstorage.h +53 -0
  71. data/ext/opencv/cvmoments.cpp +287 -0
  72. data/ext/opencv/cvmoments.h +75 -0
  73. data/ext/opencv/cvpoint.cpp +228 -0
  74. data/ext/opencv/cvpoint.h +64 -0
  75. data/ext/opencv/cvpoint2d32f.cpp +211 -0
  76. data/ext/opencv/cvpoint2d32f.h +63 -0
  77. data/ext/opencv/cvpoint3d32f.cpp +246 -0
  78. data/ext/opencv/cvpoint3d32f.h +66 -0
  79. data/ext/opencv/cvrect.cpp +333 -0
  80. data/ext/opencv/cvrect.h +79 -0
  81. data/ext/opencv/cvscalar.cpp +236 -0
  82. data/ext/opencv/cvscalar.h +71 -0
  83. data/ext/opencv/cvseq.cpp +599 -0
  84. data/ext/opencv/cvseq.h +72 -0
  85. data/ext/opencv/cvsize.cpp +221 -0
  86. data/ext/opencv/cvsize.h +65 -0
  87. data/ext/opencv/cvsize2d32f.cpp +209 -0
  88. data/ext/opencv/cvsize2d32f.h +64 -0
  89. data/ext/opencv/cvslice.cpp +120 -0
  90. data/ext/opencv/cvslice.h +61 -0
  91. data/ext/opencv/cvsparsemat.cpp +44 -0
  92. data/ext/opencv/cvsparsemat.h +28 -0
  93. data/ext/opencv/cvsurfparams.cpp +199 -0
  94. data/ext/opencv/cvsurfparams.h +58 -0
  95. data/ext/opencv/cvsurfpoint.cpp +223 -0
  96. data/ext/opencv/cvsurfpoint.h +52 -0
  97. data/ext/opencv/cvtermcriteria.cpp +192 -0
  98. data/ext/opencv/cvtermcriteria.h +71 -0
  99. data/ext/opencv/cvtwopoints.cpp +116 -0
  100. data/ext/opencv/cvtwopoints.h +51 -0
  101. data/ext/opencv/cvutils.cpp +194 -0
  102. data/ext/opencv/cvutils.h +29 -0
  103. data/ext/opencv/cvvideowriter.cpp +137 -0
  104. data/ext/opencv/cvvideowriter.h +43 -0
  105. data/ext/opencv/gui.cpp +68 -0
  106. data/ext/opencv/gui.h +30 -0
  107. data/ext/opencv/iplconvkernel.cpp +192 -0
  108. data/ext/opencv/iplconvkernel.h +71 -0
  109. data/ext/opencv/iplimage.cpp +576 -0
  110. data/ext/opencv/iplimage.h +70 -0
  111. data/ext/opencv/lib/opencv.rb +3 -0
  112. data/ext/opencv/lib/opencv/psyched_yaml.rb +22 -0
  113. data/ext/opencv/lib/opencv/version.rb +3 -0
  114. data/ext/opencv/mouseevent.cpp +181 -0
  115. data/ext/opencv/mouseevent.h +56 -0
  116. data/ext/opencv/opencv.cpp +710 -0
  117. data/ext/opencv/opencv.h +400 -0
  118. data/ext/opencv/pointset.cpp +284 -0
  119. data/ext/opencv/pointset.h +69 -0
  120. data/ext/opencv/trackbar.cpp +121 -0
  121. data/ext/opencv/trackbar.h +69 -0
  122. data/ext/opencv/window.cpp +357 -0
  123. data/ext/opencv/window.h +66 -0
  124. data/extconf.rb +65 -0
  125. data/images/CvMat_sobel.png +0 -0
  126. data/images/CvMat_sub_rect.png +0 -0
  127. data/images/CvSeq_relationmap.png +0 -0
  128. data/images/face_detect_from_lena.jpg +0 -0
  129. data/test/helper.rb +146 -0
  130. data/test/runner.rb +30 -0
  131. data/test/samples/airplane.jpg +0 -0
  132. data/test/samples/baboon.jpg +0 -0
  133. data/test/samples/baboon200.jpg +0 -0
  134. data/test/samples/baboon200_rotated.jpg +0 -0
  135. data/test/samples/blank0.jpg +0 -0
  136. data/test/samples/blank1.jpg +0 -0
  137. data/test/samples/blank2.jpg +0 -0
  138. data/test/samples/blank3.jpg +0 -0
  139. data/test/samples/blank4.jpg +0 -0
  140. data/test/samples/blank5.jpg +0 -0
  141. data/test/samples/blank6.jpg +0 -0
  142. data/test/samples/blank7.jpg +0 -0
  143. data/test/samples/blank8.jpg +0 -0
  144. data/test/samples/blank9.jpg +0 -0
  145. data/test/samples/cat.jpg +0 -0
  146. data/test/samples/contours.jpg +0 -0
  147. data/test/samples/fruits.jpg +0 -0
  148. data/test/samples/haarcascade_frontalface_alt.xml.gz +0 -0
  149. data/test/samples/inpaint-mask.bmp +0 -0
  150. data/test/samples/lena-256x256.jpg +0 -0
  151. data/test/samples/lena-32x32.jpg +0 -0
  152. data/test/samples/lena-eyes.jpg +0 -0
  153. data/test/samples/lena-inpaint.jpg +0 -0
  154. data/test/samples/lena.jpg +0 -0
  155. data/test/samples/lines.jpg +0 -0
  156. data/test/samples/messy0.jpg +0 -0
  157. data/test/samples/messy1.jpg +0 -0
  158. data/test/samples/movie_sample.avi +0 -0
  159. data/test/samples/one_way_train_0000.jpg +0 -0
  160. data/test/samples/one_way_train_0001.jpg +0 -0
  161. data/test/samples/partially_blank0.jpg +0 -0
  162. data/test/samples/partially_blank1.jpg +0 -0
  163. data/test/samples/smooth0.jpg +0 -0
  164. data/test/samples/smooth1.jpg +0 -0
  165. data/test/samples/smooth2.jpg +0 -0
  166. data/test/samples/smooth3.jpg +0 -0
  167. data/test/samples/smooth4.jpg +0 -0
  168. data/test/samples/smooth5.jpg +0 -0
  169. data/test/samples/smooth6.jpg +0 -0
  170. data/test/samples/str-cv-rotated.jpg +0 -0
  171. data/test/samples/str-cv.jpg +0 -0
  172. data/test/samples/str-ov.jpg +0 -0
  173. data/test/samples/stuff.jpg +0 -0
  174. data/test/test_curve.rb +43 -0
  175. data/test/test_cvavgcomp.rb +24 -0
  176. data/test/test_cvbox2d.rb +76 -0
  177. data/test/test_cvcapture.rb +183 -0
  178. data/test/test_cvchain.rb +108 -0
  179. data/test/test_cvcircle32f.rb +41 -0
  180. data/test/test_cvconnectedcomp.rb +61 -0
  181. data/test/test_cvcontour.rb +150 -0
  182. data/test/test_cvcontourtree.rb +43 -0
  183. data/test/test_cverror.rb +50 -0
  184. data/test/test_cvfeaturetree.rb +65 -0
  185. data/test/test_cvfont.rb +58 -0
  186. data/test/test_cvhaarclassifiercascade.rb +63 -0
  187. data/test/test_cvhistogram.rb +271 -0
  188. data/test/test_cvhumoments.rb +83 -0
  189. data/test/test_cvline.rb +50 -0
  190. data/test/test_cvmat.rb +2752 -0
  191. data/test/test_cvmat_drawing.rb +318 -0
  192. data/test/test_cvmat_dxt.rb +147 -0
  193. data/test/test_cvmat_imageprocessing.rb +1943 -0
  194. data/test/test_cvmoments.rb +180 -0
  195. data/test/test_cvpoint.rb +75 -0
  196. data/test/test_cvpoint2d32f.rb +75 -0
  197. data/test/test_cvpoint3d32f.rb +93 -0
  198. data/test/test_cvrect.rb +144 -0
  199. data/test/test_cvscalar.rb +113 -0
  200. data/test/test_cvseq.rb +295 -0
  201. data/test/test_cvsize.rb +75 -0
  202. data/test/test_cvsize2d32f.rb +75 -0
  203. data/test/test_cvslice.rb +31 -0
  204. data/test/test_cvsurfparams.rb +57 -0
  205. data/test/test_cvsurfpoint.rb +66 -0
  206. data/test/test_cvtermcriteria.rb +56 -0
  207. data/test/test_cvtwopoints.rb +40 -0
  208. data/test/test_cvvideowriter.rb +58 -0
  209. data/test/test_iplconvkernel.rb +54 -0
  210. data/test/test_iplimage.rb +156 -0
  211. data/test/test_mouseevent.rb +17 -0
  212. data/test/test_opencv.rb +340 -0
  213. data/test/test_pointset.rb +130 -0
  214. data/test/test_preliminary.rb +130 -0
  215. data/test/test_trackbar.rb +47 -0
  216. data/test/test_window.rb +115 -0
  217. metadata +399 -0
@@ -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
@@ -0,0 +1,6 @@
1
+ source :gemcutter
2
+
3
+ gem "hoe"
4
+ gem "hoe-gemspec"
5
+ gem "rspec"
6
+ gem "rake-compiler"
@@ -0,0 +1,5 @@
1
+ === 0.0.8 / 2012-07-13
2
+
3
+ * First stable gem release.
4
+
5
+ * Some OpenCV function wrapped.
@@ -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.
@@ -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
@@ -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
+