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
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
//! # Video Stabilization
//!
//! The video stabilization module contains a set of functions and classes that can be used to solve the
//! problem of video stabilization. There are a few methods implemented, most of them are described in
//! the papers [OF06](https://docs.opencv.org/3.4.8/d0/de3/citelist.html#CITEREF_OF06) and [G11](https://docs.opencv.org/3.4.8/d0/de3/citelist.html#CITEREF_G11) . However, there are some extensions and deviations from the original
//! paper methods.
//!
//! ### References
//!
//! 1. "Full-Frame Video Stabilization with Motion Inpainting"
//! Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaoou Tang, Senior Member, and Heung-Yeung Shum
//! 2. "Auto-Directed Video Stabilization with Robust L1 Optimal Camera Paths"
//! Matthias Grundmann, Vivek Kwatra, Irfan Essa
//! # Global Motion Estimation
//!
//! The video stabilization module contains a set of functions and classes for global motion estimation
//! between point clouds or between images. In the last case features are extracted and matched
//! internally. For the sake of convenience the motion estimation functions are wrapped into classes.
//! Both the functions and the classes are available.
//!
//! # Fast Marching Method
//!
//! The Fast Marching Method [Telea04](https://docs.opencv.org/3.4.8/d0/de3/citelist.html#CITEREF_Telea04) is used in of the video stabilization routines to do motion and
//! color inpainting. The method is implemented is a flexible way and it's made public for other users.
use std::os::raw::{c_char, c_void};
use libc::{ptrdiff_t, size_t};
use crate::{Error, Result, core, sys, types};
use crate::core::{_InputArrayTrait, _OutputArrayTrait};

pub const MM_AFFINE: i32 = 5;
pub const MM_HOMOGRAPHY: i32 = 6;
pub const MM_RIGID: i32 = 3;
pub const MM_ROTATION: i32 = 2;
pub const MM_SIMILARITY: i32 = 4;
pub const MM_TRANSLATION: i32 = 0;
pub const MM_TRANSLATION_AND_SCALE: i32 = 1;
pub const MM_UNKNOWN: i32 = 7;

pub fn calc_blurriness(frame: &core::Mat) -> Result<f32> {
    unsafe { sys::cv_videostab_calcBlurriness_Mat(frame.as_raw_Mat()) }.into_result()
}

pub fn calc_flow_mask(flow_x: &core::Mat, flow_y: &core::Mat, errors: &core::Mat, max_error: f32, mask0: &core::Mat, mask1: &core::Mat, flow_mask: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_videostab_calcFlowMask_Mat_Mat_Mat_float_Mat_Mat_Mat(flow_x.as_raw_Mat(), flow_y.as_raw_Mat(), errors.as_raw_Mat(), max_error, mask0.as_raw_Mat(), mask1.as_raw_Mat(), flow_mask.as_raw_Mat()) }.into_result()
}

pub fn complete_frame_according_to_flow(flow_mask: &core::Mat, flow_x: &core::Mat, flow_y: &core::Mat, frame1: &core::Mat, mask1: &core::Mat, dist_thresh: f32, frame0: &mut core::Mat, mask0: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_videostab_completeFrameAccordingToFlow_Mat_Mat_Mat_Mat_Mat_float_Mat_Mat(flow_mask.as_raw_Mat(), flow_x.as_raw_Mat(), flow_y.as_raw_Mat(), frame1.as_raw_Mat(), mask1.as_raw_Mat(), dist_thresh, frame0.as_raw_Mat(), mask0.as_raw_Mat()) }.into_result()
}

pub fn ensure_inclusion_constraint(m: &core::Mat, size: core::Size, trim_ratio: f32) -> Result<core::Mat> {
    unsafe { sys::cv_videostab_ensureInclusionConstraint_Mat_Size_float(m.as_raw_Mat(), size, trim_ratio) }.into_result().map(|ptr| core::Mat { ptr })
}

/// Estimates best global motion between two 2D point clouds in the least-squares sense.
///
///
/// Note: Works in-place and changes input point arrays.
///
/// ## Parameters
/// * points0: Source set of 2D points (32F).
/// * points1: Destination set of 2D points (32F).
/// * model: Motion model (up to MM_AFFINE).
/// * rmse: Final root-mean-square error.
/// ## Returns
/// 3x3 2D transformation matrix (32F).
///
/// ## C++ default parameters
/// * model: MM_AFFINE
/// * rmse: 0
pub fn estimate_global_motion_least_squares(points0: &mut dyn core::ToInputOutputArray, points1: &mut dyn core::ToInputOutputArray, model: i32, rmse: &mut f32) -> Result<core::Mat> {
    input_output_array_arg!(points0);
    input_output_array_arg!(points1);
    unsafe { sys::cv_videostab_estimateGlobalMotionLeastSquares__InputOutputArray__InputOutputArray_int_float_X(points0.as_raw__InputOutputArray(), points1.as_raw__InputOutputArray(), model, rmse) }.into_result().map(|ptr| core::Mat { ptr })
}

pub fn estimate_optimal_trim_ratio(m: &core::Mat, size: core::Size) -> Result<f32> {
    unsafe { sys::cv_videostab_estimateOptimalTrimRatio_Mat_Size(m.as_raw_Mat(), size) }.into_result()
}

/// Computes motion between two frames assuming that all the intermediate motions are known.
///
/// ## Parameters
/// * from: Source frame index.
/// * to: Destination frame index.
/// * motions: Pair-wise motions. motions[i] denotes motion from the frame i to the frame i+1
/// ## Returns
/// Motion from the Source frame to the Destination frame.
pub fn get_motion(from: i32, to: i32, motions: &types::VectorOfMat) -> Result<core::Mat> {
    unsafe { sys::cv_videostab_getMotion_int_int_VectorOfMat(from, to, motions.as_raw_VectorOfMat()) }.into_result().map(|ptr| core::Mat { ptr })
}

// boxed class cv::videostab::ColorAverageInpainter
pub struct ColorAverageInpainter {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for ColorAverageInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_ColorAverageInpainter_delete(self.ptr) };
    }
}

impl ColorAverageInpainter {
    #[inline(always)] pub fn as_raw_ColorAverageInpainter(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for ColorAverageInpainter {}

impl crate::videostab::InpainterBase for ColorAverageInpainter {
    #[inline(always)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl ColorAverageInpainter {
    pub fn inpaint(&mut self, idx: i32, frame: &mut core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_ColorAverageInpainter_inpaint_int_Mat_Mat(self.as_raw_ColorAverageInpainter(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::ColorInpainter
pub struct ColorInpainter {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for ColorInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_ColorInpainter_delete(self.ptr) };
    }
}

impl ColorInpainter {
    #[inline(always)] pub fn as_raw_ColorInpainter(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for ColorInpainter {}

impl crate::videostab::InpainterBase for ColorInpainter {
    #[inline(always)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl ColorInpainter {
    ///
    /// ## C++ default parameters
    /// * method: INPAINT_TELEA
    /// * radius: 2.
    pub fn new(method: i32, radius: f64) -> Result<crate::videostab::ColorInpainter> {
        unsafe { sys::cv_videostab_ColorInpainter_ColorInpainter_int_double(method, radius) }.into_result().map(|ptr| crate::videostab::ColorInpainter { ptr })
    }
    
    pub fn inpaint(&mut self, idx: i32, frame: &mut core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_ColorInpainter_inpaint_int_Mat_Mat(self.as_raw_ColorInpainter(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::ConsistentMosaicInpainter
pub struct ConsistentMosaicInpainter {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for ConsistentMosaicInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_ConsistentMosaicInpainter_delete(self.ptr) };
    }
}

impl ConsistentMosaicInpainter {
    #[inline(always)] pub fn as_raw_ConsistentMosaicInpainter(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for ConsistentMosaicInpainter {}

impl crate::videostab::InpainterBase for ConsistentMosaicInpainter {
    #[inline(always)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl ConsistentMosaicInpainter {
    pub fn default() -> Result<crate::videostab::ConsistentMosaicInpainter> {
        unsafe { sys::cv_videostab_ConsistentMosaicInpainter_ConsistentMosaicInpainter() }.into_result().map(|ptr| crate::videostab::ConsistentMosaicInpainter { ptr })
    }
    
    pub fn set_stdev_thresh(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_ConsistentMosaicInpainter_setStdevThresh_float(self.as_raw_ConsistentMosaicInpainter(), val) }.into_result()
    }
    
    pub fn stdev_thresh(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_ConsistentMosaicInpainter_stdevThresh_const(self.as_raw_ConsistentMosaicInpainter()) }.into_result()
    }
    
    pub fn inpaint(&mut self, idx: i32, frame: &mut core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_ConsistentMosaicInpainter_inpaint_int_Mat_Mat(self.as_raw_ConsistentMosaicInpainter(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::DeblurerBase
pub trait DeblurerBase {
    #[inline(always)] fn as_raw_DeblurerBase(&self) -> *mut c_void;
    fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_DeblurerBase_setRadius_int(self.as_raw_DeblurerBase(), val) }.into_result()
    }
    
    fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_DeblurerBase_radius_const(self.as_raw_DeblurerBase()) }.into_result()
    }
    
    fn deblur(&mut self, idx: i32, frame: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_DeblurerBase_deblur_int_Mat(self.as_raw_DeblurerBase(), idx, frame.as_raw_Mat()) }.into_result()
    }
    
    fn set_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_DeblurerBase_setFrames_VectorOfMat(self.as_raw_DeblurerBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn frames(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_DeblurerBase_frames_const(self.as_raw_DeblurerBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
    fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_DeblurerBase_setMotions_VectorOfMat(self.as_raw_DeblurerBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_DeblurerBase_motions_const(self.as_raw_DeblurerBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
    fn set_blurriness_rates(&mut self, val: &types::VectorOffloat) -> Result<()> {
        unsafe { sys::cv_videostab_DeblurerBase_setBlurrinessRates_VectorOffloat(self.as_raw_DeblurerBase(), val.as_raw_VectorOffloat()) }.into_result()
    }
    
    fn blurriness_rates(&self) -> Result<types::VectorOffloat> {
        unsafe { sys::cv_videostab_DeblurerBase_blurrinessRates_const(self.as_raw_DeblurerBase()) }.into_result().map(|ptr| types::VectorOffloat { ptr })
    }
    
}

// boxed class cv::videostab::FastMarchingMethod
/// Describes the Fast Marching Method implementation.
///
/// See http://iwi.eldoc.ub.rug.nl/FILES/root/2004/JGraphToolsTelea/2004JGraphToolsTelea.pdf
pub struct FastMarchingMethod {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for FastMarchingMethod {
    fn drop(&mut self) {
        unsafe { sys::cv_FastMarchingMethod_delete(self.ptr) };
    }
}

impl FastMarchingMethod {
    #[inline(always)] pub fn as_raw_FastMarchingMethod(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for FastMarchingMethod {}

impl FastMarchingMethod {
    pub fn default() -> Result<crate::videostab::FastMarchingMethod> {
        unsafe { sys::cv_videostab_FastMarchingMethod_FastMarchingMethod() }.into_result().map(|ptr| crate::videostab::FastMarchingMethod { ptr })
    }
    
    /// ## Returns
    /// Distance map that's created during working of the method.
    pub fn distance_map(&self) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_FastMarchingMethod_distanceMap_const(self.as_raw_FastMarchingMethod()) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::FromFileMotionReader
pub struct FromFileMotionReader {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for FromFileMotionReader {
    fn drop(&mut self) {
        unsafe { sys::cv_FromFileMotionReader_delete(self.ptr) };
    }
}

impl FromFileMotionReader {
    #[inline(always)] pub fn as_raw_FromFileMotionReader(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for FromFileMotionReader {}

impl crate::videostab::ImageMotionEstimatorBase for FromFileMotionReader {
    #[inline(always)] fn as_raw_ImageMotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl FromFileMotionReader {
    pub fn new(path: &str) -> Result<crate::videostab::FromFileMotionReader> {
        string_arg!(path);
        unsafe { sys::cv_videostab_FromFileMotionReader_FromFileMotionReader_String(path.as_ptr()) }.into_result().map(|ptr| crate::videostab::FromFileMotionReader { ptr })
    }
    
    ///
    /// ## C++ default parameters
    /// * ok: 0
    pub fn estimate(&mut self, frame0: &core::Mat, frame1: &core::Mat, ok: &mut bool) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_FromFileMotionReader_estimate_Mat_Mat_bool_X(self.as_raw_FromFileMotionReader(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::GaussianMotionFilter
pub struct GaussianMotionFilter {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for GaussianMotionFilter {
    fn drop(&mut self) {
        unsafe { sys::cv_GaussianMotionFilter_delete(self.ptr) };
    }
}

impl GaussianMotionFilter {
    #[inline(always)] pub fn as_raw_GaussianMotionFilter(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for GaussianMotionFilter {}

impl crate::videostab::IMotionStabilizer for GaussianMotionFilter {
    #[inline(always)] fn as_raw_IMotionStabilizer(&self) -> *mut c_void { self.ptr }
}

impl crate::videostab::MotionFilterBase for GaussianMotionFilter {
    #[inline(always)] fn as_raw_MotionFilterBase(&self) -> *mut c_void { self.ptr }
}

impl GaussianMotionFilter {
    ///
    /// ## C++ default parameters
    /// * radius: 15
    /// * stdev: -1.f
    pub fn new(radius: i32, stdev: f32) -> Result<crate::videostab::GaussianMotionFilter> {
        unsafe { sys::cv_videostab_GaussianMotionFilter_GaussianMotionFilter_int_float(radius, stdev) }.into_result().map(|ptr| crate::videostab::GaussianMotionFilter { ptr })
    }
    
    ///
    /// ## C++ default parameters
    /// * stdev: -1.f
    pub fn set_params(&mut self, radius: i32, stdev: f32) -> Result<()> {
        unsafe { sys::cv_videostab_GaussianMotionFilter_setParams_int_float(self.as_raw_GaussianMotionFilter(), radius, stdev) }.into_result()
    }
    
    pub fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_GaussianMotionFilter_radius_const(self.as_raw_GaussianMotionFilter()) }.into_result()
    }
    
    pub fn stdev(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_GaussianMotionFilter_stdev_const(self.as_raw_GaussianMotionFilter()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::IDenseOptFlowEstimator
pub trait IDenseOptFlowEstimator {
    #[inline(always)] fn as_raw_IDenseOptFlowEstimator(&self) -> *mut c_void;
    fn run(&mut self, frame0: &dyn core::ToInputArray, frame1: &dyn core::ToInputArray, flow_x: &mut dyn core::ToInputOutputArray, flow_y: &mut dyn core::ToInputOutputArray, errors: &mut dyn core::ToOutputArray) -> Result<()> {
        input_array_arg!(frame0);
        input_array_arg!(frame1);
        input_output_array_arg!(flow_x);
        input_output_array_arg!(flow_y);
        output_array_arg!(errors);
        unsafe { sys::cv_videostab_IDenseOptFlowEstimator_run__InputArray__InputArray__InputOutputArray__InputOutputArray__OutputArray(self.as_raw_IDenseOptFlowEstimator(), frame0.as_raw__InputArray(), frame1.as_raw__InputArray(), flow_x.as_raw__InputOutputArray(), flow_y.as_raw__InputOutputArray(), errors.as_raw__OutputArray()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::IFrameSource
pub trait IFrameSource {
    #[inline(always)] fn as_raw_IFrameSource(&self) -> *mut c_void;
    fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_videostab_IFrameSource_reset(self.as_raw_IFrameSource()) }.into_result()
    }
    
    fn next_frame(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_IFrameSource_nextFrame(self.as_raw_IFrameSource()) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// Generating impl for trait crate::videostab::ILog
pub trait ILog {
    #[inline(always)] fn as_raw_ILog(&self) -> *mut c_void;
}

// Generating impl for trait crate::videostab::IMotionStabilizer
pub trait IMotionStabilizer {
    #[inline(always)] fn as_raw_IMotionStabilizer(&self) -> *mut c_void;
}

// Generating impl for trait crate::videostab::IOutlierRejector
pub trait IOutlierRejector {
    #[inline(always)] fn as_raw_IOutlierRejector(&self) -> *mut c_void;
    fn process(&mut self, frame_size: core::Size, points0: &dyn core::ToInputArray, points1: &dyn core::ToInputArray, mask: &mut dyn core::ToOutputArray) -> Result<()> {
        input_array_arg!(points0);
        input_array_arg!(points1);
        output_array_arg!(mask);
        unsafe { sys::cv_videostab_IOutlierRejector_process_Size__InputArray__InputArray__OutputArray(self.as_raw_IOutlierRejector(), frame_size, points0.as_raw__InputArray(), points1.as_raw__InputArray(), mask.as_raw__OutputArray()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::ISparseOptFlowEstimator
pub trait ISparseOptFlowEstimator {
    #[inline(always)] fn as_raw_ISparseOptFlowEstimator(&self) -> *mut c_void;
    fn run(&mut self, frame0: &dyn core::ToInputArray, frame1: &dyn core::ToInputArray, points0: &dyn core::ToInputArray, points1: &mut dyn core::ToInputOutputArray, status: &mut dyn core::ToOutputArray, errors: &mut dyn core::ToOutputArray) -> Result<()> {
        input_array_arg!(frame0);
        input_array_arg!(frame1);
        input_array_arg!(points0);
        input_output_array_arg!(points1);
        output_array_arg!(status);
        output_array_arg!(errors);
        unsafe { sys::cv_videostab_ISparseOptFlowEstimator_run__InputArray__InputArray__InputArray__InputOutputArray__OutputArray__OutputArray(self.as_raw_ISparseOptFlowEstimator(), frame0.as_raw__InputArray(), frame1.as_raw__InputArray(), points0.as_raw__InputArray(), points1.as_raw__InputOutputArray(), status.as_raw__OutputArray(), errors.as_raw__OutputArray()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::ImageMotionEstimatorBase
/// Base class for global 2D motion estimation methods which take frames as input.
pub trait ImageMotionEstimatorBase {
    #[inline(always)] fn as_raw_ImageMotionEstimatorBase(&self) -> *mut c_void;
    ///
    /// ## C++ default parameters
    /// * ok: 0
    fn estimate(&mut self, frame0: &core::Mat, frame1: &core::Mat, ok: &mut bool) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_ImageMotionEstimatorBase_estimate_Mat_Mat_bool_X(self.as_raw_ImageMotionEstimatorBase(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// Generating impl for trait crate::videostab::InpainterBase
pub trait InpainterBase {
    #[inline(always)] fn as_raw_InpainterBase(&self) -> *mut c_void;
    fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_InpainterBase_setRadius_int(self.as_raw_InpainterBase(), val) }.into_result()
    }
    
    fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_InpainterBase_radius_const(self.as_raw_InpainterBase()) }.into_result()
    }
    
    fn inpaint(&mut self, idx: i32, frame: &mut core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_InpainterBase_inpaint_int_Mat_Mat(self.as_raw_InpainterBase(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
    fn set_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpainterBase_setFrames_VectorOfMat(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn frames(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_InpainterBase_frames_const(self.as_raw_InpainterBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
    fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpainterBase_setMotions_VectorOfMat(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_InpainterBase_motions_const(self.as_raw_InpainterBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
    fn set_stabilized_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpainterBase_setStabilizedFrames_VectorOfMat(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn stabilized_frames(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_InpainterBase_stabilizedFrames_const(self.as_raw_InpainterBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
    fn set_stabilization_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpainterBase_setStabilizationMotions_VectorOfMat(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn stabilization_motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_InpainterBase_stabilizationMotions_const(self.as_raw_InpainterBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
}

// boxed class cv::videostab::InpaintingPipeline
pub struct InpaintingPipeline {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for InpaintingPipeline {
    fn drop(&mut self) {
        unsafe { sys::cv_InpaintingPipeline_delete(self.ptr) };
    }
}

impl InpaintingPipeline {
    #[inline(always)] pub fn as_raw_InpaintingPipeline(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for InpaintingPipeline {}

impl crate::videostab::InpainterBase for InpaintingPipeline {
    #[inline(always)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl InpaintingPipeline {
    pub fn push_back(&mut self, inpainter: &types::PtrOfInpainterBase) -> Result<()> {
        unsafe { sys::cv_videostab_InpaintingPipeline_pushBack_PtrOfInpainterBase(self.as_raw_InpaintingPipeline(), inpainter.as_raw_PtrOfInpainterBase()) }.into_result()
    }
    
    pub fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_videostab_InpaintingPipeline_empty_const(self.as_raw_InpaintingPipeline()) }.into_result()
    }
    
    pub fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_InpaintingPipeline_setRadius_int(self.as_raw_InpaintingPipeline(), val) }.into_result()
    }
    
    pub fn set_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpaintingPipeline_setFrames_VectorOfMat(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    pub fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpaintingPipeline_setMotions_VectorOfMat(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    pub fn set_stabilized_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpaintingPipeline_setStabilizedFrames_VectorOfMat(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    pub fn set_stabilization_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_InpaintingPipeline_setStabilizationMotions_VectorOfMat(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    pub fn inpaint(&mut self, idx: i32, frame: &mut core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_InpaintingPipeline_inpaint_int_Mat_Mat(self.as_raw_InpaintingPipeline(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::KeypointBasedMotionEstimator
/// Describes a global 2D motion estimation method which uses keypoints detection and optical flow for
/// matching.
pub struct KeypointBasedMotionEstimator {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for KeypointBasedMotionEstimator {
    fn drop(&mut self) {
        unsafe { sys::cv_KeypointBasedMotionEstimator_delete(self.ptr) };
    }
}

impl KeypointBasedMotionEstimator {
    #[inline(always)] pub fn as_raw_KeypointBasedMotionEstimator(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for KeypointBasedMotionEstimator {}

impl crate::videostab::ImageMotionEstimatorBase for KeypointBasedMotionEstimator {
    #[inline(always)] fn as_raw_ImageMotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl KeypointBasedMotionEstimator {
    pub fn new(estimator: &types::PtrOfMotionEstimatorBase) -> Result<crate::videostab::KeypointBasedMotionEstimator> {
        unsafe { sys::cv_videostab_KeypointBasedMotionEstimator_KeypointBasedMotionEstimator_PtrOfMotionEstimatorBase(estimator.as_raw_PtrOfMotionEstimatorBase()) }.into_result().map(|ptr| crate::videostab::KeypointBasedMotionEstimator { ptr })
    }
    
    pub fn set_detector(&mut self, val: &types::PtrOfFeature2D) -> Result<()> {
        unsafe { sys::cv_videostab_KeypointBasedMotionEstimator_setDetector_PtrOfFeature2D(self.as_raw_KeypointBasedMotionEstimator(), val.as_raw_PtrOfFeature2D()) }.into_result()
    }
    
    pub fn detector(&self) -> Result<types::PtrOfFeature2D> {
        unsafe { sys::cv_videostab_KeypointBasedMotionEstimator_detector_const(self.as_raw_KeypointBasedMotionEstimator()) }.into_result().map(|ptr| types::PtrOfFeature2D { ptr })
    }
    
    ///
    /// ## C++ default parameters
    /// * ok: 0
    pub fn estimate_mat(&mut self, frame0: &core::Mat, frame1: &core::Mat, ok: &mut bool) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_KeypointBasedMotionEstimator_estimate_Mat_Mat_bool_X(self.as_raw_KeypointBasedMotionEstimator(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
    ///
    /// ## C++ default parameters
    /// * ok: 0
    pub fn estimate(&mut self, frame0: &dyn core::ToInputArray, frame1: &dyn core::ToInputArray, ok: &mut bool) -> Result<core::Mat> {
        input_array_arg!(frame0);
        input_array_arg!(frame1);
        unsafe { sys::cv_videostab_KeypointBasedMotionEstimator_estimate__InputArray__InputArray_bool_X(self.as_raw_KeypointBasedMotionEstimator(), frame0.as_raw__InputArray(), frame1.as_raw__InputArray(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::LogToStdout
pub struct LogToStdout {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for LogToStdout {
    fn drop(&mut self) {
        unsafe { sys::cv_LogToStdout_delete(self.ptr) };
    }
}

impl LogToStdout {
    #[inline(always)] pub fn as_raw_LogToStdout(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for LogToStdout {}

impl crate::videostab::ILog for LogToStdout {
    #[inline(always)] fn as_raw_ILog(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::videostab::LpMotionStabilizer
pub struct LpMotionStabilizer {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for LpMotionStabilizer {
    fn drop(&mut self) {
        unsafe { sys::cv_LpMotionStabilizer_delete(self.ptr) };
    }
}

impl LpMotionStabilizer {
    #[inline(always)] pub fn as_raw_LpMotionStabilizer(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for LpMotionStabilizer {}

impl crate::videostab::IMotionStabilizer for LpMotionStabilizer {
    #[inline(always)] fn as_raw_IMotionStabilizer(&self) -> *mut c_void { self.ptr }
}

impl LpMotionStabilizer {
    pub fn set_frame_size(&mut self, val: core::Size) -> Result<()> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_setFrameSize_Size(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    pub fn frame_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_frameSize_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    pub fn set_trim_ratio(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_setTrimRatio_float(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    pub fn trim_ratio(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_trimRatio_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    pub fn set_weight1(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_setWeight1_float(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    pub fn weight1(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_weight1_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    pub fn set_weight2(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_setWeight2_float(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    pub fn weight2(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_weight2_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    pub fn set_weight3(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_setWeight3_float(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    pub fn weight3(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_weight3_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    pub fn set_weight4(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_setWeight4_float(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    pub fn weight4(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_LpMotionStabilizer_weight4_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
}

// boxed class cv::videostab::MoreAccurateMotionWobbleSuppressor
pub struct MoreAccurateMotionWobbleSuppressor {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for MoreAccurateMotionWobbleSuppressor {
    fn drop(&mut self) {
        unsafe { sys::cv_MoreAccurateMotionWobbleSuppressor_delete(self.ptr) };
    }
}

impl MoreAccurateMotionWobbleSuppressor {
    #[inline(always)] pub fn as_raw_MoreAccurateMotionWobbleSuppressor(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for MoreAccurateMotionWobbleSuppressor {}

impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressor {
    #[inline(always)] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

impl crate::videostab::WobbleSuppressorBase for MoreAccurateMotionWobbleSuppressor {
    #[inline(always)] fn as_raw_WobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

impl MoreAccurateMotionWobbleSuppressor {
    pub fn suppress(&mut self, idx: i32, frame: &core::Mat, result: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_MoreAccurateMotionWobbleSuppressor_suppress_int_Mat_Mat(self.as_raw_MoreAccurateMotionWobbleSuppressor(), idx, frame.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::MoreAccurateMotionWobbleSuppressorBase
pub trait MoreAccurateMotionWobbleSuppressorBaseTrait: crate::videostab::WobbleSuppressorBase {
    #[inline(always)] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *mut c_void;
    fn set_period(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_MoreAccurateMotionWobbleSuppressorBase_setPeriod_int(self.as_raw_MoreAccurateMotionWobbleSuppressorBase(), val) }.into_result()
    }
    
    fn period(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_MoreAccurateMotionWobbleSuppressorBase_period_const(self.as_raw_MoreAccurateMotionWobbleSuppressorBase()) }.into_result()
    }
    
}

// boxed class cv::videostab::MoreAccurateMotionWobbleSuppressorBase
pub struct MoreAccurateMotionWobbleSuppressorBase {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for MoreAccurateMotionWobbleSuppressorBase {
    fn drop(&mut self) {
        unsafe { sys::cv_MoreAccurateMotionWobbleSuppressorBase_delete(self.ptr) };
    }
}

impl MoreAccurateMotionWobbleSuppressorBase {
    #[inline(always)] pub fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for MoreAccurateMotionWobbleSuppressorBase {}

impl crate::videostab::MoreAccurateMotionWobbleSuppressorBaseTrait for MoreAccurateMotionWobbleSuppressorBase {
    #[inline(always)] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

impl crate::videostab::WobbleSuppressorBase for MoreAccurateMotionWobbleSuppressorBase {
    #[inline(always)] fn as_raw_WobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

// Generating impl for trait crate::videostab::MotionEstimatorBase
/// Base class for all global motion estimation methods.
pub trait MotionEstimatorBase {
    #[inline(always)] fn as_raw_MotionEstimatorBase(&self) -> *mut c_void;
    /// Estimates global motion between two 2D point clouds.
    ///
    /// ## Parameters
    /// * points0: Source set of 2D points (32F).
    /// * points1: Destination set of 2D points (32F).
    /// * ok: Indicates whether motion was estimated successfully.
    /// ## Returns
    /// 3x3 2D transformation matrix (32F).
    ///
    /// ## C++ default parameters
    /// * ok: 0
    fn estimate(&mut self, points0: &dyn core::ToInputArray, points1: &dyn core::ToInputArray, ok: &mut bool) -> Result<core::Mat> {
        input_array_arg!(points0);
        input_array_arg!(points1);
        unsafe { sys::cv_videostab_MotionEstimatorBase_estimate__InputArray__InputArray_bool_X(self.as_raw_MotionEstimatorBase(), points0.as_raw__InputArray(), points1.as_raw__InputArray(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::MotionEstimatorL1
/// Describes a global 2D motion estimation method which minimizes L1 error.
///
///
/// Note: To be able to use this method you must build OpenCV with CLP library support. :
pub struct MotionEstimatorL1 {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for MotionEstimatorL1 {
    fn drop(&mut self) {
        unsafe { sys::cv_MotionEstimatorL1_delete(self.ptr) };
    }
}

impl MotionEstimatorL1 {
    #[inline(always)] pub fn as_raw_MotionEstimatorL1(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for MotionEstimatorL1 {}

impl crate::videostab::MotionEstimatorBase for MotionEstimatorL1 {
    #[inline(always)] fn as_raw_MotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl MotionEstimatorL1 {
    ///
    /// ## C++ default parameters
    /// * ok: 0
    pub fn estimate(&mut self, points0: &dyn core::ToInputArray, points1: &dyn core::ToInputArray, ok: &mut bool) -> Result<core::Mat> {
        input_array_arg!(points0);
        input_array_arg!(points1);
        unsafe { sys::cv_videostab_MotionEstimatorL1_estimate__InputArray__InputArray_bool_X(self.as_raw_MotionEstimatorL1(), points0.as_raw__InputArray(), points1.as_raw__InputArray(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::MotionEstimatorRansacL2
/// Describes a robust RANSAC-based global 2D motion estimation method which minimizes L2 error.
pub struct MotionEstimatorRansacL2 {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for MotionEstimatorRansacL2 {
    fn drop(&mut self) {
        unsafe { sys::cv_MotionEstimatorRansacL2_delete(self.ptr) };
    }
}

impl MotionEstimatorRansacL2 {
    #[inline(always)] pub fn as_raw_MotionEstimatorRansacL2(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for MotionEstimatorRansacL2 {}

impl crate::videostab::MotionEstimatorBase for MotionEstimatorRansacL2 {
    #[inline(always)] fn as_raw_MotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl MotionEstimatorRansacL2 {
    pub fn set_min_inlier_ratio(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_MotionEstimatorRansacL2_setMinInlierRatio_float(self.as_raw_MotionEstimatorRansacL2(), val) }.into_result()
    }
    
    pub fn min_inlier_ratio(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_MotionEstimatorRansacL2_minInlierRatio_const(self.as_raw_MotionEstimatorRansacL2()) }.into_result()
    }
    
    ///
    /// ## C++ default parameters
    /// * ok: 0
    pub fn estimate(&mut self, points0: &dyn core::ToInputArray, points1: &dyn core::ToInputArray, ok: &mut bool) -> Result<core::Mat> {
        input_array_arg!(points0);
        input_array_arg!(points1);
        unsafe { sys::cv_videostab_MotionEstimatorRansacL2_estimate__InputArray__InputArray_bool_X(self.as_raw_MotionEstimatorRansacL2(), points0.as_raw__InputArray(), points1.as_raw__InputArray(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// Generating impl for trait crate::videostab::MotionFilterBase
pub trait MotionFilterBase: crate::videostab::IMotionStabilizer {
    #[inline(always)] fn as_raw_MotionFilterBase(&self) -> *mut c_void;
}

// boxed class cv::videostab::MotionInpainter
pub struct MotionInpainter {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for MotionInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_MotionInpainter_delete(self.ptr) };
    }
}

impl MotionInpainter {
    #[inline(always)] pub fn as_raw_MotionInpainter(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for MotionInpainter {}

impl crate::videostab::InpainterBase for MotionInpainter {
    #[inline(always)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl MotionInpainter {
    pub fn default() -> Result<crate::videostab::MotionInpainter> {
        unsafe { sys::cv_videostab_MotionInpainter_MotionInpainter() }.into_result().map(|ptr| crate::videostab::MotionInpainter { ptr })
    }
    
    pub fn set_flow_error_threshold(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_MotionInpainter_setFlowErrorThreshold_float(self.as_raw_MotionInpainter(), val) }.into_result()
    }
    
    pub fn flow_error_threshold(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_MotionInpainter_flowErrorThreshold_const(self.as_raw_MotionInpainter()) }.into_result()
    }
    
    pub fn set_dist_threshold(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_MotionInpainter_setDistThreshold_float(self.as_raw_MotionInpainter(), val) }.into_result()
    }
    
    pub fn dist_thresh(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_MotionInpainter_distThresh_const(self.as_raw_MotionInpainter()) }.into_result()
    }
    
    pub fn set_border_mode(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_MotionInpainter_setBorderMode_int(self.as_raw_MotionInpainter(), val) }.into_result()
    }
    
    pub fn border_mode(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_MotionInpainter_borderMode_const(self.as_raw_MotionInpainter()) }.into_result()
    }
    
    pub fn inpaint(&mut self, idx: i32, frame: &mut core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_MotionInpainter_inpaint_int_Mat_Mat(self.as_raw_MotionInpainter(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::MotionStabilizationPipeline
pub struct MotionStabilizationPipeline {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for MotionStabilizationPipeline {
    fn drop(&mut self) {
        unsafe { sys::cv_MotionStabilizationPipeline_delete(self.ptr) };
    }
}

impl MotionStabilizationPipeline {
    #[inline(always)] pub fn as_raw_MotionStabilizationPipeline(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for MotionStabilizationPipeline {}

impl crate::videostab::IMotionStabilizer for MotionStabilizationPipeline {
    #[inline(always)] fn as_raw_IMotionStabilizer(&self) -> *mut c_void { self.ptr }
}

impl MotionStabilizationPipeline {
    pub fn push_back(&mut self, stabilizer: &types::PtrOfIMotionStabilizer) -> Result<()> {
        unsafe { sys::cv_videostab_MotionStabilizationPipeline_pushBack_PtrOfIMotionStabilizer(self.as_raw_MotionStabilizationPipeline(), stabilizer.as_raw_PtrOfIMotionStabilizer()) }.into_result()
    }
    
    pub fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_videostab_MotionStabilizationPipeline_empty_const(self.as_raw_MotionStabilizationPipeline()) }.into_result()
    }
    
}

// boxed class cv::videostab::NullDeblurer
pub struct NullDeblurer {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for NullDeblurer {
    fn drop(&mut self) {
        unsafe { sys::cv_NullDeblurer_delete(self.ptr) };
    }
}

impl NullDeblurer {
    #[inline(always)] pub fn as_raw_NullDeblurer(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for NullDeblurer {}

impl crate::videostab::DeblurerBase for NullDeblurer {
    #[inline(always)] fn as_raw_DeblurerBase(&self) -> *mut c_void { self.ptr }
}

impl NullDeblurer {
    pub fn deblur(&mut self, unnamed_arg: i32, unnamed_arg_1: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_NullDeblurer_deblur_int_Mat(self.as_raw_NullDeblurer(), unnamed_arg, unnamed_arg_1.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::NullFrameSource
pub struct NullFrameSource {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for NullFrameSource {
    fn drop(&mut self) {
        unsafe { sys::cv_NullFrameSource_delete(self.ptr) };
    }
}

impl NullFrameSource {
    #[inline(always)] pub fn as_raw_NullFrameSource(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for NullFrameSource {}

impl crate::videostab::IFrameSource for NullFrameSource {
    #[inline(always)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl NullFrameSource {
    pub fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_videostab_NullFrameSource_reset(self.as_raw_NullFrameSource()) }.into_result()
    }
    
    pub fn next_frame(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_NullFrameSource_nextFrame(self.as_raw_NullFrameSource()) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::NullInpainter
pub struct NullInpainter {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for NullInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_NullInpainter_delete(self.ptr) };
    }
}

impl NullInpainter {
    #[inline(always)] pub fn as_raw_NullInpainter(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for NullInpainter {}

impl crate::videostab::InpainterBase for NullInpainter {
    #[inline(always)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl NullInpainter {
    pub fn inpaint(&mut self, unnamed_arg: i32, unnamed_arg_1: &mut core::Mat, unnamed_arg_2: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_NullInpainter_inpaint_int_Mat_Mat(self.as_raw_NullInpainter(), unnamed_arg, unnamed_arg_1.as_raw_Mat(), unnamed_arg_2.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::NullLog
pub struct NullLog {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for NullLog {
    fn drop(&mut self) {
        unsafe { sys::cv_NullLog_delete(self.ptr) };
    }
}

impl NullLog {
    #[inline(always)] pub fn as_raw_NullLog(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for NullLog {}

impl crate::videostab::ILog for NullLog {
    #[inline(always)] fn as_raw_ILog(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::videostab::NullOutlierRejector
pub struct NullOutlierRejector {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for NullOutlierRejector {
    fn drop(&mut self) {
        unsafe { sys::cv_NullOutlierRejector_delete(self.ptr) };
    }
}

impl NullOutlierRejector {
    #[inline(always)] pub fn as_raw_NullOutlierRejector(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for NullOutlierRejector {}

impl crate::videostab::IOutlierRejector for NullOutlierRejector {
    #[inline(always)] fn as_raw_IOutlierRejector(&self) -> *mut c_void { self.ptr }
}

impl NullOutlierRejector {
    pub fn process(&mut self, frame_size: core::Size, points0: &dyn core::ToInputArray, points1: &dyn core::ToInputArray, mask: &mut dyn core::ToOutputArray) -> Result<()> {
        input_array_arg!(points0);
        input_array_arg!(points1);
        output_array_arg!(mask);
        unsafe { sys::cv_videostab_NullOutlierRejector_process_Size__InputArray__InputArray__OutputArray(self.as_raw_NullOutlierRejector(), frame_size, points0.as_raw__InputArray(), points1.as_raw__InputArray(), mask.as_raw__OutputArray()) }.into_result()
    }
    
}

// boxed class cv::videostab::NullWobbleSuppressor
pub struct NullWobbleSuppressor {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for NullWobbleSuppressor {
    fn drop(&mut self) {
        unsafe { sys::cv_NullWobbleSuppressor_delete(self.ptr) };
    }
}

impl NullWobbleSuppressor {
    #[inline(always)] pub fn as_raw_NullWobbleSuppressor(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for NullWobbleSuppressor {}

impl crate::videostab::WobbleSuppressorBase for NullWobbleSuppressor {
    #[inline(always)] fn as_raw_WobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

impl NullWobbleSuppressor {
    pub fn suppress(&mut self, idx: i32, frame: &core::Mat, result: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_NullWobbleSuppressor_suppress_int_Mat_Mat(self.as_raw_NullWobbleSuppressor(), idx, frame.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::OnePassStabilizer
pub struct OnePassStabilizer {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for OnePassStabilizer {
    fn drop(&mut self) {
        unsafe { sys::cv_OnePassStabilizer_delete(self.ptr) };
    }
}

impl OnePassStabilizer {
    #[inline(always)] pub fn as_raw_OnePassStabilizer(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for OnePassStabilizer {}

impl crate::videostab::IFrameSource for OnePassStabilizer {
    #[inline(always)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl crate::videostab::StabilizerBase for OnePassStabilizer {
    #[inline(always)] fn as_raw_StabilizerBase(&self) -> *mut c_void { self.ptr }
}

impl OnePassStabilizer {
    pub fn default() -> Result<crate::videostab::OnePassStabilizer> {
        unsafe { sys::cv_videostab_OnePassStabilizer_OnePassStabilizer() }.into_result().map(|ptr| crate::videostab::OnePassStabilizer { ptr })
    }
    
    pub fn set_motion_filter(&mut self, val: &types::PtrOfMotionFilterBase) -> Result<()> {
        unsafe { sys::cv_videostab_OnePassStabilizer_setMotionFilter_PtrOfMotionFilterBase(self.as_raw_OnePassStabilizer(), val.as_raw_PtrOfMotionFilterBase()) }.into_result()
    }
    
    pub fn motion_filter(&self) -> Result<types::PtrOfMotionFilterBase> {
        unsafe { sys::cv_videostab_OnePassStabilizer_motionFilter_const(self.as_raw_OnePassStabilizer()) }.into_result().map(|ptr| types::PtrOfMotionFilterBase { ptr })
    }
    
    pub fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_videostab_OnePassStabilizer_reset(self.as_raw_OnePassStabilizer()) }.into_result()
    }
    
    pub fn next_frame(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_OnePassStabilizer_nextFrame(self.as_raw_OnePassStabilizer()) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// Generating impl for trait crate::videostab::PyrLkOptFlowEstimatorBase
pub trait PyrLkOptFlowEstimatorBaseTrait {
    #[inline(always)] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *mut c_void;
    fn set_win_size(&mut self, val: core::Size) -> Result<()> {
        unsafe { sys::cv_videostab_PyrLkOptFlowEstimatorBase_setWinSize_Size(self.as_raw_PyrLkOptFlowEstimatorBase(), val) }.into_result()
    }
    
    fn win_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_videostab_PyrLkOptFlowEstimatorBase_winSize_const(self.as_raw_PyrLkOptFlowEstimatorBase()) }.into_result()
    }
    
    fn set_max_level(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_PyrLkOptFlowEstimatorBase_setMaxLevel_int(self.as_raw_PyrLkOptFlowEstimatorBase(), val) }.into_result()
    }
    
    fn max_level(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_PyrLkOptFlowEstimatorBase_maxLevel_const(self.as_raw_PyrLkOptFlowEstimatorBase()) }.into_result()
    }
    
}

// boxed class cv::videostab::PyrLkOptFlowEstimatorBase
pub struct PyrLkOptFlowEstimatorBase {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for PyrLkOptFlowEstimatorBase {
    fn drop(&mut self) {
        unsafe { sys::cv_PyrLkOptFlowEstimatorBase_delete(self.ptr) };
    }
}

impl PyrLkOptFlowEstimatorBase {
    #[inline(always)] pub fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for PyrLkOptFlowEstimatorBase {}

impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for PyrLkOptFlowEstimatorBase {
    #[inline(always)] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl PyrLkOptFlowEstimatorBase {
    pub fn default() -> Result<crate::videostab::PyrLkOptFlowEstimatorBase> {
        unsafe { sys::cv_videostab_PyrLkOptFlowEstimatorBase_PyrLkOptFlowEstimatorBase() }.into_result().map(|ptr| crate::videostab::PyrLkOptFlowEstimatorBase { ptr })
    }
    
}

// boxed class cv::videostab::RansacParams
/// Describes RANSAC method parameters.
pub struct RansacParams {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for RansacParams {
    fn drop(&mut self) {
        unsafe { sys::cv_RansacParams_delete(self.ptr) };
    }
}

impl RansacParams {
    #[inline(always)] pub fn as_raw_RansacParams(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for RansacParams {}

impl RansacParams {
    /// ## Returns
    /// Number of iterations that'll be performed by RANSAC method.
    pub fn niters(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_RansacParams_niters_const(self.as_raw_RansacParams()) }.into_result()
    }
    
}

// boxed class cv::videostab::SparsePyrLkOptFlowEstimator
pub struct SparsePyrLkOptFlowEstimator {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for SparsePyrLkOptFlowEstimator {
    fn drop(&mut self) {
        unsafe { sys::cv_SparsePyrLkOptFlowEstimator_delete(self.ptr) };
    }
}

impl SparsePyrLkOptFlowEstimator {
    #[inline(always)] pub fn as_raw_SparsePyrLkOptFlowEstimator(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for SparsePyrLkOptFlowEstimator {}

impl crate::videostab::ISparseOptFlowEstimator for SparsePyrLkOptFlowEstimator {
    #[inline(always)] fn as_raw_ISparseOptFlowEstimator(&self) -> *mut c_void { self.ptr }
}

impl crate::videostab::PyrLkOptFlowEstimatorBaseTrait for SparsePyrLkOptFlowEstimator {
    #[inline(always)] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl SparsePyrLkOptFlowEstimator {
    pub fn run(&mut self, frame0: &dyn core::ToInputArray, frame1: &dyn core::ToInputArray, points0: &dyn core::ToInputArray, points1: &mut dyn core::ToInputOutputArray, status: &mut dyn core::ToOutputArray, errors: &mut dyn core::ToOutputArray) -> Result<()> {
        input_array_arg!(frame0);
        input_array_arg!(frame1);
        input_array_arg!(points0);
        input_output_array_arg!(points1);
        output_array_arg!(status);
        output_array_arg!(errors);
        unsafe { sys::cv_videostab_SparsePyrLkOptFlowEstimator_run__InputArray__InputArray__InputArray__InputOutputArray__OutputArray__OutputArray(self.as_raw_SparsePyrLkOptFlowEstimator(), frame0.as_raw__InputArray(), frame1.as_raw__InputArray(), points0.as_raw__InputArray(), points1.as_raw__InputOutputArray(), status.as_raw__OutputArray(), errors.as_raw__OutputArray()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::StabilizerBase
pub trait StabilizerBase {
    #[inline(always)] fn as_raw_StabilizerBase(&self) -> *mut c_void;
    fn set_log(&mut self, ilog: &types::PtrOfILog) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setLog_PtrOfILog(self.as_raw_StabilizerBase(), ilog.as_raw_PtrOfILog()) }.into_result()
    }
    
    fn log(&self) -> Result<types::PtrOfILog> {
        unsafe { sys::cv_videostab_StabilizerBase_log_const(self.as_raw_StabilizerBase()) }.into_result().map(|ptr| types::PtrOfILog { ptr })
    }
    
    fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setRadius_int(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_StabilizerBase_radius_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    fn set_frame_source(&mut self, val: &types::PtrOfIFrameSource) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setFrameSource_PtrOfIFrameSource(self.as_raw_StabilizerBase(), val.as_raw_PtrOfIFrameSource()) }.into_result()
    }
    
    fn frame_source(&self) -> Result<types::PtrOfIFrameSource> {
        unsafe { sys::cv_videostab_StabilizerBase_frameSource_const(self.as_raw_StabilizerBase()) }.into_result().map(|ptr| types::PtrOfIFrameSource { ptr })
    }
    
    fn set_motion_estimator(&mut self, val: &types::PtrOfImageMotionEstimatorBase) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setMotionEstimator_PtrOfImageMotionEstimatorBase(self.as_raw_StabilizerBase(), val.as_raw_PtrOfImageMotionEstimatorBase()) }.into_result()
    }
    
    fn motion_estimator(&self) -> Result<types::PtrOfImageMotionEstimatorBase> {
        unsafe { sys::cv_videostab_StabilizerBase_motionEstimator_const(self.as_raw_StabilizerBase()) }.into_result().map(|ptr| types::PtrOfImageMotionEstimatorBase { ptr })
    }
    
    fn set_deblurer(&mut self, val: &types::PtrOfDeblurerBase) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setDeblurer_PtrOfDeblurerBase(self.as_raw_StabilizerBase(), val.as_raw_PtrOfDeblurerBase()) }.into_result()
    }
    
    fn deblurrer(&self) -> Result<types::PtrOfDeblurerBase> {
        unsafe { sys::cv_videostab_StabilizerBase_deblurrer_const(self.as_raw_StabilizerBase()) }.into_result().map(|ptr| types::PtrOfDeblurerBase { ptr })
    }
    
    fn set_trim_ratio(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setTrimRatio_float(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    fn trim_ratio(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_StabilizerBase_trimRatio_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    fn set_correction_for_inclusion(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setCorrectionForInclusion_bool(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    fn do_correction_for_inclusion(&self) -> Result<bool> {
        unsafe { sys::cv_videostab_StabilizerBase_doCorrectionForInclusion_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    fn set_border_mode(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setBorderMode_int(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    fn border_mode(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_StabilizerBase_borderMode_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    fn set_inpainter(&mut self, val: &types::PtrOfInpainterBase) -> Result<()> {
        unsafe { sys::cv_videostab_StabilizerBase_setInpainter_PtrOfInpainterBase(self.as_raw_StabilizerBase(), val.as_raw_PtrOfInpainterBase()) }.into_result()
    }
    
    fn inpainter(&self) -> Result<types::PtrOfInpainterBase> {
        unsafe { sys::cv_videostab_StabilizerBase_inpainter_const(self.as_raw_StabilizerBase()) }.into_result().map(|ptr| types::PtrOfInpainterBase { ptr })
    }
    
}

// boxed class cv::videostab::ToFileMotionWriter
pub struct ToFileMotionWriter {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for ToFileMotionWriter {
    fn drop(&mut self) {
        unsafe { sys::cv_ToFileMotionWriter_delete(self.ptr) };
    }
}

impl ToFileMotionWriter {
    #[inline(always)] pub fn as_raw_ToFileMotionWriter(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for ToFileMotionWriter {}

impl crate::videostab::ImageMotionEstimatorBase for ToFileMotionWriter {
    #[inline(always)] fn as_raw_ImageMotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl ToFileMotionWriter {
    pub fn new(path: &str, estimator: &types::PtrOfImageMotionEstimatorBase) -> Result<crate::videostab::ToFileMotionWriter> {
        string_arg!(path);
        unsafe { sys::cv_videostab_ToFileMotionWriter_ToFileMotionWriter_String_PtrOfImageMotionEstimatorBase(path.as_ptr(), estimator.as_raw_PtrOfImageMotionEstimatorBase()) }.into_result().map(|ptr| crate::videostab::ToFileMotionWriter { ptr })
    }
    
    ///
    /// ## C++ default parameters
    /// * ok: 0
    pub fn estimate(&mut self, frame0: &core::Mat, frame1: &core::Mat, ok: &mut bool) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_ToFileMotionWriter_estimate_Mat_Mat_bool_X(self.as_raw_ToFileMotionWriter(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), ok) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::TranslationBasedLocalOutlierRejector
pub struct TranslationBasedLocalOutlierRejector {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for TranslationBasedLocalOutlierRejector {
    fn drop(&mut self) {
        unsafe { sys::cv_TranslationBasedLocalOutlierRejector_delete(self.ptr) };
    }
}

impl TranslationBasedLocalOutlierRejector {
    #[inline(always)] pub fn as_raw_TranslationBasedLocalOutlierRejector(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for TranslationBasedLocalOutlierRejector {}

impl crate::videostab::IOutlierRejector for TranslationBasedLocalOutlierRejector {
    #[inline(always)] fn as_raw_IOutlierRejector(&self) -> *mut c_void { self.ptr }
}

impl TranslationBasedLocalOutlierRejector {
    pub fn default() -> Result<crate::videostab::TranslationBasedLocalOutlierRejector> {
        unsafe { sys::cv_videostab_TranslationBasedLocalOutlierRejector_TranslationBasedLocalOutlierRejector() }.into_result().map(|ptr| crate::videostab::TranslationBasedLocalOutlierRejector { ptr })
    }
    
    pub fn set_cell_size(&mut self, val: core::Size) -> Result<()> {
        unsafe { sys::cv_videostab_TranslationBasedLocalOutlierRejector_setCellSize_Size(self.as_raw_TranslationBasedLocalOutlierRejector(), val) }.into_result()
    }
    
    pub fn cell_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_videostab_TranslationBasedLocalOutlierRejector_cellSize_const(self.as_raw_TranslationBasedLocalOutlierRejector()) }.into_result()
    }
    
    pub fn process(&mut self, frame_size: core::Size, points0: &dyn core::ToInputArray, points1: &dyn core::ToInputArray, mask: &mut dyn core::ToOutputArray) -> Result<()> {
        input_array_arg!(points0);
        input_array_arg!(points1);
        output_array_arg!(mask);
        unsafe { sys::cv_videostab_TranslationBasedLocalOutlierRejector_process_Size__InputArray__InputArray__OutputArray(self.as_raw_TranslationBasedLocalOutlierRejector(), frame_size, points0.as_raw__InputArray(), points1.as_raw__InputArray(), mask.as_raw__OutputArray()) }.into_result()
    }
    
}

// boxed class cv::videostab::TwoPassStabilizer
pub struct TwoPassStabilizer {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for TwoPassStabilizer {
    fn drop(&mut self) {
        unsafe { sys::cv_TwoPassStabilizer_delete(self.ptr) };
    }
}

impl TwoPassStabilizer {
    #[inline(always)] pub fn as_raw_TwoPassStabilizer(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for TwoPassStabilizer {}

impl crate::videostab::IFrameSource for TwoPassStabilizer {
    #[inline(always)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl crate::videostab::StabilizerBase for TwoPassStabilizer {
    #[inline(always)] fn as_raw_StabilizerBase(&self) -> *mut c_void { self.ptr }
}

impl TwoPassStabilizer {
    pub fn default() -> Result<crate::videostab::TwoPassStabilizer> {
        unsafe { sys::cv_videostab_TwoPassStabilizer_TwoPassStabilizer() }.into_result().map(|ptr| crate::videostab::TwoPassStabilizer { ptr })
    }
    
    pub fn set_motion_stabilizer(&mut self, val: &types::PtrOfIMotionStabilizer) -> Result<()> {
        unsafe { sys::cv_videostab_TwoPassStabilizer_setMotionStabilizer_PtrOfIMotionStabilizer(self.as_raw_TwoPassStabilizer(), val.as_raw_PtrOfIMotionStabilizer()) }.into_result()
    }
    
    pub fn motion_stabilizer(&self) -> Result<types::PtrOfIMotionStabilizer> {
        unsafe { sys::cv_videostab_TwoPassStabilizer_motionStabilizer_const(self.as_raw_TwoPassStabilizer()) }.into_result().map(|ptr| types::PtrOfIMotionStabilizer { ptr })
    }
    
    pub fn set_estimate_trim_ratio(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_videostab_TwoPassStabilizer_setEstimateTrimRatio_bool(self.as_raw_TwoPassStabilizer(), val) }.into_result()
    }
    
    pub fn must_estimate_trima_ratio(&self) -> Result<bool> {
        unsafe { sys::cv_videostab_TwoPassStabilizer_mustEstimateTrimaRatio_const(self.as_raw_TwoPassStabilizer()) }.into_result()
    }
    
    pub fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_videostab_TwoPassStabilizer_reset(self.as_raw_TwoPassStabilizer()) }.into_result()
    }
    
    pub fn next_frame(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_TwoPassStabilizer_nextFrame(self.as_raw_TwoPassStabilizer()) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
}

// boxed class cv::videostab::VideoFileSource
pub struct VideoFileSource {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for VideoFileSource {
    fn drop(&mut self) {
        unsafe { sys::cv_VideoFileSource_delete(self.ptr) };
    }
}

impl VideoFileSource {
    #[inline(always)] pub fn as_raw_VideoFileSource(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for VideoFileSource {}

impl crate::videostab::IFrameSource for VideoFileSource {
    #[inline(always)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl VideoFileSource {
    ///
    /// ## C++ default parameters
    /// * volatile_frame: false
    pub fn new(path: &str, volatile_frame: bool) -> Result<crate::videostab::VideoFileSource> {
        string_arg!(path);
        unsafe { sys::cv_videostab_VideoFileSource_VideoFileSource_String_bool(path.as_ptr(), volatile_frame) }.into_result().map(|ptr| crate::videostab::VideoFileSource { ptr })
    }
    
    pub fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_videostab_VideoFileSource_reset(self.as_raw_VideoFileSource()) }.into_result()
    }
    
    pub fn next_frame(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_videostab_VideoFileSource_nextFrame(self.as_raw_VideoFileSource()) }.into_result().map(|ptr| core::Mat { ptr })
    }
    
    pub fn width(&mut self) -> Result<i32> {
        unsafe { sys::cv_videostab_VideoFileSource_width(self.as_raw_VideoFileSource()) }.into_result()
    }
    
    pub fn height(&mut self) -> Result<i32> {
        unsafe { sys::cv_videostab_VideoFileSource_height(self.as_raw_VideoFileSource()) }.into_result()
    }
    
    pub fn count(&mut self) -> Result<i32> {
        unsafe { sys::cv_videostab_VideoFileSource_count(self.as_raw_VideoFileSource()) }.into_result()
    }
    
    pub fn fps(&mut self) -> Result<f64> {
        unsafe { sys::cv_videostab_VideoFileSource_fps(self.as_raw_VideoFileSource()) }.into_result()
    }
    
}

// boxed class cv::videostab::WeightingDeblurer
pub struct WeightingDeblurer {
    #[doc(hidden)] pub(crate) ptr: *mut c_void
}

impl Drop for WeightingDeblurer {
    fn drop(&mut self) {
        unsafe { sys::cv_WeightingDeblurer_delete(self.ptr) };
    }
}

impl WeightingDeblurer {
    #[inline(always)] pub fn as_raw_WeightingDeblurer(&self) -> *mut c_void { self.ptr }

    pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self {
        Self { ptr }
    }
}

unsafe impl Send for WeightingDeblurer {}

impl crate::videostab::DeblurerBase for WeightingDeblurer {
    #[inline(always)] fn as_raw_DeblurerBase(&self) -> *mut c_void { self.ptr }
}

impl WeightingDeblurer {
    pub fn default() -> Result<crate::videostab::WeightingDeblurer> {
        unsafe { sys::cv_videostab_WeightingDeblurer_WeightingDeblurer() }.into_result().map(|ptr| crate::videostab::WeightingDeblurer { ptr })
    }
    
    pub fn set_sensitivity(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_videostab_WeightingDeblurer_setSensitivity_float(self.as_raw_WeightingDeblurer(), val) }.into_result()
    }
    
    pub fn sensitivity(&self) -> Result<f32> {
        unsafe { sys::cv_videostab_WeightingDeblurer_sensitivity_const(self.as_raw_WeightingDeblurer()) }.into_result()
    }
    
    pub fn deblur(&mut self, idx: i32, frame: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_WeightingDeblurer_deblur_int_Mat(self.as_raw_WeightingDeblurer(), idx, frame.as_raw_Mat()) }.into_result()
    }
    
}

// Generating impl for trait crate::videostab::WobbleSuppressorBase
pub trait WobbleSuppressorBase {
    #[inline(always)] fn as_raw_WobbleSuppressorBase(&self) -> *mut c_void;
    fn set_motion_estimator(&mut self, val: &types::PtrOfImageMotionEstimatorBase) -> Result<()> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_setMotionEstimator_PtrOfImageMotionEstimatorBase(self.as_raw_WobbleSuppressorBase(), val.as_raw_PtrOfImageMotionEstimatorBase()) }.into_result()
    }
    
    fn motion_estimator(&self) -> Result<types::PtrOfImageMotionEstimatorBase> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_motionEstimator_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|ptr| types::PtrOfImageMotionEstimatorBase { ptr })
    }
    
    fn suppress(&mut self, idx: i32, frame: &core::Mat, result: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_suppress_int_Mat_Mat(self.as_raw_WobbleSuppressorBase(), idx, frame.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
    }
    
    fn set_frame_count(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_setFrameCount_int(self.as_raw_WobbleSuppressorBase(), val) }.into_result()
    }
    
    fn frame_count(&self) -> Result<i32> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_frameCount_const(self.as_raw_WobbleSuppressorBase()) }.into_result()
    }
    
    fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_setMotions_VectorOfMat(self.as_raw_WobbleSuppressorBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_motions_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
    fn set_motions2(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_setMotions2_VectorOfMat(self.as_raw_WobbleSuppressorBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn motions2(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_motions2_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
    fn set_stabilization_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_setStabilizationMotions_VectorOfMat(self.as_raw_WobbleSuppressorBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    fn stabilization_motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_videostab_WobbleSuppressorBase_stabilizationMotions_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|ptr| types::VectorOfMat { ptr })
    }
    
}