ruby-opencv 0.0.8.pre-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. data/.gitignore +25 -0
  2. data/Gemfile +8 -0
  3. data/History.txt +5 -0
  4. data/License.txt +30 -0
  5. data/Manifest.txt +225 -0
  6. data/README.rdoc +149 -0
  7. data/Rakefile +32 -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/matching_to_many_images.rb +16 -0
  26. data/examples/matching_to_many_images/query.png +0 -0
  27. data/examples/matching_to_many_images/train/1.png +0 -0
  28. data/examples/matching_to_many_images/train/2.png +0 -0
  29. data/examples/matching_to_many_images/train/3.png +0 -0
  30. data/examples/matching_to_many_images/train/trainImages.txt +3 -0
  31. data/examples/paint.rb +70 -0
  32. data/examples/snake.rb +43 -0
  33. data/examples/stuff.jpg +0 -0
  34. data/examples/tiffany.jpg +0 -0
  35. data/ext/opencv/curve.cpp +112 -0
  36. data/ext/opencv/curve.h +34 -0
  37. data/ext/opencv/cvavgcomp.cpp +67 -0
  38. data/ext/opencv/cvavgcomp.h +39 -0
  39. data/ext/opencv/cvbox2d.cpp +197 -0
  40. data/ext/opencv/cvbox2d.h +61 -0
  41. data/ext/opencv/cvcapture.cpp +499 -0
  42. data/ext/opencv/cvcapture.h +72 -0
  43. data/ext/opencv/cvchain.cpp +233 -0
  44. data/ext/opencv/cvchain.h +46 -0
  45. data/ext/opencv/cvcircle32f.cpp +116 -0
  46. data/ext/opencv/cvcircle32f.h +52 -0
  47. data/ext/opencv/cvcondensation.cpp +282 -0
  48. data/ext/opencv/cvcondensation.h +49 -0
  49. data/ext/opencv/cvconnectedcomp.cpp +143 -0
  50. data/ext/opencv/cvconnectedcomp.h +49 -0
  51. data/ext/opencv/cvcontour.cpp +296 -0
  52. data/ext/opencv/cvcontour.h +48 -0
  53. data/ext/opencv/cvcontourtree.cpp +91 -0
  54. data/ext/opencv/cvcontourtree.h +41 -0
  55. data/ext/opencv/cvconvexitydefect.cpp +103 -0
  56. data/ext/opencv/cvconvexitydefect.h +42 -0
  57. data/ext/opencv/cverror.cpp +159 -0
  58. data/ext/opencv/cverror.h +28 -0
  59. data/ext/opencv/cvfeaturetree.cpp +125 -0
  60. data/ext/opencv/cvfeaturetree.h +55 -0
  61. data/ext/opencv/cvfont.cpp +208 -0
  62. data/ext/opencv/cvfont.h +64 -0
  63. data/ext/opencv/cvhaarclassifiercascade.cpp +168 -0
  64. data/ext/opencv/cvhaarclassifiercascade.h +39 -0
  65. data/ext/opencv/cvhistogram.cpp +546 -0
  66. data/ext/opencv/cvhistogram.h +73 -0
  67. data/ext/opencv/cvhumoments.cpp +139 -0
  68. data/ext/opencv/cvhumoments.h +51 -0
  69. data/ext/opencv/cvline.cpp +154 -0
  70. data/ext/opencv/cvline.h +54 -0
  71. data/ext/opencv/cvmat.cpp +5848 -0
  72. data/ext/opencv/cvmat.h +284 -0
  73. data/ext/opencv/cvmatnd.cpp +44 -0
  74. data/ext/opencv/cvmatnd.h +28 -0
  75. data/ext/opencv/cvmemstorage.cpp +68 -0
  76. data/ext/opencv/cvmemstorage.h +53 -0
  77. data/ext/opencv/cvmoments.cpp +287 -0
  78. data/ext/opencv/cvmoments.h +75 -0
  79. data/ext/opencv/cvpoint.cpp +228 -0
  80. data/ext/opencv/cvpoint.h +64 -0
  81. data/ext/opencv/cvpoint2d32f.cpp +211 -0
  82. data/ext/opencv/cvpoint2d32f.h +63 -0
  83. data/ext/opencv/cvpoint3d32f.cpp +245 -0
  84. data/ext/opencv/cvpoint3d32f.h +66 -0
  85. data/ext/opencv/cvrect.cpp +333 -0
  86. data/ext/opencv/cvrect.h +79 -0
  87. data/ext/opencv/cvscalar.cpp +236 -0
  88. data/ext/opencv/cvscalar.h +71 -0
  89. data/ext/opencv/cvseq.cpp +599 -0
  90. data/ext/opencv/cvseq.h +74 -0
  91. data/ext/opencv/cvsize.cpp +221 -0
  92. data/ext/opencv/cvsize.h +65 -0
  93. data/ext/opencv/cvsize2d32f.cpp +209 -0
  94. data/ext/opencv/cvsize2d32f.h +64 -0
  95. data/ext/opencv/cvslice.cpp +120 -0
  96. data/ext/opencv/cvslice.h +61 -0
  97. data/ext/opencv/cvsparsemat.cpp +44 -0
  98. data/ext/opencv/cvsparsemat.h +28 -0
  99. data/ext/opencv/cvsurfparams.cpp +199 -0
  100. data/ext/opencv/cvsurfparams.h +58 -0
  101. data/ext/opencv/cvsurfpoint.cpp +223 -0
  102. data/ext/opencv/cvsurfpoint.h +52 -0
  103. data/ext/opencv/cvtermcriteria.cpp +192 -0
  104. data/ext/opencv/cvtermcriteria.h +71 -0
  105. data/ext/opencv/cvtwopoints.cpp +116 -0
  106. data/ext/opencv/cvtwopoints.h +51 -0
  107. data/ext/opencv/cvutils.cpp +194 -0
  108. data/ext/opencv/cvutils.h +29 -0
  109. data/ext/opencv/cvvideowriter.cpp +137 -0
  110. data/ext/opencv/cvvideowriter.h +43 -0
  111. data/ext/opencv/gui.cpp +68 -0
  112. data/ext/opencv/gui.h +30 -0
  113. data/ext/opencv/iplconvkernel.cpp +192 -0
  114. data/ext/opencv/iplconvkernel.h +71 -0
  115. data/ext/opencv/iplimage.cpp +644 -0
  116. data/ext/opencv/iplimage.h +73 -0
  117. data/ext/opencv/lib/opencv.rb +3 -0
  118. data/ext/opencv/lib/opencv/psyched_yaml.rb +22 -0
  119. data/ext/opencv/lib/opencv/version.rb +3 -0
  120. data/ext/opencv/mouseevent.cpp +181 -0
  121. data/ext/opencv/mouseevent.h +56 -0
  122. data/ext/opencv/opencv.cpp +722 -0
  123. data/ext/opencv/opencv.h +400 -0
  124. data/ext/opencv/pointset.cpp +274 -0
  125. data/ext/opencv/pointset.h +68 -0
  126. data/ext/opencv/trackbar.cpp +121 -0
  127. data/ext/opencv/trackbar.h +69 -0
  128. data/ext/opencv/window.cpp +357 -0
  129. data/ext/opencv/window.h +66 -0
  130. data/extconf.rb +75 -0
  131. data/images/CvMat_sobel.png +0 -0
  132. data/images/CvMat_sub_rect.png +0 -0
  133. data/images/CvSeq_relationmap.png +0 -0
  134. data/images/face_detect_from_lena.jpg +0 -0
  135. data/lib/opencv.rb +3 -0
  136. data/lib/opencv/psyched_yaml.rb +22 -0
  137. data/lib/opencv/version.rb +3 -0
  138. data/ruby-opencv.gemspec +43 -0
  139. data/test/helper.rb +166 -0
  140. data/test/runner.rb +30 -0
  141. data/test/samples/airplane.jpg +0 -0
  142. data/test/samples/baboon.jpg +0 -0
  143. data/test/samples/baboon200.jpg +0 -0
  144. data/test/samples/baboon200_rotated.jpg +0 -0
  145. data/test/samples/blank0.jpg +0 -0
  146. data/test/samples/blank1.jpg +0 -0
  147. data/test/samples/blank2.jpg +0 -0
  148. data/test/samples/blank3.jpg +0 -0
  149. data/test/samples/blank4.jpg +0 -0
  150. data/test/samples/blank5.jpg +0 -0
  151. data/test/samples/blank6.jpg +0 -0
  152. data/test/samples/blank7.jpg +0 -0
  153. data/test/samples/blank8.jpg +0 -0
  154. data/test/samples/blank9.jpg +0 -0
  155. data/test/samples/cat.jpg +0 -0
  156. data/test/samples/chessboard.jpg +0 -0
  157. data/test/samples/contours.jpg +0 -0
  158. data/test/samples/fruits.jpg +0 -0
  159. data/test/samples/haarcascade_frontalface_alt.xml.gz +0 -0
  160. data/test/samples/inpaint-mask.bmp +0 -0
  161. data/test/samples/lena-256x256.jpg +0 -0
  162. data/test/samples/lena-32x32.jpg +0 -0
  163. data/test/samples/lena-eyes.jpg +0 -0
  164. data/test/samples/lena-inpaint.jpg +0 -0
  165. data/test/samples/lena.jpg +0 -0
  166. data/test/samples/lines.jpg +0 -0
  167. data/test/samples/messy0.jpg +0 -0
  168. data/test/samples/messy1.jpg +0 -0
  169. data/test/samples/movie_sample.avi +0 -0
  170. data/test/samples/one_way_train_0000.jpg +0 -0
  171. data/test/samples/one_way_train_0001.jpg +0 -0
  172. data/test/samples/partially_blank0.jpg +0 -0
  173. data/test/samples/partially_blank1.jpg +0 -0
  174. data/test/samples/smooth0.jpg +0 -0
  175. data/test/samples/smooth1.jpg +0 -0
  176. data/test/samples/smooth2.jpg +0 -0
  177. data/test/samples/smooth3.jpg +0 -0
  178. data/test/samples/smooth4.jpg +0 -0
  179. data/test/samples/smooth5.jpg +0 -0
  180. data/test/samples/smooth6.jpg +0 -0
  181. data/test/samples/str-cv-rotated.jpg +0 -0
  182. data/test/samples/str-cv.jpg +0 -0
  183. data/test/samples/str-ov.jpg +0 -0
  184. data/test/samples/stuff.jpg +0 -0
  185. data/test/test_curve.rb +43 -0
  186. data/test/test_cvavgcomp.rb +24 -0
  187. data/test/test_cvbox2d.rb +76 -0
  188. data/test/test_cvcapture.rb +183 -0
  189. data/test/test_cvchain.rb +108 -0
  190. data/test/test_cvcircle32f.rb +41 -0
  191. data/test/test_cvconnectedcomp.rb +61 -0
  192. data/test/test_cvcontour.rb +150 -0
  193. data/test/test_cvcontourtree.rb +43 -0
  194. data/test/test_cverror.rb +50 -0
  195. data/test/test_cvfeaturetree.rb +65 -0
  196. data/test/test_cvfont.rb +58 -0
  197. data/test/test_cvhaarclassifiercascade.rb +63 -0
  198. data/test/test_cvhistogram.rb +271 -0
  199. data/test/test_cvhumoments.rb +83 -0
  200. data/test/test_cvline.rb +50 -0
  201. data/test/test_cvmat.rb +2947 -0
  202. data/test/test_cvmat_drawing.rb +349 -0
  203. data/test/test_cvmat_dxt.rb +150 -0
  204. data/test/test_cvmat_imageprocessing.rb +2025 -0
  205. data/test/test_cvmat_matching.rb +57 -0
  206. data/test/test_cvmoments.rb +180 -0
  207. data/test/test_cvpoint.rb +75 -0
  208. data/test/test_cvpoint2d32f.rb +75 -0
  209. data/test/test_cvpoint3d32f.rb +93 -0
  210. data/test/test_cvrect.rb +144 -0
  211. data/test/test_cvscalar.rb +113 -0
  212. data/test/test_cvseq.rb +295 -0
  213. data/test/test_cvsize.rb +75 -0
  214. data/test/test_cvsize2d32f.rb +75 -0
  215. data/test/test_cvslice.rb +31 -0
  216. data/test/test_cvsurfparams.rb +57 -0
  217. data/test/test_cvsurfpoint.rb +66 -0
  218. data/test/test_cvtermcriteria.rb +56 -0
  219. data/test/test_cvtwopoints.rb +40 -0
  220. data/test/test_cvvideowriter.rb +58 -0
  221. data/test/test_iplconvkernel.rb +54 -0
  222. data/test/test_iplimage.rb +236 -0
  223. data/test/test_mouseevent.rb +17 -0
  224. data/test/test_opencv.rb +324 -0
  225. data/test/test_pointset.rb +126 -0
  226. data/test/test_preliminary.rb +130 -0
  227. data/test/test_trackbar.rb +47 -0
  228. data/test/test_window.rb +115 -0
  229. metadata +414 -0
data/.gitignore ADDED
@@ -0,0 +1,25 @@
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
24
+ .RUBYLIBDIR.*
25
+
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source :gemcutter
2
+
3
+ group :development do
4
+ gem "hoe"
5
+ gem "hoe-gemspec"
6
+ gem "rake-compiler"
7
+ end
8
+
data/History.txt ADDED
@@ -0,0 +1,5 @@
1
+ === 0.0.6 / 2008-06-27
2
+
3
+ * First gem release.
4
+
5
+ * Some OpenCV function wrapped.
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,225 @@
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/matching_to_many_images.rb
26
+ examples/matching_to_many_images/query.png
27
+ examples/matching_to_many_images/train/1.png
28
+ examples/matching_to_many_images/train/2.png
29
+ examples/matching_to_many_images/train/3.png
30
+ examples/matching_to_many_images/train/trainImages.txt
31
+ examples/paint.rb
32
+ examples/snake.rb
33
+ examples/stuff.jpg
34
+ examples/tiffany.jpg
35
+ ext/opencv/curve.cpp
36
+ ext/opencv/curve.h
37
+ ext/opencv/cvavgcomp.cpp
38
+ ext/opencv/cvavgcomp.h
39
+ ext/opencv/cvbox2d.cpp
40
+ ext/opencv/cvbox2d.h
41
+ ext/opencv/cvcapture.cpp
42
+ ext/opencv/cvcapture.h
43
+ ext/opencv/cvchain.cpp
44
+ ext/opencv/cvchain.h
45
+ ext/opencv/cvcircle32f.cpp
46
+ ext/opencv/cvcircle32f.h
47
+ ext/opencv/cvcondensation.cpp
48
+ ext/opencv/cvcondensation.h
49
+ ext/opencv/cvconnectedcomp.cpp
50
+ ext/opencv/cvconnectedcomp.h
51
+ ext/opencv/cvcontour.cpp
52
+ ext/opencv/cvcontour.h
53
+ ext/opencv/cvcontourtree.cpp
54
+ ext/opencv/cvcontourtree.h
55
+ ext/opencv/cvconvexitydefect.cpp
56
+ ext/opencv/cvconvexitydefect.h
57
+ ext/opencv/cverror.cpp
58
+ ext/opencv/cverror.h
59
+ ext/opencv/cvfeaturetree.cpp
60
+ ext/opencv/cvfeaturetree.h
61
+ ext/opencv/cvfont.cpp
62
+ ext/opencv/cvfont.h
63
+ ext/opencv/cvhaarclassifiercascade.cpp
64
+ ext/opencv/cvhaarclassifiercascade.h
65
+ ext/opencv/cvhistogram.cpp
66
+ ext/opencv/cvhistogram.h
67
+ ext/opencv/cvhumoments.cpp
68
+ ext/opencv/cvhumoments.h
69
+ ext/opencv/cvline.cpp
70
+ ext/opencv/cvline.h
71
+ ext/opencv/cvmat.cpp
72
+ ext/opencv/cvmat.h
73
+ ext/opencv/cvmatnd.cpp
74
+ ext/opencv/cvmatnd.h
75
+ ext/opencv/cvmemstorage.cpp
76
+ ext/opencv/cvmemstorage.h
77
+ ext/opencv/cvmoments.cpp
78
+ ext/opencv/cvmoments.h
79
+ ext/opencv/cvpoint.cpp
80
+ ext/opencv/cvpoint.h
81
+ ext/opencv/cvpoint2d32f.cpp
82
+ ext/opencv/cvpoint2d32f.h
83
+ ext/opencv/cvpoint3d32f.cpp
84
+ ext/opencv/cvpoint3d32f.h
85
+ ext/opencv/cvrect.cpp
86
+ ext/opencv/cvrect.h
87
+ ext/opencv/cvscalar.cpp
88
+ ext/opencv/cvscalar.h
89
+ ext/opencv/cvseq.cpp
90
+ ext/opencv/cvseq.h
91
+ ext/opencv/cvsize.cpp
92
+ ext/opencv/cvsize.h
93
+ ext/opencv/cvsize2d32f.cpp
94
+ ext/opencv/cvsize2d32f.h
95
+ ext/opencv/cvslice.cpp
96
+ ext/opencv/cvslice.h
97
+ ext/opencv/cvsparsemat.cpp
98
+ ext/opencv/cvsparsemat.h
99
+ ext/opencv/cvsurfparams.cpp
100
+ ext/opencv/cvsurfparams.h
101
+ ext/opencv/cvsurfpoint.cpp
102
+ ext/opencv/cvsurfpoint.h
103
+ ext/opencv/cvtermcriteria.cpp
104
+ ext/opencv/cvtermcriteria.h
105
+ ext/opencv/cvtwopoints.cpp
106
+ ext/opencv/cvtwopoints.h
107
+ ext/opencv/cvutils.cpp
108
+ ext/opencv/cvutils.h
109
+ ext/opencv/cvvideowriter.cpp
110
+ ext/opencv/cvvideowriter.h
111
+ ext/opencv/gui.cpp
112
+ ext/opencv/gui.h
113
+ ext/opencv/iplconvkernel.cpp
114
+ ext/opencv/iplconvkernel.h
115
+ ext/opencv/iplimage.cpp
116
+ ext/opencv/iplimage.h
117
+ ext/opencv/lib/opencv.rb
118
+ ext/opencv/lib/opencv/psyched_yaml.rb
119
+ ext/opencv/lib/opencv/version.rb
120
+ ext/opencv/mouseevent.cpp
121
+ ext/opencv/mouseevent.h
122
+ ext/opencv/opencv.cpp
123
+ ext/opencv/opencv.h
124
+ ext/opencv/pointset.cpp
125
+ ext/opencv/pointset.h
126
+ ext/opencv/trackbar.cpp
127
+ ext/opencv/trackbar.h
128
+ ext/opencv/window.cpp
129
+ ext/opencv/window.h
130
+ extconf.rb
131
+ images/CvMat_sobel.png
132
+ images/CvMat_sub_rect.png
133
+ images/CvSeq_relationmap.png
134
+ images/face_detect_from_lena.jpg
135
+ ruby-opencv.gemspec
136
+ test/helper.rb
137
+ test/runner.rb
138
+ test/samples/airplane.jpg
139
+ test/samples/baboon.jpg
140
+ test/samples/baboon200.jpg
141
+ test/samples/baboon200_rotated.jpg
142
+ test/samples/blank0.jpg
143
+ test/samples/blank1.jpg
144
+ test/samples/blank2.jpg
145
+ test/samples/blank3.jpg
146
+ test/samples/blank4.jpg
147
+ test/samples/blank5.jpg
148
+ test/samples/blank6.jpg
149
+ test/samples/blank7.jpg
150
+ test/samples/blank8.jpg
151
+ test/samples/blank9.jpg
152
+ test/samples/cat.jpg
153
+ test/samples/chessboard.jpg
154
+ test/samples/contours.jpg
155
+ test/samples/fruits.jpg
156
+ test/samples/haarcascade_frontalface_alt.xml.gz
157
+ test/samples/inpaint-mask.bmp
158
+ test/samples/lena-256x256.jpg
159
+ test/samples/lena-32x32.jpg
160
+ test/samples/lena-eyes.jpg
161
+ test/samples/lena-inpaint.jpg
162
+ test/samples/lena.jpg
163
+ test/samples/lines.jpg
164
+ test/samples/messy0.jpg
165
+ test/samples/messy1.jpg
166
+ test/samples/movie_sample.avi
167
+ test/samples/one_way_train_0000.jpg
168
+ test/samples/one_way_train_0001.jpg
169
+ test/samples/partially_blank0.jpg
170
+ test/samples/partially_blank1.jpg
171
+ test/samples/smooth0.jpg
172
+ test/samples/smooth1.jpg
173
+ test/samples/smooth2.jpg
174
+ test/samples/smooth3.jpg
175
+ test/samples/smooth4.jpg
176
+ test/samples/smooth5.jpg
177
+ test/samples/smooth6.jpg
178
+ test/samples/str-cv-rotated.jpg
179
+ test/samples/str-cv.jpg
180
+ test/samples/str-ov.jpg
181
+ test/samples/stuff.jpg
182
+ test/test_curve.rb
183
+ test/test_cvavgcomp.rb
184
+ test/test_cvbox2d.rb
185
+ test/test_cvcapture.rb
186
+ test/test_cvchain.rb
187
+ test/test_cvcircle32f.rb
188
+ test/test_cvconnectedcomp.rb
189
+ test/test_cvcontour.rb
190
+ test/test_cvcontourtree.rb
191
+ test/test_cverror.rb
192
+ test/test_cvfeaturetree.rb
193
+ test/test_cvfont.rb
194
+ test/test_cvhaarclassifiercascade.rb
195
+ test/test_cvhistogram.rb
196
+ test/test_cvhumoments.rb
197
+ test/test_cvline.rb
198
+ test/test_cvmat.rb
199
+ test/test_cvmat_drawing.rb
200
+ test/test_cvmat_dxt.rb
201
+ test/test_cvmat_imageprocessing.rb
202
+ test/test_cvmat_matching.rb
203
+ test/test_cvmoments.rb
204
+ test/test_cvpoint.rb
205
+ test/test_cvpoint2d32f.rb
206
+ test/test_cvpoint3d32f.rb
207
+ test/test_cvrect.rb
208
+ test/test_cvscalar.rb
209
+ test/test_cvseq.rb
210
+ test/test_cvsize.rb
211
+ test/test_cvsize2d32f.rb
212
+ test/test_cvslice.rb
213
+ test/test_cvsurfparams.rb
214
+ test/test_cvsurfpoint.rb
215
+ test/test_cvtermcriteria.rb
216
+ test/test_cvtwopoints.rb
217
+ test/test_cvvideowriter.rb
218
+ test/test_iplconvkernel.rb
219
+ test/test_iplimage.rb
220
+ test/test_mouseevent.rb
221
+ test/test_opencv.rb
222
+ test/test_pointset.rb
223
+ test/test_preliminary.rb
224
+ test/test_trackbar.rb
225
+ test/test_window.rb
data/README.rdoc ADDED
@@ -0,0 +1,149 @@
1
+ = OpenCV
2
+
3
+ The initial Open Computer Vision library was originally developed by Intel
4
+ Corporation. Recent development has been headed by Willow Garage, Inc.
5
+
6
+ * OpenCV project home http://opencv.willowgarage.com/wiki/
7
+ * Download http://sourceforge.net/projects/opencvlibrary/
8
+ * Ruby/OpenCV original author's web page http://blueruby.mydns.jp/opencv
9
+
10
+ == DESCRIPTION:
11
+
12
+ OpenCV wrapper for Ruby
13
+
14
+ == FEATURES/PROBLEMS:
15
+
16
+ * Some OpenCV functions are wrapped.
17
+ * Ruby 1.8.7, 1.9.3 and OpenCV 2.4.3 are supported.
18
+
19
+ == DEPENDENCIES:
20
+
21
+ * OpenCV (required)
22
+ * Ruby/OpenCV relies on the OpenCV library http://opencv.willowgarage.com/wiki/InstallGuide
23
+
24
+ * Microsoft Visual C++ (for mswin32)
25
+ * http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
26
+
27
+ * MinGW and MSYS (for mingw32)
28
+ * gcc, g++ and MSYS are needed.
29
+ * http://www.mingw.org
30
+
31
+
32
+ == INSTALLATION:
33
+ === Install Ruby/OpenCV manually
34
+ ==== Unix/Linux/Mac
35
+
36
+ $ git clone git://github.com/ruby-opencv/ruby-opencv.git
37
+ $ cd ruby-opencv
38
+ $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
39
+ $ ruby extconf.rb --with-opencv-dir=/path/to/opencvdir
40
+ $ make
41
+ $ make install
42
+
43
+ ==== Windows (mswin32)
44
+
45
+ Use *nmake* instead of *make*.
46
+
47
+ $ git clone git://github.com/ruby-opencv/ruby-opencv.git
48
+ $ cd ruby-opencv
49
+ $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
50
+ $ ruby extconf.rb --with-opencv-dir=C:\path\to\opencvdir\install # for your own built OpenCV library
51
+ $ nmake
52
+ $ nmake install
53
+
54
+ To use pre-built OpenCV libraries, set the following option to extconf.rb.
55
+
56
+ $ ruby extconf.rb --with-opencv-include=C:\path\to\opencvdir\build\include --with-opencv-lib=C:\path\to\opencvdir\build\x86\vc10\lib
57
+
58
+
59
+ ==== Windows (mingw32)
60
+
61
+ Type the following commands on the *MSYS* *console*.
62
+
63
+ $ git clone git://github.com/ruby-opencv/ruby-opencv.git
64
+ $ cd ruby-opencv
65
+ $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
66
+ $ ruby extconf.rb --with-opencv-dir=/C/path/to/opencvdir/install # for your own built OpenCV library
67
+ $ make
68
+ $ make install
69
+
70
+ To use pre-built OpenCV libraries, set the following option to extconf.rb.
71
+
72
+ $ ruby extconf.rb --with-opencv-include=/c/path/to/opencvdir/build/include --with-opencv-lib=/c/path/to/opencvdir/build/x86/mingw/lib
73
+
74
+
75
+ ==== NOTE:
76
+
77
+ */path/to/opencvdir* is the path you installs OpenCV library (default: /usr/local).
78
+
79
+ For example, if you install OpenCV library to */opt/local/* like:
80
+
81
+ $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/opt/local/ ./OpenCV-2.4.2
82
+ $ make
83
+ $ make install
84
+
85
+ Install Ruby/OpenCV with the following command:
86
+
87
+ $ ruby extconf.rb --with-opencv-dir=/opt/local
88
+ $ make
89
+ $ make install
90
+
91
+
92
+ === Create Ruby/OpenCV Gem
93
+ You can also install this library creating a gem like:
94
+
95
+ $ git clone git://github.com/ruby-opencv/ruby-opencv.git
96
+ $ cd ruby-opencv
97
+ $ git checkout master # for OpenCV 2.4 or later. To use OpenCV 2.3, type "git checkout OpenCV_2.3" instead
98
+ $ bundle install
99
+ $ rake gem
100
+ $ gem install pkg/opencv-*.gem -- --with-opencv-dir=/path/to/opencvdir
101
+
102
+ To add ruby-opencv in your Gemfile:
103
+
104
+ $ echo -e "\n"'gem "opencv", :git => "https://github.com/ruby-opencv/ruby-opencv"' >> Gemfile
105
+ $ bundle config build.opencv --with-opencv-dir=/path/to/opencvdir
106
+ $ bundle install # or bundle update
107
+
108
+ == SYNOPSIS:
109
+ === Show Image using GUI Component
110
+
111
+ #!/usr/bin/env ruby
112
+ require "opencv"
113
+
114
+ image = OpenCV::IplImage.load("sample.jpg")
115
+ window = OpenCV::GUI::Window.new("preview")
116
+ window.show(image)
117
+ OpenCV::GUI::wait_key
118
+
119
+ === Face Detection
120
+
121
+ Here is a sample face detection program that doesn't rely on the GUI components.
122
+ In order for this to work you must copy the OpenCV haarcascades data into a
123
+ subfolder called data.
124
+
125
+ #!/usr/bin/env ruby
126
+ require "opencv"
127
+
128
+ if ARGV.length < 2
129
+ puts "Usage: your_app_name source dest"
130
+ exit
131
+ end
132
+
133
+ data = "./data/haarcascades/haarcascade_frontalface_alt.xml"
134
+ detector = OpenCV::CvHaarClassifierCascade::load(data)
135
+ image = OpenCV::IplImage.load(ARGV[0])
136
+ detector.detect_objects(image).each do |region|
137
+ color = OpenCV::CvColor::Blue
138
+ image.rectangle! region.top_left, region.bottom_right, :color => color
139
+ end
140
+ image.save_image(ARGV[1])
141
+
142
+ For more samples, see examples/*.rb
143
+
144
+ == LICENSE:
145
+
146
+ The BSD Liscense
147
+
148
+ see LICENSE.txt
149
+