-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathNativeMethods_calib3d.cs
More file actions
529 lines (478 loc) · 29.4 KB
/
Copy pathNativeMethods_calib3d.cs
File metadata and controls
529 lines (478 loc) · 29.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
using System.Runtime.InteropServices;
#pragma warning disable 1591
#pragma warning disable CA1401 // P/Invokes should not be visible
#pragma warning disable IDE1006 // Naming style
namespace OpenCvSharp.Internal;
// ReSharper disable InconsistentNaming
static partial class NativeMethods
{
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_Rodrigues(
IntPtr src, IntPtr dst, IntPtr jacobian);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findHomography_InputArray(
IntPtr srcPoints, IntPtr dstPoints,
int method, double ransacReprojThreshold, IntPtr mask,
int maxIters, double confidence,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findHomography_vector(
Point2d[] srcPoints, int srcPointsLength,
Point2d[] dstPoints, int dstPointsLength, int method, double ransacReprojThreshold, IntPtr mask,
int maxIters, double confidence,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findHomography_UsacParams(
IntPtr srcPoints, IntPtr dstPoints, IntPtr mask, ref WUsacParams @params,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_RQDecomp3x3_InputArray(
IntPtr src, IntPtr mtxR,
IntPtr mtxQ, IntPtr qx, IntPtr qy, IntPtr qz, out Vec3d outVal);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_RQDecomp3x3_Mat(
IntPtr src, IntPtr mtxR, IntPtr mtxQ,
IntPtr qx, IntPtr qy, IntPtr qz, out Vec3d outVal);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_decomposeProjectionMatrix_InputArray(
IntPtr projMatrix, IntPtr cameraMatrix, IntPtr rotMatrix, IntPtr transVect,
IntPtr rotMatrixX, IntPtr rotMatrixY, IntPtr rotMatrixZ, IntPtr eulerAngles);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_decomposeProjectionMatrix_Mat(
IntPtr projMatrix, IntPtr cameraMatrix, IntPtr rotMatrix, IntPtr transVect,
IntPtr rotMatrixX, IntPtr rotMatrixY, IntPtr rotMatrixZ, IntPtr eulerAngles);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_matMulDeriv(
IntPtr a, IntPtr b, IntPtr dABdA, IntPtr dABdB);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_composeRT_InputArray(
IntPtr rvec1, IntPtr tvec1, IntPtr rvec2, IntPtr tvec2, IntPtr rvec3, IntPtr tvec3,
IntPtr dr3dr1, IntPtr dr3dt1, IntPtr dr3dr2, IntPtr dr3dt2,
IntPtr dt3dr1, IntPtr dt3dt1, IntPtr dt3dr2, IntPtr dt3dt2);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_composeRT_Mat(
IntPtr rvec1, IntPtr tvec1, IntPtr rvec2, IntPtr tvec2, IntPtr rvec3, IntPtr tvec3,
IntPtr dr3dr1, IntPtr dr3dt1, IntPtr dr3dr2, IntPtr dr3dt2,
IntPtr dt3dr1, IntPtr dt3dt1, IntPtr dt3dr2, IntPtr dt3dt2);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_projectPoints_InputArray(
IntPtr objectPoints, IntPtr rvec, IntPtr tvec, IntPtr cameraMatrix, IntPtr distCoeffs,
IntPtr imagePoints, IntPtr jacobian, double aspectRatio);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_projectPoints_Mat(
IntPtr objectPoints, IntPtr rvec, IntPtr tvec, IntPtr cameraMatrix, IntPtr distCoeffs,
IntPtr imagePoints, IntPtr jacobian, double aspectRatio);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_solvePnP_InputArray(
IntPtr selfectPoints, IntPtr imagePoints, IntPtr cameraMatrix,
IntPtr distCoeffs, IntPtr rvec, IntPtr tvec, int useExtrinsicGuess, int flags);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_solvePnP_vector(
Point3f[] objectPoints, int objectPointsLength,
Point2f[] imagePoints, int imagePointsLength,
double* cameraMatrix, double[]? distCoeffs, int distCoeffsLength,
[Out] double[] rvec, [Out] double[] tvec, int useExtrinsicGuess, int flags);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_solvePnPRansac_InputArray(
IntPtr objectPoints, IntPtr imagePoints,
IntPtr cameraMatrix, IntPtr distCoeffs, IntPtr rvec, IntPtr tvec,
int useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence,
IntPtr inliers, int flags);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_solvePnPRansac_vector(
Point3f[] objectPoints, int objectPointsLength,
Point2f[] imagePoints, int imagePointsLength,
double* cameraMatrix, double[]? distCoeffs, int distCoeffsLength,
[Out] double[] rvec, [Out] double[] tvec, int useExtrinsicGuess, int iterationsCount, float reprojectionError,
double confidence, IntPtr inliers, int flags);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_initCameraMatrix2D_Mat(
IntPtr[] objectPoints, int objectPointsLength,
IntPtr[] imagePoints, int imagePointsLength,
Size imageSize, double aspectRatio, out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_initCameraMatrix2D_array(
IntPtr[] objectPoints, int opSize1, int[] opSize2,
IntPtr[] imagePoints, int ipSize1, int[] ipSize2,
Size imageSize, double aspectRatio, out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findChessboardCorners_InputArray(
IntPtr image, Size patternSize, IntPtr corners, int flags, out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findChessboardCorners_vector(
IntPtr image, Size patternSize, IntPtr corners, int flags, out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_checkChessboard(
IntPtr img, Size size, out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findChessboardCornersSB_OutputArray(
IntPtr image, Size patternSize, IntPtr corners, int flags, out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findChessboardCornersSB_vector(
IntPtr image, Size patternSize, IntPtr corners, int flags, out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_find4QuadCornerSubpix_InputArray(
IntPtr img, IntPtr corners, Size regionSize, out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_find4QuadCornerSubpix_vector(
IntPtr img, IntPtr corners, Size regionSize, out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_drawChessboardCorners_InputArray(
IntPtr image, Size patternSize, IntPtr corners, int patternWasFound);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_drawChessboardCorners_array(
IntPtr image, Size patternSize, [In] Point2f[] corners, int cornersLength, int patternWasFound);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_drawFrameAxes(
IntPtr image, IntPtr cameraMatrix, IntPtr distCoeffs,
IntPtr rvec, IntPtr tvec, float length, int thickness);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findCirclesGrid_InputArray(
IntPtr image, Size patternSize,
IntPtr centers, int flags, IntPtr blobDetector,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findCirclesGrid_vector(
IntPtr image, Size patternSize,
IntPtr centers, int flags, IntPtr blobDetector,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_calibrateCamera_InputArray(
IntPtr[] objectPoints, int objectPointsSize,
IntPtr[] imagePoints, int imagePointsSize,
Size imageSize,
IntPtr cameraMatrix,IntPtr distCoeffs,
IntPtr rvecs, IntPtr tvecs,
int flags, TermCriteria criteria,
out double returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_calibrateCamera_vector(
IntPtr[] objectPoints, int opSize1, int[] opSize2,
IntPtr[] imagePoints, int ipSize1, int[] ipSize2,
Size imageSize,
double* cameraMatrix,
[In, Out] double[] distCoeffs, int distCoeffsSize,
IntPtr rvecs, IntPtr tvecs,
int flags, TermCriteria criteria,
out double returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_calibrationMatrixValues_InputArray(
IntPtr cameraMatrix,
Size imageSize, double apertureWidth, double apertureHeight, out double fovx, out double fovy,
out double focalLength, out Point2d principalPoint, out double aspectRatio);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_calibrationMatrixValues_array(
double* cameraMatrix, Size imageSize,
double apertureWidth, double apertureHeight, out double fovx, out double fovy, out double focalLength,
out Point2d principalPoint, out double aspectRatio);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_stereoCalibrate_InputArray(
IntPtr[] objectPoints, int opSize,
IntPtr[] imagePoints1, int ip1Size,
IntPtr[] imagePoints2, int ip2Size,
IntPtr cameraMatrix1,
IntPtr distCoeffs1,
IntPtr cameraMatrix2,
IntPtr distCoeffs2,
Size imageSize,
IntPtr R, IntPtr T,
IntPtr E, IntPtr F,
int flags, TermCriteria criteria,
out double returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_stereoCalibrate_Mat(
IntPtr[] objectPoints, int opSize,
IntPtr[] imagePoints1, int ip1Size,
IntPtr[] imagePoints2, int ip2Size,
IntPtr cameraMatrix1,
IntPtr distCoeffs1,
IntPtr cameraMatrix2,
IntPtr distCoeffs2,
Size imageSize,
IntPtr R, IntPtr T,
IntPtr E, IntPtr F,
int flags, TermCriteria criteria,
out double returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_stereoCalibrate_array(
IntPtr[] objectPoints, int opSize1, int[] opSizes2,
IntPtr[] imagePoints1, int ip1Size1, int[] ip1Sizes2,
IntPtr[] imagePoints2, int ip2Size1, int[] ip2Sizes2,
double* cameraMatrix1,
[In, Out] double[] distCoeffs1, int dc1Size,
double* cameraMatrix2,
[In, Out] double[] distCoeffs2, int dc2Size,
Size imageSize,
IntPtr R, IntPtr T,
IntPtr E, IntPtr F,
int flags, TermCriteria criteria,
out double returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_stereoRectify_InputArray(
IntPtr cameraMatrix1, IntPtr distCoeffs1,
IntPtr cameraMatrix2, IntPtr distCoeffs2,
Size imageSize, IntPtr R, IntPtr T,
IntPtr R1, IntPtr R2,
IntPtr P1, IntPtr P2,
IntPtr Q, int flags,
double alpha, Size newImageSize,
out Rect validPixROI1, out Rect validPixROI2);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_stereoRectify_array(
double* cameraMatrix1,
double[] distCoeffs1, int dc1Size,
double* cameraMatrix2,
double[] distCoeffs2, int dc2Size,
Size imageSize,
double* R, double[] T,
double* R1, double* R2, double* P1, double* P2,
double* Q, int flags, double alpha, Size newImageSize,
out Rect validPixROI1, out Rect validPixROI2);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_stereoRectifyUncalibrated_InputArray(
IntPtr points1, IntPtr points2,
IntPtr F, Size imgSize,
IntPtr H1, IntPtr H2,
double threshold,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_stereoRectifyUncalibrated_array(
Point2d[] points1, int points1Size,
Point2d[] points2, int points2Size,
double* F, Size imgSize,
double* H1, double* H2,
double threshold,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_rectify3Collinear_InputArray(
IntPtr cameraMatrix1, IntPtr distCoeffs1,
IntPtr cameraMatrix2, IntPtr distCoeffs2,
IntPtr cameraMatrix3, IntPtr distCoeffs3,
IntPtr[] imgpt1, int imgpt1Size,
IntPtr[] imgpt3, int imgpt3Size,
Size imageSize, IntPtr R12, IntPtr T12,
IntPtr R13, IntPtr T13,
IntPtr R1, IntPtr R2, IntPtr R3,
IntPtr P1, IntPtr P2, IntPtr P3,
IntPtr Q, double alpha, Size newImgSize,
out Rect roi1, out Rect roi2, int flags,
out float returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_getOptimalNewCameraMatrix_InputArray(
IntPtr cameraMatrix, IntPtr distCoeffs,
Size imageSize, double alpha, Size newImgSize,
out Rect validPixROI, int centerPrincipalPoint,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_getOptimalNewCameraMatrix_array(
double* cameraMatrix,
[In] double[] distCoeffs, int distCoeffsSize,
Size imageSize, double alpha, Size newImgSize,
out Rect validPixROI, int centerPrincipalPoint,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_calibrateHandEye(
IntPtr[] R_gripper2baseMats, int R_gripper2baseMatsSize,
IntPtr[] t_gripper2baseMats, int t_gripper2baseMatsSize,
IntPtr[] R_target2camMats, int R_target2camMatsSize,
IntPtr[] t_target2camMats, int t_target2camMatsSize,
IntPtr R_cam2gripper,
IntPtr t_cam2gripper,
int method);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_calibrateRobotWorldHandEye_OutputArray(
IntPtr[] R_world2camMats, int R_world2camMatsSize,
IntPtr[] t_world2camMats, int t_world2camMatsSize,
IntPtr[] R_base2gripperMats, int R_base2gripperMatsSize,
IntPtr[] t_base2gripperMats, int t_base2gripperMatsSize,
IntPtr R_base2world, IntPtr t_base2world,
IntPtr R_gripper2cam, IntPtr t_gripper2cam,
int method);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_calibrateRobotWorldHandEye_Pointer(
IntPtr[] R_world2camMats, int R_world2camMatsSize,
IntPtr[] t_world2camMats, int t_world2camMatsSize,
IntPtr[] R_base2gripperMats, int R_base2gripperMatsSize,
IntPtr[] t_base2gripperMats, int t_base2gripperMatsSize,
[MarshalAs(UnmanagedType.LPArray), Out] double[,] R_base2world,
[MarshalAs(UnmanagedType.LPArray), Out] double[] t_base2world,
[MarshalAs(UnmanagedType.LPArray), Out] double[,] R_gripper2cam,
[MarshalAs(UnmanagedType.LPArray), Out] double[] t_gripper2cam,
int method);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_convertPointsToHomogeneous_InputArray(
IntPtr src, IntPtr dst);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_convertPointsToHomogeneous_array1(
[In] Vec2f[] src, [In, Out] Vec3f[] dst, int length);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_convertPointsToHomogeneous_array2(
[In] Vec3f[] src, [In, Out] Vec4f[] dst, int length);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_convertPointsFromHomogeneous_InputArray(
IntPtr src, IntPtr dst);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_convertPointsFromHomogeneous_array1(
[In] Vec3f[] src, [In, Out] Vec2f[] dst, int length);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_convertPointsFromHomogeneous_array2(
[In] Vec4f[] src, [In, Out] Vec3f[] dst, int length);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_convertPointsHomogeneous(
IntPtr src, IntPtr dst);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findFundamentalMat_InputArray(
IntPtr points1, IntPtr points2,
int method, double param1, double param2, IntPtr mask,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findFundamentalMat_arrayF64(
Point2d[] points1, int points1Size,
Point2d[] points2, int points2Size,
int method, double param1, double param2, IntPtr mask,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findFundamentalMat_arrayF32(
Point2f[] points1, int points1Size,
Point2f[] points2, int points2Size,
int method, double param1, double param2, IntPtr mask,
out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_computeCorrespondEpilines_InputArray(
IntPtr points, int whichImage, IntPtr F, IntPtr lines);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_computeCorrespondEpilines_array2d(
[In] Point2d[] points, int pointsSize,
int whichImage, double* F, [In, Out] Point3f[] lines);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_computeCorrespondEpilines_array3d(
[In] Point3d[] points, int pointsSize,
int whichImage, double* F, [In, Out] Point3f[] lines);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_triangulatePoints_InputArray(
IntPtr projMatr1, IntPtr projMatr2,
IntPtr projPoints1, IntPtr projPoints2,
IntPtr points4D);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_triangulatePoints_array(
double* projMatr1, double* projMatr2,
[In] Point2d[] projPoints1, int projPoints1Size,
[In] Point2d[] projPoints2, int projPoints2Size,
[In, Out] Vec4d[] points4D);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_correctMatches_InputArray(
IntPtr F, IntPtr points1, IntPtr points2,
IntPtr newPoints1, IntPtr newPoints2);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_correctMatches_array(
double* F, Point2d[] points1, int points1Size,
Point2d[] points2, int points2Size,
Point2d[] newPoints1, Point2d[] newPoints2);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_filterSpeckles(
IntPtr img, double newVal, int maxSpeckleSize,
double maxDiff, IntPtr buf);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_getValidDisparityROI(
Rect roi1, Rect roi2,
int minDisparity, int numberOfDisparities, int SADWindowSize,
out Rect returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_validateDisparity(
IntPtr disparity, IntPtr cost,
int minDisparity, int numberOfDisparities, int disp12MaxDisp);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_reprojectImageTo3D(
IntPtr disparity, IntPtr _3dImage,
IntPtr Q, int handleMissingValues, int ddepth);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_estimateAffine3D(
IntPtr src, IntPtr dst,
IntPtr outVal, IntPtr inliers, double ransacThreshold, double confidence,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_sampsonDistance_InputArray(
IntPtr pt1, IntPtr pt2, IntPtr F, out double returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern unsafe ExceptionStatus calib3d_sampsonDistance_Point3d(
Point3d pt1, Point3d pt2, double* F, out double returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_estimateAffine2D(
IntPtr from, IntPtr to, IntPtr inliers,
int method, double ransacReprojThreshold,
ulong maxIters, double confidence, ulong refineIters, out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_estimateAffinePartial2D(
IntPtr from, IntPtr to, IntPtr inliers,
int method, double ransacReprojThreshold,
ulong maxIters, double confidence, ulong refineIters, out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_decomposeHomographyMat(
IntPtr H,
IntPtr K,
IntPtr rotations,
IntPtr translations,
IntPtr normals,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_filterHomographyDecompByVisibleRefpoints(
IntPtr rotations,
IntPtr normals,
IntPtr beforePoints,
IntPtr afterPoints,
IntPtr possibleSolutions,
IntPtr pointsMask);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_undistort(
IntPtr src, IntPtr dst,
IntPtr cameraMatrix, IntPtr distCoeffs, IntPtr newCameraMatrix);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_initUndistortRectifyMap(
IntPtr cameraMatrix, IntPtr distCoeffs,
IntPtr R, IntPtr newCameraMatrix,
Size size, MatType m1type, IntPtr map1, IntPtr map2);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_initWideAngleProjMap(
IntPtr cameraMatrix, IntPtr distCoeffs,
Size imageSize, int destImageWidth,
MatType m1type, IntPtr map1, IntPtr map2,
int projType, double alpha, out float returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_getDefaultNewCameraMatrix(
IntPtr cameraMatrix, Size imgsize, int centerPrincipalPoint, out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_undistortPoints(
IntPtr src, IntPtr dst,
IntPtr cameraMatrix, IntPtr distCoeffs,
IntPtr R, IntPtr P);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_undistortPointsIter(
IntPtr src, IntPtr dst,
IntPtr cameraMatrix, IntPtr distCoeffs,
IntPtr R, IntPtr P, TermCriteria criteria);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_recoverPose_InputArray1(
IntPtr E, IntPtr points1, IntPtr points2,
IntPtr cameraMatrix,
IntPtr R, IntPtr P, IntPtr mask,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_recoverPose_InputArray2(
IntPtr E, IntPtr points1, IntPtr points2,
IntPtr R, IntPtr P, double focal, Point2d pp, IntPtr mask,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_recoverPose_InputArray3(
IntPtr E, IntPtr points1, IntPtr points2,
IntPtr cameraMatrix,
IntPtr R, IntPtr P, double distanceTresh, IntPtr mask, IntPtr triangulatedPoints,
out int returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findEssentialMat_InputArray1(
IntPtr points1, IntPtr points2, IntPtr cameraMatrix,
int method, double prob, double threshold, IntPtr mask, out IntPtr returnValue);
[DllImport(DllExtern, CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern ExceptionStatus calib3d_findEssentialMat_InputArray2(
IntPtr points1, IntPtr points2, double focal, Point2d pp,
int method, double prob, double threshold, IntPtr mask, out IntPtr returnValue);
}