ropencv 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ build/*
data/CMakeLists.txt ADDED
@@ -0,0 +1,19 @@
1
+ cmake_minimum_required(VERSION 2.6)
2
+
3
+ add_subdirectory(ext)
4
+
5
+ FIND_PACKAGE(Ruby)
6
+ IF(NOT RUBY_INCLUDE_PATH)
7
+ MESSAGE(STATUS "Ruby library not found. Cannot install OpenCV ruby extensions")
8
+ ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
9
+ STRING(REGEX REPLACE ".*lib(32|64)?/?" "lib/" RUBY_LIBRARY_INSTALL_DIR ${RUBY_RUBY_LIB_PATH})
10
+
11
+ FIND_PROGRAM(RDOC_EXECUTABLE NAMES rdoc1.9 rdoc1.8 rdoc)
12
+ FIND_PROGRAM(YARD_EXECUTABLE NAMES yard)
13
+
14
+ INSTALL(FILES lib/opencv.rb
15
+ DESTINATION ${RUBY_LIBRARY_INSTALL_DIR})
16
+ INSTALL(DIRECTORY lib/opencv
17
+ DESTINATION ${RUBY_LIBRARY_INSTALL_DIR})
18
+ ENDIF(NOT RUBY_INCLUDE_PATH)
19
+
data/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # ffi ruby wrapper for opencv 2.4.4 and 2.4.9
2
+ This is the first draft for automated ffi ruby bindings using rbind for opencv 2.4.4 and 2.4.9
3
+
4
+ # Installation
5
+ You have to install opencv 2.4.4 or 2.4.9 first. After this you can install the opencv ruby bindings via:
6
+ - gem install ropencv
7
+
8
+ # Additional methods
9
+ The following methods not available for python or java are automatically wrapped by this package:
10
+ - drawMatches
11
+ - findEssentialMat (OpenCV 2.4.9)
12
+ - recoverPose (OpenCV 2.4.9)
13
+
14
+ # Example1
15
+
16
+ require 'ropencv'
17
+ include OpenCV
18
+
19
+ mat = cv::imread("logo.png")
20
+ cv.blur(mat,mat,cv::Size.new(10,10))
21
+
22
+ detector = cv::FeatureDetector::create("SURF")
23
+ keypoints = Vector::KeyPoint.new
24
+ detector.detect(mat,keypoints)
25
+
26
+ puts "found #{keypoints.size} keypoints"
27
+ puts "first keypoint is at #{keypoints[0].pt.x}/#{keypoints[0].pt.y}"
28
+
29
+ cv::draw_keypoints(mat,keypoints,mat)
30
+ cv::imshow("key_points",mat)
31
+ cv::wait_key(-1)
32
+
33
+ # Example2
34
+
35
+ require 'ropencv'
36
+ include OpenCV
37
+
38
+ mat1 = cv::imread("image1.png")
39
+ mat2 = cv::imread("image2.png")
40
+
41
+ detector = cv::FeatureDetector::create("SURF")
42
+ extractor = cv::DescriptorExtractor::create("SURF")
43
+ matcher = cv::DescriptorMatcher::create("BruteForce")
44
+
45
+ features1 = Vector::KeyPoint.new
46
+ features2 = Vector::KeyPoint.new
47
+ detector.detect mat1,features1
48
+ detector.detect mat2,features2
49
+
50
+ descriptor1 = cv::Mat.new
51
+ descriptor2 = cv::Mat.new
52
+ extractor.compute(mat1,features1,descriptor1)
53
+ extractor.compute(mat2,features2,descriptor2)
54
+
55
+ matches = Vector::DMatch.new
56
+ matcher.match(descriptor1,descriptor2,matches)
57
+
58
+ result = cv::Mat.new
59
+ cv::draw_matches(mat_last,features1,mat,features2,matches,result)
60
+ cv::imshow("result",result)
61
+ cv::wait_key(-1)
data/examples/logo.png ADDED
Binary file
data/examples/test.rb ADDED
@@ -0,0 +1,16 @@
1
+ require './../lib/opencv'
2
+ include OpenCV
3
+
4
+ mat = cv::imread("logo.png")
5
+ cv.blur(mat,mat,cv::Size.new(10,10))
6
+
7
+ detector = cv::FeatureDetector::create("SURF")
8
+ keypoints = Vector::KeyPoint.new
9
+ detector.detect(mat,keypoints)
10
+
11
+ puts "found #{keypoints.size} keypoints"
12
+ puts "first keypoint is at #{keypoints[0].pt.x}/#{keypoints[0].pt.y}"
13
+
14
+ cv::draw_keypoints(mat,keypoints,mat)
15
+ cv::imshow("key_points",mat)
16
+ cv::wait_key(-1)
@@ -0,0 +1,32 @@
1
+ cmake_minimum_required(VERSION 2.6)
2
+ PROJECT(rbind_opencv CXX)
3
+
4
+ include(FindPkgConfig)
5
+ pkg_check_modules(OPENCV REQUIRED opencv)
6
+ add_definitions(${OPENCV_CFLAGS})
7
+ include_directories(${OPENCV_INCLUDE_DIRS})
8
+ link_directories(${OPENCV_LIBRARY_DIRS})
9
+
10
+
11
+
12
+ SET(RBIND_SRC
13
+ "${CMAKE_CURRENT_SOURCE_DIR}/types.cc"
14
+ "${CMAKE_CURRENT_SOURCE_DIR}/operations.cc"
15
+ "${CMAKE_CURRENT_SOURCE_DIR}/conversions.cc")
16
+ ADD_LIBRARY(rbind_opencv SHARED ${RBIND_SRC})
17
+
18
+ TARGET_LINK_LIBRARIES(rbind_opencv ${OPENCV_LIBS} ${OPENCV_LDFLAGS} )
19
+
20
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rbind.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc @ONLY)
21
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc DESTINATION lib/pkgconfig)
22
+
23
+ install(TARGETS rbind_opencv LIBRARY DESTINATION lib)
24
+ install(FILES types.h operations.h conversions.hpp DESTINATION include/${PROJECT_NAME}/${DIR})
25
+
26
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind)
27
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
28
+ endif()
29
+
30
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind)
31
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
32
+ endif()
data/ext/extconf.rb ADDED
@@ -0,0 +1,113 @@
1
+ require 'rbind'
2
+ require 'pp'
3
+ require File.join(File.dirname(__FILE__),'specializing.rb')
4
+
5
+ rbind = Rbind::Rbind.new("OpenCV")
6
+ rbind.pkg_config << "opencv"
7
+
8
+ # find opencv header path
9
+ out = IO.popen("pkg-config --cflags-only-I opencv")
10
+ paths = out.read.split("-I").delete_if(&:empty?).map do |i|
11
+ i.gsub("\n","").gsub(" ","").gsub("opencv","")
12
+ end
13
+ raise "Cannot find OpenCV" if paths.empty?
14
+
15
+ #check opencv version
16
+ out = IO.popen("pkg-config --modversion opencv")
17
+ opencv_version = out.read.chomp
18
+
19
+ ##add opencv headers
20
+ if opencv_version == "2.4.4"
21
+ rbind.includes = ["opencv2/core/core_c.h", "opencv2/core/types_c.h",
22
+ "opencv2/core/core.hpp", "opencv2/flann/miniflann.hpp",
23
+ "opencv2/imgproc/imgproc_c.h", "opencv2/imgproc/types_c.h",
24
+ "opencv2/imgproc/imgproc.hpp", "opencv2/photo/photo_c.h",
25
+ "opencv2/photo/photo.hpp", "opencv2/video/video.hpp",
26
+ "opencv2/features2d/features2d.hpp", "opencv2/objdetect/objdetect.hpp",
27
+ "opencv2/calib3d/calib3d.hpp", "opencv2/ml/ml.hpp",
28
+ "opencv2/highgui/highgui_c.h", "opencv2/highgui/highgui.hpp",
29
+ "opencv2/contrib/contrib.hpp", "opencv2/nonfree/nonfree.hpp",
30
+ "opencv2/nonfree/features2d.hpp"]
31
+ elsif opencv_version >= "2.4.9"
32
+ rbind.includes = ["opencv2/core.hpp", "opencv2/core/types.hpp",
33
+ "opencv2/core/utility.hpp", "opencv2/core/base.hpp",
34
+ "opencv2/contrib.hpp", "opencv2/calib3d.hpp",
35
+ "opencv2/features2d.hpp", "opencv2/flann.hpp",
36
+ "opencv2/highgui.hpp", "opencv2/imgproc.hpp",
37
+ "opencv2/ml.hpp", "opencv2/nonfree.hpp",
38
+ "opencv2/nonfree/features2d.hpp", "opencv2/objdetect.hpp",
39
+ "opencv2/photo.hpp", "opencv2/softcascade.hpp",
40
+ "opencv2/stitching.hpp", "opencv2/superres.hpp",
41
+ "opencv2/video.hpp", "opencv2/legacy.hpp",
42
+ "opencv2/videostab.hpp"]
43
+ else
44
+ raise "OpenCV version #{opencv_version} is not supported"
45
+ end
46
+
47
+ # check that all headers are available
48
+ rbind.includes = rbind.includes.map do |i|
49
+ path = File.join(paths[0],i)
50
+ if !File.exist?(path)
51
+ ::Rbind.log.info "OpenCV version does not support #{path}"
52
+ nil
53
+ else
54
+ path
55
+ end
56
+ end.compact
57
+ Rbind.log.info "found opencv #{opencv_version}: #{paths[0]}"
58
+
59
+ # auto add vector and ptr types if missing
60
+ rbind.on_type_not_found do |owner,type|
61
+ if type =~ /Ptr_(.*)/
62
+ t = rbind.parser.find_type(owner,$1)
63
+ t2 = Rbind::RPtr.new(type,rbind,t).typedef("cv::Ptr<#{t.full_name} >")
64
+ rbind.parser.add_type t2
65
+ elsif type =~ /vector_(.*)/
66
+ t = rbind.parser.find_type(owner,$1)
67
+ t2 = Rbind::RVector.new(type,rbind,t).typedef("std::vector<#{t.full_name} >")
68
+ rbind.parser.add_type t2
69
+ end
70
+ end
71
+
72
+ # parsing
73
+ rbind.parse File.join(File.dirname(__FILE__),"pre_opencv244.txt")
74
+ rbind.parse File.join(File.dirname(__FILE__),"opencv.txt")
75
+ rbind.use_namespace rbind.cv
76
+ rbind.cv.types_alias["string"] = rbind.cv.String
77
+ rbind.parse_headers
78
+ rbind.parse File.join(File.dirname(__FILE__),"post_opencv244.txt")
79
+
80
+ # post parsing + patching wrong signatures
81
+ if opencv_version == "2.4.4"
82
+ rbind.cv.CascadeClassifier.detectMultiScale[1].parameter(2).add_flag(:IO)
83
+ rbind.cv.CascadeClassifier.detectMultiScale[1].parameter(3).add_flag(:IO)
84
+ elsif opencv_version >= "2.4.9"
85
+ rbind.parse File.join(File.dirname(__FILE__),"post_opencv249.txt")
86
+ rbind.cv.randShuffle.parameter(2).add_flag(:IO)
87
+ else
88
+ raise "not supported opencv version"
89
+ end
90
+
91
+ rbind.cv.BRISK.generateKernel.parameter(0).add_flag(:IO)
92
+ rbind.cv.BRISK.generateKernel.parameter(1).add_flag(:IO)
93
+ rbind.cv.BRISK.operation("BRISK")[1].parameter(0).add_flag(:IO)
94
+ rbind.cv.BRISK.operation("BRISK")[1].parameter(1).add_flag(:IO)
95
+
96
+ rbind.cv.putText.parameter(0).add_flag(:IO)
97
+ rbind.cv.chamerMatching.parameter(0).add_flag(:IO)
98
+ rbind.cv.chamerMatching.parameter(1).add_flag(:IO)
99
+ rbind.cv.chamerMatching.parameter(2).add_flag(:IO)
100
+
101
+ # add some more vector types
102
+ rbind.parser.find_type(rbind,"vector_Point3f")
103
+ rbind.parser.find_type(rbind,"vector_Point3d")
104
+
105
+ # generate files
106
+ rbind.generator_ruby.file_prefix = "ropencv"
107
+ rbind.generate(File.join(File.dirname(__FILE__)),File.join(File.dirname(__FILE__),"..","lib","ropencv"))
108
+
109
+ Dir.chdir(rbind.generator_c.output_path) do
110
+ if !system("cmake .")
111
+ raise "CMake Configure Error"
112
+ end
113
+ end
data/ext/opencv.txt ADDED
@@ -0,0 +1,442 @@
1
+ const cv.CV_8U 0
2
+ const cv.CV_8S 1
3
+ const cv.CV_16U 2
4
+ const cv.CV_16S 3
5
+ const cv.CV_32S 4
6
+ const cv.CV_32F 5
7
+ const cv.CV_64F 6
8
+ const cv.CV_8UC1 (1-1)*8 + CV_8U
9
+ const cv.CV_8UC2 (2-1)*8 + CV_8U
10
+ const cv.CV_8UC3 (3-1)*8 + CV_8U
11
+ const cv.CV_8UC4 (4-1)*8 + CV_8U
12
+ const cv.CV_8SC1 (1-1)*8 + CV_8S
13
+ const cv.CV_8SC2 (2-1)*8 + CV_8S
14
+ const cv.CV_8SC3 (3-1)*8 + CV_8S
15
+ const cv.CV_8SC4 (4-1)*8 + CV_8S
16
+ const cv.CV_16UC1 (1-1)*8 + CV_16U
17
+ const cv.CV_16UC2 (2-1)*8 + CV_16U
18
+ const cv.CV_16UC3 (3-1)*8 + CV_16U
19
+ const cv.CV_16UC4 (4-1)*8 + CV_16U
20
+ const cv.CV_16SC1 (1-1)*8 + CV_16S
21
+ const cv.CV_16SC2 (2-1)*8 + CV_16S
22
+ const cv.CV_16SC3 (3-1)*8 + CV_16S
23
+ const cv.CV_16SC4 (4-1)*8 + CV_16S
24
+ const cv.CV_32SC1 (1-1)*8 + CV_32S
25
+ const cv.CV_32SC2 (2-1)*8 + CV_32S
26
+ const cv.CV_32SC3 (3-1)*8 + CV_32S
27
+ const cv.CV_32SC4 (4-1)*8 + CV_32S
28
+ const cv.CV_32FC1 (1-1)*8 + CV_32F
29
+ const cv.CV_32FC2 (2-1)*8 + CV_32F
30
+ const cv.CV_32FC3 (3-1)*8 + CV_32F
31
+ const cv.CV_32FC4 (4-1)*8 + CV_32F
32
+ const cv.CV_64FC1 (1-1)*8 + CV_64F
33
+ const cv.CV_64FC2 (2-1)*8 + CV_64F
34
+ const cv.CV_64FC3 (3-1)*8 + CV_64F
35
+ const cv.CV_64FC4 (4-1)*8 + CV_64F
36
+ const cv.CV_CN_MAX 512
37
+ const cv.CV_CN_SHIFT 3
38
+ const cv.CV_DEPTH_MAX (1 << CV_CN_SHIFT)
39
+ const cv.CV_MAT_CN_MASK ((CV_CN_MAX - 1) << CV_CN_SHIFT)
40
+ const cv.CV_MAT_TYPE_MASK (CV_DEPTH_MAX*CV_CN_MAX - 1)
41
+ const cv.CV_MAT_CONT_FLAG_SHIFT 14
42
+ const cv.CV_MAT_CONT_FLAG (1 << CV_MAT_CONT_FLAG_SHIFT)
43
+ const cv.CV_SUBMAT_FLAG_SHIFT 15
44
+ const cv.CV_SUBMAT_FLAG (1 << CV_SUBMAT_FLAG_SHIFT)
45
+ class cv.Range
46
+ int start /RW
47
+ int end /RW
48
+ cv.Range.Range
49
+ int start
50
+ int end
51
+ cv.Range.size int
52
+ cv.Range.size bool
53
+ cv.Range.all Range
54
+ cv.Range.all Range
55
+ cv.Range.operator== bool
56
+ Range r
57
+ cv.Range.operator!= bool
58
+ Range r
59
+ cv.Range.operator& Range
60
+ Range r
61
+ cv.Range.operator+ Range
62
+ int delta
63
+ cv.Range.operator- Range
64
+ int delta
65
+ class cv.String
66
+ cv.String.String
67
+ cv.String.String
68
+ c_string str
69
+ size_t length
70
+ cv.String.String
71
+ String other
72
+ cv.String.size size_t
73
+ cv.String.length size_t
74
+ cv.String.operator[] char
75
+ size_t idx
76
+ cv.String.c_str const_c_string
77
+ cv.String.empty bool
78
+ cv.String.clear void
79
+ cv.String.compare int
80
+ String str
81
+ cv.String.swap void
82
+ String str /IO
83
+ class cv.Scalar
84
+ double* val
85
+ cv.Scalar.Scalar
86
+ cv.Scalar.Scalar
87
+ double v0
88
+ cv.Scalar.Scalar
89
+ double v0
90
+ double v1
91
+ double v2 0
92
+ double v3 0
93
+ cv.Scalar.all Scalar /S
94
+ double v0
95
+ cv.Scalar.mul Scalar
96
+ Scalar other
97
+ double scale 1
98
+ cv.Scalar.conj Scalar
99
+ cv.Scalar.isReal bool
100
+ cv.Scalar.operator[] double
101
+ size_t elem
102
+ class cv.Point
103
+ int x /RW
104
+ int y /RW
105
+ class cv.Rect
106
+ int x /RW
107
+ int y /RW
108
+ int width /RW
109
+ int height /RW
110
+ cv.Point.Point
111
+ int x
112
+ int y
113
+ cv.Point.Point
114
+ Point pt
115
+ cv.Point.dot int
116
+ Point pt
117
+ cv.Point.dot double
118
+ Point pt
119
+ cv.Point.cross double
120
+ Point pt
121
+ cv.Point.inside bool
122
+ Rect rect
123
+ cv.Point.operator+ void
124
+ Point pt
125
+ class cv.Point2f
126
+ float x /RW
127
+ float y /RW
128
+ cv.Point2f.Point2f
129
+ float x
130
+ float y
131
+ cv.Point2f.Point2f
132
+ Point2f pt
133
+ cv.Point2f.dot float
134
+ Point2f pt
135
+ cv.Point2f.dot double
136
+ Point2f pt
137
+ cv.Point2f.cross double
138
+ Point2f pt
139
+ cv.Point2f.operator+ void
140
+ Point2f pt
141
+ class cv.Point2d
142
+ double x /RW
143
+ double y /RW
144
+ cv.Point2d.Point2d
145
+ double x
146
+ double y
147
+ cv.Point2d.operator+ void
148
+ Point2d pt
149
+ cv.Point2d.Point2d
150
+ Point2d pt
151
+ cv.Point2d.dot double
152
+ Point2d pt
153
+ cv.Point2d.dot double
154
+ Point2d pt
155
+ cv.Point2d.cross double
156
+ Point2d pt
157
+ class cv.Point3f
158
+ float x /RW
159
+ float y /RW
160
+ float z /RW
161
+ cv.Point3f.Point3f
162
+ float x
163
+ float y
164
+ float z
165
+ cv.Point3f.Point3f
166
+ Point3f pt
167
+ cv.Point3f.dot float
168
+ Point3f pt
169
+ cv.Point3f.ddot double
170
+ Point3f pt
171
+ cv.Point3f.cross Point3f
172
+ Point3f pt
173
+ cv.Point3f.operator+ void
174
+ Point3f pt
175
+ class cv.Point3d
176
+ double x /RW
177
+ double y /RW
178
+ double z /RW
179
+ cv.Point3d.Point3d
180
+ double x
181
+ double y
182
+ double z
183
+ cv.Point3d.Point3d
184
+ Point3d pt
185
+ cv.Point3d.dot double
186
+ Point3d pt
187
+ cv.Point3d.ddot double
188
+ Point3d pt
189
+ cv.Point3d.cross Point3d
190
+ Point3d pt
191
+ cv.Point3d.operator+ void
192
+ Point3d pt
193
+ class cv.Size
194
+ int width /RW
195
+ int height /RW
196
+ cv.Size.Size
197
+ cv.Size.Size
198
+ Size sz
199
+ cv.Size.Size
200
+ Point pt
201
+ cv.Size.Size
202
+ int width
203
+ int height
204
+ cv.Size.area int
205
+ class cv.Size2f
206
+ int width /RW
207
+ int height /RW
208
+ cv.Size2f.Size2f
209
+ cv.Size2f.Size2f
210
+ Size2f sz
211
+ cv.Size2f.Size2f
212
+ Point2f pt
213
+ cv.Size2f.Size2f
214
+ int width
215
+ int height
216
+ cv.Size2f.area int
217
+ cv.Rect.Rect
218
+ cv.Rect.Rect
219
+ Rect rect
220
+ cv.Rect.Rect
221
+ int x
222
+ int y
223
+ int width
224
+ int height
225
+ cv.Rect.tl Point
226
+ cv.Rect.br Point
227
+ cv.Rect.size Size
228
+ cv.Rect.area int
229
+ cv.Rect.contains bool
230
+ Point point
231
+ class CvTermCriteria
232
+ class CvDTreeNode
233
+ class CvSlice
234
+ class cvflann.flann_algorithm_t
235
+ class cvflann.flann_distance_t
236
+ class cv.RotatedRect
237
+ Point2f center /RW
238
+ Size2f size /RW
239
+ float angle /RW
240
+ cv.RotatedRect.RotatedRect
241
+ cv.RotatedRect.RotatedRect
242
+ Point2f center
243
+ Size2f size
244
+ float angle
245
+ cv.RotatedRect.boundingRect Rect
246
+ class cv.FileNode
247
+ class cv.Vec2d
248
+ cv.Vec2d.Vec2d
249
+ cv.Vec2d.Vec2d
250
+ Vec2d vec
251
+ cv.Vec2d.Vec2d
252
+ double t1
253
+ double t2
254
+ cv.Vec2d.all Vec2d /S
255
+ double alpha
256
+ cv.Vec2d.mul Vec2d
257
+ Vec2d other
258
+ cv.Vec2d.conj Vec2d
259
+ cv.Vec2d.operator[] double
260
+ int i
261
+ class cv.Vec3d
262
+ class cv.Vec4d
263
+ class cv.Vec4f
264
+ class cv.Vec6f
265
+ class cv.TermCriteria
266
+ class cv.flann::IndexParams
267
+ class cv.flann::SearchParams
268
+ class cv.FeatureDetector
269
+ class cv.Mat
270
+ int flags
271
+ int rows
272
+ int cols
273
+ size_t step
274
+ uchar* data
275
+ cv.Mat.Mat
276
+ cv.Mat.Mat
277
+ Mat m
278
+ cv.Mat.Mat
279
+ Size size
280
+ int type
281
+ cv.Mat.Mat
282
+ int rows
283
+ int cols
284
+ int type
285
+ cv.Mat.Mat
286
+ int rows
287
+ int cols
288
+ int type
289
+ void* data
290
+ size_t step AUTO_STEP
291
+ cv.Mat.operator+ Mat
292
+ Mat mat
293
+ cv.Mat.operator+ Mat
294
+ double val
295
+ cv.Mat.operator+ Mat
296
+ int val
297
+ cv.Mat.operator- Mat
298
+ Mat mat
299
+ cv.Mat.operator- Mat
300
+ double val
301
+ cv.Mat.operator- Mat
302
+ int val
303
+ cv.Mat.operator* Mat
304
+ Mat mat
305
+ cv.Mat.operator* Mat
306
+ double val
307
+ cv.Mat.operator* Mat
308
+ int val
309
+ cv.Mat.operator/ Mat
310
+ Mat mat
311
+ cv.Mat.operator/ Mat
312
+ double val
313
+ cv.Mat.operator/ Mat
314
+ int val
315
+ cv.Mat.row Mat
316
+ int y
317
+ cv.Mat.col Mat
318
+ int c
319
+ cv.Mat.rowRange Mat
320
+ int startrow
321
+ int endrow
322
+ cv.Mat.rowRange Mat
323
+ Range r
324
+ cv.Mat.colRange Mat
325
+ int startcol
326
+ int endcol
327
+ cv.Mat.colRange Mat
328
+ Range r
329
+ cv.Mat.diag Mat
330
+ int d 0
331
+ cv.Mat.clone Mat
332
+ cv.Mat.copyTo void
333
+ Mat m /O
334
+ cv.Mat.copyTo void
335
+ Mat m /O
336
+ Mat mask /IO
337
+ cv.Mat.convertTo void
338
+ Mat m /O
339
+ int rtype
340
+ double alpha 1
341
+ double beta 0
342
+ cv.Mat.assignTo void
343
+ Mat m /O
344
+ int type -1
345
+ cv.Mat.reshape Mat
346
+ int cn
347
+ int rows 0
348
+ cv.Mat.t Mat
349
+ cv.Mat.inv Mat
350
+ int method DECOMP_LU
351
+ cv.Mat.mul Mat
352
+ Mat m
353
+ double scale 1
354
+ cv.Mat.cross Mat
355
+ Mat m
356
+ cv.Mat.dot double
357
+ Mat m
358
+ cv.Mat.zeros Mat /S
359
+ int rows
360
+ int cols
361
+ int type
362
+ cv.Mat.zeros Mat /S
363
+ Size size
364
+ int type
365
+ cv.Mat.ones Mat /S
366
+ int rows
367
+ int cols
368
+ int type
369
+ cv.Mat.ones Mat /S
370
+ Size size
371
+ int type
372
+ cv.Mat.eye Mat /S
373
+ int rows
374
+ int cols
375
+ int type
376
+ cv.Mat.eye Mat /S
377
+ Size size
378
+ int type
379
+ cv.Mat.create void
380
+ int rows
381
+ int cols
382
+ int type
383
+ cv.Mat.create void
384
+ Size size
385
+ int type
386
+ cv.Mat.isContinuous bool
387
+ cv.Mat.isSubmatrix bool
388
+ cv.Mat.elemSize size_t
389
+ cv.Mat.elemSize1 size_t
390
+ cv.Mat.size Size
391
+ cv.Mat.type int
392
+ cv.Mat.depth int
393
+ cv.Mat.channels int
394
+ cv.Mat.step1 size_t
395
+ int i 0
396
+ cv.Mat.empty bool
397
+ cv.Mat.total size_t
398
+ cv.Mat.checkVector int
399
+ int elemChannels
400
+ int depth -1
401
+ bool requireContinuous true
402
+ cv.Mat.ptr uchar*
403
+ int i0 0
404
+ cv.Mat.ptr uchar*
405
+ int i0
406
+ int i1
407
+ cv.Mat.ptr uchar*
408
+ int i0
409
+ int i1
410
+ int i2
411
+ cv.Mat.operator () Mat =block
412
+ Rect rect
413
+ const cv.Mat.MAGIC_VAL 0x42FF0000
414
+ const cv.Mat.AUTO_STEP 0
415
+ const cv.Mat.CONTINUOUS_FLAG CV_MAT_CONT_FLAG
416
+ const cv.Mat.SUBMATRIX_FLAG CV_SUBMAT_FLAG
417
+ const cv.Mat.MAGIC_MASK 0xFFFF0000
418
+ const cv.Mat.TYPE_MASK 0x00000FFF
419
+ const cv.Mat.DEPTH_MASK 7
420
+ class cv.RNG
421
+ uint64 state
422
+ cv.RNG.RNG
423
+ cv.RNG.RNG
424
+ uint64 state
425
+ cv.RNG.uniform int
426
+ int a
427
+ int b
428
+ cv.RNG.uniform float
429
+ float a
430
+ float b
431
+ cv.RNG.uniform double
432
+ double a
433
+ double b
434
+ cv.RNG.fill void
435
+ Mat mat /IO
436
+ int distType
437
+ Mat a
438
+ Mat b
439
+ bool saturateRange false
440
+ cv.RNG.gaussian double
441
+ double sigma
442
+