opencv 0.5.3

Rust bindings for OpenCV
Documentation
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
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
//! <script type="text/javascript" src="http://latex.codecogs.com/latexit.js"></script>
//! Core functionality
//! 
//! # Core functionality
//! @{
//! Basic structures
//! 
//! # Basic structures
//! C structures and operations
//! 
//! # C structures and operations
//! @{
//! Connections with C++
//! 
//! # Connections with C++
//! @}
//! Operations on arrays
//! 
//! # Operations on arrays
//! XML/YAML Persistence
//! 
//! # XML/YAML Persistence
//! Clustering
//! 
//! # Clustering
//! Utility and system functions and macros
//! 
//! # Utility and system functions and macros
//! @{
//! SSE utilities
//! 
//! # SSE utilities
//! NEON utilities
//! 
//! # NEON utilities
//! Softfloat support
//! 
//! # Softfloat support
//! Utility functions for OpenCV samples
//! 
//! # Utility functions for OpenCV samples
//! @}
//! OpenGL interoperability
//! 
//! # OpenGL interoperability
//! Intel IPP Asynchronous C/C++ Converters
//! 
//! # Intel IPP Asynchronous C/C++ Converters
//! Optimization Algorithms
//! 
//! # Optimization Algorithms
//! DirectX interoperability
//! 
//! # DirectX interoperability
//! Eigen support
//! 
//! # Eigen support
//! OpenCL support
//! 
//! # OpenCL support
//! Intel VA-API/OpenCL (CL-VA) interoperability
//! 
//! # Intel VA-API/OpenCL (CL-VA) interoperability
//! Hardware Acceleration Layer
//! 
//! # Hardware Acceleration Layer
//! @{
//! Functions
//! 
//! # Functions
//! Interface
//! 
//! # Interface
//! Universal intrinsics
//! 
//! # Universal intrinsics
//! @{
//! Private implementation helpers
//! 
//! # Private implementation helpers
//! @}
//! @}
//! @}
use std::os::raw::{c_char, c_void};
use libc::size_t;
use crate::{Error, Result, core, sys, types};

pub const ACCESS_FAST: i32 = 1<<26;
pub const ACCESS_MASK: i32 = 3<<24;
pub const ACCESS_READ: i32 = 1<<24;
pub const ACCESS_RW: i32 = 3<<24;
pub const ACCESS_WRITE: i32 = 1<<25;
pub const ADAPTIVE_THRESH_GAUSSIAN_C: i32 = 1;
pub const ADAPTIVE_THRESH_MEAN_C: i32 = 0;
pub const AKAZE_DESCRIPTOR_KAZE: i32 = 3;
pub const AKAZE_DESCRIPTOR_KAZE_UPRIGHT: i32 = 2;
pub const AKAZE_DESCRIPTOR_MLDB: i32 = 5;
pub const AKAZE_DESCRIPTOR_MLDB_UPRIGHT: i32 = 4;
pub const ANN_MLP_ANNEAL: i32 = 2;
pub const ANN_MLP_BACKPROP: i32 = 0;
pub const ANN_MLP_GAUSSIAN: i32 = 2;
pub const ANN_MLP_IDENTITY: i32 = 0;
pub const ANN_MLP_LEAKYRELU: i32 = 4;
pub const ANN_MLP_NO_INPUT_SCALE: i32 = 2;
pub const ANN_MLP_NO_OUTPUT_SCALE: i32 = 4;
pub const ANN_MLP_RELU: i32 = 3;
pub const ANN_MLP_RPROP: i32 = 1;
pub const ANN_MLP_SIGMOID_SYM: i32 = 1;
pub const ANN_MLP_UPDATE_WEIGHTS: i32 = 1;
pub const AgastFeatureDetector_AGAST_5_8: i32 = 0;
pub const AgastFeatureDetector_AGAST_7_12d: i32 = 1;
pub const AgastFeatureDetector_AGAST_7_12s: i32 = 2;
pub const AgastFeatureDetector_OAST_9_16: i32 = 3;
pub const BORDER_CONSTANT: i32 = 0;
pub const BORDER_DEFAULT: i32 = 4;
pub const BORDER_ISOLATED: i32 = 16;
pub const BORDER_REFLECT: i32 = 2;
pub const BORDER_REFLECT101: i32 = 4;
pub const BORDER_REFLECT_101: i32 = 4;
pub const BORDER_REPLICATE: i32 = 1;
pub const BORDER_TRANSPARENT: i32 = 5;
pub const BORDER_WRAP: i32 = 3;
pub const BadAlign: i32 = -21;
pub const BadAlphaChannel: i32 = -18;
pub const BadCOI: i32 = -24;
pub const BadCallBack: i32 = -22;
pub const BadDataPtr: i32 = -12;
pub const BadDepth: i32 = -17;
pub const BadImageSize: i32 = -10;
pub const BadModelOrChSeq: i32 = -14;
pub const BadNumChannel1U: i32 = -16;
pub const BadNumChannels: i32 = -15;
pub const BadOffset: i32 = -11;
pub const BadOrder: i32 = -19;
pub const BadOrigin: i32 = -20;
pub const BadROISize: i32 = -25;
pub const BadStep: i32 = -13;
pub const BadTileSize: i32 = -23;
pub const Boost_DISCRETE: i32 = 0;
pub const Boost_GENTLE: i32 = 3;
pub const Boost_LOGIT: i32 = 2;
pub const CALIB_CB_ADAPTIVE_THRESH: i32 = 1;
pub const CALIB_CB_ASYMMETRIC_GRID: i32 = 2;
pub const CALIB_CB_CLUSTERING: i32 = 4;
pub const CALIB_CB_FAST_CHECK: i32 = 8;
pub const CALIB_CB_FILTER_QUADS: i32 = 4;
pub const CALIB_CB_NORMALIZE_IMAGE: i32 = 2;
pub const CALIB_CB_SYMMETRIC_GRID: i32 = 1;
pub const CALIB_CHECK_COND: i32 = 1 << 2;
pub const CALIB_FIX_ASPECT_RATIO: i32 = 0x00002;
pub const CALIB_FIX_FOCAL_LENGTH: i32 = 0x00010;
pub const CALIB_FIX_INTRINSIC: i32 = 0x00100;
pub const CALIB_FIX_K1: i32 = 0x00020;
pub const CALIB_FIX_K2: i32 = 0x00040;
pub const CALIB_FIX_K3: i32 = 0x00080;
pub const CALIB_FIX_K4: i32 = 0x00800;
pub const CALIB_FIX_K5: i32 = 0x01000;
pub const CALIB_FIX_K6: i32 = 0x02000;
pub const CALIB_FIX_PRINCIPAL_POINT: i32 = 0x00004;
pub const CALIB_FIX_S1_S2_S3_S4: i32 = 0x10000;
pub const CALIB_FIX_SKEW: i32 = 1 << 3;
pub const CALIB_FIX_TANGENT_DIST: i32 = 0x200000;
pub const CALIB_FIX_TAUX_TAUY: i32 = 0x80000;
pub const CALIB_RATIONAL_MODEL: i32 = 0x04000;
pub const CALIB_RECOMPUTE_EXTRINSIC: i32 = 1 << 1;
pub const CALIB_SAME_FOCAL_LENGTH: i32 = 0x00200;
pub const CALIB_THIN_PRISM_MODEL: i32 = 0x08000;
pub const CALIB_TILTED_MODEL: i32 = 0x40000;
pub const CALIB_USE_EXTRINSIC_GUESS: i32 = (1 << 22);
pub const CALIB_USE_INTRINSIC_GUESS: i32 = 0x00001;
pub const CALIB_USE_LU: i32 = (1 << 17);
pub const CALIB_USE_QR: i32 = 0x100000;
pub const CALIB_ZERO_DISPARITY: i32 = 0x00400;
pub const CALIB_ZERO_TANGENT_DIST: i32 = 0x00008;
pub const CAP_ANDROID: i32 = 1000;
pub const CAP_ANY: i32 = 0;
pub const CAP_ARAVIS: i32 = 2100;
pub const CAP_AVFOUNDATION: i32 = 1200;
pub const CAP_CMU1394: i32 = 300;
pub const CAP_DC1394: i32 = 300;
pub const CAP_DSHOW: i32 = 700;
pub const CAP_FFMPEG: i32 = 1900;
pub const CAP_FIREWARE: i32 = 300;
pub const CAP_FIREWIRE: i32 = 300;
pub const CAP_GIGANETIX: i32 = 1300;
pub const CAP_GPHOTO2: i32 = 1700;
pub const CAP_GSTREAMER: i32 = 1800;
pub const CAP_IEEE1394: i32 = 300;
pub const CAP_IMAGES: i32 = 2000;
pub const CAP_INTELPERC: i32 = 1500;
pub const CAP_INTELPERC_DEPTH_GENERATOR: i32 = 1 << 29;
pub const CAP_INTELPERC_DEPTH_MAP: i32 = 0;
pub const CAP_INTELPERC_IMAGE: i32 = 3;
pub const CAP_INTELPERC_IMAGE_GENERATOR: i32 = 1 << 28;
pub const CAP_INTELPERC_IR_MAP: i32 = 2;
pub const CAP_INTELPERC_UVDEPTH_MAP: i32 = 1;
pub const CAP_INTEL_MFX: i32 = 2300;
pub const CAP_MODE_BGR: i32 = 0;
pub const CAP_MODE_GRAY: i32 = 2;
pub const CAP_MODE_RGB: i32 = 1;
pub const CAP_MODE_YUYV: i32 = 3;
pub const CAP_MSMF: i32 = 1400;
pub const CAP_OPENCV_MJPEG: i32 = 2200;
pub const CAP_OPENNI: i32 = 900;
pub const CAP_OPENNI2: i32 = 1600;
pub const CAP_OPENNI2_ASUS: i32 = 1610;
pub const CAP_OPENNI_ASUS: i32 = 910;
pub const CAP_OPENNI_BGR_IMAGE: i32 = 5;
pub const CAP_OPENNI_DEPTH_GENERATOR: i32 = 1 << 31;
pub const CAP_OPENNI_DEPTH_MAP: i32 = 0;
pub const CAP_OPENNI_DISPARITY_MAP: i32 = 2;
pub const CAP_OPENNI_DISPARITY_MAP_32F: i32 = 3;
pub const CAP_OPENNI_GRAY_IMAGE: i32 = 6;
pub const CAP_OPENNI_IMAGE_GENERATOR: i32 = 1 << 30;
pub const CAP_OPENNI_IR_GENERATOR: i32 = 1 << 29;
pub const CAP_OPENNI_IR_IMAGE: i32 = 7;
pub const CAP_OPENNI_POINT_CLOUD_MAP: i32 = 1;
pub const CAP_OPENNI_QVGA_30HZ: i32 = 3;
pub const CAP_OPENNI_QVGA_60HZ: i32 = 4;
pub const CAP_OPENNI_SXGA_15HZ: i32 = 1;
pub const CAP_OPENNI_SXGA_30HZ: i32 = 2;
pub const CAP_OPENNI_VALID_DEPTH_MASK: i32 = 4;
pub const CAP_OPENNI_VGA_30HZ: i32 = 0;
pub const CAP_PROP_APERTURE: i32 = 17008;
pub const CAP_PROP_AUTOFOCUS: i32 = 39;
pub const CAP_PROP_AUTO_EXPOSURE: i32 = 21;
pub const CAP_PROP_AUTO_WB: i32 = 44;
pub const CAP_PROP_BACKEND: i32 = 42;
pub const CAP_PROP_BACKLIGHT: i32 = 32;
pub const CAP_PROP_BRIGHTNESS: i32 = 10;
pub const CAP_PROP_BUFFERSIZE: i32 = 38;
pub const CAP_PROP_CHANNEL: i32 = 43;
pub const CAP_PROP_CONTRAST: i32 = 11;
pub const CAP_PROP_CONVERT_RGB: i32 = 16;
pub const CAP_PROP_DC1394_MAX: i32 = 31;
pub const CAP_PROP_DC1394_MODE_AUTO: i32 = -2;
pub const CAP_PROP_DC1394_MODE_MANUAL: i32 = -3;
pub const CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO: i32 = -1;
pub const CAP_PROP_DC1394_OFF: i32 = -4;
pub const CAP_PROP_EXPOSURE: i32 = 15;
pub const CAP_PROP_EXPOSUREPROGRAM: i32 = 17009;
pub const CAP_PROP_FOCUS: i32 = 28;
pub const CAP_PROP_FORMAT: i32 = 8;
pub const CAP_PROP_FOURCC: i32 = 6;
pub const CAP_PROP_FPS: i32 = 5;
pub const CAP_PROP_FRAME_COUNT: i32 = 7;
pub const CAP_PROP_FRAME_HEIGHT: i32 = 4;
pub const CAP_PROP_FRAME_WIDTH: i32 = 3;
pub const CAP_PROP_GAIN: i32 = 14;
pub const CAP_PROP_GAMMA: i32 = 22;
pub const CAP_PROP_GIGA_FRAME_HEIGH_MAX: i32 = 10004;
pub const CAP_PROP_GIGA_FRAME_OFFSET_X: i32 = 10001;
pub const CAP_PROP_GIGA_FRAME_OFFSET_Y: i32 = 10002;
pub const CAP_PROP_GIGA_FRAME_SENS_HEIGH: i32 = 10006;
pub const CAP_PROP_GIGA_FRAME_SENS_WIDTH: i32 = 10005;
pub const CAP_PROP_GIGA_FRAME_WIDTH_MAX: i32 = 10003;
pub const CAP_PROP_GPHOTO2_COLLECT_MSGS: i32 = 17005;
pub const CAP_PROP_GPHOTO2_FLUSH_MSGS: i32 = 17006;
pub const CAP_PROP_GPHOTO2_PREVIEW: i32 = 17001;
pub const CAP_PROP_GPHOTO2_RELOAD_CONFIG: i32 = 17003;
pub const CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE: i32 = 17004;
pub const CAP_PROP_GPHOTO2_WIDGET_ENUMERATE: i32 = 17002;
pub const CAP_PROP_GSTREAMER_QUEUE_LENGTH: i32 = 200;
pub const CAP_PROP_GUID: i32 = 29;
pub const CAP_PROP_HUE: i32 = 13;
pub const CAP_PROP_IMAGES_BASE: i32 = 18000;
pub const CAP_PROP_IMAGES_LAST: i32 = 19000;
pub const CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD: i32 = 11005;
pub const CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ: i32 = 11006;
pub const CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT: i32 = 11007;
pub const CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE: i32 = 11003;
pub const CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE: i32 = 11004;
pub const CAP_PROP_INTELPERC_PROFILE_COUNT: i32 = 11001;
pub const CAP_PROP_INTELPERC_PROFILE_IDX: i32 = 11002;
pub const CAP_PROP_IOS_DEVICE_EXPOSURE: i32 = 9002;
pub const CAP_PROP_IOS_DEVICE_FLASH: i32 = 9003;
pub const CAP_PROP_IOS_DEVICE_FOCUS: i32 = 9001;
pub const CAP_PROP_IOS_DEVICE_TORCH: i32 = 9005;
pub const CAP_PROP_IOS_DEVICE_WHITEBALANCE: i32 = 9004;
pub const CAP_PROP_IRIS: i32 = 36;
pub const CAP_PROP_ISO_SPEED: i32 = 30;
pub const CAP_PROP_MODE: i32 = 9;
pub const CAP_PROP_MONOCHROME: i32 = 19;
pub const CAP_PROP_OPENNI2_MIRROR: i32 = 111;
pub const CAP_PROP_OPENNI2_SYNC: i32 = 110;
pub const CAP_PROP_OPENNI_APPROX_FRAME_SYNC: i32 = 105;
pub const CAP_PROP_OPENNI_BASELINE: i32 = 102;
pub const CAP_PROP_OPENNI_CIRCLE_BUFFER: i32 = 107;
pub const CAP_PROP_OPENNI_FOCAL_LENGTH: i32 = 103;
pub const CAP_PROP_OPENNI_FRAME_MAX_DEPTH: i32 = 101;
pub const CAP_PROP_OPENNI_GENERATOR_PRESENT: i32 = 109;
pub const CAP_PROP_OPENNI_MAX_BUFFER_SIZE: i32 = 106;
pub const CAP_PROP_OPENNI_MAX_TIME_DURATION: i32 = 108;
pub const CAP_PROP_OPENNI_OUTPUT_MODE: i32 = 100;
pub const CAP_PROP_OPENNI_REGISTRATION: i32 = 104;
pub const CAP_PROP_OPENNI_REGISTRATION_ON: i32 = 104;
pub const CAP_PROP_PAN: i32 = 33;
pub const CAP_PROP_POS_AVI_RATIO: i32 = 2;
pub const CAP_PROP_POS_FRAMES: i32 = 1;
pub const CAP_PROP_POS_MSEC: i32 = 0;
pub const CAP_PROP_PVAPI_BINNINGX: i32 = 304;
pub const CAP_PROP_PVAPI_BINNINGY: i32 = 305;
pub const CAP_PROP_PVAPI_DECIMATIONHORIZONTAL: i32 = 302;
pub const CAP_PROP_PVAPI_DECIMATIONVERTICAL: i32 = 303;
pub const CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE: i32 = 301;
pub const CAP_PROP_PVAPI_MULTICASTIP: i32 = 300;
pub const CAP_PROP_PVAPI_PIXELFORMAT: i32 = 306;
pub const CAP_PROP_RECTIFICATION: i32 = 18;
pub const CAP_PROP_ROLL: i32 = 35;
pub const CAP_PROP_SAR_DEN: i32 = 41;
pub const CAP_PROP_SAR_NUM: i32 = 40;
pub const CAP_PROP_SATURATION: i32 = 12;
pub const CAP_PROP_SETTINGS: i32 = 37;
pub const CAP_PROP_SHARPNESS: i32 = 20;
pub const CAP_PROP_SPEED: i32 = 17007;
pub const CAP_PROP_TEMPERATURE: i32 = 23;
pub const CAP_PROP_TILT: i32 = 34;
pub const CAP_PROP_TRIGGER: i32 = 24;
pub const CAP_PROP_TRIGGER_DELAY: i32 = 25;
pub const CAP_PROP_VIEWFINDER: i32 = 17010;
pub const CAP_PROP_WB_TEMPERATURE: i32 = 45;
pub const CAP_PROP_WHITE_BALANCE_BLUE_U: i32 = 17;
pub const CAP_PROP_WHITE_BALANCE_RED_V: i32 = 26;
pub const CAP_PROP_XI_ACQ_BUFFER_SIZE: i32 = 548;
pub const CAP_PROP_XI_ACQ_BUFFER_SIZE_UNIT: i32 = 549;
pub const CAP_PROP_XI_ACQ_FRAME_BURST_COUNT: i32 = 499;
pub const CAP_PROP_XI_ACQ_TIMING_MODE: i32 = 538;
pub const CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_COMMIT: i32 = 552;
pub const CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_SIZE: i32 = 550;
pub const CAP_PROP_XI_AEAG: i32 = 415;
pub const CAP_PROP_XI_AEAG_LEVEL: i32 = 419;
pub const CAP_PROP_XI_AEAG_ROI_HEIGHT: i32 = 442;
pub const CAP_PROP_XI_AEAG_ROI_OFFSET_X: i32 = 439;
pub const CAP_PROP_XI_AEAG_ROI_OFFSET_Y: i32 = 440;
pub const CAP_PROP_XI_AEAG_ROI_WIDTH: i32 = 441;
pub const CAP_PROP_XI_AE_MAX_LIMIT: i32 = 417;
pub const CAP_PROP_XI_AG_MAX_LIMIT: i32 = 418;
pub const CAP_PROP_XI_APPLY_CMS: i32 = 471;
pub const CAP_PROP_XI_AUTO_BANDWIDTH_CALCULATION: i32 = 573;
pub const CAP_PROP_XI_AUTO_WB: i32 = 414;
pub const CAP_PROP_XI_AVAILABLE_BANDWIDTH: i32 = 539;
pub const CAP_PROP_XI_BINNING_HORIZONTAL: i32 = 429;
pub const CAP_PROP_XI_BINNING_PATTERN: i32 = 430;
pub const CAP_PROP_XI_BINNING_SELECTOR: i32 = 427;
pub const CAP_PROP_XI_BINNING_VERTICAL: i32 = 428;
pub const CAP_PROP_XI_BPC: i32 = 445;
pub const CAP_PROP_XI_BUFFERS_QUEUE_SIZE: i32 = 551;
pub const CAP_PROP_XI_BUFFER_POLICY: i32 = 540;
pub const CAP_PROP_XI_CC_MATRIX_00: i32 = 479;
pub const CAP_PROP_XI_CC_MATRIX_01: i32 = 480;
pub const CAP_PROP_XI_CC_MATRIX_02: i32 = 481;
pub const CAP_PROP_XI_CC_MATRIX_03: i32 = 482;
pub const CAP_PROP_XI_CC_MATRIX_10: i32 = 483;
pub const CAP_PROP_XI_CC_MATRIX_11: i32 = 484;
pub const CAP_PROP_XI_CC_MATRIX_12: i32 = 485;
pub const CAP_PROP_XI_CC_MATRIX_13: i32 = 486;
pub const CAP_PROP_XI_CC_MATRIX_20: i32 = 487;
pub const CAP_PROP_XI_CC_MATRIX_21: i32 = 488;
pub const CAP_PROP_XI_CC_MATRIX_22: i32 = 489;
pub const CAP_PROP_XI_CC_MATRIX_23: i32 = 490;
pub const CAP_PROP_XI_CC_MATRIX_30: i32 = 491;
pub const CAP_PROP_XI_CC_MATRIX_31: i32 = 492;
pub const CAP_PROP_XI_CC_MATRIX_32: i32 = 493;
pub const CAP_PROP_XI_CC_MATRIX_33: i32 = 494;
pub const CAP_PROP_XI_CHIP_TEMP: i32 = 468;
pub const CAP_PROP_XI_CMS: i32 = 470;
pub const CAP_PROP_XI_COLOR_FILTER_ARRAY: i32 = 475;
pub const CAP_PROP_XI_COLUMN_FPN_CORRECTION: i32 = 555;
pub const CAP_PROP_XI_COOLING: i32 = 466;
pub const CAP_PROP_XI_COUNTER_SELECTOR: i32 = 536;
pub const CAP_PROP_XI_COUNTER_VALUE: i32 = 537;
pub const CAP_PROP_XI_DATA_FORMAT: i32 = 401;
pub const CAP_PROP_XI_DEBOUNCE_EN: i32 = 507;
pub const CAP_PROP_XI_DEBOUNCE_POL: i32 = 510;
pub const CAP_PROP_XI_DEBOUNCE_T0: i32 = 508;
pub const CAP_PROP_XI_DEBOUNCE_T1: i32 = 509;
pub const CAP_PROP_XI_DEBUG_LEVEL: i32 = 572;
pub const CAP_PROP_XI_DECIMATION_HORIZONTAL: i32 = 433;
pub const CAP_PROP_XI_DECIMATION_PATTERN: i32 = 434;
pub const CAP_PROP_XI_DECIMATION_SELECTOR: i32 = 431;
pub const CAP_PROP_XI_DECIMATION_VERTICAL: i32 = 432;
pub const CAP_PROP_XI_DEFAULT_CC_MATRIX: i32 = 495;
pub const CAP_PROP_XI_DEVICE_MODEL_ID: i32 = 521;
pub const CAP_PROP_XI_DEVICE_RESET: i32 = 554;
pub const CAP_PROP_XI_DEVICE_SN: i32 = 522;
pub const CAP_PROP_XI_DOWNSAMPLING: i32 = 400;
pub const CAP_PROP_XI_DOWNSAMPLING_TYPE: i32 = 426;
pub const CAP_PROP_XI_EXPOSURE: i32 = 421;
pub const CAP_PROP_XI_EXPOSURE_BURST_COUNT: i32 = 422;
pub const CAP_PROP_XI_EXP_PRIORITY: i32 = 416;
pub const CAP_PROP_XI_FFS_ACCESS_KEY: i32 = 583;
pub const CAP_PROP_XI_FFS_FILE_ID: i32 = 594;
pub const CAP_PROP_XI_FFS_FILE_SIZE: i32 = 580;
pub const CAP_PROP_XI_FRAMERATE: i32 = 535;
pub const CAP_PROP_XI_FREE_FFS_SIZE: i32 = 581;
pub const CAP_PROP_XI_GAIN: i32 = 424;
pub const CAP_PROP_XI_GAIN_SELECTOR: i32 = 423;
pub const CAP_PROP_XI_GAMMAC: i32 = 477;
pub const CAP_PROP_XI_GAMMAY: i32 = 476;
pub const CAP_PROP_XI_GPI_LEVEL: i32 = 408;
pub const CAP_PROP_XI_GPI_MODE: i32 = 407;
pub const CAP_PROP_XI_GPI_SELECTOR: i32 = 406;
pub const CAP_PROP_XI_GPO_MODE: i32 = 410;
pub const CAP_PROP_XI_GPO_SELECTOR: i32 = 409;
pub const CAP_PROP_XI_HDR: i32 = 559;
pub const CAP_PROP_XI_HDR_KNEEPOINT_COUNT: i32 = 560;
pub const CAP_PROP_XI_HDR_T1: i32 = 561;
pub const CAP_PROP_XI_HDR_T2: i32 = 562;
pub const CAP_PROP_XI_HEIGHT: i32 = 452;
pub const CAP_PROP_XI_HOUS_BACK_SIDE_TEMP: i32 = 590;
pub const CAP_PROP_XI_HOUS_TEMP: i32 = 469;
pub const CAP_PROP_XI_HW_REVISION: i32 = 571;
pub const CAP_PROP_XI_IMAGE_BLACK_LEVEL: i32 = 565;
pub const CAP_PROP_XI_IMAGE_DATA_BIT_DEPTH: i32 = 462;
pub const CAP_PROP_XI_IMAGE_DATA_FORMAT: i32 = 435;
pub const CAP_PROP_XI_IMAGE_DATA_FORMAT_RGB32_ALPHA: i32 = 529;
pub const CAP_PROP_XI_IMAGE_IS_COLOR: i32 = 474;
pub const CAP_PROP_XI_IMAGE_PAYLOAD_SIZE: i32 = 530;
pub const CAP_PROP_XI_IS_COOLED: i32 = 465;
pub const CAP_PROP_XI_IS_DEVICE_EXIST: i32 = 547;
pub const CAP_PROP_XI_KNEEPOINT1: i32 = 563;
pub const CAP_PROP_XI_KNEEPOINT2: i32 = 564;
pub const CAP_PROP_XI_LED_MODE: i32 = 412;
pub const CAP_PROP_XI_LED_SELECTOR: i32 = 411;
pub const CAP_PROP_XI_LENS_APERTURE_VALUE: i32 = 512;
pub const CAP_PROP_XI_LENS_FEATURE: i32 = 518;
pub const CAP_PROP_XI_LENS_FEATURE_SELECTOR: i32 = 517;
pub const CAP_PROP_XI_LENS_FOCAL_LENGTH: i32 = 516;
pub const CAP_PROP_XI_LENS_FOCUS_DISTANCE: i32 = 515;
pub const CAP_PROP_XI_LENS_FOCUS_MOVE: i32 = 514;
pub const CAP_PROP_XI_LENS_FOCUS_MOVEMENT_VALUE: i32 = 513;
pub const CAP_PROP_XI_LENS_MODE: i32 = 511;
pub const CAP_PROP_XI_LIMIT_BANDWIDTH: i32 = 459;
pub const CAP_PROP_XI_LUT_EN: i32 = 541;
pub const CAP_PROP_XI_LUT_INDEX: i32 = 542;
pub const CAP_PROP_XI_LUT_VALUE: i32 = 543;
pub const CAP_PROP_XI_MANUAL_WB: i32 = 413;
pub const CAP_PROP_XI_OFFSET_X: i32 = 402;
pub const CAP_PROP_XI_OFFSET_Y: i32 = 403;
pub const CAP_PROP_XI_OUTPUT_DATA_BIT_DEPTH: i32 = 461;
pub const CAP_PROP_XI_OUTPUT_DATA_PACKING: i32 = 463;
pub const CAP_PROP_XI_OUTPUT_DATA_PACKING_TYPE: i32 = 464;
pub const CAP_PROP_XI_RECENT_FRAME: i32 = 553;
pub const CAP_PROP_XI_REGION_MODE: i32 = 595;
pub const CAP_PROP_XI_REGION_SELECTOR: i32 = 589;
pub const CAP_PROP_XI_ROW_FPN_CORRECTION: i32 = 591;
pub const CAP_PROP_XI_SENSOR_BOARD_TEMP: i32 = 596;
pub const CAP_PROP_XI_SENSOR_CLOCK_FREQ_HZ: i32 = 532;
pub const CAP_PROP_XI_SENSOR_CLOCK_FREQ_INDEX: i32 = 533;
pub const CAP_PROP_XI_SENSOR_DATA_BIT_DEPTH: i32 = 460;
pub const CAP_PROP_XI_SENSOR_FEATURE_SELECTOR: i32 = 585;
pub const CAP_PROP_XI_SENSOR_FEATURE_VALUE: i32 = 586;
pub const CAP_PROP_XI_SENSOR_MODE: i32 = 558;
pub const CAP_PROP_XI_SENSOR_OUTPUT_CHANNEL_COUNT: i32 = 534;
pub const CAP_PROP_XI_SENSOR_TAPS: i32 = 437;
pub const CAP_PROP_XI_SHARPNESS: i32 = 478;
pub const CAP_PROP_XI_SHUTTER_TYPE: i32 = 436;
pub const CAP_PROP_XI_TARGET_TEMP: i32 = 467;
pub const CAP_PROP_XI_TEST_PATTERN: i32 = 588;
pub const CAP_PROP_XI_TEST_PATTERN_GENERATOR_SELECTOR: i32 = 587;
pub const CAP_PROP_XI_TIMEOUT: i32 = 420;
pub const CAP_PROP_XI_TRANSPORT_PIXEL_FORMAT: i32 = 531;
pub const CAP_PROP_XI_TRG_DELAY: i32 = 544;
pub const CAP_PROP_XI_TRG_SELECTOR: i32 = 498;
pub const CAP_PROP_XI_TRG_SOFTWARE: i32 = 405;
pub const CAP_PROP_XI_TRG_SOURCE: i32 = 404;
pub const CAP_PROP_XI_TS_RST_MODE: i32 = 545;
pub const CAP_PROP_XI_TS_RST_SOURCE: i32 = 546;
pub const CAP_PROP_XI_USED_FFS_SIZE: i32 = 582;
pub const CAP_PROP_XI_WB_KB: i32 = 450;
pub const CAP_PROP_XI_WB_KG: i32 = 449;
pub const CAP_PROP_XI_WB_KR: i32 = 448;
pub const CAP_PROP_XI_WIDTH: i32 = 451;
pub const CAP_PROP_ZOOM: i32 = 27;
pub const CAP_PVAPI: i32 = 800;
pub const CAP_PVAPI_DECIMATION_2OUTOF16: i32 = 8;
pub const CAP_PVAPI_DECIMATION_2OUTOF4: i32 = 2;
pub const CAP_PVAPI_DECIMATION_2OUTOF8: i32 = 4;
pub const CAP_PVAPI_DECIMATION_OFF: i32 = 1;
pub const CAP_PVAPI_FSTRIGMODE_FIXEDRATE: i32 = 3;
pub const CAP_PVAPI_FSTRIGMODE_FREERUN: i32 = 0;
pub const CAP_PVAPI_FSTRIGMODE_SOFTWARE: i32 = 4;
pub const CAP_PVAPI_FSTRIGMODE_SYNCIN1: i32 = 1;
pub const CAP_PVAPI_FSTRIGMODE_SYNCIN2: i32 = 2;
pub const CAP_PVAPI_PIXELFORMAT_BAYER16: i32 = 4;
pub const CAP_PVAPI_PIXELFORMAT_BAYER8: i32 = 3;
pub const CAP_PVAPI_PIXELFORMAT_BGR24: i32 = 6;
pub const CAP_PVAPI_PIXELFORMAT_BGRA32: i32 = 8;
pub const CAP_PVAPI_PIXELFORMAT_MONO16: i32 = 2;
pub const CAP_PVAPI_PIXELFORMAT_MONO8: i32 = 1;
pub const CAP_PVAPI_PIXELFORMAT_RGB24: i32 = 5;
pub const CAP_PVAPI_PIXELFORMAT_RGBA32: i32 = 7;
pub const CAP_QT: i32 = 500;
pub const CAP_UNICAP: i32 = 600;
pub const CAP_V4L: i32 = 200;
pub const CAP_V4L2: i32 = 200;
pub const CAP_VFW: i32 = 200;
pub const CAP_WINRT: i32 = 1410;
pub const CAP_XIAPI: i32 = 1100;
pub const CAP_XINE: i32 = 2400;
pub const CASCADE_DO_CANNY_PRUNING: i32 = 1;
pub const CASCADE_DO_ROUGH_SEARCH: i32 = 8;
pub const CASCADE_FIND_BIGGEST_OBJECT: i32 = 4;
pub const CASCADE_SCALE_IMAGE: i32 = 2;
pub const CCL_DEFAULT: i32 = -1;
pub const CCL_GRANA: i32 = 1;
pub const CCL_WU: i32 = 0;
pub const CC_STAT_AREA: i32 = 4;
pub const CC_STAT_HEIGHT: i32 = 3;
pub const CC_STAT_LEFT: i32 = 0;
pub const CC_STAT_MAX: i32 = 5;
pub const CC_STAT_TOP: i32 = 1;
pub const CC_STAT_WIDTH: i32 = 2;
pub const CHAIN_APPROX_NONE: i32 = 1;
pub const CHAIN_APPROX_SIMPLE: i32 = 2;
pub const CHAIN_APPROX_TC89_KCOS: i32 = 4;
pub const CHAIN_APPROX_TC89_L1: i32 = 3;
pub const CMP_EQ: i32 = 0;
pub const CMP_GE: i32 = 2;
pub const CMP_GT: i32 = 1;
pub const CMP_LE: i32 = 4;
pub const CMP_LT: i32 = 3;
pub const CMP_NE: i32 = 5;
pub const COLORMAP_AUTUMN: i32 = 0;
pub const COLORMAP_BONE: i32 = 1;
pub const COLORMAP_COOL: i32 = 8;
pub const COLORMAP_HOT: i32 = 11;
pub const COLORMAP_HSV: i32 = 9;
pub const COLORMAP_JET: i32 = 2;
pub const COLORMAP_OCEAN: i32 = 5;
pub const COLORMAP_PARULA: i32 = 12;
pub const COLORMAP_PINK: i32 = 10;
pub const COLORMAP_RAINBOW: i32 = 4;
pub const COLORMAP_SPRING: i32 = 7;
pub const COLORMAP_SUMMER: i32 = 6;
pub const COLORMAP_WINTER: i32 = 3;
pub const COLOR_BGR2BGR555: i32 = 22;
pub const COLOR_BGR2BGR565: i32 = 12;
pub const COLOR_BGR2BGRA: i32 = 0;
pub const COLOR_BGR2GRAY: i32 = 6;
pub const COLOR_BGR2HLS: i32 = 52;
pub const COLOR_BGR2HLS_FULL: i32 = 68;
pub const COLOR_BGR2HSV: i32 = 40;
pub const COLOR_BGR2HSV_FULL: i32 = 66;
pub const COLOR_BGR2Lab: i32 = 44;
pub const COLOR_BGR2Luv: i32 = 50;
pub const COLOR_BGR2RGB: i32 = 4;
pub const COLOR_BGR2RGBA: i32 = 2;
pub const COLOR_BGR2XYZ: i32 = 32;
pub const COLOR_BGR2YCrCb: i32 = 36;
pub const COLOR_BGR2YUV: i32 = 82;
pub const COLOR_BGR2YUV_I420: i32 = 128;
pub const COLOR_BGR2YUV_IYUV: i32 = 128;
pub const COLOR_BGR2YUV_YV12: i32 = 132;
pub const COLOR_BGR5552BGR: i32 = 24;
pub const COLOR_BGR5552BGRA: i32 = 28;
pub const COLOR_BGR5552GRAY: i32 = 31;
pub const COLOR_BGR5552RGB: i32 = 25;
pub const COLOR_BGR5552RGBA: i32 = 29;
pub const COLOR_BGR5652BGR: i32 = 14;
pub const COLOR_BGR5652BGRA: i32 = 18;
pub const COLOR_BGR5652GRAY: i32 = 21;
pub const COLOR_BGR5652RGB: i32 = 15;
pub const COLOR_BGR5652RGBA: i32 = 19;
pub const COLOR_BGRA2BGR: i32 = 1;
pub const COLOR_BGRA2BGR555: i32 = 26;
pub const COLOR_BGRA2BGR565: i32 = 16;
pub const COLOR_BGRA2GRAY: i32 = 10;
pub const COLOR_BGRA2RGB: i32 = 3;
pub const COLOR_BGRA2RGBA: i32 = 5;
pub const COLOR_BGRA2YUV_I420: i32 = 130;
pub const COLOR_BGRA2YUV_IYUV: i32 = 130;
pub const COLOR_BGRA2YUV_YV12: i32 = 134;
pub const COLOR_BayerBG2BGR: i32 = 46;
pub const COLOR_BayerBG2BGRA: i32 = 139;
pub const COLOR_BayerBG2BGR_EA: i32 = 135;
pub const COLOR_BayerBG2BGR_VNG: i32 = 62;
pub const COLOR_BayerBG2GRAY: i32 = 86;
pub const COLOR_BayerBG2RGB: i32 = 48;
pub const COLOR_BayerBG2RGBA: i32 = 141;
pub const COLOR_BayerBG2RGB_EA: i32 = 137;
pub const COLOR_BayerBG2RGB_VNG: i32 = 64;
pub const COLOR_BayerGB2BGR: i32 = 47;
pub const COLOR_BayerGB2BGRA: i32 = 140;
pub const COLOR_BayerGB2BGR_EA: i32 = 136;
pub const COLOR_BayerGB2BGR_VNG: i32 = 63;
pub const COLOR_BayerGB2GRAY: i32 = 87;
pub const COLOR_BayerGB2RGB: i32 = 49;
pub const COLOR_BayerGB2RGBA: i32 = 142;
pub const COLOR_BayerGB2RGB_EA: i32 = 138;
pub const COLOR_BayerGB2RGB_VNG: i32 = 65;
pub const COLOR_BayerGR2BGR: i32 = 49;
pub const COLOR_BayerGR2BGRA: i32 = 142;
pub const COLOR_BayerGR2BGR_EA: i32 = 138;
pub const COLOR_BayerGR2BGR_VNG: i32 = 65;
pub const COLOR_BayerGR2GRAY: i32 = 89;
pub const COLOR_BayerGR2RGB: i32 = 47;
pub const COLOR_BayerGR2RGBA: i32 = 140;
pub const COLOR_BayerGR2RGB_EA: i32 = 136;
pub const COLOR_BayerGR2RGB_VNG: i32 = 63;
pub const COLOR_BayerRG2BGR: i32 = 48;
pub const COLOR_BayerRG2BGRA: i32 = 141;
pub const COLOR_BayerRG2BGR_EA: i32 = 137;
pub const COLOR_BayerRG2BGR_VNG: i32 = 64;
pub const COLOR_BayerRG2GRAY: i32 = 88;
pub const COLOR_BayerRG2RGB: i32 = 46;
pub const COLOR_BayerRG2RGBA: i32 = 139;
pub const COLOR_BayerRG2RGB_EA: i32 = 135;
pub const COLOR_BayerRG2RGB_VNG: i32 = 62;
pub const COLOR_COLORCVT_MAX: i32 = 143;
pub const COLOR_GRAY2BGR: i32 = 8;
pub const COLOR_GRAY2BGR555: i32 = 30;
pub const COLOR_GRAY2BGR565: i32 = 20;
pub const COLOR_GRAY2BGRA: i32 = 9;
pub const COLOR_GRAY2RGB: i32 = 8;
pub const COLOR_GRAY2RGBA: i32 = 9;
pub const COLOR_HLS2BGR: i32 = 60;
pub const COLOR_HLS2BGR_FULL: i32 = 72;
pub const COLOR_HLS2RGB: i32 = 61;
pub const COLOR_HLS2RGB_FULL: i32 = 73;
pub const COLOR_HSV2BGR: i32 = 54;
pub const COLOR_HSV2BGR_FULL: i32 = 70;
pub const COLOR_HSV2RGB: i32 = 55;
pub const COLOR_HSV2RGB_FULL: i32 = 71;
pub const COLOR_LBGR2Lab: i32 = 74;
pub const COLOR_LBGR2Luv: i32 = 76;
pub const COLOR_LRGB2Lab: i32 = 75;
pub const COLOR_LRGB2Luv: i32 = 77;
pub const COLOR_Lab2BGR: i32 = 56;
pub const COLOR_Lab2LBGR: i32 = 78;
pub const COLOR_Lab2LRGB: i32 = 79;
pub const COLOR_Lab2RGB: i32 = 57;
pub const COLOR_Luv2BGR: i32 = 58;
pub const COLOR_Luv2LBGR: i32 = 80;
pub const COLOR_Luv2LRGB: i32 = 81;
pub const COLOR_Luv2RGB: i32 = 59;
pub const COLOR_RGB2BGR: i32 = 4;
pub const COLOR_RGB2BGR555: i32 = 23;
pub const COLOR_RGB2BGR565: i32 = 13;
pub const COLOR_RGB2BGRA: i32 = 2;
pub const COLOR_RGB2GRAY: i32 = 7;
pub const COLOR_RGB2HLS: i32 = 53;
pub const COLOR_RGB2HLS_FULL: i32 = 69;
pub const COLOR_RGB2HSV: i32 = 41;
pub const COLOR_RGB2HSV_FULL: i32 = 67;
pub const COLOR_RGB2Lab: i32 = 45;
pub const COLOR_RGB2Luv: i32 = 51;
pub const COLOR_RGB2RGBA: i32 = 0;
pub const COLOR_RGB2XYZ: i32 = 33;
pub const COLOR_RGB2YCrCb: i32 = 37;
pub const COLOR_RGB2YUV: i32 = 83;
pub const COLOR_RGB2YUV_I420: i32 = 127;
pub const COLOR_RGB2YUV_IYUV: i32 = 127;
pub const COLOR_RGB2YUV_YV12: i32 = 131;
pub const COLOR_RGBA2BGR: i32 = 3;
pub const COLOR_RGBA2BGR555: i32 = 27;
pub const COLOR_RGBA2BGR565: i32 = 17;
pub const COLOR_RGBA2BGRA: i32 = 5;
pub const COLOR_RGBA2GRAY: i32 = 11;
pub const COLOR_RGBA2RGB: i32 = 1;
pub const COLOR_RGBA2YUV_I420: i32 = 129;
pub const COLOR_RGBA2YUV_IYUV: i32 = 129;
pub const COLOR_RGBA2YUV_YV12: i32 = 133;
pub const COLOR_RGBA2mRGBA: i32 = 125;
pub const COLOR_XYZ2BGR: i32 = 34;
pub const COLOR_XYZ2RGB: i32 = 35;
pub const COLOR_YCrCb2BGR: i32 = 38;
pub const COLOR_YCrCb2RGB: i32 = 39;
pub const COLOR_YUV2BGR: i32 = 84;
pub const COLOR_YUV2BGRA_I420: i32 = 105;
pub const COLOR_YUV2BGRA_IYUV: i32 = 105;
pub const COLOR_YUV2BGRA_NV12: i32 = 95;
pub const COLOR_YUV2BGRA_NV21: i32 = 97;
pub const COLOR_YUV2BGRA_UYNV: i32 = 112;
pub const COLOR_YUV2BGRA_UYVY: i32 = 112;
pub const COLOR_YUV2BGRA_Y422: i32 = 112;
pub const COLOR_YUV2BGRA_YUNV: i32 = 120;
pub const COLOR_YUV2BGRA_YUY2: i32 = 120;
pub const COLOR_YUV2BGRA_YUYV: i32 = 120;
pub const COLOR_YUV2BGRA_YV12: i32 = 103;
pub const COLOR_YUV2BGRA_YVYU: i32 = 122;
pub const COLOR_YUV2BGR_I420: i32 = 101;
pub const COLOR_YUV2BGR_IYUV: i32 = 101;
pub const COLOR_YUV2BGR_NV12: i32 = 91;
pub const COLOR_YUV2BGR_NV21: i32 = 93;
pub const COLOR_YUV2BGR_UYNV: i32 = 108;
pub const COLOR_YUV2BGR_UYVY: i32 = 108;
pub const COLOR_YUV2BGR_Y422: i32 = 108;
pub const COLOR_YUV2BGR_YUNV: i32 = 116;
pub const COLOR_YUV2BGR_YUY2: i32 = 116;
pub const COLOR_YUV2BGR_YUYV: i32 = 116;
pub const COLOR_YUV2BGR_YV12: i32 = 99;
pub const COLOR_YUV2BGR_YVYU: i32 = 118;
pub const COLOR_YUV2GRAY_420: i32 = 106;
pub const COLOR_YUV2GRAY_I420: i32 = 106;
pub const COLOR_YUV2GRAY_IYUV: i32 = 106;
pub const COLOR_YUV2GRAY_NV12: i32 = 106;
pub const COLOR_YUV2GRAY_NV21: i32 = 106;
pub const COLOR_YUV2GRAY_UYNV: i32 = 123;
pub const COLOR_YUV2GRAY_UYVY: i32 = 123;
pub const COLOR_YUV2GRAY_Y422: i32 = 123;
pub const COLOR_YUV2GRAY_YUNV: i32 = 124;
pub const COLOR_YUV2GRAY_YUY2: i32 = 124;
pub const COLOR_YUV2GRAY_YUYV: i32 = 124;
pub const COLOR_YUV2GRAY_YV12: i32 = 106;
pub const COLOR_YUV2GRAY_YVYU: i32 = 124;
pub const COLOR_YUV2RGB: i32 = 85;
pub const COLOR_YUV2RGBA_I420: i32 = 104;
pub const COLOR_YUV2RGBA_IYUV: i32 = 104;
pub const COLOR_YUV2RGBA_NV12: i32 = 94;
pub const COLOR_YUV2RGBA_NV21: i32 = 96;
pub const COLOR_YUV2RGBA_UYNV: i32 = 111;
pub const COLOR_YUV2RGBA_UYVY: i32 = 111;
pub const COLOR_YUV2RGBA_Y422: i32 = 111;
pub const COLOR_YUV2RGBA_YUNV: i32 = 119;
pub const COLOR_YUV2RGBA_YUY2: i32 = 119;
pub const COLOR_YUV2RGBA_YUYV: i32 = 119;
pub const COLOR_YUV2RGBA_YV12: i32 = 102;
pub const COLOR_YUV2RGBA_YVYU: i32 = 121;
pub const COLOR_YUV2RGB_I420: i32 = 100;
pub const COLOR_YUV2RGB_IYUV: i32 = 100;
pub const COLOR_YUV2RGB_NV12: i32 = 90;
pub const COLOR_YUV2RGB_NV21: i32 = 92;
pub const COLOR_YUV2RGB_UYNV: i32 = 107;
pub const COLOR_YUV2RGB_UYVY: i32 = 107;
pub const COLOR_YUV2RGB_Y422: i32 = 107;
pub const COLOR_YUV2RGB_YUNV: i32 = 115;
pub const COLOR_YUV2RGB_YUY2: i32 = 115;
pub const COLOR_YUV2RGB_YUYV: i32 = 115;
pub const COLOR_YUV2RGB_YV12: i32 = 98;
pub const COLOR_YUV2RGB_YVYU: i32 = 117;
pub const COLOR_YUV420p2BGR: i32 = 99;
pub const COLOR_YUV420p2BGRA: i32 = 103;
pub const COLOR_YUV420p2GRAY: i32 = 106;
pub const COLOR_YUV420p2RGB: i32 = 98;
pub const COLOR_YUV420p2RGBA: i32 = 102;
pub const COLOR_YUV420sp2BGR: i32 = 93;
pub const COLOR_YUV420sp2BGRA: i32 = 97;
pub const COLOR_YUV420sp2GRAY: i32 = 106;
pub const COLOR_YUV420sp2RGB: i32 = 92;
pub const COLOR_YUV420sp2RGBA: i32 = 96;
pub const COLOR_mRGBA2RGBA: i32 = 126;
pub const COL_SAMPLE: i32 = 1;
pub const CONTOURS_MATCH_I1: i32 = 1;
pub const CONTOURS_MATCH_I2: i32 = 2;
pub const CONTOURS_MATCH_I3: i32 = 3;
pub const COVAR_COLS: i32 = 16;
pub const COVAR_NORMAL: i32 = 1;
pub const COVAR_ROWS: i32 = 8;
pub const COVAR_SCALE: i32 = 4;
pub const COVAR_SCRAMBLED: i32 = 0;
pub const COVAR_USE_AVG: i32 = 2;
pub const CPU_AVX: i32 = 10;
pub const CPU_AVX2: i32 = 11;
pub const CPU_AVX512_SKX: i32 = 256;
pub const CPU_AVX_512BW: i32 = 14;
pub const CPU_AVX_512CD: i32 = 15;
pub const CPU_AVX_512DQ: i32 = 16;
pub const CPU_AVX_512ER: i32 = 17;
pub const CPU_AVX_512F: i32 = 13;
pub const CPU_AVX_512IFMA: i32 = 18;
pub const CPU_AVX_512IFMA512: i32 = 18;
pub const CPU_AVX_512PF: i32 = 19;
pub const CPU_AVX_512VBMI: i32 = 20;
pub const CPU_AVX_512VL: i32 = 21;
pub const CPU_FMA3: i32 = 12;
pub const CPU_FP16: i32 = 9;
pub const CPU_MAX_FEATURE: i32 = 512;
pub const CPU_MMX: i32 = 1;
pub const CPU_NEON: i32 = 100;
pub const CPU_POPCNT: i32 = 8;
pub const CPU_SSE: i32 = 2;
pub const CPU_SSE2: i32 = 3;
pub const CPU_SSE3: i32 = 4;
pub const CPU_SSE4_1: i32 = 6;
pub const CPU_SSE4_2: i32 = 7;
pub const CPU_SSSE3: i32 = 5;
pub const CPU_VSX: i32 = 200;
pub const CPU_VSX3: i32 = 201;
pub const CV_16S: i32 = 3;
pub const CV_16U: i32 = 2;
pub const CV_32F: i32 = 5;
pub const CV_32S: i32 = 4;
pub const CV_64F: i32 = 6;
pub const CV_8S: i32 = 1;
pub const CV_8U: i32 = 0;
pub const CV_AA: i32 = 16;
pub const CV_ADAPTIVE_THRESH_GAUSSIAN_C: i32 = 1;
pub const CV_ADAPTIVE_THRESH_MEAN_C: i32 = 0;
pub const CV_AUTOSTEP: i32 = 0x7fffffff;
pub const CV_AUTO_STEP: i32 = 0x7fffffff;
pub const CV_BACK: i32 = 0;
pub const CV_BGR2BGR555: i32 = 22;
pub const CV_BGR2BGR565: i32 = 12;
pub const CV_BGR2BGRA: i32 = 0;
pub const CV_BGR2GRAY: i32 = 6;
pub const CV_BGR2HLS: i32 = 52;
pub const CV_BGR2HLS_FULL: i32 = 68;
pub const CV_BGR2HSV: i32 = 40;
pub const CV_BGR2HSV_FULL: i32 = 66;
pub const CV_BGR2Lab: i32 = 44;
pub const CV_BGR2Luv: i32 = 50;
pub const CV_BGR2RGB: i32 = 4;
pub const CV_BGR2RGBA: i32 = 2;
pub const CV_BGR2XYZ: i32 = 32;
pub const CV_BGR2YCrCb: i32 = 36;
pub const CV_BGR2YUV: i32 = 82;
pub const CV_BGR2YUV_I420: i32 = 128;
pub const CV_BGR2YUV_IYUV: i32 = 128;
pub const CV_BGR2YUV_YV12: i32 = 132;
pub const CV_BGR5552BGR: i32 = 24;
pub const CV_BGR5552BGRA: i32 = 28;
pub const CV_BGR5552GRAY: i32 = 31;
pub const CV_BGR5552RGB: i32 = 25;
pub const CV_BGR5552RGBA: i32 = 29;
pub const CV_BGR5652BGR: i32 = 14;
pub const CV_BGR5652BGRA: i32 = 18;
pub const CV_BGR5652GRAY: i32 = 21;
pub const CV_BGR5652RGB: i32 = 15;
pub const CV_BGR5652RGBA: i32 = 19;
pub const CV_BGRA2BGR: i32 = 1;
pub const CV_BGRA2BGR555: i32 = 26;
pub const CV_BGRA2BGR565: i32 = 16;
pub const CV_BGRA2GRAY: i32 = 10;
pub const CV_BGRA2RGB: i32 = 3;
pub const CV_BGRA2RGBA: i32 = 5;
pub const CV_BGRA2YUV_I420: i32 = 130;
pub const CV_BGRA2YUV_IYUV: i32 = 130;
pub const CV_BGRA2YUV_YV12: i32 = 134;
pub const CV_BILATERAL: i32 = 4;
pub const CV_BLUR: i32 = 1;
pub const CV_BLUR_NO_SCALE: i32 = 0;
pub const CV_BadAlign: i32 = -21;
pub const CV_BadAlphaChannel: i32 = -18;
pub const CV_BadCOI: i32 = -24;
pub const CV_BadCallBack: i32 = -22;
pub const CV_BadDataPtr: i32 = -12;
pub const CV_BadDepth: i32 = -17;
pub const CV_BadImageSize: i32 = -10;
pub const CV_BadModelOrChSeq: i32 = -14;
pub const CV_BadNumChannel1U: i32 = -16;
pub const CV_BadNumChannels: i32 = -15;
pub const CV_BadOffset: i32 = -11;
pub const CV_BadOrder: i32 = -19;
pub const CV_BadOrigin: i32 = -20;
pub const CV_BadROISize: i32 = -25;
pub const CV_BadStep: i32 = -13;
pub const CV_BadTileSize: i32 = -23;
pub const CV_BayerBG2BGR: i32 = 46;
pub const CV_BayerBG2BGRA: i32 = 139;
pub const CV_BayerBG2BGR_EA: i32 = 135;
pub const CV_BayerBG2BGR_VNG: i32 = 62;
pub const CV_BayerBG2GRAY: i32 = 86;
pub const CV_BayerBG2RGB: i32 = 48;
pub const CV_BayerBG2RGBA: i32 = 141;
pub const CV_BayerBG2RGB_EA: i32 = 137;
pub const CV_BayerBG2RGB_VNG: i32 = 64;
pub const CV_BayerGB2BGR: i32 = 47;
pub const CV_BayerGB2BGRA: i32 = 140;
pub const CV_BayerGB2BGR_EA: i32 = 136;
pub const CV_BayerGB2BGR_VNG: i32 = 63;
pub const CV_BayerGB2GRAY: i32 = 87;
pub const CV_BayerGB2RGB: i32 = 49;
pub const CV_BayerGB2RGBA: i32 = 142;
pub const CV_BayerGB2RGB_EA: i32 = 138;
pub const CV_BayerGB2RGB_VNG: i32 = 65;
pub const CV_BayerGR2BGR: i32 = 49;
pub const CV_BayerGR2BGRA: i32 = 142;
pub const CV_BayerGR2BGR_EA: i32 = 138;
pub const CV_BayerGR2BGR_VNG: i32 = 65;
pub const CV_BayerGR2GRAY: i32 = 89;
pub const CV_BayerGR2RGB: i32 = 47;
pub const CV_BayerGR2RGBA: i32 = 140;
pub const CV_BayerGR2RGB_EA: i32 = 136;
pub const CV_BayerGR2RGB_VNG: i32 = 63;
pub const CV_BayerRG2BGR: i32 = 48;
pub const CV_BayerRG2BGRA: i32 = 141;
pub const CV_BayerRG2BGR_EA: i32 = 137;
pub const CV_BayerRG2BGR_VNG: i32 = 64;
pub const CV_BayerRG2GRAY: i32 = 88;
pub const CV_BayerRG2RGB: i32 = 46;
pub const CV_BayerRG2RGBA: i32 = 139;
pub const CV_BayerRG2RGB_EA: i32 = 135;
pub const CV_BayerRG2RGB_VNG: i32 = 62;
pub const CV_C: i32 = 1;
pub const CV_CALIB_CB_ADAPTIVE_THRESH: i32 = 1;
pub const CV_CALIB_CB_FAST_CHECK: i32 = 8;
pub const CV_CALIB_CB_FILTER_QUADS: i32 = 4;
pub const CV_CALIB_CB_NORMALIZE_IMAGE: i32 = 2;
pub const CV_CALIB_FIX_ASPECT_RATIO: i32 = 2;
pub const CV_CALIB_FIX_FOCAL_LENGTH: i32 = 16;
pub const CV_CALIB_FIX_INTRINSIC: i32 = 256;
pub const CV_CALIB_FIX_K1: i32 = 32;
pub const CV_CALIB_FIX_K2: i32 = 64;
pub const CV_CALIB_FIX_K3: i32 = 128;
pub const CV_CALIB_FIX_K4: i32 = 2048;
pub const CV_CALIB_FIX_K5: i32 = 4096;
pub const CV_CALIB_FIX_K6: i32 = 8192;
pub const CV_CALIB_FIX_PRINCIPAL_POINT: i32 = 4;
pub const CV_CALIB_FIX_S1_S2_S3_S4: i32 = 65536;
pub const CV_CALIB_FIX_TANGENT_DIST: i32 = 2097152;
pub const CV_CALIB_FIX_TAUX_TAUY: i32 = 524288;
pub const CV_CALIB_NINTRINSIC: i32 = 18;
pub const CV_CALIB_RATIONAL_MODEL: i32 = 16384;
pub const CV_CALIB_SAME_FOCAL_LENGTH: i32 = 512;
pub const CV_CALIB_THIN_PRISM_MODEL: i32 = 32768;
pub const CV_CALIB_TILTED_MODEL: i32 = 262144;
pub const CV_CALIB_USE_INTRINSIC_GUESS: i32 = 1;
pub const CV_CALIB_ZERO_DISPARITY: i32 = 1024;
pub const CV_CALIB_ZERO_TANGENT_DIST: i32 = 8;
pub const CV_CANNY_L2_GRADIENT: i32 = (1 << 31);
pub const CV_CAP_ANDROID: i32 = 1000;
pub const CV_CAP_ANY: i32 = 0;
pub const CV_CAP_ARAVIS: i32 = 2100;
pub const CV_CAP_AVFOUNDATION: i32 = 1200;
pub const CV_CAP_CMU1394: i32 = 300;
pub const CV_CAP_DC1394: i32 = 300;
pub const CV_CAP_DSHOW: i32 = 700;
pub const CV_CAP_FFMPEG: i32 = 1900;
pub const CV_CAP_FIREWARE: i32 = 300;
pub const CV_CAP_FIREWIRE: i32 = 300;
pub const CV_CAP_GIGANETIX: i32 = 1300;
pub const CV_CAP_GPHOTO2: i32 = 1700;
pub const CV_CAP_GSTREAMER: i32 = 1800;
pub const CV_CAP_GSTREAMER_QUEUE_LENGTH: i32 = 200;
pub const CV_CAP_IEEE1394: i32 = 300;
pub const CV_CAP_IMAGES: i32 = 2000;
pub const CV_CAP_INTELPERC: i32 = 1500;
pub const CV_CAP_INTELPERC_DEPTH_GENERATOR: i32 = 1 << 29;
pub const CV_CAP_INTELPERC_DEPTH_MAP: i32 = 0;
pub const CV_CAP_INTELPERC_IMAGE: i32 = 3;
pub const CV_CAP_INTELPERC_IMAGE_GENERATOR: i32 = 1 << 28;
pub const CV_CAP_INTELPERC_IR_MAP: i32 = 2;
pub const CV_CAP_INTELPERC_UVDEPTH_MAP: i32 = 1;
pub const CV_CAP_MIL: i32 = 100;
pub const CV_CAP_MODE_BGR: i32 = 0;
pub const CV_CAP_MODE_GRAY: i32 = 2;
pub const CV_CAP_MODE_RGB: i32 = 1;
pub const CV_CAP_MODE_YUYV: i32 = 3;
pub const CV_CAP_MSMF: i32 = 1400;
pub const CV_CAP_OPENNI: i32 = 900;
pub const CV_CAP_OPENNI2: i32 = 1600;
pub const CV_CAP_OPENNI_ASUS: i32 = 910;
pub const CV_CAP_OPENNI_BGR_IMAGE: i32 = 5;
pub const CV_CAP_OPENNI_DEPTH_GENERATOR: i32 = 1 << 31;
pub const CV_CAP_OPENNI_DEPTH_MAP: i32 = 0;
pub const CV_CAP_OPENNI_DISPARITY_MAP: i32 = 2;
pub const CV_CAP_OPENNI_DISPARITY_MAP_32F: i32 = 3;
pub const CV_CAP_OPENNI_GRAY_IMAGE: i32 = 6;
pub const CV_CAP_OPENNI_IMAGE_GENERATOR: i32 = 1 << 30;
pub const CV_CAP_OPENNI_IR_GENERATOR: i32 = 1 << 29;
pub const CV_CAP_OPENNI_IR_IMAGE: i32 = 7;
pub const CV_CAP_OPENNI_POINT_CLOUD_MAP: i32 = 1;
pub const CV_CAP_OPENNI_QVGA_30HZ: i32 = 3;
pub const CV_CAP_OPENNI_QVGA_60HZ: i32 = 4;
pub const CV_CAP_OPENNI_SXGA_15HZ: i32 = 1;
pub const CV_CAP_OPENNI_SXGA_30HZ: i32 = 2;
pub const CV_CAP_OPENNI_VALID_DEPTH_MASK: i32 = 4;
pub const CV_CAP_OPENNI_VGA_30HZ: i32 = 0;
pub const CV_CAP_PROP_ANDROID_ANTIBANDING: i32 = 8004;
pub const CV_CAP_PROP_ANDROID_EXPOSE_LOCK: i32 = 8009;
pub const CV_CAP_PROP_ANDROID_FLASH_MODE: i32 = 8001;
pub const CV_CAP_PROP_ANDROID_FOCAL_LENGTH: i32 = 8005;
pub const CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR: i32 = 8008;
pub const CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR: i32 = 8006;
pub const CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL: i32 = 8007;
pub const CV_CAP_PROP_ANDROID_FOCUS_MODE: i32 = 8002;
pub const CV_CAP_PROP_ANDROID_WHITEBALANCE_LOCK: i32 = 8010;
pub const CV_CAP_PROP_ANDROID_WHITE_BALANCE: i32 = 8003;
pub const CV_CAP_PROP_APERTURE: i32 = 17008;
pub const CV_CAP_PROP_AUTOFOCUS: i32 = 39;
pub const CV_CAP_PROP_AUTOGRAB: i32 = 1024;
pub const CV_CAP_PROP_AUTO_EXPOSURE: i32 = 21;
pub const CV_CAP_PROP_BACKLIGHT: i32 = 32;
pub const CV_CAP_PROP_BRIGHTNESS: i32 = 10;
pub const CV_CAP_PROP_BUFFERSIZE: i32 = 38;
pub const CV_CAP_PROP_CONTRAST: i32 = 11;
pub const CV_CAP_PROP_CONVERT_RGB: i32 = 16;
pub const CV_CAP_PROP_DC1394_MODE_AUTO: i32 = -2;
pub const CV_CAP_PROP_DC1394_MODE_MANUAL: i32 = -3;
pub const CV_CAP_PROP_DC1394_MODE_ONE_PUSH_AUTO: i32 = -1;
pub const CV_CAP_PROP_DC1394_OFF: i32 = -4;
pub const CV_CAP_PROP_EXPOSURE: i32 = 15;
pub const CV_CAP_PROP_EXPOSUREPROGRAM: i32 = 17009;
pub const CV_CAP_PROP_FOCUS: i32 = 28;
pub const CV_CAP_PROP_FORMAT: i32 = 8;
pub const CV_CAP_PROP_FOURCC: i32 = 6;
pub const CV_CAP_PROP_FPS: i32 = 5;
pub const CV_CAP_PROP_FRAME_COUNT: i32 = 7;
pub const CV_CAP_PROP_FRAME_HEIGHT: i32 = 4;
pub const CV_CAP_PROP_FRAME_WIDTH: i32 = 3;
pub const CV_CAP_PROP_GAIN: i32 = 14;
pub const CV_CAP_PROP_GAMMA: i32 = 22;
pub const CV_CAP_PROP_GIGA_FRAME_HEIGH_MAX: i32 = 10004;
pub const CV_CAP_PROP_GIGA_FRAME_OFFSET_X: i32 = 10001;
pub const CV_CAP_PROP_GIGA_FRAME_OFFSET_Y: i32 = 10002;
pub const CV_CAP_PROP_GIGA_FRAME_SENS_HEIGH: i32 = 10006;
pub const CV_CAP_PROP_GIGA_FRAME_SENS_WIDTH: i32 = 10005;
pub const CV_CAP_PROP_GIGA_FRAME_WIDTH_MAX: i32 = 10003;
pub const CV_CAP_PROP_GPHOTO2_COLLECT_MSGS: i32 = 17005;
pub const CV_CAP_PROP_GPHOTO2_FLUSH_MSGS: i32 = 17006;
pub const CV_CAP_PROP_GPHOTO2_PREVIEW: i32 = 17001;
pub const CV_CAP_PROP_GPHOTO2_RELOAD_CONFIG: i32 = 17003;
pub const CV_CAP_PROP_GPHOTO2_RELOAD_ON_CHANGE: i32 = 17004;
pub const CV_CAP_PROP_GPHOTO2_WIDGET_ENUMERATE: i32 = 17002;
pub const CV_CAP_PROP_GUID: i32 = 29;
pub const CV_CAP_PROP_HUE: i32 = 13;
pub const CV_CAP_PROP_INTELPERC_DEPTH_CONFIDENCE_THRESHOLD: i32 = 11005;
pub const CV_CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_HORZ: i32 = 11006;
pub const CV_CAP_PROP_INTELPERC_DEPTH_FOCAL_LENGTH_VERT: i32 = 11007;
pub const CV_CAP_PROP_INTELPERC_DEPTH_LOW_CONFIDENCE_VALUE: i32 = 11003;
pub const CV_CAP_PROP_INTELPERC_DEPTH_SATURATION_VALUE: i32 = 11004;
pub const CV_CAP_PROP_INTELPERC_PROFILE_COUNT: i32 = 11001;
pub const CV_CAP_PROP_INTELPERC_PROFILE_IDX: i32 = 11002;
pub const CV_CAP_PROP_IOS_DEVICE_EXPOSURE: i32 = 9002;
pub const CV_CAP_PROP_IOS_DEVICE_FLASH: i32 = 9003;
pub const CV_CAP_PROP_IOS_DEVICE_FOCUS: i32 = 9001;
pub const CV_CAP_PROP_IOS_DEVICE_TORCH: i32 = 9005;
pub const CV_CAP_PROP_IOS_DEVICE_WHITEBALANCE: i32 = 9004;
pub const CV_CAP_PROP_IRIS: i32 = 36;
pub const CV_CAP_PROP_ISO_SPEED: i32 = 30;
pub const CV_CAP_PROP_MAX_DC1394: i32 = 31;
pub const CV_CAP_PROP_MODE: i32 = 9;
pub const CV_CAP_PROP_MONOCHROME: i32 = 19;
pub const CV_CAP_PROP_OPENNI2_MIRROR: i32 = 111;
pub const CV_CAP_PROP_OPENNI2_SYNC: i32 = 110;
pub const CV_CAP_PROP_OPENNI_APPROX_FRAME_SYNC: i32 = 105;
pub const CV_CAP_PROP_OPENNI_BASELINE: i32 = 102;
pub const CV_CAP_PROP_OPENNI_CIRCLE_BUFFER: i32 = 107;
pub const CV_CAP_PROP_OPENNI_FOCAL_LENGTH: i32 = 103;
pub const CV_CAP_PROP_OPENNI_FRAME_MAX_DEPTH: i32 = 101;
pub const CV_CAP_PROP_OPENNI_GENERATOR_PRESENT: i32 = 109;
pub const CV_CAP_PROP_OPENNI_MAX_BUFFER_SIZE: i32 = 106;
pub const CV_CAP_PROP_OPENNI_MAX_TIME_DURATION: i32 = 108;
pub const CV_CAP_PROP_OPENNI_OUTPUT_MODE: i32 = 100;
pub const CV_CAP_PROP_OPENNI_REGISTRATION: i32 = 104;
pub const CV_CAP_PROP_OPENNI_REGISTRATION_ON: i32 = 104;
pub const CV_CAP_PROP_PAN: i32 = 33;
pub const CV_CAP_PROP_POS_AVI_RATIO: i32 = 2;
pub const CV_CAP_PROP_POS_FRAMES: i32 = 1;
pub const CV_CAP_PROP_POS_MSEC: i32 = 0;
pub const CV_CAP_PROP_PREVIEW_FORMAT: i32 = 1026;
pub const CV_CAP_PROP_PVAPI_BINNINGX: i32 = 304;
pub const CV_CAP_PROP_PVAPI_BINNINGY: i32 = 305;
pub const CV_CAP_PROP_PVAPI_DECIMATIONHORIZONTAL: i32 = 302;
pub const CV_CAP_PROP_PVAPI_DECIMATIONVERTICAL: i32 = 303;
pub const CV_CAP_PROP_PVAPI_FRAMESTARTTRIGGERMODE: i32 = 301;
pub const CV_CAP_PROP_PVAPI_MULTICASTIP: i32 = 300;
pub const CV_CAP_PROP_PVAPI_PIXELFORMAT: i32 = 306;
pub const CV_CAP_PROP_RECTIFICATION: i32 = 18;
pub const CV_CAP_PROP_ROLL: i32 = 35;
pub const CV_CAP_PROP_SAR_DEN: i32 = 41;
pub const CV_CAP_PROP_SAR_NUM: i32 = 40;
pub const CV_CAP_PROP_SATURATION: i32 = 12;
pub const CV_CAP_PROP_SETTINGS: i32 = 37;
pub const CV_CAP_PROP_SHARPNESS: i32 = 20;
pub const CV_CAP_PROP_SPEED: i32 = 17007;
pub const CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING: i32 = 1025;
pub const CV_CAP_PROP_TEMPERATURE: i32 = 23;
pub const CV_CAP_PROP_TILT: i32 = 34;
pub const CV_CAP_PROP_TRIGGER: i32 = 24;
pub const CV_CAP_PROP_TRIGGER_DELAY: i32 = 25;
pub const CV_CAP_PROP_VIEWFINDER: i32 = 17010;
pub const CV_CAP_PROP_WHITE_BALANCE_BLUE_U: i32 = 17;
pub const CV_CAP_PROP_WHITE_BALANCE_RED_V: i32 = 26;
pub const CV_CAP_PROP_XI_ACQ_BUFFER_SIZE: i32 = 548;
pub const CV_CAP_PROP_XI_ACQ_BUFFER_SIZE_UNIT: i32 = 549;
pub const CV_CAP_PROP_XI_ACQ_FRAME_BURST_COUNT: i32 = 499;
pub const CV_CAP_PROP_XI_ACQ_TIMING_MODE: i32 = 538;
pub const CV_CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_COMMIT: i32 = 552;
pub const CV_CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_SIZE: i32 = 550;
pub const CV_CAP_PROP_XI_AEAG: i32 = 415;
pub const CV_CAP_PROP_XI_AEAG_LEVEL: i32 = 419;
pub const CV_CAP_PROP_XI_AEAG_ROI_HEIGHT: i32 = 442;
pub const CV_CAP_PROP_XI_AEAG_ROI_OFFSET_X: i32 = 439;
pub const CV_CAP_PROP_XI_AEAG_ROI_OFFSET_Y: i32 = 440;
pub const CV_CAP_PROP_XI_AEAG_ROI_WIDTH: i32 = 441;
pub const CV_CAP_PROP_XI_AE_MAX_LIMIT: i32 = 417;
pub const CV_CAP_PROP_XI_AG_MAX_LIMIT: i32 = 418;
pub const CV_CAP_PROP_XI_APPLY_CMS: i32 = 471;
pub const CV_CAP_PROP_XI_AUTO_BANDWIDTH_CALCULATION: i32 = 573;
pub const CV_CAP_PROP_XI_AUTO_WB: i32 = 414;
pub const CV_CAP_PROP_XI_AVAILABLE_BANDWIDTH: i32 = 539;
pub const CV_CAP_PROP_XI_BINNING_HORIZONTAL: i32 = 429;
pub const CV_CAP_PROP_XI_BINNING_PATTERN: i32 = 430;
pub const CV_CAP_PROP_XI_BINNING_SELECTOR: i32 = 427;
pub const CV_CAP_PROP_XI_BINNING_VERTICAL: i32 = 428;
pub const CV_CAP_PROP_XI_BPC: i32 = 445;
pub const CV_CAP_PROP_XI_BUFFERS_QUEUE_SIZE: i32 = 551;
pub const CV_CAP_PROP_XI_BUFFER_POLICY: i32 = 540;
pub const CV_CAP_PROP_XI_CC_MATRIX_00: i32 = 479;
pub const CV_CAP_PROP_XI_CC_MATRIX_01: i32 = 480;
pub const CV_CAP_PROP_XI_CC_MATRIX_02: i32 = 481;
pub const CV_CAP_PROP_XI_CC_MATRIX_03: i32 = 482;
pub const CV_CAP_PROP_XI_CC_MATRIX_10: i32 = 483;
pub const CV_CAP_PROP_XI_CC_MATRIX_11: i32 = 484;
pub const CV_CAP_PROP_XI_CC_MATRIX_12: i32 = 485;
pub const CV_CAP_PROP_XI_CC_MATRIX_13: i32 = 486;
pub const CV_CAP_PROP_XI_CC_MATRIX_20: i32 = 487;
pub const CV_CAP_PROP_XI_CC_MATRIX_21: i32 = 488;
pub const CV_CAP_PROP_XI_CC_MATRIX_22: i32 = 489;
pub const CV_CAP_PROP_XI_CC_MATRIX_23: i32 = 490;
pub const CV_CAP_PROP_XI_CC_MATRIX_30: i32 = 491;
pub const CV_CAP_PROP_XI_CC_MATRIX_31: i32 = 492;
pub const CV_CAP_PROP_XI_CC_MATRIX_32: i32 = 493;
pub const CV_CAP_PROP_XI_CC_MATRIX_33: i32 = 494;
pub const CV_CAP_PROP_XI_CHIP_TEMP: i32 = 468;
pub const CV_CAP_PROP_XI_CMS: i32 = 470;
pub const CV_CAP_PROP_XI_COLOR_FILTER_ARRAY: i32 = 475;
pub const CV_CAP_PROP_XI_COLUMN_FPN_CORRECTION: i32 = 555;
pub const CV_CAP_PROP_XI_COOLING: i32 = 466;
pub const CV_CAP_PROP_XI_COUNTER_SELECTOR: i32 = 536;
pub const CV_CAP_PROP_XI_COUNTER_VALUE: i32 = 537;
pub const CV_CAP_PROP_XI_DATA_FORMAT: i32 = 401;
pub const CV_CAP_PROP_XI_DEBOUNCE_EN: i32 = 507;
pub const CV_CAP_PROP_XI_DEBOUNCE_POL: i32 = 510;
pub const CV_CAP_PROP_XI_DEBOUNCE_T0: i32 = 508;
pub const CV_CAP_PROP_XI_DEBOUNCE_T1: i32 = 509;
pub const CV_CAP_PROP_XI_DEBUG_LEVEL: i32 = 572;
pub const CV_CAP_PROP_XI_DECIMATION_HORIZONTAL: i32 = 433;
pub const CV_CAP_PROP_XI_DECIMATION_PATTERN: i32 = 434;
pub const CV_CAP_PROP_XI_DECIMATION_SELECTOR: i32 = 431;
pub const CV_CAP_PROP_XI_DECIMATION_VERTICAL: i32 = 432;
pub const CV_CAP_PROP_XI_DEFAULT_CC_MATRIX: i32 = 495;
pub const CV_CAP_PROP_XI_DEVICE_MODEL_ID: i32 = 521;
pub const CV_CAP_PROP_XI_DEVICE_RESET: i32 = 554;
pub const CV_CAP_PROP_XI_DEVICE_SN: i32 = 522;
pub const CV_CAP_PROP_XI_DOWNSAMPLING: i32 = 400;
pub const CV_CAP_PROP_XI_DOWNSAMPLING_TYPE: i32 = 426;
pub const CV_CAP_PROP_XI_EXPOSURE: i32 = 421;
pub const CV_CAP_PROP_XI_EXPOSURE_BURST_COUNT: i32 = 422;
pub const CV_CAP_PROP_XI_EXP_PRIORITY: i32 = 416;
pub const CV_CAP_PROP_XI_FFS_ACCESS_KEY: i32 = 583;
pub const CV_CAP_PROP_XI_FFS_FILE_ID: i32 = 594;
pub const CV_CAP_PROP_XI_FFS_FILE_SIZE: i32 = 580;
pub const CV_CAP_PROP_XI_FRAMERATE: i32 = 535;
pub const CV_CAP_PROP_XI_FREE_FFS_SIZE: i32 = 581;
pub const CV_CAP_PROP_XI_GAIN: i32 = 424;
pub const CV_CAP_PROP_XI_GAIN_SELECTOR: i32 = 423;
pub const CV_CAP_PROP_XI_GAMMAC: i32 = 477;
pub const CV_CAP_PROP_XI_GAMMAY: i32 = 476;
pub const CV_CAP_PROP_XI_GPI_LEVEL: i32 = 408;
pub const CV_CAP_PROP_XI_GPI_MODE: i32 = 407;
pub const CV_CAP_PROP_XI_GPI_SELECTOR: i32 = 406;
pub const CV_CAP_PROP_XI_GPO_MODE: i32 = 410;
pub const CV_CAP_PROP_XI_GPO_SELECTOR: i32 = 409;
pub const CV_CAP_PROP_XI_HDR: i32 = 559;
pub const CV_CAP_PROP_XI_HDR_KNEEPOINT_COUNT: i32 = 560;
pub const CV_CAP_PROP_XI_HDR_T1: i32 = 561;
pub const CV_CAP_PROP_XI_HDR_T2: i32 = 562;
pub const CV_CAP_PROP_XI_HEIGHT: i32 = 452;
pub const CV_CAP_PROP_XI_HOUS_BACK_SIDE_TEMP: i32 = 590;
pub const CV_CAP_PROP_XI_HOUS_TEMP: i32 = 469;
pub const CV_CAP_PROP_XI_HW_REVISION: i32 = 571;
pub const CV_CAP_PROP_XI_IMAGE_BLACK_LEVEL: i32 = 565;
pub const CV_CAP_PROP_XI_IMAGE_DATA_BIT_DEPTH: i32 = 462;
pub const CV_CAP_PROP_XI_IMAGE_DATA_FORMAT: i32 = 435;
pub const CV_CAP_PROP_XI_IMAGE_DATA_FORMAT_RGB32_ALPHA: i32 = 529;
pub const CV_CAP_PROP_XI_IMAGE_IS_COLOR: i32 = 474;
pub const CV_CAP_PROP_XI_IMAGE_PAYLOAD_SIZE: i32 = 530;
pub const CV_CAP_PROP_XI_IS_COOLED: i32 = 465;
pub const CV_CAP_PROP_XI_IS_DEVICE_EXIST: i32 = 547;
pub const CV_CAP_PROP_XI_KNEEPOINT1: i32 = 563;
pub const CV_CAP_PROP_XI_KNEEPOINT2: i32 = 564;
pub const CV_CAP_PROP_XI_LED_MODE: i32 = 412;
pub const CV_CAP_PROP_XI_LED_SELECTOR: i32 = 411;
pub const CV_CAP_PROP_XI_LENS_APERTURE_VALUE: i32 = 512;
pub const CV_CAP_PROP_XI_LENS_FEATURE: i32 = 518;
pub const CV_CAP_PROP_XI_LENS_FEATURE_SELECTOR: i32 = 517;
pub const CV_CAP_PROP_XI_LENS_FOCAL_LENGTH: i32 = 516;
pub const CV_CAP_PROP_XI_LENS_FOCUS_DISTANCE: i32 = 515;
pub const CV_CAP_PROP_XI_LENS_FOCUS_MOVE: i32 = 514;
pub const CV_CAP_PROP_XI_LENS_FOCUS_MOVEMENT_VALUE: i32 = 513;
pub const CV_CAP_PROP_XI_LENS_MODE: i32 = 511;
pub const CV_CAP_PROP_XI_LIMIT_BANDWIDTH: i32 = 459;
pub const CV_CAP_PROP_XI_LUT_EN: i32 = 541;
pub const CV_CAP_PROP_XI_LUT_INDEX: i32 = 542;
pub const CV_CAP_PROP_XI_LUT_VALUE: i32 = 543;
pub const CV_CAP_PROP_XI_MANUAL_WB: i32 = 413;
pub const CV_CAP_PROP_XI_OFFSET_X: i32 = 402;
pub const CV_CAP_PROP_XI_OFFSET_Y: i32 = 403;
pub const CV_CAP_PROP_XI_OUTPUT_DATA_BIT_DEPTH: i32 = 461;
pub const CV_CAP_PROP_XI_OUTPUT_DATA_PACKING: i32 = 463;
pub const CV_CAP_PROP_XI_OUTPUT_DATA_PACKING_TYPE: i32 = 464;
pub const CV_CAP_PROP_XI_RECENT_FRAME: i32 = 553;
pub const CV_CAP_PROP_XI_REGION_MODE: i32 = 595;
pub const CV_CAP_PROP_XI_REGION_SELECTOR: i32 = 589;
pub const CV_CAP_PROP_XI_ROW_FPN_CORRECTION: i32 = 591;
pub const CV_CAP_PROP_XI_SENSOR_BOARD_TEMP: i32 = 596;
pub const CV_CAP_PROP_XI_SENSOR_CLOCK_FREQ_HZ: i32 = 532;
pub const CV_CAP_PROP_XI_SENSOR_CLOCK_FREQ_INDEX: i32 = 533;
pub const CV_CAP_PROP_XI_SENSOR_DATA_BIT_DEPTH: i32 = 460;
pub const CV_CAP_PROP_XI_SENSOR_FEATURE_SELECTOR: i32 = 585;
pub const CV_CAP_PROP_XI_SENSOR_FEATURE_VALUE: i32 = 586;
pub const CV_CAP_PROP_XI_SENSOR_MODE: i32 = 558;
pub const CV_CAP_PROP_XI_SENSOR_OUTPUT_CHANNEL_COUNT: i32 = 534;
pub const CV_CAP_PROP_XI_SENSOR_TAPS: i32 = 437;
pub const CV_CAP_PROP_XI_SHARPNESS: i32 = 478;
pub const CV_CAP_PROP_XI_SHUTTER_TYPE: i32 = 436;
pub const CV_CAP_PROP_XI_TARGET_TEMP: i32 = 467;
pub const CV_CAP_PROP_XI_TEST_PATTERN: i32 = 588;
pub const CV_CAP_PROP_XI_TEST_PATTERN_GENERATOR_SELECTOR: i32 = 587;
pub const CV_CAP_PROP_XI_TIMEOUT: i32 = 420;
pub const CV_CAP_PROP_XI_TRANSPORT_PIXEL_FORMAT: i32 = 531;
pub const CV_CAP_PROP_XI_TRG_DELAY: i32 = 544;
pub const CV_CAP_PROP_XI_TRG_SELECTOR: i32 = 498;
pub const CV_CAP_PROP_XI_TRG_SOFTWARE: i32 = 405;
pub const CV_CAP_PROP_XI_TRG_SOURCE: i32 = 404;
pub const CV_CAP_PROP_XI_TS_RST_MODE: i32 = 545;
pub const CV_CAP_PROP_XI_TS_RST_SOURCE: i32 = 546;
pub const CV_CAP_PROP_XI_USED_FFS_SIZE: i32 = 582;
pub const CV_CAP_PROP_XI_WB_KB: i32 = 450;
pub const CV_CAP_PROP_XI_WB_KG: i32 = 449;
pub const CV_CAP_PROP_XI_WB_KR: i32 = 448;
pub const CV_CAP_PROP_XI_WIDTH: i32 = 451;
pub const CV_CAP_PROP_ZOOM: i32 = 27;
pub const CV_CAP_PVAPI: i32 = 800;
pub const CV_CAP_QT: i32 = 500;
pub const CV_CAP_STEREO: i32 = 400;
pub const CV_CAP_TYZX: i32 = 400;
pub const CV_CAP_UNICAP: i32 = 600;
pub const CV_CAP_V4L: i32 = 200;
pub const CV_CAP_V4L2: i32 = 200;
pub const CV_CAP_VFW: i32 = 200;
pub const CV_CAP_XIAPI: i32 = 1100;
pub const CV_CHAIN_APPROX_NONE: i32 = 1;
pub const CV_CHAIN_APPROX_SIMPLE: i32 = 2;
pub const CV_CHAIN_APPROX_TC89_KCOS: i32 = 4;
pub const CV_CHAIN_APPROX_TC89_L1: i32 = 3;
pub const CV_CHAIN_CODE: i32 = 0;
pub const CV_CHECKBOX: i32 = 1;
pub const CV_CHECK_QUIET: i32 = 2;
pub const CV_CHECK_RANGE: i32 = 1;
pub const CV_CHOLESKY: i32 = 3;
pub const CV_CLOCKWISE: i32 = 1;
pub const CV_CMP_EQ: i32 = 0;
pub const CV_CMP_GE: i32 = 2;
pub const CV_CMP_GT: i32 = 1;
pub const CV_CMP_LE: i32 = 4;
pub const CV_CMP_LT: i32 = 3;
pub const CV_CMP_NE: i32 = 5;
pub const CV_CN_MAX: i32 = 512;
pub const CV_CN_SHIFT: i32 = 3;
pub const CV_COLORCVT_MAX: i32 = 143;
pub const CV_COMP_BHATTACHARYYA: i32 = 3;
pub const CV_COMP_CHISQR: i32 = 1;
pub const CV_COMP_CHISQR_ALT: i32 = 4;
pub const CV_COMP_CORREL: i32 = 0;
pub const CV_COMP_HELLINGER: i32 = 3;
pub const CV_COMP_INTERSECT: i32 = 2;
pub const CV_COMP_KL_DIV: i32 = 5;
pub const CV_CONTOURS_MATCH_I1: i32 = 1;
pub const CV_CONTOURS_MATCH_I2: i32 = 2;
pub const CV_CONTOURS_MATCH_I3: i32 = 3;
pub const CV_COUNTER_CLOCKWISE: i32 = 2;
pub const CV_COVAR_COLS: i32 = 16;
pub const CV_COVAR_NORMAL: i32 = 1;
pub const CV_COVAR_ROWS: i32 = 8;
pub const CV_COVAR_SCALE: i32 = 4;
pub const CV_COVAR_SCRAMBLED: i32 = 0;
pub const CV_COVAR_USE_AVG: i32 = 2;
pub const CV_CPU_AVX: i32 = 10;
pub const CV_CPU_AVX2: i32 = 11;
pub const CV_CPU_AVX512_SKX: i32 = 256;
pub const CV_CPU_AVX_512BW: i32 = 14;
pub const CV_CPU_AVX_512CD: i32 = 15;
pub const CV_CPU_AVX_512DQ: i32 = 16;
pub const CV_CPU_AVX_512ER: i32 = 17;
pub const CV_CPU_AVX_512F: i32 = 13;
pub const CV_CPU_AVX_512IFMA: i32 = 18;
/// deprecated
pub const CV_CPU_AVX_512IFMA512: i32 = 18;
pub const CV_CPU_AVX_512PF: i32 = 19;
pub const CV_CPU_AVX_512VBMI: i32 = 20;
pub const CV_CPU_AVX_512VL: i32 = 21;
pub const CV_CPU_FMA3: i32 = 12;
pub const CV_CPU_FP16: i32 = 9;
pub const CV_CPU_MMX: i32 = 1;
pub const CV_CPU_NEON: i32 = 100;
pub const CV_CPU_NONE: i32 = 0;
pub const CV_CPU_POPCNT: i32 = 8;
pub const CV_CPU_SSE: i32 = 2;
pub const CV_CPU_SSE2: i32 = 3;
pub const CV_CPU_SSE3: i32 = 4;
pub const CV_CPU_SSE4_1: i32 = 6;
pub const CV_CPU_SSE4_2: i32 = 7;
pub const CV_CPU_SSSE3: i32 = 5;
pub const CV_CPU_VSX: i32 = 200;
pub const CV_CPU_VSX3: i32 = 201;
pub const CV_CVTIMG_FLIP: i32 = 1;
pub const CV_CVTIMG_SWAP_RB: i32 = 2;
pub const CV_DIFF: i32 = 16;
pub const CV_DIST_C: i32 = 3;
pub const CV_DIST_FAIR: i32 = 5;
pub const CV_DIST_HUBER: i32 = 7;
pub const CV_DIST_L1: i32 = 1;
pub const CV_DIST_L12: i32 = 4;
pub const CV_DIST_L2: i32 = 2;
pub const CV_DIST_LABEL_CCOMP: i32 = 0;
pub const CV_DIST_LABEL_PIXEL: i32 = 1;
pub const CV_DIST_MASK_3: i32 = 3;
pub const CV_DIST_MASK_5: i32 = 5;
pub const CV_DIST_MASK_PRECISE: i32 = 0;
pub const CV_DIST_USER: i32 = -1;
pub const CV_DIST_WELSCH: i32 = 6;
pub const CV_DLS: i32 = 3;
pub const CV_DXT_FORWARD: i32 = 0;
pub const CV_DXT_INVERSE: i32 = 1;
/// < conjugate the second argument of cvMulSpectrums
pub const CV_DXT_MUL_CONJ: i32 = 8;
/// < transform each row individually
pub const CV_DXT_ROWS: i32 = 4;
/// < divide result by size of array
pub const CV_DXT_SCALE: i32 = 2;
pub const CV_EPNP: i32 = 1;
pub const CV_EVENT_FLAG_ALTKEY: i32 = 32;
pub const CV_EVENT_FLAG_CTRLKEY: i32 = 8;
pub const CV_EVENT_FLAG_LBUTTON: i32 = 1;
pub const CV_EVENT_FLAG_MBUTTON: i32 = 4;
pub const CV_EVENT_FLAG_RBUTTON: i32 = 2;
pub const CV_EVENT_FLAG_SHIFTKEY: i32 = 16;
pub const CV_EVENT_LBUTTONDBLCLK: i32 = 7;
pub const CV_EVENT_LBUTTONDOWN: i32 = 1;
pub const CV_EVENT_LBUTTONUP: i32 = 4;
pub const CV_EVENT_MBUTTONDBLCLK: i32 = 9;
pub const CV_EVENT_MBUTTONDOWN: i32 = 3;
pub const CV_EVENT_MBUTTONUP: i32 = 6;
pub const CV_EVENT_MOUSEHWHEEL: i32 = 11;
pub const CV_EVENT_MOUSEMOVE: i32 = 0;
pub const CV_EVENT_MOUSEWHEEL: i32 = 10;
pub const CV_EVENT_RBUTTONDBLCLK: i32 = 8;
pub const CV_EVENT_RBUTTONDOWN: i32 = 2;
pub const CV_EVENT_RBUTTONUP: i32 = 5;
pub const CV_FILLED: i32 = -1;
pub const CV_FLOODFILL_FIXED_RANGE: i32 = (1 << 16);
pub const CV_FLOODFILL_MASK_ONLY: i32 = (1 << 17);
pub const CV_FM_7POINT: i32 = 1;
pub const CV_FM_8POINT: i32 = 2;
pub const CV_FM_LMEDS: i32 = 4;
pub const CV_FM_LMEDS_ONLY: i32 = 4;
pub const CV_FM_RANSAC: i32 = 8;
pub const CV_FM_RANSAC_ONLY: i32 = 8;
pub const CV_FONT_BLACK: i32 = 87;
pub const CV_FONT_BOLD: i32 = 75;
pub const CV_FONT_DEMIBOLD: i32 = 63;
pub const CV_FONT_HERSHEY_COMPLEX: i32 = 3;
pub const CV_FONT_HERSHEY_COMPLEX_SMALL: i32 = 5;
pub const CV_FONT_HERSHEY_DUPLEX: i32 = 2;
pub const CV_FONT_HERSHEY_PLAIN: i32 = 1;
pub const CV_FONT_HERSHEY_SCRIPT_COMPLEX: i32 = 7;
pub const CV_FONT_HERSHEY_SCRIPT_SIMPLEX: i32 = 6;
pub const CV_FONT_HERSHEY_SIMPLEX: i32 = 0;
pub const CV_FONT_HERSHEY_TRIPLEX: i32 = 4;
pub const CV_FONT_ITALIC: i32 = 16;
pub const CV_FONT_LIGHT: i32 = 25;
pub const CV_FONT_NORMAL: i32 = 50;
pub const CV_FONT_VECTOR0: i32 = 0;
pub const CV_FOURCC_PROMPT: i32 = -1;
pub const CV_FRONT: i32 = 1;
pub const CV_GAUSSIAN: i32 = 2;
pub const CV_GAUSSIAN_5x5: i32 = 7;
pub const CV_GEMM_A_T: i32 = 1;
pub const CV_GEMM_B_T: i32 = 2;
pub const CV_GEMM_C_T: i32 = 4;
pub const CV_GRAPH_ALL_ITEMS: i32 = -1;
pub const CV_GRAPH_ANY_EDGE: i32 = 30;
pub const CV_GRAPH_BACKTRACKING: i32 = 64;
pub const CV_GRAPH_BACK_EDGE: i32 = 4;
pub const CV_GRAPH_CROSS_EDGE: i32 = 16;
pub const CV_GRAPH_FORWARD_EDGE: i32 = 8;
pub const CV_GRAPH_FORWARD_EDGE_FLAG: i32 = (1 << 28);
pub const CV_GRAPH_ITEM_VISITED_FLAG: i32 = (1 << 30);
pub const CV_GRAPH_NEW_TREE: i32 = 32;
pub const CV_GRAPH_OVER: i32 = -1;
pub const CV_GRAPH_SEARCH_TREE_NODE_FLAG: i32 = (1 << 29);
pub const CV_GRAPH_TREE_EDGE: i32 = 2;
pub const CV_GRAPH_VERTEX: i32 = 1;
pub const CV_GRAY2BGR: i32 = 8;
pub const CV_GRAY2BGR555: i32 = 30;
pub const CV_GRAY2BGR565: i32 = 20;
pub const CV_GRAY2BGRA: i32 = 9;
pub const CV_GRAY2RGB: i32 = 8;
pub const CV_GRAY2RGBA: i32 = 9;
pub const CV_GUI_EXPANDED: i32 = 0x00000000;
pub const CV_GUI_NORMAL: i32 = 0x00000010;
pub const CV_GpuApiCallError: i32 = -217;
pub const CV_GpuNotSupported: i32 = -216;
pub const CV_HAAR_DO_CANNY_PRUNING: i32 = 1;
pub const CV_HAAR_DO_ROUGH_SEARCH: i32 = 8;
pub const CV_HAAR_FEATURE_MAX: i32 = 3;
pub const CV_HAAR_FIND_BIGGEST_OBJECT: i32 = 4;
pub const CV_HAAR_MAGIC_VAL: i32 = 0x42500000;
pub const CV_HAAR_SCALE_IMAGE: i32 = 2;
pub const CV_HAAR_STAGE_MAX: i32 = 1000;
pub const CV_HAL_ADAPTIVE_THRESH_GAUSSIAN_C: i32 = 1;
pub const CV_HAL_ADAPTIVE_THRESH_MEAN_C: i32 = 0;
pub const CV_HAL_BORDER_CONSTANT: i32 = 0;
pub const CV_HAL_BORDER_ISOLATED: i32 = 16;
pub const CV_HAL_BORDER_REFLECT: i32 = 2;
pub const CV_HAL_BORDER_REFLECT_101: i32 = 4;
pub const CV_HAL_BORDER_REPLICATE: i32 = 1;
pub const CV_HAL_BORDER_TRANSPARENT: i32 = 5;
pub const CV_HAL_BORDER_WRAP: i32 = 3;
pub const CV_HAL_CMP_EQ: i32 = 0;
pub const CV_HAL_CMP_GE: i32 = 2;
pub const CV_HAL_CMP_GT: i32 = 1;
pub const CV_HAL_CMP_LE: i32 = 4;
pub const CV_HAL_CMP_LT: i32 = 3;
pub const CV_HAL_CMP_NE: i32 = 5;
pub const CV_HAL_DFT_COMPLEX_OUTPUT: i32 = 16;
pub const CV_HAL_DFT_INVERSE: i32 = 1;
pub const CV_HAL_DFT_IS_CONTINUOUS: i32 = 512;
pub const CV_HAL_DFT_IS_INPLACE: i32 = 1024;
pub const CV_HAL_DFT_REAL_OUTPUT: i32 = 32;
pub const CV_HAL_DFT_ROWS: i32 = 4;
pub const CV_HAL_DFT_SCALE: i32 = 2;
pub const CV_HAL_DFT_STAGE_COLS: i32 = 128;
pub const CV_HAL_DFT_TWO_STAGE: i32 = 64;
pub const CV_HAL_ERROR_NOT_IMPLEMENTED: i32 = 1;
pub const CV_HAL_ERROR_OK: i32 = 0;
pub const CV_HAL_ERROR_UNKNOWN: i32 = -1;
pub const CV_HAL_GEMM_1_T: i32 = 1;
pub const CV_HAL_GEMM_2_T: i32 = 2;
pub const CV_HAL_GEMM_3_T: i32 = 4;
pub const CV_HAL_INTER_AREA: i32 = 3;
pub const CV_HAL_INTER_CUBIC: i32 = 2;
pub const CV_HAL_INTER_LANCZOS4: i32 = 4;
pub const CV_HAL_INTER_LINEAR: i32 = 1;
pub const CV_HAL_INTER_NEAREST: i32 = 0;
pub const CV_HAL_MORPH_DILATE: i32 = 1;
pub const CV_HAL_MORPH_ERODE: i32 = 0;
pub const CV_HAL_SVD_FULL_UV: i32 = 8;
pub const CV_HAL_SVD_MODIFY_A: i32 = 4;
pub const CV_HAL_SVD_NO_UV: i32 = 1;
pub const CV_HAL_SVD_SHORT_UV: i32 = 2;
pub const CV_HAL_THRESH_BINARY: i32 = 0;
pub const CV_HAL_THRESH_BINARY_INV: i32 = 1;
pub const CV_HAL_THRESH_MASK: i32 = 7;
pub const CV_HAL_THRESH_OTSU: i32 = 8;
pub const CV_HAL_THRESH_TOZERO: i32 = 3;
pub const CV_HAL_THRESH_TOZERO_INV: i32 = 4;
pub const CV_HAL_THRESH_TRIANGLE: i32 = 16;
pub const CV_HAL_THRESH_TRUNC: i32 = 2;
pub const CV_HAL_TYPE_5_8: i32 = 0;
pub const CV_HAL_TYPE_7_12: i32 = 1;
pub const CV_HAL_TYPE_9_16: i32 = 2;
pub const CV_HARDWARE_MAX_FEATURE: i32 = 512;
pub const CV_HIST_ARRAY: i32 = 0;
pub const CV_HIST_MAGIC_VAL: i32 = 0x42450000;
pub const CV_HIST_RANGES_FLAG: i32 = (1 << 11);
pub const CV_HIST_SPARSE: i32 = 1;
pub const CV_HIST_TREE: i32 = 1;
pub const CV_HIST_UNIFORM: i32 = 1;
pub const CV_HIST_UNIFORM_FLAG: i32 = (1 << 10);
pub const CV_HLS2BGR: i32 = 60;
pub const CV_HLS2BGR_FULL: i32 = 72;
pub const CV_HLS2RGB: i32 = 61;
pub const CV_HLS2RGB_FULL: i32 = 73;
pub const CV_HOUGH_GRADIENT: i32 = 3;
pub const CV_HOUGH_MULTI_SCALE: i32 = 2;
pub const CV_HOUGH_PROBABILISTIC: i32 = 1;
pub const CV_HOUGH_STANDARD: i32 = 0;
pub const CV_HSV2BGR: i32 = 54;
pub const CV_HSV2BGR_FULL: i32 = 70;
pub const CV_HSV2RGB: i32 = 55;
pub const CV_HSV2RGB_FULL: i32 = 71;
pub const CV_HeaderIsNull: i32 = -9;
pub const CV_IMWRITE_EXR_TYPE: i32 = 48;
pub const CV_IMWRITE_JPEG_CHROMA_QUALITY: i32 = 6;
pub const CV_IMWRITE_JPEG_LUMA_QUALITY: i32 = 5;
pub const CV_IMWRITE_JPEG_OPTIMIZE: i32 = 3;
pub const CV_IMWRITE_JPEG_PROGRESSIVE: i32 = 2;
pub const CV_IMWRITE_JPEG_QUALITY: i32 = 1;
pub const CV_IMWRITE_JPEG_RST_INTERVAL: i32 = 4;
pub const CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE: i32 = 1;
pub const CV_IMWRITE_PAM_FORMAT_GRAYSCALE: i32 = 2;
pub const CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA: i32 = 3;
pub const CV_IMWRITE_PAM_FORMAT_NULL: i32 = 0;
pub const CV_IMWRITE_PAM_FORMAT_RGB: i32 = 4;
pub const CV_IMWRITE_PAM_FORMAT_RGB_ALPHA: i32 = 5;
pub const CV_IMWRITE_PAM_TUPLETYPE: i32 = 128;
pub const CV_IMWRITE_PNG_BILEVEL: i32 = 18;
pub const CV_IMWRITE_PNG_COMPRESSION: i32 = 16;
pub const CV_IMWRITE_PNG_STRATEGY: i32 = 17;
pub const CV_IMWRITE_PNG_STRATEGY_DEFAULT: i32 = 0;
pub const CV_IMWRITE_PNG_STRATEGY_FILTERED: i32 = 1;
pub const CV_IMWRITE_PNG_STRATEGY_FIXED: i32 = 4;
pub const CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY: i32 = 2;
pub const CV_IMWRITE_PNG_STRATEGY_RLE: i32 = 3;
pub const CV_IMWRITE_PXM_BINARY: i32 = 32;
pub const CV_IMWRITE_WEBP_QUALITY: i32 = 64;
pub const CV_INPAINT_NS: i32 = 0;
pub const CV_INPAINT_TELEA: i32 = 1;
pub const CV_INTER_AREA: i32 = 3;
pub const CV_INTER_CUBIC: i32 = 2;
pub const CV_INTER_LANCZOS4: i32 = 4;
pub const CV_INTER_LINEAR: i32 = 1;
pub const CV_INTER_NN: i32 = 0;
pub const CV_ITERATIVE: i32 = 0;
pub const CV_KMEANS_USE_INITIAL_LABELS: i32 = 1;
pub const CV_L1: i32 = 2;
pub const CV_L2: i32 = 4;
pub const CV_LBGR2Lab: i32 = 74;
pub const CV_LBGR2Luv: i32 = 76;
pub const CV_LINK_RUNS: i32 = 5;
pub const CV_LKFLOW_GET_MIN_EIGENVALS: i32 = 8;
pub const CV_LKFLOW_INITIAL_GUESSES: i32 = 4;
pub const CV_LKFLOW_PYR_A_READY: i32 = 1;
pub const CV_LKFLOW_PYR_B_READY: i32 = 2;
pub const CV_LMEDS: i32 = 4;
pub const CV_LOAD_IMAGE_ANYCOLOR: i32 = 4;
pub const CV_LOAD_IMAGE_ANYDEPTH: i32 = 2;
pub const CV_LOAD_IMAGE_COLOR: i32 = 1;
pub const CV_LOAD_IMAGE_GRAYSCALE: i32 = 0;
pub const CV_LOAD_IMAGE_IGNORE_ORIENTATION: i32 = 128;
pub const CV_LOAD_IMAGE_UNCHANGED: i32 = -1;
/// !< Debug message. Disabled in the "Release" build.
pub const CV_LOG_LEVEL_DEBUG: i32 = 5;
/// !< Error message
pub const CV_LOG_LEVEL_ERROR: i32 = 2;
/// !< Fatal (critical) error (unrecoverable internal error)
pub const CV_LOG_LEVEL_FATAL: i32 = 1;
/// !< Info message
pub const CV_LOG_LEVEL_INFO: i32 = 4;
/// !< for using in setLogLevel() call
pub const CV_LOG_LEVEL_SILENT: i32 = 0;
/// !< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build.
pub const CV_LOG_LEVEL_VERBOSE: i32 = 6;
/// !< Warning message
pub const CV_LOG_LEVEL_WARN: i32 = 3;
pub const CV_LRGB2Lab: i32 = 75;
pub const CV_LRGB2Luv: i32 = 77;
pub const CV_LU: i32 = 0;
pub const CV_Lab2BGR: i32 = 56;
pub const CV_Lab2LBGR: i32 = 78;
pub const CV_Lab2LRGB: i32 = 79;
pub const CV_Lab2RGB: i32 = 57;
pub const CV_Luv2BGR: i32 = 58;
pub const CV_Luv2LBGR: i32 = 80;
pub const CV_Luv2LRGB: i32 = 81;
pub const CV_Luv2RGB: i32 = 59;
pub const CV_MAGIC_MASK: i32 = 0xFFFF0000;
pub const CV_MAJOR_VERSION: i32 = 3;
pub const CV_MATND_MAGIC_VAL: i32 = 0x42430000;
pub const CV_MAT_CONT_FLAG_SHIFT: i32 = 14;
pub const CV_MAT_MAGIC_VAL: i32 = 0x42420000;
pub const CV_MAX_ARR: i32 = 10;
pub const CV_MAX_DIM: i32 = 32;
pub const CV_MAX_SOBEL_KSIZE: i32 = 7;
pub const CV_MEDIAN: i32 = 3;
pub const CV_MINMAX: i32 = 32;
pub const CV_MINOR_VERSION: i32 = 4;
pub const CV_MOP_BLACKHAT: i32 = 6;
pub const CV_MOP_CLOSE: i32 = 3;
pub const CV_MOP_DILATE: i32 = 1;
pub const CV_MOP_ERODE: i32 = 0;
pub const CV_MOP_GRADIENT: i32 = 4;
pub const CV_MOP_OPEN: i32 = 2;
pub const CV_MOP_TOPHAT: i32 = 5;
pub const CV_MaskIsTiled: i32 = -26;
pub const CV_NODE_EMPTY: i32 = 32;
pub const CV_NODE_FLOAT: i32 = 2;
/// <Used only for writing structures in YAML format.
pub const CV_NODE_FLOW: i32 = 8;
pub const CV_NODE_INT: i32 = 1;
pub const CV_NODE_INTEGER: i32 = 1;
pub const CV_NODE_MAP: i32 = 6;
pub const CV_NODE_NAMED: i32 = 64;
pub const CV_NODE_NONE: i32 = 0;
pub const CV_NODE_REAL: i32 = 2;
/// < not used
pub const CV_NODE_REF: i32 = 4;
pub const CV_NODE_SEQ: i32 = 5;
pub const CV_NODE_SEQ_SIMPLE: i32 = 256;
pub const CV_NODE_STR: i32 = 3;
pub const CV_NODE_STRING: i32 = 3;
pub const CV_NODE_TYPE_MASK: i32 = 7;
pub const CV_NODE_USER: i32 = 16;
pub const CV_NORMAL: i32 = 16;
pub const CV_NORM_MASK: i32 = 7;
pub const CV_NO_CN_CHECK: i32 = 2;
pub const CV_NO_DEPTH_CHECK: i32 = 1;
pub const CV_NO_SIZE_CHECK: i32 = 4;
pub const CV_OpenCLApiCallError: i32 = -220;
pub const CV_OpenCLDoubleNotSupported: i32 = -221;
pub const CV_OpenCLInitError: i32 = -222;
pub const CV_OpenCLNoAMDBlasFft: i32 = -223;
pub const CV_OpenGlApiCallError: i32 = -219;
pub const CV_OpenGlNotSupported: i32 = -218;
pub const CV_P3P: i32 = 2;
pub const CV_PCA_DATA_AS_COL: i32 = 1;
pub const CV_PCA_DATA_AS_ROW: i32 = 0;
pub const CV_PCA_USE_AVG: i32 = 2;
pub const CV_POLY_APPROX_DP: i32 = 0;
pub const CV_PUSH_BUTTON: i32 = 0;
pub const CV_QR: i32 = 4;
pub const CV_RADIOBOX: i32 = 2;
pub const CV_RAND_NORMAL: i32 = 1;
pub const CV_RAND_UNI: i32 = 0;
pub const CV_RANSAC: i32 = 8;
pub const CV_REDUCE_AVG: i32 = 1;
pub const CV_REDUCE_MAX: i32 = 2;
pub const CV_REDUCE_MIN: i32 = 3;
pub const CV_REDUCE_SUM: i32 = 0;
pub const CV_RELATIVE: i32 = 8;
pub const CV_RETR_CCOMP: i32 = 2;
pub const CV_RETR_EXTERNAL: i32 = 0;
pub const CV_RETR_FLOODFILL: i32 = 4;
pub const CV_RETR_LIST: i32 = 1;
pub const CV_RETR_TREE: i32 = 3;
pub const CV_RGB2BGR: i32 = 4;
pub const CV_RGB2BGR555: i32 = 23;
pub const CV_RGB2BGR565: i32 = 13;
pub const CV_RGB2BGRA: i32 = 2;
pub const CV_RGB2GRAY: i32 = 7;
pub const CV_RGB2HLS: i32 = 53;
pub const CV_RGB2HLS_FULL: i32 = 69;
pub const CV_RGB2HSV: i32 = 41;
pub const CV_RGB2HSV_FULL: i32 = 67;
pub const CV_RGB2Lab: i32 = 45;
pub const CV_RGB2Luv: i32 = 51;
pub const CV_RGB2RGBA: i32 = 0;
pub const CV_RGB2XYZ: i32 = 33;
pub const CV_RGB2YCrCb: i32 = 37;
pub const CV_RGB2YUV: i32 = 83;
pub const CV_RGB2YUV_I420: i32 = 127;
pub const CV_RGB2YUV_IYUV: i32 = 127;
pub const CV_RGB2YUV_YV12: i32 = 131;
pub const CV_RGBA2BGR: i32 = 3;
pub const CV_RGBA2BGR555: i32 = 27;
pub const CV_RGBA2BGR565: i32 = 17;
pub const CV_RGBA2BGRA: i32 = 5;
pub const CV_RGBA2GRAY: i32 = 11;
pub const CV_RGBA2RGB: i32 = 1;
pub const CV_RGBA2YUV_I420: i32 = 129;
pub const CV_RGBA2YUV_IYUV: i32 = 129;
pub const CV_RGBA2YUV_YV12: i32 = 133;
pub const CV_RGBA2mRGBA: i32 = 125;
pub const CV_SCHARR: i32 = -1;
pub const CV_SEQ_ELTYPE_BITS: i32 = 12;
/// < connected component
pub const CV_SEQ_ELTYPE_CONNECTED_COMP: i32 = 0;
pub const CV_SEQ_ELTYPE_GENERIC: i32 = 0;
/// < &next_o, &next_d, &vtx_o, &vtx_d
pub const CV_SEQ_ELTYPE_GRAPH_EDGE: i32 = 0;
/// < first_edge, &(x,y)
pub const CV_SEQ_ELTYPE_GRAPH_VERTEX: i32 = 0;
pub const CV_SEQ_ELTYPE_PPOINT: i32 = 7;
pub const CV_SEQ_ELTYPE_PTR: i32 = 7;
/// < vertex of the binary tree
pub const CV_SEQ_ELTYPE_TRIAN_ATR: i32 = 0;
pub const CV_SEQ_KIND_BITS: i32 = 2;
pub const CV_SEQ_MAGIC_VAL: i32 = 0x42990000;
pub const CV_SET_MAGIC_VAL: i32 = 0x42980000;
pub const CV_SHAPE_CROSS: i32 = 1;
pub const CV_SHAPE_CUSTOM: i32 = 100;
pub const CV_SHAPE_ELLIPSE: i32 = 2;
pub const CV_SHAPE_RECT: i32 = 0;
pub const CV_SORT_ASCENDING: i32 = 0;
pub const CV_SORT_DESCENDING: i32 = 16;
pub const CV_SORT_EVERY_COLUMN: i32 = 1;
pub const CV_SORT_EVERY_ROW: i32 = 0;
pub const CV_SPARSE_MAT_MAGIC_VAL: i32 = 0x42440000;
pub const CV_STEREO_BM_BASIC: i32 = 0;
pub const CV_STEREO_BM_FISH_EYE: i32 = 1;
pub const CV_STEREO_BM_NARROW: i32 = 2;
pub const CV_STEREO_BM_NORMALIZED_RESPONSE: i32 = 0;
pub const CV_STEREO_BM_XSOBEL: i32 = 1;
pub const CV_STORAGE_APPEND: i32 = 2;
pub const CV_STORAGE_BASE64: i32 = 64;
pub const CV_STORAGE_FORMAT_AUTO: i32 = 0;
pub const CV_STORAGE_FORMAT_JSON: i32 = 24;
pub const CV_STORAGE_FORMAT_MASK: i32 = (7<<3);
pub const CV_STORAGE_FORMAT_XML: i32 = 8;
pub const CV_STORAGE_FORMAT_YAML: i32 = 16;
pub const CV_STORAGE_MAGIC_VAL: i32 = 0x42890000;
pub const CV_STORAGE_MEMORY: i32 = 4;
pub const CV_STORAGE_READ: i32 = 0;
pub const CV_STORAGE_WRITE: i32 = 1;
pub const CV_STORAGE_WRITE_BINARY: i32 = 1;
pub const CV_STORAGE_WRITE_TEXT: i32 = 1;
pub const CV_STYLE_ITALIC: i32 = 1;
pub const CV_STYLE_NORMAL: i32 = 0;
pub const CV_STYLE_OBLIQUE: i32 = 2;
pub const CV_SUBMAT_FLAG_SHIFT: i32 = 15;
pub const CV_SUBMINOR_VERSION: i32 = 5;
pub const CV_SVD: i32 = 1;
pub const CV_SVD_MODIFY_A: i32 = 1;
pub const CV_SVD_SYM: i32 = 2;
pub const CV_SVD_U_T: i32 = 2;
pub const CV_SVD_V_T: i32 = 4;
pub const CV_TERMCRIT_EPS: i32 = 2;
pub const CV_TERMCRIT_ITER: i32 = 1;
pub const CV_TERMCRIT_NUMBER: i32 = 1;
pub const CV_THRESH_BINARY: i32 = 0;
pub const CV_THRESH_BINARY_INV: i32 = 1;
pub const CV_THRESH_MASK: i32 = 7;
pub const CV_THRESH_OTSU: i32 = 8;
pub const CV_THRESH_TOZERO: i32 = 3;
pub const CV_THRESH_TOZERO_INV: i32 = 4;
pub const CV_THRESH_TRIANGLE: i32 = 16;
pub const CV_THRESH_TRUNC: i32 = 2;
pub const CV_TM_CCOEFF: i32 = 4;
pub const CV_TM_CCOEFF_NORMED: i32 = 5;
pub const CV_TM_CCORR: i32 = 2;
pub const CV_TM_CCORR_NORMED: i32 = 3;
pub const CV_TM_SQDIFF: i32 = 0;
pub const CV_TM_SQDIFF_NORMED: i32 = 1;
pub const CV_TYPE_NAME_GRAPH: &'static str = "opencv-graph";
pub const CV_TYPE_NAME_HAAR: &'static str = "opencv-haar-classifier";
pub const CV_TYPE_NAME_MAT: &'static str = "opencv-matrix";
pub const CV_TYPE_NAME_MATND: &'static str = "opencv-nd-matrix";
pub const CV_TYPE_NAME_SEQ: &'static str = "opencv-sequence";
pub const CV_TYPE_NAME_SEQ_TREE: &'static str = "opencv-sequence-tree";
pub const CV_TYPE_NAME_SPARSE_MAT: &'static str = "opencv-sparse-matrix";
pub const CV_TYZX_COLOR: i32 = 402;
pub const CV_TYZX_LEFT: i32 = 400;
pub const CV_TYZX_RIGHT: i32 = 401;
pub const CV_TYZX_Z: i32 = 403;
pub const CV_USRTYPE1: i32 = 7;
pub const CV_VERSION_MAJOR: i32 = 3;
pub const CV_VERSION_MINOR: i32 = 4;
pub const CV_VERSION_REVISION: i32 = 5;
pub const CV_VERSION_STATUS: &'static str = "";
pub const CV_WARP_FILL_OUTLIERS: i32 = 8;
pub const CV_WARP_INVERSE_MAP: i32 = 16;
pub const CV_WINDOW_AUTOSIZE: i32 = 0x00000001;
pub const CV_WINDOW_FREERATIO: i32 = 0x00000100;
pub const CV_WINDOW_FULLSCREEN: i32 = 1;
pub const CV_WINDOW_KEEPRATIO: i32 = 0x00000000;
pub const CV_WINDOW_NORMAL: i32 = 0x00000000;
pub const CV_WINDOW_OPENGL: i32 = 0x00001000;
pub const CV_WND_PROP_ASPECTRATIO: i32 = 2;
pub const CV_WND_PROP_AUTOSIZE: i32 = 1;
pub const CV_WND_PROP_FULLSCREEN: i32 = 0;
pub const CV_WND_PROP_OPENGL: i32 = 3;
pub const CV_WND_PROP_VISIBLE: i32 = 4;
pub const CV_XYZ2BGR: i32 = 34;
pub const CV_XYZ2RGB: i32 = 35;
pub const CV_YCrCb2BGR: i32 = 38;
pub const CV_YCrCb2RGB: i32 = 39;
pub const CV_YUV2BGR: i32 = 84;
pub const CV_YUV2BGRA_I420: i32 = 105;
pub const CV_YUV2BGRA_IYUV: i32 = 105;
pub const CV_YUV2BGRA_NV12: i32 = 95;
pub const CV_YUV2BGRA_NV21: i32 = 97;
pub const CV_YUV2BGRA_UYNV: i32 = 112;
pub const CV_YUV2BGRA_UYVY: i32 = 112;
pub const CV_YUV2BGRA_Y422: i32 = 112;
pub const CV_YUV2BGRA_YUNV: i32 = 120;
pub const CV_YUV2BGRA_YUY2: i32 = 120;
pub const CV_YUV2BGRA_YUYV: i32 = 120;
pub const CV_YUV2BGRA_YV12: i32 = 103;
pub const CV_YUV2BGRA_YVYU: i32 = 122;
pub const CV_YUV2BGR_I420: i32 = 101;
pub const CV_YUV2BGR_IYUV: i32 = 101;
pub const CV_YUV2BGR_NV12: i32 = 91;
pub const CV_YUV2BGR_NV21: i32 = 93;
pub const CV_YUV2BGR_UYNV: i32 = 108;
pub const CV_YUV2BGR_UYVY: i32 = 108;
pub const CV_YUV2BGR_Y422: i32 = 108;
pub const CV_YUV2BGR_YUNV: i32 = 116;
pub const CV_YUV2BGR_YUY2: i32 = 116;
pub const CV_YUV2BGR_YUYV: i32 = 116;
pub const CV_YUV2BGR_YV12: i32 = 99;
pub const CV_YUV2BGR_YVYU: i32 = 118;
pub const CV_YUV2GRAY_420: i32 = 106;
pub const CV_YUV2GRAY_I420: i32 = 106;
pub const CV_YUV2GRAY_IYUV: i32 = 106;
pub const CV_YUV2GRAY_NV12: i32 = 106;
pub const CV_YUV2GRAY_NV21: i32 = 106;
pub const CV_YUV2GRAY_UYNV: i32 = 123;
pub const CV_YUV2GRAY_UYVY: i32 = 123;
pub const CV_YUV2GRAY_Y422: i32 = 123;
pub const CV_YUV2GRAY_YUNV: i32 = 124;
pub const CV_YUV2GRAY_YUY2: i32 = 124;
pub const CV_YUV2GRAY_YUYV: i32 = 124;
pub const CV_YUV2GRAY_YV12: i32 = 106;
pub const CV_YUV2GRAY_YVYU: i32 = 124;
pub const CV_YUV2RGB: i32 = 85;
pub const CV_YUV2RGBA_I420: i32 = 104;
pub const CV_YUV2RGBA_IYUV: i32 = 104;
pub const CV_YUV2RGBA_NV12: i32 = 94;
pub const CV_YUV2RGBA_NV21: i32 = 96;
pub const CV_YUV2RGBA_UYNV: i32 = 111;
pub const CV_YUV2RGBA_UYVY: i32 = 111;
pub const CV_YUV2RGBA_Y422: i32 = 111;
pub const CV_YUV2RGBA_YUNV: i32 = 119;
pub const CV_YUV2RGBA_YUY2: i32 = 119;
pub const CV_YUV2RGBA_YUYV: i32 = 119;
pub const CV_YUV2RGBA_YV12: i32 = 102;
pub const CV_YUV2RGBA_YVYU: i32 = 121;
pub const CV_YUV2RGB_I420: i32 = 100;
pub const CV_YUV2RGB_IYUV: i32 = 100;
pub const CV_YUV2RGB_NV12: i32 = 90;
pub const CV_YUV2RGB_NV21: i32 = 92;
pub const CV_YUV2RGB_UYNV: i32 = 107;
pub const CV_YUV2RGB_UYVY: i32 = 107;
pub const CV_YUV2RGB_Y422: i32 = 107;
pub const CV_YUV2RGB_YUNV: i32 = 115;
pub const CV_YUV2RGB_YUY2: i32 = 115;
pub const CV_YUV2RGB_YUYV: i32 = 115;
pub const CV_YUV2RGB_YV12: i32 = 98;
pub const CV_YUV2RGB_YVYU: i32 = 117;
pub const CV_YUV420p2BGR: i32 = 99;
pub const CV_YUV420p2BGRA: i32 = 103;
pub const CV_YUV420p2GRAY: i32 = 106;
pub const CV_YUV420p2RGB: i32 = 98;
pub const CV_YUV420p2RGBA: i32 = 102;
pub const CV_YUV420sp2BGR: i32 = 93;
pub const CV_YUV420sp2BGRA: i32 = 97;
pub const CV_YUV420sp2GRAY: i32 = 106;
pub const CV_YUV420sp2RGB: i32 = 92;
pub const CV_YUV420sp2RGBA: i32 = 96;
pub const CV_mRGBA2RGBA: i32 = 126;
pub const CirclesGridFinderParameters_ASYMMETRIC_GRID: i32 = 1;
pub const CirclesGridFinderParameters_SYMMETRIC_GRID: i32 = 0;
pub const CvLevMarq_CALC_J: i32 = 2;
pub const CvLevMarq_CHECK_ERR: i32 = 3;
pub const CvLevMarq_DONE: i32 = 0;
pub const CvLevMarq_STARTED: i32 = 1;
pub const DCT_INVERSE: i32 = 1;
pub const DCT_ROWS: i32 = 4;
pub const DECOMP_CHOLESKY: i32 = 3;
pub const DECOMP_EIG: i32 = 2;
pub const DECOMP_LU: i32 = 0;
pub const DECOMP_NORMAL: i32 = 16;
pub const DECOMP_QR: i32 = 4;
pub const DECOMP_SVD: i32 = 1;
pub const DFT_COMPLEX_INPUT: i32 = 64;
pub const DFT_COMPLEX_OUTPUT: i32 = 16;
pub const DFT_INVERSE: i32 = 1;
pub const DFT_REAL_OUTPUT: i32 = 32;
pub const DFT_ROWS: i32 = 4;
pub const DFT_SCALE: i32 = 2;
pub const DIST_C: i32 = 3;
pub const DIST_FAIR: i32 = 5;
pub const DIST_HUBER: i32 = 7;
pub const DIST_L1: i32 = 1;
pub const DIST_L12: i32 = 4;
pub const DIST_L2: i32 = 2;
pub const DIST_LABEL_CCOMP: i32 = 0;
pub const DIST_LABEL_PIXEL: i32 = 1;
pub const DIST_MASK_3: i32 = 3;
pub const DIST_MASK_5: i32 = 5;
pub const DIST_MASK_PRECISE: i32 = 0;
pub const DIST_USER: i32 = -1;
pub const DIST_WELSCH: i32 = 6;
pub const DNN_BACKEND_DEFAULT: i32 = 0;
pub const DNN_BACKEND_HALIDE: i32 = 1;
pub const DNN_BACKEND_INFERENCE_ENGINE: i32 = 2;
pub const DNN_BACKEND_OPENCV: i32 = 3;
pub const DNN_TARGET_CPU: i32 = 0;
pub const DNN_TARGET_FPGA: i32 = 4;
pub const DNN_TARGET_MYRIAD: i32 = 3;
pub const DNN_TARGET_OPENCL: i32 = 1;
pub const DNN_TARGET_OPENCL_FP16: i32 = 2;
pub const DTrees_PREDICT_AUTO: i32 = 0;
pub const DTrees_PREDICT_MASK: i32 = (3<<8);
pub const DTrees_PREDICT_MAX_VOTE: i32 = (2<<8);
pub const DTrees_PREDICT_SUM: i32 = (1<<8);
pub const DescriptorMatcher_BRUTEFORCE: i32 = 2;
pub const DescriptorMatcher_BRUTEFORCE_HAMMING: i32 = 4;
pub const DescriptorMatcher_BRUTEFORCE_HAMMINGLUT: i32 = 5;
pub const DescriptorMatcher_BRUTEFORCE_L1: i32 = 3;
pub const DescriptorMatcher_BRUTEFORCE_SL2: i32 = 6;
pub const DescriptorMatcher_FLANNBASED: i32 = 1;
pub const DetectionBasedTracker_DETECTED: i32 = 1;
pub const DetectionBasedTracker_DETECTED_NOT_SHOWN_YET: i32 = 0;
pub const DetectionBasedTracker_DETECTED_TEMPORARY_LOST: i32 = 2;
pub const DetectionBasedTracker_WRONG_OBJECT: i32 = 3;
pub const DrawMatchesFlags_DEFAULT: i32 = 0;
pub const DrawMatchesFlags_DRAW_OVER_OUTIMG: i32 = 1;
pub const DrawMatchesFlags_DRAW_RICH_KEYPOINTS: i32 = 4;
pub const DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS: i32 = 2;
pub const EM_COV_MAT_DEFAULT: i32 = 1;
pub const EM_COV_MAT_DIAGONAL: i32 = 1;
pub const EM_COV_MAT_GENERIC: i32 = 2;
pub const EM_COV_MAT_SPHERICAL: i32 = 0;
pub const EM_DEFAULT_MAX_ITERS: i32 = 100;
pub const EM_DEFAULT_NCLUSTERS: i32 = 5;
pub const EM_START_AUTO_STEP: i32 = 0;
pub const EM_START_E_STEP: i32 = 1;
pub const EM_START_M_STEP: i32 = 2;
pub const EVENT_FLAG_ALTKEY: i32 = 32;
pub const EVENT_FLAG_CTRLKEY: i32 = 8;
pub const EVENT_FLAG_LBUTTON: i32 = 1;
pub const EVENT_FLAG_MBUTTON: i32 = 4;
pub const EVENT_FLAG_RBUTTON: i32 = 2;
pub const EVENT_FLAG_SHIFTKEY: i32 = 16;
pub const EVENT_LBUTTONDBLCLK: i32 = 7;
pub const EVENT_LBUTTONDOWN: i32 = 1;
pub const EVENT_LBUTTONUP: i32 = 4;
pub const EVENT_MBUTTONDBLCLK: i32 = 9;
pub const EVENT_MBUTTONDOWN: i32 = 3;
pub const EVENT_MBUTTONUP: i32 = 6;
pub const EVENT_MOUSEHWHEEL: i32 = 11;
pub const EVENT_MOUSEMOVE: i32 = 0;
pub const EVENT_MOUSEWHEEL: i32 = 10;
pub const EVENT_RBUTTONDBLCLK: i32 = 8;
pub const EVENT_RBUTTONDOWN: i32 = 2;
pub const EVENT_RBUTTONUP: i32 = 5;
pub const FILLED: i32 = -1;
pub const FLAGS_EXPAND_SAME_NAMES: i32 = 0x02;
pub const FLAGS_MAPPING: i32 = 0x01;
pub const FLAGS_NONE: i32 = 0;
pub const FLOODFILL_FIXED_RANGE: i32 = 1 << 16;
pub const FLOODFILL_MASK_ONLY: i32 = 1 << 17;
pub const FM_7POINT: i32 = 1;
pub const FM_8POINT: i32 = 2;
pub const FM_LMEDS: i32 = 4;
pub const FM_RANSAC: i32 = 8;
pub const FONT_HERSHEY_COMPLEX: i32 = 3;
pub const FONT_HERSHEY_COMPLEX_SMALL: i32 = 5;
pub const FONT_HERSHEY_DUPLEX: i32 = 2;
pub const FONT_HERSHEY_PLAIN: i32 = 1;
pub const FONT_HERSHEY_SCRIPT_COMPLEX: i32 = 7;
pub const FONT_HERSHEY_SCRIPT_SIMPLEX: i32 = 6;
pub const FONT_HERSHEY_SIMPLEX: i32 = 0;
pub const FONT_HERSHEY_TRIPLEX: i32 = 4;
pub const FONT_ITALIC: i32 = 16;
pub const FastFeatureDetector_FAST_N: i32 = 10002;
pub const FastFeatureDetector_NONMAX_SUPPRESSION: i32 = 10001;
pub const FastFeatureDetector_THRESHOLD: i32 = 10000;
pub const FastFeatureDetector_TYPE_5_8: i32 = 0;
pub const FastFeatureDetector_TYPE_7_12: i32 = 1;
pub const FastFeatureDetector_TYPE_9_16: i32 = 2;
pub const Formatter_FMT_C: i32 = 5;
pub const Formatter_FMT_CSV: i32 = 2;
pub const Formatter_FMT_DEFAULT: i32 = 0;
pub const Formatter_FMT_MATLAB: i32 = 1;
pub const Formatter_FMT_NUMPY: i32 = 4;
pub const Formatter_FMT_PYTHON: i32 = 3;
pub const GC_BGD: i32 = 0;
pub const GC_EVAL: i32 = 2;
pub const GC_EVAL_FREEZE_MODEL: i32 = 3;
pub const GC_FGD: i32 = 1;
pub const GC_INIT_WITH_MASK: i32 = 1;
pub const GC_INIT_WITH_RECT: i32 = 0;
pub const GC_PR_BGD: i32 = 2;
pub const GC_PR_FGD: i32 = 3;
pub const GEMM_1_T: i32 = 1;
pub const GEMM_2_T: i32 = 2;
pub const GEMM_3_T: i32 = 4;
pub const GpuApiCallError: i32 = -217;
pub const GpuNotSupported: i32 = -216;
pub const HG_AUTOSIZE: i32 = 0x00000001;
pub const HISTCMP_BHATTACHARYYA: i32 = 3;
pub const HISTCMP_CHISQR: i32 = 1;
pub const HISTCMP_CHISQR_ALT: i32 = 4;
pub const HISTCMP_CORREL: i32 = 0;
pub const HISTCMP_HELLINGER: i32 = 3;
pub const HISTCMP_INTERSECT: i32 = 2;
pub const HISTCMP_KL_DIV: i32 = 5;
pub const HOGDescriptor_DEFAULT_NLEVELS: i32 = 64;
pub const HOGDescriptor_L2Hys: i32 = 0;
pub const HOUGH_GRADIENT: i32 = 3;
pub const HOUGH_MULTI_SCALE: i32 = 2;
pub const HOUGH_PROBABILISTIC: i32 = 1;
pub const HOUGH_STANDARD: i32 = 0;
pub const Hamming_normType: i32 = 6;
pub const HeaderIsNull: i32 = -9;
pub const IMPL_IPP: i32 = 0+1;
pub const IMPL_OPENCL: i32 = 0+2;
pub const IMPL_PLAIN: i32 = 0;
pub const IMREAD_ANYCOLOR: i32 = 4;
pub const IMREAD_ANYDEPTH: i32 = 2;
pub const IMREAD_COLOR: i32 = 1;
pub const IMREAD_GRAYSCALE: i32 = 0;
pub const IMREAD_IGNORE_ORIENTATION: i32 = 128;
pub const IMREAD_LOAD_GDAL: i32 = 8;
pub const IMREAD_REDUCED_COLOR_2: i32 = 17;
pub const IMREAD_REDUCED_COLOR_4: i32 = 33;
pub const IMREAD_REDUCED_COLOR_8: i32 = 65;
pub const IMREAD_REDUCED_GRAYSCALE_2: i32 = 16;
pub const IMREAD_REDUCED_GRAYSCALE_4: i32 = 32;
pub const IMREAD_REDUCED_GRAYSCALE_8: i32 = 64;
pub const IMREAD_UNCHANGED: i32 = -1;
pub const IMWRITE_EXR_TYPE_FLOAT: i32 = 2;
pub const IMWRITE_EXR_TYPE_HALF: i32 = 1;
pub const IMWRITE_JPEG_CHROMA_QUALITY: i32 = 6;
pub const IMWRITE_JPEG_LUMA_QUALITY: i32 = 5;
pub const IMWRITE_JPEG_OPTIMIZE: i32 = 3;
pub const IMWRITE_JPEG_PROGRESSIVE: i32 = 2;
pub const IMWRITE_JPEG_QUALITY: i32 = 1;
pub const IMWRITE_JPEG_RST_INTERVAL: i32 = 4;
pub const IMWRITE_PAM_FORMAT_BLACKANDWHITE: i32 = 1;
pub const IMWRITE_PAM_FORMAT_GRAYSCALE: i32 = 2;
pub const IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA: i32 = 3;
pub const IMWRITE_PAM_FORMAT_NULL: i32 = 0;
pub const IMWRITE_PAM_FORMAT_RGB: i32 = 4;
pub const IMWRITE_PAM_FORMAT_RGB_ALPHA: i32 = 5;
pub const IMWRITE_PAM_TUPLETYPE: i32 = 128;
pub const IMWRITE_PNG_BILEVEL: i32 = 18;
pub const IMWRITE_PNG_COMPRESSION: i32 = 16;
pub const IMWRITE_PNG_STRATEGY: i32 = 17;
pub const IMWRITE_PNG_STRATEGY_DEFAULT: i32 = 0;
pub const IMWRITE_PNG_STRATEGY_FILTERED: i32 = 1;
pub const IMWRITE_PNG_STRATEGY_FIXED: i32 = 4;
pub const IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY: i32 = 2;
pub const IMWRITE_PNG_STRATEGY_RLE: i32 = 3;
pub const IMWRITE_PXM_BINARY: i32 = 32;
pub const IMWRITE_TIFF_RESUNIT: i32 = 256;
pub const IMWRITE_TIFF_XDPI: i32 = 257;
pub const IMWRITE_TIFF_YDPI: i32 = 258;
pub const IMWRITE_WEBP_QUALITY: i32 = 64;
pub const INPAINT_NS: i32 = 0;
pub const INPAINT_TELEA: i32 = 1;
pub const INTERSECT_FULL: i32 = 2;
pub const INTERSECT_NONE: i32 = 0;
pub const INTERSECT_PARTIAL: i32 = 1;
pub const INTER_AREA: i32 = 3;
pub const INTER_BITS: i32 = 5;
pub const INTER_CUBIC: i32 = 2;
pub const INTER_LANCZOS4: i32 = 4;
pub const INTER_LINEAR: i32 = 1;
pub const INTER_LINEAR_EXACT: i32 = 5;
pub const INTER_MAX: i32 = 7;
pub const INTER_NEAREST: i32 = 0;
pub const IPL_ALIGN_16BYTES: i32 = 16;
pub const IPL_ALIGN_32BYTES: i32 = 32;
pub const IPL_ALIGN_4BYTES: i32 = 4;
pub const IPL_ALIGN_8BYTES: i32 = 8;
pub const IPL_ALIGN_DWORD: i32 = 4;
pub const IPL_ALIGN_QWORD: i32 = 8;
pub const IPL_BORDER_CONSTANT: i32 = 0;
pub const IPL_BORDER_REFLECT: i32 = 2;
pub const IPL_BORDER_REFLECT_101: i32 = 4;
pub const IPL_BORDER_REPLICATE: i32 = 1;
pub const IPL_BORDER_TRANSPARENT: i32 = 5;
pub const IPL_BORDER_WRAP: i32 = 3;
pub const IPL_DATA_ORDER_PIXEL: i32 = 0;
pub const IPL_DATA_ORDER_PLANE: i32 = 1;
pub const IPL_DEPTH_16U: i32 = 16;
pub const IPL_DEPTH_1U: i32 = 1;
pub const IPL_DEPTH_32F: i32 = 32;
pub const IPL_DEPTH_64F: i32 = 64;
pub const IPL_DEPTH_8U: i32 = 8;
pub const IPL_DEPTH_SIGN: i32 = 0x80000000;
pub const IPL_IMAGE_DATA: i32 = 2;
pub const IPL_IMAGE_HEADER: i32 = 1;
pub const IPL_IMAGE_ROI: i32 = 4;
pub const IPL_ORIGIN_BL: i32 = 1;
pub const IPL_ORIGIN_TL: i32 = 0;
pub const KAZE_DIFF_CHARBONNIER: i32 = 3;
pub const KAZE_DIFF_PM_G1: i32 = 0;
pub const KAZE_DIFF_PM_G2: i32 = 1;
pub const KAZE_DIFF_WEICKERT: i32 = 2;
pub const KMEANS_PP_CENTERS: i32 = 2;
pub const KMEANS_RANDOM_CENTERS: i32 = 0;
pub const KMEANS_USE_INITIAL_LABELS: i32 = 1;
pub const KNearest_BRUTE_FORCE: i32 = 1;
pub const KNearest_KDTREE: i32 = 2;
pub const LDR_SIZE: i32 = 256;
pub const LINE_4: i32 = 4;
pub const LINE_8: i32 = 8;
pub const LINE_AA: i32 = 16;
pub const LMEDS: i32 = 4;
pub const LOG_LEVEL_DEBUG: i32 = 5;
pub const LOG_LEVEL_ERROR: i32 = 2;
pub const LOG_LEVEL_FATAL: i32 = 1;
pub const LOG_LEVEL_INFO: i32 = 4;
pub const LOG_LEVEL_SILENT: i32 = 0;
pub const LOG_LEVEL_VERBOSE: i32 = 6;
pub const LOG_LEVEL_WARNING: i32 = 3;
pub const LSD_REFINE_ADV: i32 = 2;
pub const LSD_REFINE_NONE: i32 = 0;
pub const LSD_REFINE_STD: i32 = 1;
pub const LogisticRegression_BATCH: i32 = 0;
pub const LogisticRegression_MINI_BATCH: i32 = 1;
pub const LogisticRegression_REG_DISABLE: i32 = -1;
pub const LogisticRegression_REG_L1: i32 = 0;
pub const LogisticRegression_REG_L2: i32 = 1;
pub const MARKER_CROSS: i32 = 0;
pub const MARKER_DIAMOND: i32 = 3;
pub const MARKER_SQUARE: i32 = 4;
pub const MARKER_STAR: i32 = 2;
pub const MARKER_TILTED_CROSS: i32 = 1;
pub const MARKER_TRIANGLE_DOWN: i32 = 6;
pub const MARKER_TRIANGLE_UP: i32 = 5;
pub const MIXED_CLONE: i32 = 2;
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 const MONOCHROME_TRANSFER: i32 = 3;
pub const MORPH_BLACKHAT: i32 = 6;
pub const MORPH_CLOSE: i32 = 3;
pub const MORPH_CROSS: i32 = 1;
pub const MORPH_DILATE: i32 = 1;
pub const MORPH_ELLIPSE: i32 = 2;
pub const MORPH_ERODE: i32 = 0;
pub const MORPH_GRADIENT: i32 = 4;
pub const MORPH_HITMISS: i32 = 7;
pub const MORPH_OPEN: i32 = 2;
pub const MORPH_RECT: i32 = 0;
pub const MORPH_TOPHAT: i32 = 5;
pub const MOTION_AFFINE: i32 = 2;
pub const MOTION_EUCLIDEAN: i32 = 1;
pub const MOTION_HOMOGRAPHY: i32 = 3;
pub const MOTION_TRANSLATION: i32 = 0;
pub const MaskIsTiled: i32 = -26;
pub const Mat_AUTO_STEP: i32 = 0;
pub const Mat_DEPTH_MASK: i32 = 7;
pub const Mat_MAGIC_MASK: i32 = 0xFFFF0000;
pub const Mat_MAGIC_VAL: i32 = 0x42FF0000;
pub const Mat_TYPE_MASK: i32 = 0x00000FFF;
pub const NORMAL_CLONE: i32 = 1;
pub const NORMCONV_FILTER: i32 = 2;
pub const NORM_HAMMING: i32 = 6;
pub const NORM_HAMMING2: i32 = 7;
pub const NORM_INF: i32 = 1;
pub const NORM_L1: i32 = 2;
pub const NORM_L2: i32 = 4;
pub const NORM_L2SQR: i32 = 5;
pub const NORM_MINMAX: i32 = 32;
pub const NORM_RELATIVE: i32 = 8;
pub const NORM_TYPE_MASK: i32 = 7;
pub const OPENCV_ABI_COMPATIBILITY: i32 = 300;
pub const OPTFLOW_FARNEBACK_GAUSSIAN: i32 = 256;
pub const OPTFLOW_LK_GET_MIN_EIGENVALS: i32 = 8;
pub const OPTFLOW_USE_INITIAL_FLOW: i32 = 4;
pub const ORB_FAST_SCORE: i32 = 1;
pub const ORB_HARRIS_SCORE: i32 = 0;
pub const ORB_kBytes: i32 = 32;
pub const OpenCLApiCallError: i32 = -220;
pub const OpenCLDoubleNotSupported: i32 = -221;
pub const OpenCLInitError: i32 = -222;
pub const OpenCLNoAMDBlasFft: i32 = -223;
pub const OpenGlApiCallError: i32 = -219;
pub const OpenGlNotSupported: i32 = -218;
pub const PCA_DATA_AS_COL: i32 = 1;
pub const PCA_DATA_AS_ROW: i32 = 0;
pub const PCA_USE_AVG: i32 = 2;
pub const PROJ_SPHERICAL_EQRECT: i32 = 1;
pub const PROJ_SPHERICAL_ORTHO: i32 = 0;
pub const Param_ALGORITHM: i32 = 6;
pub const Param_BOOLEAN: i32 = 1;
pub const Param_FLOAT: i32 = 7;
pub const Param_INT: i32 = 0;
pub const Param_MAT: i32 = 4;
pub const Param_MAT_VECTOR: i32 = 5;
pub const Param_REAL: i32 = 2;
pub const Param_SCALAR: i32 = 12;
pub const Param_STRING: i32 = 3;
pub const Param_UCHAR: i32 = 11;
pub const Param_UINT64: i32 = 9;
pub const Param_UNSIGNED_INT: i32 = 8;
pub const QT_CHECKBOX: i32 = 1;
pub const QT_FONT_BLACK: i32 = 87;
pub const QT_FONT_BOLD: i32 = 75;
pub const QT_FONT_DEMIBOLD: i32 = 63;
pub const QT_FONT_LIGHT: i32 = 25;
pub const QT_FONT_NORMAL: i32 = 50;
pub const QT_NEW_BUTTONBAR: i32 = 1024;
pub const QT_PUSH_BUTTON: i32 = 0;
pub const QT_RADIOBOX: i32 = 2;
pub const QT_STYLE_ITALIC: i32 = 1;
pub const QT_STYLE_NORMAL: i32 = 0;
pub const QT_STYLE_OBLIQUE: i32 = 2;
pub const RANSAC: i32 = 8;
pub const RECURS_FILTER: i32 = 1;
pub const REDUCE_AVG: i32 = 1;
pub const REDUCE_MAX: i32 = 2;
pub const REDUCE_MIN: i32 = 3;
pub const REDUCE_SUM: i32 = 0;
pub const RETR_CCOMP: i32 = 2;
pub const RETR_EXTERNAL: i32 = 0;
pub const RETR_FLOODFILL: i32 = 4;
pub const RETR_LIST: i32 = 1;
pub const RETR_TREE: i32 = 3;
pub const RHO: i32 = 16;
pub const RNG_NORMAL: i32 = 1;
pub const RNG_UNIFORM: i32 = 0;
pub const ROTATE_180: i32 = 1;
pub const ROTATE_90_CLOCKWISE: i32 = 0;
pub const ROTATE_90_COUNTERCLOCKWISE: i32 = 2;
pub const ROW_SAMPLE: i32 = 0;
pub const SOLVELP_MULTI: i32 = 1;
pub const SOLVELP_SINGLE: i32 = 0;
pub const SOLVELP_UNBOUNDED: i32 = -2;
pub const SOLVELP_UNFEASIBLE: i32 = -1;
pub const SOLVEPNP_AP3P: i32 = 5;
pub const SOLVEPNP_DLS: i32 = 3;
pub const SOLVEPNP_EPNP: i32 = 1;
pub const SOLVEPNP_ITERATIVE: i32 = 0;
pub const SOLVEPNP_MAX_COUNT: i32 = 5+1;
pub const SOLVEPNP_P3P: i32 = 2;
pub const SOLVEPNP_UPNP: i32 = 4;
pub const SORT_ASCENDING: i32 = 0;
pub const SORT_DESCENDING: i32 = 16;
pub const SORT_EVERY_COLUMN: i32 = 1;
pub const SORT_EVERY_ROW: i32 = 0;
pub const SVD_FULL_UV: i32 = 4;
pub const SVD_MODIFY_A: i32 = 1;
pub const SVD_NO_UV: i32 = 2;
pub const SVMSGD_ASGD: i32 = 1;
pub const SVMSGD_HARD_MARGIN: i32 = 1;
pub const SVMSGD_SGD: i32 = 0;
pub const SVMSGD_SOFT_MARGIN: i32 = 0;
pub const SVM_C: i32 = 0;
pub const SVM_CHI2: i32 = 4;
pub const SVM_COEF: i32 = 4;
pub const SVM_CUSTOM: i32 = -1;
pub const SVM_C_SVC: i32 = 100;
pub const SVM_DEGREE: i32 = 5;
pub const SVM_EPS_SVR: i32 = 103;
pub const SVM_GAMMA: i32 = 1;
pub const SVM_INTER: i32 = 5;
pub const SVM_LINEAR: i32 = 0;
pub const SVM_NU: i32 = 3;
pub const SVM_NU_SVC: i32 = 101;
pub const SVM_NU_SVR: i32 = 104;
pub const SVM_ONE_CLASS: i32 = 102;
pub const SVM_P: i32 = 2;
pub const SVM_POLY: i32 = 1;
pub const SVM_RBF: i32 = 2;
pub const SVM_SIGMOID: i32 = 3;
pub const SparseMat_HASH_BIT: i32 = 0x80000000;
pub const SparseMat_HASH_SCALE: i32 = 0x5bd1e995;
pub const SparseMat_MAX_DIM: i32 = 32;
pub const StatModel_COMPRESSED_INPUT: i32 = 2;
pub const StatModel_PREPROCESSED_INPUT: i32 = 4;
pub const StatModel_RAW_OUTPUT: i32 = 1;
pub const StatModel_UPDATE_MODEL: i32 = 1;
pub const StereoBM_PREFILTER_NORMALIZED_RESPONSE: i32 = 0;
pub const StereoBM_PREFILTER_XSOBEL: i32 = 1;
pub const StereoMatcher_DISP_SHIFT: i32 = 4;
pub const StereoSGBM_MODE_HH: i32 = 1;
pub const StereoSGBM_MODE_HH4: i32 = 3;
pub const StereoSGBM_MODE_SGBM: i32 = 0;
pub const StereoSGBM_MODE_SGBM_3WAY: i32 = 2;
pub const Stitcher_ERR_CAMERA_PARAMS_ADJUST_FAIL: i32 = 3;
pub const Stitcher_ERR_HOMOGRAPHY_EST_FAIL: i32 = 2;
pub const Stitcher_ERR_NEED_MORE_IMGS: i32 = 1;
pub const Stitcher_OK: i32 = 0;
pub const Stitcher_ORIG_RESOL: i32 = -1;
pub const Stitcher_PANORAMA: i32 = 0;
pub const Stitcher_SCANS: i32 = 1;
pub const StsAssert: i32 = -215;
pub const StsAutoTrace: i32 = -8;
pub const StsBackTrace: i32 = -1;
pub const StsBadArg: i32 = -5;
pub const StsBadFlag: i32 = -206;
pub const StsBadFunc: i32 = -6;
pub const StsBadMask: i32 = -208;
pub const StsBadMemBlock: i32 = -214;
pub const StsBadPoint: i32 = -207;
pub const StsBadSize: i32 = -201;
pub const StsDivByZero: i32 = -202;
pub const StsError: i32 = -2;
pub const StsFilterOffsetErr: i32 = -31;
pub const StsFilterStructContentErr: i32 = -29;
pub const StsInplaceNotSupported: i32 = -203;
pub const StsInternal: i32 = -3;
pub const StsKernelStructContentErr: i32 = -30;
pub const StsNoConv: i32 = -7;
pub const StsNoMem: i32 = -4;
pub const StsNotImplemented: i32 = -213;
pub const StsNullPtr: i32 = -27;
pub const StsObjectNotFound: i32 = -204;
pub const StsOk: i32 = 0;
pub const StsOutOfRange: i32 = -211;
pub const StsParseError: i32 = -212;
pub const StsUnmatchedFormats: i32 = -205;
pub const StsUnmatchedSizes: i32 = -209;
pub const StsUnsupportedFormat: i32 = -210;
pub const StsVecLengthErr: i32 = -28;
pub const Subdiv2D_NEXT_AROUND_DST: i32 = 0x22;
pub const Subdiv2D_NEXT_AROUND_LEFT: i32 = 0x13;
pub const Subdiv2D_NEXT_AROUND_ORG: i32 = 0x00;
pub const Subdiv2D_NEXT_AROUND_RIGHT: i32 = 0x31;
pub const Subdiv2D_PREV_AROUND_DST: i32 = 0x33;
pub const Subdiv2D_PREV_AROUND_LEFT: i32 = 0x20;
pub const Subdiv2D_PREV_AROUND_ORG: i32 = 0x11;
pub const Subdiv2D_PREV_AROUND_RIGHT: i32 = 0x02;
pub const Subdiv2D_PTLOC_ERROR: i32 = -2;
pub const Subdiv2D_PTLOC_INSIDE: i32 = 0;
pub const Subdiv2D_PTLOC_ON_EDGE: i32 = 2;
pub const Subdiv2D_PTLOC_OUTSIDE_RECT: i32 = -1;
pub const Subdiv2D_PTLOC_VERTEX: i32 = 1;
pub const TEST_ERROR: i32 = 0;
pub const THRESH_BINARY: i32 = 0;
pub const THRESH_BINARY_INV: i32 = 1;
pub const THRESH_MASK: i32 = 7;
pub const THRESH_OTSU: i32 = 8;
pub const THRESH_TOZERO: i32 = 3;
pub const THRESH_TOZERO_INV: i32 = 4;
pub const THRESH_TRIANGLE: i32 = 16;
pub const THRESH_TRUNC: i32 = 2;
pub const TM_CCOEFF: i32 = 4;
pub const TM_CCOEFF_NORMED: i32 = 5;
pub const TM_CCORR: i32 = 2;
pub const TM_CCORR_NORMED: i32 = 3;
pub const TM_SQDIFF: i32 = 0;
pub const TM_SQDIFF_NORMED: i32 = 1;
pub const TRAIN_ERROR: i32 = 1;
pub const TYPE_FUN: i32 = 0+3;
pub const TYPE_GENERAL: i32 = 0;
pub const TYPE_MARKER: i32 = 0+1;
pub const TYPE_WRAPPER: i32 = 0+2;
pub const TermCriteria_COUNT: i32 = 1;
pub const TermCriteria_EPS: i32 = 2;
pub const TermCriteria_MAX_ITER: i32 = 1;
pub const UMatData_ASYNC_CLEANUP: i32 = 128;
pub const UMatData_COPY_ON_MAP: i32 = 1;
pub const UMatData_DEVICE_COPY_OBSOLETE: i32 = 4;
pub const UMatData_DEVICE_MEM_MAPPED: i32 = 64;
pub const UMatData_HOST_COPY_OBSOLETE: i32 = 2;
pub const UMatData_TEMP_COPIED_UMAT: i32 = 24;
pub const UMatData_TEMP_UMAT: i32 = 8;
pub const UMatData_USER_ALLOCATED: i32 = 32;
pub const USAGE_ALLOCATE_DEVICE_MEMORY: i32 = 1 << 1;
pub const USAGE_ALLOCATE_HOST_MEMORY: i32 = 1 << 0;
pub const USAGE_ALLOCATE_SHARED_MEMORY: i32 = 1 << 2;
pub const USAGE_DEFAULT: i32 = 0;
pub const VAR_CATEGORICAL: i32 = 1;
pub const VAR_NUMERICAL: i32 = 0;
pub const VAR_ORDERED: i32 = 0;
pub const VIDEOWRITER_PROP_FRAMEBYTES: i32 = 2;
pub const VIDEOWRITER_PROP_NSTRIPES: i32 = 3;
pub const VIDEOWRITER_PROP_QUALITY: i32 = 1;
pub const WARP_FILL_OUTLIERS: i32 = 8;
pub const WARP_INVERSE_MAP: i32 = 16;
pub const WARP_POLAR_LINEAR: i32 = 0;
pub const WARP_POLAR_LOG: i32 = 256;
pub const WINDOW_AUTOSIZE: i32 = 0x00000001;
pub const WINDOW_FREERATIO: i32 = 0x00000100;
pub const WINDOW_FULLSCREEN: i32 = 1;
pub const WINDOW_GUI_EXPANDED: i32 = 0x00000000;
pub const WINDOW_GUI_NORMAL: i32 = 0x00000010;
pub const WINDOW_KEEPRATIO: i32 = 0x00000000;
pub const WINDOW_NORMAL: i32 = 0x00000000;
pub const WINDOW_OPENGL: i32 = 0x00001000;
pub const WND_PROP_ASPECT_RATIO: i32 = 2;
pub const WND_PROP_AUTOSIZE: i32 = 1;
pub const WND_PROP_FULLSCREEN: i32 = 0;
pub const WND_PROP_OPENGL: i32 = 3;
pub const WND_PROP_VISIBLE: i32 = 4;
pub const _InputArray_KIND_SHIFT: i32 = 16;
pub const __UMAT_USAGE_FLAGS_32BIT: i32 = 0x7fffffff;

/// a < b ? -1 : a > b ? 1 : 0
pub type CvCmpFuncExtern = Option<extern "C" fn(a: *const c_void, b: *const c_void, userdata: *mut c_void)>;
/// a < b ? -1 : a > b ? 1 : 0
pub type CvCmpFunc = dyn FnMut(&c_void, &c_void) + Send + Sync + 'static;

pub type Cv_iplCreateROIExtern = Option<extern "C" fn(unnamed_arg: i32, unnamed_arg_1: i32, unnamed_arg_2: i32, unnamed_arg_3: i32, unnamed_arg_4: i32)>;
pub type Cv_iplCreateROI = dyn FnMut(i32, i32, i32, i32, i32) + Send + Sync + 'static;

pub type CvErrorCallbackExtern = Option<extern "C" fn(status: i32, func_name: *const c_char, err_msg: *const c_char, file_name: *const c_char, line: i32, userdata: *mut c_void)>;
pub type CvErrorCallback = dyn FnMut(i32, String, String, String, i32) + Send + Sync + 'static;

/// < map (collection of named file nodes)
pub type CvIsInstanceFuncExtern = Option<extern "C" fn(struct_ptr: *const c_void)>;
/// < map (collection of named file nodes)
pub type CvIsInstanceFunc = dyn FnMut(&c_void) + Send + Sync + 'static;

pub type CvCloneFuncExtern = Option<extern "C" fn(struct_ptr: *const c_void)>;
pub type CvCloneFunc = dyn FnMut(&c_void) + Send + Sync + 'static;

/// Callback function for mouse events. see cv::setMouseCallback
/// ## Parameters
/// * event: one of the cv::MouseEventTypes constants.
/// * x: The x-coordinate of the mouse event.
/// * y: The y-coordinate of the mouse event.
/// * flags: one of the cv::MouseEventFlags constants.
/// * userdata: The optional parameter.
pub type MouseCallbackExtern = Option<extern "C" fn(event: i32, x: i32, y: i32, flags: i32, userdata: *mut c_void)>;
/// Callback function for mouse events. see cv::setMouseCallback
/// ## Parameters
/// * event: one of the cv::MouseEventTypes constants.
/// * x: The x-coordinate of the mouse event.
/// * y: The y-coordinate of the mouse event.
/// * flags: one of the cv::MouseEventFlags constants.
/// * userdata: The optional parameter.
pub type MouseCallback = dyn FnMut(i32, i32, i32, i32) + Send + Sync + 'static;

/// Callback function for Trackbar see cv::createTrackbar
/// ## Parameters
/// * pos: current position of the specified trackbar.
/// * userdata: The optional parameter.
pub type TrackbarCallbackExtern = Option<extern "C" fn(pos: i32, userdata: *mut c_void)>;
/// Callback function for Trackbar see cv::createTrackbar
/// ## Parameters
/// * pos: current position of the specified trackbar.
/// * userdata: The optional parameter.
pub type TrackbarCallback = dyn FnMut(i32) + Send + Sync + 'static;

/// Callback function defined to be called every frame. See cv::setOpenGlDrawCallback
/// ## Parameters
/// * userdata: The optional parameter.
pub type OpenGlDrawCallbackExtern = Option<extern "C" fn(userdata: *mut c_void)>;
/// Callback function defined to be called every frame. See cv::setOpenGlDrawCallback
/// ## Parameters
/// * userdata: The optional parameter.
pub type OpenGlDrawCallback = dyn FnMut() + Send + Sync + 'static;

/// Callback function for a button created by cv::createButton
/// ## Parameters
/// * state: current state of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button.
/// * userdata: The optional parameter.
pub type ButtonCallbackExtern = Option<extern "C" fn(state: i32, userdata: *mut c_void)>;
/// Callback function for a button created by cv::createButton
/// ## Parameters
/// * state: current state of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button.
/// * userdata: The optional parameter.
pub type ButtonCallback = dyn FnMut(i32) + Send + Sync + 'static;

pub type CvButtonCallbackExtern = Option<extern "C" fn(state: i32, userdata: *mut c_void)>;
pub type CvButtonCallback = dyn FnMut(i32) + Send + Sync + 'static;

pub type CvTrackbarCallbackExtern = Option<extern "C" fn(pos: i32)>;
pub type CvTrackbarCallback = dyn FnMut(i32) + Send + Sync + 'static;

pub type CvTrackbarCallback2Extern = Option<extern "C" fn(pos: i32, userdata: *mut c_void)>;
pub type CvTrackbarCallback2 = dyn FnMut(i32) + Send + Sync + 'static;

pub type CvMouseCallbackExtern = Option<extern "C" fn(event: i32, x: i32, y: i32, flags: i32, param: *mut c_void)>;
pub type CvMouseCallback = dyn FnMut(i32, i32, i32, i32, &mut c_void) + Send + Sync + 'static;

pub type CvOpenGlDrawCallbackExtern = Option<extern "C" fn(userdata: *mut c_void)>;
pub type CvOpenGlDrawCallback = dyn FnMut() + Send + Sync + 'static;

pub type CvDistanceFunctionExtern = Option<extern "C" fn(a: *const f32, b: *const f32, user_param: *mut c_void)>;
pub type CvDistanceFunction = dyn FnMut(&f32, &f32, &mut c_void) + Send + Sync + 'static;

pub type Vec8i = core::Vec8<i32>;
pub type Vec6d = core::Vec6<f64>;
pub type Vec6f = core::Vec6<f32>;
pub type Vec6i = core::Vec6<i32>;
pub type Vec4d = core::Vec4<f64>;
pub type Vec4f = core::Vec4<f32>;
pub type Vec4i = core::Vec4<i32>;
pub type Vec4w = core::Vec4<u16>;
pub type Vec4s = core::Vec4<i16>;
pub type Vec4b = core::Vec4<u8>;
pub type Vec3d = core::Vec3<f64>;
pub type Vec3f = core::Vec3<f32>;
pub type Vec3i = core::Vec3<i32>;
pub type Vec3w = core::Vec3<u16>;
pub type Vec3s = core::Vec3<i16>;
pub type Vec3b = core::Vec3<u8>;
pub type Vec2d = core::Vec2<f64>;
pub type Size2d = core::Size_<f64>;
pub type Point2d = core::Point_<f64>;
pub type Rect2d = core::Rect_<f64>;
pub type Vec2f = core::Vec2<f32>;
pub type Size2f = core::Size_<f32>;
pub type Point2f = core::Point_<f32>;
pub type Rect2f = core::Rect_<f32>;
pub type Size2l = core::Size_<i64>;
pub type Point2l = core::Point_<i64>;
pub type Vec2i = core::Vec2<i32>;
pub type Size2i = core::Size_<i32>;
pub type Point2i = core::Point_<i32>;
pub type Rect2i = core::Rect_<i32>;
pub type Size = core::Size_<i32>;
pub type Point = core::Point_<i32>;
pub type Rect = core::Rect_<i32>;
pub type Vec2w = core::Vec2<u16>;
pub type Vec2s = core::Vec2<i16>;
pub type Vec2b = core::Vec2<u8>;
pub type Scalar = core::Scalar_<f64>;
/// Class for matching keypoint descriptors
/// 
/// query descriptor index, train descriptor index, train image index, and distance between
/// descriptors.
#[repr(C)]
#[derive(Copy,Clone,Debug,PartialEq)]
pub struct DMatch {
    pub query_idx: i32,
    pub train_idx: i32,
    pub img_idx: i32,
    pub distance: f32,
}

/// Data structure for salient point detectors.
/// 
/// The class instance stores a keypoint, i.e. a point feature found by one of many available keypoint
/// detectors, such as Harris corner detector, #FAST, %StarDetector, %SURF, %SIFT etc.
/// 
/// The keypoint is characterized by the 2D position, scale (proportional to the diameter of the
/// neighborhood that needs to be taken into account), orientation and some other parameters. The
/// keypoint neighborhood is then analyzed by another algorithm that builds a descriptor (usually
/// represented as a feature vector). The keypoints representing the same object in different images
/// can then be matched using %KDTree or another method.
#[repr(C)]
#[derive(Copy,Clone,Debug,PartialEq)]
pub struct KeyPoint {
    pub pt: core::Point2f,
    pub size: f32,
    pub angle: f32,
    pub response: f32,
    pub octave: i32,
    pub class_id: i32,
}

/// struct returned by cv::moments
/// 
/// The spatial moments <span lang='latex'>\texttt{Moments::m}_{ji}</span> are computed as:
/// 
/// <div lang='latex'>\texttt{m} _{ji}= \sum _{x,y}  \left ( \texttt{array} (x,y)  \cdot x^j  \cdot y^i \right )</div>
/// 
/// The central moments <span lang='latex'>\texttt{Moments::mu}_{ji}</span> are computed as:
/// 
/// <div lang='latex'>\texttt{mu} _{ji}= \sum _{x,y}  \left ( \texttt{array} (x,y)  \cdot (x -  \bar{x} )^j  \cdot (y -  \bar{y} )^i \right )</div>
/// 
/// where <span lang='latex'>(\bar{x}, \bar{y})</span> is the mass center:
/// 
/// <div lang='latex'>\bar{x} = \frac{\texttt{m}_{10}}{\texttt{m}_{00}} , \; \bar{y} = \frac{\texttt{m}_{01}}{\texttt{m}_{00}}</div>
/// 
/// The normalized central moments <span lang='latex'>\texttt{Moments::nu}_{ij}</span> are computed as:
/// 
/// <div lang='latex'>\texttt{nu} _{ji}= \frac{\texttt{mu}_{ji}}{\texttt{m}_{00}^{(i+j)/2+1}} .</div>
/// 
/// 
/// Note:
/// <span lang='latex'>\texttt{mu}_{00}=\texttt{m}_{00}</span>, <span lang='latex'>\texttt{nu}_{00}=1</span>
/// <span lang='latex'>\texttt{nu}_{10}=\texttt{mu}_{10}=\texttt{mu}_{01}=\texttt{mu}_{10}=0</span> , hence the values are not
/// stored.
/// 
/// The moments of a contour are defined in the same way but computed using the Green's formula (see
/// <http://en.wikipedia.org/wiki/Green_theorem>). So, due to a limited raster resolution, the moments
/// computed for a contour are slightly different from the moments computed for the same rasterized
/// contour.
/// 
/// 
/// Note:
/// Since the contour moments are computed using Green formula, you may get seemingly odd results for
/// contours with self-intersections, e.g. a zero area (m00) for butterfly-shaped contours.
#[repr(C)]
#[derive(Copy,Clone,Debug,PartialEq)]
pub struct Moments {
    pub m00: f64,
    pub m10: f64,
    pub m01: f64,
    pub m20: f64,
    pub m11: f64,
    pub m02: f64,
    pub m30: f64,
    pub m21: f64,
    pub m12: f64,
    pub m03: f64,
    pub mu20: f64,
    pub mu11: f64,
    pub mu02: f64,
    pub mu30: f64,
    pub mu21: f64,
    pub mu12: f64,
    pub mu03: f64,
    pub nu20: f64,
    pub nu11: f64,
    pub nu02: f64,
    pub nu30: f64,
    pub nu21: f64,
    pub nu12: f64,
    pub nu03: f64,
}


#[repr(C)]
#[derive(Copy,Clone,Debug,PartialEq)]
pub struct CirclesGridFinderParameters {
    pub density_neighborhood_size: core::Size2f,
    pub min_density: f32,
    pub kmeans_attempts: i32,
    pub min_distance_to_add_keypoint: i32,
    pub keypoint_scale: i32,
    pub min_graph_confidence: f32,
    pub vertex_gain: f32,
    pub vertex_penalty: f32,
    pub existing_vertex_gain: f32,
    pub edge_gain: f32,
    pub edge_penalty: f32,
    pub convex_hull_factor: f32,
    pub min_rng_edge_switch_dist: f32,
}


#[repr(C)]
#[derive(Copy,Clone,Debug,PartialEq)]
pub struct CirclesGridFinderParameters2 {
    pub square_size: f32,
    pub max_rectified_distance: f32,
}


#[repr(C)]
#[derive(Copy,Clone,Debug,PartialEq)]
pub struct SimpleBlobDetector_Params {
    pub threshold_step: f32,
    pub min_threshold: f32,
    pub max_threshold: f32,
    pub min_repeatability: size_t,
    pub min_dist_between_blobs: f32,
    pub filter_by_color: bool,
    pub blob_color: u8,
    pub filter_by_area: bool,
    pub min_area: f32,
    pub max_area: f32,
    pub filter_by_circularity: bool,
    pub min_circularity: f32,
    pub max_circularity: f32,
    pub filter_by_inertia: bool,
    pub min_inertia_ratio: f32,
    pub max_inertia_ratio: f32,
    pub filter_by_convexity: bool,
    pub min_convexity: f32,
    pub max_convexity: f32,
}

/// This class allows to create and manipulate comprehensive artificial neural networks.
/// 
/// Neural network is presented as directed acyclic graph (DAG), where vertices are Layer instances,
/// and edges specify relationships between layers inputs and outputs.
/// 
/// Each network layer has unique integer id and unique string name inside its network.
/// LayerId can store either layer name or layer id.
/// 
/// This class supports reference counting of its instances, i. e. copies point to the same instance.
#[repr(C)]
#[derive(Copy,Clone,Debug,PartialEq)]
pub struct Net {
    __rust_private: [u8; 0],
}

// identifier: CV_FOURCC_char_c1_char_c2_char_c3_char_c4
/// Constructs the fourcc code of the codec function
/// 
/// Simply call it with 4 chars fourcc code like `CV_FOURCC('I', 'Y', 'U', 'V')`
/// 
/// List of codes can be obtained at [Video Codecs by FOURCC](http://www.fourcc.org/codecs.php) page.
/// FFMPEG backend with MP4 container natively uses other values as fourcc code:
/// see [ObjectType](http://www.mp4ra.org/codecs.html).
pub fn cv_fourcc(c1: i8, c2: i8, c3: i8, c4: i8) -> Result<i32> {
    unsafe { sys::cv_core_CV_FOURCC_char_c1_char_c2_char_c3_char_c4(c1, c2, c3, c4) }.into_result()
}

// identifier: cvCbrt_float_value
/// Fast cubic root calculation
pub fn cv_cbrt(value: f32) -> Result<f32> {
    unsafe { sys::cv_core_cvCbrt_float_value(value) }.into_result()
}

// identifier: cvChangeSeqBlock_void_X_reader_int_direction
/// 
pub fn cv_change_seq_block(reader: &mut c_void, direction: i32) -> Result<()> {
    unsafe { sys::cv_core_cvChangeSeqBlock_void_X_reader_int_direction(reader, direction) }.into_result()
}

// identifier: cvCheckHardwareSupport_int_feature
/// 
pub fn cv_check_hardware_support(feature: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvCheckHardwareSupport_int_feature(feature) }.into_result()
}

// identifier: cvContourPerimeter_const_void_X_contour
/// same as cvArcLength for closed contour
pub fn cv_contour_perimeter(contour: &c_void) -> Result<f64> {
    unsafe { sys::cv_core_cvContourPerimeter_const_void_X_contour(contour) }.into_result()
}

// identifier: cvDestroyAllWindows
pub fn cv_destroy_all_windows() -> Result<()> {
    unsafe { sys::cv_core_cvDestroyAllWindows() }.into_result()
}

// identifier: cvDestroyWindow_const_char_X_name
pub fn cv_destroy_window(name: &str) -> Result<()> {
    string_arg!(name);
    unsafe { sys::cv_core_cvDestroyWindow_const_char_X_name(name.as_ptr()) }.into_result()
}

// identifier: cvDisplayOverlay_const_char_X_name_const_char_X_text_int_delayms
///
/// ## C++ default parameters:
/// * delayms: 0
pub fn cv_display_overlay(name: &str, text: &str, delayms: i32) -> Result<()> {
    string_arg!(name);
    string_arg!(text);
    unsafe { sys::cv_core_cvDisplayOverlay_const_char_X_name_const_char_X_text_int_delayms(name.as_ptr(), text.as_ptr(), delayms) }.into_result()
}

// identifier: cvDisplayStatusBar_const_char_X_name_const_char_X_text_int_delayms
///
/// ## C++ default parameters:
/// * delayms: 0
pub fn cv_display_status_bar(name: &str, text: &str, delayms: i32) -> Result<()> {
    string_arg!(name);
    string_arg!(text);
    unsafe { sys::cv_core_cvDisplayStatusBar_const_char_X_name_const_char_X_text_int_delayms(name.as_ptr(), text.as_ptr(), delayms) }.into_result()
}

// identifier: cvErrorFromIppStatus_int_ipp_status
/// Maps IPP error codes to the counterparts from OpenCV
pub fn cv_error_from_ipp_status(ipp_status: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvErrorFromIppStatus_int_ipp_status(ipp_status) }.into_result()
}

// identifier: cvErrorStr_int_status
/// Retrieves textual description of the error given its code
pub fn cv_error_str(status: i32) -> Result<String> {
    unsafe { sys::cv_core_cvErrorStr_int_status(status) }.into_result().map(crate::templ::receive_string)
}

// identifier: cvError_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line
/// Sets error status and performs some additional actions (displaying message box,
/// writing message to stderr, terminating application etc.)
/// depending on the current error mode
pub fn cv_error(status: i32, func_name: &str, err_msg: &str, file_name: &str, line: i32) -> Result<()> {
    string_arg!(func_name);
    string_arg!(err_msg);
    string_arg!(file_name);
    unsafe { sys::cv_core_cvError_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line(status, func_name.as_ptr(), err_msg.as_ptr(), file_name.as_ptr(), line) }.into_result()
}

// identifier: cvFastArctan_float_y_float_x
/// Fast arctangent calculation
pub fn cv_fast_arctan(y: f32, x: f32) -> Result<f32> {
    unsafe { sys::cv_core_cvFastArctan_float_y_float_x(y, x) }.into_result()
}

// identifier: cvGetErrMode
/// Retrieves current error processing mode
pub fn cv_get_err_mode() -> Result<i32> {
    unsafe { sys::cv_core_cvGetErrMode() }.into_result()
}

// identifier: cvGetErrStatus
/// Get current OpenCV error status
pub fn cv_get_err_status() -> Result<i32> {
    unsafe { sys::cv_core_cvGetErrStatus() }.into_result()
}

// identifier: cvGetNumThreads
/// retrieve/set the number of threads used in OpenMP implementations
pub fn cv_get_num_threads() -> Result<i32> {
    unsafe { sys::cv_core_cvGetNumThreads() }.into_result()
}

// identifier: cvGetOptimalDFTSize_int_size0
/// Finds optimal DFT vector size >= size0
pub fn cv_get_optimal_dft_size(size0: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvGetOptimalDFTSize_int_size0(size0) }.into_result()
}

// identifier: cvGetThreadNum
/// get index of the thread being executed
pub fn cv_get_thread_num() -> Result<i32> {
    unsafe { sys::cv_core_cvGetThreadNum() }.into_result()
}

// identifier: cvGetTickCount
/// helper functions for RNG initialization and accurate time measurement:
/// uses internal clock counter on x86
pub fn cv_get_tick_count() -> Result<i64> {
    unsafe { sys::cv_core_cvGetTickCount() }.into_result()
}

// identifier: cvGetTickFrequency
pub fn cv_get_tick_frequency() -> Result<f64> {
    unsafe { sys::cv_core_cvGetTickFrequency() }.into_result()
}

// identifier: cvGetTrackbarPos_const_char_X_trackbar_name_const_char_X_window_name
pub fn cv_get_trackbar_pos(trackbar_name: &str, window_name: &str) -> Result<i32> {
    string_arg!(trackbar_name);
    string_arg!(window_name);
    unsafe { sys::cv_core_cvGetTrackbarPos_const_char_X_trackbar_name_const_char_X_window_name(trackbar_name.as_ptr(), window_name.as_ptr()) }.into_result()
}

// identifier: cvGetWindowHandle_const_char_X_name
pub fn cv_get_window_handle(name: &str) -> Result<&mut c_void> {
    string_arg!(name);
    unsafe { sys::cv_core_cvGetWindowHandle_const_char_X_name(name.as_ptr()) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
}

// identifier: cvGetWindowImageRect_const_char_X_name
pub fn cv_get_window_image_rect(name: &str) -> Result<core::Rect> {
    string_arg!(name);
    unsafe { sys::cv_core_cvGetWindowImageRect_const_char_X_name(name.as_ptr()) }.into_result()
}

// identifier: cvGetWindowName_void_X_window_handle
pub fn cv_get_window_name(window_handle: &mut c_void) -> Result<String> {
    unsafe { sys::cv_core_cvGetWindowName_void_X_window_handle(window_handle) }.into_result().map(crate::templ::receive_string)
}

// identifier: cvGetWindowProperty_const_char_X_name_int_prop_id
pub fn cv_get_window_property(name: &str, prop_id: i32) -> Result<f64> {
    string_arg!(name);
    unsafe { sys::cv_core_cvGetWindowProperty_const_char_X_name_int_prop_id(name.as_ptr(), prop_id) }.into_result()
}

// identifier: cvGuiBoxReport_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line_void_X_userdata
/// Output to MessageBox(WIN32)
pub fn cv_gui_box_report(status: i32, func_name: &str, err_msg: &str, file_name: &str, line: i32, userdata: &mut c_void) -> Result<i32> {
    string_arg!(func_name);
    string_arg!(err_msg);
    string_arg!(file_name);
    unsafe { sys::cv_core_cvGuiBoxReport_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line_void_X_userdata(status, func_name.as_ptr(), err_msg.as_ptr(), file_name.as_ptr(), line, userdata) }.into_result()
}

// identifier: cvHaveImageReader_const_char_X_filename
pub fn cv_have_image_reader(filename: &str) -> Result<i32> {
    string_arg!(filename);
    unsafe { sys::cv_core_cvHaveImageReader_const_char_X_filename(filename.as_ptr()) }.into_result()
}

// identifier: cvHaveImageWriter_const_char_X_filename
pub fn cv_have_image_writer(filename: &str) -> Result<i32> {
    string_arg!(filename);
    unsafe { sys::cv_core_cvHaveImageWriter_const_char_X_filename(filename.as_ptr()) }.into_result()
}

// identifier: cvInsertNodeIntoTree_void_X_node_void_X_parent_void_X_frame
/// Inserts sequence into tree with specified "parent" sequence.
/// If parent is equal to frame (e.g. the most external contour),
/// then added contour will have null pointer to parent.
pub fn cv_insert_node_into_tree(node: &mut c_void, parent: &mut c_void, frame: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cvInsertNodeIntoTree_void_X_node_void_X_parent_void_X_frame(node, parent, frame) }.into_result()
}

// identifier: cvIplDepth_int_type
pub fn cv_ipl_depth(_type: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvIplDepth_int_type(_type) }.into_result()
}

// identifier: cvLoadWindowParameters_const_char_X_name
pub fn cv_load_window_parameters(name: &str) -> Result<()> {
    string_arg!(name);
    unsafe { sys::cv_core_cvLoadWindowParameters_const_char_X_name(name.as_ptr()) }.into_result()
}

// identifier: cvMatchShapes_const_void_X_object1_const_void_X_object2_int_method_double_parameter
/// Compares two contours by matching their moments
/// @see cv::matchShapes
///
/// ## C++ default parameters:
/// * parameter: 0
pub fn cv_match_shapes(object1: &c_void, object2: &c_void, method: i32, parameter: f64) -> Result<f64> {
    unsafe { sys::cv_core_cvMatchShapes_const_void_X_object1_const_void_X_object2_int_method_double_parameter(object1, object2, method, parameter) }.into_result()
}

// identifier: cvMoveWindow_const_char_X_name_int_x_int_y
pub fn cv_move_window(name: &str, x: i32, y: i32) -> Result<()> {
    string_arg!(name);
    unsafe { sys::cv_core_cvMoveWindow_const_char_X_name_int_x_int_y(name.as_ptr(), x, y) }.into_result()
}

// identifier: cvNamedWindow_const_char_X_name_int_flags
///
/// ## C++ default parameters:
/// * flags: CV_WINDOW_AUTOSIZE
pub fn cv_named_window(name: &str, flags: i32) -> Result<i32> {
    string_arg!(name);
    unsafe { sys::cv_core_cvNamedWindow_const_char_X_name_int_flags(name.as_ptr(), flags) }.into_result()
}

// identifier: cvNulDevReport_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line_void_X_userdata
/// Output nothing
pub fn cv_nul_dev_report(status: i32, func_name: &str, err_msg: &str, file_name: &str, line: i32, userdata: &mut c_void) -> Result<i32> {
    string_arg!(func_name);
    string_arg!(err_msg);
    string_arg!(file_name);
    unsafe { sys::cv_core_cvNulDevReport_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line_void_X_userdata(status, func_name.as_ptr(), err_msg.as_ptr(), file_name.as_ptr(), line, userdata) }.into_result()
}

// identifier: cvRANSACUpdateNumIters_double_p_double_err_prob_int_model_points_int_max_iters
pub fn cv_ransac_update_num_iters(p: f64, err_prob: f64, model_points: i32, max_iters: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvRANSACUpdateNumIters_double_p_double_err_prob_int_model_points_int_max_iters(p, err_prob, model_points, max_iters) }.into_result()
}

// identifier: cvRNG_int64_seed
/// Initializes a random number generator state.
/// 
/// The function initializes a random number generator and returns the state. The pointer to the state
/// can be then passed to the cvRandInt, cvRandReal and cvRandArr functions. In the current
/// implementation a multiply-with-carry generator is used.
/// ## Parameters
/// * seed: 64-bit value used to initiate a random sequence
/// @sa the C++ class RNG replaced CvRNG.
///
/// ## C++ default parameters:
/// * seed: -1
pub fn cv_rng(seed: i64) -> Result<u64> {
    unsafe { sys::cv_core_cvRNG_int64_seed(seed) }.into_result()
}

// identifier: cvRemoveNodeFromTree_void_X_node_void_X_frame
/// Removes contour from tree (together with the contour children).
pub fn cv_remove_node_from_tree(node: &mut c_void, frame: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cvRemoveNodeFromTree_void_X_node_void_X_frame(node, frame) }.into_result()
}

// identifier: cvResizeWindow_const_char_X_name_int_width_int_height
pub fn cv_resize_window(name: &str, width: i32, height: i32) -> Result<()> {
    string_arg!(name);
    unsafe { sys::cv_core_cvResizeWindow_const_char_X_name_int_width_int_height(name.as_ptr(), width, height) }.into_result()
}

// identifier: cvRound64_softdouble_a
/// Rounds a number to nearest even long long integer
pub fn cv_round64(a: &core::softdouble) -> Result<i64> {
    unsafe { sys::cv_core_cvRound64_softdouble_a(a.as_raw_softdouble()) }.into_result()
}

// identifier: cvSaveWindowParameters_const_char_X_name
pub fn cv_save_window_parameters(name: &str) -> Result<()> {
    string_arg!(name);
    unsafe { sys::cv_core_cvSaveWindowParameters_const_char_X_name(name.as_ptr()) }.into_result()
}

// identifier: cvSetErrMode_int_mode
/// Sets error processing mode, returns previously used mode
pub fn cv_set_err_mode(mode: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvSetErrMode_int_mode(mode) }.into_result()
}

// identifier: cvSetErrStatus_int_status
/// Sets error status silently
pub fn cv_set_err_status(status: i32) -> Result<()> {
    unsafe { sys::cv_core_cvSetErrStatus_int_status(status) }.into_result()
}

// identifier: cvSetNumThreads_int_threads
///
/// ## C++ default parameters:
/// * threads: 0
pub fn cv_set_num_threads(threads: i32) -> Result<()> {
    unsafe { sys::cv_core_cvSetNumThreads_int_threads(threads) }.into_result()
}

// identifier: cvSetOpenGlContext_const_char_X_window_name
pub fn cv_set_open_gl_context(window_name: &str) -> Result<()> {
    string_arg!(window_name);
    unsafe { sys::cv_core_cvSetOpenGlContext_const_char_X_window_name(window_name.as_ptr()) }.into_result()
}

// identifier: cvSetTrackbarMax_const_char_X_trackbar_name_const_char_X_window_name_int_maxval
pub fn cv_set_trackbar_max(trackbar_name: &str, window_name: &str, maxval: i32) -> Result<()> {
    string_arg!(trackbar_name);
    string_arg!(window_name);
    unsafe { sys::cv_core_cvSetTrackbarMax_const_char_X_trackbar_name_const_char_X_window_name_int_maxval(trackbar_name.as_ptr(), window_name.as_ptr(), maxval) }.into_result()
}

// identifier: cvSetTrackbarMin_const_char_X_trackbar_name_const_char_X_window_name_int_minval
pub fn cv_set_trackbar_min(trackbar_name: &str, window_name: &str, minval: i32) -> Result<()> {
    string_arg!(trackbar_name);
    string_arg!(window_name);
    unsafe { sys::cv_core_cvSetTrackbarMin_const_char_X_trackbar_name_const_char_X_window_name_int_minval(trackbar_name.as_ptr(), window_name.as_ptr(), minval) }.into_result()
}

// identifier: cvSetTrackbarPos_const_char_X_trackbar_name_const_char_X_window_name_int_pos
pub fn cv_set_trackbar_pos(trackbar_name: &str, window_name: &str, pos: i32) -> Result<()> {
    string_arg!(trackbar_name);
    string_arg!(window_name);
    unsafe { sys::cv_core_cvSetTrackbarPos_const_char_X_trackbar_name_const_char_X_window_name_int_pos(trackbar_name.as_ptr(), window_name.as_ptr(), pos) }.into_result()
}

// identifier: cvSetWindowProperty_const_char_X_name_int_prop_id_double_prop_value
pub fn cv_set_window_property(name: &str, prop_id: i32, prop_value: f64) -> Result<()> {
    string_arg!(name);
    unsafe { sys::cv_core_cvSetWindowProperty_const_char_X_name_int_prop_id_double_prop_value(name.as_ptr(), prop_id, prop_value) }.into_result()
}

// identifier: cvStartWindowThread
pub fn cv_start_window_thread() -> Result<i32> {
    unsafe { sys::cv_core_cvStartWindowThread() }.into_result()
}

// identifier: cvStdErrReport_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line_void_X_userdata
/// Output to console(fprintf(stderr,...))
pub fn cv_std_err_report(status: i32, func_name: &str, err_msg: &str, file_name: &str, line: i32, userdata: &mut c_void) -> Result<i32> {
    string_arg!(func_name);
    string_arg!(err_msg);
    string_arg!(file_name);
    unsafe { sys::cv_core_cvStdErrReport_int_status_const_char_X_func_name_const_char_X_err_msg_const_char_X_file_name_int_line_void_X_userdata(status, func_name.as_ptr(), err_msg.as_ptr(), file_name.as_ptr(), line, userdata) }.into_result()
}

// identifier: cvStopLoop
pub fn cv_stop_loop() -> Result<()> {
    unsafe { sys::cv_core_cvStopLoop() }.into_result()
}

// identifier: cvTrunc_softdouble_a
pub fn cv_trunc(a: &core::softdouble) -> Result<i32> {
    unsafe { sys::cv_core_cvTrunc_softdouble_a(a.as_raw_softdouble()) }.into_result()
}

// identifier: cvTrunc_softfloat_a
/// Truncates number to integer with minimum magnitude
pub fn cv_trunc_1(a: &core::softfloat) -> Result<i32> {
    unsafe { sys::cv_core_cvTrunc_softfloat_a(a.as_raw_softfloat()) }.into_result()
}

// identifier: cvUnregisterType_const_char_X_type_name
/// Unregisters the type.
/// 
/// The function unregisters a type with a specified name. If the name is unknown, it is possible to
/// locate the type info by an instance of the type using cvTypeOf or by iterating the type list,
/// starting from cvFirstType, and then calling cvUnregisterType(info-\>typeName).
/// ## Parameters
/// * type_name: Name of an unregistered type
pub fn cv_unregister_type(type_name: &str) -> Result<()> {
    string_arg!(type_name);
    unsafe { sys::cv_core_cvUnregisterType_const_char_X_type_name(type_name.as_ptr()) }.into_result()
}

// identifier: cvUpdateWindow_const_char_X_window_name
pub fn cv_update_window(window_name: &str) -> Result<()> {
    string_arg!(window_name);
    unsafe { sys::cv_core_cvUpdateWindow_const_char_X_window_name(window_name.as_ptr()) }.into_result()
}

// identifier: cvUseOptimized_int_on_off
/// Loads optimized functions from IPP, MKL etc. or switches back to pure C code
pub fn cv_use_optimized(on_off: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvUseOptimized_int_on_off(on_off) }.into_result()
}

// identifier: cvWaitKey_int_delay
///
/// ## C++ default parameters:
/// * delay: 0
pub fn cv_wait_key(delay: i32) -> Result<i32> {
    unsafe { sys::cv_core_cvWaitKey_int_delay(delay) }.into_result()
}

// identifier: cv_AGAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression
/// @overload
///
/// ## C++ default parameters:
/// * nonmax_suppression: true
pub fn AGAST(image: &core::Mat, keypoints: &types::VectorOfKeyPoint, threshold: i32, nonmax_suppression: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_AGAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression(image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), threshold, nonmax_suppression) }.into_result()
}

// identifier: cv_AGAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression_int_type
/// Detects corners using the AGAST algorithm
/// 
/// ## Parameters
/// * image: grayscale image where keypoints (corners) are detected.
/// * keypoints: keypoints detected on the image.
/// * threshold: threshold on difference between intensity of the central pixel and pixels of a
/// circle around this pixel.
/// * nonmaxSuppression: if true, non-maximum suppression is applied to detected corners
/// (keypoints).
/// * type: one of the four neighborhoods as defined in the paper:
/// AgastFeatureDetector::AGAST_5_8, AgastFeatureDetector::AGAST_7_12d,
/// AgastFeatureDetector::AGAST_7_12s, AgastFeatureDetector::OAST_9_16
/// 
/// For non-Intel platforms, there is a tree optimised variant of AGAST with same numerical results.
/// The 32-bit binary tree tables were generated automatically from original code using perl script.
/// The perl script and examples of tree generation are placed in features2d/doc folder.
/// Detects corners using the AGAST algorithm by @cite mair2010_agast .
pub fn AGAST_with_type(image: &core::Mat, keypoints: &types::VectorOfKeyPoint, threshold: i32, nonmax_suppression: bool, _type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_AGAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression_int_type(image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), threshold, nonmax_suppression, _type) }.into_result()
}

// identifier: cv_CamShift_Mat_probImage_Rect_window_TermCriteria_criteria
/// Finds an object center, size, and orientation.
/// 
/// ## Parameters
/// * probImage: Back projection of the object histogram. See calcBackProject.
/// * window: Initial search window.
/// * criteria: Stop criteria for the underlying meanShift.
/// returns
/// (in old interfaces) Number of iterations CAMSHIFT took to converge
/// The function implements the CAMSHIFT object tracking algorithm @cite Bradski98 . First, it finds an
/// object center using meanShift and then adjusts the window size and finds the optimal rotation. The
/// function returns the rotated rectangle structure that includes the object position, size, and
/// orientation. The next position of the search window can be obtained with RotatedRect::boundingRect()
/// 
/// See the OpenCV sample camshiftdemo.c that tracks colored objects.
/// 
/// 
/// Note:
/// *   (Python) A sample explaining the camshift tracking algorithm can be found at
/// opencv_source_code/samples/python/camshift.py
pub fn cam_shift(prob_image: &core::Mat, window: core::Rect, criteria: &core::TermCriteria) -> Result<core::RotatedRect> {
    unsafe { sys::cv_core_cv_CamShift_Mat_probImage_Rect_window_TermCriteria_criteria(prob_image.as_raw_Mat(), window, criteria.as_raw_TermCriteria()) }.into_result().map(|x| core::RotatedRect { ptr: x })
}

// identifier: cv_Canny_Mat_dx_Mat_dy_Mat_edges_double_threshold1_double_threshold2_bool_L2gradient
/// \overload
/// 
/// Finds edges in an image using the Canny algorithm with custom image gradient.
/// 
/// ## Parameters
/// * dx: 16-bit x derivative of input image (CV_16SC1 or CV_16SC3).
/// * dy: 16-bit y derivative of input image (same type as dx).
/// * edges: output edge map; single channels 8-bit image, which has the same size as image .
/// * threshold1: first threshold for the hysteresis procedure.
/// * threshold2: second threshold for the hysteresis procedure.
/// * L2gradient: a flag, indicating whether a more accurate <span lang='latex'>L_2</span> norm
/// <span lang='latex'>=\sqrt{(dI/dx)^2 + (dI/dy)^2}</span> should be used to calculate the image gradient magnitude (
/// L2gradient=true ), or whether the default <span lang='latex'>L_1</span> norm <span lang='latex'>=|dI/dx|+|dI/dy|</span> is enough (
/// L2gradient=false ).
///
/// ## C++ default parameters:
/// * l2gradient: false
pub fn canny_derivative(dx: &core::Mat, dy: &core::Mat, edges: &mut core::Mat, threshold1: f64, threshold2: f64, l2gradient: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_Canny_Mat_dx_Mat_dy_Mat_edges_double_threshold1_double_threshold2_bool_L2gradient(dx.as_raw_Mat(), dy.as_raw_Mat(), edges.as_raw_Mat(), threshold1, threshold2, l2gradient) }.into_result()
}

// identifier: cv_Canny_Mat_image_Mat_edges_double_threshold1_double_threshold2_int_apertureSize_bool_L2gradient
/// Finds edges in an image using the Canny algorithm @cite Canny86 .
/// 
/// The function finds edges in the input image and marks them in the output map edges using the
/// Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The
/// largest value is used to find initial segments of strong edges. See
/// <http://en.wikipedia.org/wiki/Canny_edge_detector>
/// 
/// ## Parameters
/// * image: 8-bit input image.
/// * edges: output edge map; single channels 8-bit image, which has the same size as image .
/// * threshold1: first threshold for the hysteresis procedure.
/// * threshold2: second threshold for the hysteresis procedure.
/// * apertureSize: aperture size for the Sobel operator.
/// * L2gradient: a flag, indicating whether a more accurate <span lang='latex'>L_2</span> norm
/// <span lang='latex'>=\sqrt{(dI/dx)^2 + (dI/dy)^2}</span> should be used to calculate the image gradient magnitude (
/// L2gradient=true ), or whether the default <span lang='latex'>L_1</span> norm <span lang='latex'>=|dI/dx|+|dI/dy|</span> is enough (
/// L2gradient=false ).
///
/// ## C++ default parameters:
/// * aperture_size: 3
/// * l2gradient: false
pub fn canny(image: &core::Mat, edges: &mut core::Mat, threshold1: f64, threshold2: f64, aperture_size: i32, l2gradient: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_Canny_Mat_image_Mat_edges_double_threshold1_double_threshold2_int_apertureSize_bool_L2gradient(image.as_raw_Mat(), edges.as_raw_Mat(), threshold1, threshold2, aperture_size, l2gradient) }.into_result()
}

// identifier: cv_Cholesky_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n
/// proxy for hal::Cholesky
pub fn cholesky(a: &mut f64, astep: size_t, m: i32, b: &mut f64, bstep: size_t, n: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_Cholesky_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_Cholesky_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n
/// proxy for hal::Cholesky
pub fn cholesky_1(a: &mut f32, astep: size_t, m: i32, b: &mut f32, bstep: size_t, n: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_Cholesky_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_EMDL1_Mat_signature1_Mat_signature2
/// Computes the "minimal work" distance between two weighted point configurations base on the papers
/// "EMD-L1: An efficient and Robust Algorithm for comparing histogram-based descriptors", by Haibin
/// Ling and Kazunori Okuda; and "The Earth Mover's Distance is the Mallows Distance: Some Insights from
/// Statistics", by Elizaveta Levina and Peter Bickel.
/// 
/// ## Parameters
/// * signature1: First signature, a single column floating-point matrix. Each row is the value of
/// the histogram in each bin.
/// * signature2: Second signature of the same format and size as signature1.
pub fn emdl1(signature1: &core::Mat, signature2: &core::Mat) -> Result<f32> {
    unsafe { sys::cv_core_cv_EMDL1_Mat_signature1_Mat_signature2(signature1.as_raw_Mat(), signature2.as_raw_Mat()) }.into_result()
}

// identifier: cv_EMD_Mat_signature1_Mat_signature2_int_distType_Mat_cost_float_X_lowerBound_Mat_flow
/// Computes the "minimal work" distance between two weighted point configurations.
/// 
/// The function computes the earth mover distance and/or a lower boundary of the distance between the
/// two weighted point configurations. One of the applications described in @cite RubnerSept98,
/// @cite Rubner2000 is multi-dimensional histogram comparison for image retrieval. EMD is a transportation
/// problem that is solved using some modification of a simplex algorithm, thus the complexity is
/// exponential in the worst case, though, on average it is much faster. In the case of a real metric
/// the lower boundary can be calculated even faster (using linear-time algorithm) and it can be used
/// to determine roughly whether the two signatures are far enough so that they cannot relate to the
/// same object.
/// 
/// ## Parameters
/// * signature1: First signature, a <span lang='latex'>\texttt{size1}\times \texttt{dims}+1</span> floating-point matrix.
/// Each row stores the point weight followed by the point coordinates. The matrix is allowed to have
/// a single column (weights only) if the user-defined cost matrix is used. The weights must be
/// non-negative and have at least one non-zero value.
/// * signature2: Second signature of the same format as signature1 , though the number of rows
/// may be different. The total weights may be different. In this case an extra "dummy" point is added
/// to either signature1 or signature2. The weights must be non-negative and have at least one non-zero
/// value.
/// * distType: Used metric. See #DistanceTypes.
/// * cost: User-defined <span lang='latex'>\texttt{size1}\times \texttt{size2}</span> cost matrix. Also, if a cost matrix
/// is used, lower boundary lowerBound cannot be calculated because it needs a metric function.
/// * lowerBound: Optional input/output parameter: lower boundary of a distance between the two
/// signatures that is a distance between mass centers. The lower boundary may not be calculated if
/// the user-defined cost matrix is used, the total weights of point configurations are not equal, or
/// if the signatures consist of weights only (the signature matrices have a single column). You
/// **must** initialize \*lowerBound . If the calculated distance between mass centers is greater or
/// equal to \*lowerBound (it means that the signatures are far enough), the function does not
/// calculate EMD. In any case \*lowerBound is set to the calculated distance between mass centers on
/// return. Thus, if you want to calculate both distance between mass centers and EMD, \*lowerBound
/// should be set to 0.
/// * flow: Resultant <span lang='latex'>\texttt{size1} \times \texttt{size2}</span> flow matrix: <span lang='latex'>\texttt{flow}_{i,j}</span> is
/// a flow from <span lang='latex'>i</span> -th point of signature1 to <span lang='latex'>j</span> -th point of signature2 .
///
/// ## C++ default parameters:
/// * cost: noArray()
/// * lower_bound: 0
/// * flow: noArray()
pub fn emd(signature1: &core::Mat, signature2: &core::Mat, dist_type: i32, cost: &core::Mat, lower_bound: &mut f32, flow: &mut core::Mat) -> Result<f32> {
    unsafe { sys::cv_core_cv_EMD_Mat_signature1_Mat_signature2_int_distType_Mat_cost_float_X_lowerBound_Mat_flow(signature1.as_raw_Mat(), signature2.as_raw_Mat(), dist_type, cost.as_raw_Mat(), lower_bound, flow.as_raw_Mat()) }.into_result()
}

// identifier: cv_FAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression
/// @overload
///
/// ## C++ default parameters:
/// * nonmax_suppression: true
pub fn FAST(image: &core::Mat, keypoints: &types::VectorOfKeyPoint, threshold: i32, nonmax_suppression: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_FAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression(image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), threshold, nonmax_suppression) }.into_result()
}

// identifier: cv_FAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression_int_type
/// Detects corners using the FAST algorithm
/// 
/// ## Parameters
/// * image: grayscale image where keypoints (corners) are detected.
/// * keypoints: keypoints detected on the image.
/// * threshold: threshold on difference between intensity of the central pixel and pixels of a
/// circle around this pixel.
/// * nonmaxSuppression: if true, non-maximum suppression is applied to detected corners
/// (keypoints).
/// * type: one of the three neighborhoods as defined in the paper:
/// FastFeatureDetector::TYPE_9_16, FastFeatureDetector::TYPE_7_12,
/// FastFeatureDetector::TYPE_5_8
/// 
/// Detects corners using the FAST algorithm by @cite Rosten06 .
/// 
/// 
/// Note: In Python API, types are given as cv2.FAST_FEATURE_DETECTOR_TYPE_5_8,
/// cv2.FAST_FEATURE_DETECTOR_TYPE_7_12 and cv2.FAST_FEATURE_DETECTOR_TYPE_9_16. For corner
/// detection, use cv2.FAST.detect() method.
pub fn FAST_with_type(image: &core::Mat, keypoints: &types::VectorOfKeyPoint, threshold: i32, nonmax_suppression: bool, _type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_FAST_Mat_image_VectorOfKeyPoint_keypoints_int_threshold_bool_nonmaxSuppression_int_type(image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), threshold, nonmax_suppression, _type) }.into_result()
}

// identifier: cv_GaussianBlur_Mat_src_Mat_dst_Size_ksize_double_sigmaX_double_sigmaY_int_borderType
/// Blurs an image using a Gaussian filter.
/// 
/// The function convolves the source image with the specified Gaussian kernel. In-place filtering is
/// supported.
/// 
/// ## Parameters
/// * src: input image; the image can have any number of channels, which are processed
/// independently, but the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
/// * dst: output image of the same size and type as src.
/// * ksize: Gaussian kernel size. ksize.width and ksize.height can differ but they both must be
/// positive and odd. Or, they can be zero's and then they are computed from sigma.
/// * sigmaX: Gaussian kernel standard deviation in X direction.
/// * sigmaY: Gaussian kernel standard deviation in Y direction; if sigmaY is zero, it is set to be
/// equal to sigmaX, if both sigmas are zeros, they are computed from ksize.width and ksize.height,
/// respectively (see #getGaussianKernel for details); to fully control the result regardless of
/// possible future modifications of all this semantics, it is recommended to specify all of ksize,
/// sigmaX, and sigmaY.
/// * borderType: pixel extrapolation method, see #BorderTypes
/// 
/// @sa  sepFilter2D, filter2D, blur, boxFilter, bilateralFilter, medianBlur
///
/// ## C++ default parameters:
/// * sigma_y: 0
/// * border_type: BORDER_DEFAULT
pub fn gaussian_blur(src: &core::Mat, dst: &mut core::Mat, ksize: core::Size, sigma_x: f64, sigma_y: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_GaussianBlur_Mat_src_Mat_dst_Size_ksize_double_sigmaX_double_sigmaY_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ksize, sigma_x, sigma_y, border_type) }.into_result()
}

// identifier: cv_HoughCircles_Mat_image_Mat_circles_int_method_double_dp_double_minDist_double_param1_double_param2_int_minRadius_int_maxRadius
/// Finds circles in a grayscale image using the Hough transform.
/// 
/// The function finds circles in a grayscale image using a modification of the Hough transform.
/// 
/// Example: :
/// @include snippets/imgproc_HoughLinesCircles.cpp
/// 
/// 
/// Note: Usually the function detects the centers of circles well. However, it may fail to find correct
/// radii. You can assist to the function by specifying the radius range ( minRadius and maxRadius ) if
/// you know it. Or, you may set maxRadius to a negative number to return centers only without radius
/// search, and find the correct radius using an additional procedure.
/// 
/// ## Parameters
/// * image: 8-bit, single-channel, grayscale input image.
/// * circles: Output vector of found circles. Each vector is encoded as  3 or 4 element
/// floating-point vector <span lang='latex'>(x, y, radius)</span> or <span lang='latex'>(x, y, radius, votes)</span> .
/// * method: Detection method, see #HoughModes. Currently, the only implemented method is #HOUGH_GRADIENT
/// * dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if
/// dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has
/// half as big width and height.
/// * minDist: Minimum distance between the centers of the detected circles. If the parameter is
/// too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is
/// too large, some circles may be missed.
/// * param1: First method-specific parameter. In case of #HOUGH_GRADIENT , it is the higher
/// threshold of the two passed to the Canny edge detector (the lower one is twice smaller).
/// * param2: Second method-specific parameter. In case of #HOUGH_GRADIENT , it is the
/// accumulator threshold for the circle centers at the detection stage. The smaller it is, the more
/// false circles may be detected. Circles, corresponding to the larger accumulator values, will be
/// returned first.
/// * minRadius: Minimum circle radius.
/// * maxRadius: Maximum circle radius. If <= 0, uses the maximum image dimension. If < 0, returns
/// centers without finding the radius.
/// 
/// @sa fitEllipse, minEnclosingCircle
///
/// ## C++ default parameters:
/// * param1: 100
/// * param2: 100
/// * min_radius: 0
/// * max_radius: 0
pub fn hough_circles(image: &core::Mat, circles: &mut core::Mat, method: i32, dp: f64, min_dist: f64, param1: f64, param2: f64, min_radius: i32, max_radius: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_HoughCircles_Mat_image_Mat_circles_int_method_double_dp_double_minDist_double_param1_double_param2_int_minRadius_int_maxRadius(image.as_raw_Mat(), circles.as_raw_Mat(), method, dp, min_dist, param1, param2, min_radius, max_radius) }.into_result()
}

// identifier: cv_HoughLinesP_Mat_image_Mat_lines_double_rho_double_theta_int_threshold_double_minLineLength_double_maxLineGap
/// Finds line segments in a binary image using the probabilistic Hough transform.
/// 
/// The function implements the probabilistic Hough transform algorithm for line detection, described
/// in @cite Matas00
/// 
/// See the line detection example below:
/// @include snippets/imgproc_HoughLinesP.cpp
/// This is a sample picture the function parameters have been tuned for:
/// 
/// ![image](pics/building.jpg)
/// 
/// And this is the output of the above program in case of the probabilistic Hough transform:
/// 
/// ![image](pics/houghp.png)
/// 
/// ## Parameters
/// * image: 8-bit, single-channel binary source image. The image may be modified by the function.
/// * lines: Output vector of lines. Each line is represented by a 4-element vector
/// <span lang='latex'>(x_1, y_1, x_2, y_2)</span> , where <span lang='latex'>(x_1,y_1)</span> and <span lang='latex'>(x_2, y_2)</span> are the ending points of each detected
/// line segment.
/// * rho: Distance resolution of the accumulator in pixels.
/// * theta: Angle resolution of the accumulator in radians.
/// * threshold: Accumulator threshold parameter. Only those lines are returned that get enough
/// votes ( <span lang='latex'>>\texttt{threshold}</span> ).
/// * minLineLength: Minimum line length. Line segments shorter than that are rejected.
/// * maxLineGap: Maximum allowed gap between points on the same line to link them.
/// 
/// @sa LineSegmentDetector
///
/// ## C++ default parameters:
/// * min_line_length: 0
/// * max_line_gap: 0
pub fn hough_lines_p(image: &core::Mat, lines: &mut core::Mat, rho: f64, theta: f64, threshold: i32, min_line_length: f64, max_line_gap: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_HoughLinesP_Mat_image_Mat_lines_double_rho_double_theta_int_threshold_double_minLineLength_double_maxLineGap(image.as_raw_Mat(), lines.as_raw_Mat(), rho, theta, threshold, min_line_length, max_line_gap) }.into_result()
}

// identifier: cv_HoughLinesPointSet_Mat__point_Mat__lines_int_lines_max_int_threshold_double_min_rho_double_max_rho_double_rho_step_double_min_theta_double_max_theta_double_theta_step
/// Finds lines in a set of points using the standard Hough transform.
/// 
/// The function finds lines in a set of points using a modification of the Hough transform.
/// @include snippets/imgproc_HoughLinesPointSet.cpp
/// ## Parameters
/// * _point: Input vector of points. Each vector must be encoded as a Point vector <span lang='latex'>(x,y)</span>. Type must be CV_32FC2 or CV_32SC2.
/// * _lines: Output vector of found lines. Each vector is encoded as a vector<Vec3d> <span lang='latex'>(votes, rho, theta)</span>.
/// The larger the value of 'votes', the higher the reliability of the Hough line.
/// * lines_max: Max count of hough lines.
/// * threshold: Accumulator threshold parameter. Only those lines are returned that get enough
/// votes ( <span lang='latex'>>\texttt{threshold}</span> )
/// * min_rho: Minimum Distance value of the accumulator in pixels.
/// * max_rho: Maximum Distance value of the accumulator in pixels.
/// * rho_step: Distance resolution of the accumulator in pixels.
/// * min_theta: Minimum angle value of the accumulator in radians.
/// * max_theta: Maximum angle value of the accumulator in radians.
/// * theta_step: Angle resolution of the accumulator in radians.
pub fn hough_lines_point_set(_point: &core::Mat, _lines: &mut core::Mat, lines_max: i32, threshold: i32, min_rho: f64, max_rho: f64, rho_step: f64, min_theta: f64, max_theta: f64, theta_step: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_HoughLinesPointSet_Mat__point_Mat__lines_int_lines_max_int_threshold_double_min_rho_double_max_rho_double_rho_step_double_min_theta_double_max_theta_double_theta_step(_point.as_raw_Mat(), _lines.as_raw_Mat(), lines_max, threshold, min_rho, max_rho, rho_step, min_theta, max_theta, theta_step) }.into_result()
}

// identifier: cv_HoughLines_Mat_image_Mat_lines_double_rho_double_theta_int_threshold_double_srn_double_stn_double_min_theta_double_max_theta
/// Finds lines in a binary image using the standard Hough transform.
/// 
/// The function implements the standard or standard multi-scale Hough transform algorithm for line
/// detection. See <http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm> for a good explanation of Hough
/// transform.
/// 
/// ## Parameters
/// * image: 8-bit, single-channel binary source image. The image may be modified by the function.
/// * lines: Output vector of lines. Each line is represented by a 2 or 3 element vector
/// <span lang='latex'>(\rho, \theta)</span> or <span lang='latex'>(\rho, \theta, \textrm{votes})</span> . <span lang='latex'>\rho</span> is the distance from the coordinate origin <span lang='latex'>(0,0)</span> (top-left corner of
/// the image). <span lang='latex'>\theta</span> is the line rotation angle in radians (
/// <span lang='latex'>0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}</span> ).
/// <span lang='latex'>\textrm{votes}</span> is the value of accumulator.
/// * rho: Distance resolution of the accumulator in pixels.
/// * theta: Angle resolution of the accumulator in radians.
/// * threshold: Accumulator threshold parameter. Only those lines are returned that get enough
/// votes ( <span lang='latex'>>\texttt{threshold}</span> ).
/// * srn: For the multi-scale Hough transform, it is a divisor for the distance resolution rho .
/// The coarse accumulator distance resolution is rho and the accurate accumulator resolution is
/// rho/srn . If both srn=0 and stn=0 , the classical Hough transform is used. Otherwise, both these
/// parameters should be positive.
/// * stn: For the multi-scale Hough transform, it is a divisor for the distance resolution theta.
/// * min_theta: For standard and multi-scale Hough transform, minimum angle to check for lines.
/// Must fall between 0 and max_theta.
/// * max_theta: For standard and multi-scale Hough transform, maximum angle to check for lines.
/// Must fall between min_theta and CV_PI.
///
/// ## C++ default parameters:
/// * srn: 0
/// * stn: 0
/// * min_theta: 0
/// * max_theta: CV_PI
pub fn hough_lines(image: &core::Mat, lines: &mut core::Mat, rho: f64, theta: f64, threshold: i32, srn: f64, stn: f64, min_theta: f64, max_theta: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_HoughLines_Mat_image_Mat_lines_double_rho_double_theta_int_threshold_double_srn_double_stn_double_min_theta_double_max_theta(image.as_raw_Mat(), lines.as_raw_Mat(), rho, theta, threshold, srn, stn, min_theta, max_theta) }.into_result()
}

// identifier: cv_HuMoments_Moments_m_Mat_hu
/// @overload
pub fn hu_moments(m: core::Moments, hu: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_HuMoments_Moments_m_Mat_hu(m, hu.as_raw_Mat()) }.into_result()
}

// identifier: cv_LUT_Mat_src_Mat_lut_Mat_dst
/// Performs a look-up table transform of an array.
/// 
/// The function LUT fills the output array with values from the look-up table. Indices of the entries
/// are taken from the input array. That is, the function processes each element of src as follows:
/// <div lang='latex'>\texttt{dst} (I)  \leftarrow \texttt{lut(src(I) + d)}</div>
/// where
/// <div lang='latex'>d =  \fork{0}{if \(\texttt{src}\) has depth \(\texttt{CV_8U}\)}{128}{if \(\texttt{src}\) has depth \(\texttt{CV_8S}\)}</div>
/// ## Parameters
/// * src: input array of 8-bit elements.
/// * lut: look-up table of 256 elements; in case of multi-channel input array, the table should
/// either have a single channel (in this case the same table is used for all channels) or the same
/// number of channels as in the input array.
/// * dst: output array of the same size and number of channels as src, and the same depth as lut.
/// @sa  convertScaleAbs, Mat::convertTo
pub fn lut(src: &core::Mat, lut: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_LUT_Mat_src_Mat_lut_Mat_dst(src.as_raw_Mat(), lut.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_LU_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n
/// proxy for hal::LU
pub fn lu(a: &mut f64, astep: size_t, m: i32, b: &mut f64, bstep: size_t, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_LU_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_LU_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n
/// proxy for hal::LU
pub fn lu_1(a: &mut f32, astep: size_t, m: i32, b: &mut f32, bstep: size_t, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_LU_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_Laplacian_Mat_src_Mat_dst_int_ddepth_int_ksize_double_scale_double_delta_int_borderType
/// Calculates the Laplacian of an image.
/// 
/// The function calculates the Laplacian of the source image by adding up the second x and y
/// derivatives calculated using the Sobel operator:
/// 
/// <div lang='latex'>\texttt{dst} =  \Delta \texttt{src} =  \frac{\partial^2 \texttt{src}}{\partial x^2} +  \frac{\partial^2 \texttt{src}}{\partial y^2}</div>
/// 
/// This is done when `ksize > 1`. When `ksize == 1`, the Laplacian is computed by filtering the image
/// with the following <span lang='latex'>3 \times 3</span> aperture:
/// 
/// <div lang='latex'>\vecthreethree {0}{1}{0}{1}{-4}{1}{0}{1}{0}</div>
/// 
/// ## Parameters
/// * src: Source image.
/// * dst: Destination image of the same size and the same number of channels as src .
/// * ddepth: Desired depth of the destination image.
/// * ksize: Aperture size used to compute the second-derivative filters. See #getDerivKernels for
/// details. The size must be positive and odd.
/// * scale: Optional scale factor for the computed Laplacian values. By default, no scaling is
/// applied. See #getDerivKernels for details.
/// * delta: Optional delta value that is added to the results prior to storing them in dst .
/// * borderType: Pixel extrapolation method, see #BorderTypes
/// @sa  Sobel, Scharr
///
/// ## C++ default parameters:
/// * ksize: 1
/// * scale: 1
/// * delta: 0
/// * border_type: BORDER_DEFAULT
pub fn laplacian(src: &core::Mat, dst: &mut core::Mat, ddepth: i32, ksize: i32, scale: f64, delta: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_Laplacian_Mat_src_Mat_dst_int_ddepth_int_ksize_double_scale_double_delta_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ddepth, ksize, scale, delta, border_type) }.into_result()
}

// identifier: cv_Mahalanobis_Mat_v1_Mat_v2_Mat_icovar
/// Calculates the Mahalanobis distance between two vectors.
/// 
/// The function cv::Mahalanobis calculates and returns the weighted distance between two vectors:
/// <div lang='latex'>d( \texttt{vec1} , \texttt{vec2} )= \sqrt{\sum_{i,j}{\texttt{icovar(i,j)}\cdot(\texttt{vec1}(I)-\texttt{vec2}(I))\cdot(\texttt{vec1(j)}-\texttt{vec2(j)})} }</div>
/// The covariance matrix may be calculated using the #calcCovarMatrix function and then inverted using
/// the invert function (preferably using the #DECOMP_SVD method, as the most accurate).
/// ## Parameters
/// * v1: first 1D input vector.
/// * v2: second 1D input vector.
/// * icovar: inverse covariance matrix.
pub fn mahalanobis(v1: &core::Mat, v2: &core::Mat, icovar: &core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_Mahalanobis_Mat_v1_Mat_v2_Mat_icovar(v1.as_raw_Mat(), v2.as_raw_Mat(), icovar.as_raw_Mat()) }.into_result()
}

// identifier: cv_PCABackProject_Mat_data_Mat_mean_Mat_eigenvectors_Mat_result
/// wrap PCA::backProject
pub fn pca_back_project(data: &core::Mat, mean: &core::Mat, eigenvectors: &core::Mat, result: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_PCABackProject_Mat_data_Mat_mean_Mat_eigenvectors_Mat_result(data.as_raw_Mat(), mean.as_raw_Mat(), eigenvectors.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
}

// identifier: cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_Mat_eigenvalues_double_retainedVariance
/// wrap PCA::operator() and add eigenvalues output parameter
pub fn pca_compute(data: &core::Mat, mean: &mut core::Mat, eigenvectors: &mut core::Mat, eigenvalues: &mut core::Mat, retained_variance: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_Mat_eigenvalues_double_retainedVariance(data.as_raw_Mat(), mean.as_raw_Mat(), eigenvectors.as_raw_Mat(), eigenvalues.as_raw_Mat(), retained_variance) }.into_result()
}

// identifier: cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_Mat_eigenvalues_int_maxComponents
/// wrap PCA::operator() and add eigenvalues output parameter
///
/// ## C++ default parameters:
/// * max_components: 0
pub fn pca_compute_1(data: &core::Mat, mean: &mut core::Mat, eigenvectors: &mut core::Mat, eigenvalues: &mut core::Mat, max_components: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_Mat_eigenvalues_int_maxComponents(data.as_raw_Mat(), mean.as_raw_Mat(), eigenvectors.as_raw_Mat(), eigenvalues.as_raw_Mat(), max_components) }.into_result()
}

// identifier: cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_double_retainedVariance
/// wrap PCA::operator()
pub fn pca_compute_variance(data: &core::Mat, mean: &mut core::Mat, eigenvectors: &mut core::Mat, retained_variance: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_double_retainedVariance(data.as_raw_Mat(), mean.as_raw_Mat(), eigenvectors.as_raw_Mat(), retained_variance) }.into_result()
}

// identifier: cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_int_maxComponents
/// wrap PCA::operator()
///
/// ## C++ default parameters:
/// * max_components: 0
pub fn pca_compute_2(data: &core::Mat, mean: &mut core::Mat, eigenvectors: &mut core::Mat, max_components: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_PCACompute_Mat_data_Mat_mean_Mat_eigenvectors_int_maxComponents(data.as_raw_Mat(), mean.as_raw_Mat(), eigenvectors.as_raw_Mat(), max_components) }.into_result()
}

// identifier: cv_PCAProject_Mat_data_Mat_mean_Mat_eigenvectors_Mat_result
/// wrap PCA::project
pub fn pca_project(data: &core::Mat, mean: &core::Mat, eigenvectors: &core::Mat, result: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_PCAProject_Mat_data_Mat_mean_Mat_eigenvectors_Mat_result(data.as_raw_Mat(), mean.as_raw_Mat(), eigenvectors.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
}

// identifier: cv_PSNR_Mat_src1_Mat_src2
/// Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.
/// 
/// This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels (dB), between two input arrays src1 and src2. Arrays must have depth CV_8U.
/// 
/// The PSNR is calculated as follows:
/// 
/// <div lang='latex'>
/// \texttt{PSNR} = 10 \cdot \log_{10}{\left( \frac{R^2}{MSE} \right) }
/// </div>
/// 
/// where R is the maximum integer value of depth CV_8U (255) and MSE is the mean squared error between the two arrays.
/// 
/// ## Parameters
/// * src1: first input array.
/// * src2: second input array of the same size as src1.
pub fn psnr(src1: &core::Mat, src2: &core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_PSNR_Mat_src1_Mat_src2(src1.as_raw_Mat(), src2.as_raw_Mat()) }.into_result()
}

// identifier: cv_RQDecomp3x3_Mat_src_Mat_mtxR_Mat_mtxQ_Mat_Qx_Mat_Qy_Mat_Qz
/// Computes an RQ decomposition of 3x3 matrices.
/// 
/// ## Parameters
/// * src: 3x3 input matrix.
/// * mtxR: Output 3x3 upper-triangular matrix.
/// * mtxQ: Output 3x3 orthogonal matrix.
/// * Qx: Optional output 3x3 rotation matrix around x-axis.
/// * Qy: Optional output 3x3 rotation matrix around y-axis.
/// * Qz: Optional output 3x3 rotation matrix around z-axis.
/// 
/// The function computes a RQ decomposition using the given rotations. This function is used in
/// decomposeProjectionMatrix to decompose the left 3x3 submatrix of a projection matrix into a camera
/// and a rotation matrix.
/// 
/// It optionally returns three rotation matrices, one for each axis, and the three Euler angles in
/// degrees (as the return value) that could be used in OpenGL. Note, there is always more than one
/// sequence of rotations about the three principal axes that results in the same orientation of an
/// object, e.g. see @cite Slabaugh . Returned tree rotation matrices and corresponding three Euler angles
/// are only one of the possible solutions.
///
/// ## C++ default parameters:
/// * qx: noArray()
/// * qy: noArray()
/// * qz: noArray()
pub fn rq_decomp3x3(src: &core::Mat, mtx_r: &mut core::Mat, mtx_q: &mut core::Mat, qx: &mut core::Mat, qy: &mut core::Mat, qz: &mut core::Mat) -> Result<core::Vec3d> {
    unsafe { sys::cv_core_cv_RQDecomp3x3_Mat_src_Mat_mtxR_Mat_mtxQ_Mat_Qx_Mat_Qy_Mat_Qz(src.as_raw_Mat(), mtx_r.as_raw_Mat(), mtx_q.as_raw_Mat(), qx.as_raw_Mat(), qy.as_raw_Mat(), qz.as_raw_Mat()) }.into_result()
}

// identifier: cv_Rodrigues_Mat_src_Mat_dst_Mat_jacobian
/// Converts a rotation matrix to a rotation vector or vice versa.
/// 
/// ## Parameters
/// * src: Input rotation vector (3x1 or 1x3) or rotation matrix (3x3).
/// * dst: Output rotation matrix (3x3) or rotation vector (3x1 or 1x3), respectively.
/// * jacobian: Optional output Jacobian matrix, 3x9 or 9x3, which is a matrix of partial
/// derivatives of the output array components with respect to the input array components.
/// 
/// <div lang='latex'>\begin{array}{l} \theta \leftarrow norm(r) \\ r  \leftarrow r/ \theta \\ R =  \cos{\theta} I + (1- \cos{\theta} ) r r^T +  \sin{\theta} \vecthreethree{0}{-r_z}{r_y}{r_z}{0}{-r_x}{-r_y}{r_x}{0} \end{array}</div>
/// 
/// Inverse transformation can be also done easily, since
/// 
/// <div lang='latex'>\sin ( \theta ) \vecthreethree{0}{-r_z}{r_y}{r_z}{0}{-r_x}{-r_y}{r_x}{0} = \frac{R - R^T}{2}</div>
/// 
/// A rotation vector is a convenient and most compact representation of a rotation matrix (since any
/// rotation matrix has just 3 degrees of freedom). The representation is used in the global 3D geometry
/// optimization procedures like calibrateCamera, stereoCalibrate, or solvePnP .
///
/// ## C++ default parameters:
/// * jacobian: noArray()
pub fn rodrigues(src: &core::Mat, dst: &mut core::Mat, jacobian: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_Rodrigues_Mat_src_Mat_dst_Mat_jacobian(src.as_raw_Mat(), dst.as_raw_Mat(), jacobian.as_raw_Mat()) }.into_result()
}

// identifier: cv_SVBackSubst_Mat_w_Mat_u_Mat_vt_Mat_rhs_Mat_dst
/// wrap SVD::backSubst
pub fn sv_back_subst(w: &core::Mat, u: &core::Mat, vt: &core::Mat, rhs: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_SVBackSubst_Mat_w_Mat_u_Mat_vt_Mat_rhs_Mat_dst(w.as_raw_Mat(), u.as_raw_Mat(), vt.as_raw_Mat(), rhs.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_SVDecomp_Mat_src_Mat_w_Mat_u_Mat_vt_int_flags
/// wrap SVD::compute
///
/// ## C++ default parameters:
/// * flags: 0
pub fn sv_decomp(src: &core::Mat, w: &mut core::Mat, u: &mut core::Mat, vt: &mut core::Mat, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_SVDecomp_Mat_src_Mat_w_Mat_u_Mat_vt_int_flags(src.as_raw_Mat(), w.as_raw_Mat(), u.as_raw_Mat(), vt.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_Scharr_Mat_src_Mat_dst_int_ddepth_int_dx_int_dy_double_scale_double_delta_int_borderType
/// Calculates the first x- or y- image derivative using Scharr operator.
/// 
/// The function computes the first x- or y- spatial image derivative using the Scharr operator. The
/// call
/// 
/// <div lang='latex'>\texttt{Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)}</div>
/// 
/// is equivalent to
/// 
/// <div lang='latex'>\texttt{Sobel(src, dst, ddepth, dx, dy, CV_SCHARR, scale, delta, borderType)} .</div>
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image of the same size and the same number of channels as src.
/// * ddepth: output image depth, see @ref filter_depths "combinations"
/// * dx: order of the derivative x.
/// * dy: order of the derivative y.
/// * scale: optional scale factor for the computed derivative values; by default, no scaling is
/// applied (see #getDerivKernels for details).
/// * delta: optional delta value that is added to the results prior to storing them in dst.
/// * borderType: pixel extrapolation method, see #BorderTypes
/// @sa  cartToPolar
///
/// ## C++ default parameters:
/// * scale: 1
/// * delta: 0
/// * border_type: BORDER_DEFAULT
pub fn scharr(src: &core::Mat, dst: &mut core::Mat, ddepth: i32, dx: i32, dy: i32, scale: f64, delta: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_Scharr_Mat_src_Mat_dst_int_ddepth_int_dx_int_dy_double_scale_double_delta_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ddepth, dx, dy, scale, delta, border_type) }.into_result()
}

// identifier: cv_Sobel_Mat_src_Mat_dst_int_ddepth_int_dx_int_dy_int_ksize_double_scale_double_delta_int_borderType
/// Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
/// 
/// In all cases except one, the <span lang='latex'>\texttt{ksize} \times \texttt{ksize}</span> separable kernel is used to
/// calculate the derivative. When <span lang='latex'>\texttt{ksize = 1}</span>, the <span lang='latex'>3 \times 1</span> or <span lang='latex'>1 \times 3</span>
/// kernel is used (that is, no Gaussian smoothing is done). `ksize = 1` can only be used for the first
/// or the second x- or y- derivatives.
/// 
/// There is also the special value `ksize = #CV_SCHARR (-1)` that corresponds to the <span lang='latex'>3\times3</span> Scharr
/// filter that may give more accurate results than the <span lang='latex'>3\times3</span> Sobel. The Scharr aperture is
/// 
/// <div lang='latex'>\vecthreethree{-3}{0}{3}{-10}{0}{10}{-3}{0}{3}</div>
/// 
/// for the x-derivative, or transposed for the y-derivative.
/// 
/// The function calculates an image derivative by convolving the image with the appropriate kernel:
/// 
/// <div lang='latex'>\texttt{dst} =  \frac{\partial^{xorder+yorder} \texttt{src}}{\partial x^{xorder} \partial y^{yorder}}</div>
/// 
/// The Sobel operators combine Gaussian smoothing and differentiation, so the result is more or less
/// resistant to the noise. Most often, the function is called with ( xorder = 1, yorder = 0, ksize = 3)
/// or ( xorder = 0, yorder = 1, ksize = 3) to calculate the first x- or y- image derivative. The first
/// case corresponds to a kernel of:
/// 
/// <div lang='latex'>\vecthreethree{-1}{0}{1}{-2}{0}{2}{-1}{0}{1}</div>
/// 
/// The second case corresponds to a kernel of:
/// 
/// <div lang='latex'>\vecthreethree{-1}{-2}{-1}{0}{0}{0}{1}{2}{1}</div>
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image of the same size and the same number of channels as src .
/// * ddepth: output image depth, see @ref filter_depths "combinations"; in the case of
/// 8-bit input images it will result in truncated derivatives.
/// * dx: order of the derivative x.
/// * dy: order of the derivative y.
/// * ksize: size of the extended Sobel kernel; it must be 1, 3, 5, or 7.
/// * scale: optional scale factor for the computed derivative values; by default, no scaling is
/// applied (see #getDerivKernels for details).
/// * delta: optional delta value that is added to the results prior to storing them in dst.
/// * borderType: pixel extrapolation method, see #BorderTypes
/// @sa  Scharr, Laplacian, sepFilter2D, filter2D, GaussianBlur, cartToPolar
///
/// ## C++ default parameters:
/// * ksize: 3
/// * scale: 1
/// * delta: 0
/// * border_type: BORDER_DEFAULT
pub fn sobel(src: &core::Mat, dst: &mut core::Mat, ddepth: i32, dx: i32, dy: i32, ksize: i32, scale: f64, delta: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_Sobel_Mat_src_Mat_dst_int_ddepth_int_dx_int_dy_int_ksize_double_scale_double_delta_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ddepth, dx, dy, ksize, scale, delta, border_type) }.into_result()
}

// identifier: cv_abs_softdouble_a
pub fn abs(a: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_abs_softdouble_a(a.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_abs_softfloat_a
/// Absolute value
pub fn abs_1(a: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_abs_softfloat_a(a.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_absdiff_Mat_src1_Mat_src2_Mat_dst
/// Calculates the per-element absolute difference between two arrays or between an array and a scalar.
/// 
/// The function cv::absdiff calculates:
///   Absolute difference between two arrays when they have the same
/// size and type:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} (| \texttt{src1}(I) -  \texttt{src2}(I)|)</div>
///   Absolute difference between an array and a scalar when the second
/// array is constructed from Scalar or has as many elements as the
/// number of channels in `src1`:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} (| \texttt{src1}(I) -  \texttt{src2} |)</div>
///   Absolute difference between a scalar and an array when the first
/// array is constructed from Scalar or has as many elements as the
/// number of channels in `src2`:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} (| \texttt{src1} -  \texttt{src2}(I) |)</div>
/// where I is a multi-dimensional index of array elements. In case of
/// multi-channel arrays, each channel is processed independently.
/// 
/// Note: Saturation is not applied when the arrays have the depth CV_32S.
/// You may even get a negative value in the case of overflow.
/// ## Parameters
/// * src1: first input array or a scalar.
/// * src2: second input array or a scalar.
/// * dst: output array that has the same size and type as input arrays.
/// @sa cv::abs(const Mat&)
pub fn absdiff(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_absdiff_Mat_src1_Mat_src2_Mat_dst(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_accumulateProduct_Mat_src1_Mat_src2_Mat_dst_Mat_mask
/// Adds the per-element product of two input images to the accumulator image.
/// 
/// The function adds the product of two images or their selected regions to the accumulator dst :
/// 
/// <div lang='latex'>\texttt{dst} (x,y)  \leftarrow \texttt{dst} (x,y) +  \texttt{src1} (x,y)  \cdot \texttt{src2} (x,y)  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0</div>
/// 
/// The function supports multi-channel images. Each channel is processed independently.
/// 
/// ## Parameters
/// * src1: First input image, 1- or 3-channel, 8-bit or 32-bit floating point.
/// * src2: Second input image of the same type and the same size as src1 .
/// * dst: %Accumulator image with the same number of channels as input images, 32-bit or 64-bit
/// floating-point.
/// * mask: Optional operation mask.
/// 
/// @sa  accumulate, accumulateSquare, accumulateWeighted
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn accumulate_product(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_accumulateProduct_Mat_src1_Mat_src2_Mat_dst_Mat_mask(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_accumulateSquare_Mat_src_Mat_dst_Mat_mask
/// Adds the square of a source image to the accumulator image.
/// 
/// The function adds the input image src or its selected region, raised to a power of 2, to the
/// accumulator dst :
/// 
/// <div lang='latex'>\texttt{dst} (x,y)  \leftarrow \texttt{dst} (x,y) +  \texttt{src} (x,y)^2  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0</div>
/// 
/// The function supports multi-channel images. Each channel is processed independently.
/// 
/// ## Parameters
/// * src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point.
/// * dst: %Accumulator image with the same number of channels as input image, 32-bit or 64-bit
/// floating-point.
/// * mask: Optional operation mask.
/// 
/// @sa  accumulateSquare, accumulateProduct, accumulateWeighted
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn accumulate_square(src: &core::Mat, dst: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_accumulateSquare_Mat_src_Mat_dst_Mat_mask(src.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_accumulateWeighted_Mat_src_Mat_dst_double_alpha_Mat_mask
/// Updates a running average.
/// 
/// The function calculates the weighted sum of the input image src and the accumulator dst so that dst
/// becomes a running average of a frame sequence:
/// 
/// <div lang='latex'>\texttt{dst} (x,y)  \leftarrow (1- \texttt{alpha} )  \cdot \texttt{dst} (x,y) +  \texttt{alpha} \cdot \texttt{src} (x,y)  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0</div>
/// 
/// That is, alpha regulates the update speed (how fast the accumulator "forgets" about earlier images).
/// The function supports multi-channel images. Each channel is processed independently.
/// 
/// ## Parameters
/// * src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point.
/// * dst: %Accumulator image with the same number of channels as input image, 32-bit or 64-bit
/// floating-point.
/// * alpha: Weight of the input image.
/// * mask: Optional operation mask.
/// 
/// @sa  accumulate, accumulateSquare, accumulateProduct
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn accumulate_weighted(src: &core::Mat, dst: &mut core::Mat, alpha: f64, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_accumulateWeighted_Mat_src_Mat_dst_double_alpha_Mat_mask(src.as_raw_Mat(), dst.as_raw_Mat(), alpha, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_accumulate_Mat_src_Mat_dst_Mat_mask
/// Adds an image to the accumulator image.
/// 
/// The function adds src or some of its elements to dst :
/// 
/// <div lang='latex'>\texttt{dst} (x,y)  \leftarrow \texttt{dst} (x,y) +  \texttt{src} (x,y)  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0</div>
/// 
/// The function supports multi-channel images. Each channel is processed independently.
/// 
/// The function cv::accumulate can be used, for example, to collect statistics of a scene background
/// viewed by a still camera and for the further foreground-background segmentation.
/// 
/// ## Parameters
/// * src: Input image of type CV_8UC(n), CV_16UC(n), CV_32FC(n) or CV_64FC(n), where n is a positive integer.
/// * dst: %Accumulator image with the same number of channels as input image, and a depth of CV_32F or CV_64F.
/// * mask: Optional operation mask.
/// 
/// @sa  accumulateSquare, accumulateProduct, accumulateWeighted
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn accumulate(src: &core::Mat, dst: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_accumulate_Mat_src_Mat_dst_Mat_mask(src.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_adaptiveThreshold_Mat_src_Mat_dst_double_maxValue_int_adaptiveMethod_int_thresholdType_int_blockSize_double_C
/// Applies an adaptive threshold to an array.
/// 
/// The function transforms a grayscale image to a binary image according to the formulae:
/// *   **THRESH_BINARY**
/// <div lang='latex'>dst(x,y) =  \fork{\texttt{maxValue}}{if \(src(x,y) > T(x,y)\)}{0}{otherwise}</div>
/// *   **THRESH_BINARY_INV**
/// <div lang='latex'>dst(x,y) =  \fork{0}{if \(src(x,y) > T(x,y)\)}{\texttt{maxValue}}{otherwise}</div>
/// where <span lang='latex'>T(x,y)</span> is a threshold calculated individually for each pixel (see adaptiveMethod parameter).
/// 
/// The function can process the image in-place.
/// 
/// ## Parameters
/// * src: Source 8-bit single-channel image.
/// * dst: Destination image of the same size and the same type as src.
/// * maxValue: Non-zero value assigned to the pixels for which the condition is satisfied
/// * adaptiveMethod: Adaptive thresholding algorithm to use, see #AdaptiveThresholdTypes.
/// The #BORDER_REPLICATE | #BORDER_ISOLATED is used to process boundaries.
/// * thresholdType: Thresholding type that must be either #THRESH_BINARY or #THRESH_BINARY_INV,
/// see #ThresholdTypes.
/// * blockSize: Size of a pixel neighborhood that is used to calculate a threshold value for the
/// pixel: 3, 5, 7, and so on.
/// * C: Constant subtracted from the mean or weighted mean (see the details below). Normally, it
/// is positive but may be zero or negative as well.
/// 
/// @sa  threshold, blur, GaussianBlur
pub fn adaptive_threshold(src: &core::Mat, dst: &mut core::Mat, max_value: f64, adaptive_method: i32, threshold_type: i32, block_size: i32, c: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_adaptiveThreshold_Mat_src_Mat_dst_double_maxValue_int_adaptiveMethod_int_thresholdType_int_blockSize_double_C(src.as_raw_Mat(), dst.as_raw_Mat(), max_value, adaptive_method, threshold_type, block_size, c) }.into_result()
}

// identifier: cv_addText_Mat_img_String_text_Point_org_QtFont_font
/// Draws a text on the image.
/// 
/// The function addText draws *text* on the image *img* using a specific font *font* (see example cv::fontQt
/// )
/// 
/// ## Parameters
/// * img: 8-bit 3-channel image where the text should be drawn.
/// * text: Text to write on an image.
/// * org: Point(x,y) where the text should start on an image.
/// * font: Font to use to draw a text.
pub fn add_text(img: &core::Mat, text: &str, org: core::Point, font: &core::QtFont) -> Result<()> {
    string_arg!(text);
    unsafe { sys::cv_core_cv_addText_Mat_img_String_text_Point_org_QtFont_font(img.as_raw_Mat(), text.as_ptr(), org, font.as_raw_QtFont()) }.into_result()
}

// identifier: cv_addText_Mat_img_String_text_Point_org_String_nameFont_int_pointSize_Scalar_color_int_weight_int_style_int_spacing
/// Draws a text on the image.
/// 
/// ## Parameters
/// * img: 8-bit 3-channel image where the text should be drawn.
/// * text: Text to write on an image.
/// * org: Point(x,y) where the text should start on an image.
/// * nameFont: Name of the font. The name should match the name of a system font (such as
/// *Times*). If the font is not found, a default one is used.
/// * pointSize: Size of the font. If not specified, equal zero or negative, the point size of the
/// font is set to a system-dependent default value. Generally, this is 12 points.
/// * color: Color of the font in BGRA where A = 255 is fully transparent.
/// * weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control.
/// * style: Font style. Available operation flags are : cv::QtFontStyles
/// * spacing: Spacing between characters. It can be negative or positive.
///
/// ## C++ default parameters:
/// * point_size: -1
/// * color: Scalar::all(0)
/// * weight: QT_FONT_NORMAL
/// * style: QT_STYLE_NORMAL
/// * spacing: 0
pub fn add_text_1(img: &core::Mat, text: &str, org: core::Point, name_font: &str, point_size: i32, color: core::Scalar, weight: i32, style: i32, spacing: i32) -> Result<()> {
    string_arg!(text);
    string_arg!(name_font);
    unsafe { sys::cv_core_cv_addText_Mat_img_String_text_Point_org_String_nameFont_int_pointSize_Scalar_color_int_weight_int_style_int_spacing(img.as_raw_Mat(), text.as_ptr(), org, name_font.as_ptr(), point_size, color, weight, style, spacing) }.into_result()
}

// identifier: cv_addWeighted_Mat_src1_double_alpha_Mat_src2_double_beta_double_gamma_Mat_dst_int_dtype
/// Calculates the weighted sum of two arrays.
/// 
/// The function addWeighted calculates the weighted sum of two arrays as follows:
/// <div lang='latex'>\texttt{dst} (I)= \texttt{saturate} ( \texttt{src1} (I)* \texttt{alpha} +  \texttt{src2} (I)* \texttt{beta} +  \texttt{gamma} )</div>
/// where I is a multi-dimensional index of array elements. In case of multi-channel arrays, each
/// channel is processed independently.
/// The function can be replaced with a matrix expression:
/// ```ignore{.cpp}
/// dst = src1*alpha + src2*beta + gamma;
/// ```
/// 
/// 
/// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get
/// result of an incorrect sign in the case of overflow.
/// ## Parameters
/// * src1: first input array.
/// * alpha: weight of the first array elements.
/// * src2: second input array of the same size and channel number as src1.
/// * beta: weight of the second array elements.
/// * gamma: scalar added to each sum.
/// * dst: output array that has the same size and number of channels as the input arrays.
/// * dtype: optional depth of the output array; when both input arrays have the same depth, dtype
/// can be set to -1, which will be equivalent to src1.depth().
/// @sa  add, subtract, scaleAdd, Mat::convertTo
///
/// ## C++ default parameters:
/// * dtype: -1
pub fn add_weighted(src1: &core::Mat, alpha: f64, src2: &core::Mat, beta: f64, gamma: f64, dst: &mut core::Mat, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_addWeighted_Mat_src1_double_alpha_Mat_src2_double_beta_double_gamma_Mat_dst_int_dtype(src1.as_raw_Mat(), alpha, src2.as_raw_Mat(), beta, gamma, dst.as_raw_Mat(), dtype) }.into_result()
}

// identifier: cv_add_Mat_src1_Mat_src2_Mat_dst_Mat_mask_int_dtype
/// Calculates the per-element sum of two arrays or an array and a scalar.
/// 
/// The function add calculates:
/// - Sum of two arrays when both input arrays have the same size and the same number of channels:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} ( \texttt{src1}(I) +  \texttt{src2}(I)) \quad \texttt{if mask}(I) \ne0</div>
/// - Sum of an array and a scalar when src2 is constructed from Scalar or has the same number of
/// elements as `src1.channels()`:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} ( \texttt{src1}(I) +  \texttt{src2} ) \quad \texttt{if mask}(I) \ne0</div>
/// - Sum of a scalar and an array when src1 is constructed from Scalar or has the same number of
/// elements as `src2.channels()`:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} ( \texttt{src1} +  \texttt{src2}(I) ) \quad \texttt{if mask}(I) \ne0</div>
/// where `I` is a multi-dimensional index of array elements. In case of multi-channel arrays, each
/// channel is processed independently.
/// 
/// The first function in the list above can be replaced with matrix expressions:
/// ```ignore{.cpp}
/// dst = src1 + src2;
/// dst += src1; // equivalent to add(dst, src1, dst);
/// ```
/// 
/// The input arrays and the output array can all have the same or different depths. For example, you
/// can add a 16-bit unsigned array to a 8-bit signed array and store the sum as a 32-bit
/// floating-point array. Depth of the output array is determined by the dtype parameter. In the second
/// and third cases above, as well as in the first case, when src1.depth() == src2.depth(), dtype can
/// be set to the default -1. In this case, the output array will have the same depth as the input
/// array, be it src1, src2 or both.
/// 
/// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get
/// result of an incorrect sign in the case of overflow.
/// ## Parameters
/// * src1: first input array or a scalar.
/// * src2: second input array or a scalar.
/// * dst: output array that has the same size and number of channels as the input array(s); the
/// depth is defined by dtype or src1/src2.
/// * mask: optional operation mask - 8-bit single channel array, that specifies elements of the
/// output array to be changed.
/// * dtype: optional depth of the output array (see the discussion below).
/// @sa subtract, addWeighted, scaleAdd, Mat::convertTo
///
/// ## C++ default parameters:
/// * mask: noArray()
/// * dtype: -1
pub fn add(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, mask: &core::Mat, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_add_Mat_src1_Mat_src2_Mat_dst_Mat_mask_int_dtype(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat(), dtype) }.into_result()
}

// identifier: cv_alignSize_size_t_sz_int_n
/// Aligns a buffer size to the specified number of bytes.
/// 
/// The function returns the minimum number that is greater than or equal to sz and is divisible by n :
/// <div lang='latex'>\texttt{(sz + n-1) & -n}</div>
/// ## Parameters
/// * sz: Buffer size to align.
/// * n: Alignment size that must be a power of two.
pub fn align_size(sz: size_t, n: i32) -> Result<size_t> {
    unsafe { sys::cv_core_cv_alignSize_size_t_sz_int_n(sz, n) }.into_result()
}

// identifier: cv_applyColorMap_Mat_src_Mat_dst_Mat_userColor
/// Applies a user colormap on a given image.
/// 
/// ## Parameters
/// * src: The source image, grayscale or colored of type CV_8UC1 or CV_8UC3.
/// * dst: The result is the colormapped source image. Note: Mat::create is called on dst.
/// * userColor: The colormap to apply of type CV_8UC1 or CV_8UC3 and size 256
pub fn apply_color_map(src: &core::Mat, dst: &mut core::Mat, user_color: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_applyColorMap_Mat_src_Mat_dst_Mat_userColor(src.as_raw_Mat(), dst.as_raw_Mat(), user_color.as_raw_Mat()) }.into_result()
}

// identifier: cv_applyColorMap_Mat_src_Mat_dst_int_colormap
/// Applies a GNU Octave/MATLAB equivalent colormap on a given image.
/// 
/// ## Parameters
/// * src: The source image, grayscale or colored of type CV_8UC1 or CV_8UC3.
/// * dst: The result is the colormapped source image. Note: Mat::create is called on dst.
/// * colormap: The colormap to apply, see #ColormapTypes
pub fn apply_color_map_1(src: &core::Mat, dst: &mut core::Mat, colormap: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_applyColorMap_Mat_src_Mat_dst_int_colormap(src.as_raw_Mat(), dst.as_raw_Mat(), colormap) }.into_result()
}

// identifier: cv_approxPolyDP_Mat_curve_Mat_approxCurve_double_epsilon_bool_closed
/// Approximates a polygonal curve(s) with the specified precision.
/// 
/// The function cv::approxPolyDP approximates a curve or a polygon with another curve/polygon with less
/// vertices so that the distance between them is less or equal to the specified precision. It uses the
/// Douglas-Peucker algorithm <http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm>
/// 
/// ## Parameters
/// * curve: Input vector of a 2D point stored in std::vector or Mat
/// * approxCurve: Result of the approximation. The type should match the type of the input curve.
/// * epsilon: Parameter specifying the approximation accuracy. This is the maximum distance
/// between the original curve and its approximation.
/// * closed: If true, the approximated curve is closed (its first and last vertices are
/// connected). Otherwise, it is not closed.
pub fn approx_poly_dp(curve: &core::Mat, approx_curve: &mut core::Mat, epsilon: f64, closed: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_approxPolyDP_Mat_curve_Mat_approxCurve_double_epsilon_bool_closed(curve.as_raw_Mat(), approx_curve.as_raw_Mat(), epsilon, closed) }.into_result()
}

// identifier: cv_arcLength_Mat_curve_bool_closed
/// Calculates a contour perimeter or a curve length.
/// 
/// The function computes a curve length or a closed contour perimeter.
/// 
/// ## Parameters
/// * curve: Input vector of 2D points, stored in std::vector or Mat.
/// * closed: Flag indicating whether the curve is closed or not.
pub fn arc_length(curve: &core::Mat, closed: bool) -> Result<f64> {
    unsafe { sys::cv_core_cv_arcLength_Mat_curve_bool_closed(curve.as_raw_Mat(), closed) }.into_result()
}

// identifier: cv_arrowedLine_Mat_img_Point_pt1_Point_pt2_Scalar_color_int_thickness_int_line_type_int_shift_double_tipLength
/// Draws a arrow segment pointing from the first point to the second one.
/// 
/// The function cv::arrowedLine draws an arrow between pt1 and pt2 points in the image. See also #line.
/// 
/// ## Parameters
/// * img: Image.
/// * pt1: The point the arrow starts from.
/// * pt2: The point the arrow points to.
/// * color: Line color.
/// * thickness: Line thickness.
/// * line_type: Type of the line. See #LineTypes
/// * shift: Number of fractional bits in the point coordinates.
/// * tipLength: The length of the arrow tip in relation to the arrow length
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: 8
/// * shift: 0
/// * tip_length: 0.1
pub fn arrowed_line(img: &mut core::Mat, pt1: core::Point, pt2: core::Point, color: core::Scalar, thickness: i32, line_type: i32, shift: i32, tip_length: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_arrowedLine_Mat_img_Point_pt1_Point_pt2_Scalar_color_int_thickness_int_line_type_int_shift_double_tipLength(img.as_raw_Mat(), pt1, pt2, color, thickness, line_type, shift, tip_length) }.into_result()
}

// identifier: cv_batchDistance_Mat_src1_Mat_src2_Mat_dist_int_dtype_Mat_nidx_int_normType_int_K_Mat_mask_int_update_bool_crosscheck
/// naive nearest neighbor finder
/// 
/// see http://en.wikipedia.org/wiki/Nearest_neighbor_search
/// @todo document
///
/// ## C++ default parameters:
/// * norm_type: NORM_L2
/// * k: 0
/// * mask: noArray()
/// * update: 0
/// * crosscheck: false
pub fn batch_distance(src1: &core::Mat, src2: &core::Mat, dist: &mut core::Mat, dtype: i32, nidx: &mut core::Mat, norm_type: i32, k: i32, mask: &core::Mat, update: i32, crosscheck: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_batchDistance_Mat_src1_Mat_src2_Mat_dist_int_dtype_Mat_nidx_int_normType_int_K_Mat_mask_int_update_bool_crosscheck(src1.as_raw_Mat(), src2.as_raw_Mat(), dist.as_raw_Mat(), dtype, nidx.as_raw_Mat(), norm_type, k, mask.as_raw_Mat(), update, crosscheck) }.into_result()
}

// identifier: cv_bilateralFilter_Mat_src_Mat_dst_int_d_double_sigmaColor_double_sigmaSpace_int_borderType
/// Applies the bilateral filter to an image.
/// 
/// The function applies bilateral filtering to the input image, as described in
/// http://www.dai.ed.ac.uk/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html
/// bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is
/// very slow compared to most filters.
/// 
/// _Sigma values_: For simplicity, you can set the 2 sigma values to be the same. If they are small (\<
/// 10), the filter will not have much effect, whereas if they are large (\> 150), they will have a very
/// strong effect, making the image look "cartoonish".
/// 
/// _Filter size_: Large filters (d \> 5) are very slow, so it is recommended to use d=5 for real-time
/// applications, and perhaps d=9 for offline applications that need heavy noise filtering.
/// 
/// This filter does not work inplace.
/// ## Parameters
/// * src: Source 8-bit or floating-point, 1-channel or 3-channel image.
/// * dst: Destination image of the same size and type as src .
/// * d: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive,
/// it is computed from sigmaSpace.
/// * sigmaColor: Filter sigma in the color space. A larger value of the parameter means that
/// farther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting
/// in larger areas of semi-equal color.
/// * sigmaSpace: Filter sigma in the coordinate space. A larger value of the parameter means that
/// farther pixels will influence each other as long as their colors are close enough (see sigmaColor
/// ). When d\>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is
/// proportional to sigmaSpace.
/// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes
///
/// ## C++ default parameters:
/// * border_type: BORDER_DEFAULT
pub fn bilateral_filter(src: &core::Mat, dst: &mut core::Mat, d: i32, sigma_color: f64, sigma_space: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_bilateralFilter_Mat_src_Mat_dst_int_d_double_sigmaColor_double_sigmaSpace_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), d, sigma_color, sigma_space, border_type) }.into_result()
}

// identifier: cv_bitwise_and_Mat_src1_Mat_src2_Mat_dst_Mat_mask
/// computes bitwise conjunction of the two arrays (dst = src1 & src2)
/// Calculates the per-element bit-wise conjunction of two arrays or an
/// array and a scalar.
/// 
/// The function cv::bitwise_and calculates the per-element bit-wise logical conjunction for:
///   Two arrays when src1 and src2 have the same size:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1} (I)  \wedge \texttt{src2} (I) \quad \texttt{if mask} (I) \ne0</div>
///   An array and a scalar when src2 is constructed from Scalar or has
/// the same number of elements as `src1.channels()`:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1} (I)  \wedge \texttt{src2} \quad \texttt{if mask} (I) \ne0</div>
///   A scalar and an array when src1 is constructed from Scalar or has
/// the same number of elements as `src2.channels()`:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1}  \wedge \texttt{src2} (I) \quad \texttt{if mask} (I) \ne0</div>
/// In case of floating-point arrays, their machine-specific bit
/// representations (usually IEEE754-compliant) are used for the operation.
/// In case of multi-channel arrays, each channel is processed
/// independently. In the second and third cases above, the scalar is first
/// converted to the array type.
/// ## Parameters
/// * src1: first input array or a scalar.
/// * src2: second input array or a scalar.
/// * dst: output array that has the same size and type as the input
/// arrays.
/// * mask: optional operation mask, 8-bit single channel array, that
/// specifies elements of the output array to be changed.
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn bitwise_and(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_bitwise_and_Mat_src1_Mat_src2_Mat_dst_Mat_mask(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_bitwise_not_Mat_src_Mat_dst_Mat_mask
/// Inverts every bit of an array.
/// 
/// The function cv::bitwise_not calculates per-element bit-wise inversion of the input
/// array:
/// <div lang='latex'>\texttt{dst} (I) =  \neg \texttt{src} (I)</div>
/// In case of a floating-point input array, its machine-specific bit
/// representation (usually IEEE754-compliant) is used for the operation. In
/// case of multi-channel arrays, each channel is processed independently.
/// ## Parameters
/// * src: input array.
/// * dst: output array that has the same size and type as the input
/// array.
/// * mask: optional operation mask, 8-bit single channel array, that
/// specifies elements of the output array to be changed.
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn bitwise_not(src: &core::Mat, dst: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_bitwise_not_Mat_src_Mat_dst_Mat_mask(src.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_bitwise_or_Mat_src1_Mat_src2_Mat_dst_Mat_mask
/// Calculates the per-element bit-wise disjunction of two arrays or an
/// array and a scalar.
/// 
/// The function cv::bitwise_or calculates the per-element bit-wise logical disjunction for:
///   Two arrays when src1 and src2 have the same size:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1} (I)  \vee \texttt{src2} (I) \quad \texttt{if mask} (I) \ne0</div>
///   An array and a scalar when src2 is constructed from Scalar or has
/// the same number of elements as `src1.channels()`:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1} (I)  \vee \texttt{src2} \quad \texttt{if mask} (I) \ne0</div>
///   A scalar and an array when src1 is constructed from Scalar or has
/// the same number of elements as `src2.channels()`:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1}  \vee \texttt{src2} (I) \quad \texttt{if mask} (I) \ne0</div>
/// In case of floating-point arrays, their machine-specific bit
/// representations (usually IEEE754-compliant) are used for the operation.
/// In case of multi-channel arrays, each channel is processed
/// independently. In the second and third cases above, the scalar is first
/// converted to the array type.
/// ## Parameters
/// * src1: first input array or a scalar.
/// * src2: second input array or a scalar.
/// * dst: output array that has the same size and type as the input
/// arrays.
/// * mask: optional operation mask, 8-bit single channel array, that
/// specifies elements of the output array to be changed.
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn bitwise_or(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_bitwise_or_Mat_src1_Mat_src2_Mat_dst_Mat_mask(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_bitwise_xor_Mat_src1_Mat_src2_Mat_dst_Mat_mask
/// Calculates the per-element bit-wise "exclusive or" operation on two
/// arrays or an array and a scalar.
/// 
/// The function cv::bitwise_xor calculates the per-element bit-wise logical "exclusive-or"
/// operation for:
///   Two arrays when src1 and src2 have the same size:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1} (I)  \oplus \texttt{src2} (I) \quad \texttt{if mask} (I) \ne0</div>
///   An array and a scalar when src2 is constructed from Scalar or has
/// the same number of elements as `src1.channels()`:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1} (I)  \oplus \texttt{src2} \quad \texttt{if mask} (I) \ne0</div>
///   A scalar and an array when src1 is constructed from Scalar or has
/// the same number of elements as `src2.channels()`:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1}  \oplus \texttt{src2} (I) \quad \texttt{if mask} (I) \ne0</div>
/// In case of floating-point arrays, their machine-specific bit
/// representations (usually IEEE754-compliant) are used for the operation.
/// In case of multi-channel arrays, each channel is processed
/// independently. In the 2nd and 3rd cases above, the scalar is first
/// converted to the array type.
/// ## Parameters
/// * src1: first input array or a scalar.
/// * src2: second input array or a scalar.
/// * dst: output array that has the same size and type as the input
/// arrays.
/// * mask: optional operation mask, 8-bit single channel array, that
/// specifies elements of the output array to be changed.
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn bitwise_xor(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_bitwise_xor_Mat_src1_Mat_src2_Mat_dst_Mat_mask(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_blendLinear_Mat_src1_Mat_src2_Mat_weights1_Mat_weights2_Mat_dst
pub fn blend_linear(src1: &core::Mat, src2: &core::Mat, weights1: &core::Mat, weights2: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_blendLinear_Mat_src1_Mat_src2_Mat_weights1_Mat_weights2_Mat_dst(src1.as_raw_Mat(), src2.as_raw_Mat(), weights1.as_raw_Mat(), weights2.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_blur_Mat_src_Mat_dst_Size_ksize_Point_anchor_int_borderType
/// Blurs an image using the normalized box filter.
/// 
/// The function smooths an image using the kernel:
/// 
/// <div lang='latex'>\texttt{K} =  \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 &  \cdots & 1 & 1  \\ 1 & 1 & 1 &  \cdots & 1 & 1  \\ \hdotsfor{6} \\ 1 & 1 & 1 &  \cdots & 1 & 1  \\ \end{bmatrix}</div>
/// 
/// The call `blur(src, dst, ksize, anchor, borderType)` is equivalent to `boxFilter(src, dst, src.type(),
/// anchor, true, borderType)`.
/// 
/// ## Parameters
/// * src: input image; it can have any number of channels, which are processed independently, but
/// the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
/// * dst: output image of the same size and type as src.
/// * ksize: blurring kernel size.
/// * anchor: anchor point; default value Point(-1,-1) means that the anchor is at the kernel
/// center.
/// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes
/// @sa  boxFilter, bilateralFilter, GaussianBlur, medianBlur
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
/// * border_type: BORDER_DEFAULT
pub fn blur(src: &core::Mat, dst: &mut core::Mat, ksize: core::Size, anchor: core::Point, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_blur_Mat_src_Mat_dst_Size_ksize_Point_anchor_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ksize, anchor, border_type) }.into_result()
}

// identifier: cv_borderInterpolate_int_p_int_len_int_borderType
/// Computes the source location of an extrapolated pixel.
/// 
/// The function computes and returns the coordinate of a donor pixel corresponding to the specified
/// extrapolated pixel when using the specified extrapolation border mode. For example, if you use
/// cv::BORDER_WRAP mode in the horizontal direction, cv::BORDER_REFLECT_101 in the vertical direction and
/// want to compute value of the "virtual" pixel Point(-5, 100) in a floating-point image img , it
/// looks like:
/// ```ignore{.cpp}
/// float val = img.at<float>(borderInterpolate(100, img.rows, cv::BORDER_REFLECT_101),
/// borderInterpolate(-5, img.cols, cv::BORDER_WRAP));
/// ```
/// 
/// Normally, the function is not called directly. It is used inside filtering functions and also in
/// copyMakeBorder.
/// ## Parameters
/// * p: 0-based coordinate of the extrapolated pixel along one of the axes, likely \<0 or \>= len
/// * len: Length of the array along the corresponding axis.
/// * borderType: Border type, one of the #BorderTypes, except for #BORDER_TRANSPARENT and
/// #BORDER_ISOLATED . When borderType==#BORDER_CONSTANT , the function always returns -1, regardless
/// of p and len.
/// 
/// @sa copyMakeBorder
pub fn border_interpolate(p: i32, len: i32, border_type: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_borderInterpolate_int_p_int_len_int_borderType(p, len, border_type) }.into_result()
}

// identifier: cv_boundingRect_Mat_array
/// Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
/// 
/// The function calculates and returns the minimal up-right bounding rectangle for the specified point set or
/// non-zero pixels of gray-scale image.
/// 
/// ## Parameters
/// * array: Input gray-scale image or 2D point set, stored in std::vector or Mat.
pub fn bounding_rect(array: &core::Mat) -> Result<core::Rect> {
    unsafe { sys::cv_core_cv_boundingRect_Mat_array(array.as_raw_Mat()) }.into_result()
}

// identifier: cv_boxFilter_Mat_src_Mat_dst_int_ddepth_Size_ksize_Point_anchor_bool_normalize_int_borderType
/// Blurs an image using the box filter.
/// 
/// The function smooths an image using the kernel:
/// 
/// <div lang='latex'>\texttt{K} =  \alpha \begin{bmatrix} 1 & 1 & 1 &  \cdots & 1 & 1  \\ 1 & 1 & 1 &  \cdots & 1 & 1  \\ \hdotsfor{6} \\ 1 & 1 & 1 &  \cdots & 1 & 1 \end{bmatrix}</div>
/// 
/// where
/// 
/// <div lang='latex'>\alpha = \fork{\frac{1}{\texttt{ksize.width*ksize.height}}}{when \texttt{normalize=true}}{1}{otherwise}</div>
/// 
/// Unnormalized box filter is useful for computing various integral characteristics over each pixel
/// neighborhood, such as covariance matrices of image derivatives (used in dense optical flow
/// algorithms, and so on). If you need to compute pixel sums over variable-size windows, use #integral.
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image of the same size and type as src.
/// * ddepth: the output image depth (-1 to use src.depth()).
/// * ksize: blurring kernel size.
/// * anchor: anchor point; default value Point(-1,-1) means that the anchor is at the kernel
/// center.
/// * normalize: flag, specifying whether the kernel is normalized by its area or not.
/// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes
/// @sa  blur, bilateralFilter, GaussianBlur, medianBlur, integral
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
/// * normalize: true
/// * border_type: BORDER_DEFAULT
pub fn box_filter(src: &core::Mat, dst: &mut core::Mat, ddepth: i32, ksize: core::Size, anchor: core::Point, normalize: bool, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_boxFilter_Mat_src_Mat_dst_int_ddepth_Size_ksize_Point_anchor_bool_normalize_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ddepth, ksize, anchor, normalize, border_type) }.into_result()
}

// identifier: cv_boxPoints_RotatedRect_box_Mat_points
/// Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
/// 
/// The function finds the four vertices of a rotated rectangle. This function is useful to draw the
/// rectangle. In C++, instead of using this function, you can directly use RotatedRect::points method. Please
/// visit the @ref tutorial_bounding_rotated_ellipses "tutorial on Creating Bounding rotated boxes and ellipses for contours" for more information.
/// 
/// ## Parameters
/// * box: The input rotated rectangle. It may be the output of
/// * points: The output array of four vertices of rectangles.
pub fn box_points(_box: &core::RotatedRect, points: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_boxPoints_RotatedRect_box_Mat_points(_box.as_raw_RotatedRect(), points.as_raw_Mat()) }.into_result()
}

// identifier: cv_buildOpticalFlowPyramid_Mat_img_VectorOfMat_pyramid_Size_winSize_int_maxLevel_bool_withDerivatives_int_pyrBorder_int_derivBorder_bool_tryReuseInputImage
/// Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.
/// 
/// ## Parameters
/// * img: 8-bit input image.
/// * pyramid: output pyramid.
/// * winSize: window size of optical flow algorithm. Must be not less than winSize argument of
/// calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels.
/// * maxLevel: 0-based maximal pyramid level number.
/// * withDerivatives: set to precompute gradients for the every pyramid level. If pyramid is
/// constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally.
/// * pyrBorder: the border mode for pyramid layers.
/// * derivBorder: the border mode for gradients.
/// * tryReuseInputImage: put ROI of input image into the pyramid if possible. You can pass false
/// to force data copying.
/// @return number of levels in constructed pyramid. Can be less than maxLevel.
///
/// ## C++ default parameters:
/// * with_derivatives: true
/// * pyr_border: BORDER_REFLECT_101
/// * deriv_border: BORDER_CONSTANT
/// * try_reuse_input_image: true
pub fn build_optical_flow_pyramid(img: &core::Mat, pyramid: &mut types::VectorOfMat, win_size: core::Size, max_level: i32, with_derivatives: bool, pyr_border: i32, deriv_border: i32, try_reuse_input_image: bool) -> Result<i32> {
    unsafe { sys::cv_core_cv_buildOpticalFlowPyramid_Mat_img_VectorOfMat_pyramid_Size_winSize_int_maxLevel_bool_withDerivatives_int_pyrBorder_int_derivBorder_bool_tryReuseInputImage(img.as_raw_Mat(), pyramid.as_raw_VectorOfMat(), win_size, max_level, with_derivatives, pyr_border, deriv_border, try_reuse_input_image) }.into_result()
}

// identifier: cv_buildPyramid_Mat_src_VectorOfMat_dst_int_maxlevel_int_borderType
/// Constructs the Gaussian pyramid for an image.
/// 
/// The function constructs a vector of images and builds the Gaussian pyramid by recursively applying
/// pyrDown to the previously built pyramid layers, starting from `dst[0]==src`.
/// 
/// ## Parameters
/// * src: Source image. Check pyrDown for the list of supported types.
/// * dst: Destination vector of maxlevel+1 images of the same type as src. dst[0] will be the
/// same as src. dst[1] is the next pyramid layer, a smoothed and down-sized src, and so on.
/// * maxlevel: 0-based index of the last (the smallest) pyramid layer. It must be non-negative.
/// * borderType: Pixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)
///
/// ## C++ default parameters:
/// * border_type: BORDER_DEFAULT
pub fn build_pyramid(src: &core::Mat, dst: &mut types::VectorOfMat, maxlevel: i32, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_buildPyramid_Mat_src_VectorOfMat_dst_int_maxlevel_int_borderType(src.as_raw_Mat(), dst.as_raw_VectorOfMat(), maxlevel, border_type) }.into_result()
}

// identifier: cv_calcBackProject_VectorOfMat_images_VectorOfint_channels_Mat_hist_Mat_dst_VectorOffloat_ranges_double_scale
/// @overload
pub fn calc_back_project(images: &types::VectorOfMat, channels: &types::VectorOfint, hist: &core::Mat, dst: &mut core::Mat, ranges: &types::VectorOffloat, scale: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_calcBackProject_VectorOfMat_images_VectorOfint_channels_Mat_hist_Mat_dst_VectorOffloat_ranges_double_scale(images.as_raw_VectorOfMat(), channels.as_raw_VectorOfint(), hist.as_raw_Mat(), dst.as_raw_Mat(), ranges.as_raw_VectorOffloat(), scale) }.into_result()
}

// identifier: cv_calcCovarMatrix_Mat_samples_Mat_covar_Mat_mean_int_flags_int_ctype
/// @overload
/// 
/// Note: use #COVAR_ROWS or #COVAR_COLS flag
/// ## Parameters
/// * samples: samples stored as rows/columns of a single matrix.
/// * covar: output covariance matrix of the type ctype and square size.
/// * mean: input or output (depending on the flags) array as the average value of the input vectors.
/// * flags: operation flags as a combination of #CovarFlags
/// * ctype: type of the matrixl; it equals 'CV_64F' by default.
///
/// ## C++ default parameters:
/// * ctype: CV_64F
pub fn calc_covar_matrix_arrays(samples: &core::Mat, covar: &mut core::Mat, mean: &mut core::Mat, flags: i32, ctype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_calcCovarMatrix_Mat_samples_Mat_covar_Mat_mean_int_flags_int_ctype(samples.as_raw_Mat(), covar.as_raw_Mat(), mean.as_raw_Mat(), flags, ctype) }.into_result()
}

// identifier: cv_calcCovarMatrix_const_Mat_samples_int_nsamples_Mat_covar_Mat_mean_int_flags_int_ctype
/// Calculates the covariance matrix of a set of vectors.
/// 
/// The function cv::calcCovarMatrix calculates the covariance matrix and, optionally, the mean vector of
/// the set of input vectors.
/// ## Parameters
/// * samples: samples stored as separate matrices
/// * nsamples: number of samples
/// * covar: output covariance matrix of the type ctype and square size.
/// * mean: input or output (depending on the flags) array as the average value of the input vectors.
/// * flags: operation flags as a combination of #CovarFlags
/// * ctype: type of the matrixl; it equals 'CV_64F' by default.
/// @sa PCA, mulTransposed, Mahalanobis
/// @todo InputArrayOfArrays
///
/// ## C++ default parameters:
/// * ctype: CV_64F
pub fn calc_covar_matrix(samples: &core::Mat, nsamples: i32, covar: &core::Mat, mean: &core::Mat, flags: i32, ctype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_calcCovarMatrix_const_Mat_samples_int_nsamples_Mat_covar_Mat_mean_int_flags_int_ctype(samples.as_raw_Mat(), nsamples, covar.as_raw_Mat(), mean.as_raw_Mat(), flags, ctype) }.into_result()
}

// identifier: cv_calcHist_VectorOfMat_images_VectorOfint_channels_Mat_mask_Mat_hist_VectorOfint_histSize_VectorOffloat_ranges_bool_accumulate
/// @overload
///
/// ## C++ default parameters:
/// * accumulate: false
pub fn calc_hist(images: &types::VectorOfMat, channels: &types::VectorOfint, mask: &core::Mat, hist: &mut core::Mat, hist_size: &types::VectorOfint, ranges: &types::VectorOffloat, accumulate: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_calcHist_VectorOfMat_images_VectorOfint_channels_Mat_mask_Mat_hist_VectorOfint_histSize_VectorOffloat_ranges_bool_accumulate(images.as_raw_VectorOfMat(), channels.as_raw_VectorOfint(), mask.as_raw_Mat(), hist.as_raw_Mat(), hist_size.as_raw_VectorOfint(), ranges.as_raw_VectorOffloat(), accumulate) }.into_result()
}

// identifier: cv_calcOpticalFlowFarneback_Mat_prev_Mat_next_Mat_flow_double_pyr_scale_int_levels_int_winsize_int_iterations_int_poly_n_double_poly_sigma_int_flags
/// Computes a dense optical flow using the Gunnar Farneback's algorithm.
/// 
/// ## Parameters
/// * prev: first 8-bit single-channel input image.
/// * next: second input image of the same size and the same type as prev.
/// * flow: computed flow image that has the same size as prev and type CV_32FC2.
/// * pyr_scale: parameter, specifying the image scale (\<1) to build pyramids for each image;
/// pyr_scale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous
/// one.
/// * levels: number of pyramid layers including the initial image; levels=1 means that no extra
/// layers are created and only the original images are used.
/// * winsize: averaging window size; larger values increase the algorithm robustness to image
/// noise and give more chances for fast motion detection, but yield more blurred motion field.
/// * iterations: number of iterations the algorithm does at each pyramid level.
/// * poly_n: size of the pixel neighborhood used to find polynomial expansion in each pixel;
/// larger values mean that the image will be approximated with smoother surfaces, yielding more
/// robust algorithm and more blurred motion field, typically poly_n =5 or 7.
/// * poly_sigma: standard deviation of the Gaussian that is used to smooth derivatives used as a
/// basis for the polynomial expansion; for poly_n=5, you can set poly_sigma=1.1, for poly_n=7, a
/// good value would be poly_sigma=1.5.
/// * flags: operation flags that can be a combination of the following:
/// *   **OPTFLOW_USE_INITIAL_FLOW** uses the input flow as an initial flow approximation.
/// *   **OPTFLOW_FARNEBACK_GAUSSIAN** uses the Gaussian <span lang='latex'>\texttt{winsize}\times\texttt{winsize}</span>
/// filter instead of a box filter of the same size for optical flow estimation; usually, this
/// option gives z more accurate flow than with a box filter, at the cost of lower speed;
/// normally, winsize for a Gaussian window should be set to a larger value to achieve the same
/// level of robustness.
/// 
/// The function finds an optical flow for each prev pixel using the @cite Farneback2003 algorithm so that
/// 
/// <div lang='latex'>\texttt{prev} (y,x)  \sim \texttt{next} ( y + \texttt{flow} (y,x)[1],  x + \texttt{flow} (y,x)[0])</div>
/// 
/// 
/// Note:
/// 
/// *   An example using the optical flow algorithm described by Gunnar Farneback can be found at
/// opencv_source_code/samples/cpp/fback.cpp
/// *   (Python) An example using the optical flow algorithm described by Gunnar Farneback can be
/// found at opencv_source_code/samples/python/opt_flow.py
pub fn calc_optical_flow_farneback(prev: &core::Mat, next: &core::Mat, flow: &mut core::Mat, pyr_scale: f64, levels: i32, winsize: i32, iterations: i32, poly_n: i32, poly_sigma: f64, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_calcOpticalFlowFarneback_Mat_prev_Mat_next_Mat_flow_double_pyr_scale_int_levels_int_winsize_int_iterations_int_poly_n_double_poly_sigma_int_flags(prev.as_raw_Mat(), next.as_raw_Mat(), flow.as_raw_Mat(), pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags) }.into_result()
}

// identifier: cv_calcOpticalFlowPyrLK_Mat_prevImg_Mat_nextImg_Mat_prevPts_Mat_nextPts_Mat_status_Mat_err_Size_winSize_int_maxLevel_TermCriteria_criteria_int_flags_double_minEigThreshold
/// Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with
/// pyramids.
/// 
/// ## Parameters
/// * prevImg: first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid.
/// * nextImg: second input image or pyramid of the same size and the same type as prevImg.
/// * prevPts: vector of 2D points for which the flow needs to be found; point coordinates must be
/// single-precision floating-point numbers.
/// * nextPts: output vector of 2D points (with single-precision floating-point coordinates)
/// containing the calculated new positions of input features in the second image; when
/// OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input.
/// * status: output status vector (of unsigned chars); each element of the vector is set to 1 if
/// the flow for the corresponding features has been found, otherwise, it is set to 0.
/// * err: output vector of errors; each element of the vector is set to an error for the
/// corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't
/// found then the error is not defined (use the status parameter to find such cases).
/// * winSize: size of the search window at each pyramid level.
/// * maxLevel: 0-based maximal pyramid level number; if set to 0, pyramids are not used (single
/// level), if set to 1, two levels are used, and so on; if pyramids are passed to input then
/// algorithm will use as many levels as pyramids have but no more than maxLevel.
/// * criteria: parameter, specifying the termination criteria of the iterative search algorithm
/// (after the specified maximum number of iterations criteria.maxCount or when the search window
/// moves by less than criteria.epsilon.
/// * flags: operation flags:
/// *   **OPTFLOW_USE_INITIAL_FLOW** uses initial estimations, stored in nextPts; if the flag is
/// not set, then prevPts is copied to nextPts and is considered the initial estimate.
/// *   **OPTFLOW_LK_GET_MIN_EIGENVALS** use minimum eigen values as an error measure (see
/// minEigThreshold description); if the flag is not set, then L1 distance between patches
/// around the original and a moved point, divided by number of pixels in a window, is used as a
/// error measure.
/// * minEigThreshold: the algorithm calculates the minimum eigen value of a 2x2 normal matrix of
/// optical flow equations (this matrix is called a spatial gradient matrix in @cite Bouguet00), divided
/// by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding
/// feature is filtered out and its flow is not processed, so it allows to remove bad points and get a
/// performance boost.
/// 
/// The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See
/// @cite Bouguet00 . The function is parallelized with the TBB library.
/// 
/// 
/// Note:
/// 
/// *   An example using the Lucas-Kanade optical flow algorithm can be found at
/// opencv_source_code/samples/cpp/lkdemo.cpp
/// *   (Python) An example using the Lucas-Kanade optical flow algorithm can be found at
/// opencv_source_code/samples/python/lk_track.py
/// *   (Python) An example using the Lucas-Kanade tracker for homography matching can be found at
/// opencv_source_code/samples/python/lk_homography.py
///
/// ## C++ default parameters:
/// * win_size: Size(21,21)
/// * max_level: 3
/// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01)
/// * flags: 0
/// * min_eig_threshold: 1e-4
pub fn calc_optical_flow_pyr_lk(prev_img: &core::Mat, next_img: &core::Mat, prev_pts: &core::Mat, next_pts: &mut core::Mat, status: &mut core::Mat, err: &mut core::Mat, win_size: core::Size, max_level: i32, criteria: &core::TermCriteria, flags: i32, min_eig_threshold: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_calcOpticalFlowPyrLK_Mat_prevImg_Mat_nextImg_Mat_prevPts_Mat_nextPts_Mat_status_Mat_err_Size_winSize_int_maxLevel_TermCriteria_criteria_int_flags_double_minEigThreshold(prev_img.as_raw_Mat(), next_img.as_raw_Mat(), prev_pts.as_raw_Mat(), next_pts.as_raw_Mat(), status.as_raw_Mat(), err.as_raw_Mat(), win_size, max_level, criteria.as_raw_TermCriteria(), flags, min_eig_threshold) }.into_result()
}

// identifier: cv_calibrateCamera_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_imageSize_Mat_cameraMatrix_Mat_distCoeffs_VectorOfMat_rvecs_VectorOfMat_tvecs_Mat_stdDeviationsIntrinsics_Mat_stdDeviationsExtrinsics_Mat_perViewErrors_int_flags_TermCriteria_criteria
/// Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
/// 
/// ## Parameters
/// * objectPoints: In the new interface it is a vector of vectors of calibration pattern points in
/// the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer
/// vector contains as many elements as the number of the pattern views. If the same calibration pattern
/// is shown in each view and it is fully visible, all the vectors will be the same. Although, it is
/// possible to use partially occluded patterns, or even different patterns in different views. Then,
/// the vectors will be different. The points are 3D, but since they are in a pattern coordinate system,
/// then, if the rig is planar, it may make sense to put the model to a XY coordinate plane so that
/// Z-coordinate of each input object point is 0.
/// In the old interface all the vectors of object points from different views are concatenated
/// together.
/// * imagePoints: In the new interface it is a vector of vectors of the projections of calibration
/// pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and
/// objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
/// In the old interface all the vectors of object points from different views are concatenated
/// together.
/// * imageSize: Size of the image used only to initialize the intrinsic camera matrix.
/// * cameraMatrix: Output 3x3 floating-point camera matrix
/// <span lang='latex'>A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
/// and/or CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
/// initialized before calling the function.
/// * distCoeffs: Output vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements.
/// * rvecs: Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view
/// (e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding
/// k-th translation vector (see the next output parameter description) brings the calibration pattern
/// from the model coordinate space (in which object points are specified) to the world coordinate
/// space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. *M* -1).
/// * tvecs: Output vector of translation vectors estimated for each pattern view.
/// * stdDeviationsIntrinsics: Output vector of standard deviations estimated for intrinsic parameters.
/// Order of deviations values:
/// \f$(f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3,
/// s_4, \tau_x, \tau_y)\f$ If one of parameters is not estimated, it's deviation is equals to zero.
/// * stdDeviationsExtrinsics: Output vector of standard deviations estimated for extrinsic parameters.
/// Order of deviations values: <span lang='latex'>(R_1, T_1, \dotsc , R_M, T_M)</span> where M is number of pattern views,
/// <span lang='latex'>R_i, T_i</span> are concatenated 1x3 vectors.
/// * perViewErrors: Output vector of the RMS re-projection error estimated for each pattern view.
/// * flags: Different flags that may be zero or a combination of the following values:
/// *   **CALIB_USE_INTRINSIC_GUESS** cameraMatrix contains valid initial values of
/// fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image
/// center ( imageSize is used), and focal distances are computed in a least-squares fashion.
/// Note, that if intrinsic parameters are known, there is no need to use this function just to
/// estimate extrinsic parameters. Use solvePnP instead.
/// *   **CALIB_FIX_PRINCIPAL_POINT** The principal point is not changed during the global
/// optimization. It stays at the center or at a different location specified when
/// CALIB_USE_INTRINSIC_GUESS is set too.
/// *   **CALIB_FIX_ASPECT_RATIO** The functions considers only fy as a free parameter. The
/// ratio fx/fy stays the same as in the input cameraMatrix . When
/// CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are
/// ignored, only their ratio is computed and used further.
/// *   **CALIB_ZERO_TANGENT_DIST** Tangential distortion coefficients <span lang='latex'>(p_1, p_2)</span> are set
/// to zeros and stay zero.
/// *   **CALIB_FIX_K1,...,CALIB_FIX_K6** The corresponding radial distortion
/// coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is
/// set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
/// *   **CALIB_RATIONAL_MODEL** Coefficients k4, k5, and k6 are enabled. To provide the
/// backward compatibility, this extra flag should be explicitly specified to make the
/// calibration function use the rational model and return 8 coefficients. If the flag is not
/// set, the function computes and returns only 5 distortion coefficients.
/// *   **CALIB_THIN_PRISM_MODEL** Coefficients s1, s2, s3 and s4 are enabled. To provide the
/// backward compatibility, this extra flag should be explicitly specified to make the
/// calibration function use the thin prism model and return 12 coefficients. If the flag is not
/// set, the function computes and returns only 5 distortion coefficients.
/// *   **CALIB_FIX_S1_S2_S3_S4** The thin prism distortion coefficients are not changed during
/// the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
/// supplied distCoeffs matrix is used. Otherwise, it is set to 0.
/// *   **CALIB_TILTED_MODEL** Coefficients tauX and tauY are enabled. To provide the
/// backward compatibility, this extra flag should be explicitly specified to make the
/// calibration function use the tilted sensor model and return 14 coefficients. If the flag is not
/// set, the function computes and returns only 5 distortion coefficients.
/// *   **CALIB_FIX_TAUX_TAUY** The coefficients of the tilted sensor model are not changed during
/// the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
/// supplied distCoeffs matrix is used. Otherwise, it is set to 0.
/// * criteria: Termination criteria for the iterative optimization algorithm.
/// 
/// @return the overall RMS re-projection error.
/// 
/// The function estimates the intrinsic camera parameters and extrinsic parameters for each of the
/// views. The algorithm is based on @cite Zhang2000 and @cite BouguetMCT . The coordinates of 3D object
/// points and their corresponding 2D projections in each view must be specified. That may be achieved
/// by using an object with a known geometry and easily detectable feature points. Such an object is
/// called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as
/// a calibration rig (see findChessboardCorners ). Currently, initialization of intrinsic parameters
/// (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration
/// patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also
/// be used as long as initial cameraMatrix is provided.
/// 
/// The algorithm performs the following steps:
/// 
/// *   Compute the initial intrinsic parameters (the option only available for planar calibration
/// patterns) or read them from the input parameters. The distortion coefficients are all set to
/// zeros initially unless some of CALIB_FIX_K? are specified.
/// 
/// *   Estimate the initial camera pose as if the intrinsic parameters have been already known. This is
/// done using solvePnP .
/// 
/// *   Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error,
/// that is, the total sum of squared distances between the observed feature points imagePoints and
/// the projected (using the current estimates for camera parameters and the poses) object points
/// objectPoints. See projectPoints for details.
/// 
/// 
/// Note:
/// If you use a non-square (=non-NxN) grid and findChessboardCorners for calibration, and
/// calibrateCamera returns bad values (zero distortion coefficients, an image center very far from
/// (w/2-0.5,h/2-0.5), and/or large differences between <span lang='latex'>f_x</span> and <span lang='latex'>f_y</span> (ratios of 10:1 or more)),
/// then you have probably used patternSize=cvSize(rows,cols) instead of using
/// patternSize=cvSize(cols,rows) in findChessboardCorners .
/// 
/// @sa
/// findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort
///
/// ## C++ default parameters:
/// * flags: 0
/// * criteria: TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON)
pub fn calibrate_camera(object_points: &types::VectorOfMat, image_points: &types::VectorOfMat, image_size: core::Size, camera_matrix: &mut core::Mat, dist_coeffs: &mut core::Mat, rvecs: &mut types::VectorOfMat, tvecs: &mut types::VectorOfMat, std_deviations_intrinsics: &mut core::Mat, std_deviations_extrinsics: &mut core::Mat, per_view_errors: &mut core::Mat, flags: i32, criteria: &core::TermCriteria) -> Result<f64> {
    unsafe { sys::cv_core_cv_calibrateCamera_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_imageSize_Mat_cameraMatrix_Mat_distCoeffs_VectorOfMat_rvecs_VectorOfMat_tvecs_Mat_stdDeviationsIntrinsics_Mat_stdDeviationsExtrinsics_Mat_perViewErrors_int_flags_TermCriteria_criteria(object_points.as_raw_VectorOfMat(), image_points.as_raw_VectorOfMat(), image_size, camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), rvecs.as_raw_VectorOfMat(), tvecs.as_raw_VectorOfMat(), std_deviations_intrinsics.as_raw_Mat(), std_deviations_extrinsics.as_raw_Mat(), per_view_errors.as_raw_Mat(), flags, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_calibrateCamera_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_imageSize_Mat_cameraMatrix_Mat_distCoeffs_VectorOfMat_rvecs_VectorOfMat_tvecs_int_flags_TermCriteria_criteria
/// @overload double calibrateCamera( InputArrayOfArrays objectPoints,
/// InputArrayOfArrays imagePoints, Size imageSize,
/// InputOutputArray cameraMatrix, InputOutputArray distCoeffs,
/// OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs,
/// OutputArray stdDeviations, OutputArray perViewErrors,
/// int flags = 0, TermCriteria criteria = TermCriteria(
/// TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON) )
///
/// ## C++ default parameters:
/// * flags: 0
/// * criteria: TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON)
pub fn calibrate_camera_1(object_points: &types::VectorOfMat, image_points: &types::VectorOfMat, image_size: core::Size, camera_matrix: &mut core::Mat, dist_coeffs: &mut core::Mat, rvecs: &mut types::VectorOfMat, tvecs: &mut types::VectorOfMat, flags: i32, criteria: &core::TermCriteria) -> Result<f64> {
    unsafe { sys::cv_core_cv_calibrateCamera_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_imageSize_Mat_cameraMatrix_Mat_distCoeffs_VectorOfMat_rvecs_VectorOfMat_tvecs_int_flags_TermCriteria_criteria(object_points.as_raw_VectorOfMat(), image_points.as_raw_VectorOfMat(), image_size, camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), rvecs.as_raw_VectorOfMat(), tvecs.as_raw_VectorOfMat(), flags, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_calibrationMatrixValues_Mat_cameraMatrix_Size_imageSize_double_apertureWidth_double_apertureHeight_double_fovx_double_fovy_double_focalLength_Point2d_principalPoint_double_aspectRatio
/// Computes useful camera characteristics from the camera matrix.
/// 
/// ## Parameters
/// * cameraMatrix: Input camera matrix that can be estimated by calibrateCamera or
/// stereoCalibrate .
/// * imageSize: Input image size in pixels.
/// * apertureWidth: Physical width in mm of the sensor.
/// * apertureHeight: Physical height in mm of the sensor.
/// * fovx: Output field of view in degrees along the horizontal sensor axis.
/// * fovy: Output field of view in degrees along the vertical sensor axis.
/// * focalLength: Focal length of the lens in mm.
/// * principalPoint: Principal point in mm.
/// * aspectRatio: <span lang='latex'>f_y/f_x</span>
/// 
/// The function computes various useful camera characteristics from the previously estimated camera
/// matrix.
/// 
/// 
/// Note:
/// Do keep in mind that the unity measure 'mm' stands for whatever unit of measure one chooses for
/// the chessboard pitch (it can thus be any value).
pub fn calibration_matrix_values(camera_matrix: &core::Mat, image_size: core::Size, aperture_width: f64, aperture_height: f64, fovx: f64, fovy: f64, focal_length: f64, principal_point: core::Point2d, aspect_ratio: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_calibrationMatrixValues_Mat_cameraMatrix_Size_imageSize_double_apertureWidth_double_apertureHeight_double_fovx_double_fovy_double_focalLength_Point2d_principalPoint_double_aspectRatio(camera_matrix.as_raw_Mat(), image_size, aperture_width, aperture_height, fovx, fovy, focal_length, principal_point, aspect_ratio) }.into_result()
}

// identifier: cv_cartToPolar_Mat_x_Mat_y_Mat_magnitude_Mat_angle_bool_angleInDegrees
/// Calculates the magnitude and angle of 2D vectors.
/// 
/// The function cv::cartToPolar calculates either the magnitude, angle, or both
/// for every 2D vector (x(I),y(I)):
/// <div lang='latex'>\begin{array}{l} \texttt{magnitude} (I)= \sqrt{\texttt{x}(I)^2+\texttt{y}(I)^2} , \\ \texttt{angle} (I)= \texttt{atan2} ( \texttt{y} (I), \texttt{x} (I))[ \cdot180 / \pi ] \end{array}</div>
/// 
/// The angles are calculated with accuracy about 0.3 degrees. For the point
/// (0,0), the angle is set to 0.
/// ## Parameters
/// * x: array of x-coordinates; this must be a single-precision or
/// double-precision floating-point array.
/// * y: array of y-coordinates, that must have the same size and same type as x.
/// * magnitude: output array of magnitudes of the same size and type as x.
/// * angle: output array of angles that has the same size and type as
/// x; the angles are measured in radians (from 0 to 2\*Pi) or in degrees (0 to 360 degrees).
/// * angleInDegrees: a flag, indicating whether the angles are measured
/// in radians (which is by default), or in degrees.
/// @sa Sobel, Scharr
///
/// ## C++ default parameters:
/// * angle_in_degrees: false
pub fn cart_to_polar(x: &core::Mat, y: &core::Mat, magnitude: &mut core::Mat, angle: &mut core::Mat, angle_in_degrees: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_cartToPolar_Mat_x_Mat_y_Mat_magnitude_Mat_angle_bool_angleInDegrees(x.as_raw_Mat(), y.as_raw_Mat(), magnitude.as_raw_Mat(), angle.as_raw_Mat(), angle_in_degrees) }.into_result()
}

// identifier: cv_cbrt_softfloat_a
/// Cube root
/// 
/// Special cases:
/// - cbrt(NaN) is NaN
/// - cbrt(+/-Inf) is +/-Inf
pub fn cbrt(a: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_cbrt_softfloat_a(a.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_checkHardwareSupport_int_feature
/// Returns true if the specified feature is supported by the host hardware.
/// 
/// The function returns true if the host hardware supports the specified feature. When user calls
/// setUseOptimized(false), the subsequent calls to checkHardwareSupport() will return false until
/// setUseOptimized(true) is called. This way user can dynamically switch on and off the optimized code
/// in OpenCV.
/// ## Parameters
/// * feature: The feature of interest, one of cv::CpuFeatures
pub fn check_hardware_support(feature: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_checkHardwareSupport_int_feature(feature) }.into_result()
}

// identifier: cv_checkRange_Mat_a_bool_quiet_Point_X_pos_double_minVal_double_maxVal
/// Checks every element of an input array for invalid values.
/// 
/// The function cv::checkRange checks that every array element is neither NaN nor infinite. When minVal \>
/// -DBL_MAX and maxVal \< DBL_MAX, the function also checks that each value is between minVal and
/// maxVal. In case of multi-channel arrays, each channel is processed independently. If some values
/// are out of range, position of the first outlier is stored in pos (when pos != NULL). Then, the
/// function either returns false (when quiet=true) or throws an exception.
/// ## Parameters
/// * a: input array.
/// * quiet: a flag, indicating whether the functions quietly return false when the array elements
/// are out of range or they throw an exception.
/// * pos: optional output parameter, when not NULL, must be a pointer to array of src.dims
/// elements.
/// * minVal: inclusive lower boundary of valid values range.
/// * maxVal: exclusive upper boundary of valid values range.
///
/// ## C++ default parameters:
/// * quiet: true
/// * pos: 0
/// * min_val: -DBL_MAX
/// * max_val: DBL_MAX
pub fn check_range(a: &core::Mat, quiet: bool, pos: &mut core::Point, min_val: f64, max_val: f64) -> Result<bool> {
    unsafe { sys::cv_core_cv_checkRange_Mat_a_bool_quiet_Point_X_pos_double_minVal_double_maxVal(a.as_raw_Mat(), quiet, pos, min_val, max_val) }.into_result()
}

// identifier: cv_circle_Mat_img_Point_center_int_radius_Scalar_color_int_thickness_int_lineType_int_shift
/// Draws a circle.
/// 
/// The function cv::circle draws a simple or filled circle with a given center and radius.
/// ## Parameters
/// * img: Image where the circle is drawn.
/// * center: Center of the circle.
/// * radius: Radius of the circle.
/// * color: Circle color.
/// * thickness: Thickness of the circle outline, if positive. Negative values, like #FILLED,
/// mean that a filled circle is to be drawn.
/// * lineType: Type of the circle boundary. See #LineTypes
/// * shift: Number of fractional bits in the coordinates of the center and in the radius value.
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * shift: 0
pub fn circle(img: &mut core::Mat, center: core::Point, radius: i32, color: core::Scalar, thickness: i32, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_circle_Mat_img_Point_center_int_radius_Scalar_color_int_thickness_int_lineType_int_shift(img.as_raw_Mat(), center, radius, color, thickness, line_type, shift) }.into_result()
}

// identifier: cv_clipLine_Rect_imgRect_Point_pt1_Point_pt2
/// @overload
/// ## Parameters
/// * imgRect: Image rectangle.
/// * pt1: First line point.
/// * pt2: Second line point.
pub fn clip_line(img_rect: core::Rect, pt1: core::Point, pt2: core::Point) -> Result<bool> {
    unsafe { sys::cv_core_cv_clipLine_Rect_imgRect_Point_pt1_Point_pt2(img_rect, pt1, pt2) }.into_result()
}

// identifier: cv_clipLine_Size2l_imgSize_Point2l_pt1_Point2l_pt2
/// @overload
/// ## Parameters
/// * imgSize: Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) .
/// * pt1: First line point.
/// * pt2: Second line point.
pub fn clip_line_size_i64(img_size: core::Size2l, pt1: core::Point2l, pt2: core::Point2l) -> Result<bool> {
    unsafe { sys::cv_core_cv_clipLine_Size2l_imgSize_Point2l_pt1_Point2l_pt2(img_size, pt1, pt2) }.into_result()
}

// identifier: cv_clipLine_Size_imgSize_Point_pt1_Point_pt2
/// Clips the line against the image rectangle.
/// 
/// The function cv::clipLine calculates a part of the line segment that is entirely within the specified
/// rectangle. it returns false if the line segment is completely outside the rectangle. Otherwise,
/// it returns true .
/// ## Parameters
/// * imgSize: Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) .
/// * pt1: First line point.
/// * pt2: Second line point.
pub fn clip_line_size(img_size: core::Size, pt1: core::Point, pt2: core::Point) -> Result<bool> {
    unsafe { sys::cv_core_cv_clipLine_Size_imgSize_Point_pt1_Point_pt2(img_size, pt1, pt2) }.into_result()
}

// identifier: cv_colorChange_Mat_src_Mat_mask_Mat_dst_float_red_mul_float_green_mul_float_blue_mul
/// Given an original color image, two differently colored versions of this image can be mixed
/// seamlessly.
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * mask: Input 8-bit 1 or 3-channel image.
/// * dst: Output image with the same size and type as src .
/// * red_mul: R-channel multiply factor.
/// * green_mul: G-channel multiply factor.
/// * blue_mul: B-channel multiply factor.
/// 
/// Multiplication factor is between .5 to 2.5.
///
/// ## C++ default parameters:
/// * red_mul: 1.0f
/// * green_mul: 1.0f
/// * blue_mul: 1.0f
pub fn color_change(src: &core::Mat, mask: &core::Mat, dst: &mut core::Mat, red_mul: f32, green_mul: f32, blue_mul: f32) -> Result<()> {
    unsafe { sys::cv_core_cv_colorChange_Mat_src_Mat_mask_Mat_dst_float_red_mul_float_green_mul_float_blue_mul(src.as_raw_Mat(), mask.as_raw_Mat(), dst.as_raw_Mat(), red_mul, green_mul, blue_mul) }.into_result()
}

// identifier: cv_compareHist_Mat_H1_Mat_H2_int_method
/// Compares two histograms.
/// 
/// The function cv::compareHist compares two dense or two sparse histograms using the specified method.
/// 
/// The function returns <span lang='latex'>d(H_1, H_2)</span> .
/// 
/// While the function works well with 1-, 2-, 3-dimensional dense histograms, it may not be suitable
/// for high-dimensional sparse histograms. In such histograms, because of aliasing and sampling
/// problems, the coordinates of non-zero histogram bins can slightly shift. To compare such histograms
/// or more general sparse configurations of weighted points, consider using the #EMD function.
/// 
/// ## Parameters
/// * H1: First compared histogram.
/// * H2: Second compared histogram of the same size as H1 .
/// * method: Comparison method, see #HistCompMethods
pub fn compare_hist(h1: &core::Mat, h2: &core::Mat, method: i32) -> Result<f64> {
    unsafe { sys::cv_core_cv_compareHist_Mat_H1_Mat_H2_int_method(h1.as_raw_Mat(), h2.as_raw_Mat(), method) }.into_result()
}

// identifier: cv_compare_Mat_src1_Mat_src2_Mat_dst_int_cmpop
/// Performs the per-element comparison of two arrays or an array and scalar value.
/// 
/// The function compares:
///   Elements of two arrays when src1 and src2 have the same size:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1} (I)  \,\texttt{cmpop}\, \texttt{src2} (I)</div>
///   Elements of src1 with a scalar src2 when src2 is constructed from
/// Scalar or has a single element:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1}(I) \,\texttt{cmpop}\,  \texttt{src2}</div>
///   src1 with elements of src2 when src1 is constructed from Scalar or
/// has a single element:
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{src1}  \,\texttt{cmpop}\, \texttt{src2} (I)</div>
/// When the comparison result is true, the corresponding element of output
/// array is set to 255. The comparison operations can be replaced with the
/// equivalent matrix expressions:
/// ```ignore{.cpp}
/// Mat dst1 = src1 >= src2;
/// Mat dst2 = src1 < 8;
/// ...
/// ```
/// 
/// ## Parameters
/// * src1: first input array or a scalar; when it is an array, it must have a single channel.
/// * src2: second input array or a scalar; when it is an array, it must have a single channel.
/// * dst: output array of type ref CV_8U that has the same size and the same number of channels as
/// the input arrays.
/// * cmpop: a flag, that specifies correspondence between the arrays (cv::CmpTypes)
/// @sa checkRange, min, max, threshold
pub fn compare(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, cmpop: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_compare_Mat_src1_Mat_src2_Mat_dst_int_cmpop(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), cmpop) }.into_result()
}

// identifier: cv_completeSymm_Mat_m_bool_lowerToUpper
/// Copies the lower or the upper half of a square matrix to its another half.
/// 
/// The function cv::completeSymm copies the lower or the upper half of a square matrix to
/// its another half. The matrix diagonal remains unchanged:
/// - <span lang='latex'>\texttt{m}_{ij}=\texttt{m}_{ji}</span> for <span lang='latex'>i > j</span> if
/// lowerToUpper=false
/// - <span lang='latex'>\texttt{m}_{ij}=\texttt{m}_{ji}</span> for <span lang='latex'>i < j</span> if
/// lowerToUpper=true
/// 
/// ## Parameters
/// * m: input-output floating-point square matrix.
/// * lowerToUpper: operation flag; if true, the lower half is copied to
/// the upper half. Otherwise, the upper half is copied to the lower half.
/// @sa flip, transpose
///
/// ## C++ default parameters:
/// * lower_to_upper: false
pub fn complete_symm(m: &mut core::Mat, lower_to_upper: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_completeSymm_Mat_m_bool_lowerToUpper(m.as_raw_Mat(), lower_to_upper) }.into_result()
}

// identifier: cv_composeRT_Mat_rvec1_Mat_tvec1_Mat_rvec2_Mat_tvec2_Mat_rvec3_Mat_tvec3_Mat_dr3dr1_Mat_dr3dt1_Mat_dr3dr2_Mat_dr3dt2_Mat_dt3dr1_Mat_dt3dt1_Mat_dt3dr2_Mat_dt3dt2
/// Combines two rotation-and-shift transformations.
/// 
/// ## Parameters
/// * rvec1: First rotation vector.
/// * tvec1: First translation vector.
/// * rvec2: Second rotation vector.
/// * tvec2: Second translation vector.
/// * rvec3: Output rotation vector of the superposition.
/// * tvec3: Output translation vector of the superposition.
/// * dr3dr1
/// @param: dr3dt1
/// * dr3dr2
/// @param: dr3dt2
/// * dt3dr1
/// @param: dt3dt1
/// * dt3dr2
/// @param: dt3dt2 Optional output derivatives of rvec3 or tvec3 with regard to rvec1, rvec2, tvec1 and
/// tvec2, respectively.
/// 
/// The functions compute:
/// 
/// <div lang='latex'>\begin{array}{l} \texttt{rvec3} =  \mathrm{rodrigues} ^{-1} \left ( \mathrm{rodrigues} ( \texttt{rvec2} )  \cdot \mathrm{rodrigues} ( \texttt{rvec1} ) \right )  \\ \texttt{tvec3} =  \mathrm{rodrigues} ( \texttt{rvec2} )  \cdot \texttt{tvec1} +  \texttt{tvec2} \end{array} ,</div>
/// 
/// where <span lang='latex'>\mathrm{rodrigues}</span> denotes a rotation vector to a rotation matrix transformation, and
/// <span lang='latex'>\mathrm{rodrigues}^{-1}</span> denotes the inverse transformation. See Rodrigues for details.
/// 
/// Also, the functions can compute the derivatives of the output vectors with regards to the input
/// vectors (see matMulDeriv ). The functions are used inside stereoCalibrate but can also be used in
/// your own code where Levenberg-Marquardt or another gradient-based solver is used to optimize a
/// function that contains a matrix multiplication.
///
/// ## C++ default parameters:
/// * dr3dr1: noArray()
/// * dr3dt1: noArray()
/// * dr3dr2: noArray()
/// * dr3dt2: noArray()
/// * dt3dr1: noArray()
/// * dt3dt1: noArray()
/// * dt3dr2: noArray()
/// * dt3dt2: noArray()
pub fn compose_rt(rvec1: &core::Mat, tvec1: &core::Mat, rvec2: &core::Mat, tvec2: &core::Mat, rvec3: &mut core::Mat, tvec3: &mut core::Mat, dr3dr1: &mut core::Mat, dr3dt1: &mut core::Mat, dr3dr2: &mut core::Mat, dr3dt2: &mut core::Mat, dt3dr1: &mut core::Mat, dt3dt1: &mut core::Mat, dt3dr2: &mut core::Mat, dt3dt2: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_composeRT_Mat_rvec1_Mat_tvec1_Mat_rvec2_Mat_tvec2_Mat_rvec3_Mat_tvec3_Mat_dr3dr1_Mat_dr3dt1_Mat_dr3dr2_Mat_dr3dt2_Mat_dt3dr1_Mat_dt3dt1_Mat_dt3dr2_Mat_dt3dt2(rvec1.as_raw_Mat(), tvec1.as_raw_Mat(), rvec2.as_raw_Mat(), tvec2.as_raw_Mat(), rvec3.as_raw_Mat(), tvec3.as_raw_Mat(), dr3dr1.as_raw_Mat(), dr3dt1.as_raw_Mat(), dr3dr2.as_raw_Mat(), dr3dt2.as_raw_Mat(), dt3dr1.as_raw_Mat(), dt3dt1.as_raw_Mat(), dt3dr2.as_raw_Mat(), dt3dt2.as_raw_Mat()) }.into_result()
}

// identifier: cv_computeCorrespondEpilines_Mat_points_int_whichImage_Mat_F_Mat_lines
/// For points in an image of a stereo pair, computes the corresponding epilines in the other image.
/// 
/// ## Parameters
/// * points: Input points. <span lang='latex'>N \times 1</span> or <span lang='latex'>1 \times N</span> matrix of type CV_32FC2 or
/// vector\<Point2f\> .
/// * whichImage: Index of the image (1 or 2) that contains the points .
/// * F: Fundamental matrix that can be estimated using findFundamentalMat or stereoRectify .
/// * lines: Output vector of the epipolar lines corresponding to the points in the other image.
/// Each line <span lang='latex'>ax + by + c=0</span> is encoded by 3 numbers <span lang='latex'>(a, b, c)</span> .
/// 
/// For every point in one of the two images of a stereo pair, the function finds the equation of the
/// corresponding epipolar line in the other image.
/// 
/// From the fundamental matrix definition (see findFundamentalMat ), line <span lang='latex'>l^{(2)}_i</span> in the second
/// image for the point <span lang='latex'>p^{(1)}_i</span> in the first image (when whichImage=1 ) is computed as:
/// 
/// <div lang='latex'>l^{(2)}_i = F p^{(1)}_i</div>
/// 
/// And vice versa, when whichImage=2, <span lang='latex'>l^{(1)}_i</span> is computed from <span lang='latex'>p^{(2)}_i</span> as:
/// 
/// <div lang='latex'>l^{(1)}_i = F^T p^{(2)}_i</div>
/// 
/// Line coefficients are defined up to a scale. They are normalized so that <span lang='latex'>a_i^2+b_i^2=1</span> .
pub fn compute_correspond_epilines(points: &core::Mat, which_image: i32, f: &core::Mat, lines: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_computeCorrespondEpilines_Mat_points_int_whichImage_Mat_F_Mat_lines(points.as_raw_Mat(), which_image, f.as_raw_Mat(), lines.as_raw_Mat()) }.into_result()
}

// identifier: cv_computeRecallPrecisionCurve_VectorOfVectorOfDMatch_matches1to2_VectorOfVectorOfuchar_correctMatches1to2Mask_VectorOfPoint2f_recallPrecisionCurve
pub fn compute_recall_precision_curve(matches1to2: &types::VectorOfVectorOfDMatch, correct_matches1to2_mask: &types::VectorOfVectorOfuchar, recall_precision_curve: &types::VectorOfPoint2f) -> Result<()> {
    unsafe { sys::cv_core_cv_computeRecallPrecisionCurve_VectorOfVectorOfDMatch_matches1to2_VectorOfVectorOfuchar_correctMatches1to2Mask_VectorOfPoint2f_recallPrecisionCurve(matches1to2.as_raw_VectorOfVectorOfDMatch(), correct_matches1to2_mask.as_raw_VectorOfVectorOfuchar(), recall_precision_curve.as_raw_VectorOfPoint2f()) }.into_result()
}

// identifier: cv_connectedComponentsWithStats_Mat_image_Mat_labels_Mat_stats_Mat_centroids_int_connectivity_int_ltype
/// @overload
/// ## Parameters
/// * image: the 8-bit single-channel image to be labeled
/// * labels: destination labeled image
/// * stats: statistics output for each label, including the background label, see below for
/// available statistics. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of
/// #ConnectedComponentsTypes. The data type is CV_32S.
/// * centroids: centroid output for each label, including the background label. Centroids are
/// accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F.
/// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively
/// * ltype: output image label type. Currently CV_32S and CV_16U are supported.
///
/// ## C++ default parameters:
/// * connectivity: 8
/// * ltype: CV_32S
pub fn connected_components_with_stats(image: &core::Mat, labels: &mut core::Mat, stats: &mut core::Mat, centroids: &mut core::Mat, connectivity: i32, ltype: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_connectedComponentsWithStats_Mat_image_Mat_labels_Mat_stats_Mat_centroids_int_connectivity_int_ltype(image.as_raw_Mat(), labels.as_raw_Mat(), stats.as_raw_Mat(), centroids.as_raw_Mat(), connectivity, ltype) }.into_result()
}

// identifier: cv_connectedComponentsWithStats_Mat_image_Mat_labels_Mat_stats_Mat_centroids_int_connectivity_int_ltype_int_ccltype
/// computes the connected components labeled image of boolean image and also produces a statistics output for each label
/// 
/// image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0
/// represents the background label. ltype specifies the output label image type, an important
/// consideration based on the total number of labels or alternatively the total number of pixels in
/// the source image. ccltype specifies the connected components labeling algorithm to use, currently
/// Grana's (BBDT) and Wu's (SAUF) algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes
/// for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
/// This function uses parallel version of both Grana and Wu's algorithms (statistics included) if at least one allowed
/// parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs.
/// 
/// ## Parameters
/// * image: the 8-bit single-channel image to be labeled
/// * labels: destination labeled image
/// * stats: statistics output for each label, including the background label, see below for
/// available statistics. Statistics are accessed via stats(label, COLUMN) where COLUMN is one of
/// #ConnectedComponentsTypes. The data type is CV_32S.
/// * centroids: centroid output for each label, including the background label. Centroids are
/// accessed via centroids(label, 0) for x and centroids(label, 1) for y. The data type CV_64F.
/// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively
/// * ltype: output image label type. Currently CV_32S and CV_16U are supported.
/// * ccltype: connected components algorithm type (see #ConnectedComponentsAlgorithmsTypes).
pub fn connected_components_with_stats_1(image: &core::Mat, labels: &mut core::Mat, stats: &mut core::Mat, centroids: &mut core::Mat, connectivity: i32, ltype: i32, ccltype: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_connectedComponentsWithStats_Mat_image_Mat_labels_Mat_stats_Mat_centroids_int_connectivity_int_ltype_int_ccltype(image.as_raw_Mat(), labels.as_raw_Mat(), stats.as_raw_Mat(), centroids.as_raw_Mat(), connectivity, ltype, ccltype) }.into_result()
}

// identifier: cv_connectedComponents_Mat_image_Mat_labels_int_connectivity_int_ltype
/// @overload
/// 
/// ## Parameters
/// * image: the 8-bit single-channel image to be labeled
/// * labels: destination labeled image
/// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively
/// * ltype: output image label type. Currently CV_32S and CV_16U are supported.
///
/// ## C++ default parameters:
/// * connectivity: 8
/// * ltype: CV_32S
pub fn connected_components(image: &core::Mat, labels: &mut core::Mat, connectivity: i32, ltype: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_connectedComponents_Mat_image_Mat_labels_int_connectivity_int_ltype(image.as_raw_Mat(), labels.as_raw_Mat(), connectivity, ltype) }.into_result()
}

// identifier: cv_connectedComponents_Mat_image_Mat_labels_int_connectivity_int_ltype_int_ccltype
/// computes the connected components labeled image of boolean image
/// 
/// image with 4 or 8 way connectivity - returns N, the total number of labels [0, N-1] where 0
/// represents the background label. ltype specifies the output label image type, an important
/// consideration based on the total number of labels or alternatively the total number of pixels in
/// the source image. ccltype specifies the connected components labeling algorithm to use, currently
/// Grana (BBDT) and Wu's (SAUF) algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes
/// for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
/// This function uses parallel version of both Grana and Wu's algorithms if at least one allowed
/// parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs.
/// 
/// ## Parameters
/// * image: the 8-bit single-channel image to be labeled
/// * labels: destination labeled image
/// * connectivity: 8 or 4 for 8-way or 4-way connectivity respectively
/// * ltype: output image label type. Currently CV_32S and CV_16U are supported.
/// * ccltype: connected components algorithm type (see the #ConnectedComponentsAlgorithmsTypes).
pub fn connected_components_1(image: &core::Mat, labels: &mut core::Mat, connectivity: i32, ltype: i32, ccltype: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_connectedComponents_Mat_image_Mat_labels_int_connectivity_int_ltype_int_ccltype(image.as_raw_Mat(), labels.as_raw_Mat(), connectivity, ltype, ccltype) }.into_result()
}

// identifier: cv_contourArea_Mat_contour_bool_oriented
/// Calculates a contour area.
/// 
/// The function computes a contour area. Similarly to moments , the area is computed using the Green
/// formula. Thus, the returned area and the number of non-zero pixels, if you draw the contour using
/// #drawContours or #fillPoly , can be different. Also, the function will most certainly give a wrong
/// results for contours with self-intersections.
/// 
/// Example:
/// ```ignore
/// vector<Point> contour;
/// contour.push_back(Point2f(0, 0));
/// contour.push_back(Point2f(10, 0));
/// contour.push_back(Point2f(10, 10));
/// contour.push_back(Point2f(5, 4));
/// 
/// double area0 = contourArea(contour);
/// vector<Point> approx;
/// approxPolyDP(contour, approx, 5, true);
/// double area1 = contourArea(approx);
/// 
/// cout << "area0 =" << area0 << endl <<
/// "area1 =" << area1 << endl <<
/// "approx poly vertices" << approx.size() << endl;
/// ```
/// 
/// ## Parameters
/// * contour: Input vector of 2D points (contour vertices), stored in std::vector or Mat.
/// * oriented: Oriented area flag. If it is true, the function returns a signed area value,
/// depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can
/// determine orientation of a contour by taking the sign of an area. By default, the parameter is
/// false, which means that the absolute value is returned.
///
/// ## C++ default parameters:
/// * oriented: false
pub fn contour_area(contour: &core::Mat, oriented: bool) -> Result<f64> {
    unsafe { sys::cv_core_cv_contourArea_Mat_contour_bool_oriented(contour.as_raw_Mat(), oriented) }.into_result()
}

// identifier: cv_convertFp16_Mat_src_Mat_dst
/// Converts an array to half precision floating number.
/// 
/// This function converts FP32 (single precision floating point) from/to FP16 (half precision floating point). CV_16S format is used to represent FP16 data.
/// There are two use modes (src -> dst): CV_32F -> CV_16S and CV_16S -> CV_32F. The input array has to have type of CV_32F or
/// CV_16S to represent the bit depth. If the input array is neither of them, the function will raise an error.
/// The format of half precision floating point is defined in IEEE 754-2008.
/// 
/// ## Parameters
/// * src: input array.
/// * dst: output array.
pub fn convert_fp16(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_convertFp16_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_convertMaps_Mat_map1_Mat_map2_Mat_dstmap1_Mat_dstmap2_int_dstmap1type_bool_nninterpolation
/// Converts image transformation maps from one representation to another.
/// 
/// The function converts a pair of maps for remap from one representation to another. The following
/// options ( (map1.type(), map2.type()) <span lang='latex'>\rightarrow</span> (dstmap1.type(), dstmap2.type()) ) are
/// supported:
/// 
/// - <span lang='latex'>\texttt{(CV_32FC1, CV_32FC1)} \rightarrow \texttt{(CV_16SC2, CV_16UC1)}</span>. This is the
/// most frequently used conversion operation, in which the original floating-point maps (see remap )
/// are converted to a more compact and much faster fixed-point representation. The first output array
/// contains the rounded coordinates and the second array (created only when nninterpolation=false )
/// contains indices in the interpolation tables.
/// 
/// - <span lang='latex'>\texttt{(CV_32FC2)} \rightarrow \texttt{(CV_16SC2, CV_16UC1)}</span>. The same as above but
/// the original maps are stored in one 2-channel matrix.
/// 
/// - Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same
/// as the originals.
/// 
/// ## Parameters
/// * map1: The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 .
/// * map2: The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix),
/// respectively.
/// * dstmap1: The first output map that has the type dstmap1type and the same size as src .
/// * dstmap2: The second output map.
/// * dstmap1type: Type of the first output map that should be CV_16SC2, CV_32FC1, or
/// CV_32FC2 .
/// * nninterpolation: Flag indicating whether the fixed-point maps are used for the
/// nearest-neighbor or for a more complex interpolation.
/// 
/// @sa  remap, undistort, initUndistortRectifyMap
///
/// ## C++ default parameters:
/// * nninterpolation: false
pub fn convert_maps(map1: &core::Mat, map2: &core::Mat, dstmap1: &mut core::Mat, dstmap2: &mut core::Mat, dstmap1type: i32, nninterpolation: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_convertMaps_Mat_map1_Mat_map2_Mat_dstmap1_Mat_dstmap2_int_dstmap1type_bool_nninterpolation(map1.as_raw_Mat(), map2.as_raw_Mat(), dstmap1.as_raw_Mat(), dstmap2.as_raw_Mat(), dstmap1type, nninterpolation) }.into_result()
}

// identifier: cv_convertPointsFromHomogeneous_Mat_src_Mat_dst
/// Converts points from homogeneous to Euclidean space.
/// 
/// ## Parameters
/// * src: Input vector of N-dimensional points.
/// * dst: Output vector of N-1-dimensional points.
/// 
/// The function converts points homogeneous to Euclidean space using perspective projection. That is,
/// each point (x1, x2, ... x(n-1), xn) is converted to (x1/xn, x2/xn, ..., x(n-1)/xn). When xn=0, the
/// output point coordinates will be (0,0,0,...).
pub fn convert_points_from_homogeneous(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_convertPointsFromHomogeneous_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_convertPointsHomogeneous_Mat_src_Mat_dst
/// Converts points to/from homogeneous coordinates.
/// 
/// ## Parameters
/// * src: Input array or vector of 2D, 3D, or 4D points.
/// * dst: Output vector of 2D, 3D, or 4D points.
/// 
/// The function converts 2D or 3D points from/to homogeneous coordinates by calling either
/// convertPointsToHomogeneous or convertPointsFromHomogeneous.
/// 
/// 
/// Note: The function is obsolete. Use one of the previous two functions instead.
pub fn convert_points_homogeneous(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_convertPointsHomogeneous_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_convertPointsToHomogeneous_Mat_src_Mat_dst
/// Converts points from Euclidean to homogeneous space.
/// 
/// ## Parameters
/// * src: Input vector of N-dimensional points.
/// * dst: Output vector of N+1-dimensional points.
/// 
/// The function converts points from Euclidean to homogeneous space by appending 1's to the tuple of
/// point coordinates. That is, each point (x1, x2, ..., xn) is converted to (x1, x2, ..., xn, 1).
pub fn convert_points_to_homogeneous(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_convertPointsToHomogeneous_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_convertScaleAbs_Mat_src_Mat_dst_double_alpha_double_beta
/// Scales, calculates absolute values, and converts the result to 8-bit.
/// 
/// On each element of the input array, the function convertScaleAbs
/// performs three operations sequentially: scaling, taking an absolute
/// value, conversion to an unsigned 8-bit type:
/// <div lang='latex'>\texttt{dst} (I)= \texttt{saturate\_cast<uchar>} (| \texttt{src} (I)* \texttt{alpha} +  \texttt{beta} |)</div>
/// In case of multi-channel arrays, the function processes each channel
/// independently. When the output is not 8-bit, the operation can be
/// emulated by calling the Mat::convertTo method (or by using matrix
/// expressions) and then by calculating an absolute value of the result.
/// For example:
/// ```ignore{.cpp}
/// Mat_<float> A(30,30);
/// randu(A, Scalar(-100), Scalar(100));
/// Mat_<float> B = A*5 + 3;
/// B = abs(B);
/// // Mat_<float> B = abs(A*5+3) will also do the job,
/// // but it will allocate a temporary matrix
/// ```
/// 
/// ## Parameters
/// * src: input array.
/// * dst: output array.
/// * alpha: optional scale factor.
/// * beta: optional delta added to the scaled values.
/// @sa  Mat::convertTo, cv::abs(const Mat&)
///
/// ## C++ default parameters:
/// * alpha: 1
/// * beta: 0
pub fn convert_scale_abs(src: &core::Mat, dst: &mut core::Mat, alpha: f64, beta: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_convertScaleAbs_Mat_src_Mat_dst_double_alpha_double_beta(src.as_raw_Mat(), dst.as_raw_Mat(), alpha, beta) }.into_result()
}

// identifier: cv_convexHull_Mat_points_Mat_hull_bool_clockwise_bool_returnPoints
/// Finds the convex hull of a point set.
/// 
/// The function cv::convexHull finds the convex hull of a 2D point set using the Sklansky's algorithm @cite Sklansky82
/// that has *O(N logN)* complexity in the current implementation.
/// 
/// ## Parameters
/// * points: Input 2D point set, stored in std::vector or Mat.
/// * hull: Output convex hull. It is either an integer vector of indices or vector of points. In
/// the first case, the hull elements are 0-based indices of the convex hull points in the original
/// array (since the set of convex hull points is a subset of the original point set). In the second
/// case, hull elements are the convex hull points themselves.
/// * clockwise: Orientation flag. If it is true, the output convex hull is oriented clockwise.
/// Otherwise, it is oriented counter-clockwise. The assumed coordinate system has its X axis pointing
/// to the right, and its Y axis pointing upwards.
/// * returnPoints: Operation flag. In case of a matrix, when the flag is true, the function
/// returns convex hull points. Otherwise, it returns indices of the convex hull points. When the
/// output array is std::vector, the flag is ignored, and the output depends on the type of the
/// vector: std::vector\<int\> implies returnPoints=false, std::vector\<Point\> implies
/// returnPoints=true.
/// 
/// 
/// Note: `points` and `hull` should be different arrays, inplace processing isn't supported.
/// 
/// Check @ref tutorial_hull "the corresponding tutorial" for more details.
/// 
/// useful links:
/// 
/// https://www.learnopencv.com/convex-hull-using-opencv-in-python-and-c/
///
/// ## C++ default parameters:
/// * clockwise: false
/// * return_points: true
pub fn convex_hull(points: &core::Mat, hull: &mut core::Mat, clockwise: bool, return_points: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_convexHull_Mat_points_Mat_hull_bool_clockwise_bool_returnPoints(points.as_raw_Mat(), hull.as_raw_Mat(), clockwise, return_points) }.into_result()
}

// identifier: cv_convexityDefects_Mat_contour_Mat_convexhull_Mat_convexityDefects
/// Finds the convexity defects of a contour.
/// 
/// The figure below displays convexity defects of a hand contour:
/// 
/// ![image](pics/defects.png)
/// 
/// ## Parameters
/// * contour: Input contour.
/// * convexhull: Convex hull obtained using convexHull that should contain indices of the contour
/// points that make the hull.
/// * convexityDefects: The output vector of convexity defects. In C++ and the new Python/Java
/// interface each convexity defect is represented as 4-element integer vector (a.k.a. #Vec4i):
/// (start_index, end_index, farthest_pt_index, fixpt_depth), where indices are 0-based indices
/// in the original contour of the convexity defect beginning, end and the farthest point, and
/// fixpt_depth is fixed-point approximation (with 8 fractional bits) of the distance between the
/// farthest contour point and the hull. That is, to get the floating-point value of the depth will be
/// fixpt_depth/256.0.
pub fn convexity_defects(contour: &core::Mat, convexhull: &core::Mat, convexity_defects: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_convexityDefects_Mat_contour_Mat_convexhull_Mat_convexityDefects(contour.as_raw_Mat(), convexhull.as_raw_Mat(), convexity_defects.as_raw_Mat()) }.into_result()
}

// identifier: cv_copyMakeBorder_Mat_src_Mat_dst_int_top_int_bottom_int_left_int_right_int_borderType_Scalar_value
/// Forms a border around an image.
/// 
/// The function copies the source image into the middle of the destination image. The areas to the
/// left, to the right, above and below the copied source image will be filled with extrapolated
/// pixels. This is not what filtering functions based on it do (they extrapolate pixels on-fly), but
/// what other more complex functions, including your own, may do to simplify image boundary handling.
/// 
/// The function supports the mode when src is already in the middle of dst . In this case, the
/// function does not copy src itself but simply constructs the border, for example:
/// 
/// ```ignore{.cpp}
/// // let border be the same in all directions
/// int border=2;
/// // constructs a larger image to fit both the image and the border
/// Mat gray_buf(rgb.rows + border*2, rgb.cols + border*2, rgb.depth());
/// // select the middle part of it w/o copying data
/// Mat gray(gray_canvas, Rect(border, border, rgb.cols, rgb.rows));
/// // convert image from RGB to grayscale
/// cvtColor(rgb, gray, COLOR_RGB2GRAY);
/// // form a border in-place
/// copyMakeBorder(gray, gray_buf, border, border,
/// border, border, BORDER_REPLICATE);
/// // now do some custom filtering ...
/// ...
/// ```
/// 
/// 
/// Note: When the source image is a part (ROI) of a bigger image, the function will try to use the
/// pixels outside of the ROI to form a border. To disable this feature and always do extrapolation, as
/// if src was not a ROI, use borderType | #BORDER_ISOLATED.
/// 
/// ## Parameters
/// * src: Source image.
/// * dst: Destination image of the same type as src and the size Size(src.cols+left+right,
/// src.rows+top+bottom) .
/// * top
/// @param: bottom
/// * left
/// @param: right Parameter specifying how many pixels in each direction from the source image rectangle
/// to extrapolate. For example, top=1, bottom=1, left=1, right=1 mean that 1 pixel-wide border needs
/// to be built.
/// * borderType: Border type. See borderInterpolate for details.
/// * value: Border value if borderType==BORDER_CONSTANT .
/// 
/// @sa  borderInterpolate
///
/// ## C++ default parameters:
/// * value: Scalar()
pub fn copy_make_border(src: &core::Mat, dst: &mut core::Mat, top: i32, bottom: i32, left: i32, right: i32, border_type: i32, value: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_copyMakeBorder_Mat_src_Mat_dst_int_top_int_bottom_int_left_int_right_int_borderType_Scalar_value(src.as_raw_Mat(), dst.as_raw_Mat(), top, bottom, left, right, border_type, value) }.into_result()
}

// identifier: cv_cornerEigenValsAndVecs_Mat_src_Mat_dst_int_blockSize_int_ksize_int_borderType
/// Calculates eigenvalues and eigenvectors of image blocks for corner detection.
/// 
/// For every pixel <span lang='latex'>p</span> , the function cornerEigenValsAndVecs considers a blockSize <span lang='latex'>\times</span> blockSize
/// neighborhood <span lang='latex'>S(p)</span> . It calculates the covariation matrix of derivatives over the neighborhood as:
/// 
/// <div lang='latex'>M =  \begin{bmatrix} \sum _{S(p)}(dI/dx)^2 &  \sum _{S(p)}dI/dx dI/dy  \\ \sum _{S(p)}dI/dx dI/dy &  \sum _{S(p)}(dI/dy)^2 \end{bmatrix}</div>
/// 
/// where the derivatives are computed using the Sobel operator.
/// 
/// After that, it finds eigenvectors and eigenvalues of <span lang='latex'>M</span> and stores them in the destination image as
/// <span lang='latex'>(\lambda_1, \lambda_2, x_1, y_1, x_2, y_2)</span> where
/// 
/// *   <span lang='latex'>\lambda_1, \lambda_2</span> are the non-sorted eigenvalues of <span lang='latex'>M</span>
/// *   <span lang='latex'>x_1, y_1</span> are the eigenvectors corresponding to <span lang='latex'>\lambda_1</span>
/// *   <span lang='latex'>x_2, y_2</span> are the eigenvectors corresponding to <span lang='latex'>\lambda_2</span>
/// 
/// The output of the function can be used for robust edge or corner detection.
/// 
/// ## Parameters
/// * src: Input single-channel 8-bit or floating-point image.
/// * dst: Image to store the results. It has the same size as src and the type CV_32FC(6) .
/// * blockSize: Neighborhood size (see details below).
/// * ksize: Aperture parameter for the Sobel operator.
/// * borderType: Pixel extrapolation method. See #BorderTypes.
/// 
/// @sa  cornerMinEigenVal, cornerHarris, preCornerDetect
///
/// ## C++ default parameters:
/// * border_type: BORDER_DEFAULT
pub fn corner_eigen_vals_and_vecs(src: &core::Mat, dst: &mut core::Mat, block_size: i32, ksize: i32, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_cornerEigenValsAndVecs_Mat_src_Mat_dst_int_blockSize_int_ksize_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), block_size, ksize, border_type) }.into_result()
}

// identifier: cv_cornerHarris_Mat_src_Mat_dst_int_blockSize_int_ksize_double_k_int_borderType
/// Harris corner detector.
/// 
/// The function runs the Harris corner detector on the image. Similarly to cornerMinEigenVal and
/// cornerEigenValsAndVecs , for each pixel <span lang='latex'>(x, y)</span> it calculates a <span lang='latex'>2\times2</span> gradient covariance
/// matrix <span lang='latex'>M^{(x,y)}</span> over a <span lang='latex'>\texttt{blockSize} \times \texttt{blockSize}</span> neighborhood. Then, it
/// computes the following characteristic:
/// 
/// <div lang='latex'>\texttt{dst} (x,y) =  \mathrm{det} M^{(x,y)} - k  \cdot \left ( \mathrm{tr} M^{(x,y)} \right )^2</div>
/// 
/// Corners in the image can be found as the local maxima of this response map.
/// 
/// ## Parameters
/// * src: Input single-channel 8-bit or floating-point image.
/// * dst: Image to store the Harris detector responses. It has the type CV_32FC1 and the same
/// size as src .
/// * blockSize: Neighborhood size (see the details on #cornerEigenValsAndVecs ).
/// * ksize: Aperture parameter for the Sobel operator.
/// * k: Harris detector free parameter. See the formula above.
/// * borderType: Pixel extrapolation method. See #BorderTypes.
///
/// ## C++ default parameters:
/// * border_type: BORDER_DEFAULT
pub fn corner_harris(src: &core::Mat, dst: &mut core::Mat, block_size: i32, ksize: i32, k: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_cornerHarris_Mat_src_Mat_dst_int_blockSize_int_ksize_double_k_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), block_size, ksize, k, border_type) }.into_result()
}

// identifier: cv_cornerMinEigenVal_Mat_src_Mat_dst_int_blockSize_int_ksize_int_borderType
/// Calculates the minimal eigenvalue of gradient matrices for corner detection.
/// 
/// The function is similar to cornerEigenValsAndVecs but it calculates and stores only the minimal
/// eigenvalue of the covariance matrix of derivatives, that is, <span lang='latex'>\min(\lambda_1, \lambda_2)</span> in terms
/// of the formulae in the cornerEigenValsAndVecs description.
/// 
/// ## Parameters
/// * src: Input single-channel 8-bit or floating-point image.
/// * dst: Image to store the minimal eigenvalues. It has the type CV_32FC1 and the same size as
/// src .
/// * blockSize: Neighborhood size (see the details on #cornerEigenValsAndVecs ).
/// * ksize: Aperture parameter for the Sobel operator.
/// * borderType: Pixel extrapolation method. See #BorderTypes.
///
/// ## C++ default parameters:
/// * ksize: 3
/// * border_type: BORDER_DEFAULT
pub fn corner_min_eigen_val(src: &core::Mat, dst: &mut core::Mat, block_size: i32, ksize: i32, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_cornerMinEigenVal_Mat_src_Mat_dst_int_blockSize_int_ksize_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), block_size, ksize, border_type) }.into_result()
}

// identifier: cv_cornerSubPix_Mat_image_Mat_corners_Size_winSize_Size_zeroZone_TermCriteria_criteria
/// Refines the corner locations.
/// 
/// The function iterates to find the sub-pixel accurate location of corners or radial saddle points, as
/// shown on the figure below.
/// 
/// ![image](pics/cornersubpix.png)
/// 
/// Sub-pixel accurate corner locator is based on the observation that every vector from the center <span lang='latex'>q</span>
/// to a point <span lang='latex'>p</span> located within a neighborhood of <span lang='latex'>q</span> is orthogonal to the image gradient at <span lang='latex'>p</span>
/// subject to image and measurement noise. Consider the expression:
/// 
/// <div lang='latex'>\epsilon _i = {DI_{p_i}}^T  \cdot (q - p_i)</div>
/// 
/// where <span lang='latex'>{DI_{p_i}}</span> is an image gradient at one of the points <span lang='latex'>p_i</span> in a neighborhood of <span lang='latex'>q</span> . The
/// value of <span lang='latex'>q</span> is to be found so that <span lang='latex'>\epsilon_i</span> is minimized. A system of equations may be set up
/// with <span lang='latex'>\epsilon_i</span> set to zero:
/// 
/// <div lang='latex'>\sum _i(DI_{p_i}  \cdot {DI_{p_i}}^T) \cdot q -  \sum _i(DI_{p_i}  \cdot {DI_{p_i}}^T  \cdot p_i)</div>
/// 
/// where the gradients are summed within a neighborhood ("search window") of <span lang='latex'>q</span> . Calling the first
/// gradient term <span lang='latex'>G</span> and the second gradient term <span lang='latex'>b</span> gives:
/// 
/// <div lang='latex'>q = G^{-1}  \cdot b</div>
/// 
/// The algorithm sets the center of the neighborhood window at this new center <span lang='latex'>q</span> and then iterates
/// until the center stays within a set threshold.
/// 
/// ## Parameters
/// * image: Input single-channel, 8-bit or float image.
/// * corners: Initial coordinates of the input corners and refined coordinates provided for
/// output.
/// * winSize: Half of the side length of the search window. For example, if winSize=Size(5,5) ,
/// then a <span lang='latex'>(5*2+1) \times (5*2+1) = 11 \times 11</span> search window is used.
/// * zeroZone: Half of the size of the dead region in the middle of the search zone over which
/// the summation in the formula below is not done. It is used sometimes to avoid possible
/// singularities of the autocorrelation matrix. The value of (-1,-1) indicates that there is no such
/// a size.
/// * criteria: Criteria for termination of the iterative process of corner refinement. That is,
/// the process of corner position refinement stops either after criteria.maxCount iterations or when
/// the corner position moves by less than criteria.epsilon on some iteration.
pub fn corner_sub_pix(image: &core::Mat, corners: &mut core::Mat, win_size: core::Size, zero_zone: core::Size, criteria: &core::TermCriteria) -> Result<()> {
    unsafe { sys::cv_core_cv_cornerSubPix_Mat_image_Mat_corners_Size_winSize_Size_zeroZone_TermCriteria_criteria(image.as_raw_Mat(), corners.as_raw_Mat(), win_size, zero_zone, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_correctMatches_Mat_F_Mat_points1_Mat_points2_Mat_newPoints1_Mat_newPoints2
/// Refines coordinates of corresponding points.
/// 
/// ## Parameters
/// * F: 3x3 fundamental matrix.
/// * points1: 1xN array containing the first set of points.
/// * points2: 1xN array containing the second set of points.
/// * newPoints1: The optimized points1.
/// * newPoints2: The optimized points2.
/// 
/// The function implements the Optimal Triangulation Method (see Multiple View Geometry for details).
/// For each given point correspondence points1[i] \<-\> points2[i], and a fundamental matrix F, it
/// computes the corrected correspondences newPoints1[i] \<-\> newPoints2[i] that minimize the geometric
/// error <span lang='latex'>d(points1[i], newPoints1[i])^2 + d(points2[i],newPoints2[i])^2</span> (where <span lang='latex'>d(a,b)</span> is the
/// geometric distance between points <span lang='latex'>a</span> and <span lang='latex'>b</span> ) subject to the epipolar constraint
/// <span lang='latex'>newPoints2^T * F * newPoints1 = 0</span> .
pub fn correct_matches(f: &core::Mat, points1: &core::Mat, points2: &core::Mat, new_points1: &mut core::Mat, new_points2: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_correctMatches_Mat_F_Mat_points1_Mat_points2_Mat_newPoints1_Mat_newPoints2(f.as_raw_Mat(), points1.as_raw_Mat(), points2.as_raw_Mat(), new_points1.as_raw_Mat(), new_points2.as_raw_Mat()) }.into_result()
}

// identifier: cv_cos_softdouble_a
/// Cosine
/// 
/// Special cases:
/// - cos(Inf) or cos(NaN) is NaN
/// - cos(x) == +/- 1 when cos(x) is close to +/- 1
pub fn cos(a: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_cos_softdouble_a(a.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_countNonZero_Mat_src
/// Counts non-zero array elements.
/// 
/// The function returns the number of non-zero elements in src :
/// <div lang='latex'>\sum _{I: \; \texttt{src} (I) \ne0 } 1</div>
/// ## Parameters
/// * src: single-channel array.
/// @sa  mean, meanStdDev, norm, minMaxLoc, calcCovarMatrix
pub fn count_non_zero(src: &core::Mat) -> Result<i32> {
    unsafe { sys::cv_core_cv_countNonZero_Mat_src(src.as_raw_Mat()) }.into_result()
}

// identifier: cv_createAffineTransformer_bool_fullAffine
/// Complete constructor
pub fn create_affine_transformer(full_affine: bool) -> Result<types::PtrOfAffineTransformer> {
    unsafe { sys::cv_core_cv_createAffineTransformer_bool_fullAffine(full_affine) }.into_result().map(|x| types::PtrOfAffineTransformer { ptr: x })
}

// identifier: cv_createAlignMTB_int_max_bits_int_exclude_range_bool_cut
/// Creates AlignMTB object
/// 
/// ## Parameters
/// * max_bits: logarithm to the base 2 of maximal shift in each dimension. Values of 5 and 6 are
/// usually good enough (31 and 63 pixels shift respectively).
/// * exclude_range: range for exclusion bitmap that is constructed to suppress noise around the
/// median value.
/// * cut: if true cuts images, otherwise fills the new regions with zeros.
///
/// ## C++ default parameters:
/// * max_bits: 6
/// * exclude_range: 4
/// * cut: true
pub fn create_align_mtb(max_bits: i32, exclude_range: i32, cut: bool) -> Result<types::PtrOfAlignMTB> {
    unsafe { sys::cv_core_cv_createAlignMTB_int_max_bits_int_exclude_range_bool_cut(max_bits, exclude_range, cut) }.into_result().map(|x| types::PtrOfAlignMTB { ptr: x })
}

// identifier: cv_createBackgroundSubtractorKNN_int_history_double_dist2Threshold_bool_detectShadows
/// Creates KNN Background Subtractor
/// 
/// ## Parameters
/// * history: Length of the history.
/// * dist2Threshold: Threshold on the squared distance between the pixel and the sample to decide
/// whether a pixel is close to that sample. This parameter does not affect the background update.
/// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the
/// speed a bit, so if you do not need this feature, set the parameter to false.
///
/// ## C++ default parameters:
/// * history: 500
/// * dist2_threshold: 400.0
/// * detect_shadows: true
pub fn create_background_subtractor_knn(history: i32, dist2_threshold: f64, detect_shadows: bool) -> Result<types::PtrOfBackgroundSubtractorKNN> {
    unsafe { sys::cv_core_cv_createBackgroundSubtractorKNN_int_history_double_dist2Threshold_bool_detectShadows(history, dist2_threshold, detect_shadows) }.into_result().map(|x| types::PtrOfBackgroundSubtractorKNN { ptr: x })
}

// identifier: cv_createBackgroundSubtractorMOG2_int_history_double_varThreshold_bool_detectShadows
/// Creates MOG2 Background Subtractor
/// 
/// ## Parameters
/// * history: Length of the history.
/// * varThreshold: Threshold on the squared Mahalanobis distance between the pixel and the model
/// to decide whether a pixel is well described by the background model. This parameter does not
/// affect the background update.
/// * detectShadows: If true, the algorithm will detect shadows and mark them. It decreases the
/// speed a bit, so if you do not need this feature, set the parameter to false.
///
/// ## C++ default parameters:
/// * history: 500
/// * var_threshold: 16
/// * detect_shadows: true
pub fn create_background_subtractor_mog2(history: i32, var_threshold: f64, detect_shadows: bool) -> Result<types::PtrOfBackgroundSubtractorMOG2> {
    unsafe { sys::cv_core_cv_createBackgroundSubtractorMOG2_int_history_double_varThreshold_bool_detectShadows(history, var_threshold, detect_shadows) }.into_result().map(|x| types::PtrOfBackgroundSubtractorMOG2 { ptr: x })
}

// identifier: cv_createButton_String_bar_name_ButtonCallback_on_change_void_X_userdata_int_type_bool_initial_button_state
/// Attaches a button to the control panel.
/// 
/// The function createButton attaches a button to the control panel. Each button is added to a
/// buttonbar to the right of the last button. A new buttonbar is created if nothing was attached to the
/// control panel before, or if the last element attached to the control panel was a trackbar or if the
/// QT_NEW_BUTTONBAR flag is added to the type.
/// 
/// See below various examples of the cv::createButton function call: :
/// ```ignore
/// createButton(NULL,callbackButton);//create a push button "button 0", that will call callbackButton.
/// createButton("button2",callbackButton,NULL,QT_CHECKBOX,0);
/// createButton("button3",callbackButton,&value);
/// createButton("button5",callbackButton1,NULL,QT_RADIOBOX);
/// createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON,1);
/// createButton("button6",callbackButton2,NULL,QT_PUSH_BUTTON|QT_NEW_BUTTONBAR);// create a push button in a new row
/// ```
/// 
/// 
/// ## Parameters
/// @param  bar_name Name of the button.
/// * on_change: Pointer to the function to be called every time the button changes its state.
/// This function should be prototyped as void Foo(int state,\*void); . *state* is the current state
/// of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button.
/// * userdata: Pointer passed to the callback function.
/// * type: Optional type of the button. Available types are: (cv::QtButtonTypes)
/// * initial_button_state: Default state of the button. Use for checkbox and radiobox. Its
/// value could be 0 or 1. (__Optional__)
///
/// ## C++ default parameters:
/// * userdata: 0
/// * _type: QT_PUSH_BUTTON
/// * initial_button_state: false
pub fn create_button(bar_name: &str, on_change: Option<Box<core::ButtonCallback>>, _type: i32, initial_button_state: bool) -> Result<i32> {
    string_arg!(bar_name);
    callback_arg!(on_change(state: i32, userdata: *mut c_void) via userdata => (state: i32));
    unsafe { sys::cv_core_cv_createButton_String_bar_name_ButtonCallback_on_change_void_X_userdata_int_type_bool_initial_button_state(bar_name.as_ptr(), on_change, userdata, _type, initial_button_state) }.into_result()
}

// identifier: cv_createCLAHE_double_clipLimit_Size_tileGridSize
/// Creates a smart pointer to a cv::CLAHE class and initializes it.
/// 
/// ## Parameters
/// * clipLimit: Threshold for contrast limiting.
/// * tileGridSize: Size of grid for histogram equalization. Input image will be divided into
/// equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column.
///
/// ## C++ default parameters:
/// * clip_limit: 40.0
/// * tile_grid_size: Size(8, 8)
pub fn create_clahe(clip_limit: f64, tile_grid_size: core::Size) -> Result<types::PtrOfCLAHE> {
    unsafe { sys::cv_core_cv_createCLAHE_double_clipLimit_Size_tileGridSize(clip_limit, tile_grid_size) }.into_result().map(|x| types::PtrOfCLAHE { ptr: x })
}

// identifier: cv_createCalibrateDebevec_int_samples_float_lambda_bool_random
/// Creates CalibrateDebevec object
/// 
/// ## Parameters
/// * samples: number of pixel locations to use
/// * lambda: smoothness term weight. Greater values produce smoother results, but can alter the
/// response.
/// * random: if true sample pixel locations are chosen at random, otherwise they form a
/// rectangular grid.
///
/// ## C++ default parameters:
/// * samples: 70
/// * lambda: 10.0f
/// * random: false
pub fn create_calibrate_debevec(samples: i32, lambda: f32, random: bool) -> Result<types::PtrOfCalibrateDebevec> {
    unsafe { sys::cv_core_cv_createCalibrateDebevec_int_samples_float_lambda_bool_random(samples, lambda, random) }.into_result().map(|x| types::PtrOfCalibrateDebevec { ptr: x })
}

// identifier: cv_createCalibrateRobertson_int_max_iter_float_threshold
/// Creates CalibrateRobertson object
/// 
/// ## Parameters
/// * max_iter: maximal number of Gauss-Seidel solver iterations.
/// * threshold: target difference between results of two successive steps of the minimization.
///
/// ## C++ default parameters:
/// * max_iter: 30
/// * threshold: 0.01f
pub fn create_calibrate_robertson(max_iter: i32, threshold: f32) -> Result<types::PtrOfCalibrateRobertson> {
    unsafe { sys::cv_core_cv_createCalibrateRobertson_int_max_iter_float_threshold(max_iter, threshold) }.into_result().map(|x| types::PtrOfCalibrateRobertson { ptr: x })
}

// identifier: cv_createChiHistogramCostExtractor_int_nDummies_float_defaultCost
///
/// ## C++ default parameters:
/// * n_dummies: 25
/// * default_cost: 0.2f
pub fn create_chi_histogram_cost_extractor(n_dummies: i32, default_cost: f32) -> Result<types::PtrOfHistogramCostExtractor> {
    unsafe { sys::cv_core_cv_createChiHistogramCostExtractor_int_nDummies_float_defaultCost(n_dummies, default_cost) }.into_result().map(|x| types::PtrOfHistogramCostExtractor { ptr: x })
}

// identifier: cv_createEMDHistogramCostExtractor_int_flag_int_nDummies_float_defaultCost
///
/// ## C++ default parameters:
/// * flag: DIST_L2
/// * n_dummies: 25
/// * default_cost: 0.2f
pub fn create_emd_histogram_cost_extractor(flag: i32, n_dummies: i32, default_cost: f32) -> Result<types::PtrOfHistogramCostExtractor> {
    unsafe { sys::cv_core_cv_createEMDHistogramCostExtractor_int_flag_int_nDummies_float_defaultCost(flag, n_dummies, default_cost) }.into_result().map(|x| types::PtrOfHistogramCostExtractor { ptr: x })
}

// identifier: cv_createEMDL1HistogramCostExtractor_int_nDummies_float_defaultCost
///
/// ## C++ default parameters:
/// * n_dummies: 25
/// * default_cost: 0.2f
pub fn create_emdl1_histogram_cost_extractor(n_dummies: i32, default_cost: f32) -> Result<types::PtrOfHistogramCostExtractor> {
    unsafe { sys::cv_core_cv_createEMDL1HistogramCostExtractor_int_nDummies_float_defaultCost(n_dummies, default_cost) }.into_result().map(|x| types::PtrOfHistogramCostExtractor { ptr: x })
}

// identifier: cv_createFaceDetectionMaskGenerator
pub fn create_face_detection_mask_generator() -> Result<types::PtrOfMaskGenerator> {
    unsafe { sys::cv_core_cv_createFaceDetectionMaskGenerator() }.into_result().map(|x| types::PtrOfMaskGenerator { ptr: x })
}

// identifier: cv_createGeneralizedHoughBallard
/// Creates a smart pointer to a cv::GeneralizedHoughBallard class and initializes it.
pub fn create_generalized_hough_ballard() -> Result<types::PtrOfGeneralizedHoughBallard> {
    unsafe { sys::cv_core_cv_createGeneralizedHoughBallard() }.into_result().map(|x| types::PtrOfGeneralizedHoughBallard { ptr: x })
}

// identifier: cv_createGeneralizedHoughGuil
/// Creates a smart pointer to a cv::GeneralizedHoughGuil class and initializes it.
pub fn create_generalized_hough_guil() -> Result<types::PtrOfGeneralizedHoughGuil> {
    unsafe { sys::cv_core_cv_createGeneralizedHoughGuil() }.into_result().map(|x| types::PtrOfGeneralizedHoughGuil { ptr: x })
}

// identifier: cv_createHanningWindow_Mat_dst_Size_winSize_int_type
/// This function computes a Hanning window coefficients in two dimensions.
/// 
/// See (http://en.wikipedia.org/wiki/Hann_function) and (http://en.wikipedia.org/wiki/Window_function)
/// for more information.
/// 
/// An example is shown below:
/// ```ignore
/// // create hanning window of size 100x100 and type CV_32F
/// Mat hann;
/// createHanningWindow(hann, Size(100, 100), CV_32F);
/// ```
/// 
/// ## Parameters
/// * dst: Destination array to place Hann coefficients in
/// * winSize: The window size specifications (both width and height must be > 1)
/// * type: Created array type
pub fn create_hanning_window(dst: &mut core::Mat, win_size: core::Size, _type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_createHanningWindow_Mat_dst_Size_winSize_int_type(dst.as_raw_Mat(), win_size, _type) }.into_result()
}

// identifier: cv_createHausdorffDistanceExtractor_int_distanceFlag_float_rankProp
///
/// ## C++ default parameters:
/// * distance_flag: cv::NORM_L2
/// * rank_prop: 0.6f
pub fn create_hausdorff_distance_extractor(distance_flag: i32, rank_prop: f32) -> Result<types::PtrOfHausdorffDistanceExtractor> {
    unsafe { sys::cv_core_cv_createHausdorffDistanceExtractor_int_distanceFlag_float_rankProp(distance_flag, rank_prop) }.into_result().map(|x| types::PtrOfHausdorffDistanceExtractor { ptr: x })
}

// identifier: cv_createLineSegmentDetector_int__refine_double__scale_double__sigma_scale_double__quant_double__ang_th_double__log_eps_double__density_th_int__n_bins
/// Creates a smart pointer to a LineSegmentDetector object and initializes it.
/// 
/// The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want
/// to edit those, as to tailor it for their own application.
/// 
/// ## Parameters
/// * _refine: The way found lines will be refined, see #LineSegmentDetectorModes
/// * _scale: The scale of the image that will be used to find the lines. Range (0..1].
/// * _sigma_scale: Sigma for Gaussian filter. It is computed as sigma = _sigma_scale/_scale.
/// * _quant: Bound to the quantization error on the gradient norm.
/// * _ang_th: Gradient angle tolerance in degrees.
/// * _log_eps: Detection threshold: -log10(NFA) \> log_eps. Used only when advance refinement
/// is chosen.
/// * _density_th: Minimal density of aligned region points in the enclosing rectangle.
/// * _n_bins: Number of bins in pseudo-ordering of gradient modulus.
///
/// ## C++ default parameters:
/// * _refine: LSD_REFINE_STD
/// * _scale: 0.8
/// * _sigma_scale: 0.6
/// * _quant: 2.0
/// * _ang_th: 22.5
/// * _log_eps: 0
/// * _density_th: 0.7
/// * _n_bins: 1024
pub fn create_line_segment_detector(_refine: i32, _scale: f64, _sigma_scale: f64, _quant: f64, _ang_th: f64, _log_eps: f64, _density_th: f64, _n_bins: i32) -> Result<types::PtrOfLineSegmentDetector> {
    unsafe { sys::cv_core_cv_createLineSegmentDetector_int__refine_double__scale_double__sigma_scale_double__quant_double__ang_th_double__log_eps_double__density_th_int__n_bins(_refine, _scale, _sigma_scale, _quant, _ang_th, _log_eps, _density_th, _n_bins) }.into_result().map(|x| types::PtrOfLineSegmentDetector { ptr: x })
}

// identifier: cv_createMergeDebevec
/// Creates MergeDebevec object
pub fn create_merge_debevec() -> Result<types::PtrOfMergeDebevec> {
    unsafe { sys::cv_core_cv_createMergeDebevec() }.into_result().map(|x| types::PtrOfMergeDebevec { ptr: x })
}

// identifier: cv_createMergeMertens_float_contrast_weight_float_saturation_weight_float_exposure_weight
/// Creates MergeMertens object
/// 
/// ## Parameters
/// * contrast_weight: contrast measure weight. See MergeMertens.
/// * saturation_weight: saturation measure weight
/// * exposure_weight: well-exposedness measure weight
///
/// ## C++ default parameters:
/// * contrast_weight: 1.0f
/// * saturation_weight: 1.0f
/// * exposure_weight: 0.0f
pub fn create_merge_mertens(contrast_weight: f32, saturation_weight: f32, exposure_weight: f32) -> Result<types::PtrOfMergeMertens> {
    unsafe { sys::cv_core_cv_createMergeMertens_float_contrast_weight_float_saturation_weight_float_exposure_weight(contrast_weight, saturation_weight, exposure_weight) }.into_result().map(|x| types::PtrOfMergeMertens { ptr: x })
}

// identifier: cv_createMergeRobertson
/// Creates MergeRobertson object
pub fn create_merge_robertson() -> Result<types::PtrOfMergeRobertson> {
    unsafe { sys::cv_core_cv_createMergeRobertson() }.into_result().map(|x| types::PtrOfMergeRobertson { ptr: x })
}

// identifier: cv_createNormHistogramCostExtractor_int_flag_int_nDummies_float_defaultCost
///
/// ## C++ default parameters:
/// * flag: DIST_L2
/// * n_dummies: 25
/// * default_cost: 0.2f
pub fn create_norm_histogram_cost_extractor(flag: i32, n_dummies: i32, default_cost: f32) -> Result<types::PtrOfHistogramCostExtractor> {
    unsafe { sys::cv_core_cv_createNormHistogramCostExtractor_int_flag_int_nDummies_float_defaultCost(flag, n_dummies, default_cost) }.into_result().map(|x| types::PtrOfHistogramCostExtractor { ptr: x })
}

// identifier: cv_createOptFlow_DualTVL1
/// Creates instance of cv::DenseOpticalFlow
pub fn create_opt_flow__dual_tvl1() -> Result<types::PtrOfDualTVL1OpticalFlow> {
    unsafe { sys::cv_core_cv_createOptFlow_DualTVL1() }.into_result().map(|x| types::PtrOfDualTVL1OpticalFlow { ptr: x })
}

// identifier: cv_createStitcherScans_bool_try_use_gpu
///
/// ## C++ default parameters:
/// * try_use_gpu: false
pub fn create_stitcher_scans(try_use_gpu: bool) -> Result<types::PtrOfStitcher> {
    unsafe { sys::cv_core_cv_createStitcherScans_bool_try_use_gpu(try_use_gpu) }.into_result().map(|x| types::PtrOfStitcher { ptr: x })
}

// identifier: cv_createStitcher_bool_try_use_gpu
///
/// ## C++ default parameters:
/// * try_use_gpu: false
pub fn create_stitcher(try_use_gpu: bool) -> Result<types::PtrOfStitcher> {
    unsafe { sys::cv_core_cv_createStitcher_bool_try_use_gpu(try_use_gpu) }.into_result().map(|x| types::PtrOfStitcher { ptr: x })
}

// identifier: cv_createThinPlateSplineShapeTransformer_double_regularizationParameter
/// Complete constructor
///
/// ## C++ default parameters:
/// * regularization_parameter: 0
pub fn create_thin_plate_spline_shape_transformer(regularization_parameter: f64) -> Result<types::PtrOfThinPlateSplineShapeTransformer> {
    unsafe { sys::cv_core_cv_createThinPlateSplineShapeTransformer_double_regularizationParameter(regularization_parameter) }.into_result().map(|x| types::PtrOfThinPlateSplineShapeTransformer { ptr: x })
}

// identifier: cv_createTonemapDrago_float_gamma_float_saturation_float_bias
/// Creates TonemapDrago object
/// 
/// ## Parameters
/// * gamma: gamma value for gamma correction. See createTonemap
/// * saturation: positive saturation enhancement value. 1.0 preserves saturation, values greater
/// than 1 increase saturation and values less than 1 decrease it.
/// * bias: value for bias function in [0, 1] range. Values from 0.7 to 0.9 usually give best
/// results, default value is 0.85.
///
/// ## C++ default parameters:
/// * gamma: 1.0f
/// * saturation: 1.0f
/// * bias: 0.85f
pub fn create_tonemap_drago(gamma: f32, saturation: f32, bias: f32) -> Result<types::PtrOfTonemapDrago> {
    unsafe { sys::cv_core_cv_createTonemapDrago_float_gamma_float_saturation_float_bias(gamma, saturation, bias) }.into_result().map(|x| types::PtrOfTonemapDrago { ptr: x })
}

// identifier: cv_createTonemapMantiuk_float_gamma_float_scale_float_saturation
/// Creates TonemapMantiuk object
/// 
/// ## Parameters
/// * gamma: gamma value for gamma correction. See createTonemap
/// * scale: contrast scale factor. HVS response is multiplied by this parameter, thus compressing
/// dynamic range. Values from 0.6 to 0.9 produce best results.
/// * saturation: saturation enhancement value. See createTonemapDrago
///
/// ## C++ default parameters:
/// * gamma: 1.0f
/// * scale: 0.7f
/// * saturation: 1.0f
pub fn create_tonemap_mantiuk(gamma: f32, scale: f32, saturation: f32) -> Result<types::PtrOfTonemapMantiuk> {
    unsafe { sys::cv_core_cv_createTonemapMantiuk_float_gamma_float_scale_float_saturation(gamma, scale, saturation) }.into_result().map(|x| types::PtrOfTonemapMantiuk { ptr: x })
}

// identifier: cv_createTonemapReinhard_float_gamma_float_intensity_float_light_adapt_float_color_adapt
/// Creates TonemapReinhard object
/// 
/// ## Parameters
/// * gamma: gamma value for gamma correction. See createTonemap
/// * intensity: result intensity in [-8, 8] range. Greater intensity produces brighter results.
/// * light_adapt: light adaptation in [0, 1] range. If 1 adaptation is based only on pixel
/// value, if 0 it's global, otherwise it's a weighted mean of this two cases.
/// * color_adapt: chromatic adaptation in [0, 1] range. If 1 channels are treated independently,
/// if 0 adaptation level is the same for each channel.
///
/// ## C++ default parameters:
/// * gamma: 1.0f
/// * intensity: 0.0f
/// * light_adapt: 1.0f
/// * color_adapt: 0.0f
pub fn create_tonemap_reinhard(gamma: f32, intensity: f32, light_adapt: f32, color_adapt: f32) -> Result<types::PtrOfTonemapReinhard> {
    unsafe { sys::cv_core_cv_createTonemapReinhard_float_gamma_float_intensity_float_light_adapt_float_color_adapt(gamma, intensity, light_adapt, color_adapt) }.into_result().map(|x| types::PtrOfTonemapReinhard { ptr: x })
}

// identifier: cv_createTonemap_float_gamma
/// Creates simple linear mapper with gamma correction
/// 
/// ## Parameters
/// * gamma: positive value for gamma correction. Gamma value of 1.0 implies no correction, gamma
/// equal to 2.2f is suitable for most displays.
/// Generally gamma \> 1 brightens the image and gamma \< 1 darkens it.
///
/// ## C++ default parameters:
/// * gamma: 1.0f
pub fn create_tonemap(gamma: f32) -> Result<types::PtrOfTonemap> {
    unsafe { sys::cv_core_cv_createTonemap_float_gamma(gamma) }.into_result().map(|x| types::PtrOfTonemap { ptr: x })
}

// identifier: cv_createTrackbar_String_trackbarname_String_winname_int_X_value_int_count_TrackbarCallback_onChange_void_X_userdata
/// Creates a trackbar and attaches it to the specified window.
/// 
/// The function createTrackbar creates a trackbar (a slider or range control) with the specified name
/// and range, assigns a variable value to be a position synchronized with the trackbar and specifies
/// the callback function onChange to be called on the trackbar position change. The created trackbar is
/// displayed in the specified window winname.
/// 
/// 
/// Note:
/// 
/// [__Qt Backend Only__] winname can be empty (or NULL) if the trackbar should be attached to the
/// control panel.
/// 
/// Clicking the label of each trackbar enables editing the trackbar values manually.
/// 
/// ## Parameters
/// * trackbarname: Name of the created trackbar.
/// * winname: Name of the window that will be used as a parent of the created trackbar.
/// * value: Optional pointer to an integer variable whose value reflects the position of the
/// slider. Upon creation, the slider position is defined by this variable.
/// * count: Maximal position of the slider. The minimal position is always 0.
/// * onChange: Pointer to the function to be called every time the slider changes position. This
/// function should be prototyped as void Foo(int,void\*); , where the first parameter is the trackbar
/// position and the second parameter is the user data (see the next parameter). If the callback is
/// the NULL pointer, no callbacks are called, but only value is updated.
/// * userdata: User data that is passed as is to the callback. It can be used to handle trackbar
/// events without using global variables.
///
/// ## C++ default parameters:
/// * on_change: 0
/// * userdata: 0
pub fn create_trackbar(trackbarname: &str, winname: &str, value: &mut i32, count: i32, on_change: Option<Box<core::TrackbarCallback>>) -> Result<i32> {
    string_arg!(trackbarname);
    string_arg!(winname);
    callback_arg!(on_change(pos: i32, userdata: *mut c_void) via userdata => (pos: i32));
    unsafe { sys::cv_core_cv_createTrackbar_String_trackbarname_String_winname_int_X_value_int_count_TrackbarCallback_onChange_void_X_userdata(trackbarname.as_ptr(), winname.as_ptr(), value, count, on_change, userdata) }.into_result()
}

// identifier: cv_cubeRoot_float_val
/// Computes the cube root of an argument.
/// 
/// The function cubeRoot computes <span lang='latex'>\sqrt[3]{\texttt{val}}</span>. Negative arguments are handled correctly.
/// NaN and Inf are not handled. The accuracy approaches the maximum possible accuracy for
/// single-precision data.
/// ## Parameters
/// * val: A function argument.
pub fn cube_root(val: f32) -> Result<f32> {
    unsafe { sys::cv_core_cv_cubeRoot_float_val(val) }.into_result()
}

// identifier: cv_cv_abs_schar_x
pub fn cv_abs(x: i8) -> Result<i32> {
    unsafe { sys::cv_core_cv_cv_abs_schar_x(x) }.into_result()
}

// identifier: cv_cv_abs_ushort_x
pub fn cv_abs_1(x: u16) -> Result<i32> {
    unsafe { sys::cv_core_cv_cv_abs_ushort_x(x) }.into_result()
}

// identifier: cv_cvtColorTwoPlane_Mat_src1_Mat_src2_Mat_dst_int_code
/// Converts an image from one color space to another where the source image is
/// stored in two planes.
/// 
/// This function only supports YUV420 to RGB conversion as of now.
/// 
/// ## Parameters
/// * src1:: 8-bit image (#CV_8U) of the Y plane.
/// * src2:: image containing interleaved U/V plane.
/// * dst:: output image.
/// * code:: Specifies the type of conversion. It can take any of the following values:
/// - #COLOR_YUV2BGR_NV12
/// - #COLOR_YUV2RGB_NV12
/// - #COLOR_YUV2BGRA_NV12
/// - #COLOR_YUV2RGBA_NV12
/// - #COLOR_YUV2BGR_NV21
/// - #COLOR_YUV2RGB_NV21
/// - #COLOR_YUV2BGRA_NV21
/// - #COLOR_YUV2RGBA_NV21
pub fn cvt_color_two_plane(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, code: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_cvtColorTwoPlane_Mat_src1_Mat_src2_Mat_dst_int_code(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), code) }.into_result()
}

// identifier: cv_cvtColor_Mat_src_Mat_dst_int_code_int_dstCn
/// Converts an image from one color space to another.
/// 
/// The function converts an input image from one color space to another. In case of a transformation
/// to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note
/// that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the
/// bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue
/// component, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and
/// sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on.
/// 
/// The conventional ranges for R, G, and B channel values are:
/// *   0 to 255 for CV_8U images
/// *   0 to 65535 for CV_16U images
/// *   0 to 1 for CV_32F images
/// 
/// In case of linear transformations, the range does not matter. But in case of a non-linear
/// transformation, an input RGB image should be normalized to the proper value range to get the correct
/// results, for example, for RGB <span lang='latex'>\rightarrow</span> L\*u\*v\* transformation. For example, if you have a
/// 32-bit floating-point image directly converted from an 8-bit image without any scaling, then it will
/// have the 0..255 value range instead of 0..1 assumed by the function. So, before calling #cvtColor ,
/// you need first to scale the image down:
/// ```ignore
/// img *= 1./255;
/// cvtColor(img, img, COLOR_BGR2Luv);
/// ```
/// 
/// If you use #cvtColor with 8-bit images, the conversion will have some information lost. For many
/// applications, this will not be noticeable but it is recommended to use 32-bit images in applications
/// that need the full range of colors or that convert an image before an operation and then convert
/// back.
/// 
/// If conversion adds the alpha channel, its value will set to the maximum of corresponding channel
/// range: 255 for CV_8U, 65535 for CV_16U, 1 for CV_32F.
/// 
/// ## Parameters
/// * src: input image: 8-bit unsigned, 16-bit unsigned ( CV_16UC... ), or single-precision
/// floating-point.
/// * dst: output image of the same size and depth as src.
/// * code: color space conversion code (see #ColorConversionCodes).
/// * dstCn: number of channels in the destination image; if the parameter is 0, the number of the
/// channels is derived automatically from src and code.
/// 
/// @see @ref imgproc_color_conversions
///
/// ## C++ default parameters:
/// * dst_cn: 0
pub fn cvt_color(src: &core::Mat, dst: &mut core::Mat, code: i32, dst_cn: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_cvtColor_Mat_src_Mat_dst_int_code_int_dstCn(src.as_raw_Mat(), dst.as_raw_Mat(), code, dst_cn) }.into_result()
}

// identifier: cv_dct_Mat_src_Mat_dst_int_flags
/// Performs a forward or inverse discrete Cosine transform of 1D or 2D array.
/// 
/// The function cv::dct performs a forward or inverse discrete Cosine transform (DCT) of a 1D or 2D
/// floating-point array:
/// *   Forward Cosine transform of a 1D vector of N elements:
/// <div lang='latex'>Y = C^{(N)}  \cdot X</div>
/// where
/// <div lang='latex'>C^{(N)}_{jk}= \sqrt{\alpha_j/N} \cos \left ( \frac{\pi(2k+1)j}{2N} \right )</div>
/// and
/// <span lang='latex'>\alpha_0=1</span>, <span lang='latex'>\alpha_j=2</span> for *j \> 0*.
/// *   Inverse Cosine transform of a 1D vector of N elements:
/// <div lang='latex'>X =  \left (C^{(N)} \right )^{-1}  \cdot Y =  \left (C^{(N)} \right )^T  \cdot Y</div>
/// (since <span lang='latex'>C^{(N)}</span> is an orthogonal matrix, <span lang='latex'>C^{(N)} \cdot \left(C^{(N)}\right)^T = I</span> )
/// *   Forward 2D Cosine transform of M x N matrix:
/// <div lang='latex'>Y = C^{(N)}  \cdot X  \cdot \left (C^{(N)} \right )^T</div>
/// *   Inverse 2D Cosine transform of M x N matrix:
/// <div lang='latex'>X =  \left (C^{(N)} \right )^T  \cdot X  \cdot C^{(N)}</div>
/// 
/// The function chooses the mode of operation by looking at the flags and size of the input array:
/// *   If (flags & #DCT_INVERSE) == 0 , the function does a forward 1D or 2D transform. Otherwise, it
/// is an inverse 1D or 2D transform.
/// *   If (flags & #DCT_ROWS) != 0 , the function performs a 1D transform of each row.
/// *   If the array is a single column or a single row, the function performs a 1D transform.
/// *   If none of the above is true, the function performs a 2D transform.
/// 
/// 
/// Note: Currently dct supports even-size arrays (2, 4, 6 ...). For data analysis and approximation, you
/// can pad the array when necessary.
/// Also, the function performance depends very much, and not monotonically, on the array size (see
/// getOptimalDFTSize ). In the current implementation DCT of a vector of size N is calculated via DFT
/// of a vector of size N/2 . Thus, the optimal DCT size N1 \>= N can be calculated as:
/// ```ignore
/// size_t getOptimalDCTSize(size_t N) { return 2*getOptimalDFTSize((N+1)/2); }
/// N1 = getOptimalDCTSize(N);
/// ```
/// 
/// ## Parameters
/// * src: input floating-point array.
/// * dst: output array of the same size and type as src .
/// * flags: transformation flags as a combination of cv::DftFlags (DCT_*)
/// @sa dft , getOptimalDFTSize , idct
///
/// ## C++ default parameters:
/// * flags: 0
pub fn dct(src: &core::Mat, dst: &mut core::Mat, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_dct_Mat_src_Mat_dst_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_decolor_Mat_src_Mat_grayscale_Mat_color_boost
/// Transforms a color image to a grayscale image. It is a basic tool in digital printing, stylized
/// black-and-white photograph rendering, and in many single channel image processing applications
/// @cite CL12 .
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * grayscale: Output 8-bit 1-channel image.
/// * color_boost: Output 8-bit 3-channel image.
/// 
/// This function is to be applied on color images.
pub fn decolor(src: &core::Mat, grayscale: &mut core::Mat, color_boost: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_decolor_Mat_src_Mat_grayscale_Mat_color_boost(src.as_raw_Mat(), grayscale.as_raw_Mat(), color_boost.as_raw_Mat()) }.into_result()
}

// identifier: cv_decomposeEssentialMat_Mat_E_Mat_R1_Mat_R2_Mat_t
/// Decompose an essential matrix to possible rotations and translation.
/// 
/// ## Parameters
/// * E: The input essential matrix.
/// * R1: One possible rotation matrix.
/// * R2: Another possible rotation matrix.
/// * t: One possible translation.
/// 
/// This function decompose an essential matrix E using svd decomposition @cite HartleyZ00 . Generally 4
/// possible poses exists for a given E. They are <span lang='latex'>[R_1, t]</span>, <span lang='latex'>[R_1, -t]</span>, <span lang='latex'>[R_2, t]</span>, <span lang='latex'>[R_2, -t]</span>. By
/// decomposing E, you can only get the direction of the translation, so the function returns unit t.
pub fn decompose_essential_mat(e: &core::Mat, r1: &mut core::Mat, r2: &mut core::Mat, t: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_decomposeEssentialMat_Mat_E_Mat_R1_Mat_R2_Mat_t(e.as_raw_Mat(), r1.as_raw_Mat(), r2.as_raw_Mat(), t.as_raw_Mat()) }.into_result()
}

// identifier: cv_decomposeHomographyMat_Mat_H_Mat_K_VectorOfMat_rotations_VectorOfMat_translations_VectorOfMat_normals
/// Decompose a homography matrix to rotation(s), translation(s) and plane normal(s).
/// 
/// ## Parameters
/// * H: The input homography matrix between two images.
/// * K: The input intrinsic camera calibration matrix.
/// * rotations: Array of rotation matrices.
/// * translations: Array of translation matrices.
/// * normals: Array of plane normal matrices.
/// 
/// This function extracts relative camera motion between two views observing a planar object from the
/// homography H induced by the plane. The intrinsic camera matrix K must also be provided. The function
/// may return up to four mathematical solution sets. At least two of the solutions may further be
/// invalidated if point correspondences are available by applying positive depth constraint (all points
/// must be in front of the camera). The decomposition method is described in detail in @cite Malis .
pub fn decompose_homography_mat(h: &core::Mat, k: &core::Mat, rotations: &mut types::VectorOfMat, translations: &mut types::VectorOfMat, normals: &mut types::VectorOfMat) -> Result<i32> {
    unsafe { sys::cv_core_cv_decomposeHomographyMat_Mat_H_Mat_K_VectorOfMat_rotations_VectorOfMat_translations_VectorOfMat_normals(h.as_raw_Mat(), k.as_raw_Mat(), rotations.as_raw_VectorOfMat(), translations.as_raw_VectorOfMat(), normals.as_raw_VectorOfMat()) }.into_result()
}

// identifier: cv_decomposeProjectionMatrix_Mat_projMatrix_Mat_cameraMatrix_Mat_rotMatrix_Mat_transVect_Mat_rotMatrixX_Mat_rotMatrixY_Mat_rotMatrixZ_Mat_eulerAngles
/// Decomposes a projection matrix into a rotation matrix and a camera matrix.
/// 
/// ## Parameters
/// * projMatrix: 3x4 input projection matrix P.
/// * cameraMatrix: Output 3x3 camera matrix K.
/// * rotMatrix: Output 3x3 external rotation matrix R.
/// * transVect: Output 4x1 translation vector T.
/// * rotMatrixX: Optional 3x3 rotation matrix around x-axis.
/// * rotMatrixY: Optional 3x3 rotation matrix around y-axis.
/// * rotMatrixZ: Optional 3x3 rotation matrix around z-axis.
/// * eulerAngles: Optional three-element vector containing three Euler angles of rotation in
/// degrees.
/// 
/// The function computes a decomposition of a projection matrix into a calibration and a rotation
/// matrix and the position of a camera.
/// 
/// It optionally returns three rotation matrices, one for each axis, and three Euler angles that could
/// be used in OpenGL. Note, there is always more than one sequence of rotations about the three
/// principal axes that results in the same orientation of an object, e.g. see @cite Slabaugh . Returned
/// tree rotation matrices and corresponding three Euler angles are only one of the possible solutions.
/// 
/// The function is based on RQDecomp3x3 .
///
/// ## C++ default parameters:
/// * rot_matrix_x: noArray()
/// * rot_matrix_y: noArray()
/// * rot_matrix_z: noArray()
/// * euler_angles: noArray()
pub fn decompose_projection_matrix(proj_matrix: &core::Mat, camera_matrix: &mut core::Mat, rot_matrix: &mut core::Mat, trans_vect: &mut core::Mat, rot_matrix_x: &mut core::Mat, rot_matrix_y: &mut core::Mat, rot_matrix_z: &mut core::Mat, euler_angles: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_decomposeProjectionMatrix_Mat_projMatrix_Mat_cameraMatrix_Mat_rotMatrix_Mat_transVect_Mat_rotMatrixX_Mat_rotMatrixY_Mat_rotMatrixZ_Mat_eulerAngles(proj_matrix.as_raw_Mat(), camera_matrix.as_raw_Mat(), rot_matrix.as_raw_Mat(), trans_vect.as_raw_Mat(), rot_matrix_x.as_raw_Mat(), rot_matrix_y.as_raw_Mat(), rot_matrix_z.as_raw_Mat(), euler_angles.as_raw_Mat()) }.into_result()
}

// identifier: cv_demosaicing_Mat_src_Mat_dst_int_code_int_dstCn
/// main function for all demosaicing processes
/// 
/// ## Parameters
/// * src: input image: 8-bit unsigned or 16-bit unsigned.
/// * dst: output image of the same size and depth as src.
/// * code: Color space conversion code (see the description below).
/// * dstCn: number of channels in the destination image; if the parameter is 0, the number of the
/// channels is derived automatically from src and code.
/// 
/// The function can do the following transformations:
/// 
/// *   Demosaicing using bilinear interpolation
/// 
/// #COLOR_BayerBG2BGR , #COLOR_BayerGB2BGR , #COLOR_BayerRG2BGR , #COLOR_BayerGR2BGR
/// 
/// #COLOR_BayerBG2GRAY , #COLOR_BayerGB2GRAY , #COLOR_BayerRG2GRAY , #COLOR_BayerGR2GRAY
/// 
/// *   Demosaicing using Variable Number of Gradients.
/// 
/// #COLOR_BayerBG2BGR_VNG , #COLOR_BayerGB2BGR_VNG , #COLOR_BayerRG2BGR_VNG , #COLOR_BayerGR2BGR_VNG
/// 
/// *   Edge-Aware Demosaicing.
/// 
/// #COLOR_BayerBG2BGR_EA , #COLOR_BayerGB2BGR_EA , #COLOR_BayerRG2BGR_EA , #COLOR_BayerGR2BGR_EA
/// 
/// *   Demosaicing with alpha channel
/// 
/// #COLOR_BayerBG2BGRA , #COLOR_BayerGB2BGRA , #COLOR_BayerRG2BGRA , #COLOR_BayerGR2BGRA
/// 
/// @sa cvtColor
///
/// ## C++ default parameters:
/// * dst_cn: 0
pub fn demosaicing(src: &core::Mat, dst: &mut core::Mat, code: i32, dst_cn: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_demosaicing_Mat_src_Mat_dst_int_code_int_dstCn(src.as_raw_Mat(), dst.as_raw_Mat(), code, dst_cn) }.into_result()
}

// identifier: cv_denoise_TVL1_VectorOfMat_observations_Mat_result_double_lambda_int_niters
/// Primal-dual algorithm is an algorithm for solving special types of variational problems (that is,
/// finding a function to minimize some functional). As the image denoising, in particular, may be seen
/// as the variational problem, primal-dual algorithm then can be used to perform denoising and this is
/// exactly what is implemented.
/// 
/// It should be noted, that this implementation was taken from the July 2013 blog entry
/// @cite MA13 , which also contained (slightly more general) ready-to-use source code on Python.
/// Subsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end
/// of July 2013 and finally it was slightly adapted by later authors.
/// 
/// Although the thorough discussion and justification of the algorithm involved may be found in
/// @cite ChambolleEtAl, it might make sense to skim over it here, following @cite MA13 . To begin
/// with, we consider the 1-byte gray-level images as the functions from the rectangular domain of
/// pixels (it may be seen as set
/// <span lang='latex'>\left\{(x,y)\in\mathbb{N}\times\mathbb{N}\mid 1\leq x\leq n,\;1\leq y\leq m\right\}</span> for some
/// <span lang='latex'>m,\;n\in\mathbb{N}</span>) into <span lang='latex'>\{0,1,\dots,255\}</span>. We shall denote the noised images as <span lang='latex'>f_i</span> and with
/// this view, given some image <span lang='latex'>x</span> of the same size, we may measure how bad it is by the formula
/// 
/// <div lang='latex'>\left\|\left\|\nabla x\right\|\right\| + \lambda\sum_i\left\|\left\|x-f_i\right\|\right\|</div>
/// 
/// <span lang='latex'>\|\|\cdot\|\|</span> here denotes <span lang='latex'>L_2</span>-norm and as you see, the first addend states that we want our
/// image to be smooth (ideally, having zero gradient, thus being constant) and the second states that
/// we want our result to be close to the observations we've got. If we treat <span lang='latex'>x</span> as a function, this is
/// exactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play.
/// 
/// ## Parameters
/// * observations: This array should contain one or more noised versions of the image that is to
/// be restored.
/// * result: Here the denoised image will be stored. There is no need to do pre-allocation of
/// storage space, as it will be automatically allocated, if necessary.
/// * lambda: Corresponds to <span lang='latex'>\lambda</span> in the formulas above. As it is enlarged, the smooth
/// (blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly
/// speaking, as it becomes smaller, the result will be more blur but more sever outliers will be
/// removed.
/// * niters: Number of iterations that the algorithm will run. Of course, as more iterations as
/// better, but it is hard to quantitatively refine this statement, so just use the default and
/// increase it if the results are poor.
///
/// ## C++ default parameters:
/// * lambda: 1.0
/// * niters: 30
pub fn denoise_tvl1(observations: &types::VectorOfMat, result: &core::Mat, lambda: f64, niters: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_denoise_TVL1_VectorOfMat_observations_Mat_result_double_lambda_int_niters(observations.as_raw_VectorOfMat(), result.as_raw_Mat(), lambda, niters) }.into_result()
}

// identifier: cv_destroyAllWindows
/// Destroys all of the HighGUI windows.
/// 
/// The function destroyAllWindows destroys all of the opened HighGUI windows.
pub fn destroy_all_windows() -> Result<()> {
    unsafe { sys::cv_core_cv_destroyAllWindows() }.into_result()
}

// identifier: cv_destroyWindow_String_winname
/// Destroys the specified window.
/// 
/// The function destroyWindow destroys the window with the given name.
/// 
/// ## Parameters
/// * winname: Name of the window to be destroyed.
pub fn destroy_window(winname: &str) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_destroyWindow_String_winname(winname.as_ptr()) }.into_result()
}

// identifier: cv_detailEnhance_Mat_src_Mat_dst_float_sigma_s_float_sigma_r
/// This filter enhances the details of a particular image.
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * dst: Output image with the same size and type as src.
/// * sigma_s: Range between 0 to 200.
/// * sigma_r: Range between 0 to 1.
///
/// ## C++ default parameters:
/// * sigma_s: 10
/// * sigma_r: 0.15f
pub fn detail_enhance(src: &core::Mat, dst: &mut core::Mat, sigma_s: f32, sigma_r: f32) -> Result<()> {
    unsafe { sys::cv_core_cv_detailEnhance_Mat_src_Mat_dst_float_sigma_s_float_sigma_r(src.as_raw_Mat(), dst.as_raw_Mat(), sigma_s, sigma_r) }.into_result()
}

// identifier: cv_detectQRCode_Mat_in_VectorOfPoint_points_double_eps_x_double_eps_y
/// Detect QR code in image and return minimum area of quadrangle that describes QR code.
/// ## Parameters
/// * in:  Matrix of the type CV_8UC1 containing an image where QR code are detected.
/// * points: Output vector of vertices of a quadrangle of minimal area that describes QR code.
/// * eps_x: Epsilon neighborhood, which allows you to determine the horizontal pattern of the scheme 1:1:3:1:1 according to QR code standard.
/// * eps_y: Epsilon neighborhood, which allows you to determine the vertical pattern of the scheme 1:1:3:1:1 according to QR code standard.
///
/// ## C++ default parameters:
/// * eps_x: 0.2
/// * eps_y: 0.1
pub fn detect_qr_code(_in: &core::Mat, points: &types::VectorOfPoint, eps_x: f64, eps_y: f64) -> Result<bool> {
    unsafe { sys::cv_core_cv_detectQRCode_Mat_in_VectorOfPoint_points_double_eps_x_double_eps_y(_in.as_raw_Mat(), points.as_raw_VectorOfPoint(), eps_x, eps_y) }.into_result()
}

// identifier: cv_determinant_Mat_mtx
/// Returns the determinant of a square floating-point matrix.
/// 
/// The function cv::determinant calculates and returns the determinant of the
/// specified matrix. For small matrices ( mtx.cols=mtx.rows\<=3 ), the
/// direct method is used. For larger matrices, the function uses LU
/// factorization with partial pivoting.
/// 
/// For symmetric positively-determined matrices, it is also possible to use
/// eigen decomposition to calculate the determinant.
/// ## Parameters
/// * mtx: input matrix that must have CV_32FC1 or CV_64FC1 type and
/// square size.
/// @sa trace, invert, solve, eigen, @ref MatrixExpressions
pub fn determinant(mtx: &core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_determinant_Mat_mtx(mtx.as_raw_Mat()) }.into_result()
}

// identifier: cv_dft_Mat_src_Mat_dst_int_flags_int_nonzeroRows
/// Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating-point array.
/// 
/// The function cv::dft performs one of the following:
/// *   Forward the Fourier transform of a 1D vector of N elements:
/// <div lang='latex'>Y = F^{(N)}  \cdot X,</div>
/// where <span lang='latex'>F^{(N)}_{jk}=\exp(-2\pi i j k/N)</span> and <span lang='latex'>i=\sqrt{-1}</span>
/// *   Inverse the Fourier transform of a 1D vector of N elements:
/// <div lang='latex'>\begin{array}{l} X'=  \left (F^{(N)} \right )^{-1}  \cdot Y =  \left (F^{(N)} \right )^*  \cdot y  \\ X = (1/N)  \cdot X, \end{array}</div>
/// where <span lang='latex'>F^*=\left(\textrm{Re}(F^{(N)})-\textrm{Im}(F^{(N)})\right)^T</span>
/// *   Forward the 2D Fourier transform of a M x N matrix:
/// <div lang='latex'>Y = F^{(M)}  \cdot X  \cdot F^{(N)}</div>
/// *   Inverse the 2D Fourier transform of a M x N matrix:
/// <div lang='latex'>\begin{array}{l} X'=  \left (F^{(M)} \right )^*  \cdot Y  \cdot \left (F^{(N)} \right )^* \\ X =  \frac{1}{M \cdot N} \cdot X' \end{array}</div>
/// 
/// In case of real (single-channel) data, the output spectrum of the forward Fourier transform or input
/// spectrum of the inverse Fourier transform can be represented in a packed format called *CCS*
/// (complex-conjugate-symmetrical). It was borrowed from IPL (Intel\* Image Processing Library). Here
/// is how 2D *CCS* spectrum looks:
/// <div lang='latex'>\begin{bmatrix} Re Y_{0,0} & Re Y_{0,1} & Im Y_{0,1} & Re Y_{0,2} & Im Y_{0,2} &  \cdots & Re Y_{0,N/2-1} & Im Y_{0,N/2-1} & Re Y_{0,N/2}  \\ Re Y_{1,0} & Re Y_{1,1} & Im Y_{1,1} & Re Y_{1,2} & Im Y_{1,2} &  \cdots & Re Y_{1,N/2-1} & Im Y_{1,N/2-1} & Re Y_{1,N/2}  \\ Im Y_{1,0} & Re Y_{2,1} & Im Y_{2,1} & Re Y_{2,2} & Im Y_{2,2} &  \cdots & Re Y_{2,N/2-1} & Im Y_{2,N/2-1} & Im Y_{1,N/2}  \\ \hdotsfor{9} \\ Re Y_{M/2-1,0} &  Re Y_{M-3,1}  & Im Y_{M-3,1} &  \hdotsfor{3} & Re Y_{M-3,N/2-1} & Im Y_{M-3,N/2-1}& Re Y_{M/2-1,N/2}  \\ Im Y_{M/2-1,0} &  Re Y_{M-2,1}  & Im Y_{M-2,1} &  \hdotsfor{3} & Re Y_{M-2,N/2-1} & Im Y_{M-2,N/2-1}& Im Y_{M/2-1,N/2}  \\ Re Y_{M/2,0}  &  Re Y_{M-1,1} &  Im Y_{M-1,1} &  \hdotsfor{3} & Re Y_{M-1,N/2-1} & Im Y_{M-1,N/2-1}& Re Y_{M/2,N/2} \end{bmatrix}</div>
/// 
/// In case of 1D transform of a real vector, the output looks like the first row of the matrix above.
/// 
/// So, the function chooses an operation mode depending on the flags and size of the input array:
/// *   If #DFT_ROWS is set or the input array has a single row or single column, the function
/// performs a 1D forward or inverse transform of each row of a matrix when #DFT_ROWS is set.
/// Otherwise, it performs a 2D transform.
/// *   If the input array is real and #DFT_INVERSE is not set, the function performs a forward 1D or
/// 2D transform:
/// *   When #DFT_COMPLEX_OUTPUT is set, the output is a complex matrix of the same size as
/// input.
/// *   When #DFT_COMPLEX_OUTPUT is not set, the output is a real matrix of the same size as
/// input. In case of 2D transform, it uses the packed format as shown above. In case of a
/// single 1D transform, it looks like the first row of the matrix above. In case of
/// multiple 1D transforms (when using the #DFT_ROWS flag), each row of the output matrix
/// looks like the first row of the matrix above.
/// *   If the input array is complex and either #DFT_INVERSE or #DFT_REAL_OUTPUT are not set, the
/// output is a complex array of the same size as input. The function performs a forward or
/// inverse 1D or 2D transform of the whole input array or each row of the input array
/// independently, depending on the flags DFT_INVERSE and DFT_ROWS.
/// *   When #DFT_INVERSE is set and the input array is real, or it is complex but #DFT_REAL_OUTPUT
/// is set, the output is a real array of the same size as input. The function performs a 1D or 2D
/// inverse transformation of the whole input array or each individual row, depending on the flags
/// #DFT_INVERSE and #DFT_ROWS.
/// 
/// If #DFT_SCALE is set, the scaling is done after the transformation.
/// 
/// Unlike dct , the function supports arrays of arbitrary size. But only those arrays are processed
/// efficiently, whose sizes can be factorized in a product of small prime numbers (2, 3, and 5 in the
/// current implementation). Such an efficient DFT size can be calculated using the getOptimalDFTSize
/// method.
/// 
/// The sample below illustrates how to calculate a DFT-based convolution of two 2D real arrays:
/// ```ignore
/// void convolveDFT(InputArray A, InputArray B, OutputArray C)
/// {
/// // reallocate the output array if needed
/// C.create(abs(A.rows - B.rows)+1, abs(A.cols - B.cols)+1, A.type());
/// Size dftSize;
/// // calculate the size of DFT transform
/// dftSize.width = getOptimalDFTSize(A.cols + B.cols - 1);
/// dftSize.height = getOptimalDFTSize(A.rows + B.rows - 1);
/// 
/// // allocate temporary buffers and initialize them with 0's
/// Mat tempA(dftSize, A.type(), Scalar::all(0));
/// Mat tempB(dftSize, B.type(), Scalar::all(0));
/// 
/// // copy A and B to the top-left corners of tempA and tempB, respectively
/// Mat roiA(tempA, Rect(0,0,A.cols,A.rows));
/// A.copyTo(roiA);
/// Mat roiB(tempB, Rect(0,0,B.cols,B.rows));
/// B.copyTo(roiB);
/// 
/// // now transform the padded A & B in-place;
/// // use "nonzeroRows" hint for faster processing
/// dft(tempA, tempA, 0, A.rows);
/// dft(tempB, tempB, 0, B.rows);
/// 
/// // multiply the spectrums;
/// // the function handles packed spectrum representations well
/// mulSpectrums(tempA, tempB, tempA);
/// 
/// // transform the product back from the frequency domain.
/// // Even though all the result rows will be non-zero,
/// // you need only the first C.rows of them, and thus you
/// // pass nonzeroRows == C.rows
/// dft(tempA, tempA, DFT_INVERSE + DFT_SCALE, C.rows);
/// 
/// // now copy the result back to C.
/// tempA(Rect(0, 0, C.cols, C.rows)).copyTo(C);
/// 
/// // all the temporary buffers will be deallocated automatically
/// }
/// ```
/// 
/// To optimize this sample, consider the following approaches:
/// *   Since nonzeroRows != 0 is passed to the forward transform calls and since A and B are copied to
/// the top-left corners of tempA and tempB, respectively, it is not necessary to clear the whole
/// tempA and tempB. It is only necessary to clear the tempA.cols - A.cols ( tempB.cols - B.cols)
/// rightmost columns of the matrices.
/// *   This DFT-based convolution does not have to be applied to the whole big arrays, especially if B
/// is significantly smaller than A or vice versa. Instead, you can calculate convolution by parts.
/// To do this, you need to split the output array C into multiple tiles. For each tile, estimate
/// which parts of A and B are required to calculate convolution in this tile. If the tiles in C are
/// too small, the speed will decrease a lot because of repeated work. In the ultimate case, when
/// each tile in C is a single pixel, the algorithm becomes equivalent to the naive convolution
/// algorithm. If the tiles are too big, the temporary arrays tempA and tempB become too big and
/// there is also a slowdown because of bad cache locality. So, there is an optimal tile size
/// somewhere in the middle.
/// *   If different tiles in C can be calculated in parallel and, thus, the convolution is done by
/// parts, the loop can be threaded.
/// 
/// All of the above improvements have been implemented in #matchTemplate and #filter2D . Therefore, by
/// using them, you can get the performance even better than with the above theoretically optimal
/// implementation. Though, those two functions actually calculate cross-correlation, not convolution,
/// so you need to "flip" the second convolution operand B vertically and horizontally using flip .
/// 
/// Note:
/// *   An example using the discrete fourier transform can be found at
/// opencv_source_code/samples/cpp/dft.cpp
/// *   (Python) An example using the dft functionality to perform Wiener deconvolution can be found
/// at opencv_source/samples/python/deconvolution.py
/// *   (Python) An example rearranging the quadrants of a Fourier image can be found at
/// opencv_source/samples/python/dft.py
/// ## Parameters
/// * src: input array that could be real or complex.
/// * dst: output array whose size and type depends on the flags .
/// * flags: transformation flags, representing a combination of the #DftFlags
/// * nonzeroRows: when the parameter is not zero, the function assumes that only the first
/// nonzeroRows rows of the input array (#DFT_INVERSE is not set) or only the first nonzeroRows of the
/// output array (#DFT_INVERSE is set) contain non-zeros, thus, the function can handle the rest of the
/// rows more efficiently and save some time; this technique is very useful for calculating array
/// cross-correlation or convolution using DFT.
/// @sa dct , getOptimalDFTSize , mulSpectrums, filter2D , matchTemplate , flip , cartToPolar ,
/// magnitude , phase
///
/// ## C++ default parameters:
/// * flags: 0
/// * nonzero_rows: 0
pub fn dft(src: &core::Mat, dst: &mut core::Mat, flags: i32, nonzero_rows: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_dft_Mat_src_Mat_dst_int_flags_int_nonzeroRows(src.as_raw_Mat(), dst.as_raw_Mat(), flags, nonzero_rows) }.into_result()
}

// identifier: cv_dilate_Mat_src_Mat_dst_Mat_kernel_Point_anchor_int_iterations_int_borderType_Scalar_borderValue
/// Dilates an image by using a specific structuring element.
/// 
/// The function dilates the source image using the specified structuring element that determines the
/// shape of a pixel neighborhood over which the maximum is taken:
/// <div lang='latex'>\texttt{dst} (x,y) =  \max _{(x',y'):  \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')</div>
/// 
/// The function supports the in-place mode. Dilation can be applied several ( iterations ) times. In
/// case of multi-channel images, each channel is processed independently.
/// 
/// ## Parameters
/// * src: input image; the number of channels can be arbitrary, but the depth should be one of
/// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
/// * dst: output image of the same size and type as src.
/// * kernel: structuring element used for dilation; if elemenat=Mat(), a 3 x 3 rectangular
/// structuring element is used. Kernel can be created using #getStructuringElement
/// * anchor: position of the anchor within the element; default value (-1, -1) means that the
/// anchor is at the element center.
/// * iterations: number of times dilation is applied.
/// * borderType: pixel extrapolation method, see #BorderTypes
/// * borderValue: border value in case of a constant border
/// @sa  erode, morphologyEx, getStructuringElement
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
/// * iterations: 1
/// * border_type: BORDER_CONSTANT
/// * border_value: morphologyDefaultBorderValue()
pub fn dilate(src: &core::Mat, dst: &mut core::Mat, kernel: &core::Mat, anchor: core::Point, iterations: i32, border_type: i32, border_value: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_dilate_Mat_src_Mat_dst_Mat_kernel_Point_anchor_int_iterations_int_borderType_Scalar_borderValue(src.as_raw_Mat(), dst.as_raw_Mat(), kernel.as_raw_Mat(), anchor, iterations, border_type, border_value) }.into_result()
}

// identifier: cv_directx_getTypeFromD3DFORMAT_int_iD3DFORMAT
pub fn get_type_from_d3_dformat(i_d3_dformat: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_directx_getTypeFromD3DFORMAT_int_iD3DFORMAT(i_d3_dformat) }.into_result()
}

// identifier: cv_directx_getTypeFromDXGI_FORMAT_int_iDXGI_FORMAT
pub fn get_type_from_dxgi_format(i_dxgi_format: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_directx_getTypeFromDXGI_FORMAT_int_iDXGI_FORMAT(i_dxgi_format) }.into_result()
}

// identifier: cv_displayOverlay_String_winname_String_text_int_delayms
/// Displays a text on a window image as an overlay for a specified duration.
/// 
/// The function displayOverlay displays useful information/tips on top of the window for a certain
/// amount of time *delayms*. The function does not modify the image, displayed in the window, that is,
/// after the specified delay the original content of the window is restored.
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * text: Overlay text to write on a window image.
/// * delayms: The period (in milliseconds), during which the overlay text is displayed. If this
/// function is called before the previous overlay text timed out, the timer is restarted and the text
/// is updated. If this value is zero, the text never disappears.
///
/// ## C++ default parameters:
/// * delayms: 0
pub fn display_overlay(winname: &str, text: &str, delayms: i32) -> Result<()> {
    string_arg!(winname);
    string_arg!(text);
    unsafe { sys::cv_core_cv_displayOverlay_String_winname_String_text_int_delayms(winname.as_ptr(), text.as_ptr(), delayms) }.into_result()
}

// identifier: cv_displayStatusBar_String_winname_String_text_int_delayms
/// Displays a text on the window statusbar during the specified period of time.
/// 
/// The function displayStatusBar displays useful information/tips on top of the window for a certain
/// amount of time *delayms* . This information is displayed on the window statusbar (the window must be
/// created with the CV_GUI_EXPANDED flags).
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * text: Text to write on the window statusbar.
/// * delayms: Duration (in milliseconds) to display the text. If this function is called before
/// the previous text timed out, the timer is restarted and the text is updated. If this value is
/// zero, the text never disappears.
///
/// ## C++ default parameters:
/// * delayms: 0
pub fn display_status_bar(winname: &str, text: &str, delayms: i32) -> Result<()> {
    string_arg!(winname);
    string_arg!(text);
    unsafe { sys::cv_core_cv_displayStatusBar_String_winname_String_text_int_delayms(winname.as_ptr(), text.as_ptr(), delayms) }.into_result()
}

// identifier: cv_distanceTransform_Mat_src_Mat_dst_Mat_labels_int_distanceType_int_maskSize_int_labelType
/// Calculates the distance to the closest zero pixel for each pixel of the source image.
/// 
/// The function cv::distanceTransform calculates the approximate or precise distance from every binary
/// image pixel to the nearest zero pixel. For zero image pixels, the distance will obviously be zero.
/// 
/// When maskSize == #DIST_MASK_PRECISE and distanceType == #DIST_L2 , the function runs the
/// algorithm described in @cite Felzenszwalb04 . This algorithm is parallelized with the TBB library.
/// 
/// In other cases, the algorithm @cite Borgefors86 is used. This means that for a pixel the function
/// finds the shortest path to the nearest zero pixel consisting of basic shifts: horizontal, vertical,
/// diagonal, or knight's move (the latest is available for a <span lang='latex'>5\times 5</span> mask). The overall
/// distance is calculated as a sum of these basic distances. Since the distance function should be
/// symmetric, all of the horizontal and vertical shifts must have the same cost (denoted as a ), all
/// the diagonal shifts must have the same cost (denoted as `b`), and all knight's moves must have the
/// same cost (denoted as `c`). For the #DIST_C and #DIST_L1 types, the distance is calculated
/// precisely, whereas for #DIST_L2 (Euclidean distance) the distance can be calculated only with a
/// relative error (a <span lang='latex'>5\times 5</span> mask gives more accurate results). For `a`,`b`, and `c`, OpenCV
/// uses the values suggested in the original paper:
/// - DIST_L1: `a = 1, b = 2`
/// - DIST_L2:
/// - `3 x 3`: `a=0.955, b=1.3693`
/// - `5 x 5`: `a=1, b=1.4, c=2.1969`
/// - DIST_C: `a = 1, b = 1`
/// 
/// Typically, for a fast, coarse distance estimation #DIST_L2, a <span lang='latex'>3\times 3</span> mask is used. For a
/// more accurate distance estimation #DIST_L2, a <span lang='latex'>5\times 5</span> mask or the precise algorithm is used.
/// Note that both the precise and the approximate algorithms are linear on the number of pixels.
/// 
/// This variant of the function does not only compute the minimum distance for each pixel <span lang='latex'>(x, y)</span>
/// but also identifies the nearest connected component consisting of zero pixels
/// (labelType==#DIST_LABEL_CCOMP) or the nearest zero pixel (labelType==#DIST_LABEL_PIXEL). Index of the
/// component/pixel is stored in `labels(x, y)`. When labelType==#DIST_LABEL_CCOMP, the function
/// automatically finds connected components of zero pixels in the input image and marks them with
/// distinct labels. When labelType==#DIST_LABEL_CCOMP, the function scans through the input image and
/// marks all the zero pixels with distinct labels.
/// 
/// In this mode, the complexity is still linear. That is, the function provides a very fast way to
/// compute the Voronoi diagram for a binary image. Currently, the second variant can use only the
/// approximate distance transform algorithm, i.e. maskSize=#DIST_MASK_PRECISE is not supported
/// yet.
/// 
/// ## Parameters
/// * src: 8-bit, single-channel (binary) source image.
/// * dst: Output image with calculated distances. It is a 8-bit or 32-bit floating-point,
/// single-channel image of the same size as src.
/// * labels: Output 2D array of labels (the discrete Voronoi diagram). It has the type
/// CV_32SC1 and the same size as src.
/// * distanceType: Type of distance, see #DistanceTypes
/// * maskSize: Size of the distance transform mask, see #DistanceTransformMasks.
/// #DIST_MASK_PRECISE is not supported by this variant. In case of the #DIST_L1 or #DIST_C distance type,
/// the parameter is forced to 3 because a <span lang='latex'>3\times 3</span> mask gives the same result as \f$5\times
/// 5\f$ or any larger aperture.
/// * labelType: Type of the label array to build, see #DistanceTransformLabelTypes.
///
/// ## C++ default parameters:
/// * label_type: DIST_LABEL_CCOMP
pub fn distance_transform_labels(src: &core::Mat, dst: &mut core::Mat, labels: &mut core::Mat, distance_type: i32, mask_size: i32, label_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_distanceTransform_Mat_src_Mat_dst_Mat_labels_int_distanceType_int_maskSize_int_labelType(src.as_raw_Mat(), dst.as_raw_Mat(), labels.as_raw_Mat(), distance_type, mask_size, label_type) }.into_result()
}

// identifier: cv_distanceTransform_Mat_src_Mat_dst_int_distanceType_int_maskSize_int_dstType
/// @overload
/// ## Parameters
/// * src: 8-bit, single-channel (binary) source image.
/// * dst: Output image with calculated distances. It is a 8-bit or 32-bit floating-point,
/// single-channel image of the same size as src .
/// * distanceType: Type of distance, see #DistanceTypes
/// * maskSize: Size of the distance transform mask, see #DistanceTransformMasks. In case of the
/// #DIST_L1 or #DIST_C distance type, the parameter is forced to 3 because a <span lang='latex'>3\times 3</span> mask gives
/// the same result as <span lang='latex'>5\times 5</span> or any larger aperture.
/// * dstType: Type of output image. It can be CV_8U or CV_32F. Type CV_8U can be used only for
/// the first variant of the function and distanceType == #DIST_L1.
///
/// ## C++ default parameters:
/// * dst_type: CV_32F
pub fn distance_transform(src: &core::Mat, dst: &mut core::Mat, distance_type: i32, mask_size: i32, dst_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_distanceTransform_Mat_src_Mat_dst_int_distanceType_int_maskSize_int_dstType(src.as_raw_Mat(), dst.as_raw_Mat(), distance_type, mask_size, dst_type) }.into_result()
}

// identifier: cv_divUp_int_a_unsigned_int_b
/// Integer division with result round up.
/// 
/// Use this function instead of `ceil((float)a / b)` expressions.
/// 
/// @sa alignSize
pub fn div_up(a: i32, b: u32) -> Result<i32> {
    unsafe { sys::cv_core_cv_divUp_int_a_unsigned_int_b(a, b) }.into_result()
}

// identifier: cv_divUp_size_t_a_unsigned_int_b
/// @overload
pub fn div_up_1(a: size_t, b: u32) -> Result<size_t> {
    unsafe { sys::cv_core_cv_divUp_size_t_a_unsigned_int_b(a, b) }.into_result()
}

// identifier: cv_divide_Mat_src1_Mat_src2_Mat_dst_double_scale_int_dtype
/// Performs per-element division of two arrays or a scalar by an array.
/// 
/// The function cv::divide divides one array by another:
/// <div lang='latex'>\texttt{dst(I) = saturate(src1(I)*scale/src2(I))}</div>
/// or a scalar by an array when there is no src1 :
/// <div lang='latex'>\texttt{dst(I) = saturate(scale/src2(I))}</div>
/// 
/// When src2(I) is zero, dst(I) will also be zero. Different channels of
/// multi-channel arrays are processed independently.
/// 
/// 
/// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get
/// result of an incorrect sign in the case of overflow.
/// ## Parameters
/// * src1: first input array.
/// * src2: second input array of the same size and type as src1.
/// * scale: scalar factor.
/// * dst: output array of the same size and type as src2.
/// * dtype: optional depth of the output array; if -1, dst will have depth src2.depth(), but in
/// case of an array-by-array division, you can only pass -1 when src1.depth()==src2.depth().
/// @sa  multiply, add, subtract
///
/// ## C++ default parameters:
/// * scale: 1
/// * dtype: -1
pub fn divide_mat(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, scale: f64, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_divide_Mat_src1_Mat_src2_Mat_dst_double_scale_int_dtype(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), scale, dtype) }.into_result()
}

// identifier: cv_divide_double_scale_Mat_src2_Mat_dst_int_dtype
/// @overload
///
/// ## C++ default parameters:
/// * dtype: -1
pub fn divide(scale: f64, src2: &core::Mat, dst: &mut core::Mat, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_divide_double_scale_Mat_src2_Mat_dst_int_dtype(scale, src2.as_raw_Mat(), dst.as_raw_Mat(), dtype) }.into_result()
}

// identifier: cv_dnn_NMSBoxes_VectorOfRect2d_bboxes_VectorOffloat_scores_float_score_threshold_float_nms_threshold_VectorOfint_indices_float_eta_int_top_k
///
/// ## C++ default parameters:
/// * eta: 1.f
/// * top_k: 0
pub fn nms_boxes_rotated_f64(bboxes: &types::VectorOfRect2d, scores: &types::VectorOffloat, score_threshold: f32, nms_threshold: f32, indices: &types::VectorOfint, eta: f32, top_k: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_dnn_NMSBoxes_VectorOfRect2d_bboxes_VectorOffloat_scores_float_score_threshold_float_nms_threshold_VectorOfint_indices_float_eta_int_top_k(bboxes.as_raw_VectorOfRect2d(), scores.as_raw_VectorOffloat(), score_threshold, nms_threshold, indices.as_raw_VectorOfint(), eta, top_k) }.into_result()
}

// identifier: cv_dnn_NMSBoxes_VectorOfRect_bboxes_VectorOffloat_scores_float_score_threshold_float_nms_threshold_VectorOfint_indices_float_eta_int_top_k
/// Performs non maximum suppression given boxes and corresponding scores.
/// 
/// ## Parameters
/// * bboxes: a set of bounding boxes to apply NMS.
/// * scores: a set of corresponding confidences.
/// * score_threshold: a threshold used to filter boxes by score.
/// * nms_threshold: a threshold used in non maximum suppression.
/// * indices: the kept indices of bboxes after NMS.
/// * eta: a coefficient in adaptive threshold formula: <span lang='latex'>nms\_threshold_{i+1}=eta\cdot nms\_threshold_i</span>.
/// * top_k: if `>0`, keep at most @p top_k picked indices.
///
/// ## C++ default parameters:
/// * eta: 1.f
/// * top_k: 0
pub fn nms_boxes(bboxes: &types::VectorOfRect, scores: &types::VectorOffloat, score_threshold: f32, nms_threshold: f32, indices: &types::VectorOfint, eta: f32, top_k: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_dnn_NMSBoxes_VectorOfRect_bboxes_VectorOffloat_scores_float_score_threshold_float_nms_threshold_VectorOfint_indices_float_eta_int_top_k(bboxes.as_raw_VectorOfRect(), scores.as_raw_VectorOffloat(), score_threshold, nms_threshold, indices.as_raw_VectorOfint(), eta, top_k) }.into_result()
}

// identifier: cv_dnn_NMSBoxes_VectorOfRotatedRect_bboxes_VectorOffloat_scores_float_score_threshold_float_nms_threshold_VectorOfint_indices_float_eta_int_top_k
///
/// ## C++ default parameters:
/// * eta: 1.f
/// * top_k: 0
pub fn nms_boxes_rotated(bboxes: &types::VectorOfRotatedRect, scores: &types::VectorOffloat, score_threshold: f32, nms_threshold: f32, indices: &types::VectorOfint, eta: f32, top_k: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_dnn_NMSBoxes_VectorOfRotatedRect_bboxes_VectorOffloat_scores_float_score_threshold_float_nms_threshold_VectorOfint_indices_float_eta_int_top_k(bboxes.as_raw_VectorOfRotatedRect(), scores.as_raw_VectorOffloat(), score_threshold, nms_threshold, indices.as_raw_VectorOfint(), eta, top_k) }.into_result()
}

// identifier: cv_dnn_blobFromImage_Mat_image_Mat_blob_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth
/// Creates 4-dimensional blob from image.
///  @details This is an overloaded member function, provided for convenience.
///           It differs from the above function only in what argument(s) it accepts.
///
/// ## C++ default parameters:
/// * scalefactor: 1.0
/// * size: Size()
/// * mean: Scalar()
/// * swap_rb: false
/// * crop: false
/// * ddepth: CV_32F
pub fn blob_from_image(image: &core::Mat, blob: &mut core::Mat, scalefactor: f64, size: core::Size, mean: core::Scalar, swap_rb: bool, crop: bool, ddepth: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_dnn_blobFromImage_Mat_image_Mat_blob_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth(image.as_raw_Mat(), blob.as_raw_Mat(), scalefactor, size, mean, swap_rb, crop, ddepth) }.into_result()
}

// identifier: cv_dnn_blobFromImage_Mat_image_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth
/// Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center,
///  subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.
/// ## Parameters
/// * image: input image (with 1-, 3- or 4-channels).
/// * size: spatial size for output image
/// * mean: scalar with mean values which are subtracted from channels. Values are intended
///  to be in (mean-R, mean-G, mean-B) order if @p image has BGR ordering and @p swapRB is true.
/// * scalefactor: multiplier for @p image values.
/// * swapRB: flag which indicates that swap first and last channels
///  in 3-channel image is necessary.
/// * crop: flag which indicates whether image will be cropped after resize or not
/// * ddepth: Depth of output blob. Choose CV_32F or CV_8U.
///  @details if @p crop is true, input image is resized so one side after resize is equal to corresponding
///  dimension in @p size and another one is equal or larger. Then, crop from the center is performed.
///  If @p crop is false, direct resize without cropping and preserving aspect ratio is performed.
///  @returns 4-dimensional Mat with NCHW dimensions order.
///
/// ## C++ default parameters:
/// * scalefactor: 1.0
/// * size: Size()
/// * mean: Scalar()
/// * swap_rb: false
/// * crop: false
/// * ddepth: CV_32F
pub fn blob_from_image_1(image: &core::Mat, scalefactor: f64, size: core::Size, mean: core::Scalar, swap_rb: bool, crop: bool, ddepth: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_dnn_blobFromImage_Mat_image_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth(image.as_raw_Mat(), scalefactor, size, mean, swap_rb, crop, ddepth) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_blobFromImages_VectorOfMat_images_Mat_blob_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth
/// Creates 4-dimensional blob from series of images.
///  @details This is an overloaded member function, provided for convenience.
///           It differs from the above function only in what argument(s) it accepts.
///
/// ## C++ default parameters:
/// * scalefactor: 1.0
/// * size: Size()
/// * mean: Scalar()
/// * swap_rb: false
/// * crop: false
/// * ddepth: CV_32F
pub fn blob_from_images(images: &types::VectorOfMat, blob: &mut core::Mat, scalefactor: f64, size: core::Size, mean: core::Scalar, swap_rb: bool, crop: bool, ddepth: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_dnn_blobFromImages_VectorOfMat_images_Mat_blob_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth(images.as_raw_VectorOfMat(), blob.as_raw_Mat(), scalefactor, size, mean, swap_rb, crop, ddepth) }.into_result()
}

// identifier: cv_dnn_blobFromImages_VectorOfMat_images_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth
/// Creates 4-dimensional blob from series of images. Optionally resizes and
///  crops @p images from center, subtract @p mean values, scales values by @p scalefactor,
///  swap Blue and Red channels.
/// ## Parameters
/// * images: input images (all with 1-, 3- or 4-channels).
/// * size: spatial size for output image
/// * mean: scalar with mean values which are subtracted from channels. Values are intended
///  to be in (mean-R, mean-G, mean-B) order if @p image has BGR ordering and @p swapRB is true.
/// * scalefactor: multiplier for @p images values.
/// * swapRB: flag which indicates that swap first and last channels
///  in 3-channel image is necessary.
/// * crop: flag which indicates whether image will be cropped after resize or not
/// * ddepth: Depth of output blob. Choose CV_32F or CV_8U.
///  @details if @p crop is true, input image is resized so one side after resize is equal to corresponding
///  dimension in @p size and another one is equal or larger. Then, crop from the center is performed.
///  If @p crop is false, direct resize without cropping and preserving aspect ratio is performed.
///  @returns 4-dimensional Mat with NCHW dimensions order.
///
/// ## C++ default parameters:
/// * scalefactor: 1.0
/// * size: Size()
/// * mean: Scalar()
/// * swap_rb: false
/// * crop: false
/// * ddepth: CV_32F
pub fn blob_from_images_1(images: &types::VectorOfMat, scalefactor: f64, size: core::Size, mean: core::Scalar, swap_rb: bool, crop: bool, ddepth: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_dnn_blobFromImages_VectorOfMat_images_double_scalefactor_Size_size_Scalar_mean_bool_swapRB_bool_crop_int_ddepth(images.as_raw_VectorOfMat(), scalefactor, size, mean, swap_rb, crop, ddepth) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_clamp_Range_r_int_axisSize
pub fn clamp(r: &core::Range, axis_size: i32) -> Result<core::Range> {
    unsafe { sys::cv_core_cv_dnn_clamp_Range_r_int_axisSize(r.as_raw_Range(), axis_size) }.into_result().map(|x| core::Range { ptr: x })
}

// identifier: cv_dnn_clamp_int_ax_int_dims
pub fn clamp_1(ax: i32, dims: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_dnn_clamp_int_ax_int_dims(ax, dims) }.into_result()
}

// identifier: cv_dnn_getPlane_Mat_m_int_n_int_cn
pub fn get_plane(m: &core::Mat, n: i32, cn: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_dnn_getPlane_Mat_m_int_n_int_cn(m.as_raw_Mat(), n, cn) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_imagesFromBlob_Mat_blob__VectorOfMat_images_
/// Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure
///  (std::vector<cv::Mat>).
/// ## Parameters
///  @param[in] blob_ 4 dimensional array (images, channels, height, width) in floating point precision (CV_32F) from
///  which you would like to extract the images.
///  @param[out] images_ array of 2D Mat containing the images extracted from the blob in floating point precision
///  (CV_32F). They are non normalized neither mean added. The number of returned images equals the first dimension
///  of the blob (batch size). Every image has a number of channels equals to the second dimension of the blob (depth).
pub fn images_from_blob(blob_: &core::Mat, images_: &mut types::VectorOfMat) -> Result<()> {
    unsafe { sys::cv_core_cv_dnn_imagesFromBlob_Mat_blob__VectorOfMat_images_(blob_.as_raw_Mat(), images_.as_raw_VectorOfMat()) }.into_result()
}

// identifier: cv_dnn_readNetFromCaffe_String_prototxt_String_caffeModel
/// Reads a network model stored in <a href="http://caffe.berkeleyvision.org">Caffe</a> framework's format.
/// ## Parameters
/// * prototxt:   path to the .prototxt file with text description of the network architecture.
/// * caffeModel: path to the .caffemodel file with learned network.
/// @returns Net object.
///
/// ## C++ default parameters:
/// * caffe_model: String()
pub fn read_net_from_caffe(prototxt: &str, caffe_model: &str) -> Result<core::Net> {
    string_arg!(prototxt);
    string_arg!(caffe_model);
    unsafe { sys::cv_core_cv_dnn_readNetFromCaffe_String_prototxt_String_caffeModel(prototxt.as_ptr(), caffe_model.as_ptr()) }.into_result()
}

// identifier: cv_dnn_readNetFromCaffe_VectorOfuchar_bufferProto_VectorOfuchar_bufferModel
/// Reads a network model stored in Caffe model in memory.
/// ## Parameters
/// * bufferProto: buffer containing the content of the .prototxt file
/// * bufferModel: buffer containing the content of the .caffemodel file
/// @returns Net object.
///
/// ## C++ default parameters:
/// * buffer_model: std::vector<uchar>()
pub fn read_net_from_caffe_1(buffer_proto: &types::VectorOfuchar, buffer_model: &types::VectorOfuchar) -> Result<core::Net> {
    unsafe { sys::cv_core_cv_dnn_readNetFromCaffe_VectorOfuchar_bufferProto_VectorOfuchar_bufferModel(buffer_proto.as_raw_VectorOfuchar(), buffer_model.as_raw_VectorOfuchar()) }.into_result()
}

// identifier: cv_dnn_readNetFromCaffe_const_char_X_bufferProto_size_t_lenProto_const_char_X_bufferModel_size_t_lenModel
/// Reads a network model stored in Caffe model in memory.
/// @details This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what argument(s) it accepts.
/// ## Parameters
/// * bufferProto: buffer containing the content of the .prototxt file
/// * lenProto: length of bufferProto
/// * bufferModel: buffer containing the content of the .caffemodel file
/// * lenModel: length of bufferModel
/// @returns Net object.
///
/// ## C++ default parameters:
/// * buffer_model: NULL
/// * len_model: 0
pub fn read_net_from_caffe_2(buffer_proto: &str, len_proto: size_t, buffer_model: &str, len_model: size_t) -> Result<core::Net> {
    string_arg!(buffer_proto);
    string_arg!(buffer_model);
    unsafe { sys::cv_core_cv_dnn_readNetFromCaffe_const_char_X_bufferProto_size_t_lenProto_const_char_X_bufferModel_size_t_lenModel(buffer_proto.as_ptr(), len_proto, buffer_model.as_ptr(), len_model) }.into_result()
}

// identifier: cv_dnn_readNetFromDarknet_String_cfgFile_String_darknetModel
/// Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files.
/// ## Parameters
/// * cfgFile:      path to the .cfg file with text description of the network architecture.
/// * darknetModel: path to the .weights file with learned network.
///  @returns Network object that ready to do forward, throw an exception in failure cases.
///  @returns Net object.
///
/// ## C++ default parameters:
/// * darknet_model: String()
pub fn read_net_from_darknet(cfg_file: &str, darknet_model: &str) -> Result<core::Net> {
    string_arg!(cfg_file);
    string_arg!(darknet_model);
    unsafe { sys::cv_core_cv_dnn_readNetFromDarknet_String_cfgFile_String_darknetModel(cfg_file.as_ptr(), darknet_model.as_ptr()) }.into_result()
}

// identifier: cv_dnn_readNetFromDarknet_VectorOfuchar_bufferCfg_VectorOfuchar_bufferModel
/// Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files.
/// ## Parameters
/// * bufferCfg:   A buffer contains a content of .cfg file with text description of the network architecture.
/// * bufferModel: A buffer contains a content of .weights file with learned network.
///  @returns Net object.
///
/// ## C++ default parameters:
/// * buffer_model: std::vector<uchar>()
pub fn read_net_from_darknet_1(buffer_cfg: &types::VectorOfuchar, buffer_model: &types::VectorOfuchar) -> Result<core::Net> {
    unsafe { sys::cv_core_cv_dnn_readNetFromDarknet_VectorOfuchar_bufferCfg_VectorOfuchar_bufferModel(buffer_cfg.as_raw_VectorOfuchar(), buffer_model.as_raw_VectorOfuchar()) }.into_result()
}

// identifier: cv_dnn_readNetFromDarknet_const_char_X_bufferCfg_size_t_lenCfg_const_char_X_bufferModel_size_t_lenModel
/// Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files.
/// ## Parameters
/// * bufferCfg:   A buffer contains a content of .cfg file with text description of the network architecture.
/// * lenCfg:      Number of bytes to read from bufferCfg
/// * bufferModel: A buffer contains a content of .weights file with learned network.
/// * lenModel:    Number of bytes to read from bufferModel
///  @returns Net object.
///
/// ## C++ default parameters:
/// * buffer_model: NULL
/// * len_model: 0
pub fn read_net_from_darknet_2(buffer_cfg: &str, len_cfg: size_t, buffer_model: &str, len_model: size_t) -> Result<core::Net> {
    string_arg!(buffer_cfg);
    string_arg!(buffer_model);
    unsafe { sys::cv_core_cv_dnn_readNetFromDarknet_const_char_X_bufferCfg_size_t_lenCfg_const_char_X_bufferModel_size_t_lenModel(buffer_cfg.as_ptr(), len_cfg, buffer_model.as_ptr(), len_model) }.into_result()
}

// identifier: cv_dnn_readNetFromModelOptimizer_String_xml_String_bin
/// Load a network from Intel's Model Optimizer intermediate representation.
/// ## Parameters
///  @param[in] xml XML configuration file with network's topology.
///  @param[in] bin Binary file with trained weights.
///  @returns Net object.
///  Networks imported from Intel's Model Optimizer are launched in Intel's Inference Engine
///  backend.
pub fn read_net_from_model_optimizer(xml: &str, bin: &str) -> Result<core::Net> {
    string_arg!(xml);
    string_arg!(bin);
    unsafe { sys::cv_core_cv_dnn_readNetFromModelOptimizer_String_xml_String_bin(xml.as_ptr(), bin.as_ptr()) }.into_result()
}

// identifier: cv_dnn_readNetFromONNX_String_onnxFile
/// Reads a network model <a href="https://onnx.ai/">ONNX</a>.
/// ## Parameters
/// * onnxFile: path to the .onnx file with text description of the network architecture.
///  @returns Network object that ready to do forward, throw an exception in failure cases.
pub fn read_net_from_onnx(onnx_file: &str) -> Result<core::Net> {
    string_arg!(onnx_file);
    unsafe { sys::cv_core_cv_dnn_readNetFromONNX_String_onnxFile(onnx_file.as_ptr()) }.into_result()
}

// identifier: cv_dnn_readNetFromTensorflow_String_model_String_config
/// Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.
/// ## Parameters
/// * model:  path to the .pb file with binary protobuf description of the network architecture
/// * config: path to the .pbtxt file that contains text graph definition in protobuf format.
///               Resulting Net object is built by text graph using weights from a binary one that
///               let us make it more flexible.
/// @returns Net object.
///
/// ## C++ default parameters:
/// * config: String()
pub fn read_net_from_tensorflow(model: &str, config: &str) -> Result<core::Net> {
    string_arg!(model);
    string_arg!(config);
    unsafe { sys::cv_core_cv_dnn_readNetFromTensorflow_String_model_String_config(model.as_ptr(), config.as_ptr()) }.into_result()
}

// identifier: cv_dnn_readNetFromTensorflow_VectorOfuchar_bufferModel_VectorOfuchar_bufferConfig
/// Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.
/// ## Parameters
/// * bufferModel: buffer containing the content of the pb file
/// * bufferConfig: buffer containing the content of the pbtxt file
/// @returns Net object.
///
/// ## C++ default parameters:
/// * buffer_config: std::vector<uchar>()
pub fn read_net_from_tensorflow_1(buffer_model: &types::VectorOfuchar, buffer_config: &types::VectorOfuchar) -> Result<core::Net> {
    unsafe { sys::cv_core_cv_dnn_readNetFromTensorflow_VectorOfuchar_bufferModel_VectorOfuchar_bufferConfig(buffer_model.as_raw_VectorOfuchar(), buffer_config.as_raw_VectorOfuchar()) }.into_result()
}

// identifier: cv_dnn_readNetFromTensorflow_const_char_X_bufferModel_size_t_lenModel_const_char_X_bufferConfig_size_t_lenConfig
/// Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.
/// @details This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what argument(s) it accepts.
/// ## Parameters
/// * bufferModel: buffer containing the content of the pb file
/// * lenModel: length of bufferModel
/// * bufferConfig: buffer containing the content of the pbtxt file
/// * lenConfig: length of bufferConfig
///
/// ## C++ default parameters:
/// * buffer_config: NULL
/// * len_config: 0
pub fn read_net_from_tensorflow_2(buffer_model: &str, len_model: size_t, buffer_config: &str, len_config: size_t) -> Result<core::Net> {
    string_arg!(buffer_model);
    string_arg!(buffer_config);
    unsafe { sys::cv_core_cv_dnn_readNetFromTensorflow_const_char_X_bufferModel_size_t_lenModel_const_char_X_bufferConfig_size_t_lenConfig(buffer_model.as_ptr(), len_model, buffer_config.as_ptr(), len_config) }.into_result()
}

// identifier: cv_dnn_readNetFromTorch_String_model_bool_isBinary_bool_evaluate
/// Reads a network model stored in <a href="http://torch.ch">Torch7</a> framework's format.
/// ## Parameters
/// * model:    path to the file, dumped from Torch by using torch.save() function.
/// * isBinary: specifies whether the network was serialized in ascii mode or binary.
/// * evaluate: specifies testing phase of network. If true, it's similar to evaluate() method in Torch.
///  @returns Net object.
/// 
///  
/// Note: Ascii mode of Torch serializer is more preferable, because binary mode extensively use `long` type of C language,
///  which has various bit-length on different systems.
/// 
/// The loading file must contain serialized <a href="https://github.com/torch/nn/blob/master/doc/module.md">nn.Module</a> object
/// with importing network. Try to eliminate a custom objects from serialazing data to avoid importing errors.
/// 
/// List of supported layers (i.e. object instances derived from Torch nn.Module class):
/// - nn.Sequential
/// - nn.Parallel
/// - nn.Concat
/// - nn.Linear
/// - nn.SpatialConvolution
/// - nn.SpatialMaxPooling, nn.SpatialAveragePooling
/// - nn.ReLU, nn.TanH, nn.Sigmoid
/// - nn.Reshape
/// - nn.SoftMax, nn.LogSoftMax
/// 
/// Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported.
///
/// ## C++ default parameters:
/// * is_binary: true
/// * evaluate: true
pub fn read_net_from_torch(model: &str, is_binary: bool, evaluate: bool) -> Result<core::Net> {
    string_arg!(model);
    unsafe { sys::cv_core_cv_dnn_readNetFromTorch_String_model_bool_isBinary_bool_evaluate(model.as_ptr(), is_binary, evaluate) }.into_result()
}

// identifier: cv_dnn_readNet_String_framework_VectorOfuchar_bufferModel_VectorOfuchar_bufferConfig
/// Read deep learning network represented in one of the supported formats.
/// @details This is an overloaded member function, provided for convenience.
///          It differs from the above function only in what argument(s) it accepts.
/// ## Parameters
/// @param[in] framework    Name of origin framework.
/// @param[in] bufferModel  A buffer with a content of binary file with weights
/// @param[in] bufferConfig A buffer with a content of text file contains network configuration.
/// @returns Net object.
///
/// ## C++ default parameters:
/// * buffer_config: std::vector<uchar>()
pub fn read_net(framework: &str, buffer_model: &types::VectorOfuchar, buffer_config: &types::VectorOfuchar) -> Result<core::Net> {
    string_arg!(framework);
    unsafe { sys::cv_core_cv_dnn_readNet_String_framework_VectorOfuchar_bufferModel_VectorOfuchar_bufferConfig(framework.as_ptr(), buffer_model.as_raw_VectorOfuchar(), buffer_config.as_raw_VectorOfuchar()) }.into_result()
}

// identifier: cv_dnn_readNet_String_model_String_config_String_framework
/// Read deep learning network represented in one of the supported formats.
/// ## Parameters
/// @param[in] model Binary file contains trained weights. The following file
///                  extensions are expected for models from different frameworks:
///                  * `*.caffemodel` (Caffe, http://caffe.berkeleyvision.org/)
///                  * `*.pb` (TensorFlow, https://www.tensorflow.org/)
///                  * `*.t7` | `*.net` (Torch, http://torch.ch/)
///                  * `*.weights` (Darknet, https://pjreddie.com/darknet/)
///                  * `*.bin` (DLDT, https://software.intel.com/openvino-toolkit)
/// @param[in] config Text file contains network configuration. It could be a
///                   file with the following extensions:
///                  * `*.prototxt` (Caffe, http://caffe.berkeleyvision.org/)
///                  * `*.pbtxt` (TensorFlow, https://www.tensorflow.org/)
///                  * `*.cfg` (Darknet, https://pjreddie.com/darknet/)
///                  * `*.xml` (DLDT, https://software.intel.com/openvino-toolkit)
/// @param[in] framework Explicit framework name tag to determine a format.
/// @returns Net object.
/// 
/// This function automatically detects an origin framework of trained model
/// and calls an appropriate function such @ref readNetFromCaffe, @ref readNetFromTensorflow,
/// @ref readNetFromTorch or @ref readNetFromDarknet. An order of @p model and @p config
/// arguments does not matter.
///
/// ## C++ default parameters:
/// * config: ""
/// * framework: ""
pub fn read_net_1(model: &str, config: &str, framework: &str) -> Result<core::Net> {
    string_arg!(model);
    string_arg!(config);
    string_arg!(framework);
    unsafe { sys::cv_core_cv_dnn_readNet_String_model_String_config_String_framework(model.as_ptr(), config.as_ptr(), framework.as_ptr()) }.into_result()
}

// identifier: cv_dnn_readTensorFromONNX_String_path
/// Creates blob from .pb file.
/// ## Parameters
/// * path: to the .pb file with input tensor.
///  @returns Mat.
pub fn read_tensor_from_onnx(path: &str) -> Result<core::Mat> {
    string_arg!(path);
    unsafe { sys::cv_core_cv_dnn_readTensorFromONNX_String_path(path.as_ptr()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_readTorchBlob_String_filename_bool_isBinary
/// Loads blob which was serialized as torch.Tensor object of Torch7 framework.
///  @warning This function has the same limitations as readNetFromTorch().
///
/// ## C++ default parameters:
/// * is_binary: true
pub fn read_torch_blob(filename: &str, is_binary: bool) -> Result<core::Mat> {
    string_arg!(filename);
    unsafe { sys::cv_core_cv_dnn_readTorchBlob_String_filename_bool_isBinary(filename.as_ptr(), is_binary) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_resetMyriadDevice
/// Release a Myriad device is binded by OpenCV.
/// 
/// Single Myriad device cannot be shared across multiple processes which uses
/// Inference Engine's Myriad plugin.
pub fn reset_myriad_device() -> Result<()> {
    unsafe { sys::cv_core_cv_dnn_resetMyriadDevice() }.into_result()
}

// identifier: cv_dnn_shape_MatSize_sz
pub fn shape(sz: &core::MatSize) -> Result<types::VectorOfint> {
    unsafe { sys::cv_core_cv_dnn_shape_MatSize_sz(sz.as_raw_MatSize()) }.into_result().map(|x| types::VectorOfint { ptr: x })
}

// identifier: cv_dnn_shape_Mat_mat
pub fn shape_1(mat: &core::Mat) -> Result<types::VectorOfint> {
    unsafe { sys::cv_core_cv_dnn_shape_Mat_mat(mat.as_raw_Mat()) }.into_result().map(|x| types::VectorOfint { ptr: x })
}

// identifier: cv_dnn_shape_const_int_X_dims_int_n
pub fn shape_2(dims: &i32, n: i32) -> Result<types::VectorOfint> {
    unsafe { sys::cv_core_cv_dnn_shape_const_int_X_dims_int_n(dims, n) }.into_result().map(|x| types::VectorOfint { ptr: x })
}

// identifier: cv_dnn_shape_int_a0_int_a1_int_a2_int_a3
///
/// ## C++ default parameters:
/// * a1: -1
/// * a2: -1
/// * a3: -1
pub fn shape_3(a0: i32, a1: i32, a2: i32, a3: i32) -> Result<types::VectorOfint> {
    unsafe { sys::cv_core_cv_dnn_shape_int_a0_int_a1_int_a2_int_a3(a0, a1, a2, a3) }.into_result().map(|x| types::VectorOfint { ptr: x })
}

// identifier: cv_dnn_shrinkCaffeModel_String_src_String_dst_VectorOfString_layersTypes
/// Convert all weights of Caffe network to half precision floating point.
/// ## Parameters
/// * src: Path to origin model from Caffe framework contains single
///            precision floating point weights (usually has `.caffemodel` extension).
/// * dst: Path to destination model with updated weights.
/// * layersTypes: Set of layers types which parameters will be converted.
///                    By default, converts only Convolutional and Fully-Connected layers'
///                    weights.
/// 
/// 
/// Note: Shrinked model has no origin float32 weights so it can't be used
///       in origin Caffe framework anymore. However the structure of data
///       is taken from NVidia's Caffe fork: https://github.com/NVIDIA/caffe.
///       So the resulting model may be used there.
///
/// ## C++ default parameters:
/// * layers_types: std::vector<String>()
pub fn shrink_caffe_model(src: &str, dst: &str, layers_types: &types::VectorOfString) -> Result<()> {
    string_arg!(src);
    string_arg!(dst);
    unsafe { sys::cv_core_cv_dnn_shrinkCaffeModel_String_src_String_dst_VectorOfString_layersTypes(src.as_ptr(), dst.as_ptr(), layers_types.as_raw_VectorOfString()) }.into_result()
}

// identifier: cv_dnn_slice_Mat_m_Range_r0
pub fn slice(m: &core::Mat, r0: &core::Range) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_dnn_slice_Mat_m_Range_r0(m.as_raw_Mat(), r0.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_slice_Mat_m_Range_r0_Range_r1
pub fn slice_1(m: &core::Mat, r0: &core::Range, r1: &core::Range) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_dnn_slice_Mat_m_Range_r0_Range_r1(m.as_raw_Mat(), r0.as_raw_Range(), r1.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_slice_Mat_m_Range_r0_Range_r1_Range_r2
pub fn slice_2(m: &core::Mat, r0: &core::Range, r1: &core::Range, r2: &core::Range) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_dnn_slice_Mat_m_Range_r0_Range_r1_Range_r2(m.as_raw_Mat(), r0.as_raw_Range(), r1.as_raw_Range(), r2.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_slice_Mat_m_Range_r0_Range_r1_Range_r2_Range_r3
pub fn slice_3(m: &core::Mat, r0: &core::Range, r1: &core::Range, r2: &core::Range, r3: &core::Range) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_dnn_slice_Mat_m_Range_r0_Range_r1_Range_r2_Range_r3(m.as_raw_Mat(), r0.as_raw_Range(), r1.as_raw_Range(), r2.as_raw_Range(), r3.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_dnn_writeTextGraph_String_model_String_output
/// Create a text representation for a binary network stored in protocol buffer format.
/// ## Parameters
///  @param[in] model  A path to binary network.
///  @param[in] output A path to output text file to be created.
/// 
///  
/// Note: To reduce output file size, trained weights are not included.
pub fn write_text_graph(model: &str, output: &str) -> Result<()> {
    string_arg!(model);
    string_arg!(output);
    unsafe { sys::cv_core_cv_dnn_writeTextGraph_String_model_String_output(model.as_ptr(), output.as_ptr()) }.into_result()
}

// identifier: cv_drawChessboardCorners_Mat_image_Size_patternSize_Mat_corners_bool_patternWasFound
/// Renders the detected chessboard corners.
/// 
/// ## Parameters
/// * image: Destination image. It must be an 8-bit color image.
/// * patternSize: Number of inner corners per a chessboard row and column
/// (patternSize = cv::Size(points_per_row,points_per_column)).
/// * corners: Array of detected corners, the output of findChessboardCorners.
/// * patternWasFound: Parameter indicating whether the complete board was found or not. The
/// return value of findChessboardCorners should be passed here.
/// 
/// The function draws individual chessboard corners detected either as red circles if the board was not
/// found, or as colored corners connected with lines if the board was found.
pub fn draw_chessboard_corners(image: &mut core::Mat, pattern_size: core::Size, corners: &core::Mat, pattern_was_found: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_drawChessboardCorners_Mat_image_Size_patternSize_Mat_corners_bool_patternWasFound(image.as_raw_Mat(), pattern_size, corners.as_raw_Mat(), pattern_was_found) }.into_result()
}

// identifier: cv_drawContours_Mat_image_VectorOfMat_contours_int_contourIdx_Scalar_color_int_thickness_int_lineType_Mat_hierarchy_int_maxLevel_Point_offset
/// Draws contours outlines or filled contours.
/// 
/// The function draws contour outlines in the image if <span lang='latex'>\texttt{thickness} \ge 0</span> or fills the area
/// bounded by the contours if <span lang='latex'>\texttt{thickness}<0</span> . The example below shows how to retrieve
/// connected components from the binary image and label them: :
/// @include snippets/imgproc_drawContours.cpp
/// 
/// ## Parameters
/// * image: Destination image.
/// * contours: All the input contours. Each contour is stored as a point vector.
/// * contourIdx: Parameter indicating a contour to draw. If it is negative, all the contours are drawn.
/// * color: Color of the contours.
/// * thickness: Thickness of lines the contours are drawn with. If it is negative (for example,
/// thickness=#FILLED ), the contour interiors are drawn.
/// * lineType: Line connectivity. See #LineTypes
/// * hierarchy: Optional information about hierarchy. It is only needed if you want to draw only
/// some of the contours (see maxLevel ).
/// * maxLevel: Maximal level for drawn contours. If it is 0, only the specified contour is drawn.
/// If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function
/// draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This
/// parameter is only taken into account when there is hierarchy available.
/// * offset: Optional contour shift parameter. Shift all the drawn contours by the specified
/// <span lang='latex'>\texttt{offset}=(dx,dy)</span> .
/// 
/// Note: When thickness=#FILLED, the function is designed to handle connected components with holes correctly
/// even when no hierarchy date is provided. This is done by analyzing all the outlines together
/// using even-odd rule. This may give incorrect results if you have a joint collection of separately retrieved
/// contours. In order to solve this problem, you need to call #drawContours separately for each sub-group
/// of contours, or iterate over the collection using contourIdx parameter.
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * hierarchy: noArray()
/// * max_level: INT_MAX
/// * offset: Point()
pub fn draw_contours(image: &mut core::Mat, contours: &types::VectorOfMat, contour_idx: i32, color: core::Scalar, thickness: i32, line_type: i32, hierarchy: &core::Mat, max_level: i32, offset: core::Point) -> Result<()> {
    unsafe { sys::cv_core_cv_drawContours_Mat_image_VectorOfMat_contours_int_contourIdx_Scalar_color_int_thickness_int_lineType_Mat_hierarchy_int_maxLevel_Point_offset(image.as_raw_Mat(), contours.as_raw_VectorOfMat(), contour_idx, color, thickness, line_type, hierarchy.as_raw_Mat(), max_level, offset) }.into_result()
}

// identifier: cv_drawFrameAxes_Mat_image_Mat_cameraMatrix_Mat_distCoeffs_Mat_rvec_Mat_tvec_float_length_int_thickness
/// Draw axes of the world/object coordinate system from pose estimation. @sa solvePnP
/// 
/// ## Parameters
/// * image: Input/output image. It must have 1 or 3 channels. The number of channels is not altered.
/// * cameraMatrix: Input 3x3 floating-point matrix of camera intrinsic parameters.
/// <span lang='latex'>A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span>
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements. If the vector is empty, the zero distortion coefficients are assumed.
/// * rvec: Rotation vector (see @ref Rodrigues ) that, together with tvec , brings points from
/// the model coordinate system to the camera coordinate system.
/// * tvec: Translation vector.
/// * length: Length of the painted axes in the same unit than tvec (usually in meters).
/// * thickness: Line thickness of the painted axes.
/// 
/// This function draws the axes of the world/object coordinate system w.r.t. to the camera frame.
/// OX is drawn in red, OY in green and OZ in blue.
///
/// ## C++ default parameters:
/// * thickness: 3
pub fn draw_frame_axes(image: &mut core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, rvec: &core::Mat, tvec: &core::Mat, length: f32, thickness: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_drawFrameAxes_Mat_image_Mat_cameraMatrix_Mat_distCoeffs_Mat_rvec_Mat_tvec_float_length_int_thickness(image.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), rvec.as_raw_Mat(), tvec.as_raw_Mat(), length, thickness) }.into_result()
}

// identifier: cv_drawKeypoints_Mat_image_VectorOfKeyPoint_keypoints_Mat_outImage_Scalar_color_int_flags
/// Draws keypoints.
/// 
/// ## Parameters
/// * image: Source image.
/// * keypoints: Keypoints from the source image.
/// * outImage: Output image. Its content depends on the flags value defining what is drawn in the
/// output image. See possible flags bit values below.
/// * color: Color of keypoints.
/// * flags: Flags setting drawing features. Possible flags bit values are defined by
/// DrawMatchesFlags. See details above in drawMatches .
/// 
/// 
/// Note:
/// For Python API, flags are modified as cv2.DRAW_MATCHES_FLAGS_DEFAULT,
/// cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv2.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG,
/// cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS
///
/// ## C++ default parameters:
/// * color: Scalar::all(-1)
/// * flags: DrawMatchesFlags::DEFAULT
pub fn draw_keypoints(image: &core::Mat, keypoints: &types::VectorOfKeyPoint, out_image: &mut core::Mat, color: core::Scalar, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_drawKeypoints_Mat_image_VectorOfKeyPoint_keypoints_Mat_outImage_Scalar_color_int_flags(image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), out_image.as_raw_Mat(), color, flags) }.into_result()
}

// identifier: cv_drawMarker_Mat_img_Point_position_Scalar_color_int_markerType_int_markerSize_int_thickness_int_line_type
/// Draws a marker on a predefined position in an image.
/// 
/// The function cv::drawMarker draws a marker on a given position in the image. For the moment several
/// marker types are supported, see #MarkerTypes for more information.
/// 
/// ## Parameters
/// * img: Image.
/// * position: The point where the crosshair is positioned.
/// * color: Line color.
/// * markerType: The specific type of marker you want to use, see #MarkerTypes
/// * thickness: Line thickness.
/// * line_type: Type of the line, See #LineTypes
/// * markerSize: The length of the marker axis [default = 20 pixels]
///
/// ## C++ default parameters:
/// * marker_type: MARKER_CROSS
/// * marker_size: 20
/// * thickness: 1
/// * line_type: 8
pub fn draw_marker(img: &core::Mat, position: core::Point, color: core::Scalar, marker_type: i32, marker_size: i32, thickness: i32, line_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_drawMarker_Mat_img_Point_position_Scalar_color_int_markerType_int_markerSize_int_thickness_int_line_type(img.as_raw_Mat(), position, color, marker_type, marker_size, thickness, line_type) }.into_result()
}

// identifier: cv_drawMatches_Mat_img1_VectorOfKeyPoint_keypoints1_Mat_img2_VectorOfKeyPoint_keypoints2_VectorOfDMatch_matches1to2_Mat_outImg_Scalar_matchColor_Scalar_singlePointColor_VectorOfchar_matchesMask_int_flags
/// Draws the found matches of keypoints from two images.
/// 
/// ## Parameters
/// * img1: First source image.
/// * keypoints1: Keypoints from the first source image.
/// * img2: Second source image.
/// * keypoints2: Keypoints from the second source image.
/// * matches1to2: Matches from the first image to the second one, which means that keypoints1[i]
/// has a corresponding point in keypoints2[matches[i]] .
/// * outImg: Output image. Its content depends on the flags value defining what is drawn in the
/// output image. See possible flags bit values below.
/// * matchColor: Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1)
/// , the color is generated randomly.
/// * singlePointColor: Color of single keypoints (circles), which means that keypoints do not
/// have the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
/// * matchesMask: Mask determining which matches are drawn. If the mask is empty, all matches are
/// drawn.
/// * flags: Flags setting drawing features. Possible flags bit values are defined by
/// DrawMatchesFlags.
/// 
/// This function draws matches of keypoints from two images in the output image. Match is a line
/// connecting two keypoints (circles). See cv::DrawMatchesFlags.
///
/// ## C++ default parameters:
/// * match_color: Scalar::all(-1)
/// * single_point_color: Scalar::all(-1)
/// * matches_mask: std::vector<char>()
/// * flags: DrawMatchesFlags::DEFAULT
pub fn draw_matches(img1: &core::Mat, keypoints1: &types::VectorOfKeyPoint, img2: &core::Mat, keypoints2: &types::VectorOfKeyPoint, matches1to2: &types::VectorOfDMatch, out_img: &mut core::Mat, match_color: core::Scalar, single_point_color: core::Scalar, matches_mask: &types::VectorOfchar, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_drawMatches_Mat_img1_VectorOfKeyPoint_keypoints1_Mat_img2_VectorOfKeyPoint_keypoints2_VectorOfDMatch_matches1to2_Mat_outImg_Scalar_matchColor_Scalar_singlePointColor_VectorOfchar_matchesMask_int_flags(img1.as_raw_Mat(), keypoints1.as_raw_VectorOfKeyPoint(), img2.as_raw_Mat(), keypoints2.as_raw_VectorOfKeyPoint(), matches1to2.as_raw_VectorOfDMatch(), out_img.as_raw_Mat(), match_color, single_point_color, matches_mask.as_raw_VectorOfchar(), flags) }.into_result()
}

// identifier: cv_drawMatches_Mat_img1_VectorOfKeyPoint_keypoints1_Mat_img2_VectorOfKeyPoint_keypoints2_VectorOfVectorOfDMatch_matches1to2_Mat_outImg_Scalar_matchColor_Scalar_singlePointColor_VectorOfVectorOfchar_matchesMask_int_flags
/// @overload
///
/// ## C++ default parameters:
/// * match_color: Scalar::all(-1)
/// * single_point_color: Scalar::all(-1)
/// * matches_mask: std::vector<std::vector<char> >()
/// * flags: DrawMatchesFlags::DEFAULT
pub fn draw_vector_matches(img1: &core::Mat, keypoints1: &types::VectorOfKeyPoint, img2: &core::Mat, keypoints2: &types::VectorOfKeyPoint, matches1to2: &types::VectorOfVectorOfDMatch, out_img: &mut core::Mat, match_color: core::Scalar, single_point_color: core::Scalar, matches_mask: &types::VectorOfVectorOfchar, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_drawMatches_Mat_img1_VectorOfKeyPoint_keypoints1_Mat_img2_VectorOfKeyPoint_keypoints2_VectorOfVectorOfDMatch_matches1to2_Mat_outImg_Scalar_matchColor_Scalar_singlePointColor_VectorOfVectorOfchar_matchesMask_int_flags(img1.as_raw_Mat(), keypoints1.as_raw_VectorOfKeyPoint(), img2.as_raw_Mat(), keypoints2.as_raw_VectorOfKeyPoint(), matches1to2.as_raw_VectorOfVectorOfDMatch(), out_img.as_raw_Mat(), match_color, single_point_color, matches_mask.as_raw_VectorOfVectorOfchar(), flags) }.into_result()
}

// identifier: cv_edgePreservingFilter_Mat_src_Mat_dst_int_flags_float_sigma_s_float_sigma_r
/// Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing
/// filters are used in many different applications @cite EM11 .
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * dst: Output 8-bit 3-channel image.
/// * flags: Edge preserving filters:
/// *   **RECURS_FILTER** = 1
/// *   **NORMCONV_FILTER** = 2
/// * sigma_s: Range between 0 to 200.
/// * sigma_r: Range between 0 to 1.
///
/// ## C++ default parameters:
/// * flags: 1
/// * sigma_s: 60
/// * sigma_r: 0.4f
pub fn edge_preserving_filter(src: &core::Mat, dst: &mut core::Mat, flags: i32, sigma_s: f32, sigma_r: f32) -> Result<()> {
    unsafe { sys::cv_core_cv_edgePreservingFilter_Mat_src_Mat_dst_int_flags_float_sigma_s_float_sigma_r(src.as_raw_Mat(), dst.as_raw_Mat(), flags, sigma_s, sigma_r) }.into_result()
}

// identifier: cv_eigenNonSymmetric_Mat_src_Mat_eigenvalues_Mat_eigenvectors
/// Calculates eigenvalues and eigenvectors of a non-symmetric matrix (real eigenvalues only).
/// 
/// 
/// Note: Assumes real eigenvalues.
/// 
/// The function calculates eigenvalues and eigenvectors (optional) of the square matrix src:
/// ```ignore
/// src*eigenvectors.row(i).t() = eigenvalues.at<srcType>(i)*eigenvectors.row(i).t()
/// ```
/// 
/// 
/// ## Parameters
/// * src: input matrix (CV_32FC1 or CV_64FC1 type).
/// * eigenvalues: output vector of eigenvalues (type is the same type as src).
/// * eigenvectors: output matrix of eigenvectors (type is the same type as src). The eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding eigenvalues.
/// @sa eigen
pub fn eigen_non_symmetric(src: &core::Mat, eigenvalues: &mut core::Mat, eigenvectors: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_eigenNonSymmetric_Mat_src_Mat_eigenvalues_Mat_eigenvectors(src.as_raw_Mat(), eigenvalues.as_raw_Mat(), eigenvectors.as_raw_Mat()) }.into_result()
}

// identifier: cv_eigen_Mat_src_Mat_eigenvalues_Mat_eigenvectors
/// Calculates eigenvalues and eigenvectors of a symmetric matrix.
/// 
/// The function cv::eigen calculates just eigenvalues, or eigenvalues and eigenvectors of the symmetric
/// matrix src:
/// ```ignore
/// src*eigenvectors.row(i).t() = eigenvalues.at<srcType>(i)*eigenvectors.row(i).t()
/// ```
/// 
/// 
/// 
/// Note: Use cv::eigenNonSymmetric for calculation of real eigenvalues and eigenvectors of non-symmetric matrix.
/// 
/// ## Parameters
/// * src: input matrix that must have CV_32FC1 or CV_64FC1 type, square size and be symmetrical
/// (src ^T^ == src).
/// * eigenvalues: output vector of eigenvalues of the same type as src; the eigenvalues are stored
/// in the descending order.
/// * eigenvectors: output matrix of eigenvectors; it has the same size and type as src; the
/// eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding
/// eigenvalues.
/// @sa eigenNonSymmetric, completeSymm , PCA
///
/// ## C++ default parameters:
/// * eigenvectors: noArray()
pub fn eigen(src: &core::Mat, eigenvalues: &mut core::Mat, eigenvectors: &mut core::Mat) -> Result<bool> {
    unsafe { sys::cv_core_cv_eigen_Mat_src_Mat_eigenvalues_Mat_eigenvectors(src.as_raw_Mat(), eigenvalues.as_raw_Mat(), eigenvectors.as_raw_Mat()) }.into_result()
}

// identifier: cv_ellipse2Poly_Point2d_center_Size2d_axes_int_angle_int_arcStart_int_arcEnd_int_delta_VectorOfPoint2d_pts
/// @overload
/// ## Parameters
/// * center: Center of the arc.
/// * axes: Half of the size of the ellipse main axes. See #ellipse for details.
/// * angle: Rotation angle of the ellipse in degrees. See #ellipse for details.
/// * arcStart: Starting angle of the elliptic arc in degrees.
/// * arcEnd: Ending angle of the elliptic arc in degrees.
/// * delta: Angle between the subsequent polyline vertices. It defines the approximation accuracy.
/// * pts: Output vector of polyline vertices.
pub fn ellipse2_poly_f64(center: core::Point2d, axes: core::Size2d, angle: i32, arc_start: i32, arc_end: i32, delta: i32, pts: &types::VectorOfPoint2d) -> Result<()> {
    unsafe { sys::cv_core_cv_ellipse2Poly_Point2d_center_Size2d_axes_int_angle_int_arcStart_int_arcEnd_int_delta_VectorOfPoint2d_pts(center, axes, angle, arc_start, arc_end, delta, pts.as_raw_VectorOfPoint2d()) }.into_result()
}

// identifier: cv_ellipse2Poly_Point_center_Size_axes_int_angle_int_arcStart_int_arcEnd_int_delta_VectorOfPoint_pts
/// Approximates an elliptic arc with a polyline.
/// 
/// The function ellipse2Poly computes the vertices of a polyline that approximates the specified
/// elliptic arc. It is used by #ellipse. If `arcStart` is greater than `arcEnd`, they are swapped.
/// 
/// ## Parameters
/// * center: Center of the arc.
/// * axes: Half of the size of the ellipse main axes. See #ellipse for details.
/// * angle: Rotation angle of the ellipse in degrees. See #ellipse for details.
/// * arcStart: Starting angle of the elliptic arc in degrees.
/// * arcEnd: Ending angle of the elliptic arc in degrees.
/// * delta: Angle between the subsequent polyline vertices. It defines the approximation
/// accuracy.
/// * pts: Output vector of polyline vertices.
pub fn ellipse2_poly(center: core::Point, axes: core::Size, angle: i32, arc_start: i32, arc_end: i32, delta: i32, pts: &types::VectorOfPoint) -> Result<()> {
    unsafe { sys::cv_core_cv_ellipse2Poly_Point_center_Size_axes_int_angle_int_arcStart_int_arcEnd_int_delta_VectorOfPoint_pts(center, axes, angle, arc_start, arc_end, delta, pts.as_raw_VectorOfPoint()) }.into_result()
}

// identifier: cv_ellipse_Mat_img_Point_center_Size_axes_double_angle_double_startAngle_double_endAngle_Scalar_color_int_thickness_int_lineType_int_shift
/// Draws a simple or thick elliptic arc or fills an ellipse sector.
/// 
/// The function cv::ellipse with more parameters draws an ellipse outline, a filled ellipse, an elliptic
/// arc, or a filled ellipse sector. The drawing code uses general parametric form.
/// A piecewise-linear curve is used to approximate the elliptic arc
/// boundary. If you need more control of the ellipse rendering, you can retrieve the curve using
/// #ellipse2Poly and then render it with #polylines or fill it with #fillPoly. If you use the first
/// variant of the function and want to draw the whole ellipse, not an arc, pass `startAngle=0` and
/// `endAngle=360`. If `startAngle` is greater than `endAngle`, they are swapped. The figure below explains
/// the meaning of the parameters to draw the blue arc.
/// 
/// ![Parameters of Elliptic Arc](pics/ellipse.svg)
/// 
/// ## Parameters
/// * img: Image.
/// * center: Center of the ellipse.
/// * axes: Half of the size of the ellipse main axes.
/// * angle: Ellipse rotation angle in degrees.
/// * startAngle: Starting angle of the elliptic arc in degrees.
/// * endAngle: Ending angle of the elliptic arc in degrees.
/// * color: Ellipse color.
/// * thickness: Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that
/// a filled ellipse sector is to be drawn.
/// * lineType: Type of the ellipse boundary. See #LineTypes
/// * shift: Number of fractional bits in the coordinates of the center and values of axes.
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * shift: 0
pub fn ellipse(img: &mut core::Mat, center: core::Point, axes: core::Size, angle: f64, start_angle: f64, end_angle: f64, color: core::Scalar, thickness: i32, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_ellipse_Mat_img_Point_center_Size_axes_double_angle_double_startAngle_double_endAngle_Scalar_color_int_thickness_int_lineType_int_shift(img.as_raw_Mat(), center, axes, angle, start_angle, end_angle, color, thickness, line_type, shift) }.into_result()
}

// identifier: cv_ellipse_Mat_img_RotatedRect_box_Scalar_color_int_thickness_int_lineType
/// @overload
/// ## Parameters
/// * img: Image.
/// * box: Alternative ellipse representation via RotatedRect. This means that the function draws
/// an ellipse inscribed in the rotated rectangle.
/// * color: Ellipse color.
/// * thickness: Thickness of the ellipse arc outline, if positive. Otherwise, this indicates that
/// a filled ellipse sector is to be drawn.
/// * lineType: Type of the ellipse boundary. See #LineTypes
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
pub fn ellipse_new_rotated_rect(img: &mut core::Mat, _box: &core::RotatedRect, color: core::Scalar, thickness: i32, line_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_ellipse_Mat_img_RotatedRect_box_Scalar_color_int_thickness_int_lineType(img.as_raw_Mat(), _box.as_raw_RotatedRect(), color, thickness, line_type) }.into_result()
}

// identifier: cv_equalizeHist_Mat_src_Mat_dst
/// Equalizes the histogram of a grayscale image.
/// 
/// The function equalizes the histogram of the input image using the following algorithm:
/// 
/// - Calculate the histogram <span lang='latex'>H</span> for src .
/// - Normalize the histogram so that the sum of histogram bins is 255.
/// - Compute the integral of the histogram:
/// <div lang='latex'>H'_i =  \sum _{0  \le j < i} H(j)</div>
/// - Transform the image using <span lang='latex'>H'</span> as a look-up table: <span lang='latex'>\texttt{dst}(x,y) = H'(\texttt{src}(x,y))</span>
/// 
/// The algorithm normalizes the brightness and increases the contrast of the image.
/// 
/// ## Parameters
/// * src: Source 8-bit single channel image.
/// * dst: Destination image of the same size and type as src .
pub fn equalize_hist(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_equalizeHist_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_erode_Mat_src_Mat_dst_Mat_kernel_Point_anchor_int_iterations_int_borderType_Scalar_borderValue
/// Erodes an image by using a specific structuring element.
/// 
/// The function erodes the source image using the specified structuring element that determines the
/// shape of a pixel neighborhood over which the minimum is taken:
/// 
/// <div lang='latex'>\texttt{dst} (x,y) =  \min _{(x',y'):  \, \texttt{element} (x',y') \ne0 } \texttt{src} (x+x',y+y')</div>
/// 
/// The function supports the in-place mode. Erosion can be applied several ( iterations ) times. In
/// case of multi-channel images, each channel is processed independently.
/// 
/// ## Parameters
/// * src: input image; the number of channels can be arbitrary, but the depth should be one of
/// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
/// * dst: output image of the same size and type as src.
/// * kernel: structuring element used for erosion; if `element=Mat()`, a `3 x 3` rectangular
/// structuring element is used. Kernel can be created using #getStructuringElement.
/// * anchor: position of the anchor within the element; default value (-1, -1) means that the
/// anchor is at the element center.
/// * iterations: number of times erosion is applied.
/// * borderType: pixel extrapolation method, see #BorderTypes
/// * borderValue: border value in case of a constant border
/// @sa  dilate, morphologyEx, getStructuringElement
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
/// * iterations: 1
/// * border_type: BORDER_CONSTANT
/// * border_value: morphologyDefaultBorderValue()
pub fn erode(src: &core::Mat, dst: &mut core::Mat, kernel: &core::Mat, anchor: core::Point, iterations: i32, border_type: i32, border_value: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_erode_Mat_src_Mat_dst_Mat_kernel_Point_anchor_int_iterations_int_borderType_Scalar_borderValue(src.as_raw_Mat(), dst.as_raw_Mat(), kernel.as_raw_Mat(), anchor, iterations, border_type, border_value) }.into_result()
}

// identifier: cv_error_int__code_String__err_const_char_X__func_const_char_X__file_int__line
pub fn error(_code: i32, _err: &str, _func: &str, _file: &str, _line: i32) -> Result<()> {
    string_arg!(_err);
    string_arg!(_func);
    string_arg!(_file);
    unsafe { sys::cv_core_cv_error_int__code_String__err_const_char_X__func_const_char_X__file_int__line(_code, _err.as_ptr(), _func.as_ptr(), _file.as_ptr(), _line) }.into_result()
}

// identifier: cv_estimateAffine2D_Mat_from_Mat_to_Mat_inliers_int_method_double_ransacReprojThreshold_size_t_maxIters_double_confidence_size_t_refineIters
/// Computes an optimal affine transformation between two 2D point sets.
/// 
/// It computes
/// <div lang='latex'>
/// \begin{bmatrix}
/// x\\
/// y\\
/// \end{bmatrix}
/// =
/// \begin{bmatrix}
/// a_{11} & a_{12}\\
/// a_{21} & a_{22}\\
/// \end{bmatrix}
/// \begin{bmatrix}
/// X\\
/// Y\\
/// \end{bmatrix}
/// +
/// \begin{bmatrix}
/// b_1\\
/// b_2\\
/// \end{bmatrix}
/// </div>
/// 
/// ## Parameters
/// * from: First input 2D point set containing <span lang='latex'>(X,Y)</span>.
/// * to: Second input 2D point set containing <span lang='latex'>(x,y)</span>.
/// * inliers: Output vector indicating which points are inliers (1-inlier, 0-outlier).
/// * method: Robust method used to compute transformation. The following methods are possible:
/// *   cv::RANSAC - RANSAC-based robust method
/// *   cv::LMEDS - Least-Median robust method
/// RANSAC is the default method.
/// * ransacReprojThreshold: Maximum reprojection error in the RANSAC algorithm to consider
/// a point as an inlier. Applies only to RANSAC.
/// * maxIters: The maximum number of robust method iterations.
/// * confidence: Confidence level, between 0 and 1, for the estimated transformation. Anything
/// between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation
/// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation.
/// * refineIters: Maximum number of iterations of refining algorithm (Levenberg-Marquardt).
/// Passing 0 will disable refining, so the output matrix will be output of robust method.
/// 
/// @return Output 2D affine transformation matrix <span lang='latex'>2 \times 3</span> or empty matrix if transformation
/// could not be estimated. The returned matrix has the following form:
/// <div lang='latex'>
/// \begin{bmatrix}
/// a_{11} & a_{12} & b_1\\
/// a_{21} & a_{22} & b_2\\
/// \end{bmatrix}
/// </div>
/// 
/// The function estimates an optimal 2D affine transformation between two 2D point sets using the
/// selected robust algorithm.
/// 
/// The computed transformation is then refined further (using only inliers) with the
/// Levenberg-Marquardt method to reduce the re-projection error even more.
/// 
/// 
/// Note:
/// The RANSAC method can handle practically any ratio of outliers but needs a threshold to
/// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works
/// correctly only when there are more than 50% of inliers.
/// 
/// @sa estimateAffinePartial2D, getAffineTransform
///
/// ## C++ default parameters:
/// * inliers: noArray()
/// * method: RANSAC
/// * ransac_reproj_threshold: 3
/// * max_iters: 2000
/// * confidence: 0.99
/// * refine_iters: 10
pub fn estimate_affine2_d(from: &core::Mat, to: &core::Mat, inliers: &mut core::Mat, method: i32, ransac_reproj_threshold: f64, max_iters: size_t, confidence: f64, refine_iters: size_t) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_estimateAffine2D_Mat_from_Mat_to_Mat_inliers_int_method_double_ransacReprojThreshold_size_t_maxIters_double_confidence_size_t_refineIters(from.as_raw_Mat(), to.as_raw_Mat(), inliers.as_raw_Mat(), method, ransac_reproj_threshold, max_iters, confidence, refine_iters) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_estimateAffine3D_Mat_src_Mat_dst_Mat_out_Mat_inliers_double_ransacThreshold_double_confidence
/// Computes an optimal affine transformation between two 3D point sets.
/// 
/// It computes
/// <div lang='latex'>
/// \begin{bmatrix}
/// x\\
/// y\\
/// z\\
/// \end{bmatrix}
/// =
/// \begin{bmatrix}
/// a_{11} & a_{12} & a_{13}\\
/// a_{21} & a_{22} & a_{23}\\
/// a_{31} & a_{32} & a_{33}\\
/// \end{bmatrix}
/// \begin{bmatrix}
/// X\\
/// Y\\
/// Z\\
/// \end{bmatrix}
/// +
/// \begin{bmatrix}
/// b_1\\
/// b_2\\
/// b_3\\
/// \end{bmatrix}
/// </div>
/// 
/// ## Parameters
/// * src: First input 3D point set containing <span lang='latex'>(X,Y,Z)</span>.
/// * dst: Second input 3D point set containing <span lang='latex'>(x,y,z)</span>.
/// * out: Output 3D affine transformation matrix <span lang='latex'>3 \times 4</span> of the form
/// <div lang='latex'>
/// \begin{bmatrix}
/// a_{11} & a_{12} & a_{13} & b_1\\
/// a_{21} & a_{22} & a_{23} & b_2\\
/// a_{31} & a_{32} & a_{33} & b_3\\
/// \end{bmatrix}
/// </div>
/// * inliers: Output vector indicating which points are inliers (1-inlier, 0-outlier).
/// * ransacThreshold: Maximum reprojection error in the RANSAC algorithm to consider a point as
/// an inlier.
/// * confidence: Confidence level, between 0 and 1, for the estimated transformation. Anything
/// between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation
/// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation.
/// 
/// The function estimates an optimal 3D affine transformation between two 3D point sets using the
/// RANSAC algorithm.
///
/// ## C++ default parameters:
/// * ransac_threshold: 3
/// * confidence: 0.99
pub fn estimate_affine3_d(src: &core::Mat, dst: &core::Mat, out: &mut core::Mat, inliers: &mut core::Mat, ransac_threshold: f64, confidence: f64) -> Result<i32> {
    unsafe { sys::cv_core_cv_estimateAffine3D_Mat_src_Mat_dst_Mat_out_Mat_inliers_double_ransacThreshold_double_confidence(src.as_raw_Mat(), dst.as_raw_Mat(), out.as_raw_Mat(), inliers.as_raw_Mat(), ransac_threshold, confidence) }.into_result()
}

// identifier: cv_estimateAffinePartial2D_Mat_from_Mat_to_Mat_inliers_int_method_double_ransacReprojThreshold_size_t_maxIters_double_confidence_size_t_refineIters
/// Computes an optimal limited affine transformation with 4 degrees of freedom between
/// two 2D point sets.
/// 
/// ## Parameters
/// * from: First input 2D point set.
/// * to: Second input 2D point set.
/// * inliers: Output vector indicating which points are inliers.
/// * method: Robust method used to compute transformation. The following methods are possible:
/// *   cv::RANSAC - RANSAC-based robust method
/// *   cv::LMEDS - Least-Median robust method
/// RANSAC is the default method.
/// * ransacReprojThreshold: Maximum reprojection error in the RANSAC algorithm to consider
/// a point as an inlier. Applies only to RANSAC.
/// * maxIters: The maximum number of robust method iterations.
/// * confidence: Confidence level, between 0 and 1, for the estimated transformation. Anything
/// between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation
/// significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation.
/// * refineIters: Maximum number of iterations of refining algorithm (Levenberg-Marquardt).
/// Passing 0 will disable refining, so the output matrix will be output of robust method.
/// 
/// @return Output 2D affine transformation (4 degrees of freedom) matrix <span lang='latex'>2 \times 3</span> or
/// empty matrix if transformation could not be estimated.
/// 
/// The function estimates an optimal 2D affine transformation with 4 degrees of freedom limited to
/// combinations of translation, rotation, and uniform scaling. Uses the selected algorithm for robust
/// estimation.
/// 
/// The computed transformation is then refined further (using only inliers) with the
/// Levenberg-Marquardt method to reduce the re-projection error even more.
/// 
/// Estimated transformation matrix is:
/// <div lang='latex'> \begin{bmatrix} \cos(\theta) \cdot s & -\sin(\theta) \cdot s & t_x \\
/// \sin(\theta) \cdot s & \cos(\theta) \cdot s & t_y
/// \end{bmatrix} </div>
/// Where <span lang='latex'> \theta </span> is the rotation angle, <span lang='latex'> s </span> the scaling factor and <span lang='latex'> t_x, t_y </span> are
/// translations in <span lang='latex'> x, y </span> axes respectively.
/// 
/// 
/// Note:
/// The RANSAC method can handle practically any ratio of outliers but need a threshold to
/// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works
/// correctly only when there are more than 50% of inliers.
/// 
/// @sa estimateAffine2D, getAffineTransform
///
/// ## C++ default parameters:
/// * inliers: noArray()
/// * method: RANSAC
/// * ransac_reproj_threshold: 3
/// * max_iters: 2000
/// * confidence: 0.99
/// * refine_iters: 10
pub fn estimate_affine_partial2_d(from: &core::Mat, to: &core::Mat, inliers: &mut core::Mat, method: i32, ransac_reproj_threshold: f64, max_iters: size_t, confidence: f64, refine_iters: size_t) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_estimateAffinePartial2D_Mat_from_Mat_to_Mat_inliers_int_method_double_ransacReprojThreshold_size_t_maxIters_double_confidence_size_t_refineIters(from.as_raw_Mat(), to.as_raw_Mat(), inliers.as_raw_Mat(), method, ransac_reproj_threshold, max_iters, confidence, refine_iters) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_estimateRigidTransform_Mat_src_Mat_dst_bool_fullAffine
/// Computes an optimal affine transformation between two 2D point sets.
/// 
/// ## Parameters
/// * src: First input 2D point set stored in std::vector or Mat, or an image stored in Mat.
/// * dst: Second input 2D point set of the same size and the same type as A, or another image.
/// * fullAffine: If true, the function finds an optimal affine transformation with no additional
/// restrictions (6 degrees of freedom). Otherwise, the class of transformations to choose from is
/// limited to combinations of translation, rotation, and uniform scaling (4 degrees of freedom).
/// 
/// The function finds an optimal affine transform *[A|b]* (a 2 x 3 floating-point matrix) that
/// approximates best the affine transformation between:
/// 
///   Two point sets
///   Two raster images. In this case, the function first finds some features in the src image and
/// finds the corresponding features in dst image. After that, the problem is reduced to the first
/// case.
/// In case of point sets, the problem is formulated as follows: you need to find a 2x2 matrix *A* and
/// 2x1 vector *b* so that:
/// 
/// <div lang='latex'>[A^*|b^*] = arg  \min _{[A|b]}  \sum _i  \| \texttt{dst}[i] - A { \texttt{src}[i]}^T - b  \| ^2</div>
/// where src[i] and dst[i] are the i-th points in src and dst, respectively
/// <span lang='latex'>[A|b]</span> can be either arbitrary (when fullAffine=true ) or have a form of
/// <div lang='latex'>\begin{bmatrix} a_{11} & a_{12} & b_1  \\ -a_{12} & a_{11} & b_2  \end{bmatrix}</div>
/// when fullAffine=false.
/// 
/// @sa
/// estimateAffine2D, estimateAffinePartial2D, getAffineTransform, getPerspectiveTransform, findHomography
pub fn estimate_rigid_transform(src: &core::Mat, dst: &core::Mat, full_affine: bool) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_estimateRigidTransform_Mat_src_Mat_dst_bool_fullAffine(src.as_raw_Mat(), dst.as_raw_Mat(), full_affine) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_estimateRigidTransform_Mat_src_Mat_dst_bool_fullAffine_int_ransacMaxIters_double_ransacGoodRatio_int_ransacSize0
pub fn estimate_rigid_transform_1(src: &core::Mat, dst: &core::Mat, full_affine: bool, ransac_max_iters: i32, ransac_good_ratio: f64, ransac_size0: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_estimateRigidTransform_Mat_src_Mat_dst_bool_fullAffine_int_ransacMaxIters_double_ransacGoodRatio_int_ransacSize0(src.as_raw_Mat(), dst.as_raw_Mat(), full_affine, ransac_max_iters, ransac_good_ratio, ransac_size0) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_evaluateFeatureDetector_Mat_img1_Mat_img2_Mat_H1to2_VectorOfKeyPoint_keypoints1_VectorOfKeyPoint_keypoints2_float_repeatability_int_correspCount_PtrOfFeature2D_fdetector
/// \
///   Functions to evaluate the feature detectors and [generic] descriptor extractors      *
///
/// ## C++ default parameters:
/// * fdetector: Ptr<FeatureDetector>()
pub fn evaluate_feature_detector(img1: &core::Mat, img2: &core::Mat, h1to2: &core::Mat, keypoints1: &types::VectorOfKeyPoint, keypoints2: &types::VectorOfKeyPoint, repeatability: f32, corresp_count: i32, fdetector: &types::PtrOfFeature2D) -> Result<()> {
    unsafe { sys::cv_core_cv_evaluateFeatureDetector_Mat_img1_Mat_img2_Mat_H1to2_VectorOfKeyPoint_keypoints1_VectorOfKeyPoint_keypoints2_float_repeatability_int_correspCount_PtrOfFeature2D_fdetector(img1.as_raw_Mat(), img2.as_raw_Mat(), h1to2.as_raw_Mat(), keypoints1.as_raw_VectorOfKeyPoint(), keypoints2.as_raw_VectorOfKeyPoint(), repeatability, corresp_count, fdetector.as_raw_PtrOfFeature2D()) }.into_result()
}

// identifier: cv_exp_Mat_src_Mat_dst
/// Calculates the exponent of every array element.
/// 
/// The function cv::exp calculates the exponent of every element of the input
/// array:
/// <div lang='latex'>\texttt{dst} [I] = e^{ src(I) }</div>
/// 
/// The maximum relative error is about 7e-6 for single-precision input and
/// less than 1e-10 for double-precision input. Currently, the function
/// converts denormalized values to zeros on output. Special values (NaN,
/// Inf) are not handled.
/// ## Parameters
/// * src: input array.
/// * dst: output array of the same size and type as src.
/// @sa log , cartToPolar , polarToCart , phase , pow , sqrt , magnitude
pub fn exp(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_exp_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_exp_softdouble_a
pub fn exp_1(a: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_exp_softdouble_a(a.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_exp_softfloat_a
/// Exponent
/// 
/// Special cases:
/// - exp(NaN) is NaN
/// - exp(-Inf) == 0
/// - exp(+Inf) == +Inf
pub fn exp_2(a: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_exp_softfloat_a(a.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_extractChannel_Mat_src_Mat_dst_int_coi
/// Extracts a single channel from src (coi is 0-based index)
/// ## Parameters
/// * src: input array
/// * dst: output array
/// * coi: index of channel to extract
/// @sa mixChannels, split
pub fn extract_channel(src: &core::Mat, dst: &mut core::Mat, coi: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_extractChannel_Mat_src_Mat_dst_int_coi(src.as_raw_Mat(), dst.as_raw_Mat(), coi) }.into_result()
}

// identifier: cv_fastAtan2_float_y_float_x
/// Calculates the angle of a 2D vector in degrees.
/// 
/// The function fastAtan2 calculates the full-range angle of an input 2D vector. The angle is measured
/// in degrees and varies from 0 to 360 degrees. The accuracy is about 0.3 degrees.
/// ## Parameters
/// * x: x-coordinate of the vector.
/// * y: y-coordinate of the vector.
pub fn fast_atan2(y: f32, x: f32) -> Result<f32> {
    unsafe { sys::cv_core_cv_fastAtan2_float_y_float_x(y, x) }.into_result()
}

// identifier: cv_fastNlMeansDenoisingColoredMulti_VectorOfMat_srcImgs_Mat_dst_int_imgToDenoiseIndex_int_temporalWindowSize_float_h_float_hColor_int_templateWindowSize_int_searchWindowSize
/// Modification of fastNlMeansDenoisingMulti function for colored images sequences
/// 
/// ## Parameters
/// * srcImgs: Input 8-bit 3-channel images sequence. All images should have the same type and
/// size.
/// * imgToDenoiseIndex: Target image to denoise index in srcImgs sequence
/// * temporalWindowSize: Number of surrounding images to use for target image denoising. Should
/// be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
/// imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
/// srcImgs[imgToDenoiseIndex] image.
/// * dst: Output image with the same size and type as srcImgs images.
/// * templateWindowSize: Size in pixels of the template patch that is used to compute weights.
/// Should be odd. Recommended value 7 pixels
/// * searchWindowSize: Size in pixels of the window that is used to compute weighted average for
/// given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
/// denoising time. Recommended value 21 pixels
/// * h: Parameter regulating filter strength for luminance component. Bigger h value perfectly
/// removes noise but also removes image details, smaller h value preserves details but also preserves
/// some noise.
/// * hColor: The same as h but for color components.
/// 
/// The function converts images to CIELAB colorspace and then separately denoise L and AB components
/// with given h parameters using fastNlMeansDenoisingMulti function.
///
/// ## C++ default parameters:
/// * h: 3
/// * h_color: 3
/// * template_window_size: 7
/// * search_window_size: 21
pub fn fast_nl_means_denoising_colored_multi(src_imgs: &types::VectorOfMat, dst: &mut core::Mat, img_to_denoise_index: i32, temporal_window_size: i32, h: f32, h_color: f32, template_window_size: i32, search_window_size: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fastNlMeansDenoisingColoredMulti_VectorOfMat_srcImgs_Mat_dst_int_imgToDenoiseIndex_int_temporalWindowSize_float_h_float_hColor_int_templateWindowSize_int_searchWindowSize(src_imgs.as_raw_VectorOfMat(), dst.as_raw_Mat(), img_to_denoise_index, temporal_window_size, h, h_color, template_window_size, search_window_size) }.into_result()
}

// identifier: cv_fastNlMeansDenoisingColored_Mat_src_Mat_dst_float_h_float_hColor_int_templateWindowSize_int_searchWindowSize
/// Modification of fastNlMeansDenoising function for colored images
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * dst: Output image with the same size and type as src .
/// * templateWindowSize: Size in pixels of the template patch that is used to compute weights.
/// Should be odd. Recommended value 7 pixels
/// * searchWindowSize: Size in pixels of the window that is used to compute weighted average for
/// given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
/// denoising time. Recommended value 21 pixels
/// * h: Parameter regulating filter strength for luminance component. Bigger h value perfectly
/// removes noise but also removes image details, smaller h value preserves details but also preserves
/// some noise
/// * hColor: The same as h but for color components. For most images value equals 10
/// will be enough to remove colored noise and do not distort colors
/// 
/// The function converts image to CIELAB colorspace and then separately denoise L and AB components
/// with given h parameters using fastNlMeansDenoising function.
///
/// ## C++ default parameters:
/// * h: 3
/// * h_color: 3
/// * template_window_size: 7
/// * search_window_size: 21
pub fn fast_nl_means_denoising_color(src: &core::Mat, dst: &mut core::Mat, h: f32, h_color: f32, template_window_size: i32, search_window_size: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fastNlMeansDenoisingColored_Mat_src_Mat_dst_float_h_float_hColor_int_templateWindowSize_int_searchWindowSize(src.as_raw_Mat(), dst.as_raw_Mat(), h, h_color, template_window_size, search_window_size) }.into_result()
}

// identifier: cv_fastNlMeansDenoisingMulti_VectorOfMat_srcImgs_Mat_dst_int_imgToDenoiseIndex_int_temporalWindowSize_VectorOffloat_h_int_templateWindowSize_int_searchWindowSize_int_normType
/// Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
/// captured in small period of time. For example video. This version of the function is for grayscale
/// images or for manual manipulation with colorspaces. For more details see
/// <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
/// 
/// ## Parameters
/// * srcImgs: Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
/// 2-channel, 3-channel or 4-channel images sequence. All images should
/// have the same type and size.
/// * imgToDenoiseIndex: Target image to denoise index in srcImgs sequence
/// * temporalWindowSize: Number of surrounding images to use for target image denoising. Should
/// be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
/// imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
/// srcImgs[imgToDenoiseIndex] image.
/// * dst: Output image with the same size and type as srcImgs images.
/// * templateWindowSize: Size in pixels of the template patch that is used to compute weights.
/// Should be odd. Recommended value 7 pixels
/// * searchWindowSize: Size in pixels of the window that is used to compute weighted average for
/// given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
/// denoising time. Recommended value 21 pixels
/// * h: Array of parameters regulating filter strength, either one
/// parameter applied to all channels or one per channel in dst. Big h value
/// perfectly removes noise but also removes image details, smaller h
/// value preserves details but also preserves some noise
/// * normType: Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1
///
/// ## C++ default parameters:
/// * template_window_size: 7
/// * search_window_size: 21
/// * norm_type: NORM_L2
pub fn fast_nl_means_denoising_multi(src_imgs: &types::VectorOfMat, dst: &mut core::Mat, img_to_denoise_index: i32, temporal_window_size: i32, h: &types::VectorOffloat, template_window_size: i32, search_window_size: i32, norm_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fastNlMeansDenoisingMulti_VectorOfMat_srcImgs_Mat_dst_int_imgToDenoiseIndex_int_temporalWindowSize_VectorOffloat_h_int_templateWindowSize_int_searchWindowSize_int_normType(src_imgs.as_raw_VectorOfMat(), dst.as_raw_Mat(), img_to_denoise_index, temporal_window_size, h.as_raw_VectorOffloat(), template_window_size, search_window_size, norm_type) }.into_result()
}

// identifier: cv_fastNlMeansDenoisingMulti_VectorOfMat_srcImgs_Mat_dst_int_imgToDenoiseIndex_int_temporalWindowSize_float_h_int_templateWindowSize_int_searchWindowSize
/// Modification of fastNlMeansDenoising function for images sequence where consecutive images have been
/// captured in small period of time. For example video. This version of the function is for grayscale
/// images or for manual manipulation with colorspaces. For more details see
/// <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394>
/// 
/// ## Parameters
/// * srcImgs: Input 8-bit 1-channel, 2-channel, 3-channel or
/// 4-channel images sequence. All images should have the same type and
/// size.
/// * imgToDenoiseIndex: Target image to denoise index in srcImgs sequence
/// * temporalWindowSize: Number of surrounding images to use for target image denoising. Should
/// be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to
/// imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise
/// srcImgs[imgToDenoiseIndex] image.
/// * dst: Output image with the same size and type as srcImgs images.
/// * templateWindowSize: Size in pixels of the template patch that is used to compute weights.
/// Should be odd. Recommended value 7 pixels
/// * searchWindowSize: Size in pixels of the window that is used to compute weighted average for
/// given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
/// denoising time. Recommended value 21 pixels
/// * h: Parameter regulating filter strength. Bigger h value
/// perfectly removes noise but also removes image details, smaller h
/// value preserves details but also preserves some noise
///
/// ## C++ default parameters:
/// * h: 3
/// * template_window_size: 7
/// * search_window_size: 21
pub fn fast_nl_means_denoising_multi_1(src_imgs: &types::VectorOfMat, dst: &mut core::Mat, img_to_denoise_index: i32, temporal_window_size: i32, h: f32, template_window_size: i32, search_window_size: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fastNlMeansDenoisingMulti_VectorOfMat_srcImgs_Mat_dst_int_imgToDenoiseIndex_int_temporalWindowSize_float_h_int_templateWindowSize_int_searchWindowSize(src_imgs.as_raw_VectorOfMat(), dst.as_raw_Mat(), img_to_denoise_index, temporal_window_size, h, template_window_size, search_window_size) }.into_result()
}

// identifier: cv_fastNlMeansDenoising_Mat_src_Mat_dst_VectorOffloat_h_int_templateWindowSize_int_searchWindowSize_int_normType
/// Perform image denoising using Non-local Means Denoising algorithm
/// <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
/// optimizations. Noise expected to be a gaussian white noise
/// 
/// ## Parameters
/// * src: Input 8-bit or 16-bit (only with NORM_L1) 1-channel,
/// 2-channel, 3-channel or 4-channel image.
/// * dst: Output image with the same size and type as src .
/// * templateWindowSize: Size in pixels of the template patch that is used to compute weights.
/// Should be odd. Recommended value 7 pixels
/// * searchWindowSize: Size in pixels of the window that is used to compute weighted average for
/// given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
/// denoising time. Recommended value 21 pixels
/// * h: Array of parameters regulating filter strength, either one
/// parameter applied to all channels or one per channel in dst. Big h value
/// perfectly removes noise but also removes image details, smaller h
/// value preserves details but also preserves some noise
/// * normType: Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1
/// 
/// This function expected to be applied to grayscale images. For colored images look at
/// fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
/// image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
/// image to CIELAB colorspace and then separately denoise L and AB components with different h
/// parameter.
///
/// ## C++ default parameters:
/// * template_window_size: 7
/// * search_window_size: 21
/// * norm_type: NORM_L2
pub fn fast_nl_means_denoising_vec(src: &core::Mat, dst: &mut core::Mat, h: &types::VectorOffloat, template_window_size: i32, search_window_size: i32, norm_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fastNlMeansDenoising_Mat_src_Mat_dst_VectorOffloat_h_int_templateWindowSize_int_searchWindowSize_int_normType(src.as_raw_Mat(), dst.as_raw_Mat(), h.as_raw_VectorOffloat(), template_window_size, search_window_size, norm_type) }.into_result()
}

// identifier: cv_fastNlMeansDenoising_Mat_src_Mat_dst_float_h_int_templateWindowSize_int_searchWindowSize
/// Perform image denoising using Non-local Means Denoising algorithm
/// <http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/> with several computational
/// optimizations. Noise expected to be a gaussian white noise
/// 
/// ## Parameters
/// * src: Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image.
/// * dst: Output image with the same size and type as src .
/// * templateWindowSize: Size in pixels of the template patch that is used to compute weights.
/// Should be odd. Recommended value 7 pixels
/// * searchWindowSize: Size in pixels of the window that is used to compute weighted average for
/// given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater
/// denoising time. Recommended value 21 pixels
/// * h: Parameter regulating filter strength. Big h value perfectly removes noise but also
/// removes image details, smaller h value preserves details but also preserves some noise
/// 
/// This function expected to be applied to grayscale images. For colored images look at
/// fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored
/// image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting
/// image to CIELAB colorspace and then separately denoise L and AB components with different h
/// parameter.
///
/// ## C++ default parameters:
/// * h: 3
/// * template_window_size: 7
/// * search_window_size: 21
pub fn fast_nl_means_denoising_window(src: &core::Mat, dst: &mut core::Mat, h: f32, template_window_size: i32, search_window_size: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fastNlMeansDenoising_Mat_src_Mat_dst_float_h_int_templateWindowSize_int_searchWindowSize(src.as_raw_Mat(), dst.as_raw_Mat(), h, template_window_size, search_window_size) }.into_result()
}

// identifier: cv_fillConvexPoly_Mat_img_Mat_points_Scalar_color_int_lineType_int_shift
/// Fills a convex polygon.
/// 
/// The function cv::fillConvexPoly draws a filled convex polygon. This function is much faster than the
/// function #fillPoly . It can fill not only convex polygons but any monotonic polygon without
/// self-intersections, that is, a polygon whose contour intersects every horizontal line (scan line)
/// twice at the most (though, its top-most and/or the bottom edge could be horizontal).
/// 
/// ## Parameters
/// * img: Image.
/// * points: Polygon vertices.
/// * color: Polygon color.
/// * lineType: Type of the polygon boundaries. See #LineTypes
/// * shift: Number of fractional bits in the vertex coordinates.
///
/// ## C++ default parameters:
/// * line_type: LINE_8
/// * shift: 0
pub fn fill_convex_poly(img: &mut core::Mat, points: &core::Mat, color: core::Scalar, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fillConvexPoly_Mat_img_Mat_points_Scalar_color_int_lineType_int_shift(img.as_raw_Mat(), points.as_raw_Mat(), color, line_type, shift) }.into_result()
}

// identifier: cv_fillConvexPoly_Mat_img_const_Point_X_pts_int_npts_Scalar_color_int_lineType_int_shift
/// @overload
///
/// ## C++ default parameters:
/// * line_type: LINE_8
/// * shift: 0
pub fn fill_convex_poly_1(img: &core::Mat, pts: &core::Point, npts: i32, color: core::Scalar, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_fillConvexPoly_Mat_img_const_Point_X_pts_int_npts_Scalar_color_int_lineType_int_shift(img.as_raw_Mat(), pts, npts, color, line_type, shift) }.into_result()
}

// identifier: cv_fillPoly_Mat_img_VectorOfMat_pts_Scalar_color_int_lineType_int_shift_Point_offset
/// Fills the area bounded by one or more polygons.
/// 
/// The function cv::fillPoly fills an area bounded by several polygonal contours. The function can fill
/// complex areas, for example, areas with holes, contours with self-intersections (some of their
/// parts), and so forth.
/// 
/// ## Parameters
/// * img: Image.
/// * pts: Array of polygons where each polygon is represented as an array of points.
/// * color: Polygon color.
/// * lineType: Type of the polygon boundaries. See #LineTypes
/// * shift: Number of fractional bits in the vertex coordinates.
/// * offset: Optional offset of all points of the contours.
///
/// ## C++ default parameters:
/// * line_type: LINE_8
/// * shift: 0
/// * offset: Point()
pub fn fill_poly(img: &mut core::Mat, pts: &types::VectorOfMat, color: core::Scalar, line_type: i32, shift: i32, offset: core::Point) -> Result<()> {
    unsafe { sys::cv_core_cv_fillPoly_Mat_img_VectorOfMat_pts_Scalar_color_int_lineType_int_shift_Point_offset(img.as_raw_Mat(), pts.as_raw_VectorOfMat(), color, line_type, shift, offset) }.into_result()
}

// identifier: cv_filter2D_Mat_src_Mat_dst_int_ddepth_Mat_kernel_Point_anchor_double_delta_int_borderType
/// Convolves an image with the kernel.
/// 
/// The function applies an arbitrary linear filter to an image. In-place operation is supported. When
/// the aperture is partially outside the image, the function interpolates outlier pixel values
/// according to the specified border mode.
/// 
/// The function does actually compute correlation, not the convolution:
/// 
/// <div lang='latex'>\texttt{dst} (x,y) =  \sum _{ \stackrel{0\leq x' < \texttt{kernel.cols},}{0\leq y' < \texttt{kernel.rows}} }  \texttt{kernel} (x',y')* \texttt{src} (x+x'- \texttt{anchor.x} ,y+y'- \texttt{anchor.y} )</div>
/// 
/// That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip
/// the kernel using #flip and set the new anchor to `(kernel.cols - anchor.x - 1, kernel.rows -
/// anchor.y - 1)`.
/// 
/// The function uses the DFT-based algorithm in case of sufficiently large kernels (~`11 x 11` or
/// larger) and the direct algorithm for small kernels.
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image of the same size and the same number of channels as src.
/// * ddepth: desired depth of the destination image, see @ref filter_depths "combinations"
/// * kernel: convolution kernel (or rather a correlation kernel), a single-channel floating point
/// matrix; if you want to apply different kernels to different channels, split the image into
/// separate color planes using split and process them individually.
/// * anchor: anchor of the kernel that indicates the relative position of a filtered point within
/// the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor
/// is at the kernel center.
/// * delta: optional value added to the filtered pixels before storing them in dst.
/// * borderType: pixel extrapolation method, see #BorderTypes
/// @sa  sepFilter2D, dft, matchTemplate
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
/// * delta: 0
/// * border_type: BORDER_DEFAULT
pub fn filter2_d(src: &core::Mat, dst: &mut core::Mat, ddepth: i32, kernel: &core::Mat, anchor: core::Point, delta: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_filter2D_Mat_src_Mat_dst_int_ddepth_Mat_kernel_Point_anchor_double_delta_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ddepth, kernel.as_raw_Mat(), anchor, delta, border_type) }.into_result()
}

// identifier: cv_filterHomographyDecompByVisibleRefpoints_VectorOfMat_rotations_VectorOfMat_normals_Mat_beforePoints_Mat_afterPoints_Mat_possibleSolutions_Mat_pointsMask
/// Filters homography decompositions based on additional information.
/// 
/// ## Parameters
/// * rotations: Vector of rotation matrices.
/// * normals: Vector of plane normal matrices.
/// * beforePoints: Vector of (rectified) visible reference points before the homography is applied
/// * afterPoints: Vector of (rectified) visible reference points after the homography is applied
/// * possibleSolutions: Vector of int indices representing the viable solution set after filtering
/// * pointsMask: optional Mat/Vector of 8u type representing the mask for the inliers as given by the findHomography function
/// 
/// This function is intended to filter the output of the decomposeHomographyMat based on additional
/// information as described in @cite Malis . The summary of the method: the decomposeHomographyMat function
/// returns 2 unique solutions and their "opposites" for a total of 4 solutions. If we have access to the
/// sets of points visible in the camera frame before and after the homography transformation is applied,
/// we can determine which are the true potential solutions and which are the opposites by verifying which
/// homographies are consistent with all visible reference points being in front of the camera. The inputs
/// are left unchanged; the filtered solution set is returned as indices into the existing one.
///
/// ## C++ default parameters:
/// * points_mask: noArray()
pub fn filter_homography_decomp_by_visible_refpoints(rotations: &types::VectorOfMat, normals: &types::VectorOfMat, before_points: &core::Mat, after_points: &core::Mat, possible_solutions: &mut core::Mat, points_mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_filterHomographyDecompByVisibleRefpoints_VectorOfMat_rotations_VectorOfMat_normals_Mat_beforePoints_Mat_afterPoints_Mat_possibleSolutions_Mat_pointsMask(rotations.as_raw_VectorOfMat(), normals.as_raw_VectorOfMat(), before_points.as_raw_Mat(), after_points.as_raw_Mat(), possible_solutions.as_raw_Mat(), points_mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_filterSpeckles_Mat_img_double_newVal_int_maxSpeckleSize_double_maxDiff_Mat_buf
/// Filters off small noise blobs (speckles) in the disparity map
/// 
/// ## Parameters
/// * img: The input 16-bit signed disparity image
/// * newVal: The disparity value used to paint-off the speckles
/// * maxSpeckleSize: The maximum speckle size to consider it a speckle. Larger blobs are not
/// affected by the algorithm
/// * maxDiff: Maximum difference between neighbor disparity pixels to put them into the same
/// blob. Note that since StereoBM, StereoSGBM and may be other algorithms return a fixed-point
/// disparity map, where disparity values are multiplied by 16, this scale factor should be taken into
/// account when specifying this parameter value.
/// * buf: The optional temporary buffer to avoid memory allocation within the function.
///
/// ## C++ default parameters:
/// * buf: noArray()
pub fn filter_speckles(img: &mut core::Mat, new_val: f64, max_speckle_size: i32, max_diff: f64, buf: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_filterSpeckles_Mat_img_double_newVal_int_maxSpeckleSize_double_maxDiff_Mat_buf(img.as_raw_Mat(), new_val, max_speckle_size, max_diff, buf.as_raw_Mat()) }.into_result()
}

// identifier: cv_find4QuadCornerSubpix_Mat_img_Mat_corners_Size_region_size
pub fn find4_quad_corner_subpix(img: &core::Mat, corners: &mut core::Mat, region_size: core::Size) -> Result<bool> {
    unsafe { sys::cv_core_cv_find4QuadCornerSubpix_Mat_img_Mat_corners_Size_region_size(img.as_raw_Mat(), corners.as_raw_Mat(), region_size) }.into_result()
}

// identifier: cv_findChessboardCorners_Mat_image_Size_patternSize_Mat_corners_int_flags
/// Finds the positions of internal corners of the chessboard.
/// 
/// ## Parameters
/// * image: Source chessboard view. It must be an 8-bit grayscale or color image.
/// * patternSize: Number of inner corners per a chessboard row and column
/// ( patternSize = cvSize(points_per_row,points_per_colum) = cvSize(columns,rows) ).
/// * corners: Output array of detected corners.
/// * flags: Various operation flags that can be zero or a combination of the following values:
/// *   **CALIB_CB_ADAPTIVE_THRESH** Use adaptive thresholding to convert the image to black
/// and white, rather than a fixed threshold level (computed from the average image brightness).
/// *   **CALIB_CB_NORMALIZE_IMAGE** Normalize the image gamma with equalizeHist before
/// applying fixed or adaptive thresholding.
/// *   **CALIB_CB_FILTER_QUADS** Use additional criteria (like contour area, perimeter,
/// square-like shape) to filter out false quads extracted at the contour retrieval stage.
/// *   **CALIB_CB_FAST_CHECK** Run a fast check on the image that looks for chessboard corners,
/// and shortcut the call if none is found. This can drastically speed up the call in the
/// degenerate condition when no chessboard is observed.
/// 
/// The function attempts to determine whether the input image is a view of the chessboard pattern and
/// locate the internal chessboard corners. The function returns a non-zero value if all of the corners
/// are found and they are placed in a certain order (row by row, left to right in every row).
/// Otherwise, if the function fails to find all the corners or reorder them, it returns 0. For example,
/// a regular chessboard has 8 x 8 squares and 7 x 7 internal corners, that is, points where the black
/// squares touch each other. The detected coordinates are approximate, and to determine their positions
/// more accurately, the function calls cornerSubPix. You also may use the function cornerSubPix with
/// different parameters if returned coordinates are not accurate enough.
/// 
/// Sample usage of detecting and drawing chessboard corners: :
/// ```ignore
/// Size patternsize(8,6); //interior number of corners
/// Mat gray = ....; //source image
/// vector<Point2f> corners; //this will be filled by the detected corners
/// 
/// //CALIB_CB_FAST_CHECK saves a lot of time on images
/// //that do not contain any chessboard corners
/// bool patternfound = findChessboardCorners(gray, patternsize, corners,
/// CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE
/// + CALIB_CB_FAST_CHECK);
/// 
/// if(patternfound)
/// cornerSubPix(gray, corners, Size(11, 11), Size(-1, -1),
/// TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
/// 
/// drawChessboardCorners(img, patternsize, Mat(corners), patternfound);
/// ```
/// 
/// 
/// Note: The function requires white space (like a square-thick border, the wider the better) around
/// the board to make the detection more robust in various environments. Otherwise, if there is no
/// border and the background is dark, the outer black squares cannot be segmented properly and so the
/// square grouping and ordering algorithm fails.
///
/// ## C++ default parameters:
/// * flags: CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE
pub fn find_chessboard_corners(image: &core::Mat, pattern_size: core::Size, corners: &mut core::Mat, flags: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_findChessboardCorners_Mat_image_Size_patternSize_Mat_corners_int_flags(image.as_raw_Mat(), pattern_size, corners.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_findContours_Mat_image_VectorOfMat_contours_Mat_hierarchy_int_mode_int_method_Point_offset
/// Finds contours in a binary image.
/// 
/// The function retrieves contours from the binary image using the algorithm @cite Suzuki85 . The contours
/// are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the
/// OpenCV sample directory.
/// 
/// Note: Since opencv 3.2 source image is not modified by this function.
/// 
/// ## Parameters
/// * image: Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero
/// pixels remain 0's, so the image is treated as binary . You can use #compare, #inRange, #threshold ,
/// #adaptiveThreshold, #Canny, and others to create a binary image out of a grayscale or color one.
/// If mode equals to #RETR_CCOMP or #RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).
/// * contours: Detected contours. Each contour is stored as a vector of points (e.g.
/// std::vector<std::vector<cv::Point> >).
/// * hierarchy: Optional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has
/// as many elements as the number of contours. For each i-th contour contours[i], the elements
/// hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] are set to 0-based indices
/// in contours of the next and previous contours at the same hierarchical level, the first child
/// contour and the parent contour, respectively. If for the contour i there are no next, previous,
/// parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
/// * mode: Contour retrieval mode, see #RetrievalModes
/// * method: Contour approximation method, see #ContourApproximationModes
/// * offset: Optional offset by which every contour point is shifted. This is useful if the
/// contours are extracted from the image ROI and then they should be analyzed in the whole image
/// context.
///
/// ## C++ default parameters:
/// * offset: Point()
pub fn find_contours_with_hierarchy(image: &mut core::Mat, contours: &mut types::VectorOfMat, hierarchy: &mut core::Mat, mode: i32, method: i32, offset: core::Point) -> Result<()> {
    unsafe { sys::cv_core_cv_findContours_Mat_image_VectorOfMat_contours_Mat_hierarchy_int_mode_int_method_Point_offset(image.as_raw_Mat(), contours.as_raw_VectorOfMat(), hierarchy.as_raw_Mat(), mode, method, offset) }.into_result()
}

// identifier: cv_findContours_Mat_image_VectorOfMat_contours_int_mode_int_method_Point_offset
/// @overload
///
/// ## C++ default parameters:
/// * offset: Point()
pub fn find_contours(image: &mut core::Mat, contours: &mut types::VectorOfMat, mode: i32, method: i32, offset: core::Point) -> Result<()> {
    unsafe { sys::cv_core_cv_findContours_Mat_image_VectorOfMat_contours_int_mode_int_method_Point_offset(image.as_raw_Mat(), contours.as_raw_VectorOfMat(), mode, method, offset) }.into_result()
}

// identifier: cv_findEssentialMat_Mat_points1_Mat_points2_Mat_cameraMatrix_int_method_double_prob_double_threshold_Mat_mask
/// Calculates an essential matrix from the corresponding points in two images.
/// 
/// ## Parameters
/// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should
/// be floating-point (single or double precision).
/// * points2: Array of the second image points of the same size and format as points1 .
/// * cameraMatrix: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> .
/// Note that this function assumes that points1 and points2 are feature points from cameras with the
/// same camera matrix.
/// * method: Method for computing an essential matrix.
/// *   **RANSAC** for the RANSAC algorithm.
/// *   **LMEDS** for the LMedS algorithm.
/// * prob: Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of
/// confidence (probability) that the estimated matrix is correct.
/// * threshold: Parameter used for RANSAC. It is the maximum distance from a point to an epipolar
/// line in pixels, beyond which the point is considered an outlier and is not used for computing the
/// final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the
/// point localization, image resolution, and the image noise.
/// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1
/// for the other points. The array is computed only in the RANSAC and LMedS methods.
/// 
/// This function estimates essential matrix based on the five-point algorithm solver in @cite Nister03 .
/// @cite SteweniusCFS is also a related. The epipolar geometry is described by the following equation:
/// 
/// <div lang='latex'>[p_2; 1]^T K^{-T} E K^{-1} [p_1; 1] = 0</div>
/// 
/// where <span lang='latex'>E</span> is an essential matrix, <span lang='latex'>p_1</span> and <span lang='latex'>p_2</span> are corresponding points in the first and the
/// second images, respectively. The result of this function may be passed further to
/// decomposeEssentialMat or recoverPose to recover the relative pose between cameras.
///
/// ## C++ default parameters:
/// * method: RANSAC
/// * prob: 0.999
/// * threshold: 1.0
/// * mask: noArray()
pub fn find_essential_map_matrix(points1: &core::Mat, points2: &core::Mat, camera_matrix: &core::Mat, method: i32, prob: f64, threshold: f64, mask: &mut core::Mat) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_findEssentialMat_Mat_points1_Mat_points2_Mat_cameraMatrix_int_method_double_prob_double_threshold_Mat_mask(points1.as_raw_Mat(), points2.as_raw_Mat(), camera_matrix.as_raw_Mat(), method, prob, threshold, mask.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_findEssentialMat_Mat_points1_Mat_points2_double_focal_Point2d_pp_int_method_double_prob_double_threshold_Mat_mask
/// @overload
/// ## Parameters
/// * points1: Array of N (N \>= 5) 2D points from the first image. The point coordinates should
/// be floating-point (single or double precision).
/// * points2: Array of the second image points of the same size and format as points1 .
/// * focal: focal length of the camera. Note that this function assumes that points1 and points2
/// are feature points from cameras with same focal length and principal point.
/// * pp: principal point of the camera.
/// * method: Method for computing a fundamental matrix.
/// *   **RANSAC** for the RANSAC algorithm.
/// *   **LMEDS** for the LMedS algorithm.
/// * threshold: Parameter used for RANSAC. It is the maximum distance from a point to an epipolar
/// line in pixels, beyond which the point is considered an outlier and is not used for computing the
/// final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the
/// point localization, image resolution, and the image noise.
/// * prob: Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of
/// confidence (probability) that the estimated matrix is correct.
/// * mask: Output array of N elements, every element of which is set to 0 for outliers and to 1
/// for the other points. The array is computed only in the RANSAC and LMedS methods.
/// 
/// This function differs from the one above that it computes camera matrix from focal length and
/// principal point:
/// 
/// <div lang='latex'>K =
/// \begin{bmatrix}
/// f & 0 & x_{pp}  \\
/// 0 & f & y_{pp}  \\
/// 0 & 0 & 1
/// \end{bmatrix}</div>
///
/// ## C++ default parameters:
/// * focal: 1.0
/// * pp: Point2d(0, 0)
/// * method: RANSAC
/// * prob: 0.999
/// * threshold: 1.0
/// * mask: noArray()
pub fn find_essential_mat(points1: &core::Mat, points2: &core::Mat, focal: f64, pp: core::Point2d, method: i32, prob: f64, threshold: f64, mask: &mut core::Mat) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_findEssentialMat_Mat_points1_Mat_points2_double_focal_Point2d_pp_int_method_double_prob_double_threshold_Mat_mask(points1.as_raw_Mat(), points2.as_raw_Mat(), focal, pp, method, prob, threshold, mask.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_findFundamentalMat_Mat_points1_Mat_points2_Mat_mask_int_method_double_ransacReprojThreshold_double_confidence
/// @overload
///
/// ## C++ default parameters:
/// * method: FM_RANSAC
/// * ransac_reproj_threshold: 3.
/// * confidence: 0.99
pub fn find_fundamental_mat(points1: &core::Mat, points2: &core::Mat, mask: &mut core::Mat, method: i32, ransac_reproj_threshold: f64, confidence: f64) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_findFundamentalMat_Mat_points1_Mat_points2_Mat_mask_int_method_double_ransacReprojThreshold_double_confidence(points1.as_raw_Mat(), points2.as_raw_Mat(), mask.as_raw_Mat(), method, ransac_reproj_threshold, confidence) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_findFundamentalMat_Mat_points1_Mat_points2_int_method_double_ransacReprojThreshold_double_confidence_Mat_mask
/// Calculates a fundamental matrix from the corresponding points in two images.
/// 
/// ## Parameters
/// * points1: Array of N points from the first image. The point coordinates should be
/// floating-point (single or double precision).
/// * points2: Array of the second image points of the same size and format as points1 .
/// * method: Method for computing a fundamental matrix.
/// *   **CV_FM_7POINT** for a 7-point algorithm. <span lang='latex'>N = 7</span>
/// *   **CV_FM_8POINT** for an 8-point algorithm. <span lang='latex'>N \ge 8</span>
/// *   **CV_FM_RANSAC** for the RANSAC algorithm. <span lang='latex'>N \ge 8</span>
/// *   **CV_FM_LMEDS** for the LMedS algorithm. <span lang='latex'>N \ge 8</span>
/// * ransacReprojThreshold: Parameter used only for RANSAC. It is the maximum distance from a point to an epipolar
/// line in pixels, beyond which the point is considered an outlier and is not used for computing the
/// final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the
/// point localization, image resolution, and the image noise.
/// * confidence: Parameter used for the RANSAC and LMedS methods only. It specifies a desirable level
/// of confidence (probability) that the estimated matrix is correct.
/// * mask
/// 
/// The: epipolar geometry is described by the following equation:
/// 
/// <div lang='latex'>[p_2; 1]^T F [p_1; 1] = 0</div>
/// 
/// where <span lang='latex'>F</span> is a fundamental matrix, <span lang='latex'>p_1</span> and <span lang='latex'>p_2</span> are corresponding points in the first and the
/// second images, respectively.
/// 
/// The function calculates the fundamental matrix using one of four methods listed above and returns
/// the found fundamental matrix. Normally just one matrix is found. But in case of the 7-point
/// algorithm, the function may return up to 3 solutions ( <span lang='latex'>9 \times 3</span> matrix that stores all 3
/// matrices sequentially).
/// 
/// The calculated fundamental matrix may be passed further to computeCorrespondEpilines that finds the
/// epipolar lines corresponding to the specified points. It can also be passed to
/// stereoRectifyUncalibrated to compute the rectification transformation. :
/// ```ignore
/// // Example. Estimation of fundamental matrix using the RANSAC algorithm
/// int point_count = 100;
/// vector<Point2f> points1(point_count);
/// vector<Point2f> points2(point_count);
/// 
/// // initialize the points here ...
/// for( int i = 0; i < point_count; i++ )
/// {
/// points1[i] = ...;
/// points2[i] = ...;
/// }
/// 
/// Mat fundamental_matrix =
/// findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99);
/// ```
///
/// ## C++ default parameters:
/// * method: FM_RANSAC
/// * ransac_reproj_threshold: 3.
/// * confidence: 0.99
/// * mask: noArray()
pub fn find_fundamental_mat_1(points1: &core::Mat, points2: &core::Mat, method: i32, ransac_reproj_threshold: f64, confidence: f64, mask: &mut core::Mat) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_findFundamentalMat_Mat_points1_Mat_points2_int_method_double_ransacReprojThreshold_double_confidence_Mat_mask(points1.as_raw_Mat(), points2.as_raw_Mat(), method, ransac_reproj_threshold, confidence, mask.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_findHomography_Mat_srcPoints_Mat_dstPoints_Mat_mask_int_method_double_ransacReprojThreshold
/// @overload
///
/// ## C++ default parameters:
/// * method: 0
/// * ransac_reproj_threshold: 3
pub fn find_homography(src_points: &core::Mat, dst_points: &core::Mat, mask: &mut core::Mat, method: i32, ransac_reproj_threshold: f64) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_findHomography_Mat_srcPoints_Mat_dstPoints_Mat_mask_int_method_double_ransacReprojThreshold(src_points.as_raw_Mat(), dst_points.as_raw_Mat(), mask.as_raw_Mat(), method, ransac_reproj_threshold) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_findHomography_Mat_srcPoints_Mat_dstPoints_int_method_double_ransacReprojThreshold_Mat_mask_int_maxIters_double_confidence
/// Finds a perspective transformation between two planes.
/// 
/// ## Parameters
/// * srcPoints: Coordinates of the points in the original plane, a matrix of the type CV_32FC2
/// or vector\<Point2f\> .
/// * dstPoints: Coordinates of the points in the target plane, a matrix of the type CV_32FC2 or
/// a vector\<Point2f\> .
/// * method: Method used to compute a homography matrix. The following methods are possible:
/// *   **0** - a regular method using all the points, i.e., the least squares method
/// *   **RANSAC** - RANSAC-based robust method
/// *   **LMEDS** - Least-Median robust method
/// *   **RHO** - PROSAC-based robust method
/// * ransacReprojThreshold: Maximum allowed reprojection error to treat a point pair as an inlier
/// (used in the RANSAC and RHO methods only). That is, if
/// <div lang='latex'>\| \texttt{dstPoints} _i -  \texttt{convertPointsHomogeneous} ( \texttt{H} * \texttt{srcPoints} _i) \|_2  >  \texttt{ransacReprojThreshold}</div>
/// then the point <span lang='latex'>i</span> is considered as an outlier. If srcPoints and dstPoints are measured in pixels,
/// it usually makes sense to set this parameter somewhere in the range of 1 to 10.
/// * mask: Optional output mask set by a robust method ( RANSAC or LMEDS ). Note that the input
/// mask values are ignored.
/// * maxIters: The maximum number of RANSAC iterations.
/// * confidence: Confidence level, between 0 and 1.
/// 
/// The function finds and returns the perspective transformation <span lang='latex'>H</span> between the source and the
/// destination planes:
/// 
/// <div lang='latex'>s_i  \vecthree{x'_i}{y'_i}{1} \sim H  \vecthree{x_i}{y_i}{1}</div>
/// 
/// so that the back-projection error
/// 
/// <div lang='latex'>\sum _i \left ( x'_i- \frac{h_{11} x_i + h_{12} y_i + h_{13}}{h_{31} x_i + h_{32} y_i + h_{33}} \right )^2+ \left ( y'_i- \frac{h_{21} x_i + h_{22} y_i + h_{23}}{h_{31} x_i + h_{32} y_i + h_{33}} \right )^2</div>
/// 
/// is minimized. If the parameter method is set to the default value 0, the function uses all the point
/// pairs to compute an initial homography estimate with a simple least-squares scheme.
/// 
/// However, if not all of the point pairs ( <span lang='latex'>srcPoints_i</span>, <span lang='latex'>dstPoints_i</span> ) fit the rigid perspective
/// transformation (that is, there are some outliers), this initial estimate will be poor. In this case,
/// you can use one of the three robust methods. The methods RANSAC, LMeDS and RHO try many different
/// random subsets of the corresponding point pairs (of four pairs each, collinear pairs are discarded), estimate the homography matrix
/// using this subset and a simple least-squares algorithm, and then compute the quality/goodness of the
/// computed homography (which is the number of inliers for RANSAC or the least median re-projection error for
/// LMeDS). The best subset is then used to produce the initial estimate of the homography matrix and
/// the mask of inliers/outliers.
/// 
/// Regardless of the method, robust or not, the computed homography matrix is refined further (using
/// inliers only in case of a robust method) with the Levenberg-Marquardt method to reduce the
/// re-projection error even more.
/// 
/// The methods RANSAC and RHO can handle practically any ratio of outliers but need a threshold to
/// distinguish inliers from outliers. The method LMeDS does not need any threshold but it works
/// correctly only when there are more than 50% of inliers. Finally, if there are no outliers and the
/// noise is rather small, use the default method (method=0).
/// 
/// The function is used to find initial intrinsic and extrinsic matrices. Homography matrix is
/// determined up to a scale. Thus, it is normalized so that <span lang='latex'>h_{33}=1</span>. Note that whenever an <span lang='latex'>H</span> matrix
/// cannot be estimated, an empty one will be returned.
/// 
/// @sa
/// getAffineTransform, estimateAffine2D, estimateAffinePartial2D, getPerspectiveTransform, warpPerspective,
/// perspectiveTransform
///
/// ## C++ default parameters:
/// * method: 0
/// * ransac_reproj_threshold: 3
/// * mask: noArray()
/// * max_iters: 2000
/// * confidence: 0.995
pub fn find_homography_full(src_points: &core::Mat, dst_points: &core::Mat, method: i32, ransac_reproj_threshold: f64, mask: &mut core::Mat, max_iters: i32, confidence: f64) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_findHomography_Mat_srcPoints_Mat_dstPoints_int_method_double_ransacReprojThreshold_Mat_mask_int_maxIters_double_confidence(src_points.as_raw_Mat(), dst_points.as_raw_Mat(), method, ransac_reproj_threshold, mask.as_raw_Mat(), max_iters, confidence) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_findNonZero_Mat_src_Mat_idx
/// Returns the list of locations of non-zero pixels
/// 
/// Given a binary matrix (likely returned from an operation such
/// as threshold(), compare(), >, ==, etc, return all of
/// the non-zero indices as a cv::Mat or std::vector<cv::Point> (x,y)
/// For example:
/// ```ignore{.cpp}
/// cv::Mat binaryImage; // input, binary image
/// cv::Mat locations;   // output, locations of non-zero pixels
/// cv::findNonZero(binaryImage, locations);
/// 
/// // access pixel coordinates
/// Point pnt = locations.at<Point>(i);
/// ```
/// 
/// or
/// ```ignore{.cpp}
/// cv::Mat binaryImage; // input, binary image
/// vector<Point> locations;   // output, locations of non-zero pixels
/// cv::findNonZero(binaryImage, locations);
/// 
/// // access pixel coordinates
/// Point pnt = locations[i];
/// ```
/// 
/// ## Parameters
/// * src: single-channel array (type CV_8UC1)
/// * idx: the output array, type of cv::Mat or std::vector<Point>, corresponding to non-zero indices in the input
pub fn find_non_zero(src: &core::Mat, idx: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_findNonZero_Mat_src_Mat_idx(src.as_raw_Mat(), idx.as_raw_Mat()) }.into_result()
}

// identifier: cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask
/// Finds the geometric transform (warp) between two images in terms of the ECC criterion @cite EP08 .
/// 
/// ## Parameters
/// * templateImage: single-channel template image; CV_8U or CV_32F array.
/// * inputImage: single-channel input image which should be warped with the final warpMatrix in
/// order to provide an image similar to templateImage, same type as temlateImage.
/// * warpMatrix: floating-point <span lang='latex'>2\times 3</span> or <span lang='latex'>3\times 3</span> mapping matrix (warp).
/// * motionType: parameter, specifying the type of motion:
/// *   **MOTION_TRANSLATION** sets a translational motion model; warpMatrix is <span lang='latex'>2\times 3</span> with
/// the first <span lang='latex'>2\times 2</span> part being the unity matrix and the rest two parameters being
/// estimated.
/// *   **MOTION_EUCLIDEAN** sets a Euclidean (rigid) transformation as motion model; three
/// parameters are estimated; warpMatrix is <span lang='latex'>2\times 3</span>.
/// *   **MOTION_AFFINE** sets an affine motion model (DEFAULT); six parameters are estimated;
/// warpMatrix is <span lang='latex'>2\times 3</span>.
/// *   **MOTION_HOMOGRAPHY** sets a homography as a motion model; eight parameters are
/// estimated;\`warpMatrix\` is <span lang='latex'>3\times 3</span>.
/// * criteria: parameter, specifying the termination criteria of the ECC algorithm;
/// criteria.epsilon defines the threshold of the increment in the correlation coefficient between two
/// iterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion).
/// Default values are shown in the declaration above.
/// * inputMask: An optional mask to indicate valid values of inputImage.
/// 
/// The function estimates the optimum transformation (warpMatrix) with respect to ECC criterion
/// (@cite EP08), that is
/// 
/// <div lang='latex'>\texttt{warpMatrix} = \texttt{warpMatrix} = \arg\max_{W} \texttt{ECC}(\texttt{templateImage}(x,y),\texttt{inputImage}(x',y'))</div>
/// 
/// where
/// 
/// <div lang='latex'>\begin{bmatrix} x' \\ y' \end{bmatrix} = W \cdot \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}</div>
/// 
/// (the equation holds with homogeneous coordinates for homography). It returns the final enhanced
/// correlation coefficient, that is the correlation coefficient between the template image and the
/// final warped input image. When a <span lang='latex'>3\times 3</span> matrix is given with motionType =0, 1 or 2, the third
/// row is ignored.
/// 
/// Unlike findHomography and estimateRigidTransform, the function findTransformECC implements an
/// area-based alignment that builds on intensity similarities. In essence, the function updates the
/// initial transformation that roughly aligns the images. If this information is missing, the identity
/// warp (unity matrix) is used as an initialization. Note that if images undergo strong
/// displacements/rotations, an initial transformation that roughly aligns the images is necessary
/// (e.g., a simple euclidean/similarity transform that allows for the images showing the same image
/// content approximately). Use inverse warping in the second image to take an image close to the first
/// one, i.e. use the flag WARP_INVERSE_MAP with warpAffine or warpPerspective. See also the OpenCV
/// sample image_alignment.cpp that demonstrates the use of the function. Note that the function throws
/// an exception if algorithm does not converges.
/// 
/// @sa
/// estimateAffine2D, estimateAffinePartial2D, findHomography
///
/// ## C++ default parameters:
/// * motion_type: MOTION_AFFINE
/// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001)
/// * input_mask: noArray()
pub fn find_transform_ecc(template_image: &core::Mat, input_image: &core::Mat, warp_matrix: &mut core::Mat, motion_type: i32, criteria: &core::TermCriteria, input_mask: &core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_findTransformECC_Mat_templateImage_Mat_inputImage_Mat_warpMatrix_int_motionType_TermCriteria_criteria_Mat_inputMask(template_image.as_raw_Mat(), input_image.as_raw_Mat(), warp_matrix.as_raw_Mat(), motion_type, criteria.as_raw_TermCriteria(), input_mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_fisheye_calibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_image_size_Mat_K_Mat_D_VectorOfMat_rvecs_VectorOfMat_tvecs_int_flags_TermCriteria_criteria
/// Performs camera calibaration
/// 
/// ## Parameters
/// * objectPoints: vector of vectors of calibration pattern points in the calibration pattern
/// coordinate space.
/// * imagePoints: vector of vectors of the projections of calibration pattern points.
/// imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to
/// objectPoints[i].size() for each i.
/// * image_size: Size of the image used only to initialize the intrinsic camera matrix.
/// * K: Output 3x3 floating-point camera matrix
/// <span lang='latex'>A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> . If
/// fisheye::CALIB_USE_INTRINSIC_GUESS/ is specified, some or all of fx, fy, cx, cy must be
/// initialized before calling the function.
/// * D: Output vector of distortion coefficients <span lang='latex'>(k_1, k_2, k_3, k_4)</span>.
/// * rvecs: Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view.
/// That is, each k-th rotation vector together with the corresponding k-th translation vector (see
/// the next output parameter description) brings the calibration pattern from the model coordinate
/// space (in which object points are specified) to the world coordinate space, that is, a real
/// position of the calibration pattern in the k-th pattern view (k=0.. *M* -1).
/// * tvecs: Output vector of translation vectors estimated for each pattern view.
/// * flags: Different flags that may be zero or a combination of the following values:
/// *   **fisheye::CALIB_USE_INTRINSIC_GUESS** cameraMatrix contains valid initial values of
/// fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image
/// center ( imageSize is used), and focal distances are computed in a least-squares fashion.
/// *   **fisheye::CALIB_RECOMPUTE_EXTRINSIC** Extrinsic will be recomputed after each iteration
/// of intrinsic optimization.
/// *   **fisheye::CALIB_CHECK_COND** The functions will check validity of condition number.
/// *   **fisheye::CALIB_FIX_SKEW** Skew coefficient (alpha) is set to zero and stay zero.
/// *   **fisheye::CALIB_FIX_K1..fisheye::CALIB_FIX_K4** Selected distortion coefficients
/// are set to zeros and stay zero.
/// *   **fisheye::CALIB_FIX_PRINCIPAL_POINT** The principal point is not changed during the global
/// optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
/// * criteria: Termination criteria for the iterative optimization algorithm.
///
/// ## C++ default parameters:
/// * flags: 0
/// * criteria: TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON)
pub fn calibrate(object_points: &types::VectorOfMat, image_points: &types::VectorOfMat, image_size: core::Size, k: &mut core::Mat, d: &mut core::Mat, rvecs: &mut types::VectorOfMat, tvecs: &mut types::VectorOfMat, flags: i32, criteria: &core::TermCriteria) -> Result<f64> {
    unsafe { sys::cv_core_cv_fisheye_calibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_image_size_Mat_K_Mat_D_VectorOfMat_rvecs_VectorOfMat_tvecs_int_flags_TermCriteria_criteria(object_points.as_raw_VectorOfMat(), image_points.as_raw_VectorOfMat(), image_size, k.as_raw_Mat(), d.as_raw_Mat(), rvecs.as_raw_VectorOfMat(), tvecs.as_raw_VectorOfMat(), flags, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_fisheye_distortPoints_Mat_undistorted_Mat_distorted_Mat_K_Mat_D_double_alpha
/// Distorts 2D points using fisheye model.
/// 
/// ## Parameters
/// * undistorted: Array of object points, 1xN/Nx1 2-channel (or vector\<Point2f\> ), where N is
/// the number of points in the view.
/// * K: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}</span>.
/// * D: Input vector of distortion coefficients <span lang='latex'>(k_1, k_2, k_3, k_4)</span>.
/// * alpha: The skew coefficient.
/// * distorted: Output array of image points, 1xN/Nx1 2-channel, or vector\<Point2f\> .
/// 
/// Note that the function assumes the camera matrix of the undistorted points to be identity.
/// This means if you want to transform back points undistorted with undistortPoints() you have to
/// multiply them with <span lang='latex'>P^{-1}</span>.
///
/// ## C++ default parameters:
/// * alpha: 0
pub fn distort_points(undistorted: &core::Mat, distorted: &mut core::Mat, k: &core::Mat, d: &core::Mat, alpha: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_fisheye_distortPoints_Mat_undistorted_Mat_distorted_Mat_K_Mat_D_double_alpha(undistorted.as_raw_Mat(), distorted.as_raw_Mat(), k.as_raw_Mat(), d.as_raw_Mat(), alpha) }.into_result()
}

// identifier: cv_fisheye_estimateNewCameraMatrixForUndistortRectify_Mat_K_Mat_D_Size_image_size_Mat_R_Mat_P_double_balance_Size_new_size_double_fov_scale
/// Estimates new camera matrix for undistortion or rectification.
/// 
/// ## Parameters
/// * K: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}</span>.
/// * image_size
/// @param: D Input vector of distortion coefficients <span lang='latex'>(k_1, k_2, k_3, k_4)</span>.
/// * R: Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3
/// 1-channel or 1x1 3-channel
/// * P: New camera matrix (3x3) or new projection matrix (3x4)
/// * balance: Sets the new focal length in range between the min focal length and the max focal
/// length. Balance is in range of [0, 1].
/// * new_size
/// @param: fov_scale Divisor for new focal length.
///
/// ## C++ default parameters:
/// * balance: 0.0
/// * new_size: Size()
/// * fov_scale: 1.0
pub fn estimate_new_camera_matrix_for_undistort_rectify(k: &core::Mat, d: &core::Mat, image_size: core::Size, r: &core::Mat, p: &mut core::Mat, balance: f64, new_size: core::Size, fov_scale: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_fisheye_estimateNewCameraMatrixForUndistortRectify_Mat_K_Mat_D_Size_image_size_Mat_R_Mat_P_double_balance_Size_new_size_double_fov_scale(k.as_raw_Mat(), d.as_raw_Mat(), image_size, r.as_raw_Mat(), p.as_raw_Mat(), balance, new_size, fov_scale) }.into_result()
}

// identifier: cv_fisheye_initUndistortRectifyMap_Mat_K_Mat_D_Mat_R_Mat_P_Size_size_int_m1type_Mat_map1_Mat_map2
/// Computes undistortion and rectification maps for image transform by cv::remap(). If D is empty zero
/// distortion is used, if R or P is empty identity matrixes are used.
/// 
/// ## Parameters
/// * K: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}</span>.
/// * D: Input vector of distortion coefficients <span lang='latex'>(k_1, k_2, k_3, k_4)</span>.
/// * R: Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3
/// 1-channel or 1x1 3-channel
/// * P: New camera matrix (3x3) or new projection matrix (3x4)
/// * size: Undistorted image size.
/// * m1type: Type of the first output map that can be CV_32FC1 or CV_16SC2 . See convertMaps()
/// for details.
/// * map1: The first output map.
/// * map2: The second output map.
pub fn init_undistort_rectify_map(k: &core::Mat, d: &core::Mat, r: &core::Mat, p: &core::Mat, size: core::Size, m1type: i32, map1: &mut core::Mat, map2: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_fisheye_initUndistortRectifyMap_Mat_K_Mat_D_Mat_R_Mat_P_Size_size_int_m1type_Mat_map1_Mat_map2(k.as_raw_Mat(), d.as_raw_Mat(), r.as_raw_Mat(), p.as_raw_Mat(), size, m1type, map1.as_raw_Mat(), map2.as_raw_Mat()) }.into_result()
}

// identifier: cv_fisheye_projectPoints_Mat_objectPoints_Mat_imagePoints_Mat_rvec_Mat_tvec_Mat_K_Mat_D_double_alpha_Mat_jacobian
/// @overload
///
/// ## C++ default parameters:
/// * alpha: 0
/// * jacobian: noArray()
pub fn fisheye_project_points(object_points: &core::Mat, image_points: &mut core::Mat, rvec: &core::Mat, tvec: &core::Mat, k: &core::Mat, d: &core::Mat, alpha: f64, jacobian: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_fisheye_projectPoints_Mat_objectPoints_Mat_imagePoints_Mat_rvec_Mat_tvec_Mat_K_Mat_D_double_alpha_Mat_jacobian(object_points.as_raw_Mat(), image_points.as_raw_Mat(), rvec.as_raw_Mat(), tvec.as_raw_Mat(), k.as_raw_Mat(), d.as_raw_Mat(), alpha, jacobian.as_raw_Mat()) }.into_result()
}

// identifier: cv_fisheye_stereoCalibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints1_VectorOfMat_imagePoints2_Mat_K1_Mat_D1_Mat_K2_Mat_D2_Size_imageSize_Mat_R_Mat_T_int_flags_TermCriteria_criteria
/// Performs stereo calibration
/// 
/// ## Parameters
/// * objectPoints: Vector of vectors of the calibration pattern points.
/// * imagePoints1: Vector of vectors of the projections of the calibration pattern points,
/// observed by the first camera.
/// * imagePoints2: Vector of vectors of the projections of the calibration pattern points,
/// observed by the second camera.
/// * K1: Input/output first camera matrix:
/// <span lang='latex'>\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}</span> , <span lang='latex'>j = 0,\, 1</span> . If
/// any of fisheye::CALIB_USE_INTRINSIC_GUESS , fisheye::CALIB_FIX_INTRINSIC are specified,
/// some or all of the matrix components must be initialized.
/// * D1: Input/output vector of distortion coefficients <span lang='latex'>(k_1, k_2, k_3, k_4)</span> of 4 elements.
/// * K2: Input/output second camera matrix. The parameter is similar to K1 .
/// * D2: Input/output lens distortion coefficients for the second camera. The parameter is
/// similar to D1 .
/// * imageSize: Size of the image used only to initialize intrinsic camera matrix.
/// * R: Output rotation matrix between the 1st and the 2nd camera coordinate systems.
/// * T: Output translation vector between the coordinate systems of the cameras.
/// * flags: Different flags that may be zero or a combination of the following values:
/// *   **fisheye::CALIB_FIX_INTRINSIC** Fix K1, K2? and D1, D2? so that only R, T matrices
/// are estimated.
/// *   **fisheye::CALIB_USE_INTRINSIC_GUESS** K1, K2 contains valid initial values of
/// fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image
/// center (imageSize is used), and focal distances are computed in a least-squares fashion.
/// *   **fisheye::CALIB_RECOMPUTE_EXTRINSIC** Extrinsic will be recomputed after each iteration
/// of intrinsic optimization.
/// *   **fisheye::CALIB_CHECK_COND** The functions will check validity of condition number.
/// *   **fisheye::CALIB_FIX_SKEW** Skew coefficient (alpha) is set to zero and stay zero.
/// *   **fisheye::CALIB_FIX_K1..4** Selected distortion coefficients are set to zeros and stay
/// zero.
/// * criteria: Termination criteria for the iterative optimization algorithm.
///
/// ## C++ default parameters:
/// * flags: fisheye::CALIB_FIX_INTRINSIC
/// * criteria: TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON)
pub fn stereo_calibrate(object_points: &types::VectorOfMat, image_points1: &types::VectorOfMat, image_points2: &types::VectorOfMat, k1: &mut core::Mat, d1: &mut core::Mat, k2: &mut core::Mat, d2: &mut core::Mat, image_size: core::Size, r: &mut core::Mat, t: &mut core::Mat, flags: i32, criteria: &core::TermCriteria) -> Result<f64> {
    unsafe { sys::cv_core_cv_fisheye_stereoCalibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints1_VectorOfMat_imagePoints2_Mat_K1_Mat_D1_Mat_K2_Mat_D2_Size_imageSize_Mat_R_Mat_T_int_flags_TermCriteria_criteria(object_points.as_raw_VectorOfMat(), image_points1.as_raw_VectorOfMat(), image_points2.as_raw_VectorOfMat(), k1.as_raw_Mat(), d1.as_raw_Mat(), k2.as_raw_Mat(), d2.as_raw_Mat(), image_size, r.as_raw_Mat(), t.as_raw_Mat(), flags, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_fisheye_stereoRectify_Mat_K1_Mat_D1_Mat_K2_Mat_D2_Size_imageSize_Mat_R_Mat_tvec_Mat_R1_Mat_R2_Mat_P1_Mat_P2_Mat_Q_int_flags_Size_newImageSize_double_balance_double_fov_scale
/// Stereo rectification for fisheye camera model
/// 
/// ## Parameters
/// * K1: First camera matrix.
/// * D1: First camera distortion parameters.
/// * K2: Second camera matrix.
/// * D2: Second camera distortion parameters.
/// * imageSize: Size of the image used for stereo calibration.
/// * R: Rotation matrix between the coordinate systems of the first and the second
/// cameras.
/// * tvec: Translation vector between coordinate systems of the cameras.
/// * R1: Output 3x3 rectification transform (rotation matrix) for the first camera.
/// * R2: Output 3x3 rectification transform (rotation matrix) for the second camera.
/// * P1: Output 3x4 projection matrix in the new (rectified) coordinate systems for the first
/// camera.
/// * P2: Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
/// camera.
/// * Q: Output <span lang='latex'>4 \times 4</span> disparity-to-depth mapping matrix (see reprojectImageTo3D ).
/// * flags: Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
/// the function makes the principal points of each camera have the same pixel coordinates in the
/// rectified views. And if the flag is not set, the function may still shift the images in the
/// horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
/// useful image area.
/// * newImageSize: New image resolution after rectification. The same size should be passed to
/// initUndistortRectifyMap (see the stereo_calib.cpp sample in OpenCV samples directory). When (0,0)
/// is passed (default), it is set to the original imageSize . Setting it to larger value can help you
/// preserve details in the original image, especially when there is a big radial distortion.
/// * balance: Sets the new focal length in range between the min focal length and the max focal
/// length. Balance is in range of [0, 1].
/// * fov_scale: Divisor for new focal length.
///
/// ## C++ default parameters:
/// * new_image_size: Size()
/// * balance: 0.0
/// * fov_scale: 1.0
pub fn stereo_rectify(k1: &core::Mat, d1: &core::Mat, k2: &core::Mat, d2: &core::Mat, image_size: core::Size, r: &core::Mat, tvec: &core::Mat, r1: &mut core::Mat, r2: &mut core::Mat, p1: &mut core::Mat, p2: &mut core::Mat, q: &mut core::Mat, flags: i32, new_image_size: core::Size, balance: f64, fov_scale: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_fisheye_stereoRectify_Mat_K1_Mat_D1_Mat_K2_Mat_D2_Size_imageSize_Mat_R_Mat_tvec_Mat_R1_Mat_R2_Mat_P1_Mat_P2_Mat_Q_int_flags_Size_newImageSize_double_balance_double_fov_scale(k1.as_raw_Mat(), d1.as_raw_Mat(), k2.as_raw_Mat(), d2.as_raw_Mat(), image_size, r.as_raw_Mat(), tvec.as_raw_Mat(), r1.as_raw_Mat(), r2.as_raw_Mat(), p1.as_raw_Mat(), p2.as_raw_Mat(), q.as_raw_Mat(), flags, new_image_size, balance, fov_scale) }.into_result()
}

// identifier: cv_fisheye_undistortImage_Mat_distorted_Mat_undistorted_Mat_K_Mat_D_Mat_Knew_Size_new_size
/// Transforms an image to compensate for fisheye lens distortion.
/// 
/// ## Parameters
/// * distorted: image with fisheye lens distortion.
/// * undistorted: Output image with compensated fisheye lens distortion.
/// * K: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}</span>.
/// * D: Input vector of distortion coefficients <span lang='latex'>(k_1, k_2, k_3, k_4)</span>.
/// * Knew: Camera matrix of the distorted image. By default, it is the identity matrix but you
/// may additionally scale and shift the result by using a different matrix.
/// * new_size
/// 
/// The: function transforms an image to compensate radial and tangential lens distortion.
/// 
/// The function is simply a combination of fisheye::initUndistortRectifyMap (with unity R ) and remap
/// (with bilinear interpolation). See the former function for details of the transformation being
/// performed.
/// 
/// See below the results of undistortImage.
/// *   a\) result of undistort of perspective camera model (all possible coefficients (k_1, k_2, k_3,
/// k_4, k_5, k_6) of distortion were optimized under calibration)
/// *   b\) result of fisheye::undistortImage of fisheye camera model (all possible coefficients (k_1, k_2,
/// k_3, k_4) of fisheye distortion were optimized under calibration)
/// *   c\) original image was captured with fisheye lens
/// 
/// Pictures a) and b) almost the same. But if we consider points of image located far from the center
/// of image, we can notice that on image a) these points are distorted.
/// 
/// ![image](pics/fisheye_undistorted.jpg)
///
/// ## C++ default parameters:
/// * knew: cv::noArray()
/// * new_size: Size()
pub fn fisheye_undistort_image(distorted: &core::Mat, undistorted: &mut core::Mat, k: &core::Mat, d: &core::Mat, knew: &core::Mat, new_size: core::Size) -> Result<()> {
    unsafe { sys::cv_core_cv_fisheye_undistortImage_Mat_distorted_Mat_undistorted_Mat_K_Mat_D_Mat_Knew_Size_new_size(distorted.as_raw_Mat(), undistorted.as_raw_Mat(), k.as_raw_Mat(), d.as_raw_Mat(), knew.as_raw_Mat(), new_size) }.into_result()
}

// identifier: cv_fisheye_undistortPoints_Mat_distorted_Mat_undistorted_Mat_K_Mat_D_Mat_R_Mat_P
/// Undistorts 2D points using fisheye model
/// 
/// ## Parameters
/// * distorted: Array of object points, 1xN/Nx1 2-channel (or vector\<Point2f\> ), where N is the
/// number of points in the view.
/// * K: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}</span>.
/// * D: Input vector of distortion coefficients <span lang='latex'>(k_1, k_2, k_3, k_4)</span>.
/// * R: Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3
/// 1-channel or 1x1 3-channel
/// * P: New camera matrix (3x3) or new projection matrix (3x4)
/// * undistorted: Output array of image points, 1xN/Nx1 2-channel, or vector\<Point2f\> .
///
/// ## C++ default parameters:
/// * r: noArray()
/// * p: noArray()
pub fn fisheye_undistort_points(distorted: &core::Mat, undistorted: &mut core::Mat, k: &core::Mat, d: &core::Mat, r: &core::Mat, p: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_fisheye_undistortPoints_Mat_distorted_Mat_undistorted_Mat_K_Mat_D_Mat_R_Mat_P(distorted.as_raw_Mat(), undistorted.as_raw_Mat(), k.as_raw_Mat(), d.as_raw_Mat(), r.as_raw_Mat(), p.as_raw_Mat()) }.into_result()
}

// identifier: cv_fitEllipseAMS_Mat_points
/// Fits an ellipse around a set of 2D points.
/// 
/// The function calculates the ellipse that fits a set of 2D points.
/// It returns the rotated rectangle in which the ellipse is inscribed.
/// The Approximate Mean Square (AMS) proposed by @cite Taubin1991 is used.
/// 
/// For an ellipse, this basis set is <span lang='latex'> \chi= \left(x^2, x y, y^2, x, y, 1\right) </span>,
/// which is a set of six free coefficients <span lang='latex'> A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} </span>.
/// However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths <span lang='latex'> (a,b) </span>,
/// the position <span lang='latex'> (x_0,y_0) </span>, and the orientation <span lang='latex'> \theta </span>. This is because the basis set includes lines,
/// quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits.
/// If the fit is found to be a parabolic or hyperbolic function then the standard #fitEllipse method is used.
/// The AMS method restricts the fit to parabolic, hyperbolic and elliptical curves
/// by imposing the condition that <span lang='latex'> A^T ( D_x^T D_x  +   D_y^T D_y) A = 1 </span> where
/// the matrices <span lang='latex'> Dx </span> and <span lang='latex'> Dy </span> are the partial derivatives of the design matrix <span lang='latex'> D </span> with
/// respect to x and y. The matrices are formed row by row applying the following to
/// each of the points in the set:
/// \f{align*}{
/// D(i,:)&=\left\{x_i^2, x_i y_i, y_i^2, x_i, y_i, 1\right\} &
/// D_x(i,:)&=\left\{2 x_i,y_i,0,1,0,0\right\} &
/// D_y(i,:)&=\left\{0,x_i,2 y_i,0,1,0\right\}
/// \f}
/// The AMS method minimizes the cost function
/// \f{equation*}{
/// \epsilon ^2=\frac{ A^T D^T D A }{ A^T (D_x^T D_x +  D_y^T D_y) A^T }
/// \f}
/// 
/// The minimum cost is found by solving the generalized eigenvalue problem.
/// 
/// \f{equation*}{
/// D^T D A = \lambda  \left( D_x^T D_x +  D_y^T D_y\right) A
/// \f}
/// 
/// ## Parameters
/// * points: Input 2D point set, stored in std::vector\<\> or Mat
pub fn fit_ellipse_ams(points: &core::Mat) -> Result<core::RotatedRect> {
    unsafe { sys::cv_core_cv_fitEllipseAMS_Mat_points(points.as_raw_Mat()) }.into_result().map(|x| core::RotatedRect { ptr: x })
}

// identifier: cv_fitEllipseDirect_Mat_points
/// Fits an ellipse around a set of 2D points.
/// 
/// The function calculates the ellipse that fits a set of 2D points.
/// It returns the rotated rectangle in which the ellipse is inscribed.
/// The Direct least square (Direct) method by @cite Fitzgibbon1999 is used.
/// 
/// For an ellipse, this basis set is <span lang='latex'> \chi= \left(x^2, x y, y^2, x, y, 1\right) </span>,
/// which is a set of six free coefficients <span lang='latex'> A^T=\left\{A_{\text{xx}},A_{\text{xy}},A_{\text{yy}},A_x,A_y,A_0\right\} </span>.
/// However, to specify an ellipse, all that is needed is five numbers; the major and minor axes lengths <span lang='latex'> (a,b) </span>,
/// the position <span lang='latex'> (x_0,y_0) </span>, and the orientation <span lang='latex'> \theta </span>. This is because the basis set includes lines,
/// quadratics, parabolic and hyperbolic functions as well as elliptical functions as possible fits.
/// The Direct method confines the fit to ellipses by ensuring that <span lang='latex'> 4 A_{xx} A_{yy}- A_{xy}^2 > 0 </span>.
/// The condition imposed is that <span lang='latex'> 4 A_{xx} A_{yy}- A_{xy}^2=1 </span> which satisfies the inequality
/// and as the coefficients can be arbitrarily scaled is not overly restrictive.
/// 
/// \f{equation*}{
/// \epsilon ^2= A^T D^T D A \quad \text{with} \quad A^T C A =1 \quad \text{and} \quad C=\left(\begin{matrix}
/// 0 & 0  & 2  & 0  & 0  &  0  \\
/// 0 & -1  & 0  & 0  & 0  &  0 \\
/// 2 & 0  & 0  & 0  & 0  &  0 \\
/// 0 & 0  & 0  & 0  & 0  &  0 \\
/// 0 & 0  & 0  & 0  & 0  &  0 \\
/// 0 & 0  & 0  & 0  & 0  &  0
/// \end{matrix} \right)
/// \f}
/// 
/// The minimum cost is found by solving the generalized eigenvalue problem.
/// 
/// \f{equation*}{
/// D^T D A = \lambda  \left( C\right) A
/// \f}
/// 
/// The system produces only one positive eigenvalue <span lang='latex'> \lambda</span> which is chosen as the solution
/// with its eigenvector <span lang='latex'>\mathbf{u}</span>. These are used to find the coefficients
/// 
/// \f{equation*}{
/// A = \sqrt{\frac{1}{\mathbf{u}^T C \mathbf{u}}}  \mathbf{u}
/// \f}
/// The scaling factor guarantees that  <span lang='latex'>A^T C A =1</span>.
/// 
/// ## Parameters
/// * points: Input 2D point set, stored in std::vector\<\> or Mat
pub fn fit_ellipse_direct(points: &core::Mat) -> Result<core::RotatedRect> {
    unsafe { sys::cv_core_cv_fitEllipseDirect_Mat_points(points.as_raw_Mat()) }.into_result().map(|x| core::RotatedRect { ptr: x })
}

// identifier: cv_fitEllipse_Mat_points
/// Fits an ellipse around a set of 2D points.
/// 
/// The function calculates the ellipse that fits (in a least-squares sense) a set of 2D points best of
/// all. It returns the rotated rectangle in which the ellipse is inscribed. The first algorithm described by @cite Fitzgibbon95
/// is used. Developer should keep in mind that it is possible that the returned
/// ellipse/rotatedRect data contains negative indices, due to the data points being close to the
/// border of the containing Mat element.
/// 
/// ## Parameters
/// * points: Input 2D point set, stored in std::vector\<\> or Mat
pub fn fit_ellipse(points: &core::Mat) -> Result<core::RotatedRect> {
    unsafe { sys::cv_core_cv_fitEllipse_Mat_points(points.as_raw_Mat()) }.into_result().map(|x| core::RotatedRect { ptr: x })
}

// identifier: cv_fitLine_Mat_points_Mat_line_int_distType_double_param_double_reps_double_aeps
/// Fits a line to a 2D or 3D point set.
/// 
/// The function fitLine fits a line to a 2D or 3D point set by minimizing <span lang='latex'>\sum_i \rho(r_i)</span> where
/// <span lang='latex'>r_i</span> is a distance between the <span lang='latex'>i^{th}</span> point, the line and <span lang='latex'>\rho(r)</span> is a distance function, one
/// of the following:
/// *  DIST_L2
/// <div lang='latex'>\rho (r) = r^2/2  \quad \text{(the simplest and the fastest least-squares method)}</div>
/// - DIST_L1
/// <div lang='latex'>\rho (r) = r</div>
/// - DIST_L12
/// <div lang='latex'>\rho (r) = 2  \cdot ( \sqrt{1 + \frac{r^2}{2}} - 1)</div>
/// - DIST_FAIR
/// <div lang='latex'>\rho \left (r \right ) = C^2  \cdot \left (  \frac{r}{C} -  \log{\left(1 + \frac{r}{C}\right)} \right )  \quad \text{where} \quad C=1.3998</div>
/// - DIST_WELSCH
/// <div lang='latex'>\rho \left (r \right ) =  \frac{C^2}{2} \cdot \left ( 1 -  \exp{\left(-\left(\frac{r}{C}\right)^2\right)} \right )  \quad \text{where} \quad C=2.9846</div>
/// - DIST_HUBER
/// <div lang='latex'>\rho (r) =  \fork{r^2/2}{if \(r < C\)}{C \cdot (r-C/2)}{otherwise} \quad \text{where} \quad C=1.345</div>
/// 
/// The algorithm is based on the M-estimator ( <http://en.wikipedia.org/wiki/M-estimator> ) technique
/// that iteratively fits the line using the weighted least-squares algorithm. After each iteration the
/// weights <span lang='latex'>w_i</span> are adjusted to be inversely proportional to <span lang='latex'>\rho(r_i)</span> .
/// 
/// ## Parameters
/// * points: Input vector of 2D or 3D points, stored in std::vector\<\> or Mat.
/// * line: Output line parameters. In case of 2D fitting, it should be a vector of 4 elements
/// (like Vec4f) - (vx, vy, x0, y0), where (vx, vy) is a normalized vector collinear to the line and
/// (x0, y0) is a point on the line. In case of 3D fitting, it should be a vector of 6 elements (like
/// Vec6f) - (vx, vy, vz, x0, y0, z0), where (vx, vy, vz) is a normalized vector collinear to the line
/// and (x0, y0, z0) is a point on the line.
/// * distType: Distance used by the M-estimator, see #DistanceTypes
/// * param: Numerical parameter ( C ) for some types of distances. If it is 0, an optimal value
/// is chosen.
/// * reps: Sufficient accuracy for the radius (distance between the coordinate origin and the line).
/// * aeps: Sufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps.
pub fn fit_line(points: &core::Mat, line: &mut core::Mat, dist_type: i32, param: f64, reps: f64, aeps: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_fitLine_Mat_points_Mat_line_int_distType_double_param_double_reps_double_aeps(points.as_raw_Mat(), line.as_raw_Mat(), dist_type, param, reps, aeps) }.into_result()
}

// identifier: cv_flip_Mat_src_Mat_dst_int_flipCode
/// Flips a 2D array around vertical, horizontal, or both axes.
/// 
/// The function cv::flip flips the array in one of three different ways (row
/// and column indices are 0-based):
/// <div lang='latex'>\texttt{dst} _{ij} =
/// \left\{
/// \begin{array}{l l}
/// \texttt{src} _{\texttt{src.rows}-i-1,j} & if\;  \texttt{flipCode} = 0 \\
/// \texttt{src} _{i, \texttt{src.cols} -j-1} & if\;  \texttt{flipCode} > 0 \\
/// \texttt{src} _{ \texttt{src.rows} -i-1, \texttt{src.cols} -j-1} & if\; \texttt{flipCode} < 0 \\
/// \end{array}
/// \right.</div>
/// The example scenarios of using the function are the following:
///   Vertical flipping of the image (flipCode == 0) to switch between
/// top-left and bottom-left image origin. This is a typical operation
/// in video processing on Microsoft Windows\* OS.
///   Horizontal flipping of the image with the subsequent horizontal
/// shift and absolute difference calculation to check for a
/// vertical-axis symmetry (flipCode \> 0).
///   Simultaneous horizontal and vertical flipping of the image with
/// the subsequent shift and absolute difference calculation to check
/// for a central symmetry (flipCode \< 0).
///   Reversing the order of point arrays (flipCode \> 0 or
/// flipCode == 0).
/// ## Parameters
/// * src: input array.
/// * dst: output array of the same size and type as src.
/// * flipCode: a flag to specify how to flip the array; 0 means
/// flipping around the x-axis and positive value (for example, 1) means
/// flipping around y-axis. Negative value (for example, -1) means flipping
/// around both axes.
/// @sa transpose , repeat , completeSymm
pub fn flip(src: &core::Mat, dst: &mut core::Mat, flip_code: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_flip_Mat_src_Mat_dst_int_flipCode(src.as_raw_Mat(), dst.as_raw_Mat(), flip_code) }.into_result()
}

// identifier: cv_floodFill_Mat_image_Mat_mask_Point_seedPoint_Scalar_newVal_Rect_X_rect_Scalar_loDiff_Scalar_upDiff_int_flags
/// Fills a connected component with the given color.
/// 
/// The function cv::floodFill fills a connected component starting from the seed point with the specified
/// color. The connectivity is determined by the color/brightness closeness of the neighbor pixels. The
/// pixel at <span lang='latex'>(x,y)</span> is considered to belong to the repainted domain if:
/// 
/// - in case of a grayscale image and floating range
/// <div lang='latex'>\texttt{src} (x',y')- \texttt{loDiff} \leq \texttt{src} (x,y)  \leq \texttt{src} (x',y')+ \texttt{upDiff}</div>
/// 
/// 
/// - in case of a grayscale image and fixed range
/// <div lang='latex'>\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)- \texttt{loDiff} \leq \texttt{src} (x,y)  \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)+ \texttt{upDiff}</div>
/// 
/// 
/// - in case of a color image and floating range
/// <div lang='latex'>\texttt{src} (x',y')_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} (x',y')_r+ \texttt{upDiff} _r,</div>
/// <div lang='latex'>\texttt{src} (x',y')_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} (x',y')_g+ \texttt{upDiff} _g</div>
/// and
/// <div lang='latex'>\texttt{src} (x',y')_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} (x',y')_b+ \texttt{upDiff} _b</div>
/// 
/// 
/// - in case of a color image and fixed range
/// <div lang='latex'>\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r- \texttt{loDiff} _r \leq \texttt{src} (x,y)_r \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_r+ \texttt{upDiff} _r,</div>
/// <div lang='latex'>\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g- \texttt{loDiff} _g \leq \texttt{src} (x,y)_g \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_g+ \texttt{upDiff} _g</div>
/// and
/// <div lang='latex'>\texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b- \texttt{loDiff} _b \leq \texttt{src} (x,y)_b \leq \texttt{src} ( \texttt{seedPoint} .x, \texttt{seedPoint} .y)_b+ \texttt{upDiff} _b</div>
/// 
/// 
/// where <span lang='latex'>src(x',y')</span> is the value of one of pixel neighbors that is already known to belong to the
/// component. That is, to be added to the connected component, a color/brightness of the pixel should
/// be close enough to:
/// - Color/brightness of one of its neighbors that already belong to the connected component in case
/// of a floating range.
/// - Color/brightness of the seed point in case of a fixed range.
/// 
/// Use these functions to either mark a connected component with the specified color in-place, or build
/// a mask and then extract the contour, or copy the region to another image, and so on.
/// 
/// ## Parameters
/// * image: Input/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the
/// function unless the #FLOODFILL_MASK_ONLY flag is set in the second variant of the function. See
/// the details below.
/// * mask: Operation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels
/// taller than image. Since this is both an input and output parameter, you must take responsibility
/// of initializing it. Flood-filling cannot go across non-zero pixels in the input mask. For example,
/// an edge detector output can be used as a mask to stop filling at edges. On output, pixels in the
/// mask corresponding to filled pixels in the image are set to 1 or to the a value specified in flags
/// as described below. Additionally, the function fills the border of the mask with ones to simplify
/// internal processing. It is therefore possible to use the same mask in multiple calls to the function
/// to make sure the filled areas do not overlap.
/// * seedPoint: Starting point.
/// * newVal: New value of the repainted domain pixels.
/// * loDiff: Maximal lower brightness/color difference between the currently observed pixel and
/// one of its neighbors belonging to the component, or a seed pixel being added to the component.
/// * upDiff: Maximal upper brightness/color difference between the currently observed pixel and
/// one of its neighbors belonging to the component, or a seed pixel being added to the component.
/// * rect: Optional output parameter set by the function to the minimum bounding rectangle of the
/// repainted domain.
/// * flags: Operation flags. The first 8 bits contain a connectivity value. The default value of
/// 4 means that only the four nearest neighbor pixels (those that share an edge) are considered. A
/// connectivity value of 8 means that the eight nearest neighbor pixels (those that share a corner)
/// will be considered. The next 8 bits (8-16) contain a value between 1 and 255 with which to fill
/// the mask (the default value is 1). For example, 4 | ( 255 \<\< 8 ) will consider 4 nearest
/// neighbours and fill the mask with a value of 255. The following additional options occupy higher
/// bits and therefore may be further combined with the connectivity and mask fill values using
/// bit-wise or (|), see #FloodFillFlags.
/// 
/// 
/// Note: Since the mask is larger than the filled image, a pixel <span lang='latex'>(x, y)</span> in image corresponds to the
/// pixel <span lang='latex'>(x+1, y+1)</span> in the mask .
/// 
/// @sa findContours
///
/// ## C++ default parameters:
/// * rect: 0
/// * lo_diff: Scalar()
/// * up_diff: Scalar()
/// * flags: 4
pub fn flood_fill(image: &mut core::Mat, mask: &mut core::Mat, seed_point: core::Point, new_val: core::Scalar, rect: &mut core::Rect, lo_diff: core::Scalar, up_diff: core::Scalar, flags: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_floodFill_Mat_image_Mat_mask_Point_seedPoint_Scalar_newVal_Rect_X_rect_Scalar_loDiff_Scalar_upDiff_int_flags(image.as_raw_Mat(), mask.as_raw_Mat(), seed_point, new_val, rect, lo_diff, up_diff, flags) }.into_result()
}

// identifier: cv_floodFill_Mat_image_Point_seedPoint_Scalar_newVal_Rect_X_rect_Scalar_loDiff_Scalar_upDiff_int_flags
/// @overload
/// 
/// variant without `mask` parameter
///
/// ## C++ default parameters:
/// * rect: 0
/// * lo_diff: Scalar()
/// * up_diff: Scalar()
/// * flags: 4
pub fn flood_fill_1(image: &mut core::Mat, seed_point: core::Point, new_val: core::Scalar, rect: &mut core::Rect, lo_diff: core::Scalar, up_diff: core::Scalar, flags: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_floodFill_Mat_image_Point_seedPoint_Scalar_newVal_Rect_X_rect_Scalar_loDiff_Scalar_upDiff_int_flags(image.as_raw_Mat(), seed_point, new_val, rect, lo_diff, up_diff, flags) }.into_result()
}

// identifier: cv_fontQt_String_nameFont_int_pointSize_Scalar_color_int_weight_int_style_int_spacing
/// Creates the font to draw a text on an image.
/// 
/// The function fontQt creates a cv::QtFont object. This cv::QtFont is not compatible with putText .
/// 
/// A basic usage of this function is the following: :
/// ```ignore
/// QtFont font = fontQt("Times");
/// addText( img1, "Hello World !", Point(50,50), font);
/// ```
/// 
/// 
/// ## Parameters
/// * nameFont: Name of the font. The name should match the name of a system font (such as
/// *Times*). If the font is not found, a default one is used.
/// * pointSize: Size of the font. If not specified, equal zero or negative, the point size of the
/// font is set to a system-dependent default value. Generally, this is 12 points.
/// * color: Color of the font in BGRA where A = 255 is fully transparent. Use the macro CV_RGB
/// for simplicity.
/// * weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control.
/// * style: Font style. Available operation flags are : cv::QtFontStyles
/// * spacing: Spacing between characters. It can be negative or positive.
///
/// ## C++ default parameters:
/// * point_size: -1
/// * color: Scalar::all(0)
/// * weight: QT_FONT_NORMAL
/// * style: QT_STYLE_NORMAL
/// * spacing: 0
pub fn font_qt(name_font: &str, point_size: i32, color: core::Scalar, weight: i32, style: i32, spacing: i32) -> Result<core::QtFont> {
    string_arg!(name_font);
    unsafe { sys::cv_core_cv_fontQt_String_nameFont_int_pointSize_Scalar_color_int_weight_int_style_int_spacing(name_font.as_ptr(), point_size, color, weight, style, spacing) }.into_result().map(|x| core::QtFont { ptr: x })
}

// identifier: cv_gemm_Mat_src1_Mat_src2_double_alpha_Mat_src3_double_beta_Mat_dst_int_flags
/// Performs generalized matrix multiplication.
/// 
/// The function cv::gemm performs generalized matrix multiplication similar to the
/// gemm functions in BLAS level 3. For example,
/// `gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)`
/// corresponds to
/// <div lang='latex'>\texttt{dst} =  \texttt{alpha} \cdot \texttt{src1} ^T  \cdot \texttt{src2} +  \texttt{beta} \cdot \texttt{src3} ^T</div>
/// 
/// In case of complex (two-channel) data, performed a complex matrix
/// multiplication.
/// 
/// The function can be replaced with a matrix expression. For example, the
/// above call can be replaced with:
/// ```ignore{.cpp}
/// dst = alpha*src1.t()*src2 + beta*src3.t();
/// ```
/// 
/// ## Parameters
/// * src1: first multiplied input matrix that could be real(CV_32FC1,
/// CV_64FC1) or complex(CV_32FC2, CV_64FC2).
/// * src2: second multiplied input matrix of the same type as src1.
/// * alpha: weight of the matrix product.
/// * src3: third optional delta matrix added to the matrix product; it
/// should have the same type as src1 and src2.
/// * beta: weight of src3.
/// * dst: output matrix; it has the proper size and the same type as
/// input matrices.
/// * flags: operation flags (cv::GemmFlags)
/// @sa mulTransposed , transform
///
/// ## C++ default parameters:
/// * flags: 0
pub fn gemm(src1: &core::Mat, src2: &core::Mat, alpha: f64, src3: &core::Mat, beta: f64, dst: &mut core::Mat, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_gemm_Mat_src1_Mat_src2_double_alpha_Mat_src3_double_beta_Mat_dst_int_flags(src1.as_raw_Mat(), src2.as_raw_Mat(), alpha, src3.as_raw_Mat(), beta, dst.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_getAffineTransform_Mat_src_Mat_dst
pub fn get_affine_transform(src: &core::Mat, dst: &core::Mat) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getAffineTransform_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getAffineTransform_const_Point2f_X_src_const_Point2f_X_dst
/// Calculates an affine transform from three pairs of the corresponding points.
/// 
/// The function calculates the <span lang='latex'>2 \times 3</span> matrix of an affine transform so that:
/// 
/// <div lang='latex'>\begin{bmatrix} x'_i \\ y'_i \end{bmatrix} = \texttt{map_matrix} \cdot \begin{bmatrix} x_i \\ y_i \\ 1 \end{bmatrix}</div>
/// 
/// where
/// 
/// <div lang='latex'>dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2</div>
/// 
/// ## Parameters
/// * src: Coordinates of triangle vertices in the source image.
/// * dst: Coordinates of the corresponding triangle vertices in the destination image.
/// 
/// @sa  warpAffine, transform
pub fn get_affine_transform_1(src: &core::Point2f, dst: &core::Point2f) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getAffineTransform_const_Point2f_X_src_const_Point2f_X_dst(src, dst) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getBuildInformation
/// Returns full configuration time cmake output.
/// 
/// Returned value is raw cmake output including version control system revision, compiler version,
/// compiler flags, enabled modules and third party libraries, etc. Output format depends on target
/// architecture.
pub fn get_build_information() -> Result<String> {
    unsafe { sys::cv_core_cv_getBuildInformation() }.into_result().map(crate::templ::receive_string)
}

// identifier: cv_getCPUTickCount
/// Returns the number of CPU ticks.
/// 
/// The function returns the current number of CPU ticks on some architectures (such as x86, x64,
/// PowerPC). On other platforms the function is equivalent to getTickCount. It can also be used for
/// very accurate time measurements, as well as for RNG initialization. Note that in case of multi-CPU
/// systems a thread, from which getCPUTickCount is called, can be suspended and resumed at another CPU
/// with its own counter. So, theoretically (and practically) the subsequent calls to the function do
/// not necessary return the monotonously increasing values. Also, since a modern CPU varies the CPU
/// frequency depending on the load, the number of CPU clocks spent in some code cannot be directly
/// converted to time units. Therefore, getTickCount is generally a preferable solution for measuring
/// execution time.
pub fn get_cpu_tick_count() -> Result<i64> {
    unsafe { sys::cv_core_cv_getCPUTickCount() }.into_result()
}

// identifier: cv_getDefaultNewCameraMatrix_Mat_cameraMatrix_Size_imgsize_bool_centerPrincipalPoint
/// Returns the default new camera matrix.
/// 
/// The function returns the camera matrix that is either an exact copy of the input cameraMatrix (when
/// centerPrinicipalPoint=false ), or the modified one (when centerPrincipalPoint=true).
/// 
/// In the latter case, the new camera matrix will be:
/// 
/// <div lang='latex'>\begin{bmatrix} f_x && 0 && ( \texttt{imgSize.width} -1)*0.5  \\ 0 && f_y && ( \texttt{imgSize.height} -1)*0.5  \\ 0 && 0 && 1 \end{bmatrix} ,</div>
/// 
/// where <span lang='latex'>f_x</span> and <span lang='latex'>f_y</span> are <span lang='latex'>(0,0)</span> and <span lang='latex'>(1,1)</span> elements of cameraMatrix, respectively.
/// 
/// By default, the undistortion functions in OpenCV (see #initUndistortRectifyMap, #undistort) do not
/// move the principal point. However, when you work with stereo, it is important to move the principal
/// points in both views to the same y-coordinate (which is required by most of stereo correspondence
/// algorithms), and may be to the same x-coordinate too. So, you can form the new camera matrix for
/// each view where the principal points are located at the center.
/// 
/// ## Parameters
/// * cameraMatrix: Input camera matrix.
/// * imgsize: Camera view image size in pixels.
/// * centerPrincipalPoint: Location of the principal point in the new camera matrix. The
/// parameter indicates whether this location should be at the image center or not.
///
/// ## C++ default parameters:
/// * imgsize: Size()
/// * center_principal_point: false
pub fn get_default_new_camera_matrix(camera_matrix: &core::Mat, imgsize: core::Size, center_principal_point: bool) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getDefaultNewCameraMatrix_Mat_cameraMatrix_Size_imgsize_bool_centerPrincipalPoint(camera_matrix.as_raw_Mat(), imgsize, center_principal_point) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getDerivKernels_Mat_kx_Mat_ky_int_dx_int_dy_int_ksize_bool_normalize_int_ktype
/// Returns filter coefficients for computing spatial image derivatives.
/// 
/// The function computes and returns the filter coefficients for spatial image derivatives. When
/// `ksize=CV_SCHARR`, the Scharr <span lang='latex'>3 \times 3</span> kernels are generated (see #Scharr). Otherwise, Sobel
/// kernels are generated (see #Sobel). The filters are normally passed to #sepFilter2D or to
/// 
/// ## Parameters
/// * kx: Output matrix of row filter coefficients. It has the type ktype .
/// * ky: Output matrix of column filter coefficients. It has the type ktype .
/// * dx: Derivative order in respect of x.
/// * dy: Derivative order in respect of y.
/// * ksize: Aperture size. It can be CV_SCHARR, 1, 3, 5, or 7.
/// * normalize: Flag indicating whether to normalize (scale down) the filter coefficients or not.
/// Theoretically, the coefficients should have the denominator <span lang='latex'>=2^{ksize*2-dx-dy-2}</span>. If you are
/// going to filter floating-point images, you are likely to use the normalized kernels. But if you
/// compute derivatives of an 8-bit image, store the results in a 16-bit image, and wish to preserve
/// all the fractional bits, you may want to set normalize=false .
/// * ktype: Type of filter coefficients. It can be CV_32f or CV_64F .
///
/// ## C++ default parameters:
/// * normalize: false
/// * ktype: CV_32F
pub fn get_deriv_kernels(kx: &mut core::Mat, ky: &mut core::Mat, dx: i32, dy: i32, ksize: i32, normalize: bool, ktype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_getDerivKernels_Mat_kx_Mat_ky_int_dx_int_dy_int_ksize_bool_normalize_int_ktype(kx.as_raw_Mat(), ky.as_raw_Mat(), dx, dy, ksize, normalize, ktype) }.into_result()
}

// identifier: cv_getElemSize_int_type
pub fn get_elem_size(_type: i32) -> Result<size_t> {
    unsafe { sys::cv_core_cv_getElemSize_int_type(_type) }.into_result()
}

// identifier: cv_getFontScaleFromHeight_int_fontFace_int_pixelHeight_int_thickness
/// Calculates the font-specific size to use to achieve a given height in pixels.
/// 
/// ## Parameters
/// * fontFace: Font to use, see cv::HersheyFonts.
/// * pixelHeight: Pixel height to compute the fontScale for
/// * thickness: Thickness of lines used to render the text.See putText for details.
/// @return The fontSize to use for cv::putText
/// 
/// @see cv::putText
///
/// ## C++ default parameters:
/// * thickness: 1
pub fn get_font_scale_from_height(font_face: i32, pixel_height: i32, thickness: i32) -> Result<f64> {
    unsafe { sys::cv_core_cv_getFontScaleFromHeight_int_fontFace_int_pixelHeight_int_thickness(font_face, pixel_height, thickness) }.into_result()
}

// identifier: cv_getGaborKernel_Size_ksize_double_sigma_double_theta_double_lambd_double_gamma_double_psi_int_ktype
/// Returns Gabor filter coefficients.
/// 
/// For more details about gabor filter equations and parameters, see: [Gabor
/// Filter](http://en.wikipedia.org/wiki/Gabor_filter).
/// 
/// ## Parameters
/// * ksize: Size of the filter returned.
/// * sigma: Standard deviation of the gaussian envelope.
/// * theta: Orientation of the normal to the parallel stripes of a Gabor function.
/// * lambd: Wavelength of the sinusoidal factor.
/// * gamma: Spatial aspect ratio.
/// * psi: Phase offset.
/// * ktype: Type of filter coefficients. It can be CV_32F or CV_64F .
///
/// ## C++ default parameters:
/// * psi: CV_PI*0.5
/// * ktype: CV_64F
pub fn get_gabor_kernel(ksize: core::Size, sigma: f64, theta: f64, lambd: f64, gamma: f64, psi: f64, ktype: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getGaborKernel_Size_ksize_double_sigma_double_theta_double_lambd_double_gamma_double_psi_int_ktype(ksize, sigma, theta, lambd, gamma, psi, ktype) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getGaussianKernel_int_ksize_double_sigma_int_ktype
/// Returns Gaussian filter coefficients.
/// 
/// The function computes and returns the <span lang='latex'>\texttt{ksize} \times 1</span> matrix of Gaussian filter
/// coefficients:
/// 
/// <div lang='latex'>G_i= \alpha *e^{-(i-( \texttt{ksize} -1)/2)^2/(2* \texttt{sigma}^2)},</div>
/// 
/// where <span lang='latex'>i=0..\texttt{ksize}-1</span> and <span lang='latex'>\alpha</span> is the scale factor chosen so that <span lang='latex'>\sum_i G_i=1</span>.
/// 
/// Two of such generated kernels can be passed to sepFilter2D. Those functions automatically recognize
/// smoothing kernels (a symmetrical kernel with sum of weights equal to 1) and handle them accordingly.
/// You may also use the higher-level GaussianBlur.
/// ## Parameters
/// * ksize: Aperture size. It should be odd ( <span lang='latex'>\texttt{ksize} \mod 2 = 1</span> ) and positive.
/// * sigma: Gaussian standard deviation. If it is non-positive, it is computed from ksize as
/// `sigma = 0.3*((ksize-1)*0.5 - 1) + 0.8`.
/// * ktype: Type of filter coefficients. It can be CV_32F or CV_64F .
/// @sa  sepFilter2D, getDerivKernels, getStructuringElement, GaussianBlur
///
/// ## C++ default parameters:
/// * ktype: CV_64F
pub fn get_gaussian_kernel(ksize: i32, sigma: f64, ktype: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getGaussianKernel_int_ksize_double_sigma_int_ktype(ksize, sigma, ktype) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getHardwareFeatureName_int_feature
/// Returns feature name by ID
/// 
/// Returns empty string if feature is not defined
pub fn get_hardware_feature_name(feature: i32) -> Result<String> {
    unsafe { sys::cv_core_cv_getHardwareFeatureName_int_feature(feature) }.into_result().map(crate::templ::receive_string_mut)
}

// identifier: cv_getMouseWheelDelta_int_flags
/// Gets the mouse-wheel motion delta, when handling mouse-wheel events cv::EVENT_MOUSEWHEEL and
/// cv::EVENT_MOUSEHWHEEL.
/// 
/// For regular mice with a scroll-wheel, delta will be a multiple of 120. The value 120 corresponds to
/// a one notch rotation of the wheel or the threshold for action to be taken and one such action should
/// occur for each delta. Some high-precision mice with higher-resolution freely-rotating wheels may
/// generate smaller values.
/// 
/// For cv::EVENT_MOUSEWHEEL positive and negative values mean forward and backward scrolling,
/// respectively. For cv::EVENT_MOUSEHWHEEL, where available, positive and negative values mean right and
/// left scrolling, respectively.
/// 
/// With the C API, the macro CV_GET_WHEEL_DELTA(flags) can be used alternatively.
/// 
/// 
/// Note:
/// 
/// Mouse-wheel events are currently supported only on Windows.
/// 
/// ## Parameters
/// * flags: The mouse callback flags parameter.
pub fn get_mouse_wheel_delta(flags: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_getMouseWheelDelta_int_flags(flags) }.into_result()
}

// identifier: cv_getNearestPoint_VectorOfPoint2f_recallPrecisionCurve_float_l_precision
pub fn get_nearest_point(recall_precision_curve: &types::VectorOfPoint2f, l_precision: f32) -> Result<i32> {
    unsafe { sys::cv_core_cv_getNearestPoint_VectorOfPoint2f_recallPrecisionCurve_float_l_precision(recall_precision_curve.as_raw_VectorOfPoint2f(), l_precision) }.into_result()
}

// identifier: cv_getNumThreads
/// Returns the number of threads used by OpenCV for parallel regions.
/// 
/// Always returns 1 if OpenCV is built without threading support.
/// 
/// The exact meaning of return value depends on the threading framework used by OpenCV library:
/// - `TBB` - The number of threads, that OpenCV will try to use for parallel regions. If there is
/// any tbb::thread_scheduler_init in user code conflicting with OpenCV, then function returns
/// default number of threads used by TBB library.
/// - `OpenMP` - An upper bound on the number of threads that could be used to form a new team.
/// - `Concurrency` - The number of threads, that OpenCV will try to use for parallel regions.
/// - `GCD` - Unsupported; returns the GCD thread pool limit (512) for compatibility.
/// - `C=` - The number of threads, that OpenCV will try to use for parallel regions, if before
/// called setNumThreads with threads \> 0, otherwise returns the number of logical CPUs,
/// available for the process.
/// @sa setNumThreads, getThreadNum
pub fn get_num_threads() -> Result<i32> {
    unsafe { sys::cv_core_cv_getNumThreads() }.into_result()
}

// identifier: cv_getNumberOfCPUs
/// Returns the number of logical CPUs available for the process.
pub fn get_number_of_cpus() -> Result<i32> {
    unsafe { sys::cv_core_cv_getNumberOfCPUs() }.into_result()
}

// identifier: cv_getOptimalDFTSize_int_vecsize
/// Returns the optimal DFT size for a given vector size.
/// 
/// DFT performance is not a monotonic function of a vector size. Therefore, when you calculate
/// convolution of two arrays or perform the spectral analysis of an array, it usually makes sense to
/// pad the input data with zeros to get a bit larger array that can be transformed much faster than the
/// original one. Arrays whose size is a power-of-two (2, 4, 8, 16, 32, ...) are the fastest to process.
/// Though, the arrays whose size is a product of 2's, 3's, and 5's (for example, 300 = 5\*5\*3\*2\*2)
/// are also processed quite efficiently.
/// 
/// The function cv::getOptimalDFTSize returns the minimum number N that is greater than or equal to vecsize
/// so that the DFT of a vector of size N can be processed efficiently. In the current implementation N
/// = 2 ^p^ \* 3 ^q^ \* 5 ^r^ for some integer p, q, r.
/// 
/// The function returns a negative number if vecsize is too large (very close to INT_MAX ).
/// 
/// While the function cannot be used directly to estimate the optimal vector size for DCT transform
/// (since the current DCT implementation supports only even-size vectors), it can be easily processed
/// as getOptimalDFTSize((vecsize+1)/2)\*2.
/// ## Parameters
/// * vecsize: vector size.
/// @sa dft , dct , idft , idct , mulSpectrums
pub fn get_optimal_dft_size(vecsize: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_getOptimalDFTSize_int_vecsize(vecsize) }.into_result()
}

// identifier: cv_getOptimalNewCameraMatrix_Mat_cameraMatrix_Mat_distCoeffs_Size_imageSize_double_alpha_Size_newImgSize_Rect_X_validPixROI_bool_centerPrincipalPoint
/// Returns the new camera matrix based on the free scaling parameter.
/// 
/// ## Parameters
/// * cameraMatrix: Input camera matrix.
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are
/// assumed.
/// * imageSize: Original image size.
/// * alpha: Free scaling parameter between 0 (when all the pixels in the undistorted image are
/// valid) and 1 (when all the source image pixels are retained in the undistorted image). See
/// stereoRectify for details.
/// * newImgSize: Image size after rectification. By default, it is set to imageSize .
/// * validPixROI: Optional output rectangle that outlines all-good-pixels region in the
/// undistorted image. See roi1, roi2 description in stereoRectify .
/// * centerPrincipalPoint: Optional flag that indicates whether in the new camera matrix the
/// principal point should be at the image center or not. By default, the principal point is chosen to
/// best fit a subset of the source image (determined by alpha) to the corrected image.
/// @return new_camera_matrix Output new camera matrix.
/// 
/// The function computes and returns the optimal new camera matrix based on the free scaling parameter.
/// By varying this parameter, you may retrieve only sensible pixels alpha=0 , keep all the original
/// image pixels if there is valuable information in the corners alpha=1 , or get something in between.
/// When alpha\>0 , the undistorted result is likely to have some black pixels corresponding to
/// "virtual" pixels outside of the captured distorted image. The original camera matrix, distortion
/// coefficients, the computed new camera matrix, and newImageSize should be passed to
/// initUndistortRectifyMap to produce the maps for remap .
///
/// ## C++ default parameters:
/// * new_img_size: Size()
/// * valid_pix_roi: 0
/// * center_principal_point: false
pub fn get_optimal_new_camera_matrix(camera_matrix: &core::Mat, dist_coeffs: &core::Mat, image_size: core::Size, alpha: f64, new_img_size: core::Size, valid_pix_roi: &mut core::Rect, center_principal_point: bool) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getOptimalNewCameraMatrix_Mat_cameraMatrix_Mat_distCoeffs_Size_imageSize_double_alpha_Size_newImgSize_Rect_X_validPixROI_bool_centerPrincipalPoint(camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), image_size, alpha, new_img_size, valid_pix_roi, center_principal_point) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getPerspectiveTransform_Mat_src_Mat_dst
/// Calculates a perspective transform from four pairs of the corresponding points.
/// 
/// The function calculates the <span lang='latex'>3 \times 3</span> matrix of a perspective transform so that:
/// 
/// <div lang='latex'>\begin{bmatrix} t_i x'_i \\ t_i y'_i \\ t_i \end{bmatrix} = \texttt{map_matrix} \cdot \begin{bmatrix} x_i \\ y_i \\ 1 \end{bmatrix}</div>
/// 
/// where
/// 
/// <div lang='latex'>dst(i)=(x'_i,y'_i), src(i)=(x_i, y_i), i=0,1,2,3</div>
/// 
/// ## Parameters
/// * src: Coordinates of quadrangle vertices in the source image.
/// * dst: Coordinates of the corresponding quadrangle vertices in the destination image.
/// 
/// @sa  findHomography, warpPerspective, perspectiveTransform
pub fn get_perspective_transform(src: &core::Mat, dst: &core::Mat) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getPerspectiveTransform_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getPerspectiveTransform_const_Point2f_X_src_const_Point2f_X_dst
pub fn get_perspective_transform_1(src: &core::Point2f, dst: &core::Point2f) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getPerspectiveTransform_const_Point2f_X_src_const_Point2f_X_dst(src, dst) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getRecall_VectorOfPoint2f_recallPrecisionCurve_float_l_precision
pub fn get_recall(recall_precision_curve: &types::VectorOfPoint2f, l_precision: f32) -> Result<f32> {
    unsafe { sys::cv_core_cv_getRecall_VectorOfPoint2f_recallPrecisionCurve_float_l_precision(recall_precision_curve.as_raw_VectorOfPoint2f(), l_precision) }.into_result()
}

// identifier: cv_getRectSubPix_Mat_image_Size_patchSize_Point2f_center_Mat_patch_int_patchType
/// Retrieves a pixel rectangle from an image with sub-pixel accuracy.
/// 
/// The function getRectSubPix extracts pixels from src:
/// 
/// <div lang='latex'>patch(x, y) = src(x +  \texttt{center.x} - ( \texttt{dst.cols} -1)*0.5, y +  \texttt{center.y} - ( \texttt{dst.rows} -1)*0.5)</div>
/// 
/// where the values of the pixels at non-integer coordinates are retrieved using bilinear
/// interpolation. Every channel of multi-channel images is processed independently. Also
/// the image should be a single channel or three channel image. While the center of the
/// rectangle must be inside the image, parts of the rectangle may be outside.
/// 
/// ## Parameters
/// * image: Source image.
/// * patchSize: Size of the extracted patch.
/// * center: Floating point coordinates of the center of the extracted rectangle within the
/// source image. The center must be inside the image.
/// * patch: Extracted patch that has the size patchSize and the same number of channels as src .
/// * patchType: Depth of the extracted pixels. By default, they have the same depth as src .
/// 
/// @sa  warpAffine, warpPerspective
///
/// ## C++ default parameters:
/// * patch_type: -1
pub fn get_rect_sub_pix(image: &core::Mat, patch_size: core::Size, center: core::Point2f, patch: &mut core::Mat, patch_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_getRectSubPix_Mat_image_Size_patchSize_Point2f_center_Mat_patch_int_patchType(image.as_raw_Mat(), patch_size, center, patch.as_raw_Mat(), patch_type) }.into_result()
}

// identifier: cv_getRotationMatrix2D_Point2f_center_double_angle_double_scale
/// Calculates an affine matrix of 2D rotation.
/// 
/// The function calculates the following matrix:
/// 
/// <div lang='latex'>\begin{bmatrix} \alpha &  \beta & (1- \alpha )  \cdot \texttt{center.x} -  \beta \cdot \texttt{center.y} \\ - \beta &  \alpha &  \beta \cdot \texttt{center.x} + (1- \alpha )  \cdot \texttt{center.y} \end{bmatrix}</div>
/// 
/// where
/// 
/// <div lang='latex'>\begin{array}{l} \alpha =  \texttt{scale} \cdot \cos \texttt{angle} , \\ \beta =  \texttt{scale} \cdot \sin \texttt{angle} \end{array}</div>
/// 
/// The transformation maps the rotation center to itself. If this is not the target, adjust the shift.
/// 
/// ## Parameters
/// * center: Center of the rotation in the source image.
/// * angle: Rotation angle in degrees. Positive values mean counter-clockwise rotation (the
/// coordinate origin is assumed to be the top-left corner).
/// * scale: Isotropic scale factor.
/// 
/// @sa  getAffineTransform, warpAffine, transform
pub fn get_rotation_matrix2_d(center: core::Point2f, angle: f64, scale: f64) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getRotationMatrix2D_Point2f_center_double_angle_double_scale(center, angle, scale) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getStructuringElement_int_shape_Size_ksize_Point_anchor
/// Returns a structuring element of the specified size and shape for morphological operations.
/// 
/// The function constructs and returns the structuring element that can be further passed to #erode,
/// #dilate or #morphologyEx. But you can also construct an arbitrary binary mask yourself and use it as
/// the structuring element.
/// 
/// ## Parameters
/// * shape: Element shape that could be one of #MorphShapes
/// * ksize: Size of the structuring element.
/// * anchor: Anchor position within the element. The default value <span lang='latex'>(-1, -1)</span> means that the
/// anchor is at the center. Note that only the shape of a cross-shaped element depends on the anchor
/// position. In other cases the anchor just regulates how much the result of the morphological
/// operation is shifted.
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
pub fn get_structuring_element(shape: i32, ksize: core::Size, anchor: core::Point) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_getStructuringElement_int_shape_Size_ksize_Point_anchor(shape, ksize, anchor) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_getTextSize_String_text_int_fontFace_double_fontScale_int_thickness_int_X_baseLine
/// Calculates the width and height of a text string.
/// 
/// The function cv::getTextSize calculates and returns the size of a box that contains the specified text.
/// That is, the following code renders some text, the tight box surrounding it, and the baseline: :
/// ```ignore
/// String text = "Funny text inside the box";
/// int fontFace = FONT_HERSHEY_SCRIPT_SIMPLEX;
/// double fontScale = 2;
/// int thickness = 3;
/// 
/// Mat img(600, 800, CV_8UC3, Scalar::all(0));
/// 
/// int baseline=0;
/// Size textSize = getTextSize(text, fontFace,
/// fontScale, thickness, &baseline);
/// baseline += thickness;
/// 
/// // center the text
/// Point textOrg((img.cols - textSize.width)/2,
/// (img.rows + textSize.height)/2);
/// 
/// // draw the box
/// rectangle(img, textOrg + Point(0, baseline),
/// textOrg + Point(textSize.width, -textSize.height),
/// Scalar(0,0,255));
/// // ... and the baseline first
/// line(img, textOrg + Point(0, thickness),
/// textOrg + Point(textSize.width, thickness),
/// Scalar(0, 0, 255));
/// 
/// // then put the text itself
/// putText(img, text, textOrg, fontFace, fontScale,
/// Scalar::all(255), thickness, 8);
/// ```
/// 
/// 
/// ## Parameters
/// * text: Input text string.
/// * fontFace: Font to use, see #HersheyFonts.
/// * fontScale: Font scale factor that is multiplied by the font-specific base size.
/// * thickness: Thickness of lines used to render the text. See #putText for details.
/// @param[out] baseLine y-coordinate of the baseline relative to the bottom-most text
/// point.
/// @return The size of a box that contains the specified text.
/// 
/// @see putText
pub fn get_text_size(text: &str, font_face: i32, font_scale: f64, thickness: i32, base_line: &mut i32) -> Result<core::Size> {
    string_arg!(text);
    unsafe { sys::cv_core_cv_getTextSize_String_text_int_fontFace_double_fontScale_int_thickness_int_X_baseLine(text.as_ptr(), font_face, font_scale, thickness, base_line) }.into_result()
}

// identifier: cv_getThreadNum
/// Returns the index of the currently executed thread within the current parallel region. Always
/// returns 0 if called outside of parallel region.
/// 
/// @deprecated Current implementation doesn't corresponding to this documentation.
/// 
/// The exact meaning of the return value depends on the threading framework used by OpenCV library:
/// - `TBB` - Unsupported with current 4.1 TBB release. Maybe will be supported in future.
/// - `OpenMP` - The thread number, within the current team, of the calling thread.
/// - `Concurrency` - An ID for the virtual processor that the current context is executing on (0
/// for master thread and unique number for others, but not necessary 1,2,3,...).
/// - `GCD` - System calling thread's ID. Never returns 0 inside parallel region.
/// - `C=` - The index of the current parallel task.
/// @sa setNumThreads, getNumThreads
pub fn get_thread_num() -> Result<i32> {
    unsafe { sys::cv_core_cv_getThreadNum() }.into_result()
}

// identifier: cv_getTickCount
/// Returns the number of ticks.
/// 
/// The function returns the number of ticks after the certain event (for example, when the machine was
/// turned on). It can be used to initialize RNG or to measure a function execution time by reading the
/// tick count before and after the function call.
/// @sa getTickFrequency, TickMeter
pub fn get_tick_count() -> Result<i64> {
    unsafe { sys::cv_core_cv_getTickCount() }.into_result()
}

// identifier: cv_getTickFrequency
/// Returns the number of ticks per second.
/// 
/// The function returns the number of ticks per second. That is, the following code computes the
/// execution time in seconds:
/// ```ignore
/// double t = (double)getTickCount();
/// // do something ...
/// t = ((double)getTickCount() - t)/getTickFrequency();
/// ```
/// 
/// @sa getTickCount, TickMeter
pub fn get_tick_frequency() -> Result<f64> {
    unsafe { sys::cv_core_cv_getTickFrequency() }.into_result()
}

// identifier: cv_getTrackbarPos_String_trackbarname_String_winname
/// Returns the trackbar position.
/// 
/// The function returns the current position of the specified trackbar.
/// 
/// 
/// Note:
/// 
/// [__Qt Backend Only__] winname can be empty (or NULL) if the trackbar is attached to the control
/// panel.
/// 
/// ## Parameters
/// * trackbarname: Name of the trackbar.
/// * winname: Name of the window that is the parent of the trackbar.
pub fn get_trackbar_pos(trackbarname: &str, winname: &str) -> Result<i32> {
    string_arg!(trackbarname);
    string_arg!(winname);
    unsafe { sys::cv_core_cv_getTrackbarPos_String_trackbarname_String_winname(trackbarname.as_ptr(), winname.as_ptr()) }.into_result()
}

// identifier: cv_getValidDisparityROI_Rect_roi1_Rect_roi2_int_minDisparity_int_numberOfDisparities_int_SADWindowSize
pub fn get_valid_disparity_roi(roi1: core::Rect, roi2: core::Rect, min_disparity: i32, number_of_disparities: i32, sad_window_size: i32) -> Result<core::Rect> {
    unsafe { sys::cv_core_cv_getValidDisparityROI_Rect_roi1_Rect_roi2_int_minDisparity_int_numberOfDisparities_int_SADWindowSize(roi1, roi2, min_disparity, number_of_disparities, sad_window_size) }.into_result()
}

// identifier: cv_getVersionMajor
/// Returns major library version
pub fn get_version_major() -> Result<i32> {
    unsafe { sys::cv_core_cv_getVersionMajor() }.into_result()
}

// identifier: cv_getVersionMinor
/// Returns minor library version
pub fn get_version_minor() -> Result<i32> {
    unsafe { sys::cv_core_cv_getVersionMinor() }.into_result()
}

// identifier: cv_getVersionRevision
/// Returns revision field of the library version
pub fn get_version_revision() -> Result<i32> {
    unsafe { sys::cv_core_cv_getVersionRevision() }.into_result()
}

// identifier: cv_getVersionString
/// Returns library version string
/// 
/// For example "3.4.1-dev".
/// 
/// @sa getMajorVersion, getMinorVersion, getRevisionVersion
pub fn get_version_string() -> Result<String> {
    unsafe { sys::cv_core_cv_getVersionString() }.into_result().map(crate::templ::receive_string_mut)
}

// identifier: cv_getWindowImageRect_String_winname
/// Provides rectangle of image in the window.
/// 
/// The function getWindowImageRect returns the client screen coordinates, width and height of the image rendering area.
/// 
/// ## Parameters
/// * winname: Name of the window.
/// 
/// @sa resizeWindow moveWindow
pub fn get_window_image_rect(winname: &str) -> Result<core::Rect> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_getWindowImageRect_String_winname(winname.as_ptr()) }.into_result()
}

// identifier: cv_getWindowProperty_String_winname_int_prop_id
/// Provides parameters of a window.
/// 
/// The function getWindowProperty returns properties of a window.
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * prop_id: Window property to retrieve. The following operation flags are available: (cv::WindowPropertyFlags)
/// 
/// @sa setWindowProperty
pub fn get_window_property(winname: &str, prop_id: i32) -> Result<f64> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_getWindowProperty_String_winname_int_prop_id(winname.as_ptr(), prop_id) }.into_result()
}

// identifier: cv_glob_String_pattern_VectorOfString_result_bool_recursive
///
/// ## C++ default parameters:
/// * recursive: false
pub fn glob(pattern: &str, result: &types::VectorOfString, recursive: bool) -> Result<()> {
    string_arg!(mut pattern);
    unsafe { sys::cv_core_cv_glob_String_pattern_VectorOfString_result_bool_recursive(pattern.as_ptr() as _, result.as_raw_VectorOfString(), recursive) }.into_result()
}

// identifier: cv_goodFeaturesToTrack_Mat_image_Mat_corners_int_maxCorners_double_qualityLevel_double_minDistance_Mat_mask_int_blockSize_bool_useHarrisDetector_double_k
/// Determines strong corners on an image.
/// 
/// The function finds the most prominent corners in the image or in the specified image region, as
/// described in @cite Shi94
/// 
/// *   Function calculates the corner quality measure at every source image pixel using the
/// #cornerMinEigenVal or #cornerHarris .
/// *   Function performs a non-maximum suppression (the local maximums in *3 x 3* neighborhood are
/// retained).
/// *   The corners with the minimal eigenvalue less than
/// <span lang='latex'>\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)</span> are rejected.
/// *   The remaining corners are sorted by the quality measure in the descending order.
/// *   Function throws away each corner for which there is a stronger corner at a distance less than
/// maxDistance.
/// 
/// The function can be used to initialize a point-based tracker of an object.
/// 
/// 
/// Note: If the function is called with different values A and B of the parameter qualityLevel , and
/// A \> B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector
/// with qualityLevel=B .
/// 
/// ## Parameters
/// * image: Input 8-bit or floating-point 32-bit, single-channel image.
/// * corners: Output vector of detected corners.
/// * maxCorners: Maximum number of corners to return. If there are more corners than are found,
/// the strongest of them is returned. `maxCorners <= 0` implies that no limit on the maximum is set
/// and all detected corners are returned.
/// * qualityLevel: Parameter characterizing the minimal accepted quality of image corners. The
/// parameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue
/// (see #cornerMinEigenVal ) or the Harris function response (see #cornerHarris ). The corners with the
/// quality measure less than the product are rejected. For example, if the best corner has the
/// quality measure = 1500, and the qualityLevel=0.01 , then all the corners with the quality measure
/// less than 15 are rejected.
/// * minDistance: Minimum possible Euclidean distance between the returned corners.
/// * mask: Optional region of interest. If the image is not empty (it needs to have the type
/// CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected.
/// * blockSize: Size of an average block for computing a derivative covariation matrix over each
/// pixel neighborhood. See cornerEigenValsAndVecs .
/// * useHarrisDetector: Parameter indicating whether to use a Harris detector (see #cornerHarris)
/// or #cornerMinEigenVal.
/// * k: Free parameter of the Harris detector.
/// 
/// @sa  cornerMinEigenVal, cornerHarris, calcOpticalFlowPyrLK, estimateRigidTransform,
///
/// ## C++ default parameters:
/// * mask: noArray()
/// * block_size: 3
/// * use_harris_detector: false
/// * k: 0.04
pub fn good_features_to_track(image: &core::Mat, corners: &mut core::Mat, max_corners: i32, quality_level: f64, min_distance: f64, mask: &core::Mat, block_size: i32, use_harris_detector: bool, k: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_goodFeaturesToTrack_Mat_image_Mat_corners_int_maxCorners_double_qualityLevel_double_minDistance_Mat_mask_int_blockSize_bool_useHarrisDetector_double_k(image.as_raw_Mat(), corners.as_raw_Mat(), max_corners, quality_level, min_distance, mask.as_raw_Mat(), block_size, use_harris_detector, k) }.into_result()
}

// identifier: cv_goodFeaturesToTrack_Mat_image_Mat_corners_int_maxCorners_double_qualityLevel_double_minDistance_Mat_mask_int_blockSize_int_gradientSize_bool_useHarrisDetector_double_k
///
/// ## C++ default parameters:
/// * use_harris_detector: false
/// * k: 0.04
pub fn good_features_to_track_1(image: &core::Mat, corners: &mut core::Mat, max_corners: i32, quality_level: f64, min_distance: f64, mask: &core::Mat, block_size: i32, gradient_size: i32, use_harris_detector: bool, k: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_goodFeaturesToTrack_Mat_image_Mat_corners_int_maxCorners_double_qualityLevel_double_minDistance_Mat_mask_int_blockSize_int_gradientSize_bool_useHarrisDetector_double_k(image.as_raw_Mat(), corners.as_raw_Mat(), max_corners, quality_level, min_distance, mask.as_raw_Mat(), block_size, gradient_size, use_harris_detector, k) }.into_result()
}

// identifier: cv_grabCut_Mat_img_Mat_mask_Rect_rect_Mat_bgdModel_Mat_fgdModel_int_iterCount_int_mode
/// Runs the GrabCut algorithm.
/// 
/// The function implements the [GrabCut image segmentation algorithm](http://en.wikipedia.org/wiki/GrabCut).
/// 
/// ## Parameters
/// * img: Input 8-bit 3-channel image.
/// * mask: Input/output 8-bit single-channel mask. The mask is initialized by the function when
/// mode is set to #GC_INIT_WITH_RECT. Its elements may have one of the #GrabCutClasses.
/// * rect: ROI containing a segmented object. The pixels outside of the ROI are marked as
/// "obvious background". The parameter is only used when mode==#GC_INIT_WITH_RECT .
/// * bgdModel: Temporary array for the background model. Do not modify it while you are
/// processing the same image.
/// * fgdModel: Temporary arrays for the foreground model. Do not modify it while you are
/// processing the same image.
/// * iterCount: Number of iterations the algorithm should make before returning the result. Note
/// that the result can be refined with further calls with mode==#GC_INIT_WITH_MASK or
/// mode==GC_EVAL .
/// * mode: Operation mode that could be one of the #GrabCutModes
///
/// ## C++ default parameters:
/// * mode: GC_EVAL
pub fn grab_cut(img: &core::Mat, mask: &mut core::Mat, rect: core::Rect, bgd_model: &mut core::Mat, fgd_model: &mut core::Mat, iter_count: i32, mode: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_grabCut_Mat_img_Mat_mask_Rect_rect_Mat_bgdModel_Mat_fgdModel_int_iterCount_int_mode(img.as_raw_Mat(), mask.as_raw_Mat(), rect, bgd_model.as_raw_Mat(), fgd_model.as_raw_Mat(), iter_count, mode) }.into_result()
}

// identifier: cv_groupRectangles_VectorOfRect_rectList_VectorOfint_rejectLevels_VectorOfdouble_levelWeights_int_groupThreshold_double_eps
/// @overload
///
/// ## C++ default parameters:
/// * eps: 0.2
pub fn group_rectangles_weights_rejects(rect_list: &types::VectorOfRect, reject_levels: &types::VectorOfint, level_weights: &types::VectorOfdouble, group_threshold: i32, eps: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_groupRectangles_VectorOfRect_rectList_VectorOfint_rejectLevels_VectorOfdouble_levelWeights_int_groupThreshold_double_eps(rect_list.as_raw_VectorOfRect(), reject_levels.as_raw_VectorOfint(), level_weights.as_raw_VectorOfdouble(), group_threshold, eps) }.into_result()
}

// identifier: cv_groupRectangles_VectorOfRect_rectList_VectorOfint_weights_int_groupThreshold_double_eps
/// @overload
///
/// ## C++ default parameters:
/// * eps: 0.2
pub fn group_rectangle_weights(rect_list: &types::VectorOfRect, weights: &types::VectorOfint, group_threshold: i32, eps: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_groupRectangles_VectorOfRect_rectList_VectorOfint_weights_int_groupThreshold_double_eps(rect_list.as_raw_VectorOfRect(), weights.as_raw_VectorOfint(), group_threshold, eps) }.into_result()
}

// identifier: cv_groupRectangles_VectorOfRect_rectList_int_groupThreshold_double_eps
/// Groups the object candidate rectangles.
/// 
/// ## Parameters
/// * rectList: Input/output vector of rectangles. Output vector includes retained and grouped
/// rectangles. (The Python list is not modified in place.)
/// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a
/// group of rectangles to retain it.
/// * eps: Relative difference between sides of the rectangles to merge them into a group.
/// 
/// The function is a wrapper for the generic function partition . It clusters all the input rectangles
/// using the rectangle equivalence criteria that combines rectangles with similar sizes and similar
/// locations. The similarity is defined by eps. When eps=0 , no clustering is done at all. If
/// <span lang='latex'>\texttt{eps}\rightarrow +\inf</span> , all the rectangles are put in one cluster. Then, the small
/// clusters containing less than or equal to groupThreshold rectangles are rejected. In each other
/// cluster, the average rectangle is computed and put into the output rectangle list.
///
/// ## C++ default parameters:
/// * eps: 0.2
pub fn group_rectangle(rect_list: &types::VectorOfRect, group_threshold: i32, eps: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_groupRectangles_VectorOfRect_rectList_int_groupThreshold_double_eps(rect_list.as_raw_VectorOfRect(), group_threshold, eps) }.into_result()
}

// identifier: cv_groupRectangles_VectorOfRect_rectList_int_groupThreshold_double_eps_VectorOfint_weights_VectorOfdouble_levelWeights
/// @overload
pub fn group_rectangle_levelweights(rect_list: &types::VectorOfRect, group_threshold: i32, eps: f64, weights: &types::VectorOfint, level_weights: &types::VectorOfdouble) -> Result<()> {
    unsafe { sys::cv_core_cv_groupRectangles_VectorOfRect_rectList_int_groupThreshold_double_eps_VectorOfint_weights_VectorOfdouble_levelWeights(rect_list.as_raw_VectorOfRect(), group_threshold, eps, weights.as_raw_VectorOfint(), level_weights.as_raw_VectorOfdouble()) }.into_result()
}

// identifier: cv_groupRectangles_meanshift_VectorOfRect_rectList_VectorOfdouble_foundWeights_VectorOfdouble_foundScales_double_detectThreshold_Size_winDetSize
/// @overload
///
/// ## C++ default parameters:
/// * detect_threshold: 0.0
/// * win_det_size: Size(64, 128)
pub fn group_rectangles_meanshift(rect_list: &types::VectorOfRect, found_weights: &types::VectorOfdouble, found_scales: &types::VectorOfdouble, detect_threshold: f64, win_det_size: core::Size) -> Result<()> {
    unsafe { sys::cv_core_cv_groupRectangles_meanshift_VectorOfRect_rectList_VectorOfdouble_foundWeights_VectorOfdouble_foundScales_double_detectThreshold_Size_winDetSize(rect_list.as_raw_VectorOfRect(), found_weights.as_raw_VectorOfdouble(), found_scales.as_raw_VectorOfdouble(), detect_threshold, win_det_size) }.into_result()
}

// identifier: cv_hal_Cholesky32f_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n
pub fn cholesky32f(a: &mut f32, astep: size_t, m: i32, b: &mut f32, bstep: size_t, n: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_hal_Cholesky32f_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_hal_Cholesky64f_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n
pub fn cholesky64f(a: &mut f64, astep: size_t, m: i32, b: &mut f64, bstep: size_t, n: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_hal_Cholesky64f_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_hal_LU32f_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n
pub fn lu32f(a: &mut f32, astep: size_t, m: i32, b: &mut f32, bstep: size_t, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_LU32f_float_X_A_size_t_astep_int_m_float_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_hal_LU64f_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n
pub fn lu64f(a: &mut f64, astep: size_t, m: i32, b: &mut f64, bstep: size_t, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_LU64f_double_X_A_size_t_astep_int_m_double_X_b_size_t_bstep_int_n(a, astep, m, b, bstep, n) }.into_result()
}

// identifier: cv_hal_QR32f_float_X_A_size_t_astep_int_m_int_n_int_k_float_X_b_size_t_bstep_float_X_hFactors
pub fn qr32f(a: &mut f32, astep: size_t, m: i32, n: i32, k: i32, b: &mut f32, bstep: size_t, h_factors: &mut f32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_QR32f_float_X_A_size_t_astep_int_m_int_n_int_k_float_X_b_size_t_bstep_float_X_hFactors(a, astep, m, n, k, b, bstep, h_factors) }.into_result()
}

// identifier: cv_hal_QR64f_double_X_A_size_t_astep_int_m_int_n_int_k_double_X_b_size_t_bstep_double_X_hFactors
pub fn qr64f(a: &mut f64, astep: size_t, m: i32, n: i32, k: i32, b: &mut f64, bstep: size_t, h_factors: &mut f64) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_QR64f_double_X_A_size_t_astep_int_m_int_n_int_k_double_X_b_size_t_bstep_double_X_hFactors(a, astep, m, n, k, b, bstep, h_factors) }.into_result()
}

// identifier: cv_hal_SVD32f_float_X_At_size_t_astep_float_X_W_float_X_U_size_t_ustep_float_X_Vt_size_t_vstep_int_m_int_n_int_flags
pub fn svd32f(at: &mut f32, astep: size_t, w: &mut f32, u: &mut f32, ustep: size_t, vt: &mut f32, vstep: size_t, m: i32, n: i32, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_SVD32f_float_X_At_size_t_astep_float_X_W_float_X_U_size_t_ustep_float_X_Vt_size_t_vstep_int_m_int_n_int_flags(at, astep, w, u, ustep, vt, vstep, m, n, flags) }.into_result()
}

// identifier: cv_hal_SVD64f_double_X_At_size_t_astep_double_X_W_double_X_U_size_t_ustep_double_X_Vt_size_t_vstep_int_m_int_n_int_flags
pub fn svd64f(at: &mut f64, astep: size_t, w: &mut f64, u: &mut f64, ustep: size_t, vt: &mut f64, vstep: size_t, m: i32, n: i32, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_SVD64f_double_X_At_size_t_astep_double_X_W_double_X_U_size_t_ustep_double_X_Vt_size_t_vstep_int_m_int_n_int_flags(at, astep, w, u, ustep, vt, vstep, m, n, flags) }.into_result()
}

// identifier: cv_hal_absdiff16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn absdiff16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_absdiff16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_absdiff16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn absdiff16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_absdiff16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_absdiff32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn absdiff32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_absdiff32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_absdiff32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn absdiff32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_absdiff32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_absdiff64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn absdiff64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_absdiff64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_absdiff8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn absdiff8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_absdiff8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_absdiff8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn absdiff8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_absdiff8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_add16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn add16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_add16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_add16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn add16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_add16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_add32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn add32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_add32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_add32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn add32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_add32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_add64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn add64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_add64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_add8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn add8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_add8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_add8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn add8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_add8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_addWeighted16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scalars
pub fn add_weighted16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, scalars: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_addWeighted16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scalars(src1, step1, src2, step2, dst, step, width, height, scalars) }.into_result()
}

// identifier: cv_hal_addWeighted16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scalars
pub fn add_weighted16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, scalars: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_addWeighted16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scalars(src1, step1, src2, step2, dst, step, width, height, scalars) }.into_result()
}

// identifier: cv_hal_addWeighted32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scalars
pub fn add_weighted32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, scalars: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_addWeighted32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scalars(src1, step1, src2, step2, dst, step, width, height, scalars) }.into_result()
}

// identifier: cv_hal_addWeighted32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scalars
pub fn add_weighted32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, scalars: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_addWeighted32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scalars(src1, step1, src2, step2, dst, step, width, height, scalars) }.into_result()
}

// identifier: cv_hal_addWeighted64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scalars
pub fn add_weighted64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, scalars: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_addWeighted64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scalars(src1, step1, src2, step2, dst, step, width, height, scalars) }.into_result()
}

// identifier: cv_hal_addWeighted8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scalars
pub fn add_weighted8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, scalars: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_addWeighted8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scalars(src1, step1, src2, step2, dst, step, width, height, scalars) }.into_result()
}

// identifier: cv_hal_addWeighted8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__scalars
pub fn add_weighted8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _scalars: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_addWeighted8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__scalars(src1, step1, src2, step2, dst, step, width, height, _scalars) }.into_result()
}

// identifier: cv_hal_and8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn and8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_and8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_cmp16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop
pub fn cmp16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _cmpop: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cmp16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop(src1, step1, src2, step2, dst, step, width, height, _cmpop) }.into_result()
}

// identifier: cv_hal_cmp16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop
pub fn cmp16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _cmpop: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cmp16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop(src1, step1, src2, step2, dst, step, width, height, _cmpop) }.into_result()
}

// identifier: cv_hal_cmp32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop
pub fn cmp32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _cmpop: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cmp32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop(src1, step1, src2, step2, dst, step, width, height, _cmpop) }.into_result()
}

// identifier: cv_hal_cmp32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop
pub fn cmp32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _cmpop: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cmp32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop(src1, step1, src2, step2, dst, step, width, height, _cmpop) }.into_result()
}

// identifier: cv_hal_cmp64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop
pub fn cmp64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _cmpop: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cmp64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop(src1, step1, src2, step2, dst, step, width, height, _cmpop) }.into_result()
}

// identifier: cv_hal_cmp8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop
pub fn cmp8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _cmpop: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cmp8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop(src1, step1, src2, step2, dst, step, width, height, _cmpop) }.into_result()
}

// identifier: cv_hal_cmp8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop
pub fn cmp8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, _cmpop: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cmp8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X__cmpop(src1, step1, src2, step2, dst, step, width, height, _cmpop) }.into_result()
}

// identifier: cv_hal_cvtBGR5x5toBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_dcn_bool_swapBlue_int_greenBits
pub fn cvt_bgr5x5to_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, dcn: i32, swap_blue: bool, green_bits: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGR5x5toBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_dcn_bool_swapBlue_int_greenBits(src_data, src_step, dst_data, dst_step, width, height, dcn, swap_blue, green_bits) }.into_result()
}

// identifier: cv_hal_cvtBGR5x5toGray_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_greenBits
pub fn cvt_bgr5x5to_gray(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, green_bits: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGR5x5toGray_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_greenBits(src_data, src_step, dst_data, dst_step, width, height, green_bits) }.into_result()
}

// identifier: cv_hal_cvtBGRtoBGR5x5_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_scn_bool_swapBlue_int_greenBits
pub fn cvt_bg_rto_bgr5x5(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, scn: i32, swap_blue: bool, green_bits: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoBGR5x5_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_scn_bool_swapBlue_int_greenBits(src_data, src_step, dst_data, dst_step, width, height, scn, swap_blue, green_bits) }.into_result()
}

// identifier: cv_hal_cvtBGRtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_int_dcn_bool_swapBlue
pub fn cvt_bg_rto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, scn: i32, dcn: i32, swap_blue: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_int_dcn_bool_swapBlue(src_data, src_step, dst_data, dst_step, width, height, depth, scn, dcn, swap_blue) }.into_result()
}

// identifier: cv_hal_cvtBGRtoGray_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue
pub fn cvt_bg_rto_gray(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, scn: i32, swap_blue: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoGray_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue(src_data, src_step, dst_data, dst_step, width, height, depth, scn, swap_blue) }.into_result()
}

// identifier: cv_hal_cvtBGRtoHSV_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue_bool_isFullRange_bool_isHSV
pub fn cvt_bg_rto_hsv(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, scn: i32, swap_blue: bool, is_full_range: bool, is_hsv: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoHSV_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue_bool_isFullRange_bool_isHSV(src_data, src_step, dst_data, dst_step, width, height, depth, scn, swap_blue, is_full_range, is_hsv) }.into_result()
}

// identifier: cv_hal_cvtBGRtoLab_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue_bool_isLab_bool_srgb
pub fn cvt_bg_rto_lab(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, scn: i32, swap_blue: bool, is_lab: bool, srgb: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoLab_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue_bool_isLab_bool_srgb(src_data, src_step, dst_data, dst_step, width, height, depth, scn, swap_blue, is_lab, srgb) }.into_result()
}

// identifier: cv_hal_cvtBGRtoThreePlaneYUV_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_scn_bool_swapBlue_int_uIdx
pub fn cvt_bg_rto_three_plane_yuv(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, scn: i32, swap_blue: bool, u_idx: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoThreePlaneYUV_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_scn_bool_swapBlue_int_uIdx(src_data, src_step, dst_data, dst_step, width, height, scn, swap_blue, u_idx) }.into_result()
}

// identifier: cv_hal_cvtBGRtoTwoPlaneYUV_const_uchar_X_src_data_size_t_src_step_uchar_X_y_data_uchar_X_uv_data_size_t_dst_step_int_width_int_height_int_scn_bool_swapBlue_int_uIdx
pub fn cvt_bg_rto_two_plane_yuv(src_data: &u8, src_step: size_t, y_data: &mut u8, uv_data: &mut u8, dst_step: size_t, width: i32, height: i32, scn: i32, swap_blue: bool, u_idx: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoTwoPlaneYUV_const_uchar_X_src_data_size_t_src_step_uchar_X_y_data_uchar_X_uv_data_size_t_dst_step_int_width_int_height_int_scn_bool_swapBlue_int_uIdx(src_data, src_step, y_data, uv_data, dst_step, width, height, scn, swap_blue, u_idx) }.into_result()
}

// identifier: cv_hal_cvtBGRtoXYZ_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue
pub fn cvt_bg_rto_xyz(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, scn: i32, swap_blue: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoXYZ_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue(src_data, src_step, dst_data, dst_step, width, height, depth, scn, swap_blue) }.into_result()
}

// identifier: cv_hal_cvtBGRtoYUV_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue_bool_isCbCr
pub fn cvt_bg_rto_yuv(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, scn: i32, swap_blue: bool, is_cb_cr: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtBGRtoYUV_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_scn_bool_swapBlue_bool_isCbCr(src_data, src_step, dst_data, dst_step, width, height, depth, scn, swap_blue, is_cb_cr) }.into_result()
}

// identifier: cv_hal_cvtGraytoBGR5x5_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_greenBits
pub fn cvt_grayto_bgr5x5(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, green_bits: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtGraytoBGR5x5_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_greenBits(src_data, src_step, dst_data, dst_step, width, height, green_bits) }.into_result()
}

// identifier: cv_hal_cvtGraytoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn
pub fn cvt_grayto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, dcn: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtGraytoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn(src_data, src_step, dst_data, dst_step, width, height, depth, dcn) }.into_result()
}

// identifier: cv_hal_cvtHSVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue_bool_isFullRange_bool_isHSV
pub fn cvt_hs_vto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, dcn: i32, swap_blue: bool, is_full_range: bool, is_hsv: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtHSVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue_bool_isFullRange_bool_isHSV(src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swap_blue, is_full_range, is_hsv) }.into_result()
}

// identifier: cv_hal_cvtLabtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue_bool_isLab_bool_srgb
pub fn cvt_labto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, dcn: i32, swap_blue: bool, is_lab: bool, srgb: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtLabtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue_bool_isLab_bool_srgb(src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swap_blue, is_lab, srgb) }.into_result()
}

// identifier: cv_hal_cvtMultipliedRGBAtoRGBA_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height
pub fn cvt_multiplied_rgb_ato_rgba(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtMultipliedRGBAtoRGBA_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height(src_data, src_step, dst_data, dst_step, width, height) }.into_result()
}

// identifier: cv_hal_cvtOnePlaneYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_dcn_bool_swapBlue_int_uIdx_int_ycn
pub fn cvt_one_plane_yu_vto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, dcn: i32, swap_blue: bool, u_idx: i32, ycn: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtOnePlaneYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_dcn_bool_swapBlue_int_uIdx_int_ycn(src_data, src_step, dst_data, dst_step, width, height, dcn, swap_blue, u_idx, ycn) }.into_result()
}

// identifier: cv_hal_cvtRGBAtoMultipliedRGBA_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height
pub fn cvt_rgb_ato_multiplied_rgba(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtRGBAtoMultipliedRGBA_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height(src_data, src_step, dst_data, dst_step, width, height) }.into_result()
}

// identifier: cv_hal_cvtThreePlaneYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_int_dcn_bool_swapBlue_int_uIdx
pub fn cvt_three_plane_yu_vto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, dst_width: i32, dst_height: i32, dcn: i32, swap_blue: bool, u_idx: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtThreePlaneYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_int_dcn_bool_swapBlue_int_uIdx(src_data, src_step, dst_data, dst_step, dst_width, dst_height, dcn, swap_blue, u_idx) }.into_result()
}

// identifier: cv_hal_cvtTwoPlaneYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_int_dcn_bool_swapBlue_int_uIdx
pub fn cvt_two_plane_yu_vto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, dst_width: i32, dst_height: i32, dcn: i32, swap_blue: bool, u_idx: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtTwoPlaneYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_int_dcn_bool_swapBlue_int_uIdx(src_data, src_step, dst_data, dst_step, dst_width, dst_height, dcn, swap_blue, u_idx) }.into_result()
}

// identifier: cv_hal_cvtTwoPlaneYUVtoBGR_const_uchar_X_y_data_const_uchar_X_uv_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_int_dcn_bool_swapBlue_int_uIdx
pub fn cvt_two_plane_yu_vto_bgr_1(y_data: &u8, uv_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, dst_width: i32, dst_height: i32, dcn: i32, swap_blue: bool, u_idx: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtTwoPlaneYUVtoBGR_const_uchar_X_y_data_const_uchar_X_uv_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_int_dcn_bool_swapBlue_int_uIdx(y_data, uv_data, src_step, dst_data, dst_step, dst_width, dst_height, dcn, swap_blue, u_idx) }.into_result()
}

// identifier: cv_hal_cvtXYZtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue
pub fn cvt_xy_zto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, dcn: i32, swap_blue: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtXYZtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue(src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swap_blue) }.into_result()
}

// identifier: cv_hal_cvtYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue_bool_isCbCr
pub fn cvt_yu_vto_bgr(src_data: &u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, depth: i32, dcn: i32, swap_blue: bool, is_cb_cr: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_cvtYUVtoBGR_const_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_depth_int_dcn_bool_swapBlue_bool_isCbCr(src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swap_blue, is_cb_cr) }.into_result()
}

// identifier: cv_hal_div16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn div16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_div16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_div16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn div16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_div16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_div32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn div32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_div32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_div32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn div32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_div32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_div64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn div64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_div64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_div8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn div8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_div8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_div8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn div8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_div8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_exp32f_const_float_X_src_float_X_dst_int_n
pub fn exp32f(src: &f32, dst: &mut f32, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_exp32f_const_float_X_src_float_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_exp64f_const_double_X_src_double_X_dst_int_n
pub fn exp64f(src: &f64, dst: &mut f64, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_exp64f_const_double_X_src_double_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_exp_const_double_X_src_double_X_dst_int_n
pub fn exp_3(src: &f64, dst: &mut f64, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_exp_const_double_X_src_double_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_exp_const_float_X_src_float_X_dst_int_n
pub fn exp_4(src: &f32, dst: &mut f32, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_exp_const_float_X_src_float_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_fastAtan2_const_float_X_y_const_float_X_x_float_X_dst_int_n_bool_angleInDegrees
pub fn fast_atan3(y: &f32, x: &f32, dst: &mut f32, n: i32, angle_in_degrees: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_fastAtan2_const_float_X_y_const_float_X_x_float_X_dst_int_n_bool_angleInDegrees(y, x, dst, n, angle_in_degrees) }.into_result()
}

// identifier: cv_hal_fastAtan32f_const_float_X_y_const_float_X_x_float_X_dst_int_n_bool_angleInDegrees
pub fn fast_atan32f(y: &f32, x: &f32, dst: &mut f32, n: i32, angle_in_degrees: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_fastAtan32f_const_float_X_y_const_float_X_x_float_X_dst_int_n_bool_angleInDegrees(y, x, dst, n, angle_in_degrees) }.into_result()
}

// identifier: cv_hal_fastAtan64f_const_double_X_y_const_double_X_x_double_X_dst_int_n_bool_angleInDegrees
pub fn fast_atan64f(y: &f64, x: &f64, dst: &mut f64, n: i32, angle_in_degrees: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_fastAtan64f_const_double_X_y_const_double_X_x_double_X_dst_int_n_bool_angleInDegrees(y, x, dst, n, angle_in_degrees) }.into_result()
}

// identifier: cv_hal_filter2D_int_stype_int_dtype_int_kernel_type_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_full_width_int_full_height_int_offset_x_int_offset_y_uchar_X_kernel_data_size_t_kernel_step_int_kernel_width_int_kernel_height_int_anchor_x_int_anchor_y_double_delta_int_borderType_bool_isSubmatrix
pub fn filter2_d_1(stype: i32, dtype: i32, kernel_type: i32, src_data: &mut u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, full_width: i32, full_height: i32, offset_x: i32, offset_y: i32, kernel_data: &mut u8, kernel_step: size_t, kernel_width: i32, kernel_height: i32, anchor_x: i32, anchor_y: i32, delta: f64, border_type: i32, is_submatrix: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_filter2D_int_stype_int_dtype_int_kernel_type_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_full_width_int_full_height_int_offset_x_int_offset_y_uchar_X_kernel_data_size_t_kernel_step_int_kernel_width_int_kernel_height_int_anchor_x_int_anchor_y_double_delta_int_borderType_bool_isSubmatrix(stype, dtype, kernel_type, src_data, src_step, dst_data, dst_step, width, height, full_width, full_height, offset_x, offset_y, kernel_data, kernel_step, kernel_width, kernel_height, anchor_x, anchor_y, delta, border_type, is_submatrix) }.into_result()
}

// identifier: cv_hal_gemm32f_const_float_X_src1_size_t_src1_step_const_float_X_src2_size_t_src2_step_float_alpha_const_float_X_src3_size_t_src3_step_float_beta_float_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags
pub fn gemm32f(src1: &f32, src1_step: size_t, src2: &f32, src2_step: size_t, alpha: f32, src3: &f32, src3_step: size_t, beta: f32, dst: &mut f32, dst_step: size_t, m_a: i32, n_a: i32, n_d: i32, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_gemm32f_const_float_X_src1_size_t_src1_step_const_float_X_src2_size_t_src2_step_float_alpha_const_float_X_src3_size_t_src3_step_float_beta_float_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags(src1, src1_step, src2, src2_step, alpha, src3, src3_step, beta, dst, dst_step, m_a, n_a, n_d, flags) }.into_result()
}

// identifier: cv_hal_gemm32fc_const_float_X_src1_size_t_src1_step_const_float_X_src2_size_t_src2_step_float_alpha_const_float_X_src3_size_t_src3_step_float_beta_float_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags
pub fn gemm32fc(src1: &f32, src1_step: size_t, src2: &f32, src2_step: size_t, alpha: f32, src3: &f32, src3_step: size_t, beta: f32, dst: &mut f32, dst_step: size_t, m_a: i32, n_a: i32, n_d: i32, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_gemm32fc_const_float_X_src1_size_t_src1_step_const_float_X_src2_size_t_src2_step_float_alpha_const_float_X_src3_size_t_src3_step_float_beta_float_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags(src1, src1_step, src2, src2_step, alpha, src3, src3_step, beta, dst, dst_step, m_a, n_a, n_d, flags) }.into_result()
}

// identifier: cv_hal_gemm64f_const_double_X_src1_size_t_src1_step_const_double_X_src2_size_t_src2_step_double_alpha_const_double_X_src3_size_t_src3_step_double_beta_double_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags
pub fn gemm64f(src1: &f64, src1_step: size_t, src2: &f64, src2_step: size_t, alpha: f64, src3: &f64, src3_step: size_t, beta: f64, dst: &mut f64, dst_step: size_t, m_a: i32, n_a: i32, n_d: i32, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_gemm64f_const_double_X_src1_size_t_src1_step_const_double_X_src2_size_t_src2_step_double_alpha_const_double_X_src3_size_t_src3_step_double_beta_double_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags(src1, src1_step, src2, src2_step, alpha, src3, src3_step, beta, dst, dst_step, m_a, n_a, n_d, flags) }.into_result()
}

// identifier: cv_hal_gemm64fc_const_double_X_src1_size_t_src1_step_const_double_X_src2_size_t_src2_step_double_alpha_const_double_X_src3_size_t_src3_step_double_beta_double_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags
pub fn gemm64fc(src1: &f64, src1_step: size_t, src2: &f64, src2_step: size_t, alpha: f64, src3: &f64, src3_step: size_t, beta: f64, dst: &mut f64, dst_step: size_t, m_a: i32, n_a: i32, n_d: i32, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_gemm64fc_const_double_X_src1_size_t_src1_step_const_double_X_src2_size_t_src2_step_double_alpha_const_double_X_src3_size_t_src3_step_double_beta_double_X_dst_size_t_dst_step_int_m_a_int_n_a_int_n_d_int_flags(src1, src1_step, src2, src2_step, alpha, src3, src3_step, beta, dst, dst_step, m_a, n_a, n_d, flags) }.into_result()
}

// identifier: cv_hal_integral_int_depth_int_sdepth_int_sqdepth_const_uchar_X_src_size_t_srcstep_uchar_X_sum_size_t_sumstep_uchar_X_sqsum_size_t_sqsumstep_uchar_X_tilted_size_t_tstep_int_width_int_height_int_cn
pub fn integral(depth: i32, sdepth: i32, sqdepth: i32, src: &u8, srcstep: size_t, sum: &mut u8, sumstep: size_t, sqsum: &mut u8, sqsumstep: size_t, tilted: &mut u8, tstep: size_t, width: i32, height: i32, cn: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_integral_int_depth_int_sdepth_int_sqdepth_const_uchar_X_src_size_t_srcstep_uchar_X_sum_size_t_sumstep_uchar_X_sqsum_size_t_sqsumstep_uchar_X_tilted_size_t_tstep_int_width_int_height_int_cn(depth, sdepth, sqdepth, src, srcstep, sum, sumstep, sqsum, sqsumstep, tilted, tstep, width, height, cn) }.into_result()
}

// identifier: cv_hal_invSqrt32f_const_float_X_src_float_X_dst_int_len
pub fn inv_sqrt32f(src: &f32, dst: &mut f32, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_invSqrt32f_const_float_X_src_float_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_invSqrt64f_const_double_X_src_double_X_dst_int_len
pub fn inv_sqrt64f(src: &f64, dst: &mut f64, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_invSqrt64f_const_double_X_src_double_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_invSqrt_const_double_X_src_double_X_dst_int_len
pub fn inv_sqrt(src: &f64, dst: &mut f64, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_invSqrt_const_double_X_src_double_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_invSqrt_const_float_X_src_float_X_dst_int_len
pub fn inv_sqrt_1(src: &f32, dst: &mut f32, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_invSqrt_const_float_X_src_float_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_log32f_const_float_X_src_float_X_dst_int_n
pub fn log32f(src: &f32, dst: &mut f32, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_log32f_const_float_X_src_float_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_log64f_const_double_X_src_double_X_dst_int_n
pub fn log64f(src: &f64, dst: &mut f64, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_log64f_const_double_X_src_double_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_log_const_double_X_src_double_X_dst_int_n
pub fn log(src: &f64, dst: &mut f64, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_log_const_double_X_src_double_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_log_const_float_X_src_float_X_dst_int_n
pub fn log_1(src: &f32, dst: &mut f32, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_log_const_float_X_src_float_X_dst_int_n(src, dst, n) }.into_result()
}

// identifier: cv_hal_magnitude32f_const_float_X_x_const_float_X_y_float_X_dst_int_n
pub fn magnitude32f(x: &f32, y: &f32, dst: &mut f32, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_magnitude32f_const_float_X_x_const_float_X_y_float_X_dst_int_n(x, y, dst, n) }.into_result()
}

// identifier: cv_hal_magnitude64f_const_double_X_x_const_double_X_y_double_X_dst_int_n
pub fn magnitude64f(x: &f64, y: &f64, dst: &mut f64, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_magnitude64f_const_double_X_x_const_double_X_y_double_X_dst_int_n(x, y, dst, n) }.into_result()
}

// identifier: cv_hal_magnitude_const_double_X_x_const_double_X_y_double_X_dst_int_n
pub fn magnitude(x: &f64, y: &f64, dst: &mut f64, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_magnitude_const_double_X_x_const_double_X_y_double_X_dst_int_n(x, y, dst, n) }.into_result()
}

// identifier: cv_hal_magnitude_const_float_X_x_const_float_X_y_float_X_dst_int_n
pub fn magnitude_1(x: &f32, y: &f32, dst: &mut f32, n: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_magnitude_const_float_X_x_const_float_X_y_float_X_dst_int_n(x, y, dst, n) }.into_result()
}

// identifier: cv_hal_max16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn max16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_max16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_max16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn max16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_max16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_max32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn max32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_max32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_max32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn max32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_max32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_max64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn max64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_max64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_max8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn max8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_max8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_max8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn max8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_max8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_min16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn min16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_min16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_min16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn min16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_min16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_min32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn min32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_min32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_min32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn min32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_min32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_min64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn min64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_min64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_min8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn min8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_min8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_min8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn min8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_min8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_mul16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn mul16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_mul16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_mul16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn mul16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_mul16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_mul32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn mul32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_mul32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_mul32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn mul32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_mul32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_mul64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn mul64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_mul64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_mul8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn mul8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_mul8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_mul8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn mul8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_mul8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_scale(src1, step1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_normHamming_const_uchar_X_a_const_uchar_X_b_int_n
pub fn norm_hamming(a: &u8, b: &u8, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_normHamming_const_uchar_X_a_const_uchar_X_b_int_n(a, b, n) }.into_result()
}

// identifier: cv_hal_normHamming_const_uchar_X_a_const_uchar_X_b_int_n_int_cellSize
pub fn norm_hamming_1(a: &u8, b: &u8, n: i32, cell_size: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_normHamming_const_uchar_X_a_const_uchar_X_b_int_n_int_cellSize(a, b, n, cell_size) }.into_result()
}

// identifier: cv_hal_normHamming_const_uchar_X_a_int_n
pub fn norm_hamming_2(a: &u8, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_normHamming_const_uchar_X_a_int_n(a, n) }.into_result()
}

// identifier: cv_hal_normHamming_const_uchar_X_a_int_n_int_cellSize
pub fn norm_hamming_3(a: &u8, n: i32, cell_size: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_normHamming_const_uchar_X_a_int_n_int_cellSize(a, n, cell_size) }.into_result()
}

// identifier: cv_hal_normL1__const_float_X_a_const_float_X_b_int_n
pub fn norm_l1_(a: &f32, b: &f32, n: i32) -> Result<f32> {
    unsafe { sys::cv_core_cv_hal_normL1__const_float_X_a_const_float_X_b_int_n(a, b, n) }.into_result()
}

// identifier: cv_hal_normL1__const_uchar_X_a_const_uchar_X_b_int_n
pub fn norm_l1__1(a: &u8, b: &u8, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_hal_normL1__const_uchar_X_a_const_uchar_X_b_int_n(a, b, n) }.into_result()
}

// identifier: cv_hal_normL2Sqr__const_float_X_a_const_float_X_b_int_n
pub fn norm_l2_sqr_(a: &f32, b: &f32, n: i32) -> Result<f32> {
    unsafe { sys::cv_core_cv_hal_normL2Sqr__const_float_X_a_const_float_X_b_int_n(a, b, n) }.into_result()
}

// identifier: cv_hal_not8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn not8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_not8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_or8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn or8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_or8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_recip16s_const_short_X_unnamed_arg_size_t_unnamed_arg_1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn recip16s(unnamed_arg: &i16, unnamed_arg_1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_recip16s_const_short_X_unnamed_arg_size_t_unnamed_arg_1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_scale(unnamed_arg, unnamed_arg_1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_recip16u_const_ushort_X_unnamed_arg_size_t_unnamed_arg_1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn recip16u(unnamed_arg: &u16, unnamed_arg_1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_recip16u_const_ushort_X_unnamed_arg_size_t_unnamed_arg_1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_scale(unnamed_arg, unnamed_arg_1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_recip32f_const_float_X_unnamed_arg_size_t_unnamed_arg_1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn recip32f(unnamed_arg: &f32, unnamed_arg_1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_recip32f_const_float_X_unnamed_arg_size_t_unnamed_arg_1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_scale(unnamed_arg, unnamed_arg_1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_recip32s_const_int_X_unnamed_arg_size_t_unnamed_arg_1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn recip32s(unnamed_arg: &i32, unnamed_arg_1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_recip32s_const_int_X_unnamed_arg_size_t_unnamed_arg_1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_scale(unnamed_arg, unnamed_arg_1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_recip64f_const_double_X_unnamed_arg_size_t_unnamed_arg_1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn recip64f(unnamed_arg: &f64, unnamed_arg_1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_recip64f_const_double_X_unnamed_arg_size_t_unnamed_arg_1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_scale(unnamed_arg, unnamed_arg_1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_recip8s_const_schar_X_unnamed_arg_size_t_unnamed_arg_1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn recip8s(unnamed_arg: &i8, unnamed_arg_1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_recip8s_const_schar_X_unnamed_arg_size_t_unnamed_arg_1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_scale(unnamed_arg, unnamed_arg_1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_recip8u_const_uchar_X_unnamed_arg_size_t_unnamed_arg_1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_scale
pub fn recip8u(unnamed_arg: &u8, unnamed_arg_1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, scale: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_recip8u_const_uchar_X_unnamed_arg_size_t_unnamed_arg_1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_scale(unnamed_arg, unnamed_arg_1, src2, step2, dst, step, width, height, scale) }.into_result()
}

// identifier: cv_hal_resize_int_src_type_const_uchar_X_src_data_size_t_src_step_int_src_width_int_src_height_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_double_inv_scale_x_double_inv_scale_y_int_interpolation
pub fn hal_resize(src_type: i32, src_data: &u8, src_step: size_t, src_width: i32, src_height: i32, dst_data: &mut u8, dst_step: size_t, dst_width: i32, dst_height: i32, inv_scale_x: f64, inv_scale_y: f64, interpolation: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_resize_int_src_type_const_uchar_X_src_data_size_t_src_step_int_src_width_int_src_height_uchar_X_dst_data_size_t_dst_step_int_dst_width_int_dst_height_double_inv_scale_x_double_inv_scale_y_int_interpolation(src_type, src_data, src_step, src_width, src_height, dst_data, dst_step, dst_width, dst_height, inv_scale_x, inv_scale_y, interpolation) }.into_result()
}

// identifier: cv_hal_sepFilter2D_int_stype_int_dtype_int_ktype_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_full_width_int_full_height_int_offset_x_int_offset_y_uchar_X_kernelx_data_int_kernelx_len_uchar_X_kernely_data_int_kernely_len_int_anchor_x_int_anchor_y_double_delta_int_borderType
pub fn sep_filter2_d(stype: i32, dtype: i32, ktype: i32, src_data: &mut u8, src_step: size_t, dst_data: &mut u8, dst_step: size_t, width: i32, height: i32, full_width: i32, full_height: i32, offset_x: i32, offset_y: i32, kernelx_data: &mut u8, kernelx_len: i32, kernely_data: &mut u8, kernely_len: i32, anchor_x: i32, anchor_y: i32, delta: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sepFilter2D_int_stype_int_dtype_int_ktype_uchar_X_src_data_size_t_src_step_uchar_X_dst_data_size_t_dst_step_int_width_int_height_int_full_width_int_full_height_int_offset_x_int_offset_y_uchar_X_kernelx_data_int_kernelx_len_uchar_X_kernely_data_int_kernely_len_int_anchor_x_int_anchor_y_double_delta_int_borderType(stype, dtype, ktype, src_data, src_step, dst_data, dst_step, width, height, full_width, full_height, offset_x, offset_y, kernelx_data, kernelx_len, kernely_data, kernely_len, anchor_x, anchor_y, delta, border_type) }.into_result()
}

// identifier: cv_hal_sqrt32f_const_float_X_src_float_X_dst_int_len
pub fn sqrt32f(src: &f32, dst: &mut f32, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sqrt32f_const_float_X_src_float_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_sqrt64f_const_double_X_src_double_X_dst_int_len
pub fn sqrt64f(src: &f64, dst: &mut f64, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sqrt64f_const_double_X_src_double_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_sqrt_const_double_X_src_double_X_dst_int_len
pub fn sqrt(src: &f64, dst: &mut f64, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sqrt_const_double_X_src_double_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_sqrt_const_float_X_src_float_X_dst_int_len
pub fn sqrt_1(src: &f32, dst: &mut f32, len: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sqrt_const_float_X_src_float_X_dst_int_len(src, dst, len) }.into_result()
}

// identifier: cv_hal_sub16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn sub16s(src1: &i16, step1: size_t, src2: &i16, step2: size_t, dst: &mut i16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sub16s_const_short_X_src1_size_t_step1_const_short_X_src2_size_t_step2_short_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_sub16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn sub16u(src1: &u16, step1: size_t, src2: &u16, step2: size_t, dst: &mut u16, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sub16u_const_ushort_X_src1_size_t_step1_const_ushort_X_src2_size_t_step2_ushort_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_sub32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn sub32f(src1: &f32, step1: size_t, src2: &f32, step2: size_t, dst: &mut f32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sub32f_const_float_X_src1_size_t_step1_const_float_X_src2_size_t_step2_float_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_sub32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn sub32s(src1: &i32, step1: size_t, src2: &i32, step2: size_t, dst: &mut i32, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sub32s_const_int_X_src1_size_t_step1_const_int_X_src2_size_t_step2_int_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_sub64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn sub64f(src1: &f64, step1: size_t, src2: &f64, step2: size_t, dst: &mut f64, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sub64f_const_double_X_src1_size_t_step1_const_double_X_src2_size_t_step2_double_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_sub8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn sub8s(src1: &i8, step1: size_t, src2: &i8, step2: size_t, dst: &mut i8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sub8s_const_schar_X_src1_size_t_step1_const_schar_X_src2_size_t_step2_schar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_sub8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn sub8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_sub8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_hal_xor8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg
pub fn xor8u(src1: &u8, step1: size_t, src2: &u8, step2: size_t, dst: &mut u8, step: size_t, width: i32, height: i32, unnamed_arg: &mut c_void) -> Result<()> {
    unsafe { sys::cv_core_cv_hal_xor8u_const_uchar_X_src1_size_t_step1_const_uchar_X_src2_size_t_step2_uchar_X_dst_size_t_step_int_width_int_height_void_X_unnamed_arg(src1, step1, src2, step2, dst, step, width, height, unnamed_arg) }.into_result()
}

// identifier: cv_haveOpenVX
pub fn have_open_vx() -> Result<bool> {
    unsafe { sys::cv_core_cv_haveOpenVX() }.into_result()
}

// identifier: cv_hconcat_Mat_src1_Mat_src2_Mat_dst
/// @overload
/// ```ignore{.cpp}
/// cv::Mat_<float> A = (cv::Mat_<float>(3, 2) << 1, 4,
/// 2, 5,
/// 3, 6);
/// cv::Mat_<float> B = (cv::Mat_<float>(3, 2) << 7, 10,
/// 8, 11,
/// 9, 12);
/// 
/// cv::Mat C;
/// cv::hconcat(A, B, C);
/// //C:
/// //[1, 4, 7, 10;
/// // 2, 5, 8, 11;
/// // 3, 6, 9, 12]
/// ```
/// 
/// ## Parameters
/// * src1: first input array to be considered for horizontal concatenation.
/// * src2: second input array to be considered for horizontal concatenation.
/// * dst: output array. It has the same number of rows and depth as the src1 and src2, and the sum of cols of the src1 and src2.
pub fn hconcat(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_hconcat_Mat_src1_Mat_src2_Mat_dst(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_hconcat_VectorOfMat_src_Mat_dst
/// @overload
/// ```ignore{.cpp}
/// std::vector<cv::Mat> matrices = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)),
/// cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)),
/// cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),};
/// 
/// cv::Mat out;
/// cv::hconcat( matrices, out );
/// //out:
/// //[1, 2, 3;
/// // 1, 2, 3;
/// // 1, 2, 3;
/// // 1, 2, 3]
/// ```
/// 
/// ## Parameters
/// * src: input array or vector of matrices. all of the matrices must have the same number of rows and the same depth.
/// * dst: output array. It has the same number of rows and depth as the src, and the sum of cols of the src.
/// same depth.
pub fn hconcat_1(src: &types::VectorOfMat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_hconcat_VectorOfMat_src_Mat_dst(src.as_raw_VectorOfMat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_hconcat_const_Mat_src_size_t_nsrc_Mat_dst
/// Applies horizontal concatenation to given matrices.
/// 
/// The function horizontally concatenates two or more cv::Mat matrices (with the same number of rows).
/// ```ignore{.cpp}
/// cv::Mat matArray[] = { cv::Mat(4, 1, CV_8UC1, cv::Scalar(1)),
/// cv::Mat(4, 1, CV_8UC1, cv::Scalar(2)),
/// cv::Mat(4, 1, CV_8UC1, cv::Scalar(3)),};
/// 
/// cv::Mat out;
/// cv::hconcat( matArray, 3, out );
/// //out:
/// //[1, 2, 3;
/// // 1, 2, 3;
/// // 1, 2, 3;
/// // 1, 2, 3]
/// ```
/// 
/// ## Parameters
/// * src: input array or vector of matrices. all of the matrices must have the same number of rows and the same depth.
/// * nsrc: number of matrices in src.
/// * dst: output array. It has the same number of rows and depth as the src, and the sum of cols of the src.
/// @sa cv::vconcat(const Mat*, size_t, OutputArray), @sa cv::vconcat(InputArrayOfArrays, OutputArray) and @sa cv::vconcat(InputArray, InputArray, OutputArray)
pub fn hconcat_2(src: &core::Mat, nsrc: size_t, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_hconcat_const_Mat_src_size_t_nsrc_Mat_dst(src.as_raw_Mat(), nsrc, dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_idct_Mat_src_Mat_dst_int_flags
/// Calculates the inverse Discrete Cosine Transform of a 1D or 2D array.
/// 
/// idct(src, dst, flags) is equivalent to dct(src, dst, flags | DCT_INVERSE).
/// ## Parameters
/// * src: input floating-point single-channel array.
/// * dst: output array of the same size and type as src.
/// * flags: operation flags.
/// @sa  dct, dft, idft, getOptimalDFTSize
///
/// ## C++ default parameters:
/// * flags: 0
pub fn idct(src: &core::Mat, dst: &mut core::Mat, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_idct_Mat_src_Mat_dst_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_idft_Mat_src_Mat_dst_int_flags_int_nonzeroRows
/// Calculates the inverse Discrete Fourier Transform of a 1D or 2D array.
/// 
/// idft(src, dst, flags) is equivalent to dft(src, dst, flags | #DFT_INVERSE) .
/// 
/// Note: None of dft and idft scales the result by default. So, you should pass #DFT_SCALE to one of
/// dft or idft explicitly to make these transforms mutually inverse.
/// @sa dft, dct, idct, mulSpectrums, getOptimalDFTSize
/// ## Parameters
/// * src: input floating-point real or complex array.
/// * dst: output array whose size and type depend on the flags.
/// * flags: operation flags (see dft and #DftFlags).
/// * nonzeroRows: number of dst rows to process; the rest of the rows have undefined content (see
/// the convolution sample in dft description.
///
/// ## C++ default parameters:
/// * flags: 0
/// * nonzero_rows: 0
pub fn idft(src: &core::Mat, dst: &mut core::Mat, flags: i32, nonzero_rows: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_idft_Mat_src_Mat_dst_int_flags_int_nonzeroRows(src.as_raw_Mat(), dst.as_raw_Mat(), flags, nonzero_rows) }.into_result()
}

// identifier: cv_illuminationChange_Mat_src_Mat_mask_Mat_dst_float_alpha_float_beta
/// Applying an appropriate non-linear transformation to the gradient field inside the selection and
/// then integrating back with a Poisson solver, modifies locally the apparent illumination of an image.
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * mask: Input 8-bit 1 or 3-channel image.
/// * dst: Output image with the same size and type as src.
/// * alpha: Value ranges between 0-2.
/// * beta: Value ranges between 0-2.
/// 
/// This is useful to highlight under-exposed foreground objects or to reduce specular reflections.
///
/// ## C++ default parameters:
/// * alpha: 0.2f
/// * beta: 0.4f
pub fn illumination_change(src: &core::Mat, mask: &core::Mat, dst: &mut core::Mat, alpha: f32, beta: f32) -> Result<()> {
    unsafe { sys::cv_core_cv_illuminationChange_Mat_src_Mat_mask_Mat_dst_float_alpha_float_beta(src.as_raw_Mat(), mask.as_raw_Mat(), dst.as_raw_Mat(), alpha, beta) }.into_result()
}

// identifier: cv_imdecode_Mat_buf_int_flags
/// Reads an image from a buffer in memory.
/// 
/// The function imdecode reads an image from the specified buffer in the memory. If the buffer is too short or
/// contains invalid data, the function returns an empty matrix ( Mat::data==NULL ).
/// 
/// See cv::imread for the list of supported formats and flags description.
/// 
/// 
/// Note: In the case of color images, the decoded images will have the channels stored in **B G R** order.
/// ## Parameters
/// * buf: Input array or vector of bytes.
/// * flags: The same flags as in cv::imread, see cv::ImreadModes.
pub fn decode(buf: &core::Mat, flags: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_imdecode_Mat_buf_int_flags(buf.as_raw_Mat(), flags) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_imdecode_Mat_buf_int_flags_Mat_dst
/// @overload
/// ## Parameters
/// * buf
/// @param: flags
/// * dst: The optional output placeholder for the decoded matrix. It can save the image
/// reallocations when the function is called repeatedly for images of the same size.
pub fn decode_to(buf: &core::Mat, flags: i32, dst: &core::Mat) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_imdecode_Mat_buf_int_flags_Mat_dst(buf.as_raw_Mat(), flags, dst.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_imencode_String_ext_Mat_img_VectorOfuchar_buf_VectorOfint_params
/// Encodes an image into a memory buffer.
/// 
/// The function imencode compresses the image and stores it in the memory buffer that is resized to fit the
/// result. See cv::imwrite for the list of supported formats and flags description.
/// 
/// ## Parameters
/// * ext: File extension that defines the output format.
/// * img: Image to be written.
/// * buf: Output buffer resized to fit the compressed image.
/// * params: Format-specific parameters. See cv::imwrite and cv::ImwriteFlags.
///
/// ## C++ default parameters:
/// * params: std::vector<int>()
pub fn imencode(ext: &str, img: &core::Mat, buf: &types::VectorOfuchar, params: &types::VectorOfint) -> Result<bool> {
    string_arg!(ext);
    unsafe { sys::cv_core_cv_imencode_String_ext_Mat_img_VectorOfuchar_buf_VectorOfint_params(ext.as_ptr(), img.as_raw_Mat(), buf.as_raw_VectorOfuchar(), params.as_raw_VectorOfint()) }.into_result()
}

// identifier: cv_imread_String_filename_int_flags
/// Loads an image from a file.
/// 
/// @anchor imread
/// 
/// The function imread loads an image from the specified file and returns it. If the image cannot be
/// read (because of missing file, improper permissions, unsupported or invalid format), the function
/// returns an empty matrix ( Mat::data==NULL ).
/// 
/// Currently, the following file formats are supported:
/// 
/// *   Windows bitmaps - \*.bmp, \*.dib (always supported)
/// *   JPEG files - \*.jpeg, \*.jpg, \*.jpe (see the *Note* section)
/// *   JPEG 2000 files - \*.jp2 (see the *Note* section)
/// *   Portable Network Graphics - \*.png (see the *Note* section)
/// *   WebP - \*.webp (see the *Note* section)
/// *   Portable image format - \*.pbm, \*.pgm, \*.ppm \*.pxm, \*.pnm (always supported)
/// *   Sun rasters - \*.sr, \*.ras (always supported)
/// *   TIFF files - \*.tiff, \*.tif (see the *Note* section)
/// *   OpenEXR Image files - \*.exr (see the *Note* section)
/// *   Radiance HDR - \*.hdr, \*.pic (always supported)
/// *   Raster and Vector geospatial data supported by GDAL (see the *Note* section)
/// 
/// 
/// Note:
/// *   The function determines the type of an image by the content, not by the file extension.
/// *   In the case of color images, the decoded images will have the channels stored in **B G R** order.
/// *   When using IMREAD_GRAYSCALE, the codec's internal grayscale conversion will be used, if available.
/// Results may differ to the output of cvtColor()
/// *   On Microsoft Windows\* OS and MacOSX\*, the codecs shipped with an OpenCV image (libjpeg,
/// libpng, libtiff, and libjasper) are used by default. So, OpenCV can always read JPEGs, PNGs,
/// and TIFFs. On MacOSX, there is also an option to use native MacOSX image readers. But beware
/// that currently these native image loaders give images with different pixel values because of
/// the color management embedded into MacOSX.
/// *   On Linux\*, BSD flavors and other Unix-like open-source operating systems, OpenCV looks for
/// codecs supplied with an OS image. Install the relevant packages (do not forget the development
/// files, for example, "libjpeg-dev", in Debian\* and Ubuntu\*) to get the codec support or turn
/// on the OPENCV_BUILD_3RDPARTY_LIBS flag in CMake.
/// *   In the case you set *WITH_GDAL* flag to true in CMake and @ref IMREAD_LOAD_GDAL to load the image,
/// then the [GDAL](http://www.gdal.org) driver will be used in order to decode the image, supporting
/// the following formats: [Raster](http://www.gdal.org/formats_list.html),
/// [Vector](http://www.gdal.org/ogr_formats.html).
/// *   If EXIF information are embedded in the image file, the EXIF orientation will be taken into account
/// and thus the image will be rotated accordingly except if the flag @ref IMREAD_IGNORE_ORIENTATION is passed.
/// *   By default number of pixels must be less than 2^30. Limit can be set using system
/// variable OPENCV_IO_MAX_IMAGE_PIXELS
/// 
/// ## Parameters
/// * filename: Name of file to be loaded.
/// * flags: Flag that can take values of cv::ImreadModes
///
/// ## C++ default parameters:
/// * flags: IMREAD_COLOR
pub fn imread(filename: &str, flags: i32) -> Result<core::Mat> {
    string_arg!(filename);
    unsafe { sys::cv_core_cv_imread_String_filename_int_flags(filename.as_ptr(), flags) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_imreadmulti_String_filename_VectorOfMat_mats_int_flags
/// Loads a multi-page image from a file.
/// 
/// The function imreadmulti loads a multi-page image from the specified file into a vector of Mat objects.
/// ## Parameters
/// * filename: Name of file to be loaded.
/// * flags: Flag that can take values of cv::ImreadModes, default with cv::IMREAD_ANYCOLOR.
/// * mats: A vector of Mat objects holding each page, if more than one.
/// @sa cv::imread
///
/// ## C++ default parameters:
/// * flags: IMREAD_ANYCOLOR
pub fn imreadmulti(filename: &str, mats: &types::VectorOfMat, flags: i32) -> Result<bool> {
    string_arg!(filename);
    unsafe { sys::cv_core_cv_imreadmulti_String_filename_VectorOfMat_mats_int_flags(filename.as_ptr(), mats.as_raw_VectorOfMat(), flags) }.into_result()
}

// identifier: cv_imshow_String_winname_Mat_mat
/// Displays an image in the specified window.
/// 
/// The function imshow displays an image in the specified window. If the window was created with the
/// cv::WINDOW_AUTOSIZE flag, the image is shown with its original size, however it is still limited by the screen resolution.
/// Otherwise, the image is scaled to fit the window. The function may scale the image, depending on its depth:
/// 
/// *   If the image is 8-bit unsigned, it is displayed as is.
/// *   If the image is 16-bit unsigned or 32-bit integer, the pixels are divided by 256. That is, the
/// value range [0,255\*256] is mapped to [0,255].
/// *   If the image is 32-bit or 64-bit floating-point, the pixel values are multiplied by 255. That is, the
/// value range [0,1] is mapped to [0,255].
/// 
/// If window was created with OpenGL support, cv::imshow also support ogl::Buffer , ogl::Texture2D and
/// cuda::GpuMat as input.
/// 
/// If the window was not created before this function, it is assumed creating a window with cv::WINDOW_AUTOSIZE.
/// 
/// If you need to show an image that is bigger than the screen resolution, you will need to call namedWindow("", WINDOW_NORMAL) before the imshow.
/// 
/// 
/// Note: This function should be followed by cv::waitKey function which displays the image for specified
/// milliseconds. Otherwise, it won't display the image. For example, **waitKey(0)** will display the window
/// infinitely until any keypress (it is suitable for image display). **waitKey(25)** will display a frame
/// for 25 ms, after which display will be automatically closed. (If you put it in a loop to read
/// videos, it will display the video frame-by-frame)
/// 
/// 
/// Note:
/// 
/// [__Windows Backend Only__] Pressing Ctrl+C will copy the image to the clipboard.
/// 
/// [__Windows Backend Only__] Pressing Ctrl+S will show a dialog to save the image.
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * mat: Image to be shown.
pub fn imshow(winname: &str, mat: &core::Mat) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_imshow_String_winname_Mat_mat(winname.as_ptr(), mat.as_raw_Mat()) }.into_result()
}

// identifier: cv_imwrite_String_filename_Mat_img_VectorOfint_params
/// Saves an image to a specified file.
/// 
/// The function imwrite saves the image to the specified file. The image format is chosen based on the
/// filename extension (see cv::imread for the list of extensions). In general, only 8-bit
/// single-channel or 3-channel (with 'BGR' channel order) images
/// can be saved using this function, with these exceptions:
/// 
/// - 16-bit unsigned (CV_16U) images can be saved in the case of PNG, JPEG 2000, and TIFF formats
/// - 32-bit float (CV_32F) images can be saved in TIFF, OpenEXR, and Radiance HDR formats; 3-channel
/// (CV_32FC3) TIFF images will be saved using the LogLuv high dynamic range encoding (4 bytes per pixel)
/// - PNG images with an alpha channel can be saved using this function. To do this, create
/// 8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels
/// should have alpha set to 0, fully opaque pixels should have alpha set to 255/65535 (see the code sample below).
/// 
/// If the format, depth or channel order is different, use
/// Mat::convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O
/// functions to save the image to XML or YAML format.
/// 
/// The sample below shows how to create a BGRA image and save it to a PNG file. It also demonstrates how to set custom
/// compression parameters:
/// @include snippets/imgcodecs_imwrite.cpp
/// ## Parameters
/// * filename: Name of the file.
/// * img: Image to be saved.
/// * params: Format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags
///
/// ## C++ default parameters:
/// * params: std::vector<int>()
pub fn imwrite(filename: &str, img: &core::Mat, params: &types::VectorOfint) -> Result<bool> {
    string_arg!(filename);
    unsafe { sys::cv_core_cv_imwrite_String_filename_Mat_img_VectorOfint_params(filename.as_ptr(), img.as_raw_Mat(), params.as_raw_VectorOfint()) }.into_result()
}

// identifier: cv_inRange_Mat_src_Mat_lowerb_Mat_upperb_Mat_dst
/// Checks if array elements lie between the elements of two other arrays.
/// 
/// The function checks the range as follows:
/// *   For every element of a single-channel input array:
/// <div lang='latex'>\texttt{dst} (I)= \texttt{lowerb} (I)_0  \leq \texttt{src} (I)_0 \leq  \texttt{upperb} (I)_0</div>
/// *   For two-channel arrays:
/// <div lang='latex'>\texttt{dst} (I)= \texttt{lowerb} (I)_0  \leq \texttt{src} (I)_0 \leq  \texttt{upperb} (I)_0  \land \texttt{lowerb} (I)_1  \leq \texttt{src} (I)_1 \leq  \texttt{upperb} (I)_1</div>
/// *   and so forth.
/// 
/// That is, dst (I) is set to 255 (all 1 -bits) if src (I) is within the
/// specified 1D, 2D, 3D, ... box and 0 otherwise.
/// 
/// When the lower and/or upper boundary parameters are scalars, the indexes
/// (I) at lowerb and upperb in the above formulas should be omitted.
/// ## Parameters
/// * src: first input array.
/// * lowerb: inclusive lower boundary array or a scalar.
/// * upperb: inclusive upper boundary array or a scalar.
/// * dst: output array of the same size as src and CV_8U type.
pub fn in_range(src: &core::Mat, lowerb: &core::Mat, upperb: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_inRange_Mat_src_Mat_lowerb_Mat_upperb_Mat_dst(src.as_raw_Mat(), lowerb.as_raw_Mat(), upperb.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_initCameraMatrix2D_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_imageSize_double_aspectRatio
/// Finds an initial camera matrix from 3D-2D point correspondences.
/// 
/// ## Parameters
/// * objectPoints: Vector of vectors of the calibration pattern points in the calibration pattern
/// coordinate space. In the old interface all the per-view vectors are concatenated. See
/// calibrateCamera for details.
/// * imagePoints: Vector of vectors of the projections of the calibration pattern points. In the
/// old interface all the per-view vectors are concatenated.
/// * imageSize: Image size in pixels used to initialize the principal point.
/// * aspectRatio: If it is zero or negative, both <span lang='latex'>f_x</span> and <span lang='latex'>f_y</span> are estimated independently.
/// Otherwise, <span lang='latex'>f_x = f_y * \texttt{aspectRatio}</span> .
/// 
/// The function estimates and returns an initial camera matrix for the camera calibration process.
/// Currently, the function only supports planar calibration patterns, which are patterns where each
/// object point has z-coordinate =0.
///
/// ## C++ default parameters:
/// * aspect_ratio: 1.0
pub fn init_camera_matrix2_d(object_points: &types::VectorOfMat, image_points: &types::VectorOfMat, image_size: core::Size, aspect_ratio: f64) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_initCameraMatrix2D_VectorOfMat_objectPoints_VectorOfMat_imagePoints_Size_imageSize_double_aspectRatio(object_points.as_raw_VectorOfMat(), image_points.as_raw_VectorOfMat(), image_size, aspect_ratio) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_initUndistortRectifyMap_Mat_cameraMatrix_Mat_distCoeffs_Mat_R_Mat_newCameraMatrix_Size_size_int_m1type_Mat_map1_Mat_map2
/// Computes the undistortion and rectification transformation map.
/// 
/// The function computes the joint undistortion and rectification transformation and represents the
/// result in the form of maps for remap. The undistorted image looks like original, as if it is
/// captured with a camera using the camera matrix =newCameraMatrix and zero distortion. In case of a
/// monocular camera, newCameraMatrix is usually equal to cameraMatrix, or it can be computed by
/// #getOptimalNewCameraMatrix for a better control over scaling. In case of a stereo camera,
/// newCameraMatrix is normally set to P1 or P2 computed by #stereoRectify .
/// 
/// Also, this new camera is oriented differently in the coordinate space, according to R. That, for
/// example, helps to align two heads of a stereo camera so that the epipolar lines on both images
/// become horizontal and have the same y- coordinate (in case of a horizontally aligned stereo camera).
/// 
/// The function actually builds the maps for the inverse mapping algorithm that is used by remap. That
/// is, for each pixel <span lang='latex'>(u, v)</span> in the destination (corrected and rectified) image, the function
/// computes the corresponding coordinates in the source image (that is, in the original image from
/// camera). The following process is applied:
/// <div lang='latex'>
/// \begin{array}{l}
/// x  \leftarrow (u - {c'}_x)/{f'}_x  \\
/// y  \leftarrow (v - {c'}_y)/{f'}_y  \\
/// {[X\,Y\,W]} ^T  \leftarrow R^{-1}*[x \, y \, 1]^T  \\
/// x'  \leftarrow X/W  \\
/// y'  \leftarrow Y/W  \\
/// r^2  \leftarrow x'^2 + y'^2 \\
/// x''  \leftarrow x' \frac{1 + k_1 r^2 + k_2 r^4 + k_3 r^6}{1 + k_4 r^2 + k_5 r^4 + k_6 r^6}
/// + 2p_1 x' y' + p_2(r^2 + 2 x'^2)  + s_1 r^2 + s_2 r^4\\
/// y''  \leftarrow y' \frac{1 + k_1 r^2 + k_2 r^4 + k_3 r^6}{1 + k_4 r^2 + k_5 r^4 + k_6 r^6}
/// + p_1 (r^2 + 2 y'^2) + 2 p_2 x' y' + s_3 r^2 + s_4 r^4 \\
/// s\vecthree{x'''}{y'''}{1} =
/// \vecthreethree{R_{33}(\tau_x, \tau_y)}{0}{-R_{13}((\tau_x, \tau_y)}
/// {0}{R_{33}(\tau_x, \tau_y)}{-R_{23}(\tau_x, \tau_y)}
/// {0}{0}{1} R(\tau_x, \tau_y) \vecthree{x''}{y''}{1}\\
/// map_x(u,v)  \leftarrow x''' f_x + c_x  \\
/// map_y(u,v)  \leftarrow y''' f_y + c_y
/// \end{array}
/// </div>
/// where <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span>
/// are the distortion coefficients.
/// 
/// In case of a stereo camera, this function is called twice: once for each camera head, after
/// stereoRectify, which in its turn is called after #stereoCalibrate. But if the stereo camera
/// was not calibrated, it is still possible to compute the rectification transformations directly from
/// the fundamental matrix using #stereoRectifyUncalibrated. For each camera, the function computes
/// homography H as the rectification transformation in a pixel domain, not a rotation matrix R in 3D
/// space. R can be computed from H as
/// <div lang='latex'>\texttt{R} = \texttt{cameraMatrix} ^{-1} \cdot \texttt{H} \cdot \texttt{cameraMatrix}</div>
/// where cameraMatrix can be chosen arbitrarily.
/// 
/// ## Parameters
/// * cameraMatrix: Input camera matrix <span lang='latex'>A=\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> .
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span>
/// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
/// * R: Optional rectification transformation in the object space (3x3 matrix). R1 or R2 ,
/// computed by #stereoRectify can be passed here. If the matrix is empty, the identity transformation
/// is assumed. In cvInitUndistortMap R assumed to be an identity matrix.
/// * newCameraMatrix: New camera matrix <span lang='latex'>A'=\vecthreethree{f_x'}{0}{c_x'}{0}{f_y'}{c_y'}{0}{0}{1}</span>.
/// * size: Undistorted image size.
/// * m1type: Type of the first output map that can be CV_32FC1, CV_32FC2 or CV_16SC2, see #convertMaps
/// * map1: The first output map.
/// * map2: The second output map.
pub fn init_undistort_rectify_map_1(camera_matrix: &core::Mat, dist_coeffs: &core::Mat, r: &core::Mat, new_camera_matrix: &core::Mat, size: core::Size, m1type: i32, map1: &mut core::Mat, map2: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_initUndistortRectifyMap_Mat_cameraMatrix_Mat_distCoeffs_Mat_R_Mat_newCameraMatrix_Size_size_int_m1type_Mat_map1_Mat_map2(camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), r.as_raw_Mat(), new_camera_matrix.as_raw_Mat(), size, m1type, map1.as_raw_Mat(), map2.as_raw_Mat()) }.into_result()
}

// identifier: cv_initWideAngleProjMap_Mat_cameraMatrix_Mat_distCoeffs_Size_imageSize_int_destImageWidth_int_m1type_Mat_map1_Mat_map2_int_projType_double_alpha
///
/// ## C++ default parameters:
/// * proj_type: PROJ_SPHERICAL_EQRECT
/// * alpha: 0
pub fn init_wide_angle_proj_map(camera_matrix: &core::Mat, dist_coeffs: &core::Mat, image_size: core::Size, dest_image_width: i32, m1type: i32, map1: &mut core::Mat, map2: &mut core::Mat, proj_type: i32, alpha: f64) -> Result<f32> {
    unsafe { sys::cv_core_cv_initWideAngleProjMap_Mat_cameraMatrix_Mat_distCoeffs_Size_imageSize_int_destImageWidth_int_m1type_Mat_map1_Mat_map2_int_projType_double_alpha(camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), image_size, dest_image_width, m1type, map1.as_raw_Mat(), map2.as_raw_Mat(), proj_type, alpha) }.into_result()
}

// identifier: cv_inpaint_Mat_src_Mat_inpaintMask_Mat_dst_double_inpaintRadius_int_flags
/// Restores the selected region in an image using the region neighborhood.
/// 
/// ## Parameters
/// * src: Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image.
/// * inpaintMask: Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that
/// needs to be inpainted.
/// * dst: Output image with the same size and type as src .
/// * inpaintRadius: Radius of a circular neighborhood of each point inpainted that is considered
/// by the algorithm.
/// * flags: Inpainting method that could be one of the following:
/// *   **INPAINT_NS** Navier-Stokes based method [Navier01]
/// *   **INPAINT_TELEA** Method by Alexandru Telea @cite Telea04 .
/// 
/// The function reconstructs the selected image area from the pixel near the area boundary. The
/// function may be used to remove dust and scratches from a scanned photo, or to remove undesirable
/// objects from still images or video. See <http://en.wikipedia.org/wiki/Inpainting> for more details.
/// 
/// 
/// Note:
/// *   An example using the inpainting technique can be found at
/// opencv_source_code/samples/cpp/inpaint.cpp
/// *   (Python) An example using the inpainting technique can be found at
/// opencv_source_code/samples/python/inpaint.py
pub fn inpaint(src: &core::Mat, inpaint_mask: &core::Mat, dst: &mut core::Mat, inpaint_radius: f64, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_inpaint_Mat_src_Mat_inpaintMask_Mat_dst_double_inpaintRadius_int_flags(src.as_raw_Mat(), inpaint_mask.as_raw_Mat(), dst.as_raw_Mat(), inpaint_radius, flags) }.into_result()
}

// identifier: cv_insertChannel_Mat_src_Mat_dst_int_coi
/// Inserts a single channel to dst (coi is 0-based index)
/// ## Parameters
/// * src: input array
/// * dst: output array
/// * coi: index of channel for insertion
/// @sa mixChannels, merge
pub fn insert_channel(src: &core::Mat, dst: &mut core::Mat, coi: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_insertChannel_Mat_src_Mat_dst_int_coi(src.as_raw_Mat(), dst.as_raw_Mat(), coi) }.into_result()
}

// identifier: cv_instr_resetTrace
pub fn reset_trace() -> Result<()> {
    unsafe { sys::cv_core_cv_instr_resetTrace() }.into_result()
}

// identifier: cv_instr_setFlags_int_modeFlags
pub fn set_flags(mode_flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_instr_setFlags_int_modeFlags(mode_flags) }.into_result()
}

// identifier: cv_instr_setUseInstrumentation_bool_flag
pub fn set_use_instrumentation(flag: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_instr_setUseInstrumentation_bool_flag(flag) }.into_result()
}

// identifier: cv_instr_useInstrumentation
pub fn use_instrumentation() -> Result<bool> {
    unsafe { sys::cv_core_cv_instr_useInstrumentation() }.into_result()
}

// identifier: cv_integral_Mat_src_Mat_sum_Mat_sqsum_Mat_tilted_int_sdepth_int_sqdepth
/// Calculates the integral of an image.
/// 
/// The function calculates one or more integral images for the source image as follows:
/// 
/// <div lang='latex'>\texttt{sum} (X,Y) =  \sum _{x<X,y<Y}  \texttt{image} (x,y)</div>
/// 
/// <div lang='latex'>\texttt{sqsum} (X,Y) =  \sum _{x<X,y<Y}  \texttt{image} (x,y)^2</div>
/// 
/// <div lang='latex'>\texttt{tilted} (X,Y) =  \sum _{y<Y,abs(x-X+1) \leq Y-y-1}  \texttt{image} (x,y)</div>
/// 
/// Using these integral images, you can calculate sum, mean, and standard deviation over a specific
/// up-right or rotated rectangular region of the image in a constant time, for example:
/// 
/// <div lang='latex'>\sum _{x_1 \leq x < x_2,  \, y_1  \leq y < y_2}  \texttt{image} (x,y) =  \texttt{sum} (x_2,y_2)- \texttt{sum} (x_1,y_2)- \texttt{sum} (x_2,y_1)+ \texttt{sum} (x_1,y_1)</div>
/// 
/// It makes possible to do a fast blurring or fast block correlation with a variable window size, for
/// example. In case of multi-channel images, sums for each channel are accumulated independently.
/// 
/// As a practical example, the next figure shows the calculation of the integral of a straight
/// rectangle Rect(3,3,3,2) and of a tilted rectangle Rect(5,1,2,3) . The selected pixels in the
/// original image are shown, as well as the relative pixels in the integral images sum and tilted .
/// 
/// ![integral calculation example](pics/integral.png)
/// 
/// ## Parameters
/// * src: input image as <span lang='latex'>W \times H</span>, 8-bit or floating-point (32f or 64f).
/// * sum: integral image as <span lang='latex'>(W+1)\times (H+1)</span> , 32-bit integer or floating-point (32f or 64f).
/// * sqsum: integral image for squared pixel values; it is <span lang='latex'>(W+1)\times (H+1)</span>, double-precision
/// floating-point (64f) array.
/// * tilted: integral for the image rotated by 45 degrees; it is <span lang='latex'>(W+1)\times (H+1)</span> array with
/// the same data type as sum.
/// * sdepth: desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or
/// CV_64F.
/// * sqdepth: desired depth of the integral image of squared pixel values, CV_32F or CV_64F.
///
/// ## C++ default parameters:
/// * sdepth: -1
/// * sqdepth: -1
pub fn integral_titled_sq(src: &core::Mat, sum: &mut core::Mat, sqsum: &mut core::Mat, tilted: &mut core::Mat, sdepth: i32, sqdepth: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_integral_Mat_src_Mat_sum_Mat_sqsum_Mat_tilted_int_sdepth_int_sqdepth(src.as_raw_Mat(), sum.as_raw_Mat(), sqsum.as_raw_Mat(), tilted.as_raw_Mat(), sdepth, sqdepth) }.into_result()
}

// identifier: cv_integral_Mat_src_Mat_sum_Mat_sqsum_int_sdepth_int_sqdepth
/// @overload
///
/// ## C++ default parameters:
/// * sdepth: -1
/// * sqdepth: -1
pub fn integral_sq_depth(src: &core::Mat, sum: &mut core::Mat, sqsum: &mut core::Mat, sdepth: i32, sqdepth: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_integral_Mat_src_Mat_sum_Mat_sqsum_int_sdepth_int_sqdepth(src.as_raw_Mat(), sum.as_raw_Mat(), sqsum.as_raw_Mat(), sdepth, sqdepth) }.into_result()
}

// identifier: cv_integral_Mat_src_Mat_sum_int_sdepth
/// @overload
///
/// ## C++ default parameters:
/// * sdepth: -1
pub fn integral_1(src: &core::Mat, sum: &mut core::Mat, sdepth: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_integral_Mat_src_Mat_sum_int_sdepth(src.as_raw_Mat(), sum.as_raw_Mat(), sdepth) }.into_result()
}

// identifier: cv_intersectConvexConvex_Mat__p1_Mat__p2_Mat__p12_bool_handleNested
///
/// ## C++ default parameters:
/// * handle_nested: true
pub fn intersect_convex_convex(_p1: &core::Mat, _p2: &core::Mat, _p12: &mut core::Mat, handle_nested: bool) -> Result<f32> {
    unsafe { sys::cv_core_cv_intersectConvexConvex_Mat__p1_Mat__p2_Mat__p12_bool_handleNested(_p1.as_raw_Mat(), _p2.as_raw_Mat(), _p12.as_raw_Mat(), handle_nested) }.into_result()
}

// identifier: cv_invertAffineTransform_Mat_M_Mat_iM
/// Inverts an affine transformation.
/// 
/// The function computes an inverse affine transformation represented by <span lang='latex'>2 \times 3</span> matrix M:
/// 
/// <div lang='latex'>\begin{bmatrix} a_{11} & a_{12} & b_1  \\ a_{21} & a_{22} & b_2 \end{bmatrix}</div>
/// 
/// The result is also a <span lang='latex'>2 \times 3</span> matrix of the same type as M.
/// 
/// ## Parameters
/// * M: Original affine transformation.
/// * iM: Output reverse affine transformation.
pub fn invert_affine_transform(m: &core::Mat, i_m: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_invertAffineTransform_Mat_M_Mat_iM(m.as_raw_Mat(), i_m.as_raw_Mat()) }.into_result()
}

// identifier: cv_invert_Mat_src_Mat_dst_int_flags
/// Finds the inverse or pseudo-inverse of a matrix.
/// 
/// The function cv::invert inverts the matrix src and stores the result in dst
/// . When the matrix src is singular or non-square, the function calculates
/// the pseudo-inverse matrix (the dst matrix) so that norm(src\*dst - I) is
/// minimal, where I is an identity matrix.
/// 
/// In case of the #DECOMP_LU method, the function returns non-zero value if
/// the inverse has been successfully calculated and 0 if src is singular.
/// 
/// In case of the #DECOMP_SVD method, the function returns the inverse
/// condition number of src (the ratio of the smallest singular value to the
/// largest singular value) and 0 if src is singular. The SVD method
/// calculates a pseudo-inverse matrix if src is singular.
/// 
/// Similarly to #DECOMP_LU, the method #DECOMP_CHOLESKY works only with
/// non-singular square matrices that should also be symmetrical and
/// positively defined. In this case, the function stores the inverted
/// matrix in dst and returns non-zero. Otherwise, it returns 0.
/// 
/// ## Parameters
/// * src: input floating-point M x N matrix.
/// * dst: output matrix of N x M size and the same type as src.
/// * flags: inversion method (cv::DecompTypes)
/// @sa solve, SVD
///
/// ## C++ default parameters:
/// * flags: DECOMP_LU
pub fn invert(src: &core::Mat, dst: &mut core::Mat, flags: i32) -> Result<f64> {
    unsafe { sys::cv_core_cv_invert_Mat_src_Mat_dst_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_ipp_getIppErrorLocation
pub fn get_ipp_error_location() -> Result<String> {
    unsafe { sys::cv_core_cv_ipp_getIppErrorLocation() }.into_result().map(crate::templ::receive_string_mut)
}

// identifier: cv_ipp_getIppFeatures
pub fn get_ipp_features() -> Result<u64> {
    unsafe { sys::cv_core_cv_ipp_getIppFeatures() }.into_result()
}

// identifier: cv_ipp_getIppStatus
pub fn get_ipp_status() -> Result<i32> {
    unsafe { sys::cv_core_cv_ipp_getIppStatus() }.into_result()
}

// identifier: cv_ipp_getIppVersion
pub fn get_ipp_version() -> Result<String> {
    unsafe { sys::cv_core_cv_ipp_getIppVersion() }.into_result().map(crate::templ::receive_string_mut)
}

// identifier: cv_ipp_setUseIPP_NE_bool_flag
pub fn set_use_ipp_ne(flag: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_ipp_setUseIPP_NE_bool_flag(flag) }.into_result()
}

// identifier: cv_ipp_setUseIPP_NotExact_bool_flag
pub fn set_use_ipp__not_exact(flag: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_ipp_setUseIPP_NotExact_bool_flag(flag) }.into_result()
}

// identifier: cv_ipp_setUseIPP_bool_flag
pub fn set_use_ipp(flag: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_ipp_setUseIPP_bool_flag(flag) }.into_result()
}

// identifier: cv_ipp_useIPP
pub fn use_ipp() -> Result<bool> {
    unsafe { sys::cv_core_cv_ipp_useIPP() }.into_result()
}

// identifier: cv_ipp_useIPP_NE
pub fn use_ipp_ne() -> Result<bool> {
    unsafe { sys::cv_core_cv_ipp_useIPP_NE() }.into_result()
}

// identifier: cv_ipp_useIPP_NotExact
pub fn use_ipp__not_exact() -> Result<bool> {
    unsafe { sys::cv_core_cv_ipp_useIPP_NotExact() }.into_result()
}

// identifier: cv_isContourConvex_Mat_contour
/// Tests a contour convexity.
/// 
/// The function tests whether the input contour is convex or not. The contour must be simple, that is,
/// without self-intersections. Otherwise, the function output is undefined.
/// 
/// ## Parameters
/// * contour: Input vector of 2D points, stored in std::vector\<\> or Mat
pub fn is_contour_convex(contour: &core::Mat) -> Result<bool> {
    unsafe { sys::cv_core_cv_isContourConvex_Mat_contour(contour.as_raw_Mat()) }.into_result()
}

// identifier: cv_kmeans_Mat_data_int_K_Mat_bestLabels_TermCriteria_criteria_int_attempts_int_flags_Mat_centers
/// Finds centers of clusters and groups input samples around the clusters.
/// 
/// The function kmeans implements a k-means algorithm that finds the centers of cluster_count clusters
/// and groups the input samples around the clusters. As an output, <span lang='latex'>\texttt{bestLabels}_i</span> contains a
/// 0-based cluster index for the sample stored in the <span lang='latex'>i^{th}</span> row of the samples matrix.
/// 
/// 
/// Note:
/// *   (Python) An example on K-means clustering can be found at
/// opencv_source_code/samples/python/kmeans.py
/// ## Parameters
/// * data: Data for clustering. An array of N-Dimensional points with float coordinates is needed.
/// Examples of this array can be:
/// *   Mat points(count, 2, CV_32F);
/// *   Mat points(count, 1, CV_32FC2);
/// *   Mat points(1, count, CV_32FC2);
/// *   std::vector\<cv::Point2f\> points(sampleCount);
/// * K: Number of clusters to split the set by.
/// * bestLabels: Input/output integer array that stores the cluster indices for every sample.
/// * criteria: The algorithm termination criteria, that is, the maximum number of iterations and/or
/// the desired accuracy. The accuracy is specified as criteria.epsilon. As soon as each of the cluster
/// centers moves by less than criteria.epsilon on some iteration, the algorithm stops.
/// * attempts: Flag to specify the number of times the algorithm is executed using different
/// initial labellings. The algorithm returns the labels that yield the best compactness (see the last
/// function parameter).
/// * flags: Flag that can take values of cv::KmeansFlags
/// * centers: Output matrix of the cluster centers, one row per each cluster center.
/// @return The function returns the compactness measure that is computed as
/// <div lang='latex'>\sum _i  \| \texttt{samples} _i -  \texttt{centers} _{ \texttt{labels} _i} \| ^2</div>
/// after every attempt. The best (minimum) value is chosen and the corresponding labels and the
/// compactness value are returned by the function. Basically, you can use only the core of the
/// function, set the number of attempts to 1, initialize labels each time using a custom algorithm,
/// pass them with the ( flags = #KMEANS_USE_INITIAL_LABELS ) flag, and then choose the best
/// (most-compact) clustering.
///
/// ## C++ default parameters:
/// * centers: noArray()
pub fn kmeans(data: &core::Mat, k: i32, best_labels: &mut core::Mat, criteria: &core::TermCriteria, attempts: i32, flags: i32, centers: &mut core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_kmeans_Mat_data_int_K_Mat_bestLabels_TermCriteria_criteria_int_attempts_int_flags_Mat_centers(data.as_raw_Mat(), k, best_labels.as_raw_Mat(), criteria.as_raw_TermCriteria(), attempts, flags, centers.as_raw_Mat()) }.into_result()
}

// identifier: cv_line_Mat_img_Point_pt1_Point_pt2_Scalar_color_int_thickness_int_lineType_int_shift
/// Draws a line segment connecting two points.
/// 
/// The function line draws the line segment between pt1 and pt2 points in the image. The line is
/// clipped by the image boundaries. For non-antialiased lines with integer coordinates, the 8-connected
/// or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased
/// lines are drawn using Gaussian filtering.
/// 
/// ## Parameters
/// * img: Image.
/// * pt1: First point of the line segment.
/// * pt2: Second point of the line segment.
/// * color: Line color.
/// * thickness: Line thickness.
/// * lineType: Type of the line. See #LineTypes.
/// * shift: Number of fractional bits in the point coordinates.
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * shift: 0
pub fn line(img: &mut core::Mat, pt1: core::Point, pt2: core::Point, color: core::Scalar, thickness: i32, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_line_Mat_img_Point_pt1_Point_pt2_Scalar_color_int_thickness_int_lineType_int_shift(img.as_raw_Mat(), pt1, pt2, color, thickness, line_type, shift) }.into_result()
}

// identifier: cv_linearPolar_Mat_src_Mat_dst_Point2f_center_double_maxRadius_int_flags
/// Remaps an image to polar coordinates space.
/// 
/// @deprecated This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags)
/// 
/// @internal
/// Transform the source image using the following transformation (See @ref polar_remaps_reference_image "Polar remaps reference image c)"):
/// <div lang='latex'>\begin{array}{l}
/// dst( \rho , \phi ) = src(x,y) \\
/// dst.size() \leftarrow src.size()
/// \end{array}</div>
/// 
/// where
/// <div lang='latex'>\begin{array}{l}
/// I = (dx,dy) = (x - center.x,y - center.y) \\
/// \rho = Kmag \cdot \texttt{magnitude} (I) ,\\
/// \phi = angle \cdot \texttt{angle} (I)
/// \end{array}</div>
/// 
/// and
/// <div lang='latex'>\begin{array}{l}
/// Kx = src.cols / maxRadius \\
/// Ky = src.rows / 2\Pi
/// \end{array}</div>
/// 
/// 
/// ## Parameters
/// * src: Source image
/// * dst: Destination image. It will have same size and type as src.
/// * center: The transformation center;
/// * maxRadius: The radius of the bounding circle to transform. It determines the inverse magnitude scale parameter too.
/// * flags: A combination of interpolation methods, see #InterpolationFlags
/// 
/// 
/// Note:
/// *   The function can not operate in-place.
/// *   To calculate magnitude and angle in degrees #cartToPolar is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees.
/// 
/// @sa cv::logPolar
/// @endinternal
pub fn linear_polar(src: &core::Mat, dst: &mut core::Mat, center: core::Point2f, max_radius: f64, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_linearPolar_Mat_src_Mat_dst_Point2f_center_double_maxRadius_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), center, max_radius, flags) }.into_result()
}

// identifier: cv_loadWindowParameters_String_windowName
/// Loads parameters of the specified window.
/// 
/// The function loadWindowParameters loads size, location, flags, trackbars value, zoom and panning
/// location of the window windowName.
/// 
/// ## Parameters
/// * windowName: Name of the window.
pub fn load_window_parameters(window_name: &str) -> Result<()> {
    string_arg!(window_name);
    unsafe { sys::cv_core_cv_loadWindowParameters_String_windowName(window_name.as_ptr()) }.into_result()
}

// identifier: cv_logPolar_Mat_src_Mat_dst_Point2f_center_double_M_int_flags
/// Remaps an image to semilog-polar coordinates space.
/// 
/// @deprecated This function produces same result as cv::warpPolar(src, dst, src.size(), center, maxRadius, flags+WARP_POLAR_LOG);
/// 
/// @internal
/// Transform the source image using the following transformation (See @ref polar_remaps_reference_image "Polar remaps reference image d)"):
/// <div lang='latex'>\begin{array}{l}
/// dst( \rho , \phi ) = src(x,y) \\
/// dst.size() \leftarrow src.size()
/// \end{array}</div>
/// 
/// where
/// <div lang='latex'>\begin{array}{l}
/// I = (dx,dy) = (x - center.x,y - center.y) \\
/// \rho = M \cdot log_e(\texttt{magnitude} (I)) ,\\
/// \phi = Kangle \cdot \texttt{angle} (I) \\
/// \end{array}</div>
/// 
/// and
/// <div lang='latex'>\begin{array}{l}
/// M = src.cols / log_e(maxRadius) \\
/// Kangle = src.rows / 2\Pi \\
/// \end{array}</div>
/// 
/// The function emulates the human "foveal" vision and can be used for fast scale and
/// rotation-invariant template matching, for object tracking and so forth.
/// ## Parameters
/// * src: Source image
/// * dst: Destination image. It will have same size and type as src.
/// * center: The transformation center; where the output precision is maximal
/// * M: Magnitude scale parameter. It determines the radius of the bounding circle to transform too.
/// * flags: A combination of interpolation methods, see #InterpolationFlags
/// 
/// 
/// Note:
/// *   The function can not operate in-place.
/// *   To calculate magnitude and angle in degrees #cartToPolar is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees.
/// 
/// @sa cv::linearPolar
/// @endinternal
pub fn log_polar(src: &core::Mat, dst: &mut core::Mat, center: core::Point2f, m: f64, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_logPolar_Mat_src_Mat_dst_Point2f_center_double_M_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), center, m, flags) }.into_result()
}

// identifier: cv_log_Mat_src_Mat_dst
/// Calculates the natural logarithm of every array element.
/// 
/// The function cv::log calculates the natural logarithm of every element of the input array:
/// <div lang='latex'>\texttt{dst} (I) =  \log (\texttt{src}(I)) </div>
/// 
/// Output on zero, negative and special (NaN, Inf) values is undefined.
/// 
/// ## Parameters
/// * src: input array.
/// * dst: output array of the same size and type as src .
/// @sa exp, cartToPolar, polarToCart, phase, pow, sqrt, magnitude
pub fn log_2(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_log_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_log_softdouble_a
pub fn log_3(a: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_log_softdouble_a(a.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_log_softfloat_a
/// Natural logarithm
/// 
/// Special cases:
/// - log(NaN), log(x < 0) are NaN
/// - log(0) == -Inf
pub fn log_4(a: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_log_softfloat_a(a.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_magnitude_Mat_x_Mat_y_Mat_magnitude
/// Calculates the magnitude of 2D vectors.
/// 
/// The function cv::magnitude calculates the magnitude of 2D vectors formed
/// from the corresponding elements of x and y arrays:
/// <div lang='latex'>\texttt{dst} (I) =  \sqrt{\texttt{x}(I)^2 + \texttt{y}(I)^2}</div>
/// ## Parameters
/// * x: floating-point array of x-coordinates of the vectors.
/// * y: floating-point array of y-coordinates of the vectors; it must
/// have the same size as x.
/// * magnitude: output array of the same size and type as x.
/// @sa cartToPolar, polarToCart, phase, sqrt
pub fn magnitude_2(x: &core::Mat, y: &core::Mat, magnitude: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_magnitude_Mat_x_Mat_y_Mat_magnitude(x.as_raw_Mat(), y.as_raw_Mat(), magnitude.as_raw_Mat()) }.into_result()
}

// identifier: cv_matMulDeriv_Mat_A_Mat_B_Mat_dABdA_Mat_dABdB
/// Computes partial derivatives of the matrix product for each multiplied matrix.
/// 
/// ## Parameters
/// * A: First multiplied matrix.
/// * B: Second multiplied matrix.
/// * dABdA: First output derivative matrix d(A\*B)/dA of size
/// <span lang='latex'>\texttt{A.rows*B.cols} \times {A.rows*A.cols}</span> .
/// * dABdB: Second output derivative matrix d(A\*B)/dB of size
/// <span lang='latex'>\texttt{A.rows*B.cols} \times {B.rows*B.cols}</span> .
/// 
/// The function computes partial derivatives of the elements of the matrix product <span lang='latex'>A*B</span> with regard to
/// the elements of each of the two input matrices. The function is used to compute the Jacobian
/// matrices in stereoCalibrate but can also be used in any other similar optimization function.
pub fn mat_mul_deriv(a: &core::Mat, b: &core::Mat, d_a_bd_a: &mut core::Mat, d_a_bd_b: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_matMulDeriv_Mat_A_Mat_B_Mat_dABdA_Mat_dABdB(a.as_raw_Mat(), b.as_raw_Mat(), d_a_bd_a.as_raw_Mat(), d_a_bd_b.as_raw_Mat()) }.into_result()
}

// identifier: cv_matchShapes_Mat_contour1_Mat_contour2_int_method_double_parameter
/// Compares two shapes.
/// 
/// The function compares two shapes. All three implemented methods use the Hu invariants (see #HuMoments)
/// 
/// ## Parameters
/// * contour1: First contour or grayscale image.
/// * contour2: Second contour or grayscale image.
/// * method: Comparison method, see #ShapeMatchModes
/// * parameter: Method-specific parameter (not supported now).
pub fn match_shapes(contour1: &core::Mat, contour2: &core::Mat, method: i32, parameter: f64) -> Result<f64> {
    unsafe { sys::cv_core_cv_matchShapes_Mat_contour1_Mat_contour2_int_method_double_parameter(contour1.as_raw_Mat(), contour2.as_raw_Mat(), method, parameter) }.into_result()
}

// identifier: cv_matchTemplate_Mat_image_Mat_templ_Mat_result_int_method_Mat_mask
/// Compares a template against overlapped image regions.
/// 
/// The function slides through image , compares the overlapped patches of size <span lang='latex'>w \times h</span> against
/// templ using the specified method and stores the comparison results in result . Here are the formulae
/// for the available comparison methods ( <span lang='latex'>I</span> denotes image, <span lang='latex'>T</span> template, <span lang='latex'>R</span> result ). The summation
/// is done over template and/or the image patch: <span lang='latex'>x' = 0...w-1, y' = 0...h-1</span>
/// 
/// After the function finishes the comparison, the best matches can be found as global minimums (when
/// #TM_SQDIFF was used) or maximums (when #TM_CCORR or #TM_CCOEFF was used) using the
/// #minMaxLoc function. In case of a color image, template summation in the numerator and each sum in
/// the denominator is done over all of the channels and separate mean values are used for each channel.
/// That is, the function can take a color template and a color image. The result will still be a
/// single-channel image, which is easier to analyze.
/// 
/// ## Parameters
/// * image: Image where the search is running. It must be 8-bit or 32-bit floating-point.
/// * templ: Searched template. It must be not greater than the source image and have the same
/// data type.
/// * result: Map of comparison results. It must be single-channel 32-bit floating-point. If image
/// is <span lang='latex'>W \times H</span> and templ is <span lang='latex'>w \times h</span> , then result is <span lang='latex'>(W-w+1) \times (H-h+1)</span> .
/// * method: Parameter specifying the comparison method, see #TemplateMatchModes
/// * mask: Mask of searched template. It must have the same datatype and size with templ. It is
/// not set by default. Currently, only the #TM_SQDIFF and #TM_CCORR_NORMED methods are supported.
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn match_template(image: &core::Mat, templ: &core::Mat, result: &mut core::Mat, method: i32, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_matchTemplate_Mat_image_Mat_templ_Mat_result_int_method_Mat_mask(image.as_raw_Mat(), templ.as_raw_Mat(), result.as_raw_Mat(), method, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_max_Mat_src1_Mat_src2_Mat_dst
/// Calculates per-element maximum of two arrays or an array and a scalar.
/// 
/// The function cv::max calculates the per-element maximum of two arrays:
/// <div lang='latex'>\texttt{dst} (I)= \max ( \texttt{src1} (I), \texttt{src2} (I))</div>
/// or array and a scalar:
/// <div lang='latex'>\texttt{dst} (I)= \max ( \texttt{src1} (I), \texttt{value} )</div>
/// ## Parameters
/// * src1: first input array.
/// * src2: second input array of the same size and type as src1 .
/// * dst: output array of the same size and type as src1.
/// @sa  min, compare, inRange, minMaxLoc, @ref MatrixExpressions
pub fn max_mat_mat(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_max_Mat_src1_Mat_src2_Mat_dst(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_max_softdouble_a_softdouble_b
pub fn max(a: &core::softdouble, b: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_max_softdouble_a_softdouble_b(a.as_raw_softdouble(), b.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_max_softfloat_a_softfloat_b
pub fn max_1(a: &core::softfloat, b: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_max_softfloat_a_softfloat_b(a.as_raw_softfloat(), b.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_meanShift_Mat_probImage_Rect_window_TermCriteria_criteria
/// Finds an object on a back projection image.
/// 
/// ## Parameters
/// * probImage: Back projection of the object histogram. See calcBackProject for details.
/// * window: Initial search window.
/// * criteria: Stop criteria for the iterative search algorithm.
/// returns
/// :   Number of iterations CAMSHIFT took to converge.
/// The function implements the iterative object search algorithm. It takes the input back projection of
/// an object and the initial position. The mass center in window of the back projection image is
/// computed and the search window center shifts to the mass center. The procedure is repeated until the
/// specified number of iterations criteria.maxCount is done or until the window center shifts by less
/// than criteria.epsilon. The algorithm is used inside CamShift and, unlike CamShift , the search
/// window size or orientation do not change during the search. You can simply pass the output of
/// calcBackProject to this function. But better results can be obtained if you pre-filter the back
/// projection and remove the noise. For example, you can do this by retrieving connected components
/// with findContours , throwing away contours with small area ( contourArea ), and rendering the
/// remaining contours with drawContours.
pub fn mean_shift(prob_image: &core::Mat, window: core::Rect, criteria: &core::TermCriteria) -> Result<i32> {
    unsafe { sys::cv_core_cv_meanShift_Mat_probImage_Rect_window_TermCriteria_criteria(prob_image.as_raw_Mat(), window, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_meanStdDev_Mat_src_Mat_mean_Mat_stddev_Mat_mask
/// Calculates a mean and standard deviation of array elements.
/// 
/// The function cv::meanStdDev calculates the mean and the standard deviation M
/// of array elements independently for each channel and returns it via the
/// output parameters:
/// <div lang='latex'>\begin{array}{l} N =  \sum _{I, \texttt{mask} (I)  \ne 0} 1 \\ \texttt{mean} _c =  \frac{\sum_{ I: \; \texttt{mask}(I) \ne 0} \texttt{src} (I)_c}{N} \\ \texttt{stddev} _c =  \sqrt{\frac{\sum_{ I: \; \texttt{mask}(I) \ne 0} \left ( \texttt{src} (I)_c -  \texttt{mean} _c \right )^2}{N}} \end{array}</div>
/// When all the mask elements are 0's, the function returns
/// mean=stddev=Scalar::all(0).
/// 
/// Note: The calculated standard deviation is only the diagonal of the
/// complete normalized covariance matrix. If the full matrix is needed, you
/// can reshape the multi-channel array M x N to the single-channel array
/// M\*N x mtx.channels() (only possible when the matrix is continuous) and
/// then pass the matrix to calcCovarMatrix .
/// ## Parameters
/// * src: input array that should have from 1 to 4 channels so that the results can be stored in
/// Scalar_ 's.
/// * mean: output parameter: calculated mean value.
/// * stddev: output parameter: calculated standard deviation.
/// * mask: optional operation mask.
/// @sa  countNonZero, mean, norm, minMaxLoc, calcCovarMatrix
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn mean_std_dev(src: &core::Mat, mean: &mut core::Mat, stddev: &mut core::Mat, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_meanStdDev_Mat_src_Mat_mean_Mat_stddev_Mat_mask(src.as_raw_Mat(), mean.as_raw_Mat(), stddev.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_mean_Mat_src_Mat_mask
/// Calculates an average (mean) of array elements.
/// 
/// The function cv::mean calculates the mean value M of array elements,
/// independently for each channel, and return it:
/// <div lang='latex'>\begin{array}{l} N =  \sum _{I: \; \texttt{mask} (I) \ne 0} 1 \\ M_c =  \left ( \sum _{I: \; \texttt{mask} (I) \ne 0}{ \texttt{mtx} (I)_c} \right )/N \end{array}</div>
/// When all the mask elements are 0's, the function returns Scalar::all(0)
/// ## Parameters
/// * src: input array that should have from 1 to 4 channels so that the result can be stored in
/// Scalar_ .
/// * mask: optional operation mask.
/// @sa  countNonZero, meanStdDev, norm, minMaxLoc
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn mean(src: &core::Mat, mask: &core::Mat) -> Result<core::Scalar> {
    unsafe { sys::cv_core_cv_mean_Mat_src_Mat_mask(src.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_medianBlur_Mat_src_Mat_dst_int_ksize
/// Blurs an image using the median filter.
/// 
/// The function smoothes an image using the median filter with the \f$\texttt{ksize} \times
/// \texttt{ksize}\f$ aperture. Each channel of a multi-channel image is processed independently.
/// In-place operation is supported.
/// 
/// 
/// Note: The median filter uses #BORDER_REPLICATE internally to cope with border pixels, see #BorderTypes
/// 
/// ## Parameters
/// * src: input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be
/// CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U.
/// * dst: destination array of the same size and type as src.
/// * ksize: aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ...
/// @sa  bilateralFilter, blur, boxFilter, GaussianBlur
pub fn median_blur(src: &core::Mat, dst: &mut core::Mat, ksize: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_medianBlur_Mat_src_Mat_dst_int_ksize(src.as_raw_Mat(), dst.as_raw_Mat(), ksize) }.into_result()
}

// identifier: cv_merge_VectorOfMat_mv_Mat_dst
/// @overload
/// ## Parameters
/// * mv: input vector of matrices to be merged; all the matrices in mv must have the same
/// size and the same depth.
/// * dst: output array of the same size and the same depth as mv[0]; The number of channels will
/// be the total number of channels in the matrix array.
pub fn merge(mv: &types::VectorOfMat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_merge_VectorOfMat_mv_Mat_dst(mv.as_raw_VectorOfMat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_merge_const_Mat_mv_size_t_count_Mat_dst
/// Creates one multi-channel array out of several single-channel ones.
/// 
/// The function cv::merge merges several arrays to make a single multi-channel array. That is, each
/// element of the output array will be a concatenation of the elements of the input arrays, where
/// elements of i-th input array are treated as mv[i].channels()-element vectors.
/// 
/// The function cv::split does the reverse operation. If you need to shuffle channels in some other
/// advanced way, use cv::mixChannels.
/// 
/// The following example shows how to merge 3 single channel matrices into a single 3-channel matrix.
/// @snippet snippets/core_merge.cpp example
/// 
/// ## Parameters
/// * mv: input array of matrices to be merged; all the matrices in mv must have the same
/// size and the same depth.
/// * count: number of input matrices when mv is a plain C array; it must be greater than zero.
/// * dst: output array of the same size and the same depth as mv[0]; The number of channels will
/// be equal to the parameter count.
/// @sa  mixChannels, split, Mat::reshape
pub fn merge_1(mv: &core::Mat, count: size_t, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_merge_const_Mat_mv_size_t_count_Mat_dst(mv.as_raw_Mat(), count, dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_minAreaRect_Mat_points
/// Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
/// 
/// The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a
/// specified point set. Developer should keep in mind that the returned RotatedRect can contain negative
/// indices when data is close to the containing Mat element boundary.
/// 
/// ## Parameters
/// * points: Input vector of 2D points, stored in std::vector\<\> or Mat
pub fn min_area_rect(points: &core::Mat) -> Result<core::RotatedRect> {
    unsafe { sys::cv_core_cv_minAreaRect_Mat_points(points.as_raw_Mat()) }.into_result().map(|x| core::RotatedRect { ptr: x })
}

// identifier: cv_minEnclosingCircle_Mat_points_Point2f_center_float_radius
/// Finds a circle of the minimum area enclosing a 2D point set.
/// 
/// The function finds the minimal enclosing circle of a 2D point set using an iterative algorithm.
/// 
/// ## Parameters
/// * points: Input vector of 2D points, stored in std::vector\<\> or Mat
/// * center: Output center of the circle.
/// * radius: Output radius of the circle.
pub fn min_enclosing_circle(points: &core::Mat, center: core::Point2f, radius: f32) -> Result<()> {
    unsafe { sys::cv_core_cv_minEnclosingCircle_Mat_points_Point2f_center_float_radius(points.as_raw_Mat(), center, radius) }.into_result()
}

// identifier: cv_minEnclosingTriangle_Mat_points_Mat_triangle
/// Finds a triangle of minimum area enclosing a 2D point set and returns its area.
/// 
/// The function finds a triangle of minimum area enclosing the given set of 2D points and returns its
/// area. The output for a given 2D point set is shown in the image below. 2D points are depicted in
/// *red* and the enclosing triangle in *yellow*.
/// 
/// ![Sample output of the minimum enclosing triangle function](pics/minenclosingtriangle.png)
/// 
/// The implementation of the algorithm is based on O'Rourke's @cite ORourke86 and Klee and Laskowski's
/// @cite KleeLaskowski85 papers. O'Rourke provides a <span lang='latex'>\theta(n)</span> algorithm for finding the minimal
/// enclosing triangle of a 2D convex polygon with n vertices. Since the #minEnclosingTriangle function
/// takes a 2D point set as input an additional preprocessing step of computing the convex hull of the
/// 2D point set is required. The complexity of the #convexHull function is <span lang='latex'>O(n log(n))</span> which is higher
/// than <span lang='latex'>\theta(n)</span>. Thus the overall complexity of the function is <span lang='latex'>O(n log(n))</span>.
/// 
/// ## Parameters
/// * points: Input vector of 2D points with depth CV_32S or CV_32F, stored in std::vector\<\> or Mat
/// * triangle: Output vector of three 2D points defining the vertices of the triangle. The depth
/// of the OutputArray must be CV_32F.
pub fn min_enclosing_triangle(points: &core::Mat, triangle: &mut core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_minEnclosingTriangle_Mat_points_Mat_triangle(points.as_raw_Mat(), triangle.as_raw_Mat()) }.into_result()
}

// identifier: cv_minMaxIdx_Mat_src_double_X_minVal_double_X_maxVal_int_X_minIdx_int_X_maxIdx_Mat_mask
/// Finds the global minimum and maximum in an array
/// 
/// The function cv::minMaxIdx finds the minimum and maximum element values and their positions. The
/// extremums are searched across the whole array or, if mask is not an empty array, in the specified
/// array region. The function does not work with multi-channel arrays. If you need to find minimum or
/// maximum elements across all the channels, use Mat::reshape first to reinterpret the array as
/// single-channel. Or you may extract the particular channel using either extractImageCOI , or
/// mixChannels , or split . In case of a sparse matrix, the minimum is found among non-zero elements
/// only.
/// 
/// Note: When minIdx is not NULL, it must have at least 2 elements (as well as maxIdx), even if src is
/// a single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2
/// dimensions, i.e. single-column matrix is Mx1 matrix (and therefore minIdx/maxIdx will be
/// (i1,0)/(i2,0)) and single-row matrix is 1xN matrix (and therefore minIdx/maxIdx will be
/// (0,j1)/(0,j2)).
/// ## Parameters
/// * src: input single-channel array.
/// * minVal: pointer to the returned minimum value; NULL is used if not required.
/// * maxVal: pointer to the returned maximum value; NULL is used if not required.
/// * minIdx: pointer to the returned minimum location (in nD case); NULL is used if not required;
/// Otherwise, it must point to an array of src.dims elements, the coordinates of the minimum element
/// in each dimension are stored there sequentially.
/// * maxIdx: pointer to the returned maximum location (in nD case). NULL is used if not required.
/// * mask: specified array region
///
/// ## C++ default parameters:
/// * max_val: 0
/// * min_idx: 0
/// * max_idx: 0
/// * mask: noArray()
pub fn min_max_idx(src: &core::Mat, min_val: &mut f64, max_val: &mut f64, min_idx: &mut i32, max_idx: &mut i32, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_minMaxIdx_Mat_src_double_X_minVal_double_X_maxVal_int_X_minIdx_int_X_maxIdx_Mat_mask(src.as_raw_Mat(), min_val, max_val, min_idx, max_idx, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_minMaxLoc_Mat_src_double_X_minVal_double_X_maxVal_Point_X_minLoc_Point_X_maxLoc_Mat_mask
/// Finds the global minimum and maximum in an array.
/// 
/// The function cv::minMaxLoc finds the minimum and maximum element values and their positions. The
/// extremums are searched across the whole array or, if mask is not an empty array, in the specified
/// array region.
/// 
/// The function do not work with multi-channel arrays. If you need to find minimum or maximum
/// elements across all the channels, use Mat::reshape first to reinterpret the array as
/// single-channel. Or you may extract the particular channel using either extractImageCOI , or
/// mixChannels , or split .
/// ## Parameters
/// * src: input single-channel array.
/// * minVal: pointer to the returned minimum value; NULL is used if not required.
/// * maxVal: pointer to the returned maximum value; NULL is used if not required.
/// * minLoc: pointer to the returned minimum location (in 2D case); NULL is used if not required.
/// * maxLoc: pointer to the returned maximum location (in 2D case); NULL is used if not required.
/// * mask: optional mask used to select a sub-array.
/// @sa max, min, compare, inRange, extractImageCOI, mixChannels, split, Mat::reshape
///
/// ## C++ default parameters:
/// * max_val: 0
/// * min_loc: 0
/// * max_loc: 0
/// * mask: noArray()
pub fn min_max_loc(src: &core::Mat, min_val: &mut f64, max_val: &mut f64, min_loc: &mut core::Point, max_loc: &mut core::Point, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_minMaxLoc_Mat_src_double_X_minVal_double_X_maxVal_Point_X_minLoc_Point_X_maxLoc_Mat_mask(src.as_raw_Mat(), min_val, max_val, min_loc, max_loc, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_min_Mat_src1_Mat_src2_Mat_dst
/// Calculates per-element minimum of two arrays or an array and a scalar.
/// 
/// The function cv::min calculates the per-element minimum of two arrays:
/// <div lang='latex'>\texttt{dst} (I)= \min ( \texttt{src1} (I), \texttt{src2} (I))</div>
/// or array and a scalar:
/// <div lang='latex'>\texttt{dst} (I)= \min ( \texttt{src1} (I), \texttt{value} )</div>
/// ## Parameters
/// * src1: first input array.
/// * src2: second input array of the same size and type as src1.
/// * dst: output array of the same size and type as src1.
/// @sa max, compare, inRange, minMaxLoc
pub fn min_mat_mat(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_min_Mat_src1_Mat_src2_Mat_dst(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_min_softdouble_a_softdouble_b
pub fn min(a: &core::softdouble, b: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_min_softdouble_a_softdouble_b(a.as_raw_softdouble(), b.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_min_softfloat_a_softfloat_b
/// Min and Max functions
pub fn min_1(a: &core::softfloat, b: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_min_softfloat_a_softfloat_b(a.as_raw_softfloat(), b.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_mixChannels_VectorOfMat_src_VectorOfMat_dst_VectorOfint_fromTo
/// @overload
/// ## Parameters
/// * src: input array or vector of matrices; all of the matrices must have the same size and the
/// same depth.
/// * dst: output array or vector of matrices; all the matrices **must be allocated**; their size and
/// depth must be the same as in src[0].
/// * fromTo: array of index pairs specifying which channels are copied and where; fromTo[k\*2] is
/// a 0-based index of the input channel in src, fromTo[k\*2+1] is an index of the output channel in
/// dst; the continuous channel numbering is used: the first input image channels are indexed from 0 to
/// src[0].channels()-1, the second input image channels are indexed from src[0].channels() to
/// src[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image
/// channels; as a special case, when fromTo[k\*2] is negative, the corresponding output channel is
/// filled with zero .
pub fn mix_channels(src: &types::VectorOfMat, dst: &mut types::VectorOfMat, from_to: &types::VectorOfint) -> Result<()> {
    unsafe { sys::cv_core_cv_mixChannels_VectorOfMat_src_VectorOfMat_dst_VectorOfint_fromTo(src.as_raw_VectorOfMat(), dst.as_raw_VectorOfMat(), from_to.as_raw_VectorOfint()) }.into_result()
}

// identifier: cv_mixChannels_VectorOfMat_src_VectorOfMat_dst_const_int_X_fromTo_size_t_npairs
/// @overload
/// ## Parameters
/// * src: input array or vector of matrices; all of the matrices must have the same size and the
/// same depth.
/// * dst: output array or vector of matrices; all the matrices **must be allocated**; their size and
/// depth must be the same as in src[0].
/// * fromTo: array of index pairs specifying which channels are copied and where; fromTo[k\*2] is
/// a 0-based index of the input channel in src, fromTo[k\*2+1] is an index of the output channel in
/// dst; the continuous channel numbering is used: the first input image channels are indexed from 0 to
/// src[0].channels()-1, the second input image channels are indexed from src[0].channels() to
/// src[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image
/// channels; as a special case, when fromTo[k\*2] is negative, the corresponding output channel is
/// filled with zero .
/// * npairs: number of index pairs in fromTo.
pub fn mix_channels_1(src: &types::VectorOfMat, dst: &mut types::VectorOfMat, from_to: &i32, npairs: size_t) -> Result<()> {
    unsafe { sys::cv_core_cv_mixChannels_VectorOfMat_src_VectorOfMat_dst_const_int_X_fromTo_size_t_npairs(src.as_raw_VectorOfMat(), dst.as_raw_VectorOfMat(), from_to, npairs) }.into_result()
}

// identifier: cv_mixChannels_const_Mat_src_size_t_nsrcs_Mat_dst_size_t_ndsts_const_int_X_fromTo_size_t_npairs
/// Copies specified channels from input arrays to the specified channels of
/// output arrays.
/// 
/// The function cv::mixChannels provides an advanced mechanism for shuffling image channels.
/// 
/// cv::split,cv::merge,cv::extractChannel,cv::insertChannel and some forms of cv::cvtColor are partial cases of cv::mixChannels.
/// 
/// In the example below, the code splits a 4-channel BGRA image into a 3-channel BGR (with B and R
/// channels swapped) and a separate alpha-channel image:
/// ```ignore{.cpp}
/// Mat bgra( 100, 100, CV_8UC4, Scalar(255,0,0,255) );
/// Mat bgr( bgra.rows, bgra.cols, CV_8UC3 );
/// Mat alpha( bgra.rows, bgra.cols, CV_8UC1 );
/// 
/// // forming an array of matrices is a quite efficient operation,
/// // because the matrix data is not copied, only the headers
/// Mat out[] = { bgr, alpha };
/// // bgra[0] -> bgr[2], bgra[1] -> bgr[1],
/// // bgra[2] -> bgr[0], bgra[3] -> alpha[0]
/// int from_to[] = { 0,2, 1,1, 2,0, 3,3 };
/// mixChannels( &bgra, 1, out, 2, from_to, 4 );
/// ```
/// 
/// 
/// Note: Unlike many other new-style C++ functions in OpenCV (see the introduction section and
/// Mat::create ), cv::mixChannels requires the output arrays to be pre-allocated before calling the
/// function.
/// ## Parameters
/// * src: input array or vector of matrices; all of the matrices must have the same size and the
/// same depth.
/// * nsrcs: number of matrices in `src`.
/// * dst: output array or vector of matrices; all the matrices **must be allocated**; their size and
/// depth must be the same as in `src[0]`.
/// * ndsts: number of matrices in `dst`.
/// * fromTo: array of index pairs specifying which channels are copied and where; fromTo[k\*2] is
/// a 0-based index of the input channel in src, fromTo[k\*2+1] is an index of the output channel in
/// dst; the continuous channel numbering is used: the first input image channels are indexed from 0 to
/// src[0].channels()-1, the second input image channels are indexed from src[0].channels() to
/// src[0].channels() + src[1].channels()-1, and so on, the same scheme is used for the output image
/// channels; as a special case, when fromTo[k\*2] is negative, the corresponding output channel is
/// filled with zero .
/// * npairs: number of index pairs in `fromTo`.
/// @sa split, merge, extractChannel, insertChannel, cvtColor
pub fn mix_channels_2(src: &core::Mat, nsrcs: size_t, dst: &core::Mat, ndsts: size_t, from_to: &i32, npairs: size_t) -> Result<()> {
    unsafe { sys::cv_core_cv_mixChannels_const_Mat_src_size_t_nsrcs_Mat_dst_size_t_ndsts_const_int_X_fromTo_size_t_npairs(src.as_raw_Mat(), nsrcs, dst.as_raw_Mat(), ndsts, from_to, npairs) }.into_result()
}

// identifier: cv_ml_createConcentricSpheresTestSet_int_nsamples_int_nfeatures_int_nclasses_Mat_samples_Mat_responses
/// Creates test set
pub fn create_concentric_spheres_test_set(nsamples: i32, nfeatures: i32, nclasses: i32, samples: &mut core::Mat, responses: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_ml_createConcentricSpheresTestSet_int_nsamples_int_nfeatures_int_nclasses_Mat_samples_Mat_responses(nsamples, nfeatures, nclasses, samples.as_raw_Mat(), responses.as_raw_Mat()) }.into_result()
}

// identifier: cv_ml_randMVNormal_Mat_mean_Mat_cov_int_nsamples_Mat_samples
/// Generates _sample_ from multivariate normal distribution
/// 
/// ## Parameters
/// * mean: an average row vector
/// * cov: symmetric covariation matrix
/// * nsamples: returned samples count
/// * samples: returned samples array
pub fn rand_mv_normal(mean: &core::Mat, cov: &core::Mat, nsamples: i32, samples: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_ml_randMVNormal_Mat_mean_Mat_cov_int_nsamples_Mat_samples(mean.as_raw_Mat(), cov.as_raw_Mat(), nsamples, samples.as_raw_Mat()) }.into_result()
}

// identifier: cv_moments_Mat_array_bool_binaryImage
/// Calculates all of the moments up to the third order of a polygon or rasterized shape.
/// 
/// The function computes moments, up to the 3rd order, of a vector shape or a rasterized shape. The
/// results are returned in the structure cv::Moments.
/// 
/// ## Parameters
/// * array: Raster image (single-channel, 8-bit or floating-point 2D array) or an array (
/// <span lang='latex'>1 \times N</span> or <span lang='latex'>N \times 1</span> ) of 2D points (Point or Point2f ).
/// * binaryImage: If it is true, all non-zero image pixels are treated as 1's. The parameter is
/// used for images only.
/// @returns moments.
/// 
/// 
/// Note: Only applicable to contour moments calculations from Python bindings: Note that the numpy
/// type for the input array should be either np.int32 or np.float32.
/// 
/// @sa  contourArea, arcLength
///
/// ## C++ default parameters:
/// * binary_image: false
pub fn moments(array: &core::Mat, binary_image: bool) -> Result<core::Moments> {
    unsafe { sys::cv_core_cv_moments_Mat_array_bool_binaryImage(array.as_raw_Mat(), binary_image) }.into_result()
}

// identifier: cv_morphologyDefaultBorderValue
pub fn morphology_default_border_value() -> Result<core::Scalar> {
    unsafe { sys::cv_core_cv_morphologyDefaultBorderValue() }.into_result()
}

// identifier: cv_morphologyEx_Mat_src_Mat_dst_int_op_Mat_kernel_Point_anchor_int_iterations_int_borderType_Scalar_borderValue
/// Performs advanced morphological transformations.
/// 
/// The function cv::morphologyEx can perform advanced morphological transformations using an erosion and dilation as
/// basic operations.
/// 
/// Any of the operations can be done in-place. In case of multi-channel images, each channel is
/// processed independently.
/// 
/// ## Parameters
/// * src: Source image. The number of channels can be arbitrary. The depth should be one of
/// CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
/// * dst: Destination image of the same size and type as source image.
/// * op: Type of a morphological operation, see #MorphTypes
/// * kernel: Structuring element. It can be created using #getStructuringElement.
/// * anchor: Anchor position with the kernel. Negative values mean that the anchor is at the
/// kernel center.
/// * iterations: Number of times erosion and dilation are applied.
/// * borderType: Pixel extrapolation method, see #BorderTypes
/// * borderValue: Border value in case of a constant border. The default value has a special
/// meaning.
/// @sa  dilate, erode, getStructuringElement
/// 
/// Note: The number of iterations is the number of times erosion or dilatation operation will be applied.
/// For instance, an opening operation (#MORPH_OPEN) with two iterations is equivalent to apply
/// successively: erode -> erode -> dilate -> dilate (and not erode -> dilate -> erode -> dilate).
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
/// * iterations: 1
/// * border_type: BORDER_CONSTANT
/// * border_value: morphologyDefaultBorderValue()
pub fn morphology_ex(src: &core::Mat, dst: &mut core::Mat, op: i32, kernel: &core::Mat, anchor: core::Point, iterations: i32, border_type: i32, border_value: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_morphologyEx_Mat_src_Mat_dst_int_op_Mat_kernel_Point_anchor_int_iterations_int_borderType_Scalar_borderValue(src.as_raw_Mat(), dst.as_raw_Mat(), op, kernel.as_raw_Mat(), anchor, iterations, border_type, border_value) }.into_result()
}

// identifier: cv_moveWindow_String_winname_int_x_int_y
/// Moves window to the specified position
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * x: The new x-coordinate of the window.
/// * y: The new y-coordinate of the window.
pub fn move_window(winname: &str, x: i32, y: i32) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_moveWindow_String_winname_int_x_int_y(winname.as_ptr(), x, y) }.into_result()
}

// identifier: cv_mulAdd_softdouble_a_softdouble_b_softdouble_c
pub fn mul_add(a: &core::softdouble, b: &core::softdouble, c: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_mulAdd_softdouble_a_softdouble_b_softdouble_c(a.as_raw_softdouble(), b.as_raw_softdouble(), c.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_mulAdd_softfloat_a_softfloat_b_softfloat_c
/// Fused Multiplication and Addition
/// 
/// Computes (a*b)+c with single rounding
pub fn mul_add_1(a: &core::softfloat, b: &core::softfloat, c: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_mulAdd_softfloat_a_softfloat_b_softfloat_c(a.as_raw_softfloat(), b.as_raw_softfloat(), c.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_mulSpectrums_Mat_a_Mat_b_Mat_c_int_flags_bool_conjB
/// Performs the per-element multiplication of two Fourier spectrums.
/// 
/// The function cv::mulSpectrums performs the per-element multiplication of the two CCS-packed or complex
/// matrices that are results of a real or complex Fourier transform.
/// 
/// The function, together with dft and idft , may be used to calculate convolution (pass conjB=false )
/// or correlation (pass conjB=true ) of two arrays rapidly. When the arrays are complex, they are
/// simply multiplied (per element) with an optional conjugation of the second-array elements. When the
/// arrays are real, they are assumed to be CCS-packed (see dft for details).
/// ## Parameters
/// * a: first input array.
/// * b: second input array of the same size and type as src1 .
/// * c: output array of the same size and type as src1 .
/// * flags: operation flags; currently, the only supported flag is cv::DFT_ROWS, which indicates that
/// each row of src1 and src2 is an independent 1D Fourier spectrum. If you do not want to use this flag, then simply add a `0` as value.
/// * conjB: optional flag that conjugates the second input array before the multiplication (true)
/// or not (false).
///
/// ## C++ default parameters:
/// * conj_b: false
pub fn mul_spectrums(a: &core::Mat, b: &core::Mat, c: &mut core::Mat, flags: i32, conj_b: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_mulSpectrums_Mat_a_Mat_b_Mat_c_int_flags_bool_conjB(a.as_raw_Mat(), b.as_raw_Mat(), c.as_raw_Mat(), flags, conj_b) }.into_result()
}

// identifier: cv_mulTransposed_Mat_src_Mat_dst_bool_aTa_Mat_delta_double_scale_int_dtype
/// Calculates the product of a matrix and its transposition.
/// 
/// The function cv::mulTransposed calculates the product of src and its
/// transposition:
/// <div lang='latex'>\texttt{dst} = \texttt{scale} ( \texttt{src} - \texttt{delta} )^T ( \texttt{src} - \texttt{delta} )</div>
/// if aTa=true , and
/// <div lang='latex'>\texttt{dst} = \texttt{scale} ( \texttt{src} - \texttt{delta} ) ( \texttt{src} - \texttt{delta} )^T</div>
/// otherwise. The function is used to calculate the covariance matrix. With
/// zero delta, it can be used as a faster substitute for general matrix
/// product A\*B when B=A'
/// ## Parameters
/// * src: input single-channel matrix. Note that unlike gemm, the
/// function can multiply not only floating-point matrices.
/// * dst: output square matrix.
/// * aTa: Flag specifying the multiplication ordering. See the
/// description below.
/// * delta: Optional delta matrix subtracted from src before the
/// multiplication. When the matrix is empty ( delta=noArray() ), it is
/// assumed to be zero, that is, nothing is subtracted. If it has the same
/// size as src , it is simply subtracted. Otherwise, it is "repeated" (see
/// repeat ) to cover the full src and then subtracted. Type of the delta
/// matrix, when it is not empty, must be the same as the type of created
/// output matrix. See the dtype parameter description below.
/// * scale: Optional scale factor for the matrix product.
/// * dtype: Optional type of the output matrix. When it is negative,
/// the output matrix will have the same type as src . Otherwise, it will be
/// type=CV_MAT_DEPTH(dtype) that should be either CV_32F or CV_64F .
/// @sa calcCovarMatrix, gemm, repeat, reduce
///
/// ## C++ default parameters:
/// * delta: noArray()
/// * scale: 1
/// * dtype: -1
pub fn mul_transposed(src: &core::Mat, dst: &mut core::Mat, a_ta: bool, delta: &core::Mat, scale: f64, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_mulTransposed_Mat_src_Mat_dst_bool_aTa_Mat_delta_double_scale_int_dtype(src.as_raw_Mat(), dst.as_raw_Mat(), a_ta, delta.as_raw_Mat(), scale, dtype) }.into_result()
}

// identifier: cv_multiply_Mat_src1_Mat_src2_Mat_dst_double_scale_int_dtype
/// Calculates the per-element scaled product of two arrays.
/// 
/// The function multiply calculates the per-element product of two arrays:
/// 
/// <div lang='latex'>\texttt{dst} (I)= \texttt{saturate} ( \texttt{scale} \cdot \texttt{src1} (I)  \cdot \texttt{src2} (I))</div>
/// 
/// There is also a @ref MatrixExpressions -friendly variant of the first function. See Mat::mul .
/// 
/// For a not-per-element matrix product, see gemm .
/// 
/// 
/// Note: Saturation is not applied when the output array has the depth
/// CV_32S. You may even get result of an incorrect sign in the case of
/// overflow.
/// ## Parameters
/// * src1: first input array.
/// * src2: second input array of the same size and the same type as src1.
/// * dst: output array of the same size and type as src1.
/// * scale: optional scale factor.
/// * dtype: optional depth of the output array
/// @sa add, subtract, divide, scaleAdd, addWeighted, accumulate, accumulateProduct, accumulateSquare,
/// Mat::convertTo
///
/// ## C++ default parameters:
/// * scale: 1
/// * dtype: -1
pub fn multiply(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, scale: f64, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_multiply_Mat_src1_Mat_src2_Mat_dst_double_scale_int_dtype(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), scale, dtype) }.into_result()
}

// identifier: cv_namedWindow_String_winname_int_flags
/// Creates a window.
/// 
/// The function namedWindow creates a window that can be used as a placeholder for images and
/// trackbars. Created windows are referred to by their names.
/// 
/// If a window with the same name already exists, the function does nothing.
/// 
/// You can call cv::destroyWindow or cv::destroyAllWindows to close the window and de-allocate any associated
/// memory usage. For a simple program, you do not really have to call these functions because all the
/// resources and windows of the application are closed automatically by the operating system upon exit.
/// 
/// 
/// Note:
/// 
/// Qt backend supports additional flags:
/// *   **WINDOW_NORMAL or WINDOW_AUTOSIZE:** WINDOW_NORMAL enables you to resize the
/// window, whereas WINDOW_AUTOSIZE adjusts automatically the window size to fit the
/// displayed image (see imshow ), and you cannot change the window size manually.
/// *   **WINDOW_FREERATIO or WINDOW_KEEPRATIO:** WINDOW_FREERATIO adjusts the image
/// with no respect to its ratio, whereas WINDOW_KEEPRATIO keeps the image ratio.
/// *   **WINDOW_GUI_NORMAL or WINDOW_GUI_EXPANDED:** WINDOW_GUI_NORMAL is the old way to draw the window
/// without statusbar and toolbar, whereas WINDOW_GUI_EXPANDED is a new enhanced GUI.
/// By default, flags == WINDOW_AUTOSIZE | WINDOW_KEEPRATIO | WINDOW_GUI_EXPANDED
/// 
/// ## Parameters
/// * winname: Name of the window in the window caption that may be used as a window identifier.
/// * flags: Flags of the window. The supported flags are: (cv::WindowFlags)
///
/// ## C++ default parameters:
/// * flags: WINDOW_AUTOSIZE
pub fn named_window(winname: &str, flags: i32) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_namedWindow_String_winname_int_flags(winname.as_ptr(), flags) }.into_result()
}

// identifier: cv_normL1_const_float_X_a_const_float_X_b_int_n
pub fn norm_l1(a: &f32, b: &f32, n: i32) -> Result<f32> {
    unsafe { sys::cv_core_cv_normL1_const_float_X_a_const_float_X_b_int_n(a, b, n) }.into_result()
}

// identifier: cv_normL1_const_uchar_X_a_const_uchar_X_b_int_n
pub fn norm_l2(a: &u8, b: &u8, n: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_normL1_const_uchar_X_a_const_uchar_X_b_int_n(a, b, n) }.into_result()
}

// identifier: cv_normL2Sqr_const_float_X_a_const_float_X_b_int_n
pub fn norm_l2_sqr(a: &f32, b: &f32, n: i32) -> Result<f32> {
    unsafe { sys::cv_core_cv_normL2Sqr_const_float_X_a_const_float_X_b_int_n(a, b, n) }.into_result()
}

// identifier: cv_norm_Mat_src1_Mat_src2_int_normType_Mat_mask
/// Calculates an absolute difference norm or a relative difference norm.
/// 
/// This version of cv::norm calculates the absolute difference norm
/// or the relative difference norm of arrays src1 and src2.
/// The type of norm to calculate is specified using #NormTypes.
/// 
/// ## Parameters
/// * src1: first input array.
/// * src2: second input array of the same size and the same type as src1.
/// * normType: type of the norm (see #NormTypes).
/// * mask: optional operation mask; it must have the same size as src1 and CV_8UC1 type.
///
/// ## C++ default parameters:
/// * norm_type: NORM_L2
/// * mask: noArray()
pub fn norm_with_type(src1: &core::Mat, src2: &core::Mat, norm_type: i32, mask: &core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_norm_Mat_src1_Mat_src2_int_normType_Mat_mask(src1.as_raw_Mat(), src2.as_raw_Mat(), norm_type, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_norm_Mat_src1_int_normType_Mat_mask
/// Calculates the  absolute norm of an array.
/// 
/// This version of #norm calculates the absolute norm of src1. The type of norm to calculate is specified using #NormTypes.
/// 
/// As example for one array consider the function <span lang='latex'>r(x)= \begin{pmatrix} x \\ 1-x \end{pmatrix}, x \in [-1;1]</span>.
/// The <span lang='latex'> L_{1}, L_{2} </span> and <span lang='latex'> L_{\infty} </span> norm for the sample value <span lang='latex'>r(-1) = \begin{pmatrix} -1 \\ 2 \end{pmatrix}</span>
/// is calculated as follows
/// \f{align*}
/// \| r(-1) \|_{L_1} &= |-1| + |2| = 3 \\
/// \| r(-1) \|_{L_2} &= \sqrt{(-1)^{2} + (2)^{2}} = \sqrt{5} \\
/// \| r(-1) \|_{L_\infty} &= \max(|-1|,|2|) = 2
/// \f}
/// and for <span lang='latex'>r(0.5) = \begin{pmatrix} 0.5 \\ 0.5 \end{pmatrix}</span> the calculation is
/// \f{align*}
/// \| r(0.5) \|_{L_1} &= |0.5| + |0.5| = 1 \\
/// \| r(0.5) \|_{L_2} &= \sqrt{(0.5)^{2} + (0.5)^{2}} = \sqrt{0.5} \\
/// \| r(0.5) \|_{L_\infty} &= \max(|0.5|,|0.5|) = 0.5.
/// \f}
/// The following graphic shows all values for the three norm functions <span lang='latex'>\| r(x) \|_{L_1}, \| r(x) \|_{L_2}</span> and <span lang='latex'>\| r(x) \|_{L_\infty}</span>.
/// It is notable that the <span lang='latex'> L_{1} </span> norm forms the upper and the <span lang='latex'> L_{\infty} </span> norm forms the lower border for the example function <span lang='latex'> r(x) </span>.
/// ![Graphs for the different norm functions from the above example](pics/NormTypes_OneArray_1-2-INF.png)
/// 
/// When the mask parameter is specified and it is not empty, the norm is
/// 
/// If normType is not specified, #NORM_L2 is used.
/// calculated only over the region specified by the mask.
/// 
/// Multi-channel input arrays are treated as single-channel arrays, that is,
/// the results for all channels are combined.
/// 
/// Hamming norms can only be calculated with CV_8U depth arrays.
/// 
/// ## Parameters
/// * src1: first input array.
/// * normType: type of the norm (see #NormTypes).
/// * mask: optional operation mask; it must have the same size as src1 and CV_8UC1 type.
///
/// ## C++ default parameters:
/// * norm_type: NORM_L2
/// * mask: noArray()
pub fn norm(src1: &core::Mat, norm_type: i32, mask: &core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_norm_Mat_src1_int_normType_Mat_mask(src1.as_raw_Mat(), norm_type, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_normalize_Mat_src_Mat_dst_double_alpha_double_beta_int_norm_type_int_dtype_Mat_mask
/// Normalizes the norm or value range of an array.
/// 
/// The function cv::normalize normalizes scale and shift the input array elements so that
/// <div lang='latex'>\| \texttt{dst} \| _{L_p}= \texttt{alpha}</div>
/// (where p=Inf, 1 or 2) when normType=NORM_INF, NORM_L1, or NORM_L2, respectively; or so that
/// <div lang='latex'>\min _I  \texttt{dst} (I)= \texttt{alpha} , \, \, \max _I  \texttt{dst} (I)= \texttt{beta}</div>
/// 
/// when normType=NORM_MINMAX (for dense arrays only). The optional mask specifies a sub-array to be
/// normalized. This means that the norm or min-n-max are calculated over the sub-array, and then this
/// sub-array is modified to be normalized. If you want to only use the mask to calculate the norm or
/// min-max but modify the whole array, you can use norm and Mat::convertTo.
/// 
/// In case of sparse matrices, only the non-zero values are analyzed and transformed. Because of this,
/// the range transformation for sparse matrices is not allowed since it can shift the zero level.
/// 
/// Possible usage with some positive example data:
/// ```ignore{.cpp}
/// vector<double> positiveData = { 2.0, 8.0, 10.0 };
/// vector<double> normalizedData_l1, normalizedData_l2, normalizedData_inf, normalizedData_minmax;
/// 
/// // Norm to probability (total count)
/// // sum(numbers) = 20.0
/// // 2.0      0.1     (2.0/20.0)
/// // 8.0      0.4     (8.0/20.0)
/// // 10.0     0.5     (10.0/20.0)
/// normalize(positiveData, normalizedData_l1, 1.0, 0.0, NORM_L1);
/// 
/// // Norm to unit vector: ||positiveData|| = 1.0
/// // 2.0      0.15
/// // 8.0      0.62
/// // 10.0     0.77
/// normalize(positiveData, normalizedData_l2, 1.0, 0.0, NORM_L2);
/// 
/// // Norm to max element
/// // 2.0      0.2     (2.0/10.0)
/// // 8.0      0.8     (8.0/10.0)
/// // 10.0     1.0     (10.0/10.0)
/// normalize(positiveData, normalizedData_inf, 1.0, 0.0, NORM_INF);
/// 
/// // Norm to range [0.0;1.0]
/// // 2.0      0.0     (shift to left border)
/// // 8.0      0.75    (6.0/8.0)
/// // 10.0     1.0     (shift to right border)
/// normalize(positiveData, normalizedData_minmax, 1.0, 0.0, NORM_MINMAX);
/// ```
/// 
/// 
/// ## Parameters
/// * src: input array.
/// * dst: output array of the same size as src .
/// * alpha: norm value to normalize to or the lower range boundary in case of the range
/// normalization.
/// * beta: upper range boundary in case of the range normalization; it is not used for the norm
/// normalization.
/// * norm_type: normalization type (see cv::NormTypes).
/// * dtype: when negative, the output array has the same type as src; otherwise, it has the same
/// number of channels as src and the depth =CV_MAT_DEPTH(dtype).
/// * mask: optional operation mask.
/// @sa norm, Mat::convertTo, SparseMat::convertTo
///
/// ## C++ default parameters:
/// * alpha: 1
/// * beta: 0
/// * norm_type: NORM_L2
/// * dtype: -1
/// * mask: noArray()
pub fn normalize(src: &core::Mat, dst: &mut core::Mat, alpha: f64, beta: f64, norm_type: i32, dtype: i32, mask: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_normalize_Mat_src_Mat_dst_double_alpha_double_beta_int_norm_type_int_dtype_Mat_mask(src.as_raw_Mat(), dst.as_raw_Mat(), alpha, beta, norm_type, dtype, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_parallel_for__Range_range_ParallelLoopBody_body_double_nstripes
/// Parallel data processor
///
/// ## C++ default parameters:
/// * nstripes: -1.
pub fn parallel_for_(range: &core::Range, body: &core::ParallelLoopBody, nstripes: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_parallel_for__Range_range_ParallelLoopBody_body_double_nstripes(range.as_raw_Range(), body.as_raw_ParallelLoopBody(), nstripes) }.into_result()
}

// identifier: cv_patchNaNs_Mat_a_double_val
/// converts NaN's to the given number
///
/// ## C++ default parameters:
/// * val: 0
pub fn patch_na_ns(a: &mut core::Mat, val: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_patchNaNs_Mat_a_double_val(a.as_raw_Mat(), val) }.into_result()
}

// identifier: cv_pencilSketch_Mat_src_Mat_dst1_Mat_dst2_float_sigma_s_float_sigma_r_float_shade_factor
/// Pencil-like non-photorealistic line drawing
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * dst1: Output 8-bit 1-channel image.
/// * dst2: Output image with the same size and type as src.
/// * sigma_s: Range between 0 to 200.
/// * sigma_r: Range between 0 to 1.
/// * shade_factor: Range between 0 to 0.1.
///
/// ## C++ default parameters:
/// * sigma_s: 60
/// * sigma_r: 0.07f
/// * shade_factor: 0.02f
pub fn pencil_sketch(src: &core::Mat, dst1: &mut core::Mat, dst2: &mut core::Mat, sigma_s: f32, sigma_r: f32, shade_factor: f32) -> Result<()> {
    unsafe { sys::cv_core_cv_pencilSketch_Mat_src_Mat_dst1_Mat_dst2_float_sigma_s_float_sigma_r_float_shade_factor(src.as_raw_Mat(), dst1.as_raw_Mat(), dst2.as_raw_Mat(), sigma_s, sigma_r, shade_factor) }.into_result()
}

// identifier: cv_perspectiveTransform_Mat_src_Mat_dst_Mat_m
/// Performs the perspective matrix transformation of vectors.
/// 
/// The function cv::perspectiveTransform transforms every element of src by
/// treating it as a 2D or 3D vector, in the following way:
/// <div lang='latex'>(x, y, z)  \rightarrow (x'/w, y'/w, z'/w)</div>
/// where
/// <div lang='latex'>(x', y', z', w') =  \texttt{mat} \cdot \begin{bmatrix} x & y & z & 1  \end{bmatrix}</div>
/// and
/// <div lang='latex'>w =  \fork{w'}{if \(w' \ne 0\)}{\infty}{otherwise}</div>
/// 
/// Here a 3D vector transformation is shown. In case of a 2D vector
/// transformation, the z component is omitted.
/// 
/// 
/// Note: The function transforms a sparse set of 2D or 3D vectors. If you
/// want to transform an image using perspective transformation, use
/// warpPerspective . If you have an inverse problem, that is, you want to
/// compute the most probable perspective transformation out of several
/// pairs of corresponding points, you can use getPerspectiveTransform or
/// findHomography .
/// ## Parameters
/// * src: input two-channel or three-channel floating-point array; each
/// element is a 2D/3D vector to be transformed.
/// * dst: output array of the same size and type as src.
/// * m: 3x3 or 4x4 floating-point transformation matrix.
/// @sa  transform, warpPerspective, getPerspectiveTransform, findHomography
pub fn perspective_transform(src: &core::Mat, dst: &mut core::Mat, m: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_perspectiveTransform_Mat_src_Mat_dst_Mat_m(src.as_raw_Mat(), dst.as_raw_Mat(), m.as_raw_Mat()) }.into_result()
}

// identifier: cv_phaseCorrelate_Mat_src1_Mat_src2_Mat_window_double_X_response
/// The function is used to detect translational shifts that occur between two images.
/// 
/// The operation takes advantage of the Fourier shift theorem for detecting the translational shift in
/// the frequency domain. It can be used for fast image registration as well as motion estimation. For
/// more information please see <http://en.wikipedia.org/wiki/Phase_correlation>
/// 
/// Calculates the cross-power spectrum of two supplied source arrays. The arrays are padded if needed
/// with getOptimalDFTSize.
/// 
/// The function performs the following equations:
/// - First it applies a Hanning window (see <http://en.wikipedia.org/wiki/Hann_function>) to each
/// image to remove possible edge effects. This window is cached until the array size changes to speed
/// up processing time.
/// - Next it computes the forward DFTs of each source array:
/// <div lang='latex'>\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}</div>
/// where <span lang='latex'>\mathcal{F}</span> is the forward DFT.
/// - It then computes the cross-power spectrum of each frequency domain array:
/// <div lang='latex'>R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}</div>
/// - Next the cross-correlation is converted back into the time domain via the inverse DFT:
/// <div lang='latex'>r = \mathcal{F}^{-1}\{R\}</div>
/// - Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to
/// achieve sub-pixel accuracy.
/// <div lang='latex'>(\Delta x, \Delta y) = \texttt{weightedCentroid} \{\arg \max_{(x, y)}\{r\}\}</div>
/// - If non-zero, the response parameter is computed as the sum of the elements of r within the 5x5
/// centroid around the peak location. It is normalized to a maximum of 1 (meaning there is a single
/// peak) and will be smaller when there are multiple peaks.
/// 
/// ## Parameters
/// * src1: Source floating point array (CV_32FC1 or CV_64FC1)
/// * src2: Source floating point array (CV_32FC1 or CV_64FC1)
/// * window: Floating point array with windowing coefficients to reduce edge effects (optional).
/// * response: Signal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
/// @returns detected phase shift (sub-pixel) between the two arrays.
/// 
/// @sa dft, getOptimalDFTSize, idft, mulSpectrums createHanningWindow
///
/// ## C++ default parameters:
/// * window: noArray()
/// * response: 0
pub fn phase_correlate(src1: &core::Mat, src2: &core::Mat, window: &core::Mat, response: &mut f64) -> Result<core::Point2d> {
    unsafe { sys::cv_core_cv_phaseCorrelate_Mat_src1_Mat_src2_Mat_window_double_X_response(src1.as_raw_Mat(), src2.as_raw_Mat(), window.as_raw_Mat(), response) }.into_result()
}

// identifier: cv_phase_Mat_x_Mat_y_Mat_angle_bool_angleInDegrees
/// Calculates the rotation angle of 2D vectors.
/// 
/// The function cv::phase calculates the rotation angle of each 2D vector that
/// is formed from the corresponding elements of x and y :
/// <div lang='latex'>\texttt{angle} (I) =  \texttt{atan2} ( \texttt{y} (I), \texttt{x} (I))</div>
/// 
/// The angle estimation accuracy is about 0.3 degrees. When x(I)=y(I)=0 ,
/// the corresponding angle(I) is set to 0.
/// ## Parameters
/// * x: input floating-point array of x-coordinates of 2D vectors.
/// * y: input array of y-coordinates of 2D vectors; it must have the
/// same size and the same type as x.
/// * angle: output array of vector angles; it has the same size and
/// same type as x .
/// * angleInDegrees: when true, the function calculates the angle in
/// degrees, otherwise, they are measured in radians.
///
/// ## C++ default parameters:
/// * angle_in_degrees: false
pub fn phase(x: &core::Mat, y: &core::Mat, angle: &mut core::Mat, angle_in_degrees: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_phase_Mat_x_Mat_y_Mat_angle_bool_angleInDegrees(x.as_raw_Mat(), y.as_raw_Mat(), angle.as_raw_Mat(), angle_in_degrees) }.into_result()
}

// identifier: cv_pointPolygonTest_Mat_contour_Point2f_pt_bool_measureDist
/// Performs a point-in-contour test.
/// 
/// The function determines whether the point is inside a contour, outside, or lies on an edge (or
/// coincides with a vertex). It returns positive (inside), negative (outside), or zero (on an edge)
/// value, correspondingly. When measureDist=false , the return value is +1, -1, and 0, respectively.
/// Otherwise, the return value is a signed distance between the point and the nearest contour edge.
/// 
/// See below a sample output of the function where each image pixel is tested against the contour:
/// 
/// ![sample output](pics/pointpolygon.png)
/// 
/// ## Parameters
/// * contour: Input contour.
/// * pt: Point tested against the contour.
/// * measureDist: If true, the function estimates the signed distance from the point to the
/// nearest contour edge. Otherwise, the function only checks if the point is inside a contour or not.
pub fn point_polygon_test(contour: &core::Mat, pt: core::Point2f, measure_dist: bool) -> Result<f64> {
    unsafe { sys::cv_core_cv_pointPolygonTest_Mat_contour_Point2f_pt_bool_measureDist(contour.as_raw_Mat(), pt, measure_dist) }.into_result()
}

// identifier: cv_polarToCart_Mat_magnitude_Mat_angle_Mat_x_Mat_y_bool_angleInDegrees
/// Calculates x and y coordinates of 2D vectors from their magnitude and angle.
/// 
/// The function cv::polarToCart calculates the Cartesian coordinates of each 2D
/// vector represented by the corresponding elements of magnitude and angle:
/// <div lang='latex'>\begin{array}{l} \texttt{x} (I) =  \texttt{magnitude} (I) \cos ( \texttt{angle} (I)) \\ \texttt{y} (I) =  \texttt{magnitude} (I) \sin ( \texttt{angle} (I)) \\ \end{array}</div>
/// 
/// The relative accuracy of the estimated coordinates is about 1e-6.
/// ## Parameters
/// * magnitude: input floating-point array of magnitudes of 2D vectors;
/// it can be an empty matrix (=Mat()), in this case, the function assumes
/// that all the magnitudes are =1; if it is not empty, it must have the
/// same size and type as angle.
/// * angle: input floating-point array of angles of 2D vectors.
/// * x: output array of x-coordinates of 2D vectors; it has the same
/// size and type as angle.
/// * y: output array of y-coordinates of 2D vectors; it has the same
/// size and type as angle.
/// * angleInDegrees: when true, the input angles are measured in
/// degrees, otherwise, they are measured in radians.
/// @sa cartToPolar, magnitude, phase, exp, log, pow, sqrt
///
/// ## C++ default parameters:
/// * angle_in_degrees: false
pub fn polar_to_cart(magnitude: &core::Mat, angle: &core::Mat, x: &mut core::Mat, y: &mut core::Mat, angle_in_degrees: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_polarToCart_Mat_magnitude_Mat_angle_Mat_x_Mat_y_bool_angleInDegrees(magnitude.as_raw_Mat(), angle.as_raw_Mat(), x.as_raw_Mat(), y.as_raw_Mat(), angle_in_degrees) }.into_result()
}

// identifier: cv_polylines_Mat_img_VectorOfMat_pts_bool_isClosed_Scalar_color_int_thickness_int_lineType_int_shift
/// Draws several polygonal curves.
/// 
/// ## Parameters
/// * img: Image.
/// * pts: Array of polygonal curves.
/// * isClosed: Flag indicating whether the drawn polylines are closed or not. If they are closed,
/// the function draws a line from the last vertex of each curve to its first vertex.
/// * color: Polyline color.
/// * thickness: Thickness of the polyline edges.
/// * lineType: Type of the line segments. See #LineTypes
/// * shift: Number of fractional bits in the vertex coordinates.
/// 
/// The function cv::polylines draws one or more polygonal curves.
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * shift: 0
pub fn polylines(img: &mut core::Mat, pts: &types::VectorOfMat, is_closed: bool, color: core::Scalar, thickness: i32, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_polylines_Mat_img_VectorOfMat_pts_bool_isClosed_Scalar_color_int_thickness_int_lineType_int_shift(img.as_raw_Mat(), pts.as_raw_VectorOfMat(), is_closed, color, thickness, line_type, shift) }.into_result()
}

// identifier: cv_pow_Mat_src_double_power_Mat_dst
/// Raises every array element to a power.
/// 
/// The function cv::pow raises every element of the input array to power :
/// <div lang='latex'>\texttt{dst} (I) =  \fork{\texttt{src}(I)^{power}}{if \(\texttt{power}\) is integer}{|\texttt{src}(I)|^{power}}{otherwise}</div>
/// 
/// So, for a non-integer power exponent, the absolute values of input array
/// elements are used. However, it is possible to get true values for
/// negative values using some extra operations. In the example below,
/// computing the 5th root of array src shows:
/// ```ignore{.cpp}
/// Mat mask = src < 0;
/// pow(src, 1./5, dst);
/// subtract(Scalar::all(0), dst, dst, mask);
/// ```
/// 
/// For some values of power, such as integer values, 0.5 and -0.5,
/// specialized faster algorithms are used.
/// 
/// Special values (NaN, Inf) are not handled.
/// ## Parameters
/// * src: input array.
/// * power: exponent of power.
/// * dst: output array of the same size and type as src.
/// @sa sqrt, exp, log, cartToPolar, polarToCart
pub fn pow(src: &core::Mat, power: f64, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_pow_Mat_src_double_power_Mat_dst(src.as_raw_Mat(), power, dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_pow_softdouble_a_softdouble_b
pub fn pow_1(a: &core::softdouble, b: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_pow_softdouble_a_softdouble_b(a.as_raw_softdouble(), b.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_pow_softfloat_a_softfloat_b
/// Raising to the power
/// 
/// Special cases:
/// - x**NaN is NaN for any x
/// - ( |x| == 1 )**Inf is NaN
/// - ( |x|  > 1 )**+Inf or ( |x| < 1 )**-Inf is +Inf
/// - ( |x|  > 1 )**-Inf or ( |x| < 1 )**+Inf is 0
/// - x ** 0 == 1 for any x
/// - x ** 1 == 1 for any x
/// - NaN ** y is NaN for any other y
/// - Inf**(y < 0) == 0
/// - Inf ** y is +Inf for any other y
/// - (x < 0)**y is NaN for any other y if x can't be correctly rounded to integer
/// - 0 ** 0 == 1
/// - 0 ** (y < 0) is +Inf
/// - 0 ** (y > 0) is 0
pub fn pow_2(a: &core::softfloat, b: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_pow_softfloat_a_softfloat_b(a.as_raw_softfloat(), b.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_preCornerDetect_Mat_src_Mat_dst_int_ksize_int_borderType
/// Calculates a feature map for corner detection.
/// 
/// The function calculates the complex spatial derivative-based function of the source image
/// 
/// <div lang='latex'>\texttt{dst} = (D_x  \texttt{src} )^2  \cdot D_{yy}  \texttt{src} + (D_y  \texttt{src} )^2  \cdot D_{xx}  \texttt{src} - 2 D_x  \texttt{src} \cdot D_y  \texttt{src} \cdot D_{xy}  \texttt{src}</div>
/// 
/// where <span lang='latex'>D_x</span>,<span lang='latex'>D_y</span> are the first image derivatives, <span lang='latex'>D_{xx}</span>,<span lang='latex'>D_{yy}</span> are the second image
/// derivatives, and <span lang='latex'>D_{xy}</span> is the mixed derivative.
/// 
/// The corners can be found as local maximums of the functions, as shown below:
/// ```ignore
/// Mat corners, dilated_corners;
/// preCornerDetect(image, corners, 3);
/// // dilation with 3x3 rectangular structuring element
/// dilate(corners, dilated_corners, Mat(), 1);
/// Mat corner_mask = corners == dilated_corners;
/// ```
/// 
/// 
/// ## Parameters
/// * src: Source single-channel 8-bit of floating-point image.
/// * dst: Output image that has the type CV_32F and the same size as src .
/// * ksize: %Aperture size of the Sobel .
/// * borderType: Pixel extrapolation method. See #BorderTypes.
///
/// ## C++ default parameters:
/// * border_type: BORDER_DEFAULT
pub fn pre_corner_detect(src: &core::Mat, dst: &mut core::Mat, ksize: i32, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_preCornerDetect_Mat_src_Mat_dst_int_ksize_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ksize, border_type) }.into_result()
}

// identifier: cv_projectPoints_Mat_objectPoints_Mat_rvec_Mat_tvec_Mat_cameraMatrix_Mat_distCoeffs_Mat_imagePoints_Mat_jacobian_double_aspectRatio
/// Projects 3D points to an image plane.
/// 
/// ## Parameters
/// * objectPoints: Array of object points, 3xN/Nx3 1-channel or 1xN/Nx1 3-channel (or
/// vector\<Point3f\> ), where N is the number of points in the view.
/// * rvec: Rotation vector. See Rodrigues for details.
/// * tvec: Translation vector.
/// * cameraMatrix: Camera matrix <span lang='latex'>A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{_1}</span> .
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements. If the vector is empty, the zero distortion coefficients are assumed.
/// * imagePoints: Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or
/// vector\<Point2f\> .
/// * jacobian: Optional output 2Nx(10+\<numDistCoeffs\>) jacobian matrix of derivatives of image
/// points with respect to components of the rotation vector, translation vector, focal lengths,
/// coordinates of the principal point and the distortion coefficients. In the old interface different
/// components of the jacobian are returned via different output parameters.
/// * aspectRatio: Optional "fixed aspect ratio" parameter. If the parameter is not 0, the
/// function assumes that the aspect ratio (*fx/fy*) is fixed and correspondingly adjusts the jacobian
/// matrix.
/// 
/// The function computes projections of 3D points to the image plane given intrinsic and extrinsic
/// camera parameters. Optionally, the function computes Jacobians - matrices of partial derivatives of
/// image points coordinates (as functions of all the input parameters) with respect to the particular
/// parameters, intrinsic and/or extrinsic. The Jacobians are used during the global optimization in
/// calibrateCamera, solvePnP, and stereoCalibrate . The function itself can also be used to compute a
/// re-projection error given the current intrinsic and extrinsic parameters.
/// 
/// 
/// Note: By setting rvec=tvec=(0,0,0) or by setting cameraMatrix to a 3x3 identity matrix, or by
/// passing zero distortion coefficients, you can get various useful partial cases of the function. This
/// means that you can compute the distorted coordinates for a sparse set of points or apply a
/// perspective transformation (and also compute the derivatives) in the ideal zero-distortion setup.
///
/// ## C++ default parameters:
/// * jacobian: noArray()
/// * aspect_ratio: 0
pub fn project_points(object_points: &core::Mat, rvec: &core::Mat, tvec: &core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, image_points: &mut core::Mat, jacobian: &mut core::Mat, aspect_ratio: f64) -> Result<()> {
    unsafe { sys::cv_core_cv_projectPoints_Mat_objectPoints_Mat_rvec_Mat_tvec_Mat_cameraMatrix_Mat_distCoeffs_Mat_imagePoints_Mat_jacobian_double_aspectRatio(object_points.as_raw_Mat(), rvec.as_raw_Mat(), tvec.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), image_points.as_raw_Mat(), jacobian.as_raw_Mat(), aspect_ratio) }.into_result()
}

// identifier: cv_putText_Mat_img_String_text_Point_org_int_fontFace_double_fontScale_Scalar_color_int_thickness_int_lineType_bool_bottomLeftOrigin
/// Draws a text string.
/// 
/// The function cv::putText renders the specified text string in the image. Symbols that cannot be rendered
/// using the specified font are replaced by question marks. See #getTextSize for a text rendering code
/// example.
/// 
/// ## Parameters
/// * img: Image.
/// * text: Text string to be drawn.
/// * org: Bottom-left corner of the text string in the image.
/// * fontFace: Font type, see #HersheyFonts.
/// * fontScale: Font scale factor that is multiplied by the font-specific base size.
/// * color: Text color.
/// * thickness: Thickness of the lines used to draw a text.
/// * lineType: Line type. See #LineTypes
/// * bottomLeftOrigin: When true, the image data origin is at the bottom-left corner. Otherwise,
/// it is at the top-left corner.
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * bottom_left_origin: false
pub fn put_text(img: &mut core::Mat, text: &str, org: core::Point, font_face: i32, font_scale: f64, color: core::Scalar, thickness: i32, line_type: i32, bottom_left_origin: bool) -> Result<()> {
    string_arg!(text);
    unsafe { sys::cv_core_cv_putText_Mat_img_String_text_Point_org_int_fontFace_double_fontScale_Scalar_color_int_thickness_int_lineType_bool_bottomLeftOrigin(img.as_raw_Mat(), text.as_ptr(), org, font_face, font_scale, color, thickness, line_type, bottom_left_origin) }.into_result()
}

// identifier: cv_pyrDown_Mat_src_Mat_dst_Size_dstsize_int_borderType
/// Blurs an image and downsamples it.
/// 
/// By default, size of the output image is computed as `Size((src.cols+1)/2, (src.rows+1)/2)`, but in
/// any case, the following conditions should be satisfied:
/// 
/// <div lang='latex'>\begin{array}{l} | \texttt{dstsize.width} *2-src.cols| \leq 2 \\ | \texttt{dstsize.height} *2-src.rows| \leq 2 \end{array}</div>
/// 
/// The function performs the downsampling step of the Gaussian pyramid construction. First, it
/// convolves the source image with the kernel:
/// 
/// <div lang='latex'>\frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1  \\ 4 & 16 & 24 & 16 & 4  \\ 6 & 24 & 36 & 24 & 6  \\ 4 & 16 & 24 & 16 & 4  \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix}</div>
/// 
/// Then, it downsamples the image by rejecting even rows and columns.
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image; it has the specified size and the same type as src.
/// * dstsize: size of the output image.
/// * borderType: Pixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)
///
/// ## C++ default parameters:
/// * dstsize: Size()
/// * border_type: BORDER_DEFAULT
pub fn pyr_down(src: &core::Mat, dst: &mut core::Mat, dstsize: core::Size, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_pyrDown_Mat_src_Mat_dst_Size_dstsize_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), dstsize, border_type) }.into_result()
}

// identifier: cv_pyrMeanShiftFiltering_Mat_src_Mat_dst_double_sp_double_sr_int_maxLevel_TermCriteria_termcrit
/// Performs initial step of meanshift segmentation of an image.
/// 
/// The function implements the filtering stage of meanshift segmentation, that is, the output of the
/// function is the filtered "posterized" image with color gradients and fine-grain texture flattened.
/// At every pixel (X,Y) of the input image (or down-sized input image, see below) the function executes
/// meanshift iterations, that is, the pixel (X,Y) neighborhood in the joint space-color hyperspace is
/// considered:
/// 
/// <div lang='latex'>(x,y): X- \texttt{sp} \le x  \le X+ \texttt{sp} , Y- \texttt{sp} \le y  \le Y+ \texttt{sp} , ||(R,G,B)-(r,g,b)||   \le \texttt{sr}</div>
/// 
/// where (R,G,B) and (r,g,b) are the vectors of color components at (X,Y) and (x,y), respectively
/// (though, the algorithm does not depend on the color space used, so any 3-component color space can
/// be used instead). Over the neighborhood the average spatial value (X',Y') and average color vector
/// (R',G',B') are found and they act as the neighborhood center on the next iteration:
/// 
/// <div lang='latex'>(X,Y)~(X',Y'), (R,G,B)~(R',G',B').</div>
/// 
/// After the iterations over, the color components of the initial pixel (that is, the pixel from where
/// the iterations started) are set to the final value (average color at the last iteration):
/// 
/// <div lang='latex'>I(X,Y) <- (R*,G*,B*)</div>
/// 
/// When maxLevel \> 0, the gaussian pyramid of maxLevel+1 levels is built, and the above procedure is
/// run on the smallest layer first. After that, the results are propagated to the larger layer and the
/// iterations are run again only on those pixels where the layer colors differ by more than sr from the
/// lower-resolution layer of the pyramid. That makes boundaries of color regions sharper. Note that the
/// results will be actually different from the ones obtained by running the meanshift procedure on the
/// whole original image (i.e. when maxLevel==0).
/// 
/// ## Parameters
/// * src: The source 8-bit, 3-channel image.
/// * dst: The destination image of the same format and the same size as the source.
/// * sp: The spatial window radius.
/// * sr: The color window radius.
/// * maxLevel: Maximum level of the pyramid for the segmentation.
/// * termcrit: Termination criteria: when to stop meanshift iterations.
///
/// ## C++ default parameters:
/// * max_level: 1
/// * termcrit: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1)
pub fn pyr_mean_shift_filtering(src: &core::Mat, dst: &mut core::Mat, sp: f64, sr: f64, max_level: i32, termcrit: &core::TermCriteria) -> Result<()> {
    unsafe { sys::cv_core_cv_pyrMeanShiftFiltering_Mat_src_Mat_dst_double_sp_double_sr_int_maxLevel_TermCriteria_termcrit(src.as_raw_Mat(), dst.as_raw_Mat(), sp, sr, max_level, termcrit.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_pyrUp_Mat_src_Mat_dst_Size_dstsize_int_borderType
/// Upsamples an image and then blurs it.
/// 
/// By default, size of the output image is computed as `Size(src.cols\*2, (src.rows\*2)`, but in any
/// case, the following conditions should be satisfied:
/// 
/// <div lang='latex'>\begin{array}{l} | \texttt{dstsize.width} -src.cols*2| \leq  ( \texttt{dstsize.width}   \mod  2)  \\ | \texttt{dstsize.height} -src.rows*2| \leq  ( \texttt{dstsize.height}   \mod  2) \end{array}</div>
/// 
/// The function performs the upsampling step of the Gaussian pyramid construction, though it can
/// actually be used to construct the Laplacian pyramid. First, it upsamples the source image by
/// injecting even zero rows and columns and then convolves the result with the same kernel as in
/// pyrDown multiplied by 4.
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image. It has the specified size and the same type as src .
/// * dstsize: size of the output image.
/// * borderType: Pixel extrapolation method, see #BorderTypes (only #BORDER_DEFAULT is supported)
///
/// ## C++ default parameters:
/// * dstsize: Size()
/// * border_type: BORDER_DEFAULT
pub fn pyr_up(src: &core::Mat, dst: &mut core::Mat, dstsize: core::Size, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_pyrUp_Mat_src_Mat_dst_Size_dstsize_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), dstsize, border_type) }.into_result()
}

// identifier: cv_randn_Mat_dst_Mat_mean_Mat_stddev
/// Fills the array with normally distributed random numbers.
/// 
/// The function cv::randn fills the matrix dst with normally distributed random numbers with the specified
/// mean vector and the standard deviation matrix. The generated random numbers are clipped to fit the
/// value range of the output array data type.
/// ## Parameters
/// * dst: output array of random numbers; the array must be pre-allocated and have 1 to 4 channels.
/// * mean: mean value (expectation) of the generated random numbers.
/// * stddev: standard deviation of the generated random numbers; it can be either a vector (in
/// which case a diagonal standard deviation matrix is assumed) or a square matrix.
/// @sa RNG, randu
pub fn randn(dst: &mut core::Mat, mean: &core::Mat, stddev: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_randn_Mat_dst_Mat_mean_Mat_stddev(dst.as_raw_Mat(), mean.as_raw_Mat(), stddev.as_raw_Mat()) }.into_result()
}

// identifier: cv_randu_Mat_dst_Mat_low_Mat_high
/// Generates a single uniformly-distributed random number or an array of random numbers.
/// 
/// Non-template variant of the function fills the matrix dst with uniformly-distributed
/// random numbers from the specified range:
/// <div lang='latex'>\texttt{low} _c  \leq \texttt{dst} (I)_c <  \texttt{high} _c</div>
/// ## Parameters
/// * dst: output array of random numbers; the array must be pre-allocated.
/// * low: inclusive lower boundary of the generated random numbers.
/// * high: exclusive upper boundary of the generated random numbers.
/// @sa RNG, randn, theRNG
pub fn randu(dst: &mut core::Mat, low: &core::Mat, high: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_randu_Mat_dst_Mat_low_Mat_high(dst.as_raw_Mat(), low.as_raw_Mat(), high.as_raw_Mat()) }.into_result()
}

// identifier: cv_recoverPose_Mat_E_Mat_points1_Mat_points2_Mat_R_Mat_t_double_focal_Point2d_pp_Mat_mask
/// @overload
/// ## Parameters
/// * E: The input essential matrix.
/// * points1: Array of N 2D points from the first image. The point coordinates should be
/// floating-point (single or double precision).
/// * points2: Array of the second image points of the same size and format as points1 .
/// * R: Recovered relative rotation.
/// * t: Recovered relative translation.
/// * focal: Focal length of the camera. Note that this function assumes that points1 and points2
/// are feature points from cameras with same focal length and principal point.
/// * pp: principal point of the camera.
/// * mask: Input/output mask for inliers in points1 and points2.
/// :   If it is not empty, then it marks inliers in points1 and points2 for then given essential
/// matrix E. Only these inliers will be used to recover pose. In the output mask only inliers
/// which pass the cheirality check.
/// 
/// This function differs from the one above that it computes camera matrix from focal length and
/// principal point:
/// 
/// <div lang='latex'>K =
/// \begin{bmatrix}
/// f & 0 & x_{pp}  \\
/// 0 & f & y_{pp}  \\
/// 0 & 0 & 1
/// \end{bmatrix}</div>
///
/// ## C++ default parameters:
/// * focal: 1.0
/// * pp: Point2d(0, 0)
/// * mask: noArray()
pub fn recover_pose(e: &core::Mat, points1: &core::Mat, points2: &core::Mat, r: &mut core::Mat, t: &mut core::Mat, focal: f64, pp: core::Point2d, mask: &mut core::Mat) -> Result<i32> {
    unsafe { sys::cv_core_cv_recoverPose_Mat_E_Mat_points1_Mat_points2_Mat_R_Mat_t_double_focal_Point2d_pp_Mat_mask(e.as_raw_Mat(), points1.as_raw_Mat(), points2.as_raw_Mat(), r.as_raw_Mat(), t.as_raw_Mat(), focal, pp, mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_recoverPose_Mat_E_Mat_points1_Mat_points2_Mat_cameraMatrix_Mat_R_Mat_t_Mat_mask
/// Recover relative camera rotation and translation from an estimated essential matrix and the
/// corresponding points in two images, using cheirality check. Returns the number of inliers which pass
/// the check.
/// 
/// ## Parameters
/// * E: The input essential matrix.
/// * points1: Array of N 2D points from the first image. The point coordinates should be
/// floating-point (single or double precision).
/// * points2: Array of the second image points of the same size and format as points1 .
/// * cameraMatrix: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> .
/// Note that this function assumes that points1 and points2 are feature points from cameras with the
/// same camera matrix.
/// * R: Recovered relative rotation.
/// * t: Recovered relative translation.
/// * mask: Input/output mask for inliers in points1 and points2.
/// :   If it is not empty, then it marks inliers in points1 and points2 for then given essential
/// matrix E. Only these inliers will be used to recover pose. In the output mask only inliers
/// which pass the cheirality check.
/// This function decomposes an essential matrix using decomposeEssentialMat and then verifies possible
/// pose hypotheses by doing cheirality check. The cheirality check basically means that the
/// triangulated 3D points should have positive depth. Some details can be found in @cite Nister03 .
/// 
/// This function can be used to process output E and mask from findEssentialMat. In this scenario,
/// points1 and points2 are the same input for findEssentialMat. :
/// ```ignore
/// // Example. Estimation of fundamental matrix using the RANSAC algorithm
/// int point_count = 100;
/// vector<Point2f> points1(point_count);
/// vector<Point2f> points2(point_count);
/// 
/// // initialize the points here ...
/// for( int i = 0; i < point_count; i++ )
/// {
/// points1[i] = ...;
/// points2[i] = ...;
/// }
/// 
/// // cametra matrix with both focal lengths = 1, and principal point = (0, 0)
/// Mat cameraMatrix = Mat::eye(3, 3, CV_64F);
/// 
/// Mat E, R, t, mask;
/// 
/// E = findEssentialMat(points1, points2, cameraMatrix, RANSAC, 0.999, 1.0, mask);
/// recoverPose(E, points1, points2, cameraMatrix, R, t, mask);
/// ```
///
/// ## C++ default parameters:
/// * mask: noArray()
pub fn recover_pose_matrix(e: &core::Mat, points1: &core::Mat, points2: &core::Mat, camera_matrix: &core::Mat, r: &mut core::Mat, t: &mut core::Mat, mask: &mut core::Mat) -> Result<i32> {
    unsafe { sys::cv_core_cv_recoverPose_Mat_E_Mat_points1_Mat_points2_Mat_cameraMatrix_Mat_R_Mat_t_Mat_mask(e.as_raw_Mat(), points1.as_raw_Mat(), points2.as_raw_Mat(), camera_matrix.as_raw_Mat(), r.as_raw_Mat(), t.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
}

// identifier: cv_recoverPose_Mat_E_Mat_points1_Mat_points2_Mat_cameraMatrix_Mat_R_Mat_t_double_distanceThresh_Mat_mask_Mat_triangulatedPoints
/// @overload
/// ## Parameters
/// * E: The input essential matrix.
/// * points1: Array of N 2D points from the first image. The point coordinates should be
/// floating-point (single or double precision).
/// * points2: Array of the second image points of the same size and format as points1.
/// * cameraMatrix: Camera matrix <span lang='latex'>K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> .
/// Note that this function assumes that points1 and points2 are feature points from cameras with the
/// same camera matrix.
/// * R: Recovered relative rotation.
/// * t: Recovered relative translation.
/// * distanceThresh: threshold distance which is used to filter out far away points (i.e. infinite points).
/// * mask: Input/output mask for inliers in points1 and points2.
/// :   If it is not empty, then it marks inliers in points1 and points2 for then given essential
/// matrix E. Only these inliers will be used to recover pose. In the output mask only inliers
/// which pass the cheirality check.
/// * triangulatedPoints: 3d points which were reconstructed by triangulation.
///
/// ## C++ default parameters:
/// * mask: noArray()
/// * triangulated_points: noArray()
pub fn recover_pose_1(e: &core::Mat, points1: &core::Mat, points2: &core::Mat, camera_matrix: &core::Mat, r: &mut core::Mat, t: &mut core::Mat, distance_thresh: f64, mask: &mut core::Mat, triangulated_points: &mut core::Mat) -> Result<i32> {
    unsafe { sys::cv_core_cv_recoverPose_Mat_E_Mat_points1_Mat_points2_Mat_cameraMatrix_Mat_R_Mat_t_double_distanceThresh_Mat_mask_Mat_triangulatedPoints(e.as_raw_Mat(), points1.as_raw_Mat(), points2.as_raw_Mat(), camera_matrix.as_raw_Mat(), r.as_raw_Mat(), t.as_raw_Mat(), distance_thresh, mask.as_raw_Mat(), triangulated_points.as_raw_Mat()) }.into_result()
}

// identifier: cv_rectangle_Mat_img_Point_pt1_Point_pt2_Scalar_color_int_thickness_int_lineType_int_shift
/// Draws a simple, thick, or filled up-right rectangle.
/// 
/// The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners
/// are pt1 and pt2.
/// 
/// ## Parameters
/// * img: Image.
/// * pt1: Vertex of the rectangle.
/// * pt2: Vertex of the rectangle opposite to pt1 .
/// * color: Rectangle color or brightness (grayscale image).
/// * thickness: Thickness of lines that make up the rectangle. Negative values, like #FILLED,
/// mean that the function has to draw a filled rectangle.
/// * lineType: Type of the line. See #LineTypes
/// * shift: Number of fractional bits in the point coordinates.
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * shift: 0
pub fn rectangle_points(img: &mut core::Mat, pt1: core::Point, pt2: core::Point, color: core::Scalar, thickness: i32, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_rectangle_Mat_img_Point_pt1_Point_pt2_Scalar_color_int_thickness_int_lineType_int_shift(img.as_raw_Mat(), pt1, pt2, color, thickness, line_type, shift) }.into_result()
}

// identifier: cv_rectangle_Mat_img_Rect_rec_Scalar_color_int_thickness_int_lineType_int_shift
/// @overload
/// 
/// use `rec` parameter as alternative specification of the drawn rectangle: `r.tl() and
/// r.br()-Point(1,1)` are opposite corners
///
/// ## C++ default parameters:
/// * thickness: 1
/// * line_type: LINE_8
/// * shift: 0
pub fn rectangle(img: &core::Mat, rec: core::Rect, color: core::Scalar, thickness: i32, line_type: i32, shift: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_rectangle_Mat_img_Rect_rec_Scalar_color_int_thickness_int_lineType_int_shift(img.as_raw_Mat(), rec, color, thickness, line_type, shift) }.into_result()
}

// identifier: cv_rectify3Collinear_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Mat_cameraMatrix3_Mat_distCoeffs3_VectorOfMat_imgpt1_VectorOfMat_imgpt3_Size_imageSize_Mat_R12_Mat_T12_Mat_R13_Mat_T13_Mat_R1_Mat_R2_Mat_R3_Mat_P1_Mat_P2_Mat_P3_Mat_Q_double_alpha_Size_newImgSize_Rect_X_roi1_Rect_X_roi2_int_flags
pub fn rectify3_collinear(camera_matrix1: &core::Mat, dist_coeffs1: &core::Mat, camera_matrix2: &core::Mat, dist_coeffs2: &core::Mat, camera_matrix3: &core::Mat, dist_coeffs3: &core::Mat, imgpt1: &types::VectorOfMat, imgpt3: &types::VectorOfMat, image_size: core::Size, r12: &core::Mat, t12: &core::Mat, r13: &core::Mat, t13: &core::Mat, r1: &mut core::Mat, r2: &mut core::Mat, r3: &mut core::Mat, p1: &mut core::Mat, p2: &mut core::Mat, p3: &mut core::Mat, q: &mut core::Mat, alpha: f64, new_img_size: core::Size, roi1: &mut core::Rect, roi2: &mut core::Rect, flags: i32) -> Result<f32> {
    unsafe { sys::cv_core_cv_rectify3Collinear_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Mat_cameraMatrix3_Mat_distCoeffs3_VectorOfMat_imgpt1_VectorOfMat_imgpt3_Size_imageSize_Mat_R12_Mat_T12_Mat_R13_Mat_T13_Mat_R1_Mat_R2_Mat_R3_Mat_P1_Mat_P2_Mat_P3_Mat_Q_double_alpha_Size_newImgSize_Rect_X_roi1_Rect_X_roi2_int_flags(camera_matrix1.as_raw_Mat(), dist_coeffs1.as_raw_Mat(), camera_matrix2.as_raw_Mat(), dist_coeffs2.as_raw_Mat(), camera_matrix3.as_raw_Mat(), dist_coeffs3.as_raw_Mat(), imgpt1.as_raw_VectorOfMat(), imgpt3.as_raw_VectorOfMat(), image_size, r12.as_raw_Mat(), t12.as_raw_Mat(), r13.as_raw_Mat(), t13.as_raw_Mat(), r1.as_raw_Mat(), r2.as_raw_Mat(), r3.as_raw_Mat(), p1.as_raw_Mat(), p2.as_raw_Mat(), p3.as_raw_Mat(), q.as_raw_Mat(), alpha, new_img_size, roi1, roi2, flags) }.into_result()
}

// identifier: cv_reduce_Mat_src_Mat_dst_int_dim_int_rtype_int_dtype
/// Reduces a matrix to a vector.
/// 
/// The function #reduce reduces the matrix to a vector by treating the matrix rows/columns as a set of
/// 1D vectors and performing the specified operation on the vectors until a single row/column is
/// obtained. For example, the function can be used to compute horizontal and vertical projections of a
/// raster image. In case of #REDUCE_MAX and #REDUCE_MIN , the output image should have the same type as the source one.
/// In case of #REDUCE_SUM and #REDUCE_AVG , the output may have a larger element bit-depth to preserve accuracy.
/// And multi-channel arrays are also supported in these two reduction modes.
/// 
/// The following code demonstrates its usage for a single channel matrix.
/// @snippet snippets/core_reduce.cpp example
/// 
/// And the following code demonstrates its usage for a two-channel matrix.
/// @snippet snippets/core_reduce.cpp example2
/// 
/// ## Parameters
/// * src: input 2D matrix.
/// * dst: output vector. Its size and type is defined by dim and dtype parameters.
/// * dim: dimension index along which the matrix is reduced. 0 means that the matrix is reduced to
/// a single row. 1 means that the matrix is reduced to a single column.
/// * rtype: reduction operation that could be one of #ReduceTypes
/// * dtype: when negative, the output vector will have the same type as the input matrix,
/// otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src.channels()).
/// @sa repeat
///
/// ## C++ default parameters:
/// * dtype: -1
pub fn reduce(src: &core::Mat, dst: &mut core::Mat, dim: i32, rtype: i32, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_reduce_Mat_src_Mat_dst_int_dim_int_rtype_int_dtype(src.as_raw_Mat(), dst.as_raw_Mat(), dim, rtype, dtype) }.into_result()
}

// identifier: cv_remap_Mat_src_Mat_dst_Mat_map1_Mat_map2_int_interpolation_int_borderMode_Scalar_borderValue
/// Applies a generic geometrical transformation to an image.
/// 
/// The function remap transforms the source image using the specified map:
/// 
/// <div lang='latex'>\texttt{dst} (x,y) =  \texttt{src} (map_x(x,y),map_y(x,y))</div>
/// 
/// where values of pixels with non-integer coordinates are computed using one of available
/// interpolation methods. <span lang='latex'>map_x</span> and <span lang='latex'>map_y</span> can be encoded as separate floating-point maps
/// in <span lang='latex'>map_1</span> and <span lang='latex'>map_2</span> respectively, or interleaved floating-point maps of <span lang='latex'>(x,y)</span> in
/// <span lang='latex'>map_1</span>, or fixed-point maps created by using convertMaps. The reason you might want to
/// convert from floating to fixed-point representations of a map is that they can yield much faster
/// (\~2x) remapping operations. In the converted case, <span lang='latex'>map_1</span> contains pairs (cvFloor(x),
/// cvFloor(y)) and <span lang='latex'>map_2</span> contains indices in a table of interpolation coefficients.
/// 
/// This function cannot operate in-place.
/// 
/// ## Parameters
/// * src: Source image.
/// * dst: Destination image. It has the same size as map1 and the same type as src .
/// * map1: The first map of either (x,y) points or just x values having the type CV_16SC2 ,
/// CV_32FC1, or CV_32FC2. See convertMaps for details on converting a floating point
/// representation to fixed-point for speed.
/// * map2: The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map
/// if map1 is (x,y) points), respectively.
/// * interpolation: Interpolation method (see #InterpolationFlags). The method #INTER_AREA is
/// not supported by this function.
/// * borderMode: Pixel extrapolation method (see #BorderTypes). When
/// borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image that
/// corresponds to the "outliers" in the source image are not modified by the function.
/// * borderValue: Value used in case of a constant border. By default, it is 0.
/// 
/// Note:
/// Due to current implementation limitations the size of an input and output images should be less than 32767x32767.
///
/// ## C++ default parameters:
/// * border_mode: BORDER_CONSTANT
/// * border_value: Scalar()
pub fn remap(src: &core::Mat, dst: &mut core::Mat, map1: &core::Mat, map2: &core::Mat, interpolation: i32, border_mode: i32, border_value: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_remap_Mat_src_Mat_dst_Mat_map1_Mat_map2_int_interpolation_int_borderMode_Scalar_borderValue(src.as_raw_Mat(), dst.as_raw_Mat(), map1.as_raw_Mat(), map2.as_raw_Mat(), interpolation, border_mode, border_value) }.into_result()
}

// identifier: cv_repeat_Mat_src_int_ny_int_nx
/// @overload
/// ## Parameters
/// * src: input array to replicate.
/// * ny: Flag to specify how many times the `src` is repeated along the
/// vertical axis.
/// * nx: Flag to specify how many times the `src` is repeated along the
/// horizontal axis.
pub fn repeat(src: &core::Mat, ny: i32, nx: i32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_repeat_Mat_src_int_ny_int_nx(src.as_raw_Mat(), ny, nx) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_repeat_Mat_src_int_ny_int_nx_Mat_dst
/// Fills the output array with repeated copies of the input array.
/// 
/// The function cv::repeat duplicates the input array one or more times along each of the two axes:
/// <div lang='latex'>\texttt{dst} _{ij}= \texttt{src} _{i\mod src.rows, \; j\mod src.cols }</div>
/// The second variant of the function is more convenient to use with @ref MatrixExpressions.
/// ## Parameters
/// * src: input array to replicate.
/// * ny: Flag to specify how many times the `src` is repeated along the
/// vertical axis.
/// * nx: Flag to specify how many times the `src` is repeated along the
/// horizontal axis.
/// * dst: output array of the same type as `src`.
/// @sa cv::reduce
pub fn repeat_to(src: &core::Mat, ny: i32, nx: i32, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_repeat_Mat_src_int_ny_int_nx_Mat_dst(src.as_raw_Mat(), ny, nx, dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_reprojectImageTo3D_Mat_disparity_Mat__3dImage_Mat_Q_bool_handleMissingValues_int_ddepth
/// Reprojects a disparity image to 3D space.
/// 
/// ## Parameters
/// * disparity: Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit
/// floating-point disparity image. If 16-bit signed format is used, the values are assumed to have no
/// fractional bits.
/// * _3dImage: Output 3-channel floating-point image of the same size as disparity . Each
/// element of _3dImage(x,y) contains 3D coordinates of the point (x,y) computed from the disparity
/// map.
/// * Q: <span lang='latex'>4 \times 4</span> perspective transformation matrix that can be obtained with stereoRectify.
/// * handleMissingValues: Indicates, whether the function should handle missing values (i.e.
/// points where the disparity was not computed). If handleMissingValues=true, then pixels with the
/// minimal disparity that corresponds to the outliers (see StereoMatcher::compute ) are transformed
/// to 3D points with a very large Z value (currently set to 10000).
/// * ddepth: The optional output array depth. If it is -1, the output image will have CV_32F
/// depth. ddepth can also be set to CV_16S, CV_32S or CV_32F.
/// 
/// The function transforms a single-channel disparity map to a 3-channel image representing a 3D
/// surface. That is, for each pixel (x,y) and the corresponding disparity d=disparity(x,y) , it
/// computes:
/// 
/// <div lang='latex'>\begin{array}{l} [X \; Y \; Z \; W]^T =  \texttt{Q} *[x \; y \; \texttt{disparity} (x,y) \; 1]^T  \\ \texttt{\_3dImage} (x,y) = (X/W, \; Y/W, \; Z/W) \end{array}</div>
/// 
/// The matrix Q can be an arbitrary <span lang='latex'>4 \times 4</span> matrix (for example, the one computed by
/// stereoRectify). To reproject a sparse set of points {(x,y,d),...} to 3D space, use
/// perspectiveTransform .
///
/// ## C++ default parameters:
/// * handle_missing_values: false
/// * ddepth: -1
pub fn reproject_image_to3_d(disparity: &core::Mat, _3d_image: &mut core::Mat, q: &core::Mat, handle_missing_values: bool, ddepth: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_reprojectImageTo3D_Mat_disparity_Mat__3dImage_Mat_Q_bool_handleMissingValues_int_ddepth(disparity.as_raw_Mat(), _3d_image.as_raw_Mat(), q.as_raw_Mat(), handle_missing_values, ddepth) }.into_result()
}

// identifier: cv_resizeWindow_String_winname_Size_size
/// @overload
/// ## Parameters
/// * winname: Window name.
/// * size: The new window size.
pub fn resize_window(winname: &str, size: core::Size) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_resizeWindow_String_winname_Size_size(winname.as_ptr(), size) }.into_result()
}

// identifier: cv_resizeWindow_String_winname_int_width_int_height
/// Resizes window to the specified size
/// 
/// 
/// Note:
/// 
/// *   The specified window size is for the image area. Toolbars are not counted.
/// *   Only windows created without cv::WINDOW_AUTOSIZE flag can be resized.
/// 
/// ## Parameters
/// * winname: Window name.
/// * width: The new window width.
/// * height: The new window height.
pub fn resize_window_1(winname: &str, width: i32, height: i32) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_resizeWindow_String_winname_int_width_int_height(winname.as_ptr(), width, height) }.into_result()
}

// identifier: cv_resize_Mat_src_Mat_dst_Size_dsize_double_fx_double_fy_int_interpolation
/// Resizes an image.
/// 
/// The function resize resizes the image src down to or up to the specified size. Note that the
/// initial dst type or size are not taken into account. Instead, the size and type are derived from
/// the `src`,`dsize`,`fx`, and `fy`. If you want to resize src so that it fits the pre-created dst,
/// you may call the function as follows:
/// ```ignore
/// // explicitly specify dsize=dst.size(); fx and fy will be computed from that.
/// resize(src, dst, dst.size(), 0, 0, interpolation);
/// ```
/// 
/// If you want to decimate the image by factor of 2 in each direction, you can call the function this
/// way:
/// ```ignore
/// // specify fx and fy and let the function compute the destination image size.
/// resize(src, dst, Size(), 0.5, 0.5, interpolation);
/// ```
/// 
/// To shrink an image, it will generally look best with #INTER_AREA interpolation, whereas to
/// enlarge an image, it will generally look best with c#INTER_CUBIC (slow) or #INTER_LINEAR
/// (faster but still looks OK).
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image; it has the size dsize (when it is non-zero) or the size computed from
/// src.size(), fx, and fy; the type of dst is the same as of src.
/// * dsize: output image size; if it equals zero, it is computed as:
/// <div lang='latex'>\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}</div>
/// Either dsize or both fx and fy must be non-zero.
/// * fx: scale factor along the horizontal axis; when it equals 0, it is computed as
/// <div lang='latex'>\texttt{(double)dsize.width/src.cols}</div>
/// * fy: scale factor along the vertical axis; when it equals 0, it is computed as
/// <div lang='latex'>\texttt{(double)dsize.height/src.rows}</div>
/// * interpolation: interpolation method, see #InterpolationFlags
/// 
/// @sa  warpAffine, warpPerspective, remap
///
/// ## C++ default parameters:
/// * fx: 0
/// * fy: 0
/// * interpolation: INTER_LINEAR
pub fn resize(src: &core::Mat, dst: &mut core::Mat, dsize: core::Size, fx: f64, fy: f64, interpolation: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_resize_Mat_src_Mat_dst_Size_dsize_double_fx_double_fy_int_interpolation(src.as_raw_Mat(), dst.as_raw_Mat(), dsize, fx, fy, interpolation) }.into_result()
}

// identifier: cv_rotate_Mat_src_Mat_dst_int_rotateCode
/// Rotates a 2D array in multiples of 90 degrees.
/// The function cv::rotate rotates the array in one of three different ways:
///   Rotate by 90 degrees clockwise (rotateCode = ROTATE_90_CLOCKWISE).
///   Rotate by 180 degrees clockwise (rotateCode = ROTATE_180).
///   Rotate by 270 degrees clockwise (rotateCode = ROTATE_90_COUNTERCLOCKWISE).
/// ## Parameters
/// * src: input array.
/// * dst: output array of the same type as src.  The size is the same with ROTATE_180,
/// and the rows and cols are switched for ROTATE_90_CLOCKWISE and ROTATE_90_COUNTERCLOCKWISE.
/// * rotateCode: an enum to specify how to rotate the array; see the enum #RotateFlags
/// @sa transpose , repeat , completeSymm, flip, RotateFlags
pub fn rotate(src: &core::Mat, dst: &mut core::Mat, rotate_code: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_rotate_Mat_src_Mat_dst_int_rotateCode(src.as_raw_Mat(), dst.as_raw_Mat(), rotate_code) }.into_result()
}

// identifier: cv_rotatedRectangleIntersection_RotatedRect_rect1_RotatedRect_rect2_Mat_intersectingRegion
/// Finds out if there is any intersection between two rotated rectangles.
/// 
/// If there is then the vertices of the intersecting region are returned as well.
/// 
/// Below are some examples of intersection configurations. The hatched pattern indicates the
/// intersecting region and the red vertices are returned by the function.
/// 
/// ![intersection examples](pics/intersection.png)
/// 
/// ## Parameters
/// * rect1: First rectangle
/// * rect2: Second rectangle
/// * intersectingRegion: The output array of the vertices of the intersecting region. It returns
/// at most 8 vertices. Stored as std::vector\<cv::Point2f\> or cv::Mat as Mx1 of type CV_32FC2.
/// @returns One of #RectanglesIntersectTypes
pub fn rotated_rectangle_intersection(rect1: &core::RotatedRect, rect2: &core::RotatedRect, intersecting_region: &mut core::Mat) -> Result<i32> {
    unsafe { sys::cv_core_cv_rotatedRectangleIntersection_RotatedRect_rect1_RotatedRect_rect2_Mat_intersectingRegion(rect1.as_raw_RotatedRect(), rect2.as_raw_RotatedRect(), intersecting_region.as_raw_Mat()) }.into_result()
}

// identifier: cv_roundUp_int_a_unsigned_int_b
/// Round first value up to the nearest multiple of second value.
/// 
/// Use this function instead of `ceil((float)a / b) * b` expressions.
/// 
/// @sa divUp
pub fn round_up(a: i32, b: u32) -> Result<i32> {
    unsafe { sys::cv_core_cv_roundUp_int_a_unsigned_int_b(a, b) }.into_result()
}

// identifier: cv_roundUp_size_t_a_unsigned_int_b
/// @overload
pub fn round_up_1(a: size_t, b: u32) -> Result<size_t> {
    unsafe { sys::cv_core_cv_roundUp_size_t_a_unsigned_int_b(a, b) }.into_result()
}

// identifier: cv_sampsonDistance_Mat_pt1_Mat_pt2_Mat_F
/// Calculates the Sampson Distance between two points.
/// 
/// The function cv::sampsonDistance calculates and returns the first order approximation of the geometric error as:
/// <div lang='latex'>
/// sd( \texttt{pt1} , \texttt{pt2} )=
/// \frac{(\texttt{pt2}^t \cdot \texttt{F} \cdot \texttt{pt1})^2}
/// {((\texttt{F} \cdot \texttt{pt1})(0))^2 +
/// ((\texttt{F} \cdot \texttt{pt1})(1))^2 +
/// ((\texttt{F}^t \cdot \texttt{pt2})(0))^2 +
/// ((\texttt{F}^t \cdot \texttt{pt2})(1))^2}
/// </div>
/// The fundamental matrix may be calculated using the cv::findFundamentalMat function. See @cite HartleyZ00 11.4.3 for details.
/// ## Parameters
/// * pt1: first homogeneous 2d point
/// * pt2: second homogeneous 2d point
/// * F: fundamental matrix
/// @return The computed Sampson distance.
pub fn sampson_distance(pt1: &core::Mat, pt2: &core::Mat, f: &core::Mat) -> Result<f64> {
    unsafe { sys::cv_core_cv_sampsonDistance_Mat_pt1_Mat_pt2_Mat_F(pt1.as_raw_Mat(), pt2.as_raw_Mat(), f.as_raw_Mat()) }.into_result()
}

// identifier: cv_saveWindowParameters_String_windowName
/// Saves parameters of the specified window.
/// 
/// The function saveWindowParameters saves size, location, flags, trackbars value, zoom and panning
/// location of the window windowName.
/// 
/// ## Parameters
/// * windowName: Name of the window.
pub fn save_window_parameters(window_name: &str) -> Result<()> {
    string_arg!(window_name);
    unsafe { sys::cv_core_cv_saveWindowParameters_String_windowName(window_name.as_ptr()) }.into_result()
}

// identifier: cv_scaleAdd_Mat_src1_double_alpha_Mat_src2_Mat_dst
/// Calculates the sum of a scaled array and another array.
/// 
/// The function scaleAdd is one of the classical primitive linear algebra operations, known as DAXPY
/// or SAXPY in [BLAS](http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms). It calculates
/// the sum of a scaled array and another array:
/// <div lang='latex'>\texttt{dst} (I)= \texttt{scale} \cdot \texttt{src1} (I) +  \texttt{src2} (I)</div>
/// The function can also be emulated with a matrix expression, for example:
/// ```ignore{.cpp}
/// Mat A(3, 3, CV_64F);
/// ...
/// A.row(0) = A.row(1)*2 + A.row(2);
/// ```
/// 
/// ## Parameters
/// * src1: first input array.
/// * alpha: scale factor for the first array.
/// * src2: second input array of the same size and type as src1.
/// * dst: output array of the same size and type as src1.
/// @sa add, addWeighted, subtract, Mat::dot, Mat::convertTo
pub fn scale_add(src1: &core::Mat, alpha: f64, src2: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_scaleAdd_Mat_src1_double_alpha_Mat_src2_Mat_dst(src1.as_raw_Mat(), alpha, src2.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_seamlessClone_Mat_src_Mat_dst_Mat_mask_Point_p_Mat_blend_int_flags
/// Image editing tasks concern either global changes (color/intensity corrections, filters,
/// deformations) or local changes concerned to a selection. Here we are interested in achieving local
/// changes, ones that are restricted to a region manually selected (ROI), in a seamless and effortless
/// manner. The extent of the changes ranges from slight distortions to complete replacement by novel
/// content @cite PM03 .
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * dst: Input 8-bit 3-channel image.
/// * mask: Input 8-bit 1 or 3-channel image.
/// * p: Point in dst image where object is placed.
/// * blend: Output image with the same size and type as dst.
/// * flags: Cloning method that could be one of the following:
/// *   **NORMAL_CLONE** The power of the method is fully expressed when inserting objects with
/// complex outlines into a new background
/// *   **MIXED_CLONE** The classic method, color-based selection and alpha masking might be time
/// consuming and often leaves an undesirable halo. Seamless cloning, even averaged with the
/// original image, is not effective. Mixed seamless cloning based on a loose selection proves
/// effective.
/// *   **MONOCHROME_TRANSFER** Monochrome transfer allows the user to easily replace certain features of
/// one object by alternative features.
pub fn seamless_clone(src: &core::Mat, dst: &core::Mat, mask: &core::Mat, p: core::Point, blend: &mut core::Mat, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_seamlessClone_Mat_src_Mat_dst_Mat_mask_Point_p_Mat_blend_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat(), p, blend.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_selectROI_Mat_img_bool_showCrosshair_bool_fromCenter
/// @overload
///
/// ## C++ default parameters:
/// * show_crosshair: true
/// * from_center: false
pub fn select_roi(img: &core::Mat, show_crosshair: bool, from_center: bool) -> Result<core::Rect> {
    unsafe { sys::cv_core_cv_selectROI_Mat_img_bool_showCrosshair_bool_fromCenter(img.as_raw_Mat(), show_crosshair, from_center) }.into_result()
}

// identifier: cv_selectROI_String_windowName_Mat_img_bool_showCrosshair_bool_fromCenter
/// Selects ROI on the given image.
/// Function creates a window and allows user to select a ROI using mouse.
/// Controls: use `space` or `enter` to finish selection, use key `c` to cancel selection (function will return the zero cv::Rect).
/// 
/// ## Parameters
/// * windowName: name of the window where selection process will be shown.
/// * img: image to select a ROI.
/// * showCrosshair: if true crosshair of selection rectangle will be shown.
/// * fromCenter: if true center of selection will match initial mouse position. In opposite case a corner of
/// selection rectangle will correspont to the initial mouse position.
/// @return selected ROI or empty rect if selection canceled.
/// 
/// 
/// Note: The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...).
/// After finish of work an empty callback will be set for the used window.
///
/// ## C++ default parameters:
/// * show_crosshair: true
/// * from_center: false
pub fn select_roi_1(window_name: &str, img: &core::Mat, show_crosshair: bool, from_center: bool) -> Result<core::Rect> {
    string_arg!(window_name);
    unsafe { sys::cv_core_cv_selectROI_String_windowName_Mat_img_bool_showCrosshair_bool_fromCenter(window_name.as_ptr(), img.as_raw_Mat(), show_crosshair, from_center) }.into_result()
}

// identifier: cv_selectROIs_String_windowName_Mat_img_VectorOfRect_boundingBoxes_bool_showCrosshair_bool_fromCenter
/// Selects ROIs on the given image.
/// Function creates a window and allows user to select a ROIs using mouse.
/// Controls: use `space` or `enter` to finish current selection and start a new one,
/// use `esc` to terminate multiple ROI selection process.
/// 
/// ## Parameters
/// * windowName: name of the window where selection process will be shown.
/// * img: image to select a ROI.
/// * boundingBoxes: selected ROIs.
/// * showCrosshair: if true crosshair of selection rectangle will be shown.
/// * fromCenter: if true center of selection will match initial mouse position. In opposite case a corner of
/// selection rectangle will correspont to the initial mouse position.
/// 
/// 
/// Note: The function sets it's own mouse callback for specified window using cv::setMouseCallback(windowName, ...).
/// After finish of work an empty callback will be set for the used window.
///
/// ## C++ default parameters:
/// * show_crosshair: true
/// * from_center: false
pub fn select_ro_is(window_name: &str, img: &core::Mat, bounding_boxes: &types::VectorOfRect, show_crosshair: bool, from_center: bool) -> Result<()> {
    string_arg!(window_name);
    unsafe { sys::cv_core_cv_selectROIs_String_windowName_Mat_img_VectorOfRect_boundingBoxes_bool_showCrosshair_bool_fromCenter(window_name.as_ptr(), img.as_raw_Mat(), bounding_boxes.as_raw_VectorOfRect(), show_crosshair, from_center) }.into_result()
}

// identifier: cv_sepFilter2D_Mat_src_Mat_dst_int_ddepth_Mat_kernelX_Mat_kernelY_Point_anchor_double_delta_int_borderType
/// Applies a separable linear filter to an image.
/// 
/// The function applies a separable linear filter to the image. That is, first, every row of src is
/// filtered with the 1D kernel kernelX. Then, every column of the result is filtered with the 1D
/// kernel kernelY. The final result shifted by delta is stored in dst .
/// 
/// ## Parameters
/// * src: Source image.
/// * dst: Destination image of the same size and the same number of channels as src .
/// * ddepth: Destination image depth, see @ref filter_depths "combinations"
/// * kernelX: Coefficients for filtering each row.
/// * kernelY: Coefficients for filtering each column.
/// * anchor: Anchor position within the kernel. The default value <span lang='latex'>(-1,-1)</span> means that the anchor
/// is at the kernel center.
/// * delta: Value added to the filtered results before storing them.
/// * borderType: Pixel extrapolation method, see #BorderTypes
/// @sa  filter2D, Sobel, GaussianBlur, boxFilter, blur
///
/// ## C++ default parameters:
/// * anchor: Point(-1,-1)
/// * delta: 0
/// * border_type: BORDER_DEFAULT
pub fn sep_filter2_d_1(src: &core::Mat, dst: &mut core::Mat, ddepth: i32, kernel_x: &core::Mat, kernel_y: &core::Mat, anchor: core::Point, delta: f64, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_sepFilter2D_Mat_src_Mat_dst_int_ddepth_Mat_kernelX_Mat_kernelY_Point_anchor_double_delta_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ddepth, kernel_x.as_raw_Mat(), kernel_y.as_raw_Mat(), anchor, delta, border_type) }.into_result()
}

// identifier: cv_setBreakOnError_bool_flag
/// Sets/resets the break-on-error mode.
/// 
/// When the break-on-error mode is set, the default error handler issues a hardware exception, which
/// can make debugging more convenient.
/// 
/// \return the previous state
pub fn set_break_on_error(flag: bool) -> Result<bool> {
    unsafe { sys::cv_core_cv_setBreakOnError_bool_flag(flag) }.into_result()
}

// identifier: cv_setIdentity_Mat_mtx_Scalar_s
/// Initializes a scaled identity matrix.
/// 
/// The function cv::setIdentity initializes a scaled identity matrix:
/// <div lang='latex'>\texttt{mtx} (i,j)= \fork{\texttt{value}}{ if \(i=j\)}{0}{otherwise}</div>
/// 
/// The function can also be emulated using the matrix initializers and the
/// matrix expressions:
/// ```ignore
/// Mat A = Mat::eye(4, 3, CV_32F)*5;
/// // A will be set to [[5, 0, 0], [0, 5, 0], [0, 0, 5], [0, 0, 0]]
/// ```
/// 
/// ## Parameters
/// * mtx: matrix to initialize (not necessarily square).
/// * s: value to assign to diagonal elements.
/// @sa Mat::zeros, Mat::ones, Mat::setTo, Mat::operator=
///
/// ## C++ default parameters:
/// * s: Scalar(1)
pub fn set_identity(mtx: &mut core::Mat, s: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_setIdentity_Mat_mtx_Scalar_s(mtx.as_raw_Mat(), s) }.into_result()
}

// identifier: cv_setMouseCallback_String_winname_MouseCallback_onMouse_void_X_userdata
/// Sets mouse handler for the specified window
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * onMouse: Callback function for mouse events. See OpenCV samples on how to specify and use the callback.
/// * userdata: The optional parameter passed to the callback.
///
/// ## C++ default parameters:
/// * userdata: 0
pub fn set_mouse_callback(winname: &str, on_mouse: Option<Box<core::MouseCallback>>) -> Result<()> {
    string_arg!(winname);
    callback_arg!(on_mouse(event: i32, x: i32, y: i32, flags: i32, userdata: *mut c_void) via userdata => (event: i32, x: i32, y: i32, flags: i32));
    unsafe { sys::cv_core_cv_setMouseCallback_String_winname_MouseCallback_onMouse_void_X_userdata(winname.as_ptr(), on_mouse, userdata) }.into_result()
}

// identifier: cv_setNumThreads_int_nthreads
/// OpenCV will try to set the number of threads for the next parallel region.
/// 
/// If threads == 0, OpenCV will disable threading optimizations and run all it's functions
/// sequentially. Passing threads \< 0 will reset threads number to system default. This function must
/// be called outside of parallel region.
/// 
/// OpenCV will try to run its functions with specified threads number, but some behaviour differs from
/// framework:
/// *   `TBB` - User-defined parallel constructions will run with the same threads number, if
/// another is not specified. If later on user creates his own scheduler, OpenCV will use it.
/// *   `OpenMP` - No special defined behaviour.
/// *   `Concurrency` - If threads == 1, OpenCV will disable threading optimizations and run its
/// functions sequentially.
/// *   `GCD` - Supports only values \<= 0.
/// *   `C=` - No special defined behaviour.
/// ## Parameters
/// * nthreads: Number of threads used by OpenCV.
/// @sa getNumThreads, getThreadNum
pub fn set_num_threads(nthreads: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_setNumThreads_int_nthreads(nthreads) }.into_result()
}

// identifier: cv_setOpenGlContext_String_winname
/// Sets the specified window as current OpenGL context.
/// 
/// ## Parameters
/// * winname: Name of the window.
pub fn set_open_gl_context(winname: &str) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_setOpenGlContext_String_winname(winname.as_ptr()) }.into_result()
}

// identifier: cv_setOpenGlDrawCallback_String_winname_OpenGlDrawCallback_onOpenGlDraw_void_X_userdata
/// Sets a callback function to be called to draw on top of displayed image.
/// 
/// The function setOpenGlDrawCallback can be used to draw 3D data on the window. See the example of
/// callback function below:
/// ```ignore
/// void on_opengl(void* param)
/// {
/// glLoadIdentity();
/// 
/// glTranslated(0.0, 0.0, -1.0);
/// 
/// glRotatef( 55, 1, 0, 0 );
/// glRotatef( 45, 0, 1, 0 );
/// glRotatef( 0, 0, 0, 1 );
/// 
/// static const int coords[6][4][3] = {
/// { { +1, -1, -1 }, { -1, -1, -1 }, { -1, +1, -1 }, { +1, +1, -1 } },
/// { { +1, +1, -1 }, { -1, +1, -1 }, { -1, +1, +1 }, { +1, +1, +1 } },
/// { { +1, -1, +1 }, { +1, -1, -1 }, { +1, +1, -1 }, { +1, +1, +1 } },
/// { { -1, -1, -1 }, { -1, -1, +1 }, { -1, +1, +1 }, { -1, +1, -1 } },
/// { { +1, -1, +1 }, { -1, -1, +1 }, { -1, -1, -1 }, { +1, -1, -1 } },
/// { { -1, -1, +1 }, { +1, -1, +1 }, { +1, +1, +1 }, { -1, +1, +1 } }
/// };
/// 
/// for (int i = 0; i < 6; ++i) {
/// glColor3ub( i*20, 100+i*10, i*42 );
/// glBegin(GL_QUADS);
/// for (int j = 0; j < 4; ++j) {
/// glVertex3d(0.2 * coords[i][j][0], 0.2 * coords[i][j][1], 0.2 * coords[i][j][2]);
/// }
/// glEnd();
/// }
/// }
/// ```
/// 
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * onOpenGlDraw: Pointer to the function to be called every frame. This function should be
/// prototyped as void Foo(void\*) .
/// * userdata: Pointer passed to the callback function.(__Optional__)
///
/// ## C++ default parameters:
/// * userdata: 0
pub fn set_open_gl_draw_callback(winname: &str, on_open_gl_draw: Option<Box<core::OpenGlDrawCallback>>) -> Result<()> {
    string_arg!(winname);
    callback_arg!(on_open_gl_draw(userdata: *mut c_void) via userdata => ());
    unsafe { sys::cv_core_cv_setOpenGlDrawCallback_String_winname_OpenGlDrawCallback_onOpenGlDraw_void_X_userdata(winname.as_ptr(), on_open_gl_draw, userdata) }.into_result()
}

// identifier: cv_setRNGSeed_int_seed
/// Sets state of default random number generator.
/// 
/// The function cv::setRNGSeed sets state of default random number generator to custom value.
/// ## Parameters
/// * seed: new state for default random number generator
/// @sa RNG, randu, randn
pub fn set_rng_seed(seed: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_setRNGSeed_int_seed(seed) }.into_result()
}

// identifier: cv_setTrackbarMax_String_trackbarname_String_winname_int_maxval
/// Sets the trackbar maximum position.
/// 
/// The function sets the maximum position of the specified trackbar in the specified window.
/// 
/// 
/// Note:
/// 
/// [__Qt Backend Only__] winname can be empty (or NULL) if the trackbar is attached to the control
/// panel.
/// 
/// ## Parameters
/// * trackbarname: Name of the trackbar.
/// * winname: Name of the window that is the parent of trackbar.
/// * maxval: New maximum position.
pub fn set_trackbar_max(trackbarname: &str, winname: &str, maxval: i32) -> Result<()> {
    string_arg!(trackbarname);
    string_arg!(winname);
    unsafe { sys::cv_core_cv_setTrackbarMax_String_trackbarname_String_winname_int_maxval(trackbarname.as_ptr(), winname.as_ptr(), maxval) }.into_result()
}

// identifier: cv_setTrackbarMin_String_trackbarname_String_winname_int_minval
/// Sets the trackbar minimum position.
/// 
/// The function sets the minimum position of the specified trackbar in the specified window.
/// 
/// 
/// Note:
/// 
/// [__Qt Backend Only__] winname can be empty (or NULL) if the trackbar is attached to the control
/// panel.
/// 
/// ## Parameters
/// * trackbarname: Name of the trackbar.
/// * winname: Name of the window that is the parent of trackbar.
/// * minval: New minimum position.
pub fn set_trackbar_min(trackbarname: &str, winname: &str, minval: i32) -> Result<()> {
    string_arg!(trackbarname);
    string_arg!(winname);
    unsafe { sys::cv_core_cv_setTrackbarMin_String_trackbarname_String_winname_int_minval(trackbarname.as_ptr(), winname.as_ptr(), minval) }.into_result()
}

// identifier: cv_setTrackbarPos_String_trackbarname_String_winname_int_pos
/// Sets the trackbar position.
/// 
/// The function sets the position of the specified trackbar in the specified window.
/// 
/// 
/// Note:
/// 
/// [__Qt Backend Only__] winname can be empty (or NULL) if the trackbar is attached to the control
/// panel.
/// 
/// ## Parameters
/// * trackbarname: Name of the trackbar.
/// * winname: Name of the window that is the parent of trackbar.
/// * pos: New position.
pub fn set_trackbar_pos(trackbarname: &str, winname: &str, pos: i32) -> Result<()> {
    string_arg!(trackbarname);
    string_arg!(winname);
    unsafe { sys::cv_core_cv_setTrackbarPos_String_trackbarname_String_winname_int_pos(trackbarname.as_ptr(), winname.as_ptr(), pos) }.into_result()
}

// identifier: cv_setUseOpenVX_bool_flag
pub fn set_use_open_vx(flag: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_setUseOpenVX_bool_flag(flag) }.into_result()
}

// identifier: cv_setUseOptimized_bool_onoff
/// Enables or disables the optimized code.
/// 
/// The function can be used to dynamically turn on and off optimized dispatched code (code that uses SSE4.2, AVX/AVX2,
/// and other instructions on the platforms that support it). It sets a global flag that is further
/// checked by OpenCV functions. Since the flag is not checked in the inner OpenCV loops, it is only
/// safe to call the function on the very top level in your application where you can be sure that no
/// other OpenCV function is currently executed.
/// 
/// By default, the optimized code is enabled unless you disable it in CMake. The current status can be
/// retrieved using useOptimized.
/// ## Parameters
/// * onoff: The boolean flag specifying whether the optimized code should be used (onoff=true)
/// or not (onoff=false).
pub fn set_use_optimized(onoff: bool) -> Result<()> {
    unsafe { sys::cv_core_cv_setUseOptimized_bool_onoff(onoff) }.into_result()
}

// identifier: cv_setWindowProperty_String_winname_int_prop_id_double_prop_value
/// Changes parameters of a window dynamically.
/// 
/// The function setWindowProperty enables changing properties of a window.
/// 
/// ## Parameters
/// * winname: Name of the window.
/// * prop_id: Window property to edit. The supported operation flags are: (cv::WindowPropertyFlags)
/// * prop_value: New value of the window property. The supported flags are: (cv::WindowFlags)
pub fn set_window_property(winname: &str, prop_id: i32, prop_value: f64) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_setWindowProperty_String_winname_int_prop_id_double_prop_value(winname.as_ptr(), prop_id, prop_value) }.into_result()
}

// identifier: cv_setWindowTitle_String_winname_String_title
/// Updates window title
/// ## Parameters
/// * winname: Name of the window.
/// * title: New title.
pub fn set_window_title(winname: &str, title: &str) -> Result<()> {
    string_arg!(winname);
    string_arg!(title);
    unsafe { sys::cv_core_cv_setWindowTitle_String_winname_String_title(winname.as_ptr(), title.as_ptr()) }.into_result()
}

// identifier: cv_sin_softdouble_a
/// Sine
/// 
/// Special cases:
/// - sin(Inf) or sin(NaN) is NaN
/// - sin(x) == x when sin(x) is close to zero
pub fn sin(a: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_sin_softdouble_a(a.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_solveCubic_Mat_coeffs_Mat_roots
/// Finds the real roots of a cubic equation.
/// 
/// The function solveCubic finds the real roots of a cubic equation:
/// *   if coeffs is a 4-element vector:
/// <div lang='latex'>\texttt{coeffs} [0] x^3 +  \texttt{coeffs} [1] x^2 +  \texttt{coeffs} [2] x +  \texttt{coeffs} [3] = 0</div>
/// *   if coeffs is a 3-element vector:
/// <div lang='latex'>x^3 +  \texttt{coeffs} [0] x^2 +  \texttt{coeffs} [1] x +  \texttt{coeffs} [2] = 0</div>
/// 
/// The roots are stored in the roots array.
/// ## Parameters
/// * coeffs: equation coefficients, an array of 3 or 4 elements.
/// * roots: output array of real roots that has 1 or 3 elements.
/// @return number of real roots. It can be 0, 1 or 2.
pub fn solve_cubic(coeffs: &core::Mat, roots: &mut core::Mat) -> Result<i32> {
    unsafe { sys::cv_core_cv_solveCubic_Mat_coeffs_Mat_roots(coeffs.as_raw_Mat(), roots.as_raw_Mat()) }.into_result()
}

// identifier: cv_solveLP_Mat_Func_Mat_Constr_Mat_z
/// Solve given (non-integer) linear programming problem using the Simplex Algorithm (Simplex Method).
/// 
/// What we mean here by "linear programming problem" (or LP problem, for short) can be formulated as:
/// 
/// <div lang='latex'>\mbox{Maximize } c\cdot x\\
/// \mbox{Subject to:}\\
/// Ax\leq b\\
/// x\geq 0</div>
/// 
/// Where <span lang='latex'>c</span> is fixed `1`-by-`n` row-vector, <span lang='latex'>A</span> is fixed `m`-by-`n` matrix, <span lang='latex'>b</span> is fixed `m`-by-`1`
/// column vector and <span lang='latex'>x</span> is an arbitrary `n`-by-`1` column vector, which satisfies the constraints.
/// 
/// Simplex algorithm is one of many algorithms that are designed to handle this sort of problems
/// efficiently. Although it is not optimal in theoretical sense (there exist algorithms that can solve
/// any problem written as above in polynomial time, while simplex method degenerates to exponential
/// time for some special cases), it is well-studied, easy to implement and is shown to work well for
/// real-life purposes.
/// 
/// The particular implementation is taken almost verbatim from **Introduction to Algorithms, third
/// edition** by T. H. Cormen, C. E. Leiserson, R. L. Rivest and Clifford Stein. In particular, the
/// Bland's rule <http://en.wikipedia.org/wiki/Bland%27s_rule> is used to prevent cycling.
/// 
/// ## Parameters
/// * Func: This row-vector corresponds to <span lang='latex'>c</span> in the LP problem formulation (see above). It should
/// contain 32- or 64-bit floating point numbers. As a convenience, column-vector may be also submitted,
/// in the latter case it is understood to correspond to <span lang='latex'>c^T</span>.
/// * Constr: `m`-by-`n+1` matrix, whose rightmost column corresponds to <span lang='latex'>b</span> in formulation above
/// and the remaining to <span lang='latex'>A</span>. It should contain 32- or 64-bit floating point numbers.
/// * z: The solution will be returned here as a column-vector - it corresponds to <span lang='latex'>c</span> in the
/// formulation above. It will contain 64-bit floating point numbers.
/// @return One of cv::SolveLPResult
pub fn solve_lp(func: &core::Mat, constr: &core::Mat, z: &core::Mat) -> Result<i32> {
    unsafe { sys::cv_core_cv_solveLP_Mat_Func_Mat_Constr_Mat_z(func.as_raw_Mat(), constr.as_raw_Mat(), z.as_raw_Mat()) }.into_result()
}

// identifier: cv_solveP3P_Mat_objectPoints_Mat_imagePoints_Mat_cameraMatrix_Mat_distCoeffs_VectorOfMat_rvecs_VectorOfMat_tvecs_int_flags
/// Finds an object pose from 3 3D-2D point correspondences.
/// 
/// ## Parameters
/// * objectPoints: Array of object points in the object coordinate space, 3x3 1-channel or
/// 1x3/3x1 3-channel. vector\<Point3f\> can be also passed here.
/// * imagePoints: Array of corresponding image points, 3x2 1-channel or 1x3/3x1 2-channel.
/// vector\<Point2f\> can be also passed here.
/// * cameraMatrix: Input camera matrix <span lang='latex'>A = \vecthreethree{fx}{0}{cx}{0}{fy}{cy}{0}{0}{1}</span> .
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are
/// assumed.
/// * rvecs: Output rotation vectors (see Rodrigues ) that, together with tvecs , brings points from
/// the model coordinate system to the camera coordinate system. A P3P problem has up to 4 solutions.
/// * tvecs: Output translation vectors.
/// * flags: Method for solving a P3P problem:
/// *   **SOLVEPNP_P3P** Method is based on the paper of X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang
/// "Complete Solution Classification for the Perspective-Three-Point Problem" (@cite gao2003complete).
/// *   **SOLVEPNP_AP3P** Method is based on the paper of Tong Ke and Stergios I. Roumeliotis.
/// "An Efficient Algebraic Solution to the Perspective-Three-Point Problem" (@cite Ke17).
/// 
/// The function estimates the object pose given 3 object points, their corresponding image
/// projections, as well as the camera matrix and the distortion coefficients.
pub fn solve_p3_p(object_points: &core::Mat, image_points: &core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, rvecs: &mut types::VectorOfMat, tvecs: &mut types::VectorOfMat, flags: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_solveP3P_Mat_objectPoints_Mat_imagePoints_Mat_cameraMatrix_Mat_distCoeffs_VectorOfMat_rvecs_VectorOfMat_tvecs_int_flags(object_points.as_raw_Mat(), image_points.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), rvecs.as_raw_VectorOfMat(), tvecs.as_raw_VectorOfMat(), flags) }.into_result()
}

// identifier: cv_solvePnPRansac_Mat_objectPoints_Mat_imagePoints_Mat_cameraMatrix_Mat_distCoeffs_Mat_rvec_Mat_tvec_bool_useExtrinsicGuess_int_iterationsCount_float_reprojectionError_double_confidence_Mat_inliers_int_flags
/// Finds an object pose from 3D-2D point correspondences using the RANSAC scheme.
/// 
/// ## Parameters
/// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or
/// 1xN/Nx1 3-channel, where N is the number of points. vector\<Point3f\> can be also passed here.
/// * imagePoints: Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel,
/// where N is the number of points. vector\<Point2f\> can be also passed here.
/// * cameraMatrix: Input camera matrix <span lang='latex'>A = \vecthreethree{fx}{0}{cx}{0}{fy}{cy}{0}{0}{1}</span> .
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are
/// assumed.
/// * rvec: Output rotation vector (see Rodrigues ) that, together with tvec , brings points from
/// the model coordinate system to the camera coordinate system.
/// * tvec: Output translation vector.
/// * useExtrinsicGuess: Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses
/// the provided rvec and tvec values as initial approximations of the rotation and translation
/// vectors, respectively, and further optimizes them.
/// * iterationsCount: Number of iterations.
/// * reprojectionError: Inlier threshold value used by the RANSAC procedure. The parameter value
/// is the maximum allowed distance between the observed and computed point projections to consider it
/// an inlier.
/// * confidence: The probability that the algorithm produces a useful result.
/// * inliers: Output vector that contains indices of inliers in objectPoints and imagePoints .
/// * flags: Method for solving a PnP problem (see solvePnP ).
/// 
/// The function estimates an object pose given a set of object points, their corresponding image
/// projections, as well as the camera matrix and the distortion coefficients. This function finds such
/// a pose that minimizes reprojection error, that is, the sum of squared distances between the observed
/// projections imagePoints and the projected (using projectPoints ) objectPoints. The use of RANSAC
/// makes the function resistant to outliers.
/// 
/// 
/// Note:
/// *   An example of how to use solvePNPRansac for object detection can be found at
/// opencv_source_code/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/
/// *   The default method used to estimate the camera pose for the Minimal Sample Sets step
/// is #SOLVEPNP_EPNP. Exceptions are:
/// - if you choose #SOLVEPNP_P3P or #SOLVEPNP_AP3P, these methods will be used.
/// - if the number of input points is equal to 4, #SOLVEPNP_P3P is used.
/// *   The method used to estimate the camera pose using all the inliers is defined by the
/// flags parameters unless it is equal to #SOLVEPNP_P3P or #SOLVEPNP_AP3P. In this case,
/// the method #SOLVEPNP_EPNP will be used instead.
///
/// ## C++ default parameters:
/// * use_extrinsic_guess: false
/// * iterations_count: 100
/// * reprojection_error: 8.0
/// * confidence: 0.99
/// * inliers: noArray()
/// * flags: SOLVEPNP_ITERATIVE
pub fn solve_pn_p_ransac(object_points: &core::Mat, image_points: &core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, rvec: &mut core::Mat, tvec: &mut core::Mat, use_extrinsic_guess: bool, iterations_count: i32, reprojection_error: f32, confidence: f64, inliers: &mut core::Mat, flags: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_solvePnPRansac_Mat_objectPoints_Mat_imagePoints_Mat_cameraMatrix_Mat_distCoeffs_Mat_rvec_Mat_tvec_bool_useExtrinsicGuess_int_iterationsCount_float_reprojectionError_double_confidence_Mat_inliers_int_flags(object_points.as_raw_Mat(), image_points.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), rvec.as_raw_Mat(), tvec.as_raw_Mat(), use_extrinsic_guess, iterations_count, reprojection_error, confidence, inliers.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_solvePnP_Mat_objectPoints_Mat_imagePoints_Mat_cameraMatrix_Mat_distCoeffs_Mat_rvec_Mat_tvec_bool_useExtrinsicGuess_int_flags
/// Finds an object pose from 3D-2D point correspondences.
/// 
/// ## Parameters
/// * objectPoints: Array of object points in the object coordinate space, Nx3 1-channel or
/// 1xN/Nx1 3-channel, where N is the number of points. vector\<Point3f\> can be also passed here.
/// * imagePoints: Array of corresponding image points, Nx2 1-channel or 1xN/Nx1 2-channel,
/// where N is the number of points. vector\<Point2f\> can be also passed here.
/// * cameraMatrix: Input camera matrix <span lang='latex'>A = \vecthreethree{fx}{0}{cx}{0}{fy}{cy}{0}{0}{1}</span> .
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are
/// assumed.
/// * rvec: Output rotation vector (see @ref Rodrigues ) that, together with tvec , brings points from
/// the model coordinate system to the camera coordinate system.
/// * tvec: Output translation vector.
/// * useExtrinsicGuess: Parameter used for #SOLVEPNP_ITERATIVE. If true (1), the function uses
/// the provided rvec and tvec values as initial approximations of the rotation and translation
/// vectors, respectively, and further optimizes them.
/// * flags: Method for solving a PnP problem:
/// *   **SOLVEPNP_ITERATIVE** Iterative method is based on Levenberg-Marquardt optimization. In
/// this case the function finds such a pose that minimizes reprojection error, that is the sum
/// of squared distances between the observed projections imagePoints and the projected (using
/// projectPoints ) objectPoints .
/// *   **SOLVEPNP_P3P** Method is based on the paper of X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang
/// "Complete Solution Classification for the Perspective-Three-Point Problem" (@cite gao2003complete).
/// In this case the function requires exactly four object and image points.
/// *   **SOLVEPNP_AP3P** Method is based on the paper of T. Ke, S. Roumeliotis
/// "An Efficient Algebraic Solution to the Perspective-Three-Point Problem" (@cite Ke17).
/// In this case the function requires exactly four object and image points.
/// *   **SOLVEPNP_EPNP** Method has been introduced by F.Moreno-Noguer, V.Lepetit and P.Fua in the
/// paper "EPnP: Efficient Perspective-n-Point Camera Pose Estimation" (@cite lepetit2009epnp).
/// *   **SOLVEPNP_DLS** Method is based on the paper of Joel A. Hesch and Stergios I. Roumeliotis.
/// "A Direct Least-Squares (DLS) Method for PnP" (@cite hesch2011direct).
/// *   **SOLVEPNP_UPNP** Method is based on the paper of A.Penate-Sanchez, J.Andrade-Cetto,
/// F.Moreno-Noguer. "Exhaustive Linearization for Robust Camera Pose and Focal Length
/// Estimation" (@cite penate2013exhaustive). In this case the function also estimates the parameters <span lang='latex'>f_x</span> and <span lang='latex'>f_y</span>
/// assuming that both have the same value. Then the cameraMatrix is updated with the estimated
/// focal length.
/// *   **SOLVEPNP_AP3P** Method is based on the paper of Tong Ke and Stergios I. Roumeliotis.
/// "An Efficient Algebraic Solution to the Perspective-Three-Point Problem" (@cite Ke17). In this case the
/// function requires exactly four object and image points.
/// 
/// The function estimates the object pose given a set of object points, their corresponding image
/// projections, as well as the camera matrix and the distortion coefficients, see the figure below
/// (more precisely, the X-axis of the camera frame is pointing to the right, the Y-axis downward
/// and the Z-axis forward).
/// 
/// ![](pnp.jpg)
/// 
/// Points expressed in the world frame <span lang='latex'> \bf{X}_w </span> are projected into the image plane <span lang='latex'> \left[ u, v \right] </span>
/// using the perspective projection model <span lang='latex'> \Pi </span> and the camera intrinsic parameters matrix <span lang='latex'> \bf{A} </span>:
/// 
/// <div lang='latex'>
/// \begin{align*}
/// \begin{bmatrix}
/// u \\
/// v \\
/// 1
/// \end{bmatrix} &=
/// \bf{A} \hspace{0.1em} \Pi \hspace{0.2em} ^{c}\bf{M}_w
/// \begin{bmatrix}
/// X_{w} \\
/// Y_{w} \\
/// Z_{w} \\
/// 1
/// \end{bmatrix} \\
/// \begin{bmatrix}
/// u \\
/// v \\
/// 1
/// \end{bmatrix} &=
/// \begin{bmatrix}
/// f_x & 0 & c_x \\
/// 0 & f_y & c_y \\
/// 0 & 0 & 1
/// \end{bmatrix}
/// \begin{bmatrix}
/// 1 & 0 & 0 & 0 \\
/// 0 & 1 & 0 & 0 \\
/// 0 & 0 & 1 & 0
/// \end{bmatrix}
/// \begin{bmatrix}
/// r_{11} & r_{12} & r_{13} & t_x \\
/// r_{21} & r_{22} & r_{23} & t_y \\
/// r_{31} & r_{32} & r_{33} & t_z \\
/// 0 & 0 & 0 & 1
/// \end{bmatrix}
/// \begin{bmatrix}
/// X_{w} \\
/// Y_{w} \\
/// Z_{w} \\
/// 1
/// \end{bmatrix}
/// \end{align*}
/// </div>
/// 
/// The estimated pose is thus the rotation (`rvec`) and the translation (`tvec`) vectors that allow to transform
/// a 3D point expressed in the world frame into the camera frame:
/// 
/// <div lang='latex'>
/// \begin{align*}
/// \begin{bmatrix}
/// X_c \\
/// Y_c \\
/// Z_c \\
/// 1
/// \end{bmatrix} &=
/// \hspace{0.2em} ^{c}\bf{M}_w
/// \begin{bmatrix}
/// X_{w} \\
/// Y_{w} \\
/// Z_{w} \\
/// 1
/// \end{bmatrix} \\
/// \begin{bmatrix}
/// X_c \\
/// Y_c \\
/// Z_c \\
/// 1
/// \end{bmatrix} &=
/// \begin{bmatrix}
/// r_{11} & r_{12} & r_{13} & t_x \\
/// r_{21} & r_{22} & r_{23} & t_y \\
/// r_{31} & r_{32} & r_{33} & t_z \\
/// 0 & 0 & 0 & 1
/// \end{bmatrix}
/// \begin{bmatrix}
/// X_{w} \\
/// Y_{w} \\
/// Z_{w} \\
/// 1
/// \end{bmatrix}
/// \end{align*}
/// </div>
/// 
/// 
/// Note:
/// *   An example of how to use solvePnP for planar augmented reality can be found at
/// opencv_source_code/samples/python/plane_ar.py
/// *   If you are using Python:
/// - Numpy array slices won't work as input because solvePnP requires contiguous
/// arrays (enforced by the assertion using cv::Mat::checkVector() around line 55 of
/// modules/calib3d/src/solvepnp.cpp version 2.4.9)
/// - The P3P algorithm requires image points to be in an array of shape (N,1,2) due
/// to its calling of cv::undistortPoints (around line 75 of modules/calib3d/src/solvepnp.cpp version 2.4.9)
/// which requires 2-channel information.
/// - Thus, given some data D = np.array(...) where D.shape = (N,M), in order to use a subset of
/// it as, e.g., imagePoints, one must effectively copy it into a new array: imagePoints =
/// np.ascontiguousarray(D[:,:2]).reshape((N,1,2))
/// *   The methods **SOLVEPNP_DLS** and **SOLVEPNP_UPNP** cannot be used as the current implementations are
/// unstable and sometimes give completely wrong results. If you pass one of these two
/// flags, **SOLVEPNP_EPNP** method will be used instead.
/// *   The minimum number of points is 4 in the general case. In the case of **SOLVEPNP_P3P** and **SOLVEPNP_AP3P**
/// methods, it is required to use exactly 4 points (the first 3 points are used to estimate all the solutions
/// of the P3P problem, the last one is used to retain the best solution that minimizes the reprojection error).
/// *   With **SOLVEPNP_ITERATIVE** method and `useExtrinsicGuess=true`, the minimum number of points is 3 (3 points
/// are sufficient to compute a pose but there are up to 4 solutions). The initial solution should be close to the
/// global solution to converge.
///
/// ## C++ default parameters:
/// * use_extrinsic_guess: false
/// * flags: SOLVEPNP_ITERATIVE
pub fn solve_pn_p(object_points: &core::Mat, image_points: &core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, rvec: &mut core::Mat, tvec: &mut core::Mat, use_extrinsic_guess: bool, flags: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_solvePnP_Mat_objectPoints_Mat_imagePoints_Mat_cameraMatrix_Mat_distCoeffs_Mat_rvec_Mat_tvec_bool_useExtrinsicGuess_int_flags(object_points.as_raw_Mat(), image_points.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), rvec.as_raw_Mat(), tvec.as_raw_Mat(), use_extrinsic_guess, flags) }.into_result()
}

// identifier: cv_solvePoly_Mat_coeffs_Mat_roots_int_maxIters
/// Finds the real or complex roots of a polynomial equation.
/// 
/// The function cv::solvePoly finds real and complex roots of a polynomial equation:
/// <div lang='latex'>\texttt{coeffs} [n] x^{n} +  \texttt{coeffs} [n-1] x^{n-1} + ... +  \texttt{coeffs} [1] x +  \texttt{coeffs} [0] = 0</div>
/// ## Parameters
/// * coeffs: array of polynomial coefficients.
/// * roots: output (complex) array of roots.
/// * maxIters: maximum number of iterations the algorithm does.
///
/// ## C++ default parameters:
/// * max_iters: 300
pub fn solve_poly(coeffs: &core::Mat, roots: &mut core::Mat, max_iters: i32) -> Result<f64> {
    unsafe { sys::cv_core_cv_solvePoly_Mat_coeffs_Mat_roots_int_maxIters(coeffs.as_raw_Mat(), roots.as_raw_Mat(), max_iters) }.into_result()
}

// identifier: cv_solve_Mat_src1_Mat_src2_Mat_dst_int_flags
/// Solves one or more linear systems or least-squares problems.
/// 
/// The function cv::solve solves a linear system or least-squares problem (the
/// latter is possible with SVD or QR methods, or by specifying the flag
/// #DECOMP_NORMAL ):
/// <div lang='latex'>\texttt{dst} =  \arg \min _X \| \texttt{src1} \cdot \texttt{X} -  \texttt{src2} \|</div>
/// 
/// If #DECOMP_LU or #DECOMP_CHOLESKY method is used, the function returns 1
/// if src1 (or <span lang='latex'>\texttt{src1}^T\texttt{src1}</span> ) is non-singular. Otherwise,
/// it returns 0. In the latter case, dst is not valid. Other methods find a
/// pseudo-solution in case of a singular left-hand side part.
/// 
/// 
/// Note: If you want to find a unity-norm solution of an under-defined
/// singular system <span lang='latex'>\texttt{src1}\cdot\texttt{dst}=0</span> , the function solve
/// will not do the work. Use SVD::solveZ instead.
/// 
/// ## Parameters
/// * src1: input matrix on the left-hand side of the system.
/// * src2: input matrix on the right-hand side of the system.
/// * dst: output solution.
/// * flags: solution (matrix inversion) method (#DecompTypes)
/// @sa invert, SVD, eigen
///
/// ## C++ default parameters:
/// * flags: DECOMP_LU
pub fn solve(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, flags: i32) -> Result<bool> {
    unsafe { sys::cv_core_cv_solve_Mat_src1_Mat_src2_Mat_dst_int_flags(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_sortIdx_Mat_src_Mat_dst_int_flags
/// Sorts each row or each column of a matrix.
/// 
/// The function cv::sortIdx sorts each matrix row or each matrix column in the
/// ascending or descending order. So you should pass two operation flags to
/// get desired behaviour. Instead of reordering the elements themselves, it
/// stores the indices of sorted elements in the output array. For example:
/// ```ignore
/// Mat A = Mat::eye(3,3,CV_32F), B;
/// sortIdx(A, B, SORT_EVERY_ROW + SORT_ASCENDING);
/// // B will probably contain
/// // (because of equal elements in A some permutations are possible):
/// // [[1, 2, 0], [0, 2, 1], [0, 1, 2]]
/// ```
/// 
/// ## Parameters
/// * src: input single-channel array.
/// * dst: output integer array of the same size as src.
/// * flags: operation flags that could be a combination of cv::SortFlags
/// @sa sort, randShuffle
pub fn sort_idx(src: &core::Mat, dst: &mut core::Mat, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_sortIdx_Mat_src_Mat_dst_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_sort_Mat_src_Mat_dst_int_flags
/// Sorts each row or each column of a matrix.
/// 
/// The function cv::sort sorts each matrix row or each matrix column in
/// ascending or descending order. So you should pass two operation flags to
/// get desired behaviour. If you want to sort matrix rows or columns
/// lexicographically, you can use STL std::sort generic function with the
/// proper comparison predicate.
/// 
/// ## Parameters
/// * src: input single-channel array.
/// * dst: output array of the same size and type as src.
/// * flags: operation flags, a combination of #SortFlags
/// @sa sortIdx, randShuffle
pub fn sort(src: &core::Mat, dst: &mut core::Mat, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_sort_Mat_src_Mat_dst_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), flags) }.into_result()
}

// identifier: cv_spatialGradient_Mat_src_Mat_dx_Mat_dy_int_ksize_int_borderType
/// Calculates the first order image derivative in both x and y using a Sobel operator
/// 
/// Equivalent to calling:
/// 
/// ```ignore
/// Sobel( src, dx, CV_16SC1, 1, 0, 3 );
/// Sobel( src, dy, CV_16SC1, 0, 1, 3 );
/// ```
/// 
/// 
/// ## Parameters
/// * src: input image.
/// * dx: output image with first-order derivative in x.
/// * dy: output image with first-order derivative in y.
/// * ksize: size of Sobel kernel. It must be 3.
/// * borderType: pixel extrapolation method, see #BorderTypes
/// 
/// @sa Sobel
///
/// ## C++ default parameters:
/// * ksize: 3
/// * border_type: BORDER_DEFAULT
pub fn spatial_gradient(src: &core::Mat, dx: &mut core::Mat, dy: &mut core::Mat, ksize: i32, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_spatialGradient_Mat_src_Mat_dx_Mat_dy_int_ksize_int_borderType(src.as_raw_Mat(), dx.as_raw_Mat(), dy.as_raw_Mat(), ksize, border_type) }.into_result()
}

// identifier: cv_split_Mat_m_VectorOfMat_mv
/// @overload
/// ## Parameters
/// * m: input multi-channel array.
/// * mv: output vector of arrays; the arrays themselves are reallocated, if needed.
pub fn split(m: &core::Mat, mv: &mut types::VectorOfMat) -> Result<()> {
    unsafe { sys::cv_core_cv_split_Mat_m_VectorOfMat_mv(m.as_raw_Mat(), mv.as_raw_VectorOfMat()) }.into_result()
}

// identifier: cv_split_Mat_src_Mat_mvbegin
/// Divides a multi-channel array into several single-channel arrays.
/// 
/// The function cv::split splits a multi-channel array into separate single-channel arrays:
/// <div lang='latex'>\texttt{mv} [c](I) =  \texttt{src} (I)_c</div>
/// If you need to extract a single channel or do some other sophisticated channel permutation, use
/// mixChannels .
/// 
/// The following example demonstrates how to split a 3-channel matrix into 3 single channel matrices.
/// @snippet snippets/core_split.cpp example
/// 
/// ## Parameters
/// * src: input multi-channel array.
/// * mvbegin: output array; the number of arrays must match src.channels(); the arrays themselves are
/// reallocated, if needed.
/// @sa merge, mixChannels, cvtColor
pub fn split_at(src: &core::Mat, mvbegin: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_split_Mat_src_Mat_mvbegin(src.as_raw_Mat(), mvbegin.as_raw_Mat()) }.into_result()
}

// identifier: cv_sqrBoxFilter_Mat_src_Mat_dst_int_ddepth_Size_ksize_Point_anchor_bool_normalize_int_borderType
/// Calculates the normalized sum of squares of the pixel values overlapping the filter.
/// 
/// For every pixel <span lang='latex'> (x, y) </span> in the source image, the function calculates the sum of squares of those neighboring
/// pixel values which overlap the filter placed over the pixel <span lang='latex'> (x, y) </span>.
/// 
/// The unnormalized square box filter can be useful in computing local image statistics such as the the local
/// variance and standard deviation around the neighborhood of a pixel.
/// 
/// ## Parameters
/// * src: input image
/// * dst: output image of the same size and type as _src
/// * ddepth: the output image depth (-1 to use src.depth())
/// * ksize: kernel size
/// * anchor: kernel anchor point. The default value of Point(-1, -1) denotes that the anchor is at the kernel
/// center.
/// * normalize: flag, specifying whether the kernel is to be normalized by it's area or not.
/// * borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes
/// @sa boxFilter
///
/// ## C++ default parameters:
/// * anchor: Point(-1, -1)
/// * normalize: true
/// * border_type: BORDER_DEFAULT
pub fn sqr_box_filter(src: &core::Mat, dst: &mut core::Mat, ddepth: i32, ksize: core::Size, anchor: core::Point, normalize: bool, border_type: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_sqrBoxFilter_Mat_src_Mat_dst_int_ddepth_Size_ksize_Point_anchor_bool_normalize_int_borderType(src.as_raw_Mat(), dst.as_raw_Mat(), ddepth, ksize, anchor, normalize, border_type) }.into_result()
}

// identifier: cv_sqrt_Mat_src_Mat_dst
/// Calculates a square root of array elements.
/// 
/// The function cv::sqrt calculates a square root of each input array element.
/// In case of multi-channel arrays, each channel is processed
/// independently. The accuracy is approximately the same as of the built-in
/// std::sqrt .
/// ## Parameters
/// * src: input floating-point array.
/// * dst: output array of the same size and type as src.
pub fn sqrt_2(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_sqrt_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_sqrt_softdouble_a
pub fn sqrt_3(a: &core::softdouble) -> Result<core::softdouble> {
    unsafe { sys::cv_core_cv_sqrt_softdouble_a(a.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
}

// identifier: cv_sqrt_softfloat_a
/// Square root
pub fn sqrt_4(a: &core::softfloat) -> Result<core::softfloat> {
    unsafe { sys::cv_core_cv_sqrt_softfloat_a(a.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
}

// identifier: cv_startWindowThread
pub fn start_window_thread() -> Result<i32> {
    unsafe { sys::cv_core_cv_startWindowThread() }.into_result()
}

// identifier: cv_stereoCalibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints1_VectorOfMat_imagePoints2_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Size_imageSize_Mat_R_Mat_T_Mat_E_Mat_F_Mat_perViewErrors_int_flags_TermCriteria_criteria
/// Calibrates the stereo camera.
/// 
/// ## Parameters
/// * objectPoints: Vector of vectors of the calibration pattern points.
/// * imagePoints1: Vector of vectors of the projections of the calibration pattern points,
/// observed by the first camera.
/// * imagePoints2: Vector of vectors of the projections of the calibration pattern points,
/// observed by the second camera.
/// * cameraMatrix1: Input/output first camera matrix:
/// <span lang='latex'>\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}</span> , <span lang='latex'>j = 0,\, 1</span> . If
/// any of CALIB_USE_INTRINSIC_GUESS , CALIB_FIX_ASPECT_RATIO ,
/// CALIB_FIX_INTRINSIC , or CALIB_FIX_FOCAL_LENGTH are specified, some or all of the
/// matrix components must be initialized. See the flags description for details.
/// * distCoeffs1: Input/output vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span> of
/// 4, 5, 8, 12 or 14 elements. The output vector length depends on the flags.
/// * cameraMatrix2: Input/output second camera matrix. The parameter is similar to cameraMatrix1
/// * distCoeffs2: Input/output lens distortion coefficients for the second camera. The parameter
/// is similar to distCoeffs1 .
/// * imageSize: Size of the image used only to initialize intrinsic camera matrix.
/// * R: Output rotation matrix between the 1st and the 2nd camera coordinate systems.
/// * T: Output translation vector between the coordinate systems of the cameras.
/// * E: Output essential matrix.
/// * F: Output fundamental matrix.
/// * perViewErrors: Output vector of the RMS re-projection error estimated for each pattern view.
/// * flags: Different flags that may be zero or a combination of the following values:
/// *   **CALIB_FIX_INTRINSIC** Fix cameraMatrix? and distCoeffs? so that only R, T, E , and F
/// matrices are estimated.
/// *   **CALIB_USE_INTRINSIC_GUESS** Optimize some or all of the intrinsic parameters
/// according to the specified flags. Initial values are provided by the user.
/// *   **CALIB_USE_EXTRINSIC_GUESS** R, T contain valid initial values that are optimized further.
/// Otherwise R, T are initialized to the median value of the pattern views (each dimension separately).
/// *   **CALIB_FIX_PRINCIPAL_POINT** Fix the principal points during the optimization.
/// *   **CALIB_FIX_FOCAL_LENGTH** Fix <span lang='latex'>f^{(j)}_x</span> and <span lang='latex'>f^{(j)}_y</span> .
/// *   **CALIB_FIX_ASPECT_RATIO** Optimize <span lang='latex'>f^{(j)}_y</span> . Fix the ratio <span lang='latex'>f^{(j)}_x/f^{(j)}_y</span>
/// .
/// *   **CALIB_SAME_FOCAL_LENGTH** Enforce <span lang='latex'>f^{(0)}_x=f^{(1)}_x</span> and <span lang='latex'>f^{(0)}_y=f^{(1)}_y</span> .
/// *   **CALIB_ZERO_TANGENT_DIST** Set tangential distortion coefficients for each camera to
/// zeros and fix there.
/// *   **CALIB_FIX_K1,...,CALIB_FIX_K6** Do not change the corresponding radial
/// distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set,
/// the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
/// *   **CALIB_RATIONAL_MODEL** Enable coefficients k4, k5, and k6. To provide the backward
/// compatibility, this extra flag should be explicitly specified to make the calibration
/// function use the rational model and return 8 coefficients. If the flag is not set, the
/// function computes and returns only 5 distortion coefficients.
/// *   **CALIB_THIN_PRISM_MODEL** Coefficients s1, s2, s3 and s4 are enabled. To provide the
/// backward compatibility, this extra flag should be explicitly specified to make the
/// calibration function use the thin prism model and return 12 coefficients. If the flag is not
/// set, the function computes and returns only 5 distortion coefficients.
/// *   **CALIB_FIX_S1_S2_S3_S4** The thin prism distortion coefficients are not changed during
/// the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
/// supplied distCoeffs matrix is used. Otherwise, it is set to 0.
/// *   **CALIB_TILTED_MODEL** Coefficients tauX and tauY are enabled. To provide the
/// backward compatibility, this extra flag should be explicitly specified to make the
/// calibration function use the tilted sensor model and return 14 coefficients. If the flag is not
/// set, the function computes and returns only 5 distortion coefficients.
/// *   **CALIB_FIX_TAUX_TAUY** The coefficients of the tilted sensor model are not changed during
/// the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
/// supplied distCoeffs matrix is used. Otherwise, it is set to 0.
/// * criteria: Termination criteria for the iterative optimization algorithm.
/// 
/// The function estimates transformation between two cameras making a stereo pair. If you have a stereo
/// camera where the relative position and orientation of two cameras is fixed, and if you computed
/// poses of an object relative to the first camera and to the second camera, (R1, T1) and (R2, T2),
/// respectively (this can be done with solvePnP ), then those poses definitely relate to each other.
/// This means that, given ( <span lang='latex'>R_1</span>,<span lang='latex'>T_1</span> ), it should be possible to compute ( <span lang='latex'>R_2</span>,<span lang='latex'>T_2</span> ). You only
/// need to know the position and orientation of the second camera relative to the first camera. This is
/// what the described function does. It computes ( <span lang='latex'>R</span>,<span lang='latex'>T</span> ) so that:
/// 
/// <div lang='latex'>R_2=R*R_1</div>
/// <div lang='latex'>T_2=R*T_1 + T,</div>
/// 
/// Optionally, it computes the essential matrix E:
/// 
/// <div lang='latex'>E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} *R</div>
/// 
/// where <span lang='latex'>T_i</span> are components of the translation vector <span lang='latex'>T</span> : <span lang='latex'>T=[T_0, T_1, T_2]^T</span> . And the function
/// can also compute the fundamental matrix F:
/// 
/// <div lang='latex'>F = cameraMatrix2^{-T} E cameraMatrix1^{-1}</div>
/// 
/// Besides the stereo-related information, the function can also perform a full calibration of each of
/// two cameras. However, due to the high dimensionality of the parameter space and noise in the input
/// data, the function can diverge from the correct solution. If the intrinsic parameters can be
/// estimated with high accuracy for each of the cameras individually (for example, using
/// calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the
/// function along with the computed intrinsic parameters. Otherwise, if all the parameters are
/// estimated at once, it makes sense to restrict some parameters, for example, pass
/// CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a
/// reasonable assumption.
/// 
/// Similarly to calibrateCamera , the function minimizes the total re-projection error for all the
/// points in all the available views from both cameras. The function returns the final value of the
/// re-projection error.
///
/// ## C++ default parameters:
/// * flags: CALIB_FIX_INTRINSIC
/// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6)
pub fn stereo_calibrate_1(object_points: &types::VectorOfMat, image_points1: &types::VectorOfMat, image_points2: &types::VectorOfMat, camera_matrix1: &mut core::Mat, dist_coeffs1: &mut core::Mat, camera_matrix2: &mut core::Mat, dist_coeffs2: &mut core::Mat, image_size: core::Size, r: &mut core::Mat, t: &mut core::Mat, e: &mut core::Mat, f: &mut core::Mat, per_view_errors: &mut core::Mat, flags: i32, criteria: &core::TermCriteria) -> Result<f64> {
    unsafe { sys::cv_core_cv_stereoCalibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints1_VectorOfMat_imagePoints2_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Size_imageSize_Mat_R_Mat_T_Mat_E_Mat_F_Mat_perViewErrors_int_flags_TermCriteria_criteria(object_points.as_raw_VectorOfMat(), image_points1.as_raw_VectorOfMat(), image_points2.as_raw_VectorOfMat(), camera_matrix1.as_raw_Mat(), dist_coeffs1.as_raw_Mat(), camera_matrix2.as_raw_Mat(), dist_coeffs2.as_raw_Mat(), image_size, r.as_raw_Mat(), t.as_raw_Mat(), e.as_raw_Mat(), f.as_raw_Mat(), per_view_errors.as_raw_Mat(), flags, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_stereoCalibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints1_VectorOfMat_imagePoints2_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Size_imageSize_Mat_R_Mat_T_Mat_E_Mat_F_int_flags_TermCriteria_criteria
///
/// ## C++ default parameters:
/// * flags: CALIB_FIX_INTRINSIC
/// * criteria: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6)
pub fn stereo_calibrate_2(object_points: &types::VectorOfMat, image_points1: &types::VectorOfMat, image_points2: &types::VectorOfMat, camera_matrix1: &mut core::Mat, dist_coeffs1: &mut core::Mat, camera_matrix2: &mut core::Mat, dist_coeffs2: &mut core::Mat, image_size: core::Size, r: &mut core::Mat, t: &mut core::Mat, e: &mut core::Mat, f: &mut core::Mat, flags: i32, criteria: &core::TermCriteria) -> Result<f64> {
    unsafe { sys::cv_core_cv_stereoCalibrate_VectorOfMat_objectPoints_VectorOfMat_imagePoints1_VectorOfMat_imagePoints2_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Size_imageSize_Mat_R_Mat_T_Mat_E_Mat_F_int_flags_TermCriteria_criteria(object_points.as_raw_VectorOfMat(), image_points1.as_raw_VectorOfMat(), image_points2.as_raw_VectorOfMat(), camera_matrix1.as_raw_Mat(), dist_coeffs1.as_raw_Mat(), camera_matrix2.as_raw_Mat(), dist_coeffs2.as_raw_Mat(), image_size, r.as_raw_Mat(), t.as_raw_Mat(), e.as_raw_Mat(), f.as_raw_Mat(), flags, criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_stereoRectifyUncalibrated_Mat_points1_Mat_points2_Mat_F_Size_imgSize_Mat_H1_Mat_H2_double_threshold
/// Computes a rectification transform for an uncalibrated stereo camera.
/// 
/// ## Parameters
/// * points1: Array of feature points in the first image.
/// * points2: The corresponding points in the second image. The same formats as in
/// findFundamentalMat are supported.
/// * F: Input fundamental matrix. It can be computed from the same set of point pairs using
/// findFundamentalMat .
/// * imgSize: Size of the image.
/// * H1: Output rectification homography matrix for the first image.
/// * H2: Output rectification homography matrix for the second image.
/// * threshold: Optional threshold used to filter out the outliers. If the parameter is greater
/// than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points
/// for which <span lang='latex'>|\texttt{points2[i]}^T*\texttt{F}*\texttt{points1[i]}|>\texttt{threshold}</span> ) are
/// rejected prior to computing the homographies. Otherwise, all the points are considered inliers.
/// 
/// The function computes the rectification transformations without knowing intrinsic parameters of the
/// cameras and their relative position in the space, which explains the suffix "uncalibrated". Another
/// related difference from stereoRectify is that the function outputs not the rectification
/// transformations in the object (3D) space, but the planar perspective transformations encoded by the
/// homography matrices H1 and H2 . The function implements the algorithm @cite Hartley99 .
/// 
/// 
/// Note:
/// While the algorithm does not need to know the intrinsic parameters of the cameras, it heavily
/// depends on the epipolar geometry. Therefore, if the camera lenses have a significant distortion,
/// it would be better to correct it before computing the fundamental matrix and calling this
/// function. For example, distortion coefficients can be estimated for each head of stereo camera
/// separately by using calibrateCamera . Then, the images can be corrected using undistort , or
/// just the point coordinates can be corrected with undistortPoints .
///
/// ## C++ default parameters:
/// * threshold: 5
pub fn stereo_rectify_uncalibrated(points1: &core::Mat, points2: &core::Mat, f: &core::Mat, img_size: core::Size, h1: &mut core::Mat, h2: &mut core::Mat, threshold: f64) -> Result<bool> {
    unsafe { sys::cv_core_cv_stereoRectifyUncalibrated_Mat_points1_Mat_points2_Mat_F_Size_imgSize_Mat_H1_Mat_H2_double_threshold(points1.as_raw_Mat(), points2.as_raw_Mat(), f.as_raw_Mat(), img_size, h1.as_raw_Mat(), h2.as_raw_Mat(), threshold) }.into_result()
}

// identifier: cv_stereoRectify_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Size_imageSize_Mat_R_Mat_T_Mat_R1_Mat_R2_Mat_P1_Mat_P2_Mat_Q_int_flags_double_alpha_Size_newImageSize_Rect_X_validPixROI1_Rect_X_validPixROI2
/// Computes rectification transforms for each head of a calibrated stereo camera.
/// 
/// ## Parameters
/// * cameraMatrix1: First camera matrix.
/// * distCoeffs1: First camera distortion parameters.
/// * cameraMatrix2: Second camera matrix.
/// * distCoeffs2: Second camera distortion parameters.
/// * imageSize: Size of the image used for stereo calibration.
/// * R: Rotation matrix between the coordinate systems of the first and the second cameras.
/// * T: Translation vector between coordinate systems of the cameras.
/// * R1: Output 3x3 rectification transform (rotation matrix) for the first camera.
/// * R2: Output 3x3 rectification transform (rotation matrix) for the second camera.
/// * P1: Output 3x4 projection matrix in the new (rectified) coordinate systems for the first
/// camera.
/// * P2: Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
/// camera.
/// * Q: Output <span lang='latex'>4 \times 4</span> disparity-to-depth mapping matrix (see reprojectImageTo3D ).
/// * flags: Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
/// the function makes the principal points of each camera have the same pixel coordinates in the
/// rectified views. And if the flag is not set, the function may still shift the images in the
/// horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
/// useful image area.
/// * alpha: Free scaling parameter. If it is -1 or absent, the function performs the default
/// scaling. Otherwise, the parameter should be between 0 and 1. alpha=0 means that the rectified
/// images are zoomed and shifted so that only valid pixels are visible (no black areas after
/// rectification). alpha=1 means that the rectified image is decimated and shifted so that all the
/// pixels from the original images from the cameras are retained in the rectified images (no source
/// image pixels are lost). Obviously, any intermediate value yields an intermediate result between
/// those two extreme cases.
/// * newImageSize: New image resolution after rectification. The same size should be passed to
/// initUndistortRectifyMap (see the stereo_calib.cpp sample in OpenCV samples directory). When (0,0)
/// is passed (default), it is set to the original imageSize . Setting it to larger value can help you
/// preserve details in the original image, especially when there is a big radial distortion.
/// * validPixROI1: Optional output rectangles inside the rectified images where all the pixels
/// are valid. If alpha=0 , the ROIs cover the whole images. Otherwise, they are likely to be smaller
/// (see the picture below).
/// * validPixROI2: Optional output rectangles inside the rectified images where all the pixels
/// are valid. If alpha=0 , the ROIs cover the whole images. Otherwise, they are likely to be smaller
/// (see the picture below).
/// 
/// The function computes the rotation matrices for each camera that (virtually) make both camera image
/// planes the same plane. Consequently, this makes all the epipolar lines parallel and thus simplifies
/// the dense stereo correspondence problem. The function takes the matrices computed by stereoCalibrate
/// as input. As output, it provides two rotation matrices and also two projection matrices in the new
/// coordinates. The function distinguishes the following two cases:
/// 
/// *   **Horizontal stereo**: the first and the second camera views are shifted relative to each other
/// mainly along the x axis (with possible small vertical shift). In the rectified images, the
/// corresponding epipolar lines in the left and right cameras are horizontal and have the same
/// y-coordinate. P1 and P2 look like:
/// 
/// <div lang='latex'>\texttt{P1} = \begin{bmatrix} f & 0 & cx_1 & 0 \\ 0 & f & cy & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix}</div>
/// 
/// <div lang='latex'>\texttt{P2} = \begin{bmatrix} f & 0 & cx_2 & T_x*f \\ 0 & f & cy & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} ,</div>
/// 
/// where <span lang='latex'>T_x</span> is a horizontal shift between the cameras and <span lang='latex'>cx_1=cx_2</span> if
/// CALIB_ZERO_DISPARITY is set.
/// 
/// *   **Vertical stereo**: the first and the second camera views are shifted relative to each other
/// mainly in vertical direction (and probably a bit in the horizontal direction too). The epipolar
/// lines in the rectified images are vertical and have the same x-coordinate. P1 and P2 look like:
/// 
/// <div lang='latex'>\texttt{P1} = \begin{bmatrix} f & 0 & cx & 0 \\ 0 & f & cy_1 & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix}</div>
/// 
/// <div lang='latex'>\texttt{P2} = \begin{bmatrix} f & 0 & cx & 0 \\ 0 & f & cy_2 & T_y*f \\ 0 & 0 & 1 & 0 \end{bmatrix} ,</div>
/// 
/// where <span lang='latex'>T_y</span> is a vertical shift between the cameras and <span lang='latex'>cy_1=cy_2</span> if CALIB_ZERO_DISPARITY is
/// set.
/// 
/// As you can see, the first three columns of P1 and P2 will effectively be the new "rectified" camera
/// matrices. The matrices, together with R1 and R2 , can then be passed to initUndistortRectifyMap to
/// initialize the rectification map for each camera.
/// 
/// See below the screenshot from the stereo_calib.cpp sample. Some red horizontal lines pass through
/// the corresponding image regions. This means that the images are well rectified, which is what most
/// stereo correspondence algorithms rely on. The green rectangles are roi1 and roi2 . You see that
/// their interiors are all valid pixels.
/// 
/// ![image](pics/stereo_undistort.jpg)
///
/// ## C++ default parameters:
/// * flags: CALIB_ZERO_DISPARITY
/// * alpha: -1
/// * new_image_size: Size()
/// * valid_pix_roi1: 0
/// * valid_pix_roi2: 0
pub fn stereo_rectify_1(camera_matrix1: &core::Mat, dist_coeffs1: &core::Mat, camera_matrix2: &core::Mat, dist_coeffs2: &core::Mat, image_size: core::Size, r: &core::Mat, t: &core::Mat, r1: &mut core::Mat, r2: &mut core::Mat, p1: &mut core::Mat, p2: &mut core::Mat, q: &mut core::Mat, flags: i32, alpha: f64, new_image_size: core::Size, valid_pix_roi1: &mut core::Rect, valid_pix_roi2: &mut core::Rect) -> Result<()> {
    unsafe { sys::cv_core_cv_stereoRectify_Mat_cameraMatrix1_Mat_distCoeffs1_Mat_cameraMatrix2_Mat_distCoeffs2_Size_imageSize_Mat_R_Mat_T_Mat_R1_Mat_R2_Mat_P1_Mat_P2_Mat_Q_int_flags_double_alpha_Size_newImageSize_Rect_X_validPixROI1_Rect_X_validPixROI2(camera_matrix1.as_raw_Mat(), dist_coeffs1.as_raw_Mat(), camera_matrix2.as_raw_Mat(), dist_coeffs2.as_raw_Mat(), image_size, r.as_raw_Mat(), t.as_raw_Mat(), r1.as_raw_Mat(), r2.as_raw_Mat(), p1.as_raw_Mat(), p2.as_raw_Mat(), q.as_raw_Mat(), flags, alpha, new_image_size, valid_pix_roi1, valid_pix_roi2) }.into_result()
}

// identifier: cv_stopLoop
pub fn stop_loop() -> Result<()> {
    unsafe { sys::cv_core_cv_stopLoop() }.into_result()
}

// identifier: cv_stylization_Mat_src_Mat_dst_float_sigma_s_float_sigma_r
/// Stylization aims to produce digital imagery with a wide variety of effects not focused on
/// photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low
/// contrast while preserving, or enhancing, high-contrast features.
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * dst: Output image with the same size and type as src.
/// * sigma_s: Range between 0 to 200.
/// * sigma_r: Range between 0 to 1.
///
/// ## C++ default parameters:
/// * sigma_s: 60
/// * sigma_r: 0.45f
pub fn stylization(src: &core::Mat, dst: &mut core::Mat, sigma_s: f32, sigma_r: f32) -> Result<()> {
    unsafe { sys::cv_core_cv_stylization_Mat_src_Mat_dst_float_sigma_s_float_sigma_r(src.as_raw_Mat(), dst.as_raw_Mat(), sigma_s, sigma_r) }.into_result()
}

// identifier: cv_subtract_Mat_src1_Mat_src2_Mat_dst_Mat_mask_int_dtype
/// Calculates the per-element difference between two arrays or array and a scalar.
/// 
/// The function subtract calculates:
/// - Difference between two arrays, when both input arrays have the same size and the same number of
/// channels:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} ( \texttt{src1}(I) -  \texttt{src2}(I)) \quad \texttt{if mask}(I) \ne0</div>
/// - Difference between an array and a scalar, when src2 is constructed from Scalar or has the same
/// number of elements as `src1.channels()`:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} ( \texttt{src1}(I) -  \texttt{src2} ) \quad \texttt{if mask}(I) \ne0</div>
/// - Difference between a scalar and an array, when src1 is constructed from Scalar or has the same
/// number of elements as `src2.channels()`:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} ( \texttt{src1} -  \texttt{src2}(I) ) \quad \texttt{if mask}(I) \ne0</div>
/// - The reverse difference between a scalar and an array in the case of `SubRS`:
/// <div lang='latex'>\texttt{dst}(I) =  \texttt{saturate} ( \texttt{src2} -  \texttt{src1}(I) ) \quad \texttt{if mask}(I) \ne0</div>
/// where I is a multi-dimensional index of array elements. In case of multi-channel arrays, each
/// channel is processed independently.
/// 
/// The first function in the list above can be replaced with matrix expressions:
/// ```ignore{.cpp}
/// dst = src1 - src2;
/// dst -= src1; // equivalent to subtract(dst, src1, dst);
/// ```
/// 
/// The input arrays and the output array can all have the same or different depths. For example, you
/// can subtract to 8-bit unsigned arrays and store the difference in a 16-bit signed array. Depth of
/// the output array is determined by dtype parameter. In the second and third cases above, as well as
/// in the first case, when src1.depth() == src2.depth(), dtype can be set to the default -1. In this
/// case the output array will have the same depth as the input array, be it src1, src2 or both.
/// 
/// Note: Saturation is not applied when the output array has the depth CV_32S. You may even get
/// result of an incorrect sign in the case of overflow.
/// ## Parameters
/// * src1: first input array or a scalar.
/// * src2: second input array or a scalar.
/// * dst: output array of the same size and the same number of channels as the input array.
/// * mask: optional operation mask; this is an 8-bit single channel array that specifies elements
/// of the output array to be changed.
/// * dtype: optional depth of the output array
/// @sa  add, addWeighted, scaleAdd, Mat::convertTo
///
/// ## C++ default parameters:
/// * mask: noArray()
/// * dtype: -1
pub fn subtract(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat, mask: &core::Mat, dtype: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_subtract_Mat_src1_Mat_src2_Mat_dst_Mat_mask_int_dtype(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat(), mask.as_raw_Mat(), dtype) }.into_result()
}

// identifier: cv_sum_Mat_src
/// Calculates the sum of array elements.
/// 
/// The function cv::sum calculates and returns the sum of array elements,
/// independently for each channel.
/// ## Parameters
/// * src: input array that must have from 1 to 4 channels.
/// @sa  countNonZero, mean, meanStdDev, norm, minMaxLoc, reduce
pub fn sum(src: &core::Mat) -> Result<core::Scalar> {
    unsafe { sys::cv_core_cv_sum_Mat_src(src.as_raw_Mat()) }.into_result()
}

// identifier: cv_superres_createFrameSource_Camera_int_deviceId
///
/// ## C++ default parameters:
/// * device_id: 0
pub fn create_frame_source__camera(device_id: i32) -> Result<types::PtrOfFrameSource> {
    unsafe { sys::cv_core_cv_superres_createFrameSource_Camera_int_deviceId(device_id) }.into_result().map(|x| types::PtrOfFrameSource { ptr: x })
}

// identifier: cv_superres_createFrameSource_Empty
pub fn create_frame_source__empty() -> Result<types::PtrOfFrameSource> {
    unsafe { sys::cv_core_cv_superres_createFrameSource_Empty() }.into_result().map(|x| types::PtrOfFrameSource { ptr: x })
}

// identifier: cv_superres_createFrameSource_Video_CUDA_String_fileName
pub fn create_frame_source__video_cuda(file_name: &str) -> Result<types::PtrOfFrameSource> {
    string_arg!(file_name);
    unsafe { sys::cv_core_cv_superres_createFrameSource_Video_CUDA_String_fileName(file_name.as_ptr()) }.into_result().map(|x| types::PtrOfFrameSource { ptr: x })
}

// identifier: cv_superres_createFrameSource_Video_String_fileName
pub fn create_frame_source__video(file_name: &str) -> Result<types::PtrOfFrameSource> {
    string_arg!(file_name);
    unsafe { sys::cv_core_cv_superres_createFrameSource_Video_String_fileName(file_name.as_ptr()) }.into_result().map(|x| types::PtrOfFrameSource { ptr: x })
}

// identifier: cv_superres_createSuperResolution_BTVL1
/// Create Bilateral TV-L1 Super Resolution.
/// 
/// This class implements Super Resolution algorithm described in the papers @cite Farsiu03 and
/// @cite Mitzel09 .
/// 
/// Here are important members of the class that control the algorithm, which you can set after
/// constructing the class instance:
/// 
/// *   **int scale** Scale factor.
/// *   **int iterations** Iteration count.
/// *   **double tau** Asymptotic value of steepest descent method.
/// *   **double lambda** Weight parameter to balance data term and smoothness term.
/// *   **double alpha** Parameter of spacial distribution in Bilateral-TV.
/// *   **int btvKernelSize** Kernel size of Bilateral-TV filter.
/// *   **int blurKernelSize** Gaussian blur kernel size.
/// *   **double blurSigma** Gaussian blur sigma.
/// *   **int temporalAreaRadius** Radius of the temporal search area.
/// *   **Ptr\<DenseOpticalFlowExt\> opticalFlow** Dense optical flow algorithm.
pub fn create_super_resolution_btvl1() -> Result<types::PtrOfSuperResolution> {
    unsafe { sys::cv_core_cv_superres_createSuperResolution_BTVL1() }.into_result().map(|x| types::PtrOfSuperResolution { ptr: x })
}

// identifier: cv_superres_createSuperResolution_BTVL1_CUDA
pub fn create_super_resolution_btvl1_cuda() -> Result<types::PtrOfSuperResolution> {
    unsafe { sys::cv_core_cv_superres_createSuperResolution_BTVL1_CUDA() }.into_result().map(|x| types::PtrOfSuperResolution { ptr: x })
}

// identifier: cv_swap_Mat_a_Mat_b
/// Swaps two matrices
pub fn swap(a: &core::Mat, b: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_swap_Mat_a_Mat_b(a.as_raw_Mat(), b.as_raw_Mat()) }.into_result()
}

// identifier: cv_tempfile_const_char_X_suffix
///
/// ## C++ default parameters:
/// * suffix: 0
pub fn tempfile(suffix: &str) -> Result<String> {
    string_arg!(suffix);
    unsafe { sys::cv_core_cv_tempfile_const_char_X_suffix(suffix.as_ptr()) }.into_result().map(crate::templ::receive_string_mut)
}

// identifier: cv_textureFlattening_Mat_src_Mat_mask_Mat_dst_float_low_threshold_float_high_threshold_int_kernel_size
/// By retaining only the gradients at edge locations, before integrating with the Poisson solver, one
/// washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge
/// Detector is used.
/// 
/// ## Parameters
/// * src: Input 8-bit 3-channel image.
/// * mask: Input 8-bit 1 or 3-channel image.
/// * dst: Output image with the same size and type as src.
/// * low_threshold: Range from 0 to 100.
/// * high_threshold: Value \> 100.
/// * kernel_size: The size of the Sobel kernel to be used.
/// 
/// **NOTE:**
/// 
/// The algorithm assumes that the color of the source image is close to that of the destination. This
/// assumption means that when the colors don't match, the source image color gets tinted toward the
/// color of the destination image.
///
/// ## C++ default parameters:
/// * low_threshold: 30
/// * high_threshold: 45
/// * kernel_size: 3
pub fn texture_flattening(src: &core::Mat, mask: &core::Mat, dst: &mut core::Mat, low_threshold: f32, high_threshold: f32, kernel_size: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_textureFlattening_Mat_src_Mat_mask_Mat_dst_float_low_threshold_float_high_threshold_int_kernel_size(src.as_raw_Mat(), mask.as_raw_Mat(), dst.as_raw_Mat(), low_threshold, high_threshold, kernel_size) }.into_result()
}

// identifier: cv_threshold_Mat_src_Mat_dst_double_thresh_double_maxval_int_type
/// Applies a fixed-level threshold to each array element.
/// 
/// The function applies fixed-level thresholding to a multiple-channel array. The function is typically
/// used to get a bi-level (binary) image out of a grayscale image ( #compare could be also used for
/// this purpose) or for removing a noise, that is, filtering out pixels with too small or too large
/// values. There are several types of thresholding supported by the function. They are determined by
/// type parameter.
/// 
/// Also, the special values #THRESH_OTSU or #THRESH_TRIANGLE may be combined with one of the
/// above values. In these cases, the function determines the optimal threshold value using the Otsu's
/// or Triangle algorithm and uses it instead of the specified thresh.
/// 
/// 
/// Note: Currently, the Otsu's and Triangle methods are implemented only for 8-bit single-channel images.
/// 
/// ## Parameters
/// * src: input array (multiple-channel, 8-bit or 32-bit floating point).
/// * dst: output array of the same size  and type and the same number of channels as src.
/// * thresh: threshold value.
/// * maxval: maximum value to use with the #THRESH_BINARY and #THRESH_BINARY_INV thresholding
/// types.
/// * type: thresholding type (see #ThresholdTypes).
/// @return the computed threshold value if Otsu's or Triangle methods used.
/// 
/// @sa  adaptiveThreshold, findContours, compare, min, max
pub fn threshold(src: &core::Mat, dst: &mut core::Mat, thresh: f64, maxval: f64, _type: i32) -> Result<f64> {
    unsafe { sys::cv_core_cv_threshold_Mat_src_Mat_dst_double_thresh_double_maxval_int_type(src.as_raw_Mat(), dst.as_raw_Mat(), thresh, maxval, _type) }.into_result()
}

// identifier: cv_trace_Mat_mtx
/// Returns the trace of a matrix.
/// 
/// The function cv::trace returns the sum of the diagonal elements of the
/// matrix mtx .
/// <div lang='latex'>\mathrm{tr} ( \texttt{mtx} ) =  \sum _i  \texttt{mtx} (i,i)</div>
/// ## Parameters
/// * mtx: input matrix.
pub fn trace(mtx: &core::Mat) -> Result<core::Scalar> {
    unsafe { sys::cv_core_cv_trace_Mat_mtx(mtx.as_raw_Mat()) }.into_result()
}

// identifier: cv_transform_Mat_src_Mat_dst_Mat_m
/// Performs the matrix transformation of every array element.
/// 
/// The function cv::transform performs the matrix transformation of every
/// element of the array src and stores the results in dst :
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{m} \cdot \texttt{src} (I)</div>
/// (when m.cols=src.channels() ), or
/// <div lang='latex'>\texttt{dst} (I) =  \texttt{m} \cdot [ \texttt{src} (I); 1]</div>
/// (when m.cols=src.channels()+1 )
/// 
/// Every element of the N -channel array src is interpreted as N -element
/// vector that is transformed using the M x N or M x (N+1) matrix m to
/// M-element vector - the corresponding element of the output array dst .
/// 
/// The function may be used for geometrical transformation of
/// N -dimensional points, arbitrary linear color space transformation (such
/// as various kinds of RGB to YUV transforms), shuffling the image
/// channels, and so forth.
/// ## Parameters
/// * src: input array that must have as many channels (1 to 4) as
/// m.cols or m.cols-1.
/// * dst: output array of the same size and depth as src; it has as
/// many channels as m.rows.
/// * m: transformation 2x2 or 2x3 floating-point matrix.
/// @sa perspectiveTransform, getAffineTransform, estimateAffine2D, warpAffine, warpPerspective
pub fn transform(src: &core::Mat, dst: &mut core::Mat, m: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_transform_Mat_src_Mat_dst_Mat_m(src.as_raw_Mat(), dst.as_raw_Mat(), m.as_raw_Mat()) }.into_result()
}

// identifier: cv_transpose_Mat_src_Mat_dst
/// Transposes a matrix.
/// 
/// The function cv::transpose transposes the matrix src :
/// <div lang='latex'>\texttt{dst} (i,j) =  \texttt{src} (j,i)</div>
/// 
/// Note: No complex conjugation is done in case of a complex matrix. It
/// should be done separately if needed.
/// ## Parameters
/// * src: input array.
/// * dst: output array of the same type as src.
pub fn transpose(src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_transpose_Mat_src_Mat_dst(src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_triangulatePoints_Mat_projMatr1_Mat_projMatr2_Mat_projPoints1_Mat_projPoints2_Mat_points4D
/// Reconstructs points by triangulation.
/// 
/// ## Parameters
/// * projMatr1: 3x4 projection matrix of the first camera.
/// * projMatr2: 3x4 projection matrix of the second camera.
/// * projPoints1: 2xN array of feature points in the first image. In case of c++ version it can
/// be also a vector of feature points or two-channel matrix of size 1xN or Nx1.
/// * projPoints2: 2xN array of corresponding points in the second image. In case of c++ version
/// it can be also a vector of feature points or two-channel matrix of size 1xN or Nx1.
/// * points4D: 4xN array of reconstructed points in homogeneous coordinates.
/// 
/// The function reconstructs 3-dimensional points (in homogeneous coordinates) by using their
/// observations with a stereo camera. Projections matrices can be obtained from stereoRectify.
/// 
/// 
/// Note:
/// Keep in mind that all input data should be of float type in order for this function to work.
/// 
/// @sa
/// reprojectImageTo3D
pub fn triangulate_points(proj_matr1: &core::Mat, proj_matr2: &core::Mat, proj_points1: &core::Mat, proj_points2: &core::Mat, points4_d: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_triangulatePoints_Mat_projMatr1_Mat_projMatr2_Mat_projPoints1_Mat_projPoints2_Mat_points4D(proj_matr1.as_raw_Mat(), proj_matr2.as_raw_Mat(), proj_points1.as_raw_Mat(), proj_points2.as_raw_Mat(), points4_d.as_raw_Mat()) }.into_result()
}

// identifier: cv_undistortPoints_Mat_src_Mat_dst_Mat_cameraMatrix_Mat_distCoeffs_Mat_R_Mat_P
/// Computes the ideal point coordinates from the observed point coordinates.
/// 
/// The function is similar to #undistort and #initUndistortRectifyMap but it operates on a
/// sparse set of points instead of a raster image. Also the function performs a reverse transformation
/// to projectPoints. In case of a 3D object, it does not reconstruct its 3D coordinates, but for a
/// planar object, it does, up to a translation vector, if the proper R is specified.
/// 
/// For each observed point coordinate <span lang='latex'>(u, v)</span> the function computes:
/// <div lang='latex'>
/// \begin{array}{l}
/// x^{"}  \leftarrow (u - c_x)/f_x  \\
/// y^{"}  \leftarrow (v - c_y)/f_y  \\
/// (x',y') = undistort(x^{"},y^{"}, \texttt{distCoeffs}) \\
/// {[X\,Y\,W]} ^T  \leftarrow R*[x' \, y' \, 1]^T  \\
/// x  \leftarrow X/W  \\
/// y  \leftarrow Y/W  \\
/// \text{only performed if P is specified:} \\
/// u'  \leftarrow x {f'}_x + {c'}_x  \\
/// v'  \leftarrow y {f'}_y + {c'}_y
/// \end{array}
/// </div>
/// 
/// where *undistort* is an approximate iterative algorithm that estimates the normalized original
/// point coordinates out of the normalized distorted point coordinates ("normalized" means that the
/// coordinates do not depend on the camera matrix).
/// 
/// The function can be used for both a stereo camera head or a monocular camera (when R is empty).
/// 
/// ## Parameters
/// * src: Observed point coordinates, 1xN or Nx1 2-channel (CV_32FC2 or CV_64FC2).
/// * dst: Output ideal point coordinates after undistortion and reverse perspective
/// transformation. If matrix P is identity or omitted, dst will contain normalized point coordinates.
/// * cameraMatrix: Camera matrix <span lang='latex'>\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> .
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span>
/// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
/// * R: Rectification transformation in the object space (3x3 matrix). R1 or R2 computed by
/// #stereoRectify can be passed here. If the matrix is empty, the identity transformation is used.
/// * P: New camera matrix (3x3) or new projection matrix (3x4) <span lang='latex'>\begin{bmatrix} {f'}_x & 0 & {c'}_x & t_x \\ 0 & {f'}_y & {c'}_y & t_y \\ 0 & 0 & 1 & t_z \end{bmatrix}</span>. P1 or P2 computed by
/// #stereoRectify can be passed here. If the matrix is empty, the identity new camera matrix is used.
///
/// ## C++ default parameters:
/// * r: noArray()
/// * p: noArray()
pub fn undistort_points(src: &core::Mat, dst: &mut core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, r: &core::Mat, p: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_undistortPoints_Mat_src_Mat_dst_Mat_cameraMatrix_Mat_distCoeffs_Mat_R_Mat_P(src.as_raw_Mat(), dst.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), r.as_raw_Mat(), p.as_raw_Mat()) }.into_result()
}

// identifier: cv_undistortPoints_Mat_src_Mat_dst_Mat_cameraMatrix_Mat_distCoeffs_Mat_R_Mat_P_TermCriteria_criteria
/// @overload
/// 
/// Note: Default version of #undistortPoints does 5 iterations to compute undistorted points.
pub fn undistort_points_1(src: &core::Mat, dst: &mut core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, r: &core::Mat, p: &core::Mat, criteria: &core::TermCriteria) -> Result<()> {
    unsafe { sys::cv_core_cv_undistortPoints_Mat_src_Mat_dst_Mat_cameraMatrix_Mat_distCoeffs_Mat_R_Mat_P_TermCriteria_criteria(src.as_raw_Mat(), dst.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), r.as_raw_Mat(), p.as_raw_Mat(), criteria.as_raw_TermCriteria()) }.into_result()
}

// identifier: cv_undistort_Mat_src_Mat_dst_Mat_cameraMatrix_Mat_distCoeffs_Mat_newCameraMatrix
/// Transforms an image to compensate for lens distortion.
/// 
/// The function transforms an image to compensate radial and tangential lens distortion.
/// 
/// The function is simply a combination of #initUndistortRectifyMap (with unity R ) and #remap
/// (with bilinear interpolation). See the former function for details of the transformation being
/// performed.
/// 
/// Those pixels in the destination image, for which there is no correspondent pixels in the source
/// image, are filled with zeros (black color).
/// 
/// A particular subset of the source image that will be visible in the corrected image can be regulated
/// by newCameraMatrix. You can use #getOptimalNewCameraMatrix to compute the appropriate
/// newCameraMatrix depending on your requirements.
/// 
/// The camera matrix and the distortion parameters can be determined using #calibrateCamera. If
/// the resolution of images is different from the resolution used at the calibration stage, \f$f_x,
/// f_y, c_x<span lang='latex'> and </span>c_y\f$ need to be scaled accordingly, while the distortion coefficients remain
/// the same.
/// 
/// ## Parameters
/// * src: Input (distorted) image.
/// * dst: Output (corrected) image that has the same size and type as src .
/// * cameraMatrix: Input camera matrix <span lang='latex'>A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}</span> .
/// * distCoeffs: Input vector of distortion coefficients
/// <span lang='latex'>(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])</span>
/// of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
/// * newCameraMatrix: Camera matrix of the distorted image. By default, it is the same as
/// cameraMatrix but you may additionally scale and shift the result by using a different matrix.
///
/// ## C++ default parameters:
/// * new_camera_matrix: noArray()
pub fn undistort(src: &core::Mat, dst: &mut core::Mat, camera_matrix: &core::Mat, dist_coeffs: &core::Mat, new_camera_matrix: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_undistort_Mat_src_Mat_dst_Mat_cameraMatrix_Mat_distCoeffs_Mat_newCameraMatrix(src.as_raw_Mat(), dst.as_raw_Mat(), camera_matrix.as_raw_Mat(), dist_coeffs.as_raw_Mat(), new_camera_matrix.as_raw_Mat()) }.into_result()
}

// identifier: cv_updateWindow_String_winname
/// Force window to redraw its context and call draw callback ( See cv::setOpenGlDrawCallback ).
/// 
/// ## Parameters
/// * winname: Name of the window.
pub fn update_window(winname: &str) -> Result<()> {
    string_arg!(winname);
    unsafe { sys::cv_core_cv_updateWindow_String_winname(winname.as_ptr()) }.into_result()
}

// identifier: cv_useOpenVX
pub fn use_open_vx() -> Result<bool> {
    unsafe { sys::cv_core_cv_useOpenVX() }.into_result()
}

// identifier: cv_useOptimized
/// Returns the status of optimized code usage.
/// 
/// The function returns true if the optimized code is enabled. Otherwise, it returns false.
pub fn use_optimized() -> Result<bool> {
    unsafe { sys::cv_core_cv_useOptimized() }.into_result()
}

// identifier: cv_utils_getThreadID
pub fn get_thread_id() -> Result<i32> {
    unsafe { sys::cv_core_cv_utils_getThreadID() }.into_result()
}

// identifier: cv_va_intel_convertFromVASurface_void_X_display_unsigned_int_surface_Size_size_Mat_dst
/// Converts VASurfaceID object to OutputArray.
/// ## Parameters
/// * display: - VADisplay object.
/// * surface: - source VASurfaceID object.
/// * size:    - size of image represented by VASurfaceID object.
/// * dst:     - destination OutputArray.
pub fn convert_from_va_surface(display: &mut c_void, surface: u32, size: core::Size, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_va_intel_convertFromVASurface_void_X_display_unsigned_int_surface_Size_size_Mat_dst(display, surface, size, dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_va_intel_convertToVASurface_void_X_display_Mat_src_unsigned_int_surface_Size_size
/// Converts InputArray to VASurfaceID object.
/// ## Parameters
/// * display: - VADisplay object.
/// * src:     - source InputArray.
/// * surface: - destination VASurfaceID object.
/// * size:    - size of image represented by VASurfaceID object.
pub fn convert_to_va_surface(display: &mut c_void, src: &core::Mat, surface: u32, size: core::Size) -> Result<()> {
    unsafe { sys::cv_core_cv_va_intel_convertToVASurface_void_X_display_Mat_src_unsigned_int_surface_Size_size(display, src.as_raw_Mat(), surface, size) }.into_result()
}

// identifier: cv_validateDisparity_Mat_disparity_Mat_cost_int_minDisparity_int_numberOfDisparities_int_disp12MaxDisp
///
/// ## C++ default parameters:
/// * disp12_max_disp: 1
pub fn validate_disparity(disparity: &mut core::Mat, cost: &core::Mat, min_disparity: i32, number_of_disparities: i32, disp12_max_disp: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_validateDisparity_Mat_disparity_Mat_cost_int_minDisparity_int_numberOfDisparities_int_disp12MaxDisp(disparity.as_raw_Mat(), cost.as_raw_Mat(), min_disparity, number_of_disparities, disp12_max_disp) }.into_result()
}

// identifier: cv_vconcat_Mat_src1_Mat_src2_Mat_dst
/// @overload
/// ```ignore{.cpp}
/// cv::Mat_<float> A = (cv::Mat_<float>(3, 2) << 1, 7,
/// 2, 8,
/// 3, 9);
/// cv::Mat_<float> B = (cv::Mat_<float>(3, 2) << 4, 10,
/// 5, 11,
/// 6, 12);
/// 
/// cv::Mat C;
/// cv::vconcat(A, B, C);
/// //C:
/// //[1, 7;
/// // 2, 8;
/// // 3, 9;
/// // 4, 10;
/// // 5, 11;
/// // 6, 12]
/// ```
/// 
/// ## Parameters
/// * src1: first input array to be considered for vertical concatenation.
/// * src2: second input array to be considered for vertical concatenation.
/// * dst: output array. It has the same number of cols and depth as the src1 and src2, and the sum of rows of the src1 and src2.
pub fn vconcat(src1: &core::Mat, src2: &core::Mat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_vconcat_Mat_src1_Mat_src2_Mat_dst(src1.as_raw_Mat(), src2.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_vconcat_VectorOfMat_src_Mat_dst
/// @overload
/// ```ignore{.cpp}
/// std::vector<cv::Mat> matrices = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)),
/// cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)),
/// cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),};
/// 
/// cv::Mat out;
/// cv::vconcat( matrices, out );
/// //out:
/// //[1,   1,   1,   1;
/// // 2,   2,   2,   2;
/// // 3,   3,   3,   3]
/// ```
/// 
/// ## Parameters
/// * src: input array or vector of matrices. all of the matrices must have the same number of cols and the same depth
/// * dst: output array. It has the same number of cols and depth as the src, and the sum of rows of the src.
/// same depth.
pub fn vconcat_1(src: &types::VectorOfMat, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_vconcat_VectorOfMat_src_Mat_dst(src.as_raw_VectorOfMat(), dst.as_raw_Mat()) }.into_result()
}

// identifier: cv_vconcat_const_Mat_src_size_t_nsrc_Mat_dst
/// Applies vertical concatenation to given matrices.
/// 
/// The function vertically concatenates two or more cv::Mat matrices (with the same number of cols).
/// ```ignore{.cpp}
/// cv::Mat matArray[] = { cv::Mat(1, 4, CV_8UC1, cv::Scalar(1)),
/// cv::Mat(1, 4, CV_8UC1, cv::Scalar(2)),
/// cv::Mat(1, 4, CV_8UC1, cv::Scalar(3)),};
/// 
/// cv::Mat out;
/// cv::vconcat( matArray, 3, out );
/// //out:
/// //[1,   1,   1,   1;
/// // 2,   2,   2,   2;
/// // 3,   3,   3,   3]
/// ```
/// 
/// ## Parameters
/// * src: input array or vector of matrices. all of the matrices must have the same number of cols and the same depth.
/// * nsrc: number of matrices in src.
/// * dst: output array. It has the same number of cols and depth as the src, and the sum of rows of the src.
/// @sa cv::hconcat(const Mat*, size_t, OutputArray), @sa cv::hconcat(InputArrayOfArrays, OutputArray) and @sa cv::hconcat(InputArray, InputArray, OutputArray)
pub fn vconcat_2(src: &core::Mat, nsrc: size_t, dst: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_vconcat_const_Mat_src_size_t_nsrc_Mat_dst(src.as_raw_Mat(), nsrc, dst.as_raw_Mat()) }.into_result()
}

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

// identifier: cv_videostab_calcFlowMask_Mat_flowX_Mat_flowY_Mat_errors_float_maxError_Mat_mask0_Mat_mask1_Mat_flowMask
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: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_videostab_calcFlowMask_Mat_flowX_Mat_flowY_Mat_errors_float_maxError_Mat_mask0_Mat_mask1_Mat_flowMask(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()
}

// identifier: cv_videostab_completeFrameAccordingToFlow_Mat_flowMask_Mat_flowX_Mat_flowY_Mat_frame1_Mat_mask1_float_distThresh_Mat_frame0_Mat_mask0
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: &core::Mat, mask0: &core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_videostab_completeFrameAccordingToFlow_Mat_flowMask_Mat_flowX_Mat_flowY_Mat_frame1_Mat_mask1_float_distThresh_Mat_frame0_Mat_mask0(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()
}

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

// identifier: cv_videostab_estimateGlobalMotionLeastSquares_Mat_points0_Mat_points1_int_model_float_X_rmse
/// 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.
/// @return 3x3 2D transformation matrix (32F).
///
/// ## C++ default parameters:
/// * model: MM_AFFINE
/// * rmse: 0
pub fn estimate_global_motion_least_squares(points0: &mut core::Mat, points1: &mut core::Mat, model: i32, rmse: &mut f32) -> Result<core::Mat> {
    unsafe { sys::cv_core_cv_videostab_estimateGlobalMotionLeastSquares_Mat_points0_Mat_points1_int_model_float_X_rmse(points0.as_raw_Mat(), points1.as_raw_Mat(), model, rmse) }.into_result().map(|x| core::Mat { ptr: x })
}

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

// identifier: cv_videostab_getMotion_int_from_int_to_VectorOfMat_motions
/// 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
/// @return 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_core_cv_videostab_getMotion_int_from_int_to_VectorOfMat_motions(from, to, motions.as_raw_VectorOfMat()) }.into_result().map(|x| core::Mat { ptr: x })
}

// identifier: cv_waitKeyEx_int_delay
/// Similar to #waitKey, but returns full key code.
/// 
/// 
/// Note:
/// 
/// Key code is implementation specific and depends on used backend: QT/GTK/Win32/etc
///
/// ## C++ default parameters:
/// * delay: 0
pub fn wait_key_ex(delay: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_waitKeyEx_int_delay(delay) }.into_result()
}

// identifier: cv_waitKey_int_delay
/// Waits for a pressed key.
/// 
/// The function waitKey waits for a key event infinitely (when <span lang='latex'>\texttt{delay}\leq 0</span> ) or for delay
/// milliseconds, when it is positive. Since the OS has a minimum time between switching threads, the
/// function will not wait exactly delay ms, it will wait at least delay ms, depending on what else is
/// running on your computer at that time. It returns the code of the pressed key or -1 if no key was
/// pressed before the specified time had elapsed.
/// 
/// 
/// Note:
/// 
/// This function is the only method in HighGUI that can fetch and handle events, so it needs to be
/// called periodically for normal event processing unless HighGUI is used within an environment that
/// takes care of event processing.
/// 
/// 
/// Note:
/// 
/// The function only works if there is at least one HighGUI window created and the window is active.
/// If there are several HighGUI windows, any of them can be active.
/// 
/// ## Parameters
/// * delay: Delay in milliseconds. 0 is the special value that means "forever".
///
/// ## C++ default parameters:
/// * delay: 0
pub fn wait_key(delay: i32) -> Result<i32> {
    unsafe { sys::cv_core_cv_waitKey_int_delay(delay) }.into_result()
}

// identifier: cv_warpAffine_Mat_src_Mat_dst_Mat_M_Size_dsize_int_flags_int_borderMode_Scalar_borderValue
/// Applies an affine transformation to an image.
/// 
/// The function warpAffine transforms the source image using the specified matrix:
/// 
/// <div lang='latex'>\texttt{dst} (x,y) =  \texttt{src} ( \texttt{M} _{11} x +  \texttt{M} _{12} y +  \texttt{M} _{13}, \texttt{M} _{21} x +  \texttt{M} _{22} y +  \texttt{M} _{23})</div>
/// 
/// when the flag #WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted
/// with #invertAffineTransform and then put in the formula above instead of M. The function cannot
/// operate in-place.
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image that has the size dsize and the same type as src .
/// * M: <span lang='latex'>2\times 3</span> transformation matrix.
/// * dsize: size of the output image.
/// * flags: combination of interpolation methods (see #InterpolationFlags) and the optional
/// flag #WARP_INVERSE_MAP that means that M is the inverse transformation (
/// <span lang='latex'>\texttt{dst}\rightarrow\texttt{src}</span> ).
/// * borderMode: pixel extrapolation method (see #BorderTypes); when
/// borderMode=#BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to
/// the "outliers" in the source image are not modified by the function.
/// * borderValue: value used in case of a constant border; by default, it is 0.
/// 
/// @sa  warpPerspective, resize, remap, getRectSubPix, transform
///
/// ## C++ default parameters:
/// * flags: INTER_LINEAR
/// * border_mode: BORDER_CONSTANT
/// * border_value: Scalar()
pub fn warp_affine(src: &core::Mat, dst: &mut core::Mat, m: &core::Mat, dsize: core::Size, flags: i32, border_mode: i32, border_value: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_warpAffine_Mat_src_Mat_dst_Mat_M_Size_dsize_int_flags_int_borderMode_Scalar_borderValue(src.as_raw_Mat(), dst.as_raw_Mat(), m.as_raw_Mat(), dsize, flags, border_mode, border_value) }.into_result()
}

// identifier: cv_warpPerspective_Mat_src_Mat_dst_Mat_M_Size_dsize_int_flags_int_borderMode_Scalar_borderValue
/// Applies a perspective transformation to an image.
/// 
/// The function warpPerspective transforms the source image using the specified matrix:
/// 
/// <div lang='latex'>\texttt{dst} (x,y) =  \texttt{src} \left ( \frac{M_{11} x + M_{12} y + M_{13}}{M_{31} x + M_{32} y + M_{33}} ,
/// \frac{M_{21} x + M_{22} y + M_{23}}{M_{31} x + M_{32} y + M_{33}} \right )</div>
/// 
/// when the flag #WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert
/// and then put in the formula above instead of M. The function cannot operate in-place.
/// 
/// ## Parameters
/// * src: input image.
/// * dst: output image that has the size dsize and the same type as src .
/// * M: <span lang='latex'>3\times 3</span> transformation matrix.
/// * dsize: size of the output image.
/// * flags: combination of interpolation methods (#INTER_LINEAR or #INTER_NEAREST) and the
/// optional flag #WARP_INVERSE_MAP, that sets M as the inverse transformation (
/// <span lang='latex'>\texttt{dst}\rightarrow\texttt{src}</span> ).
/// * borderMode: pixel extrapolation method (#BORDER_CONSTANT or #BORDER_REPLICATE).
/// * borderValue: value used in case of a constant border; by default, it equals 0.
/// 
/// @sa  warpAffine, resize, remap, getRectSubPix, perspectiveTransform
///
/// ## C++ default parameters:
/// * flags: INTER_LINEAR
/// * border_mode: BORDER_CONSTANT
/// * border_value: Scalar()
pub fn warp_perspective(src: &core::Mat, dst: &mut core::Mat, m: &core::Mat, dsize: core::Size, flags: i32, border_mode: i32, border_value: core::Scalar) -> Result<()> {
    unsafe { sys::cv_core_cv_warpPerspective_Mat_src_Mat_dst_Mat_M_Size_dsize_int_flags_int_borderMode_Scalar_borderValue(src.as_raw_Mat(), dst.as_raw_Mat(), m.as_raw_Mat(), dsize, flags, border_mode, border_value) }.into_result()
}

// identifier: cv_warpPolar_Mat_src_Mat_dst_Size_dsize_Point2f_center_double_maxRadius_int_flags
/// \brief Remaps an image to polar or semilog-polar coordinates space
/// 
/// @anchor polar_remaps_reference_image
/// ![Polar remaps reference](pics/polar_remap_doc.png)
/// 
/// Transform the source image using the following transformation:
/// <div lang='latex'>
/// dst(\rho , \phi ) = src(x,y)
/// </div>
/// 
/// where
/// <div lang='latex'>
/// \begin{array}{l}
/// \vec{I} = (x - center.x, \;y - center.y) \\
/// \phi = Kangle \cdot \texttt{angle} (\vec{I}) \\
/// \rho = \left\{\begin{matrix}
/// Klin \cdot \texttt{magnitude} (\vec{I}) & default \\
/// Klog \cdot log_e(\texttt{magnitude} (\vec{I})) & if \; semilog \\
/// \end{matrix}\right.
/// \end{array}
/// </div>
/// 
/// and
/// <div lang='latex'>
/// \begin{array}{l}
/// Kangle = dsize.height / 2\Pi \\
/// Klin = dsize.width / maxRadius \\
/// Klog = dsize.width / log_e(maxRadius) \\
/// \end{array}
/// </div>
/// 
/// 
/// \par Linear vs semilog mapping
/// 
/// Polar mapping can be linear or semi-log. Add one of #WarpPolarMode to `flags` to specify the polar mapping mode.
/// 
/// Linear is the default mode.
/// 
/// The semilog mapping emulates the human "foveal" vision that permit very high acuity on the line of sight (central vision)
/// in contrast to peripheral vision where acuity is minor.
/// 
/// \par Option on `dsize`:
/// 
/// - if both values in `dsize <=0 ` (default),
/// the destination image will have (almost) same area of source bounding circle:
/// <div lang='latex'>\begin{array}{l}
/// dsize.area  \leftarrow (maxRadius^2 \cdot \Pi) \\
/// dsize.width = \texttt{cvRound}(maxRadius) \\
/// dsize.height = \texttt{cvRound}(maxRadius \cdot \Pi) \\
/// \end{array}</div>
/// 
/// 
/// - if only `dsize.height <= 0`,
/// the destination image area will be proportional to the bounding circle area but scaled by `Kx * Kx`:
/// <div lang='latex'>\begin{array}{l}
/// dsize.height = \texttt{cvRound}(dsize.width \cdot \Pi) \\
/// \end{array}
/// </div>
/// 
/// - if both values in `dsize > 0 `,
/// the destination image will have the given size therefore the area of the bounding circle will be scaled to `dsize`.
/// 
/// 
/// \par Reverse mapping
/// 
/// You can get reverse mapping adding #WARP_INVERSE_MAP to `flags`
/// \snippet polar_transforms.cpp InverseMap
/// 
/// In addiction, to calculate the original coordinate from a polar mapped coordinate <span lang='latex'>(rho, phi)->(x, y)</span>:
/// \snippet polar_transforms.cpp InverseCoordinate
/// 
/// ## Parameters
/// * src: Source image.
/// * dst: Destination image. It will have same type as src.
/// * dsize: The destination image size (see description for valid options).
/// * center: The transformation center.
/// * maxRadius: The radius of the bounding circle to transform. It determines the inverse magnitude scale parameter too.
/// * flags: A combination of interpolation methods, #InterpolationFlags + #WarpPolarMode.
/// - Add #WARP_POLAR_LINEAR to select linear polar mapping (default)
/// - Add #WARP_POLAR_LOG to select semilog polar mapping
/// - Add #WARP_INVERSE_MAP for reverse mapping.
/// 
/// Note:
/// *  The function can not operate in-place.
/// *  To calculate magnitude and angle in degrees #cartToPolar is used internally thus angles are measured from 0 to 360 with accuracy about 0.3 degrees.
/// *  This function uses #remap. Due to current implementation limitations the size of an input and output images should be less than 32767x32767.
/// 
/// @sa cv::remap
pub fn warp_polar(src: &core::Mat, dst: &mut core::Mat, dsize: core::Size, center: core::Point2f, max_radius: f64, flags: i32) -> Result<()> {
    unsafe { sys::cv_core_cv_warpPolar_Mat_src_Mat_dst_Size_dsize_Point2f_center_double_maxRadius_int_flags(src.as_raw_Mat(), dst.as_raw_Mat(), dsize, center, max_radius, flags) }.into_result()
}

// identifier: cv_watershed_Mat_image_Mat_markers
/// Performs a marker-based image segmentation using the watershed algorithm.
/// 
/// The function implements one of the variants of watershed, non-parametric marker-based segmentation
/// algorithm, described in @cite Meyer92 .
/// 
/// Before passing the image to the function, you have to roughly outline the desired regions in the
/// image markers with positive (\>0) indices. So, every region is represented as one or more connected
/// components with the pixel values 1, 2, 3, and so on. Such markers can be retrieved from a binary
/// mask using #findContours and #drawContours (see the watershed.cpp demo). The markers are "seeds" of
/// the future image regions. All the other pixels in markers , whose relation to the outlined regions
/// is not known and should be defined by the algorithm, should be set to 0's. In the function output,
/// each pixel in markers is set to a value of the "seed" components or to -1 at boundaries between the
/// regions.
/// 
/// 
/// Note: Any two neighbor connected components are not necessarily separated by a watershed boundary
/// (-1's pixels); for example, they can touch each other in the initial marker image passed to the
/// function.
/// 
/// ## Parameters
/// * image: Input 8-bit 3-channel image.
/// * markers: Input/output 32-bit single-channel image (map) of markers. It should have the same
/// size as image .
/// 
/// @sa findContours
/// 
/// @ingroup imgproc_misc
pub fn watershed(image: &core::Mat, markers: &mut core::Mat) -> Result<()> {
    unsafe { sys::cv_core_cv_watershed_Mat_image_Mat_markers(image.as_raw_Mat(), markers.as_raw_Mat()) }.into_result()
}

// identifier: cv_wrapperEMD_Mat_signature1_Mat_signature2_int_distType_Mat_cost_PtrOffloat_lowerBound_Mat_flow
///
/// ## C++ default parameters:
/// * cost: noArray()
/// * lower_bound: Ptr<float>()
/// * flow: noArray()
pub fn wrapper_emd(signature1: &core::Mat, signature2: &core::Mat, dist_type: i32, cost: &core::Mat, lower_bound: &types::PtrOffloat, flow: &mut core::Mat) -> Result<f32> {
    unsafe { sys::cv_core_cv_wrapperEMD_Mat_signature1_Mat_signature2_int_distType_Mat_cost_PtrOffloat_lowerBound_Mat_flow(signature1.as_raw_Mat(), signature2.as_raw_Mat(), dist_type, cost.as_raw_Mat(), lower_bound.as_raw_PtrOffloat(), flow.as_raw_Mat()) }.into_result()
}

// Generating impl for trait cv::AKAZE (trait)
/// Class implementing the AKAZE keypoint detector and descriptor extractor, described in @cite ANB13.
/// 
/// @details AKAZE descriptors can only be used with KAZE or AKAZE keypoints. This class is thread-safe.
/// 
/// 
/// Note: When you need descriptors use Feature2D::detectAndCompute, which
/// provides better performance. When using Feature2D::detect followed by
/// Feature2D::compute scale space pyramid is computed twice.
/// 
/// 
/// Note: AKAZE implements T-API. When image is passed as UMat some parts of the algorithm
/// will use OpenCL.
/// 
/// 
/// Note: [ANB13] Fast Explicit Diffusion for Accelerated Features in Nonlinear
/// Scale Spaces. Pablo F. Alcantarilla, Jess Nuevo and Adrien Bartoli. In
/// British Machine Vision Conference (BMVC), Bristol, UK, September 2013.
pub trait AKAZE : core::Feature2D {
    #[doc(hidden)] fn as_raw_AKAZE(&self) -> *mut c_void;
    // identifier: cv_AKAZE_setDescriptorType_int_dtype
    fn set_descriptor_type(&mut self, dtype: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AKAZE_setDescriptorType_int_dtype(self.as_raw_AKAZE(), dtype) }.into_result()
    }
    
    // identifier: cv_AKAZE_getDescriptorType_const
    fn get_descriptor_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AKAZE_getDescriptorType_const(self.as_raw_AKAZE()) }.into_result()
    }
    
    // identifier: cv_AKAZE_setDescriptorSize_int_dsize
    fn set_descriptor_size(&mut self, dsize: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AKAZE_setDescriptorSize_int_dsize(self.as_raw_AKAZE(), dsize) }.into_result()
    }
    
    // identifier: cv_AKAZE_getDescriptorSize_const
    fn get_descriptor_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AKAZE_getDescriptorSize_const(self.as_raw_AKAZE()) }.into_result()
    }
    
    // identifier: cv_AKAZE_setDescriptorChannels_int_dch
    fn set_descriptor_channels(&mut self, dch: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AKAZE_setDescriptorChannels_int_dch(self.as_raw_AKAZE(), dch) }.into_result()
    }
    
    // identifier: cv_AKAZE_getDescriptorChannels_const
    fn get_descriptor_channels(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AKAZE_getDescriptorChannels_const(self.as_raw_AKAZE()) }.into_result()
    }
    
    // identifier: cv_AKAZE_setThreshold_double_threshold
    fn set_threshold(&mut self, threshold: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_AKAZE_setThreshold_double_threshold(self.as_raw_AKAZE(), threshold) }.into_result()
    }
    
    // identifier: cv_AKAZE_getThreshold_const
    fn get_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_AKAZE_getThreshold_const(self.as_raw_AKAZE()) }.into_result()
    }
    
    // identifier: cv_AKAZE_setNOctaves_int_octaves
    fn set_n_octaves(&mut self, octaves: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AKAZE_setNOctaves_int_octaves(self.as_raw_AKAZE(), octaves) }.into_result()
    }
    
    // identifier: cv_AKAZE_getNOctaves_const
    fn get_n_octaves(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AKAZE_getNOctaves_const(self.as_raw_AKAZE()) }.into_result()
    }
    
    // identifier: cv_AKAZE_setNOctaveLayers_int_octaveLayers
    fn set_n_octave_layers(&mut self, octave_layers: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AKAZE_setNOctaveLayers_int_octaveLayers(self.as_raw_AKAZE(), octave_layers) }.into_result()
    }
    
    // identifier: cv_AKAZE_getNOctaveLayers_const
    fn get_n_octave_layers(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AKAZE_getNOctaveLayers_const(self.as_raw_AKAZE()) }.into_result()
    }
    
    // identifier: cv_AKAZE_setDiffusivity_int_diff
    fn set_diffusivity(&mut self, diff: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AKAZE_setDiffusivity_int_diff(self.as_raw_AKAZE(), diff) }.into_result()
    }
    
    // identifier: cv_AKAZE_getDiffusivity_const
    fn get_diffusivity(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AKAZE_getDiffusivity_const(self.as_raw_AKAZE()) }.into_result()
    }
    
    // identifier: cv_AKAZE_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_AKAZE_getDefaultName_const(self.as_raw_AKAZE()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> AKAZE + 'a {

    // identifier: cv_AKAZE_create_int_descriptor_type_int_descriptor_size_int_descriptor_channels_float_threshold_int_nOctaves_int_nOctaveLayers_int_diffusivity
    /// The AKAZE constructor
    /// 
    /// ## Parameters
    /// * descriptor_type: Type of the extracted descriptor: DESCRIPTOR_KAZE,
    /// DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT.
    /// * descriptor_size: Size of the descriptor in bits. 0 -\> Full size
    /// * descriptor_channels: Number of channels in the descriptor (1, 2, 3)
    /// * threshold: Detector response threshold to accept point
    /// * nOctaves: Maximum octave evolution of the image
    /// * nOctaveLayers: Default number of sublevels per scale level
    /// * diffusivity: Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or
    /// DIFF_CHARBONNIER
    ///
    /// ## C++ default parameters:
    /// * descriptor_type: AKAZE::DESCRIPTOR_MLDB
    /// * descriptor_size: 0
    /// * descriptor_channels: 3
    /// * threshold: 0.001f
    /// * n_octaves: 4
    /// * n_octave_layers: 4
    /// * diffusivity: KAZE::DIFF_PM_G2
    pub fn create(descriptor_type: i32, descriptor_size: i32, descriptor_channels: i32, threshold: f32, n_octaves: i32, n_octave_layers: i32, diffusivity: i32) -> Result<types::PtrOfAKAZE> {
        unsafe { sys::cv_core_cv_AKAZE_create_int_descriptor_type_int_descriptor_size_int_descriptor_channels_float_threshold_int_nOctaves_int_nOctaveLayers_int_diffusivity(descriptor_type, descriptor_size, descriptor_channels, threshold, n_octaves, n_octave_layers, diffusivity) }.into_result().map(|x| types::PtrOfAKAZE { ptr: x })
    }
    
}

// Generating impl for trait cv::AffineTransformer (trait)
/// Wrapper class for the OpenCV Affine Transformation algorithm. :
pub trait AffineTransformer : core::ShapeTransformer {
    #[doc(hidden)] fn as_raw_AffineTransformer(&self) -> *mut c_void;
    // identifier: cv_AffineTransformer_setFullAffine_bool_fullAffine
    fn set_full_affine(&mut self, full_affine: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_AffineTransformer_setFullAffine_bool_fullAffine(self.as_raw_AffineTransformer(), full_affine) }.into_result()
    }
    
    // identifier: cv_AffineTransformer_getFullAffine_const
    fn get_full_affine(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_AffineTransformer_getFullAffine_const(self.as_raw_AffineTransformer()) }.into_result()
    }
    
}

impl<'a> AffineTransformer + 'a {

}

// boxed class cv::AffineWarper
/// Affine warper factory class.
/// @sa detail::AffineWarper
#[allow(dead_code)]
pub struct AffineWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::AffineWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_AffineWarper(self.ptr) };
    }
}
impl core::AffineWarper {
    #[doc(hidden)] pub fn as_raw_AffineWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for AffineWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl AffineWarper {

}

// Generating impl for trait cv::AgastFeatureDetector (trait)
/// Wrapping class for feature detection using the AGAST method. :
pub trait AgastFeatureDetector : core::Feature2D {
    #[doc(hidden)] fn as_raw_AgastFeatureDetector(&self) -> *mut c_void;
    // identifier: cv_AgastFeatureDetector_setThreshold_int_threshold
    fn set_threshold(&mut self, threshold: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_setThreshold_int_threshold(self.as_raw_AgastFeatureDetector(), threshold) }.into_result()
    }
    
    // identifier: cv_AgastFeatureDetector_getThreshold_const
    fn get_threshold(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_getThreshold_const(self.as_raw_AgastFeatureDetector()) }.into_result()
    }
    
    // identifier: cv_AgastFeatureDetector_setNonmaxSuppression_bool_f
    fn set_nonmax_suppression(&mut self, f: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_setNonmaxSuppression_bool_f(self.as_raw_AgastFeatureDetector(), f) }.into_result()
    }
    
    // identifier: cv_AgastFeatureDetector_getNonmaxSuppression_const
    fn get_nonmax_suppression(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_getNonmaxSuppression_const(self.as_raw_AgastFeatureDetector()) }.into_result()
    }
    
    // identifier: cv_AgastFeatureDetector_setType_int_type
    fn set_type(&mut self, _type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_setType_int_type(self.as_raw_AgastFeatureDetector(), _type) }.into_result()
    }
    
    // identifier: cv_AgastFeatureDetector_getType_const
    fn get_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_getType_const(self.as_raw_AgastFeatureDetector()) }.into_result()
    }
    
    // identifier: cv_AgastFeatureDetector_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_getDefaultName_const(self.as_raw_AgastFeatureDetector()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> AgastFeatureDetector + 'a {

    // identifier: cv_AgastFeatureDetector_create_int_threshold_bool_nonmaxSuppression_int_type
    ///
    /// ## C++ default parameters:
    /// * threshold: 10
    /// * nonmax_suppression: true
    /// * _type: AgastFeatureDetector::OAST_9_16
    pub fn create(threshold: i32, nonmax_suppression: bool, _type: i32) -> Result<types::PtrOfAgastFeatureDetector> {
        unsafe { sys::cv_core_cv_AgastFeatureDetector_create_int_threshold_bool_nonmaxSuppression_int_type(threshold, nonmax_suppression, _type) }.into_result().map(|x| types::PtrOfAgastFeatureDetector { ptr: x })
    }
    
}

// Generating impl for trait cv::Algorithm (trait)
/// This is a base class for all more or less complex algorithms in OpenCV
/// 
/// especially for classes of algorithms, for which there can be multiple implementations. The examples
/// are stereo correspondence (for which there are algorithms like block matching, semi-global block
/// matching, graph-cut etc.), background subtraction (which can be done using mixture-of-gaussians
/// models, codebook-based algorithm etc.), optical flow (block matching, Lucas-Kanade, Horn-Schunck
/// etc.).
/// 
/// Here is example of SimpleBlobDetector use in your application via Algorithm interface:
/// @snippet snippets/core_various.cpp Algorithm
pub trait Algorithm {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void;
    // identifier: cv_Algorithm_clear
    /// Clears the algorithm state
    fn clear(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Algorithm_clear(self.as_raw_Algorithm()) }.into_result()
    }
    
    // identifier: cv_Algorithm_empty_const
    /// Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
    fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Algorithm_empty_const(self.as_raw_Algorithm()) }.into_result()
    }
    
    // identifier: cv_Algorithm_save_const_String_filename
    /// Saves the algorithm to a file.
    /// In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
    fn save(&self, filename: &str) -> Result<()> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_Algorithm_save_const_String_filename(self.as_raw_Algorithm(), filename.as_ptr()) }.into_result()
    }
    
    // identifier: cv_Algorithm_getDefaultName_const
    /// Returns the algorithm string identifier.
    /// This string is used as top level xml/yml node tag when the object is saved to a file or string.
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_Algorithm_getDefaultName_const(self.as_raw_Algorithm()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> Algorithm + 'a {

}

// Generating impl for trait cv::AlignExposures (trait)
/// The base class for algorithms that align images of the same scene with different exposures
pub trait AlignExposures : core::Algorithm {
    #[doc(hidden)] fn as_raw_AlignExposures(&self) -> *mut c_void;
    // identifier: cv_AlignExposures_process_VectorOfMat_src_VectorOfMat_dst_Mat_times_Mat_response
    /// Aligns images
    /// 
    /// ## Parameters
    /// * src: vector of input images
    /// * dst: vector of aligned images
    /// * times: vector of exposure time values for each image
    /// * response: 256x1 matrix with inverse camera response function for each pixel value, it should
    /// have the same number of channels as images.
    fn process(&mut self, src: &types::VectorOfMat, dst: &types::VectorOfMat, times: &core::Mat, response: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignExposures_process_VectorOfMat_src_VectorOfMat_dst_Mat_times_Mat_response(self.as_raw_AlignExposures(), src.as_raw_VectorOfMat(), dst.as_raw_VectorOfMat(), times.as_raw_Mat(), response.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> AlignExposures + 'a {

}

// Generating impl for trait cv::AlignMTB (trait)
/// This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median
/// luminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations.
/// 
/// It is invariant to exposure, so exposure values and camera response are not necessary.
/// 
/// In this implementation new image regions are filled with zeros.
/// 
/// For more information see @cite GW03 .
pub trait AlignMTB : core::AlignExposures {
    #[doc(hidden)] fn as_raw_AlignMTB(&self) -> *mut c_void;
    // identifier: cv_AlignMTB_process_VectorOfMat_src_VectorOfMat_dst_Mat_times_Mat_response
    fn process_with_response(&mut self, src: &types::VectorOfMat, dst: &types::VectorOfMat, times: &core::Mat, response: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignMTB_process_VectorOfMat_src_VectorOfMat_dst_Mat_times_Mat_response(self.as_raw_AlignMTB(), src.as_raw_VectorOfMat(), dst.as_raw_VectorOfMat(), times.as_raw_Mat(), response.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_AlignMTB_process_VectorOfMat_src_VectorOfMat_dst
    /// Short version of process, that doesn't take extra arguments.
    /// 
    /// ## Parameters
    /// * src: vector of input images
    /// * dst: vector of aligned images
    fn process(&mut self, src: &types::VectorOfMat, dst: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignMTB_process_VectorOfMat_src_VectorOfMat_dst(self.as_raw_AlignMTB(), src.as_raw_VectorOfMat(), dst.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_AlignMTB_calculateShift_Mat_img0_Mat_img1
    /// Calculates shift between two images, i. e. how to shift the second image to correspond it with the
    /// first.
    /// 
    /// ## Parameters
    /// * img0: first image
    /// * img1: second image
    fn calculate_shift(&mut self, img0: &core::Mat, img1: &core::Mat) -> Result<core::Point> {
        unsafe { sys::cv_core_cv_AlignMTB_calculateShift_Mat_img0_Mat_img1(self.as_raw_AlignMTB(), img0.as_raw_Mat(), img1.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_AlignMTB_shiftMat_Mat_src_Mat_dst_Point_shift
    /// Helper function, that shift Mat filling new regions with zeros.
    /// 
    /// ## Parameters
    /// * src: input image
    /// * dst: result image
    /// * shift: shift value
    fn shift_mat(&mut self, src: &core::Mat, dst: &mut core::Mat, shift: core::Point) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignMTB_shiftMat_Mat_src_Mat_dst_Point_shift(self.as_raw_AlignMTB(), src.as_raw_Mat(), dst.as_raw_Mat(), shift) }.into_result()
    }
    
    // identifier: cv_AlignMTB_computeBitmaps_Mat_img_Mat_tb_Mat_eb
    /// Computes median threshold and exclude bitmaps of given image.
    /// 
    /// ## Parameters
    /// * img: input image
    /// * tb: median threshold bitmap
    /// * eb: exclude bitmap
    fn compute_bitmaps(&mut self, img: &core::Mat, tb: &mut core::Mat, eb: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignMTB_computeBitmaps_Mat_img_Mat_tb_Mat_eb(self.as_raw_AlignMTB(), img.as_raw_Mat(), tb.as_raw_Mat(), eb.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_AlignMTB_getMaxBits_const
    fn get_max_bits(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AlignMTB_getMaxBits_const(self.as_raw_AlignMTB()) }.into_result()
    }
    
    // identifier: cv_AlignMTB_setMaxBits_int_max_bits
    fn set_max_bits(&mut self, max_bits: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignMTB_setMaxBits_int_max_bits(self.as_raw_AlignMTB(), max_bits) }.into_result()
    }
    
    // identifier: cv_AlignMTB_getExcludeRange_const
    fn get_exclude_range(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_AlignMTB_getExcludeRange_const(self.as_raw_AlignMTB()) }.into_result()
    }
    
    // identifier: cv_AlignMTB_setExcludeRange_int_exclude_range
    fn set_exclude_range(&mut self, exclude_range: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignMTB_setExcludeRange_int_exclude_range(self.as_raw_AlignMTB(), exclude_range) }.into_result()
    }
    
    // identifier: cv_AlignMTB_getCut_const
    fn get_cut(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_AlignMTB_getCut_const(self.as_raw_AlignMTB()) }.into_result()
    }
    
    // identifier: cv_AlignMTB_setCut_bool_value
    fn set_cut(&mut self, value: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_AlignMTB_setCut_bool_value(self.as_raw_AlignMTB(), value) }.into_result()
    }
    
}

impl<'a> AlignMTB + 'a {

}

// boxed class cv::AutoLock
#[allow(dead_code)]
pub struct AutoLock {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::AutoLock {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_AutoLock(self.ptr) };
    }
}
impl core::AutoLock {
    #[doc(hidden)] pub fn as_raw_AutoLock(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::BFMatcher
/// Brute-force descriptor matcher.
/// 
/// For each descriptor in the first set, this matcher finds the closest descriptor in the second set
/// by trying each one. This descriptor matcher supports masking permissible matches of descriptor
/// sets.
#[allow(dead_code)]
pub struct BFMatcher {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BFMatcher {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BFMatcher(self.ptr) };
    }
}
impl core::BFMatcher {
    #[doc(hidden)] pub fn as_raw_BFMatcher(&self) -> *mut c_void { self.ptr }
}

impl core::DescriptorMatcher for BFMatcher {
    #[doc(hidden)] fn as_raw_DescriptorMatcher(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for BFMatcher {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl BFMatcher {

    // identifier: cv_BFMatcher_BFMatcher_int_normType_bool_crossCheck
    /// Brute-force matcher constructor (obsolete). Please use BFMatcher.create()
    ///
    /// ## C++ default parameters:
    /// * norm_type: NORM_L2
    /// * cross_check: false
    pub fn new(norm_type: i32, cross_check: bool) -> Result<core::BFMatcher> {
        unsafe { sys::cv_core_cv_BFMatcher_BFMatcher_int_normType_bool_crossCheck(norm_type, cross_check) }.into_result().map(|x| core::BFMatcher { ptr: x })
    }
    
    // identifier: cv_BFMatcher_isMaskSupported_const
    pub fn is_mask_supported(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_BFMatcher_isMaskSupported_const(self.as_raw_BFMatcher()) }.into_result()
    }
    
    // identifier: cv_BFMatcher_create_int_normType_bool_crossCheck
    /// Brute-force matcher create method.
    /// ## Parameters
    /// * normType: One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are
    /// preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and
    /// BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor
    /// description).
    /// * crossCheck: If it is false, this is will be default BFMatcher behaviour when it finds the k
    /// nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with
    /// k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the
    /// matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent
    /// pairs. Such technique usually produces best results with minimal number of outliers when there are
    /// enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.
    ///
    /// ## C++ default parameters:
    /// * norm_type: NORM_L2
    /// * cross_check: false
    pub fn create(norm_type: i32, cross_check: bool) -> Result<types::PtrOfBFMatcher> {
        unsafe { sys::cv_core_cv_BFMatcher_create_int_normType_bool_crossCheck(norm_type, cross_check) }.into_result().map(|x| types::PtrOfBFMatcher { ptr: x })
    }
    
    // identifier: cv_BFMatcher_clone_const_bool_emptyTrainData
    ///
    /// ## C++ default parameters:
    /// * empty_train_data: false
    pub fn clone(&self, empty_train_data: bool) -> Result<types::PtrOfDescriptorMatcher> {
        unsafe { sys::cv_core_cv_BFMatcher_clone_const_bool_emptyTrainData(self.as_raw_BFMatcher(), empty_train_data) }.into_result().map(|x| types::PtrOfDescriptorMatcher { ptr: x })
    }
    
}

// boxed class cv::BOWImgDescriptorExtractor
/// Class to compute an image descriptor using the *bag of visual words*.
/// 
/// Such a computation consists of the following steps:
/// 
/// 1.  Compute descriptors for a given image and its keypoints set.
/// 2.  Find the nearest visual words from the vocabulary for each keypoint descriptor.
/// 3.  Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words
/// encountered in the image. The i-th bin of the histogram is a frequency of i-th word of the
/// vocabulary in the given image.
#[allow(dead_code)]
pub struct BOWImgDescriptorExtractor {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BOWImgDescriptorExtractor {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BOWImgDescriptorExtractor(self.ptr) };
    }
}
impl core::BOWImgDescriptorExtractor {
    #[doc(hidden)] pub fn as_raw_BOWImgDescriptorExtractor(&self) -> *mut c_void { self.ptr }
}

impl BOWImgDescriptorExtractor {

    // identifier: cv_BOWImgDescriptorExtractor_BOWImgDescriptorExtractor_PtrOfFeature2D_dextractor_PtrOfDescriptorMatcher_dmatcher
    /// The constructor.
    /// 
    /// ## Parameters
    /// * dextractor: Descriptor extractor that is used to compute descriptors for an input image and
    /// its keypoints.
    /// * dmatcher: Descriptor matcher that is used to find the nearest word of the trained vocabulary
    /// for each keypoint descriptor of the image.
    pub fn new(dextractor: &types::PtrOfFeature2D, dmatcher: &types::PtrOfDescriptorMatcher) -> Result<core::BOWImgDescriptorExtractor> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_BOWImgDescriptorExtractor_PtrOfFeature2D_dextractor_PtrOfDescriptorMatcher_dmatcher(dextractor.as_raw_PtrOfFeature2D(), dmatcher.as_raw_PtrOfDescriptorMatcher()) }.into_result().map(|x| core::BOWImgDescriptorExtractor { ptr: x })
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_BOWImgDescriptorExtractor_PtrOfDescriptorMatcher_dmatcher
    /// @overload
    pub fn new_1(dmatcher: &types::PtrOfDescriptorMatcher) -> Result<core::BOWImgDescriptorExtractor> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_BOWImgDescriptorExtractor_PtrOfDescriptorMatcher_dmatcher(dmatcher.as_raw_PtrOfDescriptorMatcher()) }.into_result().map(|x| core::BOWImgDescriptorExtractor { ptr: x })
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_setVocabulary_Mat_vocabulary
    /// Sets a visual vocabulary.
    /// 
    /// ## Parameters
    /// * vocabulary: Vocabulary (can be trained using the inheritor of BOWTrainer ). Each row of the
    /// vocabulary is a visual word (cluster center).
    pub fn set_vocabulary(&mut self, vocabulary: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_setVocabulary_Mat_vocabulary(self.as_raw_BOWImgDescriptorExtractor(), vocabulary.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_getVocabulary_const
    /// Returns the set vocabulary.
    pub fn get_vocabulary(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_getVocabulary_const(self.as_raw_BOWImgDescriptorExtractor()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_compute_Mat_image_VectorOfKeyPoint_keypoints_Mat_imgDescriptor_VectorOfVectorOfint_pointIdxsOfClusters_Mat_descriptors
    /// Computes an image descriptor using the set visual vocabulary.
    /// 
    /// ## Parameters
    /// * image: Image, for which the descriptor is computed.
    /// * keypoints: Keypoints detected in the input image.
    /// * imgDescriptor: Computed output image descriptor.
    /// * pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that
    /// pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary)
    /// returned if it is non-zero.
    /// * descriptors: Descriptors of the image keypoints that are returned if they are non-zero.
    ///
    /// ## C++ default parameters:
    /// * point_idxs_of_clusters: 0
    /// * descriptors: 0
    pub fn compute_desc(&mut self, image: &core::Mat, keypoints: &types::VectorOfKeyPoint, img_descriptor: &mut core::Mat, point_idxs_of_clusters: &types::VectorOfVectorOfint, descriptors: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_compute_Mat_image_VectorOfKeyPoint_keypoints_Mat_imgDescriptor_VectorOfVectorOfint_pointIdxsOfClusters_Mat_descriptors(self.as_raw_BOWImgDescriptorExtractor(), image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), img_descriptor.as_raw_Mat(), point_idxs_of_clusters.as_raw_VectorOfVectorOfint(), descriptors.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_compute_Mat_keypointDescriptors_Mat_imgDescriptor_VectorOfVectorOfint_pointIdxsOfClusters
    /// @overload
    /// ## Parameters
    /// * keypointDescriptors: Computed descriptors to match with vocabulary.
    /// * imgDescriptor: Computed output image descriptor.
    /// * pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that
    /// pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary)
    /// returned if it is non-zero.
    ///
    /// ## C++ default parameters:
    /// * point_idxs_of_clusters: 0
    pub fn compute(&mut self, keypoint_descriptors: &core::Mat, img_descriptor: &mut core::Mat, point_idxs_of_clusters: &types::VectorOfVectorOfint) -> Result<()> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_compute_Mat_keypointDescriptors_Mat_imgDescriptor_VectorOfVectorOfint_pointIdxsOfClusters(self.as_raw_BOWImgDescriptorExtractor(), keypoint_descriptors.as_raw_Mat(), img_descriptor.as_raw_Mat(), point_idxs_of_clusters.as_raw_VectorOfVectorOfint()) }.into_result()
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_compute2_Mat_image_VectorOfKeyPoint_keypoints_Mat_imgDescriptor
    pub fn compute2(&mut self, image: &core::Mat, keypoints: &types::VectorOfKeyPoint, img_descriptor: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_compute2_Mat_image_VectorOfKeyPoint_keypoints_Mat_imgDescriptor(self.as_raw_BOWImgDescriptorExtractor(), image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), img_descriptor.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_descriptorSize_const
    /// Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.
    pub fn descriptor_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_descriptorSize_const(self.as_raw_BOWImgDescriptorExtractor()) }.into_result()
    }
    
    // identifier: cv_BOWImgDescriptorExtractor_descriptorType_const
    /// Returns an image descriptor type.
    pub fn descriptor_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BOWImgDescriptorExtractor_descriptorType_const(self.as_raw_BOWImgDescriptorExtractor()) }.into_result()
    }
    
}

// boxed class cv::BOWKMeansTrainer
/// kmeans -based class to train visual vocabulary using the *bag of visual words* approach. :
#[allow(dead_code)]
pub struct BOWKMeansTrainer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BOWKMeansTrainer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BOWKMeansTrainer(self.ptr) };
    }
}
impl core::BOWKMeansTrainer {
    #[doc(hidden)] pub fn as_raw_BOWKMeansTrainer(&self) -> *mut c_void { self.ptr }
}

impl core::BOWTrainer for BOWKMeansTrainer {
    #[doc(hidden)] fn as_raw_BOWTrainer(&self) -> *mut c_void { self.ptr }
}

impl BOWKMeansTrainer {

    // identifier: cv_BOWKMeansTrainer_BOWKMeansTrainer_int_clusterCount_TermCriteria_termcrit_int_attempts_int_flags
    /// The constructor.
    /// 
    /// @see cv::kmeans
    ///
    /// ## C++ default parameters:
    /// * termcrit: TermCriteria()
    /// * attempts: 3
    /// * flags: KMEANS_PP_CENTERS
    pub fn new_with_criteria(cluster_count: i32, termcrit: &core::TermCriteria, attempts: i32, flags: i32) -> Result<core::BOWKMeansTrainer> {
        unsafe { sys::cv_core_cv_BOWKMeansTrainer_BOWKMeansTrainer_int_clusterCount_TermCriteria_termcrit_int_attempts_int_flags(cluster_count, termcrit.as_raw_TermCriteria(), attempts, flags) }.into_result().map(|x| core::BOWKMeansTrainer { ptr: x })
    }
    
    // identifier: cv_BOWKMeansTrainer_cluster_const
    pub fn default(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_BOWKMeansTrainer_cluster_const(self.as_raw_BOWKMeansTrainer()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_BOWKMeansTrainer_cluster_const_Mat_descriptors
    pub fn new(&self, descriptors: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_BOWKMeansTrainer_cluster_const_Mat_descriptors(self.as_raw_BOWKMeansTrainer(), descriptors.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// Generating impl for trait cv::BOWTrainer (trait)
/// Abstract base class for training the *bag of visual words* vocabulary from a set of descriptors.
/// 
/// For details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka,
/// Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :
pub trait BOWTrainer {
    #[doc(hidden)] fn as_raw_BOWTrainer(&self) -> *mut c_void;
    // identifier: cv_BOWTrainer_add_Mat_descriptors
    /// Adds descriptors to a training set.
    /// 
    /// ## Parameters
    /// * descriptors: Descriptors to add to a training set. Each row of the descriptors matrix is a
    /// descriptor.
    /// 
    /// The training set is clustered using clustermethod to construct the vocabulary.
    fn add(&mut self, descriptors: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_BOWTrainer_add_Mat_descriptors(self.as_raw_BOWTrainer(), descriptors.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_BOWTrainer_getDescriptors_const
    /// Returns a training set of descriptors.
    fn get_descriptors(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_BOWTrainer_getDescriptors_const(self.as_raw_BOWTrainer()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_BOWTrainer_descriptorsCount_const
    /// Returns the count of all descriptors stored in the training set.
    fn descriptors_count(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BOWTrainer_descriptorsCount_const(self.as_raw_BOWTrainer()) }.into_result()
    }
    
    // identifier: cv_BOWTrainer_clear
    fn clear(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_BOWTrainer_clear(self.as_raw_BOWTrainer()) }.into_result()
    }
    
    // identifier: cv_BOWTrainer_cluster_const
    /// @overload
    fn cluster(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_BOWTrainer_cluster_const(self.as_raw_BOWTrainer()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_BOWTrainer_cluster_const_Mat_descriptors
    /// Clusters train descriptors.
    /// 
    /// ## Parameters
    /// * descriptors: Descriptors to cluster. Each row of the descriptors matrix is a descriptor.
    /// Descriptors are not added to the inner train descriptor set.
    /// 
    /// The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first
    /// variant of the method, train descriptors stored in the object are clustered. In the second variant,
    /// input descriptors are clustered.
    fn cluster_1(&self, descriptors: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_BOWTrainer_cluster_const_Mat_descriptors(self.as_raw_BOWTrainer(), descriptors.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

impl<'a> BOWTrainer + 'a {

}

// boxed class cv::BRISK
/// Class implementing the BRISK keypoint detector and descriptor extractor, described in @cite LCS11 .
#[allow(dead_code)]
pub struct BRISK {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BRISK {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BRISK(self.ptr) };
    }
}
impl core::BRISK {
    #[doc(hidden)] pub fn as_raw_BRISK(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for BRISK {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::Feature2D for BRISK {
    #[doc(hidden)] fn as_raw_Feature2D(&self) -> *mut c_void { self.ptr }
}

impl BRISK {

    // identifier: cv_BRISK_create_int_thresh_int_octaves_float_patternScale
    /// The BRISK constructor
    /// 
    /// ## Parameters
    /// * thresh: AGAST detection threshold score.
    /// * octaves: detection octaves. Use 0 to do single scale.
    /// * patternScale: apply this scale to the pattern used for sampling the neighbourhood of a
    /// keypoint.
    ///
    /// ## C++ default parameters:
    /// * thresh: 30
    /// * octaves: 3
    /// * pattern_scale: 1.0f
    pub fn create(thresh: i32, octaves: i32, pattern_scale: f32) -> Result<types::PtrOfBRISK> {
        unsafe { sys::cv_core_cv_BRISK_create_int_thresh_int_octaves_float_patternScale(thresh, octaves, pattern_scale) }.into_result().map(|x| types::PtrOfBRISK { ptr: x })
    }
    
    // identifier: cv_BRISK_create_VectorOffloat_radiusList_VectorOfint_numberList_float_dMax_float_dMin_VectorOfint_indexChange
    /// The BRISK constructor for a custom pattern
    /// 
    /// ## Parameters
    /// * radiusList: defines the radii (in pixels) where the samples around a keypoint are taken (for
    /// keypoint scale 1).
    /// * numberList: defines the number of sampling points on the sampling circle. Must be the same
    /// size as radiusList..
    /// * dMax: threshold for the short pairings used for descriptor formation (in pixels for keypoint
    /// scale 1).
    /// * dMin: threshold for the long pairings used for orientation determination (in pixels for
    /// keypoint scale 1).
    /// * indexChange: index remapping of the bits.
    ///
    /// ## C++ default parameters:
    /// * d_max: 5.85f
    /// * d_min: 8.2f
    /// * index_change: std::vector<int>()
    pub fn create_1(radius_list: &types::VectorOffloat, number_list: &types::VectorOfint, d_max: f32, d_min: f32, index_change: &types::VectorOfint) -> Result<types::PtrOfBRISK> {
        unsafe { sys::cv_core_cv_BRISK_create_VectorOffloat_radiusList_VectorOfint_numberList_float_dMax_float_dMin_VectorOfint_indexChange(radius_list.as_raw_VectorOffloat(), number_list.as_raw_VectorOfint(), d_max, d_min, index_change.as_raw_VectorOfint()) }.into_result().map(|x| types::PtrOfBRISK { ptr: x })
    }
    
    // identifier: cv_BRISK_create_int_thresh_int_octaves_VectorOffloat_radiusList_VectorOfint_numberList_float_dMax_float_dMin_VectorOfint_indexChange
    /// The BRISK constructor for a custom pattern, detection threshold and octaves
    /// 
    /// ## Parameters
    /// * thresh: AGAST detection threshold score.
    /// * octaves: detection octaves. Use 0 to do single scale.
    /// * radiusList: defines the radii (in pixels) where the samples around a keypoint are taken (for
    /// keypoint scale 1).
    /// * numberList: defines the number of sampling points on the sampling circle. Must be the same
    /// size as radiusList..
    /// * dMax: threshold for the short pairings used for descriptor formation (in pixels for keypoint
    /// scale 1).
    /// * dMin: threshold for the long pairings used for orientation determination (in pixels for
    /// keypoint scale 1).
    /// * indexChange: index remapping of the bits.
    ///
    /// ## C++ default parameters:
    /// * d_max: 5.85f
    /// * d_min: 8.2f
    /// * index_change: std::vector<int>()
    pub fn create_2(thresh: i32, octaves: i32, radius_list: &types::VectorOffloat, number_list: &types::VectorOfint, d_max: f32, d_min: f32, index_change: &types::VectorOfint) -> Result<types::PtrOfBRISK> {
        unsafe { sys::cv_core_cv_BRISK_create_int_thresh_int_octaves_VectorOffloat_radiusList_VectorOfint_numberList_float_dMax_float_dMin_VectorOfint_indexChange(thresh, octaves, radius_list.as_raw_VectorOffloat(), number_list.as_raw_VectorOfint(), d_max, d_min, index_change.as_raw_VectorOfint()) }.into_result().map(|x| types::PtrOfBRISK { ptr: x })
    }
    
    // identifier: cv_BRISK_getDefaultName_const
    pub fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_BRISK_getDefaultName_const(self.as_raw_BRISK()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

// Generating impl for trait cv::BackgroundSubtractor (trait)
/// Base class for background/foreground segmentation. :
/// 
/// The class is only used to define the common interface for the whole family of background/foreground
/// segmentation algorithms.
pub trait BackgroundSubtractor : core::Algorithm {
    #[doc(hidden)] fn as_raw_BackgroundSubtractor(&self) -> *mut c_void;
    // identifier: cv_BackgroundSubtractor_apply_Mat_image_Mat_fgmask_double_learningRate
    /// Computes a foreground mask.
    /// 
    /// ## Parameters
    /// * image: Next video frame.
    /// * fgmask: The output foreground mask as an 8-bit binary image.
    /// * learningRate: The value between 0 and 1 that indicates how fast the background model is
    /// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning
    /// rate. 0 means that the background model is not updated at all, 1 means that the background model
    /// is completely reinitialized from the last frame.
    ///
    /// ## C++ default parameters:
    /// * learning_rate: -1
    fn apply(&mut self, image: &core::Mat, fgmask: &mut core::Mat, learning_rate: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractor_apply_Mat_image_Mat_fgmask_double_learningRate(self.as_raw_BackgroundSubtractor(), image.as_raw_Mat(), fgmask.as_raw_Mat(), learning_rate) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractor_getBackgroundImage_const_Mat_backgroundImage
    /// Computes a background image.
    /// 
    /// ## Parameters
    /// * backgroundImage: The output background image.
    /// 
    /// 
    /// Note: Sometimes the background image can be very blurry, as it contain the average background
    /// statistics.
    fn get_background_image(&self, background_image: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractor_getBackgroundImage_const_Mat_backgroundImage(self.as_raw_BackgroundSubtractor(), background_image.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> BackgroundSubtractor + 'a {

}

// Generating impl for trait cv::BackgroundSubtractorKNN (trait)
/// K-nearest neighbours - based Background/Foreground Segmentation Algorithm.
/// 
/// The class implements the K-nearest neighbours background subtraction described in @cite Zivkovic2006 .
/// Very efficient if number of foreground pixels is low.
pub trait BackgroundSubtractorKNN : core::BackgroundSubtractor {
    #[doc(hidden)] fn as_raw_BackgroundSubtractorKNN(&self) -> *mut c_void;
    // identifier: cv_BackgroundSubtractorKNN_getHistory_const
    /// Returns the number of last frames that affect the background model
    fn get_history(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_getHistory_const(self.as_raw_BackgroundSubtractorKNN()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_setHistory_int_history
    /// Sets the number of last frames that affect the background model
    fn set_history(&mut self, history: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_setHistory_int_history(self.as_raw_BackgroundSubtractorKNN(), history) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_getNSamples_const
    /// Returns the number of data samples in the background model
    fn get_n_samples(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_getNSamples_const(self.as_raw_BackgroundSubtractorKNN()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_setNSamples_int__nN
    /// Sets the number of data samples in the background model.
    /// 
    /// The model needs to be reinitalized to reserve memory.
    fn set_n_samples(&mut self, _n_n: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_setNSamples_int__nN(self.as_raw_BackgroundSubtractorKNN(), _n_n) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_getDist2Threshold_const
    /// Returns the threshold on the squared distance between the pixel and the sample
    /// 
    /// The threshold on the squared distance between the pixel and the sample to decide whether a pixel is
    /// close to a data sample.
    fn get_dist2_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_getDist2Threshold_const(self.as_raw_BackgroundSubtractorKNN()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_setDist2Threshold_double__dist2Threshold
    /// Sets the threshold on the squared distance
    fn set_dist2_threshold(&mut self, _dist2_threshold: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_setDist2Threshold_double__dist2Threshold(self.as_raw_BackgroundSubtractorKNN(), _dist2_threshold) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_getkNNSamples_const
    /// Returns the number of neighbours, the k in the kNN.
    /// 
    /// K is the number of samples that need to be within dist2Threshold in order to decide that that
    /// pixel is matching the kNN background model.
    fn getk_nn_samples(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_getkNNSamples_const(self.as_raw_BackgroundSubtractorKNN()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_setkNNSamples_int__nkNN
    /// Sets the k in the kNN. How many nearest neighbours need to match.
    fn setk_nn_samples(&mut self, _nk_nn: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_setkNNSamples_int__nkNN(self.as_raw_BackgroundSubtractorKNN(), _nk_nn) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_getDetectShadows_const
    /// Returns the shadow detection flag
    /// 
    /// If true, the algorithm detects shadows and marks them. See createBackgroundSubtractorKNN for
    /// details.
    fn get_detect_shadows(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_getDetectShadows_const(self.as_raw_BackgroundSubtractorKNN()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_setDetectShadows_bool_detectShadows
    /// Enables or disables shadow detection
    fn set_detect_shadows(&mut self, detect_shadows: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_setDetectShadows_bool_detectShadows(self.as_raw_BackgroundSubtractorKNN(), detect_shadows) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_getShadowValue_const
    /// Returns the shadow value
    /// 
    /// Shadow value is the value used to mark shadows in the foreground mask. Default value is 127. Value 0
    /// in the mask always means background, 255 means foreground.
    fn get_shadow_value(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_getShadowValue_const(self.as_raw_BackgroundSubtractorKNN()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_setShadowValue_int_value
    /// Sets the shadow value
    fn set_shadow_value(&mut self, value: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_setShadowValue_int_value(self.as_raw_BackgroundSubtractorKNN(), value) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_getShadowThreshold_const
    /// Returns the shadow threshold
    /// 
    /// A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in
    /// the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel
    /// is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara,
    /// *Detecting Moving Shadows...*, IEEE PAMI,2003.
    fn get_shadow_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_getShadowThreshold_const(self.as_raw_BackgroundSubtractorKNN()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorKNN_setShadowThreshold_double_threshold
    /// Sets the shadow threshold
    fn set_shadow_threshold(&mut self, threshold: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorKNN_setShadowThreshold_double_threshold(self.as_raw_BackgroundSubtractorKNN(), threshold) }.into_result()
    }
    
}

impl<'a> BackgroundSubtractorKNN + 'a {

}

// Generating impl for trait cv::BackgroundSubtractorMOG2 (trait)
/// Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
/// 
/// The class implements the Gaussian mixture model background subtraction described in @cite Zivkovic2004
/// and @cite Zivkovic2006 .
pub trait BackgroundSubtractorMOG2 : core::BackgroundSubtractor {
    #[doc(hidden)] fn as_raw_BackgroundSubtractorMOG2(&self) -> *mut c_void;
    // identifier: cv_BackgroundSubtractorMOG2_getHistory_const
    /// Returns the number of last frames that affect the background model
    fn get_history(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getHistory_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setHistory_int_history
    /// Sets the number of last frames that affect the background model
    fn set_history(&mut self, history: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setHistory_int_history(self.as_raw_BackgroundSubtractorMOG2(), history) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getNMixtures_const
    /// Returns the number of gaussian components in the background model
    fn get_n_mixtures(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getNMixtures_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setNMixtures_int_nmixtures
    /// Sets the number of gaussian components in the background model.
    /// 
    /// The model needs to be reinitalized to reserve memory.
    fn set_n_mixtures(&mut self, nmixtures: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setNMixtures_int_nmixtures(self.as_raw_BackgroundSubtractorMOG2(), nmixtures) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getBackgroundRatio_const
    /// Returns the "background ratio" parameter of the algorithm
    /// 
    /// If a foreground pixel keeps semi-constant value for about backgroundRatio\*history frames, it's
    /// considered background and added to the model as a center of a new component. It corresponds to TB
    /// parameter in the paper.
    fn get_background_ratio(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getBackgroundRatio_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setBackgroundRatio_double_ratio
    /// Sets the "background ratio" parameter of the algorithm
    fn set_background_ratio(&mut self, ratio: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setBackgroundRatio_double_ratio(self.as_raw_BackgroundSubtractorMOG2(), ratio) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getVarThreshold_const
    /// Returns the variance threshold for the pixel-model match
    /// 
    /// The main threshold on the squared Mahalanobis distance to decide if the sample is well described by
    /// the background model or not. Related to Cthr from the paper.
    fn get_var_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getVarThreshold_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setVarThreshold_double_varThreshold
    /// Sets the variance threshold for the pixel-model match
    fn set_var_threshold(&mut self, var_threshold: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setVarThreshold_double_varThreshold(self.as_raw_BackgroundSubtractorMOG2(), var_threshold) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getVarThresholdGen_const
    /// Returns the variance threshold for the pixel-model match used for new mixture component generation
    /// 
    /// Threshold for the squared Mahalanobis distance that helps decide when a sample is close to the
    /// existing components (corresponds to Tg in the paper). If a pixel is not close to any component, it
    /// is considered foreground or added as a new component. 3 sigma =\> Tg=3\*3=9 is default. A smaller Tg
    /// value generates more components. A higher Tg value may result in a small number of components but
    /// they can grow too large.
    fn get_var_threshold_gen(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getVarThresholdGen_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setVarThresholdGen_double_varThresholdGen
    /// Sets the variance threshold for the pixel-model match used for new mixture component generation
    fn set_var_threshold_gen(&mut self, var_threshold_gen: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setVarThresholdGen_double_varThresholdGen(self.as_raw_BackgroundSubtractorMOG2(), var_threshold_gen) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getVarInit_const
    /// Returns the initial variance of each gaussian component
    fn get_var_init(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getVarInit_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setVarInit_double_varInit
    /// Sets the initial variance of each gaussian component
    fn set_var_init(&mut self, var_init: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setVarInit_double_varInit(self.as_raw_BackgroundSubtractorMOG2(), var_init) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getVarMin_const
    fn get_var_min(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getVarMin_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setVarMin_double_varMin
    fn set_var_min(&mut self, var_min: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setVarMin_double_varMin(self.as_raw_BackgroundSubtractorMOG2(), var_min) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getVarMax_const
    fn get_var_max(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getVarMax_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setVarMax_double_varMax
    fn set_var_max(&mut self, var_max: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setVarMax_double_varMax(self.as_raw_BackgroundSubtractorMOG2(), var_max) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getComplexityReductionThreshold_const
    /// Returns the complexity reduction threshold
    /// 
    /// This parameter defines the number of samples needed to accept to prove the component exists. CT=0.05
    /// is a default value for all the samples. By setting CT=0 you get an algorithm very similar to the
    /// standard Stauffer&Grimson algorithm.
    fn get_complexity_reduction_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getComplexityReductionThreshold_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setComplexityReductionThreshold_double_ct
    /// Sets the complexity reduction threshold
    fn set_complexity_reduction_threshold(&mut self, ct: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setComplexityReductionThreshold_double_ct(self.as_raw_BackgroundSubtractorMOG2(), ct) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getDetectShadows_const
    /// Returns the shadow detection flag
    /// 
    /// If true, the algorithm detects shadows and marks them. See createBackgroundSubtractorMOG2 for
    /// details.
    fn get_detect_shadows(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getDetectShadows_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setDetectShadows_bool_detectShadows
    /// Enables or disables shadow detection
    fn set_detect_shadows(&mut self, detect_shadows: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setDetectShadows_bool_detectShadows(self.as_raw_BackgroundSubtractorMOG2(), detect_shadows) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getShadowValue_const
    /// Returns the shadow value
    /// 
    /// Shadow value is the value used to mark shadows in the foreground mask. Default value is 127. Value 0
    /// in the mask always means background, 255 means foreground.
    fn get_shadow_value(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getShadowValue_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setShadowValue_int_value
    /// Sets the shadow value
    fn set_shadow_value(&mut self, value: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setShadowValue_int_value(self.as_raw_BackgroundSubtractorMOG2(), value) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_getShadowThreshold_const
    /// Returns the shadow threshold
    /// 
    /// A shadow is detected if pixel is a darker version of the background. The shadow threshold (Tau in
    /// the paper) is a threshold defining how much darker the shadow can be. Tau= 0.5 means that if a pixel
    /// is more than twice darker then it is not shadow. See Prati, Mikic, Trivedi and Cucchiara,
    /// *Detecting Moving Shadows...*, IEEE PAMI,2003.
    fn get_shadow_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_getShadowThreshold_const(self.as_raw_BackgroundSubtractorMOG2()) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_setShadowThreshold_double_threshold
    /// Sets the shadow threshold
    fn set_shadow_threshold(&mut self, threshold: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_setShadowThreshold_double_threshold(self.as_raw_BackgroundSubtractorMOG2(), threshold) }.into_result()
    }
    
    // identifier: cv_BackgroundSubtractorMOG2_apply_Mat_image_Mat_fgmask_double_learningRate
    /// Computes a foreground mask.
    /// 
    /// ## Parameters
    /// * image: Next video frame. Floating point frame will be used without scaling and should be in range <span lang='latex'>[0,255]</span>.
    /// * fgmask: The output foreground mask as an 8-bit binary image.
    /// * learningRate: The value between 0 and 1 that indicates how fast the background model is
    /// learnt. Negative parameter value makes the algorithm to use some automatically chosen learning
    /// rate. 0 means that the background model is not updated at all, 1 means that the background model
    /// is completely reinitialized from the last frame.
    ///
    /// ## C++ default parameters:
    /// * learning_rate: -1
    fn apply(&mut self, image: &core::Mat, fgmask: &mut core::Mat, learning_rate: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_BackgroundSubtractorMOG2_apply_Mat_image_Mat_fgmask_double_learningRate(self.as_raw_BackgroundSubtractorMOG2(), image.as_raw_Mat(), fgmask.as_raw_Mat(), learning_rate) }.into_result()
    }
    
}

impl<'a> BackgroundSubtractorMOG2 + 'a {

}

// Generating impl for trait cv::BaseCascadeClassifier (trait)
pub trait BaseCascadeClassifier : core::Algorithm {
    #[doc(hidden)] fn as_raw_BaseCascadeClassifier(&self) -> *mut c_void;
    // identifier: cv_BaseCascadeClassifier_empty_const
    fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_empty_const(self.as_raw_BaseCascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_load_String_filename
    fn load(&mut self, filename: &str) -> Result<bool> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_load_String_filename(self.as_raw_BaseCascadeClassifier(), filename.as_ptr()) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize
    fn detect_multi_scale(&mut self, image: &core::Mat, objects: &types::VectorOfRect, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize(self.as_raw_BaseCascadeClassifier(), image.as_raw_Mat(), objects.as_raw_VectorOfRect(), scale_factor, min_neighbors, flags, min_size, max_size) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_numDetections_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize
    fn detect_multi_scale_1(&mut self, image: &core::Mat, objects: &types::VectorOfRect, num_detections: &types::VectorOfint, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_numDetections_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize(self.as_raw_BaseCascadeClassifier(), image.as_raw_Mat(), objects.as_raw_VectorOfRect(), num_detections.as_raw_VectorOfint(), scale_factor, min_neighbors, flags, min_size, max_size) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_rejectLevels_VectorOfdouble_levelWeights_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize_bool_outputRejectLevels
    fn detect_multi_scale_2(&mut self, image: &core::Mat, objects: &types::VectorOfRect, reject_levels: &types::VectorOfint, level_weights: &types::VectorOfdouble, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size, output_reject_levels: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_rejectLevels_VectorOfdouble_levelWeights_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize_bool_outputRejectLevels(self.as_raw_BaseCascadeClassifier(), image.as_raw_Mat(), objects.as_raw_VectorOfRect(), reject_levels.as_raw_VectorOfint(), level_weights.as_raw_VectorOfdouble(), scale_factor, min_neighbors, flags, min_size, max_size, output_reject_levels) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_isOldFormatCascade_const
    fn is_old_format_cascade(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_isOldFormatCascade_const(self.as_raw_BaseCascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_getOriginalWindowSize_const
    fn get_original_window_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_getOriginalWindowSize_const(self.as_raw_BaseCascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_getFeatureType_const
    fn get_feature_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_getFeatureType_const(self.as_raw_BaseCascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_getOldCascade
    fn get_old_cascade(&mut self) -> Result<&mut c_void> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_getOldCascade(self.as_raw_BaseCascadeClassifier()) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_BaseCascadeClassifier_setMaskGenerator_PtrOfMaskGenerator_maskGenerator
    fn set_mask_generator(&mut self, mask_generator: &types::PtrOfMaskGenerator) -> Result<()> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_setMaskGenerator_PtrOfMaskGenerator_maskGenerator(self.as_raw_BaseCascadeClassifier(), mask_generator.as_raw_PtrOfMaskGenerator()) }.into_result()
    }
    
    // identifier: cv_BaseCascadeClassifier_getMaskGenerator
    fn get_mask_generator(&mut self) -> Result<types::PtrOfMaskGenerator> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_getMaskGenerator(self.as_raw_BaseCascadeClassifier()) }.into_result().map(|x| types::PtrOfMaskGenerator { ptr: x })
    }
    
}

impl<'a> BaseCascadeClassifier + 'a {

}

// Generating impl for trait cv::BaseCascadeClassifier::MaskGenerator (trait)
pub trait BaseCascadeClassifier_MaskGenerator {
    #[doc(hidden)] fn as_raw_BaseCascadeClassifier_MaskGenerator(&self) -> *mut c_void;
    // identifier: cv_BaseCascadeClassifier_MaskGenerator_generateMask_Mat_src
    fn generate_mask(&mut self, src: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_MaskGenerator_generateMask_Mat_src(self.as_raw_BaseCascadeClassifier_MaskGenerator(), src.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_BaseCascadeClassifier_MaskGenerator_initializeMask_Mat_unnamed_arg
    fn initialize_mask(&mut self, unnamed_arg: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_BaseCascadeClassifier_MaskGenerator_initializeMask_Mat_unnamed_arg(self.as_raw_BaseCascadeClassifier_MaskGenerator(), unnamed_arg.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> BaseCascadeClassifier_MaskGenerator + 'a {

}

// Generating impl for trait cv::BufferPoolController (trait)
pub trait BufferPoolController {
    #[doc(hidden)] fn as_raw_BufferPoolController(&self) -> *mut c_void;
    // identifier: cv_BufferPoolController_getReservedSize_const
    fn get_reserved_size(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_BufferPoolController_getReservedSize_const(self.as_raw_BufferPoolController()) }.into_result()
    }
    
    // identifier: cv_BufferPoolController_getMaxReservedSize_const
    fn get_max_reserved_size(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_BufferPoolController_getMaxReservedSize_const(self.as_raw_BufferPoolController()) }.into_result()
    }
    
    // identifier: cv_BufferPoolController_setMaxReservedSize_size_t_size
    fn set_max_reserved_size(&mut self, size: size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_BufferPoolController_setMaxReservedSize_size_t_size(self.as_raw_BufferPoolController(), size) }.into_result()
    }
    
    // identifier: cv_BufferPoolController_freeAllReservedBuffers
    fn free_all_reserved_buffers(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_BufferPoolController_freeAllReservedBuffers(self.as_raw_BufferPoolController()) }.into_result()
    }
    
}

impl<'a> BufferPoolController + 'a {

}

// Generating impl for trait cv::CLAHE (trait)
/// Base class for Contrast Limited Adaptive Histogram Equalization.
pub trait CLAHE : core::Algorithm {
    #[doc(hidden)] fn as_raw_CLAHE(&self) -> *mut c_void;
    // identifier: cv_CLAHE_apply_Mat_src_Mat_dst
    /// Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization.
    /// 
    /// ## Parameters
    /// * src: Source image of type CV_8UC1 or CV_16UC1.
    /// * dst: Destination image.
    fn apply(&mut self, src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_CLAHE_apply_Mat_src_Mat_dst(self.as_raw_CLAHE(), src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_CLAHE_setClipLimit_double_clipLimit
    /// Sets threshold for contrast limiting.
    /// 
    /// ## Parameters
    /// * clipLimit: threshold value.
    fn set_clip_limit(&mut self, clip_limit: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_CLAHE_setClipLimit_double_clipLimit(self.as_raw_CLAHE(), clip_limit) }.into_result()
    }
    
    // identifier: cv_CLAHE_getClipLimit_const
    fn get_clip_limit(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_CLAHE_getClipLimit_const(self.as_raw_CLAHE()) }.into_result()
    }
    
    // identifier: cv_CLAHE_setTilesGridSize_Size_tileGridSize
    /// Sets size of grid for histogram equalization. Input image will be divided into
    /// equally sized rectangular tiles.
    /// 
    /// ## Parameters
    /// * tileGridSize: defines the number of tiles in row and column.
    fn set_tiles_grid_size(&mut self, tile_grid_size: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_CLAHE_setTilesGridSize_Size_tileGridSize(self.as_raw_CLAHE(), tile_grid_size) }.into_result()
    }
    
    // identifier: cv_CLAHE_getTilesGridSize_const
    fn get_tiles_grid_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_CLAHE_getTilesGridSize_const(self.as_raw_CLAHE()) }.into_result()
    }
    
    // identifier: cv_CLAHE_collectGarbage
    fn collect_garbage(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_CLAHE_collectGarbage(self.as_raw_CLAHE()) }.into_result()
    }
    
}

impl<'a> CLAHE + 'a {

}

// Generating impl for trait cv::CalibrateCRF (trait)
/// The base class for camera response calibration algorithms.
pub trait CalibrateCRF : core::Algorithm {
    #[doc(hidden)] fn as_raw_CalibrateCRF(&self) -> *mut c_void;
    // identifier: cv_CalibrateCRF_process_VectorOfMat_src_Mat_dst_Mat_times
    /// Recovers inverse camera response.
    /// 
    /// ## Parameters
    /// * src: vector of input images
    /// * dst: 256x1 matrix with inverse camera response function
    /// * times: vector of exposure time values for each image
    fn process(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat, times: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_CalibrateCRF_process_VectorOfMat_src_Mat_dst_Mat_times(self.as_raw_CalibrateCRF(), src.as_raw_VectorOfMat(), dst.as_raw_Mat(), times.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> CalibrateCRF + 'a {

}

// Generating impl for trait cv::CalibrateDebevec (trait)
/// Inverse camera response function is extracted for each brightness value by minimizing an objective
/// function as linear system. Objective function is constructed using pixel values on the same position
/// in all images, extra term is added to make the result smoother.
/// 
/// For more information see @cite DM97 .
pub trait CalibrateDebevec : core::CalibrateCRF {
    #[doc(hidden)] fn as_raw_CalibrateDebevec(&self) -> *mut c_void;
    // identifier: cv_CalibrateDebevec_getLambda_const
    fn get_lambda(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_CalibrateDebevec_getLambda_const(self.as_raw_CalibrateDebevec()) }.into_result()
    }
    
    // identifier: cv_CalibrateDebevec_setLambda_float_lambda
    fn set_lambda(&mut self, lambda: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_CalibrateDebevec_setLambda_float_lambda(self.as_raw_CalibrateDebevec(), lambda) }.into_result()
    }
    
    // identifier: cv_CalibrateDebevec_getSamples_const
    fn get_samples(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_CalibrateDebevec_getSamples_const(self.as_raw_CalibrateDebevec()) }.into_result()
    }
    
    // identifier: cv_CalibrateDebevec_setSamples_int_samples
    fn set_samples(&mut self, samples: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_CalibrateDebevec_setSamples_int_samples(self.as_raw_CalibrateDebevec(), samples) }.into_result()
    }
    
    // identifier: cv_CalibrateDebevec_getRandom_const
    fn get_random(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_CalibrateDebevec_getRandom_const(self.as_raw_CalibrateDebevec()) }.into_result()
    }
    
    // identifier: cv_CalibrateDebevec_setRandom_bool_random
    fn set_random(&mut self, random: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_CalibrateDebevec_setRandom_bool_random(self.as_raw_CalibrateDebevec(), random) }.into_result()
    }
    
}

impl<'a> CalibrateDebevec + 'a {

}

// Generating impl for trait cv::CalibrateRobertson (trait)
/// Inverse camera response function is extracted for each brightness value by minimizing an objective
/// function as linear system. This algorithm uses all image pixels.
/// 
/// For more information see @cite RB99 .
pub trait CalibrateRobertson : core::CalibrateCRF {
    #[doc(hidden)] fn as_raw_CalibrateRobertson(&self) -> *mut c_void;
    // identifier: cv_CalibrateRobertson_getMaxIter_const
    fn get_max_iter(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_CalibrateRobertson_getMaxIter_const(self.as_raw_CalibrateRobertson()) }.into_result()
    }
    
    // identifier: cv_CalibrateRobertson_setMaxIter_int_max_iter
    fn set_max_iter(&mut self, max_iter: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_CalibrateRobertson_setMaxIter_int_max_iter(self.as_raw_CalibrateRobertson(), max_iter) }.into_result()
    }
    
    // identifier: cv_CalibrateRobertson_getThreshold_const
    fn get_threshold(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_CalibrateRobertson_getThreshold_const(self.as_raw_CalibrateRobertson()) }.into_result()
    }
    
    // identifier: cv_CalibrateRobertson_setThreshold_float_threshold
    fn set_threshold(&mut self, threshold: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_CalibrateRobertson_setThreshold_float_threshold(self.as_raw_CalibrateRobertson(), threshold) }.into_result()
    }
    
    // identifier: cv_CalibrateRobertson_getRadiance_const
    fn get_radiance(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_CalibrateRobertson_getRadiance_const(self.as_raw_CalibrateRobertson()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

impl<'a> CalibrateRobertson + 'a {

}

// boxed class cv::CascadeClassifier
/// Cascade classifier class for object detection.
#[allow(dead_code)]
pub struct CascadeClassifier {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::CascadeClassifier {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_CascadeClassifier(self.ptr) };
    }
}
impl core::CascadeClassifier {
    #[doc(hidden)] pub fn as_raw_CascadeClassifier(&self) -> *mut c_void { self.ptr }
}

impl CascadeClassifier {

    // identifier: cv_CascadeClassifier_CascadeClassifier
    pub fn default() -> Result<core::CascadeClassifier> {
        unsafe { sys::cv_core_cv_CascadeClassifier_CascadeClassifier() }.into_result().map(|x| core::CascadeClassifier { ptr: x })
    }
    
    // identifier: cv_CascadeClassifier_CascadeClassifier_String_filename
    /// Loads a classifier from a file.
    /// 
    /// ## Parameters
    /// * filename: Name of the file from which the classifier is loaded.
    pub fn new(filename: &str) -> Result<core::CascadeClassifier> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_CascadeClassifier_CascadeClassifier_String_filename(filename.as_ptr()) }.into_result().map(|x| core::CascadeClassifier { ptr: x })
    }
    
    // identifier: cv_CascadeClassifier_empty_const
    /// Checks whether the classifier has been loaded.
    pub fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_CascadeClassifier_empty_const(self.as_raw_CascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_load_String_filename
    /// Loads a classifier from a file.
    /// 
    /// ## Parameters
    /// * filename: Name of the file from which the classifier is loaded. The file may contain an old
    /// HAAR classifier trained by the haartraining application or a new cascade classifier trained by the
    /// traincascade application.
    pub fn load(&mut self, filename: &str) -> Result<bool> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_CascadeClassifier_load_String_filename(self.as_raw_CascadeClassifier(), filename.as_ptr()) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize
    /// Detects objects of different sizes in the input image. The detected objects are returned as a list
    /// of rectangles.
    /// 
    /// ## Parameters
    /// * image: Matrix of the type CV_8U containing an image where objects are detected.
    /// * objects: Vector of rectangles where each rectangle contains the detected object, the
    /// rectangles may be partially outside the original image.
    /// * scaleFactor: Parameter specifying how much the image size is reduced at each image scale.
    /// * minNeighbors: Parameter specifying how many neighbors each candidate rectangle should have
    /// to retain it.
    /// * flags: Parameter with the same meaning for an old cascade as in the function
    /// cvHaarDetectObjects. It is not used for a new cascade.
    /// * minSize: Minimum possible object size. Objects smaller than that are ignored.
    /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale.
    /// 
    /// The function is parallelized with the TBB library.
    /// 
    /// 
    /// Note:
    /// *   (Python) A face detection example using cascade classifiers can be found at
    /// opencv_source_code/samples/python/facedetect.py
    ///
    /// ## C++ default parameters:
    /// * scale_factor: 1.1
    /// * min_neighbors: 3
    /// * flags: 0
    /// * min_size: Size()
    /// * max_size: Size()
    pub fn detect_multi_scale(&mut self, image: &core::Mat, objects: &types::VectorOfRect, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_CascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize(self.as_raw_CascadeClassifier(), image.as_raw_Mat(), objects.as_raw_VectorOfRect(), scale_factor, min_neighbors, flags, min_size, max_size) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_numDetections_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize
    /// @overload
    /// ## Parameters
    /// * image: Matrix of the type CV_8U containing an image where objects are detected.
    /// * objects: Vector of rectangles where each rectangle contains the detected object, the
    /// rectangles may be partially outside the original image.
    /// * numDetections: Vector of detection numbers for the corresponding objects. An object's number
    /// of detections is the number of neighboring positively classified rectangles that were joined
    /// together to form the object.
    /// * scaleFactor: Parameter specifying how much the image size is reduced at each image scale.
    /// * minNeighbors: Parameter specifying how many neighbors each candidate rectangle should have
    /// to retain it.
    /// * flags: Parameter with the same meaning for an old cascade as in the function
    /// cvHaarDetectObjects. It is not used for a new cascade.
    /// * minSize: Minimum possible object size. Objects smaller than that are ignored.
    /// * maxSize: Maximum possible object size. Objects larger than that are ignored. If `maxSize == minSize` model is evaluated on single scale.
    ///
    /// ## C++ default parameters:
    /// * scale_factor: 1.1
    /// * min_neighbors: 3
    /// * flags: 0
    /// * min_size: Size()
    /// * max_size: Size()
    pub fn detect_multi_scale_num(&mut self, image: &core::Mat, objects: &types::VectorOfRect, num_detections: &types::VectorOfint, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_CascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_numDetections_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize(self.as_raw_CascadeClassifier(), image.as_raw_Mat(), objects.as_raw_VectorOfRect(), num_detections.as_raw_VectorOfint(), scale_factor, min_neighbors, flags, min_size, max_size) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_rejectLevels_VectorOfdouble_levelWeights_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize_bool_outputRejectLevels
    /// @overload
    /// This function allows you to retrieve the final stage decision certainty of classification.
    /// For this, one needs to set `outputRejectLevels` on true and provide the `rejectLevels` and `levelWeights` parameter.
    /// For each resulting detection, `levelWeights` will then contain the certainty of classification at the final stage.
    /// This value can then be used to separate strong from weaker classifications.
    /// 
    /// A code sample on how to use it efficiently can be found below:
    /// ```ignore
    /// Mat img;
    /// vector<double> weights;
    /// vector<int> levels;
    /// vector<Rect> detections;
    /// CascadeClassifier model("/path/to/your/model.xml");
    /// model.detectMultiScale(img, detections, levels, weights, 1.1, 3, 0, Size(), Size(), true);
    /// cerr << "Detection " << detections[0] << " with weight " << weights[0] << endl;
    /// ```
    ///
    /// ## C++ default parameters:
    /// * scale_factor: 1.1
    /// * min_neighbors: 3
    /// * flags: 0
    /// * min_size: Size()
    /// * max_size: Size()
    /// * output_reject_levels: false
    pub fn detect_multi_scale_levels(&mut self, image: &core::Mat, objects: &types::VectorOfRect, reject_levels: &types::VectorOfint, level_weights: &types::VectorOfdouble, scale_factor: f64, min_neighbors: i32, flags: i32, min_size: core::Size, max_size: core::Size, output_reject_levels: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_CascadeClassifier_detectMultiScale_Mat_image_VectorOfRect_objects_VectorOfint_rejectLevels_VectorOfdouble_levelWeights_double_scaleFactor_int_minNeighbors_int_flags_Size_minSize_Size_maxSize_bool_outputRejectLevels(self.as_raw_CascadeClassifier(), image.as_raw_Mat(), objects.as_raw_VectorOfRect(), reject_levels.as_raw_VectorOfint(), level_weights.as_raw_VectorOfdouble(), scale_factor, min_neighbors, flags, min_size, max_size, output_reject_levels) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_isOldFormatCascade_const
    pub fn is_old_format_cascade(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_CascadeClassifier_isOldFormatCascade_const(self.as_raw_CascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_getOriginalWindowSize_const
    pub fn get_original_window_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_CascadeClassifier_getOriginalWindowSize_const(self.as_raw_CascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_getFeatureType_const
    pub fn get_feature_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_CascadeClassifier_getFeatureType_const(self.as_raw_CascadeClassifier()) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_getOldCascade
    pub fn get_old_cascade(&mut self) -> Result<&mut c_void> {
        unsafe { sys::cv_core_cv_CascadeClassifier_getOldCascade(self.as_raw_CascadeClassifier()) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_CascadeClassifier_convert_String_oldcascade_String_newcascade
    pub fn convert(oldcascade: &str, newcascade: &str) -> Result<bool> {
        string_arg!(oldcascade);
        string_arg!(newcascade);
        unsafe { sys::cv_core_cv_CascadeClassifier_convert_String_oldcascade_String_newcascade(oldcascade.as_ptr(), newcascade.as_ptr()) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_setMaskGenerator_PtrOfMaskGenerator_maskGenerator
    pub fn set_mask_generator(&mut self, mask_generator: &types::PtrOfMaskGenerator) -> Result<()> {
        unsafe { sys::cv_core_cv_CascadeClassifier_setMaskGenerator_PtrOfMaskGenerator_maskGenerator(self.as_raw_CascadeClassifier(), mask_generator.as_raw_PtrOfMaskGenerator()) }.into_result()
    }
    
    // identifier: cv_CascadeClassifier_getMaskGenerator
    pub fn get_mask_generator(&mut self) -> Result<types::PtrOfMaskGenerator> {
        unsafe { sys::cv_core_cv_CascadeClassifier_getMaskGenerator(self.as_raw_CascadeClassifier()) }.into_result().map(|x| types::PtrOfMaskGenerator { ptr: x })
    }
    
}

// boxed class cv::ChiHistogramCostExtractor
/// An Chi based cost extraction. :
#[allow(dead_code)]
pub struct ChiHistogramCostExtractor {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ChiHistogramCostExtractor {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ChiHistogramCostExtractor(self.ptr) };
    }
}
impl core::ChiHistogramCostExtractor {
    #[doc(hidden)] pub fn as_raw_ChiHistogramCostExtractor(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ChiHistogramCostExtractor {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::HistogramCostExtractor for ChiHistogramCostExtractor {
    #[doc(hidden)] fn as_raw_HistogramCostExtractor(&self) -> *mut c_void { self.ptr }
}

impl CirclesGridFinderParameters {

}

impl CirclesGridFinderParameters2 {

    // identifier: cv_CirclesGridFinderParameters2_CirclesGridFinderParameters2
    pub fn new() -> Result<core::CirclesGridFinderParameters2> {
        unsafe { sys::cv_core_cv_CirclesGridFinderParameters2_CirclesGridFinderParameters2() }.into_result()
    }
    
}

// boxed class cv::CommandLineParser
/// Designed for command line parsing
/// 
/// The sample below demonstrates how to use CommandLineParser:
/// ```ignore
/// CommandLineParser parser(argc, argv, keys);
/// parser.about("Application name v1.0.0");
/// 
/// if (parser.has("help"))
/// {
/// parser.printMessage();
/// return 0;
/// }
/// 
/// int N = parser.get<int>("N");
/// double fps = parser.get<double>("fps");
/// String path = parser.get<String>("path");
/// 
/// use_time_stamp = parser.has("timestamp");
/// 
/// String img1 = parser.get<String>(0);
/// String img2 = parser.get<String>(1);
/// 
/// int repeat = parser.get<int>(2);
/// 
/// if (!parser.check())
/// {
/// parser.printErrors();
/// return 0;
/// }
/// ```
/// 
/// 
/// ### Keys syntax
/// 
/// The keys parameter is a string containing several blocks, each one is enclosed in curly braces and
/// describes one argument. Each argument contains three parts separated by the `|` symbol:
/// 
/// -# argument names is a space-separated list of option synonyms (to mark argument as positional, prefix it with the `@` symbol)
/// -# default value will be used if the argument was not provided (can be empty)
/// -# help message (can be empty)
/// 
/// For example:
/// 
/// ```ignore{.cpp}
/// const String keys =
/// "{help h usage ? |      | print this message   }"
/// "{@image1        |      | image1 for compare   }"
/// "{@image2        |<none>| image2 for compare   }"
/// "{@repeat        |1     | number               }"
/// "{path           |.     | path to file         }"
/// "{fps            | -1.0 | fps for output video }"
/// "{N count        |100   | count of objects     }"
/// "{ts timestamp   |      | use time stamp       }"
/// ;
/// }
/// ```
/// 
/// 
/// Note that there are no default values for `help` and `timestamp` so we can check their presence using the `has()` method.
/// Arguments with default values are considered to be always present. Use the `get()` method in these cases to check their
/// actual value instead.
/// 
/// String keys like `get<String>("@image1")` return the empty string `""` by default - even with an empty default value.
/// Use the special `<none>` default value to enforce that the returned string must not be empty. (like in `get<String>("@image2")`)
/// 
/// ### Usage
/// 
/// For the described keys:
/// 
/// ```ignore{.sh}
/// # Good call (3 positional parameters: image1, image2 and repeat; N is 200, ts is true)
/// $ ./app -N=200 1.png 2.jpg 19 -ts
/// 
/// # Bad call
/// $ ./app -fps=aaa
/// ERRORS:
/// Parameter 'fps': can not convert: [aaa] to [double]
/// ```
#[allow(dead_code)]
pub struct CommandLineParser {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::CommandLineParser {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_CommandLineParser(self.ptr) };
    }
}
impl core::CommandLineParser {
    #[doc(hidden)] pub fn as_raw_CommandLineParser(&self) -> *mut c_void { self.ptr }
}

impl CommandLineParser {

    // identifier: cv_CommandLineParser_CommandLineParser_CommandLineParser_parser
    /// Copy constructor
    pub fn new(parser: &core::CommandLineParser) -> Result<core::CommandLineParser> {
        unsafe { sys::cv_core_cv_CommandLineParser_CommandLineParser_CommandLineParser_parser(parser.as_raw_CommandLineParser()) }.into_result().map(|x| core::CommandLineParser { ptr: x })
    }
    
    // identifier: cv_CommandLineParser_getPathToApplication_const
    /// Returns application path
    /// 
    /// This method returns the path to the executable from the command line (`argv[0]`).
    /// 
    /// For example, if the application has been started with such a command:
    /// ```ignore{.sh}
    /// $ ./bin/my-executable
    /// ```
    /// 
    /// this method will return `./bin`.
    pub fn get_path_to_application(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_CommandLineParser_getPathToApplication_const(self.as_raw_CommandLineParser()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
    // identifier: cv_CommandLineParser_has_const_String_name
    /// Check if field was provided in the command line
    /// 
    /// ## Parameters
    /// * name: argument name to check
    pub fn has(&self, name: &str) -> Result<bool> {
        string_arg!(name);
        unsafe { sys::cv_core_cv_CommandLineParser_has_const_String_name(self.as_raw_CommandLineParser(), name.as_ptr()) }.into_result()
    }
    
    // identifier: cv_CommandLineParser_check_const
    /// Check for parsing errors
    /// 
    /// Returns false if error occurred while accessing the parameters (bad conversion, missing arguments,
    /// etc.). Call @ref printErrors to print error messages list.
    pub fn check(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_CommandLineParser_check_const(self.as_raw_CommandLineParser()) }.into_result()
    }
    
    // identifier: cv_CommandLineParser_about_String_message
    /// Set the about message
    /// 
    /// The about message will be shown when @ref printMessage is called, right before arguments table.
    pub fn about(&mut self, message: &str) -> Result<()> {
        string_arg!(message);
        unsafe { sys::cv_core_cv_CommandLineParser_about_String_message(self.as_raw_CommandLineParser(), message.as_ptr()) }.into_result()
    }
    
    // identifier: cv_CommandLineParser_printMessage_const
    /// Print help message
    /// 
    /// This method will print standard help message containing the about message and arguments description.
    /// 
    /// @sa about
    pub fn print_message(&self) -> Result<()> {
        unsafe { sys::cv_core_cv_CommandLineParser_printMessage_const(self.as_raw_CommandLineParser()) }.into_result()
    }
    
    // identifier: cv_CommandLineParser_printErrors_const
    /// Print list of errors occurred
    /// 
    /// @sa check
    pub fn print_errors(&self) -> Result<()> {
        unsafe { sys::cv_core_cv_CommandLineParser_printErrors_const(self.as_raw_CommandLineParser()) }.into_result()
    }
    
}

// boxed class cv::CompressedRectilinearPortraitWarper
#[allow(dead_code)]
pub struct CompressedRectilinearPortraitWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::CompressedRectilinearPortraitWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_CompressedRectilinearPortraitWarper(self.ptr) };
    }
}
impl core::CompressedRectilinearPortraitWarper {
    #[doc(hidden)] pub fn as_raw_CompressedRectilinearPortraitWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for CompressedRectilinearPortraitWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl CompressedRectilinearPortraitWarper {

    // identifier: cv_CompressedRectilinearPortraitWarper_CompressedRectilinearPortraitWarper_float_A_float_B
    ///
    /// ## C++ default parameters:
    /// * a: 1
    /// * b: 1
    pub fn new(a: f32, b: f32) -> Result<core::CompressedRectilinearPortraitWarper> {
        unsafe { sys::cv_core_cv_CompressedRectilinearPortraitWarper_CompressedRectilinearPortraitWarper_float_A_float_B(a, b) }.into_result().map(|x| core::CompressedRectilinearPortraitWarper { ptr: x })
    }
    
}

// boxed class cv::CompressedRectilinearWarper
#[allow(dead_code)]
pub struct CompressedRectilinearWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::CompressedRectilinearWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_CompressedRectilinearWarper(self.ptr) };
    }
}
impl core::CompressedRectilinearWarper {
    #[doc(hidden)] pub fn as_raw_CompressedRectilinearWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for CompressedRectilinearWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl CompressedRectilinearWarper {

    // identifier: cv_CompressedRectilinearWarper_CompressedRectilinearWarper_float_A_float_B
    ///
    /// ## C++ default parameters:
    /// * a: 1
    /// * b: 1
    pub fn new(a: f32, b: f32) -> Result<core::CompressedRectilinearWarper> {
        unsafe { sys::cv_core_cv_CompressedRectilinearWarper_CompressedRectilinearWarper_float_A_float_B(a, b) }.into_result().map(|x| core::CompressedRectilinearWarper { ptr: x })
    }
    
}

// boxed class cv::ConjGradSolver
/// This class is used to perform the non-linear non-constrained minimization of a function
/// with known gradient,
/// 
/// defined on an *n*-dimensional Euclidean space, using the **Nonlinear Conjugate Gradient method**.
/// The implementation was done based on the beautifully clear explanatory article [An Introduction to
/// the Conjugate Gradient Method Without the Agonizing
/// Pain](http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf) by Jonathan Richard
/// Shewchuk. The method can be seen as an adaptation of a standard Conjugate Gradient method (see, for
/// example <http://en.wikipedia.org/wiki/Conjugate_gradient_method>) for numerically solving the
/// systems of linear equations.
/// 
/// It should be noted, that this method, although deterministic, is rather a heuristic method and
/// therefore may converge to a local minima, not necessary a global one. What is even more disastrous,
/// most of its behaviour is ruled by gradient, therefore it essentially cannot distinguish between
/// local minima and maxima. Therefore, if it starts sufficiently near to the local maximum, it may
/// converge to it. Another obvious restriction is that it should be possible to compute the gradient of
/// a function at any point, thus it is preferable to have analytic expression for gradient and
/// computational burden should be born by the user.
/// 
/// The latter responsibility is accompilished via the getGradient method of a
/// MinProblemSolver::Function interface (which represents function being optimized). This method takes
/// point a point in *n*-dimensional space (first argument represents the array of coordinates of that
/// point) and comput its gradient (it should be stored in the second argument as an array).
/// 
/// 
/// Note: class ConjGradSolver thus does not add any new methods to the basic MinProblemSolver interface.
/// 
/// 
/// Note: term criteria should meet following condition:
/// ```ignore
/// termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) && termcrit.epsilon > 0 && termcrit.maxCount > 0
/// // or
/// termcrit.type == TermCriteria::MAX_ITER) && termcrit.maxCount > 0
/// ```
#[allow(dead_code)]
pub struct ConjGradSolver {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ConjGradSolver {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ConjGradSolver(self.ptr) };
    }
}
impl core::ConjGradSolver {
    #[doc(hidden)] pub fn as_raw_ConjGradSolver(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ConjGradSolver {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::MinProblemSolver for ConjGradSolver {
    #[doc(hidden)] fn as_raw_MinProblemSolver(&self) -> *mut c_void { self.ptr }
}

impl ConjGradSolver {

    // identifier: cv_ConjGradSolver_create_PtrOfFunction_f_TermCriteria_termcrit
    /// This function returns the reference to the ready-to-use ConjGradSolver object.
    /// 
    /// All the parameters are optional, so this procedure can be called even without parameters at
    /// all. In this case, the default values will be used. As default value for terminal criteria are
    /// the only sensible ones, MinProblemSolver::setFunction() should be called upon the obtained
    /// object, if the function was not given to create(). Otherwise, the two ways (submit it to
    /// create() or miss it out and call the MinProblemSolver::setFunction()) are absolutely equivalent
    /// (and will drop the same errors in the same way, should invalid input be detected).
    /// ## Parameters
    /// * f: Pointer to the function that will be minimized, similarly to the one you submit via
    /// MinProblemSolver::setFunction.
    /// * termcrit: Terminal criteria to the algorithm, similarly to the one you submit via
    /// MinProblemSolver::setTermCriteria.
    ///
    /// ## C++ default parameters:
    /// * f: Ptr<ConjGradSolver::Function>()
    /// * termcrit: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5000,0.000001)
    pub fn create(f: &types::PtrOfFunction, termcrit: &core::TermCriteria) -> Result<types::PtrOfConjGradSolver> {
        unsafe { sys::cv_core_cv_ConjGradSolver_create_PtrOfFunction_f_TermCriteria_termcrit(f.as_raw_PtrOfFunction(), termcrit.as_raw_TermCriteria()) }.into_result().map(|x| types::PtrOfConjGradSolver { ptr: x })
    }
    
}

// boxed class cv::CylindricalWarper
/// Cylindrical warper factory class.
/// @sa detail::CylindricalWarper
#[allow(dead_code)]
pub struct CylindricalWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::CylindricalWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_CylindricalWarper(self.ptr) };
    }
}
impl core::CylindricalWarper {
    #[doc(hidden)] pub fn as_raw_CylindricalWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for CylindricalWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl CylindricalWarper {

}

impl DMatch {

    // identifier: cv_DMatch_DMatch
    pub fn default() -> Result<core::DMatch> {
        unsafe { sys::cv_core_cv_DMatch_DMatch() }.into_result()
    }
    
    // identifier: cv_DMatch_DMatch_int__queryIdx_int__trainIdx_float__distance
    pub fn new(_query_idx: i32, _train_idx: i32, _distance: f32) -> Result<core::DMatch> {
        unsafe { sys::cv_core_cv_DMatch_DMatch_int__queryIdx_int__trainIdx_float__distance(_query_idx, _train_idx, _distance) }.into_result()
    }
    
    // identifier: cv_DMatch_DMatch_int__queryIdx_int__trainIdx_int__imgIdx_float__distance
    pub fn new_index(_query_idx: i32, _train_idx: i32, _img_idx: i32, _distance: f32) -> Result<core::DMatch> {
        unsafe { sys::cv_core_cv_DMatch_DMatch_int__queryIdx_int__trainIdx_int__imgIdx_float__distance(_query_idx, _train_idx, _img_idx, _distance) }.into_result()
    }
    
}

// Generating impl for trait cv::DenseOpticalFlow (trait)
pub trait DenseOpticalFlow : core::Algorithm {
    #[doc(hidden)] fn as_raw_DenseOpticalFlow(&self) -> *mut c_void;
    // identifier: cv_DenseOpticalFlow_calc_Mat_I0_Mat_I1_Mat_flow
    /// Calculates an optical flow.
    /// 
    /// ## Parameters
    /// * I0: first 8-bit single-channel input image.
    /// * I1: second input image of the same size and the same type as prev.
    /// * flow: computed flow image that has the same size as prev and type CV_32FC2.
    fn calc(&mut self, i0: &core::Mat, i1: &core::Mat, flow: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_DenseOpticalFlow_calc_Mat_I0_Mat_I1_Mat_flow(self.as_raw_DenseOpticalFlow(), i0.as_raw_Mat(), i1.as_raw_Mat(), flow.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_DenseOpticalFlow_collectGarbage
    /// Releases all inner buffers.
    fn collect_garbage(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_DenseOpticalFlow_collectGarbage(self.as_raw_DenseOpticalFlow()) }.into_result()
    }
    
}

impl<'a> DenseOpticalFlow + 'a {

}

// Generating impl for trait cv::DescriptorMatcher (trait)
/// Abstract base class for matching keypoint descriptors.
/// 
/// It has two groups of match methods: for matching descriptors of an image with another image or with
/// an image set.
pub trait DescriptorMatcher : core::Algorithm {
    #[doc(hidden)] fn as_raw_DescriptorMatcher(&self) -> *mut c_void;
    // identifier: cv_DescriptorMatcher_add_VectorOfMat_descriptors
    /// Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor
    /// collection.
    /// 
    /// If the collection is not empty, the new descriptors are added to existing train descriptors.
    /// 
    /// ## Parameters
    /// * descriptors: Descriptors to add. Each descriptors[i] is a set of descriptors from the same
    /// train image.
    fn add(&mut self, descriptors: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_add_VectorOfMat_descriptors(self.as_raw_DescriptorMatcher(), descriptors.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_getTrainDescriptors_const
    /// Returns a constant link to the train descriptor collection trainDescCollection .
    fn get_train_descriptors(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_getTrainDescriptors_const(self.as_raw_DescriptorMatcher()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_DescriptorMatcher_clear
    /// Clears the train descriptor collections.
    fn clear(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_clear(self.as_raw_DescriptorMatcher()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_empty_const
    /// Returns true if there are no train descriptors in the both collections.
    fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_empty_const(self.as_raw_DescriptorMatcher()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_isMaskSupported_const
    /// Returns true if the descriptor matcher supports masking permissible matches.
    fn is_mask_supported(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_isMaskSupported_const(self.as_raw_DescriptorMatcher()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_train
    /// Trains a descriptor matcher
    /// 
    /// Trains a descriptor matcher (for example, the flann index). In all methods to match, the method
    /// train() is run every time before matching. Some descriptor matchers (for example, BruteForceMatcher)
    /// have an empty implementation of this method. Other matchers really train their inner structures (for
    /// example, FlannBasedMatcher trains flann::Index ).
    fn train(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_train(self.as_raw_DescriptorMatcher()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_match_const_Mat_queryDescriptors_Mat_trainDescriptors_VectorOfDMatch_matches_Mat_mask
    /// Finds the best match for each descriptor from a query set.
    /// 
    /// ## Parameters
    /// * queryDescriptors: Query set of descriptors.
    /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors
    /// collection stored in the class object.
    /// * matches: Matches. If a query descriptor is masked out in mask , no match is added for this
    /// descriptor. So, matches size may be smaller than the query descriptors count.
    /// * mask: Mask specifying permissible matches between an input query and train matrices of
    /// descriptors.
    /// 
    /// In the first variant of this method, the train descriptors are passed as an input argument. In the
    /// second variant of the method, train descriptors collection that was set by DescriptorMatcher::add is
    /// used. Optional mask (or masks) can be passed to specify which query and training descriptors can be
    /// matched. Namely, queryDescriptors[i] can be matched with trainDescriptors[j] only if
    /// mask.at\<uchar\>(i,j) is non-zero.
    ///
    /// ## C++ default parameters:
    /// * mask: noArray()
    fn train_matches(&self, query_descriptors: &core::Mat, train_descriptors: &core::Mat, matches: &types::VectorOfDMatch, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_match_const_Mat_queryDescriptors_Mat_trainDescriptors_VectorOfDMatch_matches_Mat_mask(self.as_raw_DescriptorMatcher(), query_descriptors.as_raw_Mat(), train_descriptors.as_raw_Mat(), matches.as_raw_VectorOfDMatch(), mask.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_knnMatch_const_Mat_queryDescriptors_Mat_trainDescriptors_VectorOfVectorOfDMatch_matches_int_k_Mat_mask_bool_compactResult
    /// Finds the k best matches for each descriptor from a query set.
    /// 
    /// ## Parameters
    /// * queryDescriptors: Query set of descriptors.
    /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors
    /// collection stored in the class object.
    /// * mask: Mask specifying permissible matches between an input query and train matrices of
    /// descriptors.
    /// * matches: Matches. Each matches[i] is k or less matches for the same query descriptor.
    /// * k: Count of best matches found per each query descriptor or less if a query descriptor has
    /// less than k possible matches in total.
    /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is
    /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
    /// the matches vector does not contain matches for fully masked-out query descriptors.
    /// 
    /// These extended variants of DescriptorMatcher::match methods find several best matches for each query
    /// descriptor. The matches are returned in the distance increasing order. See DescriptorMatcher::match
    /// for the details about query and train descriptors.
    ///
    /// ## C++ default parameters:
    /// * mask: noArray()
    /// * compact_result: false
    fn knn_train_matches(&self, query_descriptors: &core::Mat, train_descriptors: &core::Mat, matches: &types::VectorOfVectorOfDMatch, k: i32, mask: &core::Mat, compact_result: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_knnMatch_const_Mat_queryDescriptors_Mat_trainDescriptors_VectorOfVectorOfDMatch_matches_int_k_Mat_mask_bool_compactResult(self.as_raw_DescriptorMatcher(), query_descriptors.as_raw_Mat(), train_descriptors.as_raw_Mat(), matches.as_raw_VectorOfVectorOfDMatch(), k, mask.as_raw_Mat(), compact_result) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_radiusMatch_const_Mat_queryDescriptors_Mat_trainDescriptors_VectorOfVectorOfDMatch_matches_float_maxDistance_Mat_mask_bool_compactResult
    /// For each query descriptor, finds the training descriptors not farther than the specified distance.
    /// 
    /// ## Parameters
    /// * queryDescriptors: Query set of descriptors.
    /// * trainDescriptors: Train set of descriptors. This set is not added to the train descriptors
    /// collection stored in the class object.
    /// * matches: Found matches.
    /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is
    /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
    /// the matches vector does not contain matches for fully masked-out query descriptors.
    /// * maxDistance: Threshold for the distance between matched descriptors. Distance means here
    /// metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured
    /// in Pixels)!
    /// * mask: Mask specifying permissible matches between an input query and train matrices of
    /// descriptors.
    /// 
    /// For each query descriptor, the methods find such training descriptors that the distance between the
    /// query descriptor and the training descriptor is equal or smaller than maxDistance. Found matches are
    /// returned in the distance increasing order.
    ///
    /// ## C++ default parameters:
    /// * mask: noArray()
    /// * compact_result: false
    fn train_radius_matches(&self, query_descriptors: &core::Mat, train_descriptors: &core::Mat, matches: &types::VectorOfVectorOfDMatch, max_distance: f32, mask: &core::Mat, compact_result: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_radiusMatch_const_Mat_queryDescriptors_Mat_trainDescriptors_VectorOfVectorOfDMatch_matches_float_maxDistance_Mat_mask_bool_compactResult(self.as_raw_DescriptorMatcher(), query_descriptors.as_raw_Mat(), train_descriptors.as_raw_Mat(), matches.as_raw_VectorOfVectorOfDMatch(), max_distance, mask.as_raw_Mat(), compact_result) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_match_Mat_queryDescriptors_VectorOfDMatch_matches_VectorOfMat_masks
    /// @overload
    /// ## Parameters
    /// * queryDescriptors: Query set of descriptors.
    /// * matches: Matches. If a query descriptor is masked out in mask , no match is added for this
    /// descriptor. So, matches size may be smaller than the query descriptors count.
    /// * masks: Set of masks. Each masks[i] specifies permissible matches between the input query
    /// descriptors and stored train descriptors from the i-th image trainDescCollection[i].
    ///
    /// ## C++ default parameters:
    /// * masks: noArray()
    fn matches(&mut self, query_descriptors: &core::Mat, matches: &types::VectorOfDMatch, masks: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_match_Mat_queryDescriptors_VectorOfDMatch_matches_VectorOfMat_masks(self.as_raw_DescriptorMatcher(), query_descriptors.as_raw_Mat(), matches.as_raw_VectorOfDMatch(), masks.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_knnMatch_Mat_queryDescriptors_VectorOfVectorOfDMatch_matches_int_k_VectorOfMat_masks_bool_compactResult
    /// @overload
    /// ## Parameters
    /// * queryDescriptors: Query set of descriptors.
    /// * matches: Matches. Each matches[i] is k or less matches for the same query descriptor.
    /// * k: Count of best matches found per each query descriptor or less if a query descriptor has
    /// less than k possible matches in total.
    /// * masks: Set of masks. Each masks[i] specifies permissible matches between the input query
    /// descriptors and stored train descriptors from the i-th image trainDescCollection[i].
    /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is
    /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
    /// the matches vector does not contain matches for fully masked-out query descriptors.
    ///
    /// ## C++ default parameters:
    /// * masks: noArray()
    /// * compact_result: false
    fn knn_matches(&mut self, query_descriptors: &core::Mat, matches: &types::VectorOfVectorOfDMatch, k: i32, masks: &types::VectorOfMat, compact_result: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_knnMatch_Mat_queryDescriptors_VectorOfVectorOfDMatch_matches_int_k_VectorOfMat_masks_bool_compactResult(self.as_raw_DescriptorMatcher(), query_descriptors.as_raw_Mat(), matches.as_raw_VectorOfVectorOfDMatch(), k, masks.as_raw_VectorOfMat(), compact_result) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_radiusMatch_Mat_queryDescriptors_VectorOfVectorOfDMatch_matches_float_maxDistance_VectorOfMat_masks_bool_compactResult
    /// @overload
    /// ## Parameters
    /// * queryDescriptors: Query set of descriptors.
    /// * matches: Found matches.
    /// * maxDistance: Threshold for the distance between matched descriptors. Distance means here
    /// metric distance (e.g. Hamming distance), not the distance between coordinates (which is measured
    /// in Pixels)!
    /// * masks: Set of masks. Each masks[i] specifies permissible matches between the input query
    /// descriptors and stored train descriptors from the i-th image trainDescCollection[i].
    /// * compactResult: Parameter used when the mask (or masks) is not empty. If compactResult is
    /// false, the matches vector has the same size as queryDescriptors rows. If compactResult is true,
    /// the matches vector does not contain matches for fully masked-out query descriptors.
    ///
    /// ## C++ default parameters:
    /// * masks: noArray()
    /// * compact_result: false
    fn radius_matches(&mut self, query_descriptors: &core::Mat, matches: &types::VectorOfVectorOfDMatch, max_distance: f32, masks: &types::VectorOfMat, compact_result: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_radiusMatch_Mat_queryDescriptors_VectorOfVectorOfDMatch_matches_float_maxDistance_VectorOfMat_masks_bool_compactResult(self.as_raw_DescriptorMatcher(), query_descriptors.as_raw_Mat(), matches.as_raw_VectorOfVectorOfDMatch(), max_distance, masks.as_raw_VectorOfMat(), compact_result) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_write_const_String_fileName
    fn write(&self, file_name: &str) -> Result<()> {
        string_arg!(file_name);
        unsafe { sys::cv_core_cv_DescriptorMatcher_write_const_String_fileName(self.as_raw_DescriptorMatcher(), file_name.as_ptr()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_read_String_fileName
    fn read(&mut self, file_name: &str) -> Result<()> {
        string_arg!(file_name);
        unsafe { sys::cv_core_cv_DescriptorMatcher_read_String_fileName(self.as_raw_DescriptorMatcher(), file_name.as_ptr()) }.into_result()
    }
    
    // identifier: cv_DescriptorMatcher_clone_const_bool_emptyTrainData
    /// Clones the matcher.
    /// 
    /// ## Parameters
    /// * emptyTrainData: If emptyTrainData is false, the method creates a deep copy of the object,
    /// that is, copies both parameters and train data. If emptyTrainData is true, the method creates an
    /// object copy with the current parameters but with empty train data.
    ///
    /// ## C++ default parameters:
    /// * empty_train_data: false
    fn clone(&self, empty_train_data: bool) -> Result<types::PtrOfDescriptorMatcher> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_clone_const_bool_emptyTrainData(self.as_raw_DescriptorMatcher(), empty_train_data) }.into_result().map(|x| types::PtrOfDescriptorMatcher { ptr: x })
    }
    
}

impl<'a> DescriptorMatcher + 'a {

    // identifier: cv_DescriptorMatcher_create_String_descriptorMatcherType
    /// Creates a descriptor matcher of a given type with the default parameters (using default
    /// constructor).
    /// 
    /// ## Parameters
    /// * descriptorMatcherType: Descriptor matcher type. Now the following matcher types are
    /// supported:
    /// *   `BruteForce` (it uses L2 )
    /// *   `BruteForce-L1`
    /// *   `BruteForce-Hamming`
    /// *   `BruteForce-Hamming(2)`
    /// *   `FlannBased`
    pub fn create(descriptor_matcher_type: &str) -> Result<types::PtrOfDescriptorMatcher> {
        string_arg!(descriptor_matcher_type);
        unsafe { sys::cv_core_cv_DescriptorMatcher_create_String_descriptorMatcherType(descriptor_matcher_type.as_ptr()) }.into_result().map(|x| types::PtrOfDescriptorMatcher { ptr: x })
    }
    
    // identifier: cv_DescriptorMatcher_create_int_matcherType
    pub fn create_1(matcher_type: i32) -> Result<types::PtrOfDescriptorMatcher> {
        unsafe { sys::cv_core_cv_DescriptorMatcher_create_int_matcherType(matcher_type) }.into_result().map(|x| types::PtrOfDescriptorMatcher { ptr: x })
    }
    
}

// boxed class cv::DetectionBasedTracker
#[allow(dead_code)]
pub struct DetectionBasedTracker {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DetectionBasedTracker {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DetectionBasedTracker(self.ptr) };
    }
}
impl core::DetectionBasedTracker {
    #[doc(hidden)] pub fn as_raw_DetectionBasedTracker(&self) -> *mut c_void { self.ptr }
}

impl DetectionBasedTracker {

    // identifier: cv_DetectionBasedTracker_run
    pub fn run(&mut self) -> Result<bool> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_run(self.as_raw_DetectionBasedTracker()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_stop
    pub fn stop(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_stop(self.as_raw_DetectionBasedTracker()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_resetTracking
    pub fn reset_tracking(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_resetTracking(self.as_raw_DetectionBasedTracker()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_process_Mat_imageGray
    pub fn process(&mut self, image_gray: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_process_Mat_imageGray(self.as_raw_DetectionBasedTracker(), image_gray.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_setParameters_Parameters_params
    pub fn set_parameters(&mut self, params: &core::DetectionBasedTracker_Parameters) -> Result<bool> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_setParameters_Parameters_params(self.as_raw_DetectionBasedTracker(), params.as_raw_DetectionBasedTracker_Parameters()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_getParameters_const
    pub fn get_parameters(&self) -> Result<core::DetectionBasedTracker_Parameters> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_getParameters_const(self.as_raw_DetectionBasedTracker()) }.into_result().map(|x| core::DetectionBasedTracker_Parameters { ptr: x })
    }
    
    // identifier: cv_DetectionBasedTracker_getObjects_const_VectorOfRect_result
    pub fn get_objects(&self, result: &types::VectorOfRect) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_getObjects_const_VectorOfRect_result(self.as_raw_DetectionBasedTracker(), result.as_raw_VectorOfRect()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_getObjects_const_VectorOfExtObject_result
    pub fn get_objects_1(&self, result: &types::VectorOfExtObject) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_getObjects_const_VectorOfExtObject_result(self.as_raw_DetectionBasedTracker(), result.as_raw_VectorOfExtObject()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_addObject_Rect_location
    pub fn add_object(&mut self, location: core::Rect) -> Result<i32> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_addObject_Rect_location(self.as_raw_DetectionBasedTracker(), location) }.into_result()
    }
    
}

// boxed class cv::DetectionBasedTracker::ExtObject
#[allow(dead_code)]
pub struct DetectionBasedTracker_ExtObject {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DetectionBasedTracker_ExtObject {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DetectionBasedTracker_ExtObject(self.ptr) };
    }
}
impl core::DetectionBasedTracker_ExtObject {
    #[doc(hidden)] pub fn as_raw_DetectionBasedTracker_ExtObject(&self) -> *mut c_void { self.ptr }
}

// Generating impl for trait cv::DetectionBasedTracker::IDetector (trait)
pub trait DetectionBasedTracker_IDetector {
    #[doc(hidden)] fn as_raw_DetectionBasedTracker_IDetector(&self) -> *mut c_void;
    // identifier: cv_DetectionBasedTracker_IDetector_detect_Mat_image_VectorOfRect_objects
    fn detect(&mut self, image: &core::Mat, objects: &types::VectorOfRect) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_detect_Mat_image_VectorOfRect_objects(self.as_raw_DetectionBasedTracker_IDetector(), image.as_raw_Mat(), objects.as_raw_VectorOfRect()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_setMinObjectSize_Size_min
    fn set_min_object_size(&mut self, min: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_setMinObjectSize_Size_min(self.as_raw_DetectionBasedTracker_IDetector(), min) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_setMaxObjectSize_Size_max
    fn set_max_object_size(&mut self, max: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_setMaxObjectSize_Size_max(self.as_raw_DetectionBasedTracker_IDetector(), max) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_getMinObjectSize_const
    fn get_min_object_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_getMinObjectSize_const(self.as_raw_DetectionBasedTracker_IDetector()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_getMaxObjectSize_const
    fn get_max_object_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_getMaxObjectSize_const(self.as_raw_DetectionBasedTracker_IDetector()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_getScaleFactor
    fn get_scale_factor(&mut self) -> Result<f32> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_getScaleFactor(self.as_raw_DetectionBasedTracker_IDetector()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_setScaleFactor_float_value
    fn set_scale_factor(&mut self, value: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_setScaleFactor_float_value(self.as_raw_DetectionBasedTracker_IDetector(), value) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_getMinNeighbours
    fn get_min_neighbours(&mut self) -> Result<i32> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_getMinNeighbours(self.as_raw_DetectionBasedTracker_IDetector()) }.into_result()
    }
    
    // identifier: cv_DetectionBasedTracker_IDetector_setMinNeighbours_int_value
    fn set_min_neighbours(&mut self, value: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_IDetector_setMinNeighbours_int_value(self.as_raw_DetectionBasedTracker_IDetector(), value) }.into_result()
    }
    
}

impl<'a> DetectionBasedTracker_IDetector + 'a {

}

// boxed class cv::DetectionBasedTracker::Parameters
#[allow(dead_code)]
pub struct DetectionBasedTracker_Parameters {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DetectionBasedTracker_Parameters {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DetectionBasedTracker_Parameters(self.ptr) };
    }
}
impl core::DetectionBasedTracker_Parameters {
    #[doc(hidden)] pub fn as_raw_DetectionBasedTracker_Parameters(&self) -> *mut c_void { self.ptr }
}

impl DetectionBasedTracker_Parameters {

    // identifier: cv_DetectionBasedTracker_Parameters_Parameters
    pub fn new() -> Result<core::DetectionBasedTracker_Parameters> {
        unsafe { sys::cv_core_cv_DetectionBasedTracker_Parameters_Parameters() }.into_result().map(|x| core::DetectionBasedTracker_Parameters { ptr: x })
    }
    
}

// boxed class cv::DetectionROI
#[allow(dead_code)]
pub struct DetectionROI {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DetectionROI {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DetectionROI(self.ptr) };
    }
}
impl core::DetectionROI {
    #[doc(hidden)] pub fn as_raw_DetectionROI(&self) -> *mut c_void { self.ptr }
}

// Generating impl for trait cv::DownhillSolver (trait)
/// This class is used to perform the non-linear non-constrained minimization of a function,
/// 
/// defined on an `n`-dimensional Euclidean space, using the **Nelder-Mead method**, also known as
/// **downhill simplex method**. The basic idea about the method can be obtained from
/// <http://en.wikipedia.org/wiki/Nelder-Mead_method>.
/// 
/// It should be noted, that this method, although deterministic, is rather a heuristic and therefore
/// may converge to a local minima, not necessary a global one. It is iterative optimization technique,
/// which at each step uses an information about the values of a function evaluated only at `n+1`
/// points, arranged as a *simplex* in `n`-dimensional space (hence the second name of the method). At
/// each step new point is chosen to evaluate function at, obtained value is compared with previous
/// ones and based on this information simplex changes it's shape , slowly moving to the local minimum.
/// Thus this method is using *only* function values to make decision, on contrary to, say, Nonlinear
/// Conjugate Gradient method (which is also implemented in optim).
/// 
/// Algorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when the
/// function values at the vertices of simplex are within termcrit.epsilon range or simplex becomes so
/// small that it can enclosed in a box with termcrit.epsilon sides, whatever comes first, for some
/// defined by user positive integer termcrit.maxCount and positive non-integer termcrit.epsilon.
/// 
/// 
/// Note: DownhillSolver is a derivative of the abstract interface
/// cv::MinProblemSolver, which in turn is derived from the Algorithm interface and is used to
/// encapsulate the functionality, common to all non-linear optimization algorithms in the optim
/// module.
/// 
/// 
/// Note: term criteria should meet following condition:
/// ```ignore
/// termcrit.type == (TermCriteria::MAX_ITER + TermCriteria::EPS) && termcrit.epsilon > 0 && termcrit.maxCount > 0
/// ```
pub trait DownhillSolver : core::MinProblemSolver {
    #[doc(hidden)] fn as_raw_DownhillSolver(&self) -> *mut c_void;
    // identifier: cv_DownhillSolver_getInitStep_const_Mat_step
    /// Returns the initial step that will be used in downhill simplex algorithm.
    /// 
    /// ## Parameters
    /// * step: Initial step that will be used in algorithm. Note, that although corresponding setter
    /// accepts column-vectors as well as row-vectors, this method will return a row-vector.
    /// @see DownhillSolver::setInitStep
    fn get_init_step(&self, step: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_DownhillSolver_getInitStep_const_Mat_step(self.as_raw_DownhillSolver(), step.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_DownhillSolver_setInitStep_Mat_step
    /// Sets the initial step that will be used in downhill simplex algorithm.
    /// 
    /// Step, together with initial point (givin in DownhillSolver::minimize) are two `n`-dimensional
    /// vectors that are used to determine the shape of initial simplex. Roughly said, initial point
    /// determines the position of a simplex (it will become simplex's centroid), while step determines the
    /// spread (size in each dimension) of a simplex. To be more precise, if <span lang='latex'>s,x_0\in\mathbb{R}^n</span> are
    /// the initial step and initial point respectively, the vertices of a simplex will be:
    /// <span lang='latex'>v_0:=x_0-\frac{1}{2} s</span> and <span lang='latex'>v_i:=x_0+s_i</span> for <span lang='latex'>i=1,2,\dots,n</span> where <span lang='latex'>s_i</span> denotes
    /// projections of the initial step of *n*-th coordinate (the result of projection is treated to be
    /// vector given by <span lang='latex'>s_i:=e_i\cdot\left<e_i\cdot s\right></span>, where <span lang='latex'>e_i</span> form canonical basis)
    /// 
    /// ## Parameters
    /// * step: Initial step that will be used in algorithm. Roughly said, it determines the spread
    /// (size in each dimension) of an initial simplex.
    fn set_init_step(&mut self, step: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_DownhillSolver_setInitStep_Mat_step(self.as_raw_DownhillSolver(), step.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> DownhillSolver + 'a {

    // identifier: cv_DownhillSolver_create_PtrOfFunction_f_Mat_initStep_TermCriteria_termcrit
    /// This function returns the reference to the ready-to-use DownhillSolver object.
    /// 
    /// All the parameters are optional, so this procedure can be called even without parameters at
    /// all. In this case, the default values will be used. As default value for terminal criteria are
    /// the only sensible ones, MinProblemSolver::setFunction() and DownhillSolver::setInitStep()
    /// should be called upon the obtained object, if the respective parameters were not given to
    /// create(). Otherwise, the two ways (give parameters to createDownhillSolver() or miss them out
    /// and call the MinProblemSolver::setFunction() and DownhillSolver::setInitStep()) are absolutely
    /// equivalent (and will drop the same errors in the same way, should invalid input be detected).
    /// ## Parameters
    /// * f: Pointer to the function that will be minimized, similarly to the one you submit via
    /// MinProblemSolver::setFunction.
    /// * initStep: Initial step, that will be used to construct the initial simplex, similarly to the one
    /// you submit via MinProblemSolver::setInitStep.
    /// * termcrit: Terminal criteria to the algorithm, similarly to the one you submit via
    /// MinProblemSolver::setTermCriteria.
    ///
    /// ## C++ default parameters:
    /// * f: Ptr<MinProblemSolver::Function>()
    /// * init_step: Mat_<double>(1,1,0.0)
    /// * termcrit: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5000,0.000001)
    pub fn create(f: &types::PtrOfFunction, init_step: &core::Mat, termcrit: &core::TermCriteria) -> Result<types::PtrOfDownhillSolver> {
        unsafe { sys::cv_core_cv_DownhillSolver_create_PtrOfFunction_f_Mat_initStep_TermCriteria_termcrit(f.as_raw_PtrOfFunction(), init_step.as_raw_Mat(), termcrit.as_raw_TermCriteria()) }.into_result().map(|x| types::PtrOfDownhillSolver { ptr: x })
    }
    
}

// boxed class cv::DrawMatchesFlags
/// \
///                                   Drawing functions                                    *
#[allow(dead_code)]
pub struct DrawMatchesFlags {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DrawMatchesFlags {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DrawMatchesFlags(self.ptr) };
    }
}
impl core::DrawMatchesFlags {
    #[doc(hidden)] pub fn as_raw_DrawMatchesFlags(&self) -> *mut c_void { self.ptr }
}

// Generating impl for trait cv::DualTVL1OpticalFlow (trait)
/// "Dual TV L1" Optical Flow Algorithm.
/// 
/// The class implements the "Dual TV L1" optical flow algorithm described in @cite Zach2007 and
/// @cite Javier2012 .
/// Here are important members of the class that control the algorithm, which you can set after
/// constructing the class instance:
/// 
/// *   member double tau
/// Time step of the numerical scheme.
/// 
/// *   member double lambda
/// Weight parameter for the data term, attachment parameter. This is the most relevant
/// parameter, which determines the smoothness of the output. The smaller this parameter is,
/// the smoother the solutions we obtain. It depends on the range of motions of the images, so
/// its value should be adapted to each image sequence.
/// 
/// *   member double theta
/// Weight parameter for (u - v)\^2, tightness parameter. It serves as a link between the
/// attachment and the regularization terms. In theory, it should have a small value in order
/// to maintain both parts in correspondence. The method is stable for a large range of values
/// of this parameter.
/// 
/// *   member int nscales
/// Number of scales used to create the pyramid of images.
/// 
/// *   member int warps
/// Number of warpings per scale. Represents the number of times that I1(x+u0) and grad(
/// I1(x+u0) ) are computed per scale. This is a parameter that assures the stability of the
/// method. It also affects the running time, so it is a compromise between speed and
/// accuracy.
/// 
/// *   member double epsilon
/// Stopping criterion threshold used in the numerical scheme, which is a trade-off between
/// precision and running time. A small value will yield more accurate solutions at the
/// expense of a slower convergence.
/// 
/// *   member int iterations
/// Stopping criterion iterations number used in the numerical scheme.
/// 
/// C. Zach, T. Pock and H. Bischof, "A Duality Based Approach for Realtime TV-L1 Optical Flow".
/// Javier Sanchez, Enric Meinhardt-Llopis and Gabriele Facciolo. "TV-L1 Optical Flow Estimation".
pub trait DualTVL1OpticalFlow : core::DenseOpticalFlow {
    #[doc(hidden)] fn as_raw_DualTVL1OpticalFlow(&self) -> *mut c_void;
    // identifier: cv_DualTVL1OpticalFlow_getTau_const
    /// @see setTau
    fn get_tau(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getTau_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setTau_double_val
    /// @copybrief getTau @see getTau
    fn set_tau(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setTau_double_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getLambda_const
    /// @see setLambda
    fn get_lambda(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getLambda_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setLambda_double_val
    /// @copybrief getLambda @see getLambda
    fn set_lambda(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setLambda_double_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getTheta_const
    /// @see setTheta
    fn get_theta(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getTheta_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setTheta_double_val
    /// @copybrief getTheta @see getTheta
    fn set_theta(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setTheta_double_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getGamma_const
    /// @see setGamma
    fn get_gamma(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getGamma_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setGamma_double_val
    /// @copybrief getGamma @see getGamma
    fn set_gamma(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setGamma_double_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getScalesNumber_const
    /// @see setScalesNumber
    fn get_scales_number(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getScalesNumber_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setScalesNumber_int_val
    /// @copybrief getScalesNumber @see getScalesNumber
    fn set_scales_number(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setScalesNumber_int_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getWarpingsNumber_const
    /// @see setWarpingsNumber
    fn get_warpings_number(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getWarpingsNumber_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setWarpingsNumber_int_val
    /// @copybrief getWarpingsNumber @see getWarpingsNumber
    fn set_warpings_number(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setWarpingsNumber_int_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getEpsilon_const
    /// @see setEpsilon
    fn get_epsilon(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getEpsilon_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setEpsilon_double_val
    /// @copybrief getEpsilon @see getEpsilon
    fn set_epsilon(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setEpsilon_double_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getInnerIterations_const
    /// @see setInnerIterations
    fn get_inner_iterations(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getInnerIterations_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setInnerIterations_int_val
    /// @copybrief getInnerIterations @see getInnerIterations
    fn set_inner_iterations(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setInnerIterations_int_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getOuterIterations_const
    /// @see setOuterIterations
    fn get_outer_iterations(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getOuterIterations_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setOuterIterations_int_val
    /// @copybrief getOuterIterations @see getOuterIterations
    fn set_outer_iterations(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setOuterIterations_int_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getUseInitialFlow_const
    /// @see setUseInitialFlow
    fn get_use_initial_flow(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getUseInitialFlow_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setUseInitialFlow_bool_val
    /// @copybrief getUseInitialFlow @see getUseInitialFlow
    fn set_use_initial_flow(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setUseInitialFlow_bool_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getScaleStep_const
    /// @see setScaleStep
    fn get_scale_step(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getScaleStep_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setScaleStep_double_val
    /// @copybrief getScaleStep @see getScaleStep
    fn set_scale_step(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setScaleStep_double_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_getMedianFiltering_const
    /// @see setMedianFiltering
    fn get_median_filtering(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_getMedianFiltering_const(self.as_raw_DualTVL1OpticalFlow()) }.into_result()
    }
    
    // identifier: cv_DualTVL1OpticalFlow_setMedianFiltering_int_val
    /// @copybrief getMedianFiltering @see getMedianFiltering
    fn set_median_filtering(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_setMedianFiltering_int_val(self.as_raw_DualTVL1OpticalFlow(), val) }.into_result()
    }
    
}

impl<'a> DualTVL1OpticalFlow + 'a {

    // identifier: cv_DualTVL1OpticalFlow_create_double_tau_double_lambda_double_theta_int_nscales_int_warps_double_epsilon_int_innnerIterations_int_outerIterations_double_scaleStep_double_gamma_int_medianFiltering_bool_useInitialFlow
    /// Creates instance of cv::DualTVL1OpticalFlow
    ///
    /// ## C++ default parameters:
    /// * tau: 0.25
    /// * lambda: 0.15
    /// * theta: 0.3
    /// * nscales: 5
    /// * warps: 5
    /// * epsilon: 0.01
    /// * innner_iterations: 30
    /// * outer_iterations: 10
    /// * scale_step: 0.8
    /// * gamma: 0.0
    /// * median_filtering: 5
    /// * use_initial_flow: false
    pub fn create(tau: f64, lambda: f64, theta: f64, nscales: i32, warps: i32, epsilon: f64, innner_iterations: i32, outer_iterations: i32, scale_step: f64, gamma: f64, median_filtering: i32, use_initial_flow: bool) -> Result<types::PtrOfDualTVL1OpticalFlow> {
        unsafe { sys::cv_core_cv_DualTVL1OpticalFlow_create_double_tau_double_lambda_double_theta_int_nscales_int_warps_double_epsilon_int_innnerIterations_int_outerIterations_double_scaleStep_double_gamma_int_medianFiltering_bool_useInitialFlow(tau, lambda, theta, nscales, warps, epsilon, innner_iterations, outer_iterations, scale_step, gamma, median_filtering, use_initial_flow) }.into_result().map(|x| types::PtrOfDualTVL1OpticalFlow { ptr: x })
    }
    
}

// Generating impl for trait cv::EMDHistogramCostExtractor (trait)
/// An EMD based cost extraction. :
pub trait EMDHistogramCostExtractor : core::HistogramCostExtractor {
    #[doc(hidden)] fn as_raw_EMDHistogramCostExtractor(&self) -> *mut c_void;
    // identifier: cv_EMDHistogramCostExtractor_setNormFlag_int_flag
    fn set_norm_flag(&mut self, flag: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_EMDHistogramCostExtractor_setNormFlag_int_flag(self.as_raw_EMDHistogramCostExtractor(), flag) }.into_result()
    }
    
    // identifier: cv_EMDHistogramCostExtractor_getNormFlag_const
    fn get_norm_flag(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_EMDHistogramCostExtractor_getNormFlag_const(self.as_raw_EMDHistogramCostExtractor()) }.into_result()
    }
    
}

impl<'a> EMDHistogramCostExtractor + 'a {

}

// boxed class cv::EMDL1HistogramCostExtractor
/// An EMD-L1 based cost extraction. :
#[allow(dead_code)]
pub struct EMDL1HistogramCostExtractor {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::EMDL1HistogramCostExtractor {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_EMDL1HistogramCostExtractor(self.ptr) };
    }
}
impl core::EMDL1HistogramCostExtractor {
    #[doc(hidden)] pub fn as_raw_EMDL1HistogramCostExtractor(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for EMDL1HistogramCostExtractor {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::HistogramCostExtractor for EMDL1HistogramCostExtractor {
    #[doc(hidden)] fn as_raw_HistogramCostExtractor(&self) -> *mut c_void { self.ptr }
}

// Generating impl for trait cv::FarnebackOpticalFlow (trait)
/// Class computing a dense optical flow using the Gunnar Farneback's algorithm.
pub trait FarnebackOpticalFlow : core::DenseOpticalFlow {
    #[doc(hidden)] fn as_raw_FarnebackOpticalFlow(&self) -> *mut c_void;
    // identifier: cv_FarnebackOpticalFlow_getNumLevels_const
    fn get_num_levels(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getNumLevels_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setNumLevels_int_numLevels
    fn set_num_levels(&mut self, num_levels: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setNumLevels_int_numLevels(self.as_raw_FarnebackOpticalFlow(), num_levels) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_getPyrScale_const
    fn get_pyr_scale(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getPyrScale_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setPyrScale_double_pyrScale
    fn set_pyr_scale(&mut self, pyr_scale: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setPyrScale_double_pyrScale(self.as_raw_FarnebackOpticalFlow(), pyr_scale) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_getFastPyramids_const
    fn get_fast_pyramids(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getFastPyramids_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setFastPyramids_bool_fastPyramids
    fn set_fast_pyramids(&mut self, fast_pyramids: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setFastPyramids_bool_fastPyramids(self.as_raw_FarnebackOpticalFlow(), fast_pyramids) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_getWinSize_const
    fn get_win_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getWinSize_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setWinSize_int_winSize
    fn set_win_size(&mut self, win_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setWinSize_int_winSize(self.as_raw_FarnebackOpticalFlow(), win_size) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_getNumIters_const
    fn get_num_iters(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getNumIters_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setNumIters_int_numIters
    fn set_num_iters(&mut self, num_iters: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setNumIters_int_numIters(self.as_raw_FarnebackOpticalFlow(), num_iters) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_getPolyN_const
    fn get_poly_n(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getPolyN_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setPolyN_int_polyN
    fn set_poly_n(&mut self, poly_n: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setPolyN_int_polyN(self.as_raw_FarnebackOpticalFlow(), poly_n) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_getPolySigma_const
    fn get_poly_sigma(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getPolySigma_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setPolySigma_double_polySigma
    fn set_poly_sigma(&mut self, poly_sigma: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setPolySigma_double_polySigma(self.as_raw_FarnebackOpticalFlow(), poly_sigma) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_getFlags_const
    fn get_flags(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_getFlags_const(self.as_raw_FarnebackOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_FarnebackOpticalFlow_setFlags_int_flags
    fn set_flags(&mut self, flags: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_setFlags_int_flags(self.as_raw_FarnebackOpticalFlow(), flags) }.into_result()
    }
    
}

impl<'a> FarnebackOpticalFlow + 'a {

    // identifier: cv_FarnebackOpticalFlow_create_int_numLevels_double_pyrScale_bool_fastPyramids_int_winSize_int_numIters_int_polyN_double_polySigma_int_flags
    ///
    /// ## C++ default parameters:
    /// * num_levels: 5
    /// * pyr_scale: 0.5
    /// * fast_pyramids: false
    /// * win_size: 13
    /// * num_iters: 10
    /// * poly_n: 5
    /// * poly_sigma: 1.1
    /// * flags: 0
    pub fn create(num_levels: i32, pyr_scale: f64, fast_pyramids: bool, win_size: i32, num_iters: i32, poly_n: i32, poly_sigma: f64, flags: i32) -> Result<types::PtrOfFarnebackOpticalFlow> {
        unsafe { sys::cv_core_cv_FarnebackOpticalFlow_create_int_numLevels_double_pyrScale_bool_fastPyramids_int_winSize_int_numIters_int_polyN_double_polySigma_int_flags(num_levels, pyr_scale, fast_pyramids, win_size, num_iters, poly_n, poly_sigma, flags) }.into_result().map(|x| types::PtrOfFarnebackOpticalFlow { ptr: x })
    }
    
}

// Generating impl for trait cv::FastFeatureDetector (trait)
/// Wrapping class for feature detection using the FAST method. :
pub trait FastFeatureDetector : core::Feature2D {
    #[doc(hidden)] fn as_raw_FastFeatureDetector(&self) -> *mut c_void;
    // identifier: cv_FastFeatureDetector_setThreshold_int_threshold
    fn set_threshold(&mut self, threshold: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_setThreshold_int_threshold(self.as_raw_FastFeatureDetector(), threshold) }.into_result()
    }
    
    // identifier: cv_FastFeatureDetector_getThreshold_const
    fn get_threshold(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_getThreshold_const(self.as_raw_FastFeatureDetector()) }.into_result()
    }
    
    // identifier: cv_FastFeatureDetector_setNonmaxSuppression_bool_f
    fn set_nonmax_suppression(&mut self, f: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_setNonmaxSuppression_bool_f(self.as_raw_FastFeatureDetector(), f) }.into_result()
    }
    
    // identifier: cv_FastFeatureDetector_getNonmaxSuppression_const
    fn get_nonmax_suppression(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_getNonmaxSuppression_const(self.as_raw_FastFeatureDetector()) }.into_result()
    }
    
    // identifier: cv_FastFeatureDetector_setType_int_type
    fn set_type(&mut self, _type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_setType_int_type(self.as_raw_FastFeatureDetector(), _type) }.into_result()
    }
    
    // identifier: cv_FastFeatureDetector_getType_const
    fn get_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_getType_const(self.as_raw_FastFeatureDetector()) }.into_result()
    }
    
    // identifier: cv_FastFeatureDetector_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_getDefaultName_const(self.as_raw_FastFeatureDetector()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> FastFeatureDetector + 'a {

    // identifier: cv_FastFeatureDetector_create_int_threshold_bool_nonmaxSuppression_int_type
    ///
    /// ## C++ default parameters:
    /// * threshold: 10
    /// * nonmax_suppression: true
    /// * _type: FastFeatureDetector::TYPE_9_16
    pub fn create(threshold: i32, nonmax_suppression: bool, _type: i32) -> Result<types::PtrOfFastFeatureDetector> {
        unsafe { sys::cv_core_cv_FastFeatureDetector_create_int_threshold_bool_nonmaxSuppression_int_type(threshold, nonmax_suppression, _type) }.into_result().map(|x| types::PtrOfFastFeatureDetector { ptr: x })
    }
    
}

// Generating impl for trait cv::Feature2D (trait)
/// Abstract base class for 2D image feature detectors and descriptor extractors
pub trait Feature2D : core::Algorithm {
    #[doc(hidden)] fn as_raw_Feature2D(&self) -> *mut c_void;
    // identifier: cv_Feature2D_detect_Mat_image_VectorOfKeyPoint_keypoints_Mat_mask
    /// Detects keypoints in an image (first variant) or image set (second variant).
    /// 
    /// ## Parameters
    /// * image: Image.
    /// * keypoints: The detected keypoints. In the second variant of the method keypoints[i] is a set
    /// of keypoints detected in images[i] .
    /// * mask: Mask specifying where to look for keypoints (optional). It must be a 8-bit integer
    /// matrix with non-zero values in the region of interest.
    ///
    /// ## C++ default parameters:
    /// * mask: noArray()
    fn detect(&mut self, image: &core::Mat, keypoints: &types::VectorOfKeyPoint, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_Feature2D_detect_Mat_image_VectorOfKeyPoint_keypoints_Mat_mask(self.as_raw_Feature2D(), image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), mask.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Feature2D_detect_VectorOfMat_images_VectorOfVectorOfKeyPoint_keypoints_VectorOfMat_masks
    /// @overload
    /// ## Parameters
    /// * images: Image set.
    /// * keypoints: The detected keypoints. In the second variant of the method keypoints[i] is a set
    /// of keypoints detected in images[i] .
    /// * masks: Masks for each input image specifying where to look for keypoints (optional).
    /// masks[i] is a mask for images[i].
    ///
    /// ## C++ default parameters:
    /// * masks: noArray()
    fn detect_n(&mut self, images: &types::VectorOfMat, keypoints: &types::VectorOfVectorOfKeyPoint, masks: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_Feature2D_detect_VectorOfMat_images_VectorOfVectorOfKeyPoint_keypoints_VectorOfMat_masks(self.as_raw_Feature2D(), images.as_raw_VectorOfMat(), keypoints.as_raw_VectorOfVectorOfKeyPoint(), masks.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_Feature2D_compute_Mat_image_VectorOfKeyPoint_keypoints_Mat_descriptors
    /// Computes the descriptors for a set of keypoints detected in an image (first variant) or image set
    /// (second variant).
    /// 
    /// ## Parameters
    /// * image: Image.
    /// * keypoints: Input collection of keypoints. Keypoints for which a descriptor cannot be
    /// computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint
    /// with several dominant orientations (for each orientation).
    /// * descriptors: Computed descriptors. In the second variant of the method descriptors[i] are
    /// descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the
    /// descriptor for keypoint j-th keypoint.
    fn compute(&mut self, image: &core::Mat, keypoints: &types::VectorOfKeyPoint, descriptors: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_Feature2D_compute_Mat_image_VectorOfKeyPoint_keypoints_Mat_descriptors(self.as_raw_Feature2D(), image.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), descriptors.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Feature2D_compute_VectorOfMat_images_VectorOfVectorOfKeyPoint_keypoints_VectorOfMat_descriptors
    /// @overload
    /// 
    /// ## Parameters
    /// * images: Image set.
    /// * keypoints: Input collection of keypoints. Keypoints for which a descriptor cannot be
    /// computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint
    /// with several dominant orientations (for each orientation).
    /// * descriptors: Computed descriptors. In the second variant of the method descriptors[i] are
    /// descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the
    /// descriptor for keypoint j-th keypoint.
    fn compute_1(&mut self, images: &types::VectorOfMat, keypoints: &types::VectorOfVectorOfKeyPoint, descriptors: &mut types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_Feature2D_compute_VectorOfMat_images_VectorOfVectorOfKeyPoint_keypoints_VectorOfMat_descriptors(self.as_raw_Feature2D(), images.as_raw_VectorOfMat(), keypoints.as_raw_VectorOfVectorOfKeyPoint(), descriptors.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_Feature2D_detectAndCompute_Mat_image_Mat_mask_VectorOfKeyPoint_keypoints_Mat_descriptors_bool_useProvidedKeypoints
    /// Detects keypoints and computes the descriptors
    ///
    /// ## C++ default parameters:
    /// * use_provided_keypoints: false
    fn detect_and_compute(&mut self, image: &core::Mat, mask: &core::Mat, keypoints: &types::VectorOfKeyPoint, descriptors: &mut core::Mat, use_provided_keypoints: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_Feature2D_detectAndCompute_Mat_image_Mat_mask_VectorOfKeyPoint_keypoints_Mat_descriptors_bool_useProvidedKeypoints(self.as_raw_Feature2D(), image.as_raw_Mat(), mask.as_raw_Mat(), keypoints.as_raw_VectorOfKeyPoint(), descriptors.as_raw_Mat(), use_provided_keypoints) }.into_result()
    }
    
    // identifier: cv_Feature2D_descriptorSize_const
    fn descriptor_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_Feature2D_descriptorSize_const(self.as_raw_Feature2D()) }.into_result()
    }
    
    // identifier: cv_Feature2D_descriptorType_const
    fn descriptor_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_Feature2D_descriptorType_const(self.as_raw_Feature2D()) }.into_result()
    }
    
    // identifier: cv_Feature2D_defaultNorm_const
    fn default_norm(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_Feature2D_defaultNorm_const(self.as_raw_Feature2D()) }.into_result()
    }
    
    // identifier: cv_Feature2D_write_const_String_fileName
    fn write(&self, file_name: &str) -> Result<()> {
        string_arg!(file_name);
        unsafe { sys::cv_core_cv_Feature2D_write_const_String_fileName(self.as_raw_Feature2D(), file_name.as_ptr()) }.into_result()
    }
    
    // identifier: cv_Feature2D_read_String_fileName
    fn read(&mut self, file_name: &str) -> Result<()> {
        string_arg!(file_name);
        unsafe { sys::cv_core_cv_Feature2D_read_String_fileName(self.as_raw_Feature2D(), file_name.as_ptr()) }.into_result()
    }
    
    // identifier: cv_Feature2D_empty_const
    fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Feature2D_empty_const(self.as_raw_Feature2D()) }.into_result()
    }
    
    // identifier: cv_Feature2D_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_Feature2D_getDefaultName_const(self.as_raw_Feature2D()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> Feature2D + 'a {

}

// boxed class cv::FisheyeWarper
#[allow(dead_code)]
pub struct FisheyeWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::FisheyeWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_FisheyeWarper(self.ptr) };
    }
}
impl core::FisheyeWarper {
    #[doc(hidden)] pub fn as_raw_FisheyeWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for FisheyeWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl FisheyeWarper {

}

// boxed class cv::FlannBasedMatcher
/// Flann-based descriptor matcher.
/// 
/// This matcher trains cv::flann::Index on a train descriptor collection and calls its nearest search
/// methods to find the best matches. So, this matcher may be faster when matching a large train
/// collection than the brute force matcher. FlannBasedMatcher does not support masking permissible
/// matches of descriptor sets because flann::Index does not support this. :
#[allow(dead_code)]
pub struct FlannBasedMatcher {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::FlannBasedMatcher {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_FlannBasedMatcher(self.ptr) };
    }
}
impl core::FlannBasedMatcher {
    #[doc(hidden)] pub fn as_raw_FlannBasedMatcher(&self) -> *mut c_void { self.ptr }
}

impl core::DescriptorMatcher for FlannBasedMatcher {
    #[doc(hidden)] fn as_raw_DescriptorMatcher(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for FlannBasedMatcher {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl FlannBasedMatcher {

    // identifier: cv_FlannBasedMatcher_add_VectorOfMat_descriptors
    pub fn add(&mut self, descriptors: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_FlannBasedMatcher_add_VectorOfMat_descriptors(self.as_raw_FlannBasedMatcher(), descriptors.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_FlannBasedMatcher_clear
    pub fn clear(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_FlannBasedMatcher_clear(self.as_raw_FlannBasedMatcher()) }.into_result()
    }
    
    // identifier: cv_FlannBasedMatcher_train
    pub fn train(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_FlannBasedMatcher_train(self.as_raw_FlannBasedMatcher()) }.into_result()
    }
    
    // identifier: cv_FlannBasedMatcher_isMaskSupported_const
    pub fn is_mask_supported(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_FlannBasedMatcher_isMaskSupported_const(self.as_raw_FlannBasedMatcher()) }.into_result()
    }
    
    // identifier: cv_FlannBasedMatcher_create
    pub fn create() -> Result<types::PtrOfFlannBasedMatcher> {
        unsafe { sys::cv_core_cv_FlannBasedMatcher_create() }.into_result().map(|x| types::PtrOfFlannBasedMatcher { ptr: x })
    }
    
    // identifier: cv_FlannBasedMatcher_clone_const_bool_emptyTrainData
    ///
    /// ## C++ default parameters:
    /// * empty_train_data: false
    pub fn clone(&self, empty_train_data: bool) -> Result<types::PtrOfDescriptorMatcher> {
        unsafe { sys::cv_core_cv_FlannBasedMatcher_clone_const_bool_emptyTrainData(self.as_raw_FlannBasedMatcher(), empty_train_data) }.into_result().map(|x| types::PtrOfDescriptorMatcher { ptr: x })
    }
    
}

// Generating impl for trait cv::Formatted (trait)
/// @todo document
pub trait Formatted {
    #[doc(hidden)] fn as_raw_Formatted(&self) -> *mut c_void;
    // identifier: cv_Formatted_next
    fn next(&mut self) -> Result<String> {
        unsafe { sys::cv_core_cv_Formatted_next(self.as_raw_Formatted()) }.into_result().map(crate::templ::receive_string)
    }
    
    // identifier: cv_Formatted_reset
    fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Formatted_reset(self.as_raw_Formatted()) }.into_result()
    }
    
}

impl<'a> Formatted + 'a {

}

// Generating impl for trait cv::Formatter (trait)
/// @todo document
pub trait Formatter {
    #[doc(hidden)] fn as_raw_Formatter(&self) -> *mut c_void;
    // identifier: cv_Formatter_format_const_Mat_mtx
    fn format(&self, mtx: &core::Mat) -> Result<types::PtrOfFormatted> {
        unsafe { sys::cv_core_cv_Formatter_format_const_Mat_mtx(self.as_raw_Formatter(), mtx.as_raw_Mat()) }.into_result().map(|x| types::PtrOfFormatted { ptr: x })
    }
    
    // identifier: cv_Formatter_set32fPrecision_int_p
    ///
    /// ## C++ default parameters:
    /// * p: 8
    fn set32f_precision(&mut self, p: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_Formatter_set32fPrecision_int_p(self.as_raw_Formatter(), p) }.into_result()
    }
    
    // identifier: cv_Formatter_set64fPrecision_int_p
    ///
    /// ## C++ default parameters:
    /// * p: 16
    fn set64f_precision(&mut self, p: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_Formatter_set64fPrecision_int_p(self.as_raw_Formatter(), p) }.into_result()
    }
    
    // identifier: cv_Formatter_setMultiline_bool_ml
    ///
    /// ## C++ default parameters:
    /// * ml: true
    fn set_multiline(&mut self, ml: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_Formatter_setMultiline_bool_ml(self.as_raw_Formatter(), ml) }.into_result()
    }
    
}

impl<'a> Formatter + 'a {

    // identifier: cv_Formatter_get_int_fmt
    ///
    /// ## C++ default parameters:
    /// * fmt: FMT_DEFAULT
    pub fn get(fmt: i32) -> Result<types::PtrOfFormatter> {
        unsafe { sys::cv_core_cv_Formatter_get_int_fmt(fmt) }.into_result().map(|x| types::PtrOfFormatter { ptr: x })
    }
    
}

// Generating impl for trait cv::GFTTDetector (trait)
/// Wrapping class for feature detection using the goodFeaturesToTrack function. :
pub trait GFTTDetector : core::Feature2D {
    #[doc(hidden)] fn as_raw_GFTTDetector(&self) -> *mut c_void;
    // identifier: cv_GFTTDetector_setMaxFeatures_int_maxFeatures
    fn set_max_features(&mut self, max_features: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GFTTDetector_setMaxFeatures_int_maxFeatures(self.as_raw_GFTTDetector(), max_features) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_getMaxFeatures_const
    fn get_max_features(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GFTTDetector_getMaxFeatures_const(self.as_raw_GFTTDetector()) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_setQualityLevel_double_qlevel
    fn set_quality_level(&mut self, qlevel: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GFTTDetector_setQualityLevel_double_qlevel(self.as_raw_GFTTDetector(), qlevel) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_getQualityLevel_const
    fn get_quality_level(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GFTTDetector_getQualityLevel_const(self.as_raw_GFTTDetector()) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_setMinDistance_double_minDistance
    fn set_min_distance(&mut self, min_distance: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GFTTDetector_setMinDistance_double_minDistance(self.as_raw_GFTTDetector(), min_distance) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_getMinDistance_const
    fn get_min_distance(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GFTTDetector_getMinDistance_const(self.as_raw_GFTTDetector()) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_setBlockSize_int_blockSize
    fn set_block_size(&mut self, block_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GFTTDetector_setBlockSize_int_blockSize(self.as_raw_GFTTDetector(), block_size) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_getBlockSize_const
    fn get_block_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GFTTDetector_getBlockSize_const(self.as_raw_GFTTDetector()) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_setHarrisDetector_bool_val
    fn set_harris_detector(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_GFTTDetector_setHarrisDetector_bool_val(self.as_raw_GFTTDetector(), val) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_getHarrisDetector_const
    fn get_harris_detector(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_GFTTDetector_getHarrisDetector_const(self.as_raw_GFTTDetector()) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_setK_double_k
    fn set_k(&mut self, k: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GFTTDetector_setK_double_k(self.as_raw_GFTTDetector(), k) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_getK_const
    fn get_k(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GFTTDetector_getK_const(self.as_raw_GFTTDetector()) }.into_result()
    }
    
    // identifier: cv_GFTTDetector_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_GFTTDetector_getDefaultName_const(self.as_raw_GFTTDetector()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> GFTTDetector + 'a {

    // identifier: cv_GFTTDetector_create_int_maxCorners_double_qualityLevel_double_minDistance_int_blockSize_bool_useHarrisDetector_double_k
    ///
    /// ## C++ default parameters:
    /// * max_corners: 1000
    /// * quality_level: 0.01
    /// * min_distance: 1
    /// * block_size: 3
    /// * use_harris_detector: false
    /// * k: 0.04
    pub fn create(max_corners: i32, quality_level: f64, min_distance: f64, block_size: i32, use_harris_detector: bool, k: f64) -> Result<types::PtrOfGFTTDetector> {
        unsafe { sys::cv_core_cv_GFTTDetector_create_int_maxCorners_double_qualityLevel_double_minDistance_int_blockSize_bool_useHarrisDetector_double_k(max_corners, quality_level, min_distance, block_size, use_harris_detector, k) }.into_result().map(|x| types::PtrOfGFTTDetector { ptr: x })
    }
    
    // identifier: cv_GFTTDetector_create_int_maxCorners_double_qualityLevel_double_minDistance_int_blockSize_int_gradiantSize_bool_useHarrisDetector_double_k
    ///
    /// ## C++ default parameters:
    /// * use_harris_detector: false
    /// * k: 0.04
    pub fn create_1(max_corners: i32, quality_level: f64, min_distance: f64, block_size: i32, gradiant_size: i32, use_harris_detector: bool, k: f64) -> Result<types::PtrOfGFTTDetector> {
        unsafe { sys::cv_core_cv_GFTTDetector_create_int_maxCorners_double_qualityLevel_double_minDistance_int_blockSize_int_gradiantSize_bool_useHarrisDetector_double_k(max_corners, quality_level, min_distance, block_size, gradiant_size, use_harris_detector, k) }.into_result().map(|x| types::PtrOfGFTTDetector { ptr: x })
    }
    
}

// Generating impl for trait cv::GeneralizedHough (trait)
/// finds arbitrary template in the grayscale image using Generalized Hough Transform
pub trait GeneralizedHough : core::Algorithm {
    #[doc(hidden)] fn as_raw_GeneralizedHough(&self) -> *mut c_void;
    // identifier: cv_GeneralizedHough_setTemplate_Mat_templ_Point_templCenter
    ///
    /// ## C++ default parameters:
    /// * templ_center: Point(-1, -1)
    fn set_template(&mut self, templ: &core::Mat, templ_center: core::Point) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_setTemplate_Mat_templ_Point_templCenter(self.as_raw_GeneralizedHough(), templ.as_raw_Mat(), templ_center) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_setTemplate_Mat_edges_Mat_dx_Mat_dy_Point_templCenter
    ///
    /// ## C++ default parameters:
    /// * templ_center: Point(-1, -1)
    fn set_template_1(&mut self, edges: &core::Mat, dx: &core::Mat, dy: &core::Mat, templ_center: core::Point) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_setTemplate_Mat_edges_Mat_dx_Mat_dy_Point_templCenter(self.as_raw_GeneralizedHough(), edges.as_raw_Mat(), dx.as_raw_Mat(), dy.as_raw_Mat(), templ_center) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_detect_Mat_image_Mat_positions_Mat_votes
    ///
    /// ## C++ default parameters:
    /// * votes: noArray()
    fn detect(&mut self, image: &core::Mat, positions: &mut core::Mat, votes: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_detect_Mat_image_Mat_positions_Mat_votes(self.as_raw_GeneralizedHough(), image.as_raw_Mat(), positions.as_raw_Mat(), votes.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_detect_Mat_edges_Mat_dx_Mat_dy_Mat_positions_Mat_votes
    ///
    /// ## C++ default parameters:
    /// * votes: noArray()
    fn detect_1(&mut self, edges: &core::Mat, dx: &core::Mat, dy: &core::Mat, positions: &mut core::Mat, votes: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_detect_Mat_edges_Mat_dx_Mat_dy_Mat_positions_Mat_votes(self.as_raw_GeneralizedHough(), edges.as_raw_Mat(), dx.as_raw_Mat(), dy.as_raw_Mat(), positions.as_raw_Mat(), votes.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_setCannyLowThresh_int_cannyLowThresh
    fn set_canny_low_thresh(&mut self, canny_low_thresh: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_setCannyLowThresh_int_cannyLowThresh(self.as_raw_GeneralizedHough(), canny_low_thresh) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_getCannyLowThresh_const
    fn get_canny_low_thresh(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHough_getCannyLowThresh_const(self.as_raw_GeneralizedHough()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_setCannyHighThresh_int_cannyHighThresh
    fn set_canny_high_thresh(&mut self, canny_high_thresh: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_setCannyHighThresh_int_cannyHighThresh(self.as_raw_GeneralizedHough(), canny_high_thresh) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_getCannyHighThresh_const
    fn get_canny_high_thresh(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHough_getCannyHighThresh_const(self.as_raw_GeneralizedHough()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_setMinDist_double_minDist
    fn set_min_dist(&mut self, min_dist: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_setMinDist_double_minDist(self.as_raw_GeneralizedHough(), min_dist) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_getMinDist_const
    fn get_min_dist(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHough_getMinDist_const(self.as_raw_GeneralizedHough()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_setDp_double_dp
    fn set_dp(&mut self, dp: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_setDp_double_dp(self.as_raw_GeneralizedHough(), dp) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_getDp_const
    fn get_dp(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHough_getDp_const(self.as_raw_GeneralizedHough()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_setMaxBufferSize_int_maxBufferSize
    fn set_max_buffer_size(&mut self, max_buffer_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHough_setMaxBufferSize_int_maxBufferSize(self.as_raw_GeneralizedHough(), max_buffer_size) }.into_result()
    }
    
    // identifier: cv_GeneralizedHough_getMaxBufferSize_const
    fn get_max_buffer_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHough_getMaxBufferSize_const(self.as_raw_GeneralizedHough()) }.into_result()
    }
    
}

impl<'a> GeneralizedHough + 'a {

}

// Generating impl for trait cv::GeneralizedHoughBallard (trait)
/// finds arbitrary template in the grayscale image using Generalized Hough Transform
/// 
/// Detects position only without translation and rotation @cite Ballard1981 .
pub trait GeneralizedHoughBallard : core::GeneralizedHough {
    #[doc(hidden)] fn as_raw_GeneralizedHoughBallard(&self) -> *mut c_void;
    // identifier: cv_GeneralizedHoughBallard_setLevels_int_levels
    fn set_levels(&mut self, levels: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughBallard_setLevels_int_levels(self.as_raw_GeneralizedHoughBallard(), levels) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughBallard_getLevels_const
    fn get_levels(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHoughBallard_getLevels_const(self.as_raw_GeneralizedHoughBallard()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughBallard_setVotesThreshold_int_votesThreshold
    fn set_votes_threshold(&mut self, votes_threshold: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughBallard_setVotesThreshold_int_votesThreshold(self.as_raw_GeneralizedHoughBallard(), votes_threshold) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughBallard_getVotesThreshold_const
    fn get_votes_threshold(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHoughBallard_getVotesThreshold_const(self.as_raw_GeneralizedHoughBallard()) }.into_result()
    }
    
}

impl<'a> GeneralizedHoughBallard + 'a {

}

// Generating impl for trait cv::GeneralizedHoughGuil (trait)
/// finds arbitrary template in the grayscale image using Generalized Hough Transform
/// 
/// Detects position, translation and rotation @cite Guil1999 .
pub trait GeneralizedHoughGuil : core::GeneralizedHough {
    #[doc(hidden)] fn as_raw_GeneralizedHoughGuil(&self) -> *mut c_void;
    // identifier: cv_GeneralizedHoughGuil_setXi_double_xi
    fn set_xi(&mut self, xi: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setXi_double_xi(self.as_raw_GeneralizedHoughGuil(), xi) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getXi_const
    fn get_xi(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getXi_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setLevels_int_levels
    fn set_levels(&mut self, levels: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setLevels_int_levels(self.as_raw_GeneralizedHoughGuil(), levels) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getLevels_const
    fn get_levels(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getLevels_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setAngleEpsilon_double_angleEpsilon
    fn set_angle_epsilon(&mut self, angle_epsilon: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setAngleEpsilon_double_angleEpsilon(self.as_raw_GeneralizedHoughGuil(), angle_epsilon) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getAngleEpsilon_const
    fn get_angle_epsilon(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getAngleEpsilon_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setMinAngle_double_minAngle
    fn set_min_angle(&mut self, min_angle: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setMinAngle_double_minAngle(self.as_raw_GeneralizedHoughGuil(), min_angle) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getMinAngle_const
    fn get_min_angle(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getMinAngle_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setMaxAngle_double_maxAngle
    fn set_max_angle(&mut self, max_angle: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setMaxAngle_double_maxAngle(self.as_raw_GeneralizedHoughGuil(), max_angle) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getMaxAngle_const
    fn get_max_angle(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getMaxAngle_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setAngleStep_double_angleStep
    fn set_angle_step(&mut self, angle_step: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setAngleStep_double_angleStep(self.as_raw_GeneralizedHoughGuil(), angle_step) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getAngleStep_const
    fn get_angle_step(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getAngleStep_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setAngleThresh_int_angleThresh
    fn set_angle_thresh(&mut self, angle_thresh: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setAngleThresh_int_angleThresh(self.as_raw_GeneralizedHoughGuil(), angle_thresh) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getAngleThresh_const
    fn get_angle_thresh(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getAngleThresh_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setMinScale_double_minScale
    fn set_min_scale(&mut self, min_scale: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setMinScale_double_minScale(self.as_raw_GeneralizedHoughGuil(), min_scale) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getMinScale_const
    fn get_min_scale(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getMinScale_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setMaxScale_double_maxScale
    fn set_max_scale(&mut self, max_scale: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setMaxScale_double_maxScale(self.as_raw_GeneralizedHoughGuil(), max_scale) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getMaxScale_const
    fn get_max_scale(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getMaxScale_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setScaleStep_double_scaleStep
    fn set_scale_step(&mut self, scale_step: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setScaleStep_double_scaleStep(self.as_raw_GeneralizedHoughGuil(), scale_step) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getScaleStep_const
    fn get_scale_step(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getScaleStep_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setScaleThresh_int_scaleThresh
    fn set_scale_thresh(&mut self, scale_thresh: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setScaleThresh_int_scaleThresh(self.as_raw_GeneralizedHoughGuil(), scale_thresh) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getScaleThresh_const
    fn get_scale_thresh(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getScaleThresh_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_setPosThresh_int_posThresh
    fn set_pos_thresh(&mut self, pos_thresh: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_setPosThresh_int_posThresh(self.as_raw_GeneralizedHoughGuil(), pos_thresh) }.into_result()
    }
    
    // identifier: cv_GeneralizedHoughGuil_getPosThresh_const
    fn get_pos_thresh(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_GeneralizedHoughGuil_getPosThresh_const(self.as_raw_GeneralizedHoughGuil()) }.into_result()
    }
    
}

impl<'a> GeneralizedHoughGuil + 'a {

}

// boxed class cv::HOGDescriptor
/// Implementation of HOG (Histogram of Oriented Gradients) descriptor and object detector.
/// 
/// the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs @cite Dalal2005 .
/// 
/// useful links:
/// 
/// https://hal.inria.fr/inria-00548512/document/
/// 
/// https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients
/// 
/// https://software.intel.com/en-us/ipp-dev-reference-histogram-of-oriented-gradients-hog-descriptor
/// 
/// http://www.learnopencv.com/histogram-of-oriented-gradients
/// 
/// http://www.learnopencv.com/handwritten-digits-classification-an-opencv-c-python-tutorial
#[allow(dead_code)]
pub struct HOGDescriptor {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::HOGDescriptor {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_HOGDescriptor(self.ptr) };
    }
}
impl core::HOGDescriptor {
    #[doc(hidden)] pub fn as_raw_HOGDescriptor(&self) -> *mut c_void { self.ptr }
}

impl HOGDescriptor {

    // identifier: cv_HOGDescriptor_HOGDescriptor_String_filename
    /// @overload
    /// ## Parameters
    /// * filename: the file name containing  HOGDescriptor properties and coefficients of the trained classifier
    pub fn new(filename: &str) -> Result<core::HOGDescriptor> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_HOGDescriptor_HOGDescriptor_String_filename(filename.as_ptr()) }.into_result().map(|x| core::HOGDescriptor { ptr: x })
    }
    
    // identifier: cv_HOGDescriptor_HOGDescriptor_HOGDescriptor_d
    /// @overload
    /// ## Parameters
    /// * d: the HOGDescriptor which cloned to create a new one.
    pub fn copy(d: &core::HOGDescriptor) -> Result<core::HOGDescriptor> {
        unsafe { sys::cv_core_cv_HOGDescriptor_HOGDescriptor_HOGDescriptor_d(d.as_raw_HOGDescriptor()) }.into_result().map(|x| core::HOGDescriptor { ptr: x })
    }
    
    // identifier: cv_HOGDescriptor_getDescriptorSize_const
    /// Returns the number of coefficients required for the classification.
    pub fn get_descriptor_size(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_HOGDescriptor_getDescriptorSize_const(self.as_raw_HOGDescriptor()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_checkDetectorSize_const
    /// Checks if detector size equal to descriptor size.
    pub fn check_detector_size(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_HOGDescriptor_checkDetectorSize_const(self.as_raw_HOGDescriptor()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_getWinSigma_const
    /// Returns winSigma value
    pub fn get_win_sigma(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_HOGDescriptor_getWinSigma_const(self.as_raw_HOGDescriptor()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_setSVMDetector_Mat__svmdetector
    /// Sets coefficients for the linear SVM classifier.
    /// ## Parameters
    /// * _svmdetector: coefficients for the linear SVM classifier.
    pub fn set_svm_detector(&mut self, _svmdetector: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_setSVMDetector_Mat__svmdetector(self.as_raw_HOGDescriptor(), _svmdetector.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_load_String_filename_String_objname
    /// loads coefficients for the linear SVM classifier from a file
    /// ## Parameters
    /// * filename: Name of the file to read.
    /// * objname: The optional name of the node to read (if empty, the first top-level node will be used).
    ///
    /// ## C++ default parameters:
    /// * objname: String()
    pub fn load(&mut self, filename: &str, objname: &str) -> Result<bool> {
        string_arg!(filename);
        string_arg!(objname);
        unsafe { sys::cv_core_cv_HOGDescriptor_load_String_filename_String_objname(self.as_raw_HOGDescriptor(), filename.as_ptr(), objname.as_ptr()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_save_const_String_filename_String_objname
    /// saves coefficients for the linear SVM classifier to a file
    /// ## Parameters
    /// * filename: File name
    /// * objname: Object name
    ///
    /// ## C++ default parameters:
    /// * objname: String()
    pub fn save(&self, filename: &str, objname: &str) -> Result<()> {
        string_arg!(filename);
        string_arg!(objname);
        unsafe { sys::cv_core_cv_HOGDescriptor_save_const_String_filename_String_objname(self.as_raw_HOGDescriptor(), filename.as_ptr(), objname.as_ptr()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_copyTo_const_HOGDescriptor_c
    /// clones the HOGDescriptor
    /// ## Parameters
    /// * c: cloned HOGDescriptor
    pub fn copy_to(&self, c: &core::HOGDescriptor) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_copyTo_const_HOGDescriptor_c(self.as_raw_HOGDescriptor(), c.as_raw_HOGDescriptor()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_compute_const_Mat_img_VectorOffloat_descriptors_Size_winStride_Size_padding_VectorOfPoint_locations
    /// Computes HOG descriptors of given image.
    /// ## Parameters
    /// * img: Matrix of the type CV_8U containing an image where HOG features will be calculated.
    /// * descriptors: Matrix of the type CV_32F
    /// * winStride: Window stride. It must be a multiple of block stride.
    /// * padding: Padding
    /// * locations: Vector of Point
    ///
    /// ## C++ default parameters:
    /// * win_stride: Size()
    /// * padding: Size()
    /// * locations: std::vector<Point>()
    pub fn compute(&self, img: &core::Mat, descriptors: &types::VectorOffloat, win_stride: core::Size, padding: core::Size, locations: &types::VectorOfPoint) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_compute_const_Mat_img_VectorOffloat_descriptors_Size_winStride_Size_padding_VectorOfPoint_locations(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), descriptors.as_raw_VectorOffloat(), win_stride, padding, locations.as_raw_VectorOfPoint()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_detect_const_Mat_img_VectorOfPoint_foundLocations_VectorOfdouble_weights_double_hitThreshold_Size_winStride_Size_padding_VectorOfPoint_searchLocations
    /// Performs object detection without a multi-scale window.
    /// ## Parameters
    /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
    /// * foundLocations: Vector of point where each point contains left-top corner point of detected object boundaries.
    /// * weights: Vector that will contain confidence values for each detected object.
    /// * hitThreshold: Threshold for the distance between features and SVM classifying plane.
    /// Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
    /// But if the free coefficient is omitted (which is allowed), you can specify it manually here.
    /// * winStride: Window stride. It must be a multiple of block stride.
    /// * padding: Padding
    /// * searchLocations: Vector of Point includes set of requested locations to be evaluated.
    ///
    /// ## C++ default parameters:
    /// * hit_threshold: 0
    /// * win_stride: Size()
    /// * padding: Size()
    /// * search_locations: std::vector<Point>()
    pub fn detect_weights(&self, img: &core::Mat, found_locations: &types::VectorOfPoint, weights: &types::VectorOfdouble, hit_threshold: f64, win_stride: core::Size, padding: core::Size, search_locations: &types::VectorOfPoint) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_detect_const_Mat_img_VectorOfPoint_foundLocations_VectorOfdouble_weights_double_hitThreshold_Size_winStride_Size_padding_VectorOfPoint_searchLocations(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), found_locations.as_raw_VectorOfPoint(), weights.as_raw_VectorOfdouble(), hit_threshold, win_stride, padding, search_locations.as_raw_VectorOfPoint()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_detect_const_Mat_img_VectorOfPoint_foundLocations_double_hitThreshold_Size_winStride_Size_padding_VectorOfPoint_searchLocations
    /// Performs object detection without a multi-scale window.
    /// ## Parameters
    /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
    /// * foundLocations: Vector of point where each point contains left-top corner point of detected object boundaries.
    /// * hitThreshold: Threshold for the distance between features and SVM classifying plane.
    /// Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
    /// But if the free coefficient is omitted (which is allowed), you can specify it manually here.
    /// * winStride: Window stride. It must be a multiple of block stride.
    /// * padding: Padding
    /// * searchLocations: Vector of Point includes locations to search.
    ///
    /// ## C++ default parameters:
    /// * hit_threshold: 0
    /// * win_stride: Size()
    /// * padding: Size()
    /// * search_locations: std::vector<Point>()
    pub fn detect(&self, img: &core::Mat, found_locations: &types::VectorOfPoint, hit_threshold: f64, win_stride: core::Size, padding: core::Size, search_locations: &types::VectorOfPoint) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_detect_const_Mat_img_VectorOfPoint_foundLocations_double_hitThreshold_Size_winStride_Size_padding_VectorOfPoint_searchLocations(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), found_locations.as_raw_VectorOfPoint(), hit_threshold, win_stride, padding, search_locations.as_raw_VectorOfPoint()) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_detectMultiScale_const_Mat_img_VectorOfRect_foundLocations_VectorOfdouble_foundWeights_double_hitThreshold_Size_winStride_Size_padding_double_scale_double_finalThreshold_bool_useMeanshiftGrouping
    /// Detects objects of different sizes in the input image. The detected objects are returned as a list
    /// of rectangles.
    /// ## Parameters
    /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
    /// * foundLocations: Vector of rectangles where each rectangle contains the detected object.
    /// * foundWeights: Vector that will contain confidence values for each detected object.
    /// * hitThreshold: Threshold for the distance between features and SVM classifying plane.
    /// Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
    /// But if the free coefficient is omitted (which is allowed), you can specify it manually here.
    /// * winStride: Window stride. It must be a multiple of block stride.
    /// * padding: Padding
    /// * scale: Coefficient of the detection window increase.
    /// * finalThreshold: Final threshold
    /// * useMeanshiftGrouping: indicates grouping algorithm
    ///
    /// ## C++ default parameters:
    /// * hit_threshold: 0
    /// * win_stride: Size()
    /// * padding: Size()
    /// * scale: 1.05
    /// * final_threshold: 2.0
    /// * use_meanshift_grouping: false
    pub fn detect_multi_scale(&self, img: &core::Mat, found_locations: &types::VectorOfRect, found_weights: &types::VectorOfdouble, hit_threshold: f64, win_stride: core::Size, padding: core::Size, scale: f64, final_threshold: f64, use_meanshift_grouping: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_detectMultiScale_const_Mat_img_VectorOfRect_foundLocations_VectorOfdouble_foundWeights_double_hitThreshold_Size_winStride_Size_padding_double_scale_double_finalThreshold_bool_useMeanshiftGrouping(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), found_locations.as_raw_VectorOfRect(), found_weights.as_raw_VectorOfdouble(), hit_threshold, win_stride, padding, scale, final_threshold, use_meanshift_grouping) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_detectMultiScale_const_Mat_img_VectorOfRect_foundLocations_double_hitThreshold_Size_winStride_Size_padding_double_scale_double_finalThreshold_bool_useMeanshiftGrouping
    /// Detects objects of different sizes in the input image. The detected objects are returned as a list
    /// of rectangles.
    /// ## Parameters
    /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
    /// * foundLocations: Vector of rectangles where each rectangle contains the detected object.
    /// * hitThreshold: Threshold for the distance between features and SVM classifying plane.
    /// Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient).
    /// But if the free coefficient is omitted (which is allowed), you can specify it manually here.
    /// * winStride: Window stride. It must be a multiple of block stride.
    /// * padding: Padding
    /// * scale: Coefficient of the detection window increase.
    /// * finalThreshold: Final threshold
    /// * useMeanshiftGrouping: indicates grouping algorithm
    ///
    /// ## C++ default parameters:
    /// * hit_threshold: 0
    /// * win_stride: Size()
    /// * padding: Size()
    /// * scale: 1.05
    /// * final_threshold: 2.0
    /// * use_meanshift_grouping: false
    pub fn detect_multi_scale_weights(&self, img: &core::Mat, found_locations: &types::VectorOfRect, hit_threshold: f64, win_stride: core::Size, padding: core::Size, scale: f64, final_threshold: f64, use_meanshift_grouping: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_detectMultiScale_const_Mat_img_VectorOfRect_foundLocations_double_hitThreshold_Size_winStride_Size_padding_double_scale_double_finalThreshold_bool_useMeanshiftGrouping(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), found_locations.as_raw_VectorOfRect(), hit_threshold, win_stride, padding, scale, final_threshold, use_meanshift_grouping) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_computeGradient_const_Mat_img_Mat_grad_Mat_angleOfs_Size_paddingTL_Size_paddingBR
    /// Computes gradients and quantized gradient orientations.
    /// ## Parameters
    /// * img: Matrix contains the image to be computed
    /// * grad: Matrix of type CV_32FC2 contains computed gradients
    /// * angleOfs: Matrix of type CV_8UC2 contains quantized gradient orientations
    /// * paddingTL: Padding from top-left
    /// * paddingBR: Padding from bottom-right
    ///
    /// ## C++ default parameters:
    /// * padding_tl: Size()
    /// * padding_br: Size()
    pub fn compute_gradient(&self, img: &core::Mat, grad: &core::Mat, angle_ofs: &core::Mat, padding_tl: core::Size, padding_br: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_computeGradient_const_Mat_img_Mat_grad_Mat_angleOfs_Size_paddingTL_Size_paddingBR(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), grad.as_raw_Mat(), angle_ofs.as_raw_Mat(), padding_tl, padding_br) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_getDefaultPeopleDetector
    /// Returns coefficients of the classifier trained for people detection (for 64x128 windows).
    pub fn get_default_people_detector() -> Result<types::VectorOffloat> {
        unsafe { sys::cv_core_cv_HOGDescriptor_getDefaultPeopleDetector() }.into_result().map(|x| types::VectorOffloat { ptr: x })
    }
    
    // identifier: cv_HOGDescriptor_getDaimlerPeopleDetector
    /// Returns coefficients of the classifier trained for people detection (for 48x96 windows).
    pub fn get_daimler_people_detector() -> Result<types::VectorOffloat> {
        unsafe { sys::cv_core_cv_HOGDescriptor_getDaimlerPeopleDetector() }.into_result().map(|x| types::VectorOffloat { ptr: x })
    }
    
    // identifier: cv_HOGDescriptor_detectROI_const_Mat_img_VectorOfPoint_locations_VectorOfPoint_foundLocations_VectorOfdouble_confidences_double_hitThreshold_Size_winStride_Size_padding
    /// evaluate specified ROI and return confidence value for each location
    /// ## Parameters
    /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
    /// * locations: Vector of Point
    /// * foundLocations: Vector of Point where each Point is detected object's top-left point.
    /// * confidences: confidences
    /// * hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually
    /// it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if
    /// the free coefficient is omitted (which is allowed), you can specify it manually here
    /// * winStride: winStride
    /// * padding: padding
    ///
    /// ## C++ default parameters:
    /// * hit_threshold: 0
    /// * win_stride: Size()
    /// * padding: Size()
    pub fn detect_roi(&self, img: &core::Mat, locations: &types::VectorOfPoint, found_locations: &types::VectorOfPoint, confidences: &types::VectorOfdouble, hit_threshold: f64, win_stride: core::Size, padding: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_detectROI_const_Mat_img_VectorOfPoint_locations_VectorOfPoint_foundLocations_VectorOfdouble_confidences_double_hitThreshold_Size_winStride_Size_padding(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), locations.as_raw_VectorOfPoint(), found_locations.as_raw_VectorOfPoint(), confidences.as_raw_VectorOfdouble(), hit_threshold, win_stride, padding) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_detectMultiScaleROI_const_Mat_img_VectorOfRect_foundLocations_VectorOfDetectionROI_locations_double_hitThreshold_int_groupThreshold
    /// evaluate specified ROI and return confidence value for each location in multiple scales
    /// ## Parameters
    /// * img: Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
    /// * foundLocations: Vector of rectangles where each rectangle contains the detected object.
    /// * locations: Vector of DetectionROI
    /// * hitThreshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified
    /// in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
    /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
    ///
    /// ## C++ default parameters:
    /// * hit_threshold: 0
    /// * group_threshold: 0
    pub fn detect_multi_scale_roi(&self, img: &core::Mat, found_locations: &types::VectorOfRect, locations: &types::VectorOfDetectionROI, hit_threshold: f64, group_threshold: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_detectMultiScaleROI_const_Mat_img_VectorOfRect_foundLocations_VectorOfDetectionROI_locations_double_hitThreshold_int_groupThreshold(self.as_raw_HOGDescriptor(), img.as_raw_Mat(), found_locations.as_raw_VectorOfRect(), locations.as_raw_VectorOfDetectionROI(), hit_threshold, group_threshold) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_readALTModel_String_modelfile
    /// read/parse Dalal's alt model file
    /// ## Parameters
    /// * modelfile: Path of Dalal's alt model file.
    pub fn read_alt_model(&mut self, modelfile: &str) -> Result<()> {
        string_arg!(mut modelfile);
        unsafe { sys::cv_core_cv_HOGDescriptor_readALTModel_String_modelfile(self.as_raw_HOGDescriptor(), modelfile.as_ptr() as _) }.into_result()
    }
    
    // identifier: cv_HOGDescriptor_groupRectangles_const_VectorOfRect_rectList_VectorOfdouble_weights_int_groupThreshold_double_eps
    /// Groups the object candidate rectangles.
    /// ## Parameters
    /// * rectList:  Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.)
    /// * weights: Input/output vector of weights of rectangles. Output vector includes weights of retained and grouped rectangles. (The Python list is not modified in place.)
    /// * groupThreshold: Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
    /// * eps: Relative difference between sides of the rectangles to merge them into a group.
    pub fn group_rectangles(&self, rect_list: &types::VectorOfRect, weights: &types::VectorOfdouble, group_threshold: i32, eps: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_HOGDescriptor_groupRectangles_const_VectorOfRect_rectList_VectorOfdouble_weights_int_groupThreshold_double_eps(self.as_raw_HOGDescriptor(), rect_list.as_raw_VectorOfRect(), weights.as_raw_VectorOfdouble(), group_threshold, eps) }.into_result()
    }
    
}

// boxed class cv::Hamming
/// replaced with CV_Assert(expr) in Debug configuration
#[allow(dead_code)]
pub struct Hamming {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Hamming {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Hamming(self.ptr) };
    }
}
impl core::Hamming {
    #[doc(hidden)] pub fn as_raw_Hamming(&self) -> *mut c_void { self.ptr }
}

// Generating impl for trait cv::HausdorffDistanceExtractor (trait)
/// A simple Hausdorff distance measure between shapes defined by contours
/// 
/// according to the paper "Comparing Images using the Hausdorff distance." by D.P. Huttenlocher, G.A.
/// Klanderman, and W.J. Rucklidge. (PAMI 1993). :
pub trait HausdorffDistanceExtractor : core::ShapeDistanceExtractor {
    #[doc(hidden)] fn as_raw_HausdorffDistanceExtractor(&self) -> *mut c_void;
    // identifier: cv_HausdorffDistanceExtractor_setDistanceFlag_int_distanceFlag
    /// Set the norm used to compute the Hausdorff value between two shapes. It can be L1 or L2 norm.
    /// 
    /// ## Parameters
    /// * distanceFlag: Flag indicating which norm is used to compute the Hausdorff distance
    /// (NORM_L1, NORM_L2).
    fn set_distance_flag(&mut self, distance_flag: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_HausdorffDistanceExtractor_setDistanceFlag_int_distanceFlag(self.as_raw_HausdorffDistanceExtractor(), distance_flag) }.into_result()
    }
    
    // identifier: cv_HausdorffDistanceExtractor_getDistanceFlag_const
    fn get_distance_flag(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_HausdorffDistanceExtractor_getDistanceFlag_const(self.as_raw_HausdorffDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_HausdorffDistanceExtractor_setRankProportion_float_rankProportion
    /// This method sets the rank proportion (or fractional value) that establish the Kth ranked value of
    /// the partial Hausdorff distance. Experimentally had been shown that 0.6 is a good value to compare
    /// shapes.
    /// 
    /// ## Parameters
    /// * rankProportion: fractional value (between 0 and 1).
    fn set_rank_proportion(&mut self, rank_proportion: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_HausdorffDistanceExtractor_setRankProportion_float_rankProportion(self.as_raw_HausdorffDistanceExtractor(), rank_proportion) }.into_result()
    }
    
    // identifier: cv_HausdorffDistanceExtractor_getRankProportion_const
    fn get_rank_proportion(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_HausdorffDistanceExtractor_getRankProportion_const(self.as_raw_HausdorffDistanceExtractor()) }.into_result()
    }
    
}

impl<'a> HausdorffDistanceExtractor + 'a {

}

// Generating impl for trait cv::HistogramCostExtractor (trait)
/// Abstract base class for histogram cost algorithms.
pub trait HistogramCostExtractor : core::Algorithm {
    #[doc(hidden)] fn as_raw_HistogramCostExtractor(&self) -> *mut c_void;
    // identifier: cv_HistogramCostExtractor_buildCostMatrix_Mat_descriptors1_Mat_descriptors2_Mat_costMatrix
    fn build_cost_matrix(&mut self, descriptors1: &core::Mat, descriptors2: &core::Mat, cost_matrix: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_HistogramCostExtractor_buildCostMatrix_Mat_descriptors1_Mat_descriptors2_Mat_costMatrix(self.as_raw_HistogramCostExtractor(), descriptors1.as_raw_Mat(), descriptors2.as_raw_Mat(), cost_matrix.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_HistogramCostExtractor_setNDummies_int_nDummies
    fn set_n_dummies(&mut self, n_dummies: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_HistogramCostExtractor_setNDummies_int_nDummies(self.as_raw_HistogramCostExtractor(), n_dummies) }.into_result()
    }
    
    // identifier: cv_HistogramCostExtractor_getNDummies_const
    fn get_n_dummies(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_HistogramCostExtractor_getNDummies_const(self.as_raw_HistogramCostExtractor()) }.into_result()
    }
    
    // identifier: cv_HistogramCostExtractor_setDefaultCost_float_defaultCost
    fn set_default_cost(&mut self, default_cost: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_HistogramCostExtractor_setDefaultCost_float_defaultCost(self.as_raw_HistogramCostExtractor(), default_cost) }.into_result()
    }
    
    // identifier: cv_HistogramCostExtractor_getDefaultCost_const
    fn get_default_cost(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_HistogramCostExtractor_getDefaultCost_const(self.as_raw_HistogramCostExtractor()) }.into_result()
    }
    
}

impl<'a> HistogramCostExtractor + 'a {

}

// Generating impl for trait cv::KAZE (trait)
/// Class implementing the KAZE keypoint detector and descriptor extractor, described in @cite ABD12 .
/// 
/// 
/// Note: AKAZE descriptor can only be used with KAZE or AKAZE keypoints .. [ABD12] KAZE Features. Pablo
/// F. Alcantarilla, Adrien Bartoli and Andrew J. Davison. In European Conference on Computer Vision
/// (ECCV), Fiorenze, Italy, October 2012.
pub trait KAZE : core::Feature2D {
    #[doc(hidden)] fn as_raw_KAZE(&self) -> *mut c_void;
    // identifier: cv_KAZE_setExtended_bool_extended
    fn set_extended(&mut self, extended: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_KAZE_setExtended_bool_extended(self.as_raw_KAZE(), extended) }.into_result()
    }
    
    // identifier: cv_KAZE_getExtended_const
    fn get_extended(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_KAZE_getExtended_const(self.as_raw_KAZE()) }.into_result()
    }
    
    // identifier: cv_KAZE_setUpright_bool_upright
    fn set_upright(&mut self, upright: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_KAZE_setUpright_bool_upright(self.as_raw_KAZE(), upright) }.into_result()
    }
    
    // identifier: cv_KAZE_getUpright_const
    fn get_upright(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_KAZE_getUpright_const(self.as_raw_KAZE()) }.into_result()
    }
    
    // identifier: cv_KAZE_setThreshold_double_threshold
    fn set_threshold(&mut self, threshold: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_KAZE_setThreshold_double_threshold(self.as_raw_KAZE(), threshold) }.into_result()
    }
    
    // identifier: cv_KAZE_getThreshold_const
    fn get_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_KAZE_getThreshold_const(self.as_raw_KAZE()) }.into_result()
    }
    
    // identifier: cv_KAZE_setNOctaves_int_octaves
    fn set_n_octaves(&mut self, octaves: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_KAZE_setNOctaves_int_octaves(self.as_raw_KAZE(), octaves) }.into_result()
    }
    
    // identifier: cv_KAZE_getNOctaves_const
    fn get_n_octaves(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_KAZE_getNOctaves_const(self.as_raw_KAZE()) }.into_result()
    }
    
    // identifier: cv_KAZE_setNOctaveLayers_int_octaveLayers
    fn set_n_octave_layers(&mut self, octave_layers: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_KAZE_setNOctaveLayers_int_octaveLayers(self.as_raw_KAZE(), octave_layers) }.into_result()
    }
    
    // identifier: cv_KAZE_getNOctaveLayers_const
    fn get_n_octave_layers(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_KAZE_getNOctaveLayers_const(self.as_raw_KAZE()) }.into_result()
    }
    
    // identifier: cv_KAZE_setDiffusivity_int_diff
    fn set_diffusivity(&mut self, diff: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_KAZE_setDiffusivity_int_diff(self.as_raw_KAZE(), diff) }.into_result()
    }
    
    // identifier: cv_KAZE_getDiffusivity_const
    fn get_diffusivity(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_KAZE_getDiffusivity_const(self.as_raw_KAZE()) }.into_result()
    }
    
    // identifier: cv_KAZE_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_KAZE_getDefaultName_const(self.as_raw_KAZE()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> KAZE + 'a {

    // identifier: cv_KAZE_create_bool_extended_bool_upright_float_threshold_int_nOctaves_int_nOctaveLayers_int_diffusivity
    /// The KAZE constructor
    /// 
    /// ## Parameters
    /// * extended: Set to enable extraction of extended (128-byte) descriptor.
    /// * upright: Set to enable use of upright descriptors (non rotation-invariant).
    /// * threshold: Detector response threshold to accept point
    /// * nOctaves: Maximum octave evolution of the image
    /// * nOctaveLayers: Default number of sublevels per scale level
    /// * diffusivity: Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or
    /// DIFF_CHARBONNIER
    ///
    /// ## C++ default parameters:
    /// * extended: false
    /// * upright: false
    /// * threshold: 0.001f
    /// * n_octaves: 4
    /// * n_octave_layers: 4
    /// * diffusivity: KAZE::DIFF_PM_G2
    pub fn create(extended: bool, upright: bool, threshold: f32, n_octaves: i32, n_octave_layers: i32, diffusivity: i32) -> Result<types::PtrOfKAZE> {
        unsafe { sys::cv_core_cv_KAZE_create_bool_extended_bool_upright_float_threshold_int_nOctaves_int_nOctaveLayers_int_diffusivity(extended, upright, threshold, n_octaves, n_octave_layers, diffusivity) }.into_result().map(|x| types::PtrOfKAZE { ptr: x })
    }
    
}

// boxed class cv::KalmanFilter
/// Kalman filter class.
/// 
/// The class implements a standard Kalman filter <http://en.wikipedia.org/wiki/Kalman_filter>,
/// @cite Welch95 . However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get
/// an extended Kalman filter functionality.
/// 
/// Note: In C API when CvKalman\* kalmanFilter structure is not needed anymore, it should be released
/// with cvReleaseKalman(&kalmanFilter)
#[allow(dead_code)]
pub struct KalmanFilter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::KalmanFilter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_KalmanFilter(self.ptr) };
    }
}
impl core::KalmanFilter {
    #[doc(hidden)] pub fn as_raw_KalmanFilter(&self) -> *mut c_void { self.ptr }
}

impl KalmanFilter {

    // identifier: cv_KalmanFilter_KalmanFilter
    pub fn default() -> Result<core::KalmanFilter> {
        unsafe { sys::cv_core_cv_KalmanFilter_KalmanFilter() }.into_result().map(|x| core::KalmanFilter { ptr: x })
    }
    
    // identifier: cv_KalmanFilter_KalmanFilter_int_dynamParams_int_measureParams_int_controlParams_int_type
    /// @overload
    /// ## Parameters
    /// * dynamParams: Dimensionality of the state.
    /// * measureParams: Dimensionality of the measurement.
    /// * controlParams: Dimensionality of the control vector.
    /// * type: Type of the created matrices that should be CV_32F or CV_64F.
    ///
    /// ## C++ default parameters:
    /// * control_params: 0
    /// * _type: CV_32F
    pub fn new(dynam_params: i32, measure_params: i32, control_params: i32, _type: i32) -> Result<core::KalmanFilter> {
        unsafe { sys::cv_core_cv_KalmanFilter_KalmanFilter_int_dynamParams_int_measureParams_int_controlParams_int_type(dynam_params, measure_params, control_params, _type) }.into_result().map(|x| core::KalmanFilter { ptr: x })
    }
    
    // identifier: cv_KalmanFilter_init_int_dynamParams_int_measureParams_int_controlParams_int_type
    /// Re-initializes Kalman filter. The previous content is destroyed.
    /// 
    /// ## Parameters
    /// * dynamParams: Dimensionality of the state.
    /// * measureParams: Dimensionality of the measurement.
    /// * controlParams: Dimensionality of the control vector.
    /// * type: Type of the created matrices that should be CV_32F or CV_64F.
    ///
    /// ## C++ default parameters:
    /// * control_params: 0
    /// * _type: CV_32F
    pub fn init(&mut self, dynam_params: i32, measure_params: i32, control_params: i32, _type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_KalmanFilter_init_int_dynamParams_int_measureParams_int_controlParams_int_type(self.as_raw_KalmanFilter(), dynam_params, measure_params, control_params, _type) }.into_result()
    }
    
    // identifier: cv_KalmanFilter_predict_Mat_control
    /// Computes a predicted state.
    /// 
    /// ## Parameters
    /// * control: The optional input control
    ///
    /// ## C++ default parameters:
    /// * control: Mat()
    pub fn predict(&mut self, control: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_KalmanFilter_predict_Mat_control(self.as_raw_KalmanFilter(), control.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_KalmanFilter_correct_Mat_measurement
    /// Updates the predicted state from the measurement.
    /// 
    /// ## Parameters
    /// * measurement: The measured system parameters
    pub fn correct(&mut self, measurement: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_KalmanFilter_correct_Mat_measurement(self.as_raw_KalmanFilter(), measurement.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

impl KeyPoint {

    // identifier: cv_KeyPoint_KeyPoint
    pub fn default() -> Result<core::KeyPoint> {
        unsafe { sys::cv_core_cv_KeyPoint_KeyPoint() }.into_result()
    }
    
    // identifier: cv_KeyPoint_KeyPoint_Point2f__pt_float__size_float__angle_float__response_int__octave_int__class_id
    /// ## Parameters
    /// * _pt: x & y coordinates of the keypoint
    /// * _size: keypoint diameter
    /// * _angle: keypoint orientation
    /// * _response: keypoint detector response on the keypoint (that is, strength of the keypoint)
    /// * _octave: pyramid octave in which the keypoint has been detected
    /// * _class_id: object id
    ///
    /// ## C++ default parameters:
    /// * _angle: -1
    /// * _response: 0
    /// * _octave: 0
    /// * _class_id: -1
    pub fn new_point(_pt: core::Point2f, _size: f32, _angle: f32, _response: f32, _octave: i32, _class_id: i32) -> Result<core::KeyPoint> {
        unsafe { sys::cv_core_cv_KeyPoint_KeyPoint_Point2f__pt_float__size_float__angle_float__response_int__octave_int__class_id(_pt, _size, _angle, _response, _octave, _class_id) }.into_result()
    }
    
    // identifier: cv_KeyPoint_KeyPoint_float_x_float_y_float__size_float__angle_float__response_int__octave_int__class_id
    /// ## Parameters
    /// * x: x-coordinate of the keypoint
    /// * y: y-coordinate of the keypoint
    /// * _size: keypoint diameter
    /// * _angle: keypoint orientation
    /// * _response: keypoint detector response on the keypoint (that is, strength of the keypoint)
    /// * _octave: pyramid octave in which the keypoint has been detected
    /// * _class_id: object id
    ///
    /// ## C++ default parameters:
    /// * _angle: -1
    /// * _response: 0
    /// * _octave: 0
    /// * _class_id: -1
    pub fn new_coords(x: f32, y: f32, _size: f32, _angle: f32, _response: f32, _octave: i32, _class_id: i32) -> Result<core::KeyPoint> {
        unsafe { sys::cv_core_cv_KeyPoint_KeyPoint_float_x_float_y_float__size_float__angle_float__response_int__octave_int__class_id(x, y, _size, _angle, _response, _octave, _class_id) }.into_result()
    }
    
    // identifier: cv_KeyPoint_hash_const
    pub fn hash(self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_KeyPoint_hash_const(self) }.into_result()
    }
    
    // identifier: cv_KeyPoint_convert_VectorOfKeyPoint_keypoints_VectorOfPoint2f_points2f_VectorOfint_keypointIndexes
    /// This method converts vector of keypoints to vector of points or the reverse, where each keypoint is
    /// assigned the same size and the same orientation.
    /// 
    /// ## Parameters
    /// * keypoints: Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB
    /// * points2f: Array of (x,y) coordinates of each keypoint
    /// * keypointIndexes: Array of indexes of keypoints to be converted to points. (Acts like a mask to
    /// convert only specified keypoints)
    ///
    /// ## C++ default parameters:
    /// * keypoint_indexes: std::vector<int>()
    pub fn convert_from(keypoints: &types::VectorOfKeyPoint, points2f: &types::VectorOfPoint2f, keypoint_indexes: &types::VectorOfint) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPoint_convert_VectorOfKeyPoint_keypoints_VectorOfPoint2f_points2f_VectorOfint_keypointIndexes(keypoints.as_raw_VectorOfKeyPoint(), points2f.as_raw_VectorOfPoint2f(), keypoint_indexes.as_raw_VectorOfint()) }.into_result()
    }
    
    // identifier: cv_KeyPoint_convert_VectorOfPoint2f_points2f_VectorOfKeyPoint_keypoints_float_size_float_response_int_octave_int_class_id
    /// @overload
    /// ## Parameters
    /// * points2f: Array of (x,y) coordinates of each keypoint
    /// * keypoints: Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB
    /// * size: keypoint diameter
    /// * response: keypoint detector response on the keypoint (that is, strength of the keypoint)
    /// * octave: pyramid octave in which the keypoint has been detected
    /// * class_id: object id
    ///
    /// ## C++ default parameters:
    /// * size: 1
    /// * response: 1
    /// * octave: 0
    /// * class_id: -1
    pub fn convert_to(points2f: &types::VectorOfPoint2f, keypoints: &types::VectorOfKeyPoint, size: f32, response: f32, octave: i32, class_id: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPoint_convert_VectorOfPoint2f_points2f_VectorOfKeyPoint_keypoints_float_size_float_response_int_octave_int_class_id(points2f.as_raw_VectorOfPoint2f(), keypoints.as_raw_VectorOfKeyPoint(), size, response, octave, class_id) }.into_result()
    }
    
    // identifier: cv_KeyPoint_overlap_KeyPoint_kp1_KeyPoint_kp2
    /// This method computes overlap for pair of keypoints. Overlap is the ratio between area of keypoint
    /// regions' intersection and area of keypoint regions' union (considering keypoint region as circle).
    /// If they don't overlap, we get zero. If they coincide at same location with same size, we get 1.
    /// ## Parameters
    /// * kp1: First keypoint
    /// * kp2: Second keypoint
    pub fn overlap(kp1: core::KeyPoint, kp2: core::KeyPoint) -> Result<f32> {
        unsafe { sys::cv_core_cv_KeyPoint_overlap_KeyPoint_kp1_KeyPoint_kp2(kp1, kp2) }.into_result()
    }
    
}

// boxed class cv::KeyPointsFilter
/// A class filters a vector of keypoints.
/// 
/// Because now it is difficult to provide a convenient interface for all usage scenarios of the
/// keypoints filter class, it has only several needed by now static methods.
#[allow(dead_code)]
pub struct KeyPointsFilter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::KeyPointsFilter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_KeyPointsFilter(self.ptr) };
    }
}
impl core::KeyPointsFilter {
    #[doc(hidden)] pub fn as_raw_KeyPointsFilter(&self) -> *mut c_void { self.ptr }
}

impl KeyPointsFilter {

    // identifier: cv_KeyPointsFilter_KeyPointsFilter
    pub fn new() -> Result<core::KeyPointsFilter> {
        unsafe { sys::cv_core_cv_KeyPointsFilter_KeyPointsFilter() }.into_result().map(|x| core::KeyPointsFilter { ptr: x })
    }
    
    // identifier: cv_KeyPointsFilter_runByImageBorder_VectorOfKeyPoint_keypoints_Size_imageSize_int_borderSize
    pub fn run_by_image_border(keypoints: &types::VectorOfKeyPoint, image_size: core::Size, border_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPointsFilter_runByImageBorder_VectorOfKeyPoint_keypoints_Size_imageSize_int_borderSize(keypoints.as_raw_VectorOfKeyPoint(), image_size, border_size) }.into_result()
    }
    
    // identifier: cv_KeyPointsFilter_runByKeypointSize_VectorOfKeyPoint_keypoints_float_minSize_float_maxSize
    ///
    /// ## C++ default parameters:
    /// * max_size: FLT_MAX
    pub fn run_by_keypoint_size(keypoints: &types::VectorOfKeyPoint, min_size: f32, max_size: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPointsFilter_runByKeypointSize_VectorOfKeyPoint_keypoints_float_minSize_float_maxSize(keypoints.as_raw_VectorOfKeyPoint(), min_size, max_size) }.into_result()
    }
    
    // identifier: cv_KeyPointsFilter_runByPixelsMask_VectorOfKeyPoint_keypoints_Mat_mask
    pub fn run_by_pixels_mask(keypoints: &types::VectorOfKeyPoint, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPointsFilter_runByPixelsMask_VectorOfKeyPoint_keypoints_Mat_mask(keypoints.as_raw_VectorOfKeyPoint(), mask.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_KeyPointsFilter_removeDuplicated_VectorOfKeyPoint_keypoints
    pub fn remove_duplicated(keypoints: &types::VectorOfKeyPoint) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPointsFilter_removeDuplicated_VectorOfKeyPoint_keypoints(keypoints.as_raw_VectorOfKeyPoint()) }.into_result()
    }
    
    // identifier: cv_KeyPointsFilter_removeDuplicatedSorted_VectorOfKeyPoint_keypoints
    pub fn remove_duplicated_sorted(keypoints: &types::VectorOfKeyPoint) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPointsFilter_removeDuplicatedSorted_VectorOfKeyPoint_keypoints(keypoints.as_raw_VectorOfKeyPoint()) }.into_result()
    }
    
    // identifier: cv_KeyPointsFilter_retainBest_VectorOfKeyPoint_keypoints_int_npoints
    pub fn retain_best(keypoints: &types::VectorOfKeyPoint, npoints: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_KeyPointsFilter_retainBest_VectorOfKeyPoint_keypoints_int_npoints(keypoints.as_raw_VectorOfKeyPoint(), npoints) }.into_result()
    }
    
}

// boxed class cv::LDA
/// Linear Discriminant Analysis
/// @todo document this class
#[allow(dead_code)]
pub struct LDA {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::LDA {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_LDA(self.ptr) };
    }
}
impl core::LDA {
    #[doc(hidden)] pub fn as_raw_LDA(&self) -> *mut c_void { self.ptr }
}

impl LDA {

    // identifier: cv_LDA_LDA_int_num_components
    /// constructor
    /// Initializes a LDA with num_components (default 0).
    ///
    /// ## C++ default parameters:
    /// * num_components: 0
    pub fn new(num_components: i32) -> Result<core::LDA> {
        unsafe { sys::cv_core_cv_LDA_LDA_int_num_components(num_components) }.into_result().map(|x| core::LDA { ptr: x })
    }
    
    // identifier: cv_LDA_LDA_VectorOfMat_src_Mat_labels_int_num_components
    /// Initializes and performs a Discriminant Analysis with Fisher's
    /// Optimization Criterion on given data in src and corresponding labels
    /// in labels. If 0 (or less) number of components are given, they are
    /// automatically determined for given data in computation.
    ///
    /// ## C++ default parameters:
    /// * num_components: 0
    pub fn new_1(src: &types::VectorOfMat, labels: &core::Mat, num_components: i32) -> Result<core::LDA> {
        unsafe { sys::cv_core_cv_LDA_LDA_VectorOfMat_src_Mat_labels_int_num_components(src.as_raw_VectorOfMat(), labels.as_raw_Mat(), num_components) }.into_result().map(|x| core::LDA { ptr: x })
    }
    
    // identifier: cv_LDA_save_const_String_filename
    /// Serializes this object to a given filename.
    pub fn save(&self, filename: &str) -> Result<()> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_LDA_save_const_String_filename(self.as_raw_LDA(), filename.as_ptr()) }.into_result()
    }
    
    // identifier: cv_LDA_load_String_filename
    /// Deserializes this object from a given filename.
    pub fn load(&mut self, filename: &str) -> Result<()> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_LDA_load_String_filename(self.as_raw_LDA(), filename.as_ptr()) }.into_result()
    }
    
    // identifier: cv_LDA_compute_VectorOfMat_src_Mat_labels
    /// Compute the discriminants for data in src (row aligned) and labels.
    pub fn compute(&mut self, src: &types::VectorOfMat, labels: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_LDA_compute_VectorOfMat_src_Mat_labels(self.as_raw_LDA(), src.as_raw_VectorOfMat(), labels.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_LDA_project_Mat_src
    /// Projects samples into the LDA subspace.
    /// src may be one or more row aligned samples.
    pub fn project(&mut self, src: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_LDA_project_Mat_src(self.as_raw_LDA(), src.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_LDA_reconstruct_Mat_src
    /// Reconstructs projections from the LDA subspace.
    /// src may be one or more row aligned projections.
    pub fn reconstruct(&mut self, src: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_LDA_reconstruct_Mat_src(self.as_raw_LDA(), src.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_LDA_eigenvectors_const
    /// Returns the eigenvectors of this LDA.
    pub fn eigenvectors(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_LDA_eigenvectors_const(self.as_raw_LDA()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_LDA_eigenvalues_const
    /// Returns the eigenvalues of this LDA.
    pub fn eigenvalues(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_LDA_eigenvalues_const(self.as_raw_LDA()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_LDA_subspaceProject_Mat_W_Mat_mean_Mat_src
    pub fn subspace_project(w: &core::Mat, mean: &core::Mat, src: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_LDA_subspaceProject_Mat_W_Mat_mean_Mat_src(w.as_raw_Mat(), mean.as_raw_Mat(), src.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_LDA_subspaceReconstruct_Mat_W_Mat_mean_Mat_src
    pub fn subspace_reconstruct(w: &core::Mat, mean: &core::Mat, src: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_LDA_subspaceReconstruct_Mat_W_Mat_mean_Mat_src(w.as_raw_Mat(), mean.as_raw_Mat(), src.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// boxed class cv::LineIterator
/// Line iterator
/// 
/// The class is used to iterate over all the pixels on the raster line
/// segment connecting two specified points.
/// 
/// The class LineIterator is used to get each pixel of a raster line. It
/// can be treated as versatile implementation of the Bresenham algorithm
/// where you can stop at each pixel and do some extra processing, for
/// example, grab pixel values along the line or draw a line with an effect
/// (for example, with XOR operation).
/// 
/// The number of pixels along the line is stored in LineIterator::count.
/// The method LineIterator::pos returns the current position in the image:
/// 
/// ```ignore{.cpp}
/// // grabs pixels along the line (pt1, pt2)
/// // from 8-bit 3-channel image to the buffer
/// LineIterator it(img, pt1, pt2, 8);
/// LineIterator it2 = it;
/// vector<Vec3b> buf(it.count);
/// 
/// for(int i = 0; i < it.count; i++, ++it)
/// buf[i] = *(const Vec3b*)*it;
/// 
/// // alternative way of iterating through the line
/// for(int i = 0; i < it2.count; i++, ++it2)
/// {
/// Vec3b val = img.at<Vec3b>(it2.pos());
/// CV_Assert(buf[i] == val);
/// }
/// ```
#[allow(dead_code)]
pub struct LineIterator {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::LineIterator {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_LineIterator(self.ptr) };
    }
}
impl core::LineIterator {
    #[doc(hidden)] pub fn as_raw_LineIterator(&self) -> *mut c_void { self.ptr }
}

impl LineIterator {

    // identifier: cv_LineIterator_LineIterator_Mat_img_Point_pt1_Point_pt2_int_connectivity_bool_leftToRight
    /// initializes the iterator
    /// 
    /// creates iterators for the line connecting pt1 and pt2
    /// the line will be clipped on the image boundaries
    /// the line is 8-connected or 4-connected
    /// If leftToRight=true, then the iteration is always done
    /// from the left-most point to the right most,
    /// not to depend on the ordering of pt1 and pt2 parameters
    ///
    /// ## C++ default parameters:
    /// * connectivity: 8
    /// * left_to_right: false
    pub fn new(img: &core::Mat, pt1: core::Point, pt2: core::Point, connectivity: i32, left_to_right: bool) -> Result<core::LineIterator> {
        unsafe { sys::cv_core_cv_LineIterator_LineIterator_Mat_img_Point_pt1_Point_pt2_int_connectivity_bool_leftToRight(img.as_raw_Mat(), pt1, pt2, connectivity, left_to_right) }.into_result().map(|x| core::LineIterator { ptr: x })
    }
    
    // identifier: cv_LineIterator_pos_const
    /// returns coordinates of the current pixel
    pub fn pos(&self) -> Result<core::Point> {
        unsafe { sys::cv_core_cv_LineIterator_pos_const(self.as_raw_LineIterator()) }.into_result()
    }
    
}

// Generating impl for trait cv::LineSegmentDetector (trait)
/// Line segment detector class
/// 
/// following the algorithm described at @cite Rafael12 .
pub trait LineSegmentDetector : core::Algorithm {
    #[doc(hidden)] fn as_raw_LineSegmentDetector(&self) -> *mut c_void;
    // identifier: cv_LineSegmentDetector_detect_Mat__image_Mat__lines_Mat_width_Mat_prec_Mat_nfa
    /// Finds lines in the input image.
    /// 
    /// This is the output of the default parameters of the algorithm on the above shown image.
    /// 
    /// ![image](pics/building_lsd.png)
    /// 
    /// ## Parameters
    /// * _image: A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use:
    /// `lsd_ptr-\>detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);`
    /// * _lines: A vector of Vec4i or Vec4f elements specifying the beginning and ending point of a line. Where
    /// Vec4i/Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are strictly
    /// oriented depending on the gradient.
    /// * width: Vector of widths of the regions, where the lines are found. E.g. Width of line.
    /// * prec: Vector of precisions with which the lines are found.
    /// * nfa: Vector containing number of false alarms in the line region, with precision of 10%. The
    /// bigger the value, logarithmically better the detection.
    /// - -1 corresponds to 10 mean false alarms
    /// - 0 corresponds to 1 mean false alarm
    /// - 1 corresponds to 0.1 mean false alarms
    /// This vector will be calculated only when the objects type is #LSD_REFINE_ADV.
    ///
    /// ## C++ default parameters:
    /// * width: noArray()
    /// * prec: noArray()
    /// * nfa: noArray()
    fn detect(&mut self, _image: &core::Mat, _lines: &mut core::Mat, width: &mut core::Mat, prec: &mut core::Mat, nfa: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_LineSegmentDetector_detect_Mat__image_Mat__lines_Mat_width_Mat_prec_Mat_nfa(self.as_raw_LineSegmentDetector(), _image.as_raw_Mat(), _lines.as_raw_Mat(), width.as_raw_Mat(), prec.as_raw_Mat(), nfa.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_LineSegmentDetector_drawSegments_Mat__image_Mat_lines
    /// Draws the line segments on a given image.
    /// ## Parameters
    /// * _image: The image, where the lines will be drawn. Should be bigger or equal to the image,
    /// where the lines were found.
    /// * lines: A vector of the lines that needed to be drawn.
    fn draw_segments(&mut self, _image: &mut core::Mat, lines: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_LineSegmentDetector_drawSegments_Mat__image_Mat_lines(self.as_raw_LineSegmentDetector(), _image.as_raw_Mat(), lines.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_LineSegmentDetector_compareSegments_Size_size_Mat_lines1_Mat_lines2_Mat__image
    /// Draws two groups of lines in blue and red, counting the non overlapping (mismatching) pixels.
    /// 
    /// ## Parameters
    /// * size: The size of the image, where lines1 and lines2 were found.
    /// * lines1: The first group of lines that needs to be drawn. It is visualized in blue color.
    /// * lines2: The second group of lines. They visualized in red color.
    /// * _image: Optional image, where the lines will be drawn. The image should be color(3-channel)
    /// in order for lines1 and lines2 to be drawn in the above mentioned colors.
    ///
    /// ## C++ default parameters:
    /// * _image: noArray()
    fn compare_segments(&mut self, size: core::Size, lines1: &core::Mat, lines2: &core::Mat, _image: &mut core::Mat) -> Result<i32> {
        unsafe { sys::cv_core_cv_LineSegmentDetector_compareSegments_Size_size_Mat_lines1_Mat_lines2_Mat__image(self.as_raw_LineSegmentDetector(), size, lines1.as_raw_Mat(), lines2.as_raw_Mat(), _image.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> LineSegmentDetector + 'a {

}

// Generating impl for trait cv::MSER (trait)
/// Maximally stable extremal region extractor
/// 
/// The class encapsulates all the parameters of the %MSER extraction algorithm (see [wiki
/// article](http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions)).
/// 
/// - there are two different implementation of %MSER: one for grey image, one for color image
/// 
/// - the grey image algorithm is taken from: @cite nister2008linear ;  the paper claims to be faster
/// than union-find method; it actually get 1.5~2m/s on my centrino L7200 1.2GHz laptop.
/// 
/// - the color image algorithm is taken from: @cite forssen2007maximally ; it should be much slower
/// than grey image method ( 3~4 times ); the chi_table.h file is taken directly from paper's source
/// code which is distributed under GPL.
/// 
/// - (Python) A complete example showing the use of the %MSER detector can be found at samples/python/mser.py
pub trait MSER : core::Feature2D {
    #[doc(hidden)] fn as_raw_MSER(&self) -> *mut c_void;
    // identifier: cv_MSER_detectRegions_Mat_image_VectorOfVectorOfPoint_msers_VectorOfRect_bboxes
    /// Detect %MSER regions
    /// 
    /// ## Parameters
    /// * image: input image (8UC1, 8UC3 or 8UC4, must be greater or equal than 3x3)
    /// * msers: resulting list of point sets
    /// * bboxes: resulting bounding boxes
    fn detect_regions(&mut self, image: &core::Mat, msers: &types::VectorOfVectorOfPoint, bboxes: &types::VectorOfRect) -> Result<()> {
        unsafe { sys::cv_core_cv_MSER_detectRegions_Mat_image_VectorOfVectorOfPoint_msers_VectorOfRect_bboxes(self.as_raw_MSER(), image.as_raw_Mat(), msers.as_raw_VectorOfVectorOfPoint(), bboxes.as_raw_VectorOfRect()) }.into_result()
    }
    
    // identifier: cv_MSER_setDelta_int_delta
    fn set_delta(&mut self, delta: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_MSER_setDelta_int_delta(self.as_raw_MSER(), delta) }.into_result()
    }
    
    // identifier: cv_MSER_getDelta_const
    fn get_delta(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_MSER_getDelta_const(self.as_raw_MSER()) }.into_result()
    }
    
    // identifier: cv_MSER_setMinArea_int_minArea
    fn set_min_area(&mut self, min_area: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_MSER_setMinArea_int_minArea(self.as_raw_MSER(), min_area) }.into_result()
    }
    
    // identifier: cv_MSER_getMinArea_const
    fn get_min_area(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_MSER_getMinArea_const(self.as_raw_MSER()) }.into_result()
    }
    
    // identifier: cv_MSER_setMaxArea_int_maxArea
    fn set_max_area(&mut self, max_area: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_MSER_setMaxArea_int_maxArea(self.as_raw_MSER(), max_area) }.into_result()
    }
    
    // identifier: cv_MSER_getMaxArea_const
    fn get_max_area(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_MSER_getMaxArea_const(self.as_raw_MSER()) }.into_result()
    }
    
    // identifier: cv_MSER_setPass2Only_bool_f
    fn set_pass2_only(&mut self, f: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_MSER_setPass2Only_bool_f(self.as_raw_MSER(), f) }.into_result()
    }
    
    // identifier: cv_MSER_getPass2Only_const
    fn get_pass2_only(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_MSER_getPass2Only_const(self.as_raw_MSER()) }.into_result()
    }
    
    // identifier: cv_MSER_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_MSER_getDefaultName_const(self.as_raw_MSER()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> MSER + 'a {

    // identifier: cv_MSER_create_int__delta_int__min_area_int__max_area_double__max_variation_double__min_diversity_int__max_evolution_double__area_threshold_double__min_margin_int__edge_blur_size
    /// Full consturctor for %MSER detector
    /// 
    /// ## Parameters
    /// * _delta: it compares <span lang='latex'>(size_{i}-size_{i-delta})/size_{i-delta}</span>
    /// * _min_area: prune the area which smaller than minArea
    /// * _max_area: prune the area which bigger than maxArea
    /// * _max_variation: prune the area have similar size to its children
    /// * _min_diversity: for color image, trace back to cut off mser with diversity less than min_diversity
    /// * _max_evolution:  for color image, the evolution steps
    /// * _area_threshold: for color image, the area threshold to cause re-initialize
    /// * _min_margin: for color image, ignore too small margin
    /// * _edge_blur_size: for color image, the aperture size for edge blur
    ///
    /// ## C++ default parameters:
    /// * _delta: 5
    /// * _min_area: 60
    /// * _max_area: 14400
    /// * _max_variation: 0.25
    /// * _min_diversity: .2
    /// * _max_evolution: 200
    /// * _area_threshold: 1.01
    /// * _min_margin: 0.003
    /// * _edge_blur_size: 5
    pub fn create(_delta: i32, _min_area: i32, _max_area: i32, _max_variation: f64, _min_diversity: f64, _max_evolution: i32, _area_threshold: f64, _min_margin: f64, _edge_blur_size: i32) -> Result<types::PtrOfMSER> {
        unsafe { sys::cv_core_cv_MSER_create_int__delta_int__min_area_int__max_area_double__max_variation_double__min_diversity_int__max_evolution_double__area_threshold_double__min_margin_int__edge_blur_size(_delta, _min_area, _max_area, _max_variation, _min_diversity, _max_evolution, _area_threshold, _min_margin, _edge_blur_size) }.into_result().map(|x| types::PtrOfMSER { ptr: x })
    }
    
}

// boxed class cv::Mat
/// n-dimensional dense array class \anchor CVMat_Details
/// 
/// The class Mat represents an n-dimensional dense numerical single-channel or multi-channel array. It
/// can be used to store real or complex-valued vectors and matrices, grayscale or color images, voxel
/// volumes, vector fields, point clouds, tensors, histograms (though, very high-dimensional histograms
/// may be better stored in a SparseMat ). The data layout of the array `M` is defined by the array
/// `M.step[]`, so that the address of element <span lang='latex'>(i_0,...,i_{M.dims-1})</span>, where <span lang='latex'>0\leq i_k<M.size[k]</span>, is
/// computed as:
/// <div lang='latex'>addr(M_{i_0,...,i_{M.dims-1}}) = M.data + M.step[0]*i_0 + M.step[1]*i_1 + ... + M.step[M.dims-1]*i_{M.dims-1}</div>
/// In case of a 2-dimensional array, the above formula is reduced to:
/// <div lang='latex'>addr(M_{i,j}) = M.data + M.step[0]*i + M.step[1]*j</div>
/// Note that `M.step[i] >= M.step[i+1]` (in fact, `M.step[i] >= M.step[i+1]*M.size[i+1]` ). This means
/// that 2-dimensional matrices are stored row-by-row, 3-dimensional matrices are stored plane-by-plane,
/// and so on. M.step[M.dims-1] is minimal and always equal to the element size M.elemSize() .
/// 
/// So, the data layout in Mat is fully compatible with CvMat, IplImage, and CvMatND types from OpenCV
/// 1.x. It is also compatible with the majority of dense array types from the standard toolkits and
/// SDKs, such as Numpy (ndarray), Win32 (independent device bitmaps), and others, that is, with any
/// array that uses *steps* (or *strides*) to compute the position of a pixel. Due to this
/// compatibility, it is possible to make a Mat header for user-allocated data and process it in-place
/// using OpenCV functions.
/// 
/// There are many different ways to create a Mat object. The most popular options are listed below:
/// 
/// - Use the create(nrows, ncols, type) method or the similar Mat(nrows, ncols, type[, fillValue])
/// constructor. A new array of the specified size and type is allocated. type has the same meaning as
/// in the cvCreateMat method. For example, CV_8UC1 means a 8-bit single-channel array, CV_32FC2
/// means a 2-channel (complex) floating-point array, and so on.
/// ```ignore
/// // make a 7x7 complex matrix filled with 1+3j.
/// Mat M(7,7,CV_32FC2,Scalar(1,3));
/// // and now turn M to a 100x60 15-channel 8-bit matrix.
/// // The old content will be deallocated
/// M.create(100,60,CV_8UC(15));
/// ```
/// 
/// As noted in the introduction to this chapter, create() allocates only a new array when the shape
/// or type of the current array are different from the specified ones.
/// 
/// - Create a multi-dimensional array:
/// ```ignore
/// // create a 100x100x100 8-bit array
/// int sz[] = {100, 100, 100};
/// Mat bigCube(3, sz, CV_8U, Scalar::all(0));
/// ```
/// 
/// It passes the number of dimensions =1 to the Mat constructor but the created array will be
/// 2-dimensional with the number of columns set to 1. So, Mat::dims is always \>= 2 (can also be 0
/// when the array is empty).
/// 
/// - Use a copy constructor or assignment operator where there can be an array or expression on the
/// right side (see below). As noted in the introduction, the array assignment is an O(1) operation
/// because it only copies the header and increases the reference counter. The Mat::clone() method can
/// be used to get a full (deep) copy of the array when you need it.
/// 
/// - Construct a header for a part of another array. It can be a single row, single column, several
/// rows, several columns, rectangular region in the array (called a *minor* in algebra) or a
/// diagonal. Such operations are also O(1) because the new header references the same data. You can
/// actually modify a part of the array using this feature, for example:
/// ```ignore
/// // add the 5-th row, multiplied by 3 to the 3rd row
/// M.row(3) = M.row(3) + M.row(5)*3;
/// // now copy the 7-th column to the 1-st column
/// // M.col(1) = M.col(7); // this will not work
/// Mat M1 = M.col(1);
/// M.col(7).copyTo(M1);
/// // create a new 320x240 image
/// Mat img(Size(320,240),CV_8UC3);
/// // select a ROI
/// Mat roi(img, Rect(10,10,100,100));
/// // fill the ROI with (0,255,0) (which is green in RGB space);
/// // the original 320x240 image will be modified
/// roi = Scalar(0,255,0);
/// ```
/// 
/// Due to the additional datastart and dataend members, it is possible to compute a relative
/// sub-array position in the main *container* array using locateROI():
/// ```ignore
/// Mat A = Mat::eye(10, 10, CV_32S);
/// // extracts A columns, 1 (inclusive) to 3 (exclusive).
/// Mat B = A(Range::all(), Range(1, 3));
/// // extracts B rows, 5 (inclusive) to 9 (exclusive).
/// // that is, C \~ A(Range(5, 9), Range(1, 3))
/// Mat C = B(Range(5, 9), Range::all());
/// Size size; Point ofs;
/// C.locateROI(size, ofs);
/// // size will be (width=10,height=10) and the ofs will be (x=1, y=5)
/// ```
/// 
/// As in case of whole matrices, if you need a deep copy, use the `clone()` method of the extracted
/// sub-matrices.
/// 
/// - Make a header for user-allocated data. It can be useful to do the following:
/// -# Process "foreign" data using OpenCV (for example, when you implement a DirectShow\* filter or
/// a processing module for gstreamer, and so on). For example:
/// ```ignore
/// void process_video_frame(const unsigned char* pixels,
/// int width, int height, int step)
/// {
/// Mat img(height, width, CV_8UC3, pixels, step);
/// GaussianBlur(img, img, Size(7,7), 1.5, 1.5);
/// }
/// ```
/// 
/// -# Quickly initialize small matrices and/or get a super-fast element access.
/// ```ignore
/// double m[3][3] = {{a, b, c}, {d, e, f}, {g, h, i}};
/// Mat M = Mat(3, 3, CV_64F, m).inv();
/// ```
/// 
/// .
/// Partial yet very common cases of this *user-allocated data* case are conversions from CvMat and
/// IplImage to Mat. For this purpose, there is function cv::cvarrToMat taking pointers to CvMat or
/// IplImage and the optional flag indicating whether to copy the data or not.
/// @snippet samples/cpp/image.cpp iplimage
/// 
/// - Use MATLAB-style array initializers, zeros(), ones(), eye(), for example:
/// ```ignore
/// // create a double-precision identity matrix and add it to M.
/// M += Mat::eye(M.rows, M.cols, CV_64F);
/// ```
/// 
/// 
/// - Use a comma-separated initializer:
/// ```ignore
/// // create a 3x3 double-precision identity matrix
/// Mat M = (Mat_<double>(3,3) << 1, 0, 0, 0, 1, 0, 0, 0, 1);
/// ```
/// 
/// With this approach, you first call a constructor of the Mat class with the proper parameters, and
/// then you just put `<< operator` followed by comma-separated values that can be constants,
/// variables, expressions, and so on. Also, note the extra parentheses required to avoid compilation
/// errors.
/// 
/// Once the array is created, it is automatically managed via a reference-counting mechanism. If the
/// array header is built on top of user-allocated data, you should handle the data by yourself. The
/// array data is deallocated when no one points to it. If you want to release the data pointed by a
/// array header before the array destructor is called, use Mat::release().
/// 
/// The next important thing to learn about the array class is element access. This manual already
/// described how to compute an address of each array element. Normally, you are not required to use the
/// formula directly in the code. If you know the array element type (which can be retrieved using the
/// method Mat::type() ), you can access the element <span lang='latex'>M_{ij}</span> of a 2-dimensional array as:
/// ```ignore
/// M.at<double>(i,j) += 1.f;
/// ```
/// 
/// assuming that `M` is a double-precision floating-point array. There are several variants of the method
/// at for a different number of dimensions.
/// 
/// If you need to process a whole row of a 2D array, the most efficient way is to get the pointer to
/// the row first, and then just use the plain C operator [] :
/// ```ignore
/// // compute sum of positive matrix elements
/// // (assuming that M is a double-precision matrix)
/// double sum=0;
/// for(int i = 0; i < M.rows; i++)
/// {
/// const double* Mi = M.ptr<double>(i);
/// for(int j = 0; j < M.cols; j++)
/// sum += std::max(Mi[j], 0.);
/// }
/// ```
/// 
/// Some operations, like the one above, do not actually depend on the array shape. They just process
/// elements of an array one by one (or elements from multiple arrays that have the same coordinates,
/// for example, array addition). Such operations are called *element-wise*. It makes sense to check
/// whether all the input/output arrays are continuous, namely, have no gaps at the end of each row. If
/// yes, process them as a long single row:
/// ```ignore
/// // compute the sum of positive matrix elements, optimized variant
/// double sum=0;
/// int cols = M.cols, rows = M.rows;
/// if(M.isContinuous())
/// {
/// cols *= rows;
/// rows = 1;
/// }
/// for(int i = 0; i < rows; i++)
/// {
/// const double* Mi = M.ptr<double>(i);
/// for(int j = 0; j < cols; j++)
/// sum += std::max(Mi[j], 0.);
/// }
/// ```
/// 
/// In case of the continuous matrix, the outer loop body is executed just once. So, the overhead is
/// smaller, which is especially noticeable in case of small matrices.
/// 
/// Finally, there are STL-style iterators that are smart enough to skip gaps between successive rows:
/// ```ignore
/// // compute sum of positive matrix elements, iterator-based variant
/// double sum=0;
/// MatConstIterator_<double> it = M.begin<double>(), it_end = M.end<double>();
/// for(; it != it_end; ++it)
/// sum += std::max(*it, 0.);
/// ```
/// 
/// The matrix iterators are random-access iterators, so they can be passed to any STL algorithm,
/// including std::sort().
/// 
/// 
/// Note: Matrix Expressions and arithmetic see MatExpr
#[allow(dead_code)]
pub struct Mat {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Mat {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Mat(self.ptr) };
    }
}
impl core::Mat {
    #[doc(hidden)] pub fn as_raw_Mat(&self) -> *mut c_void { self.ptr }
}

impl Mat {

    // identifier: cv_Mat_Mat
    /// These are various constructors that form a matrix. As noted in the AutomaticAllocation, often
    /// the default constructor is enough, and the proper matrix will be allocated by an OpenCV function.
    /// The constructed matrix can further be assigned to another matrix or matrix expression or can be
    /// allocated with Mat::create . In the former case, the old content is de-referenced.
    pub fn new() -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat() }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_int_rows_int_cols_int_type
    /// @overload
    /// ## Parameters
    /// * rows: Number of rows in a 2D array.
    /// * cols: Number of columns in a 2D array.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    pub fn new_rows_cols(rows: i32, cols: i32, _type: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_int_rows_int_cols_int_type(rows, cols, _type) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Size_size_int_type
    /// @overload
    /// ## Parameters
    /// * size: 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the
    /// number of columns go in the reverse order.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    pub fn new_size(size: core::Size, _type: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Size_size_int_type(size, _type) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_int_rows_int_cols_int_type_Scalar_s
    /// @overload
    /// ## Parameters
    /// * rows: Number of rows in a 2D array.
    /// * cols: Number of columns in a 2D array.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * s: An optional value to initialize each matrix element with. To set all the matrix elements to
    /// the particular value after the construction, use the assignment operator
    /// Mat::operator=(const Scalar& value) .
    pub fn new_rows_cols_with_default(rows: i32, cols: i32, _type: i32, s: core::Scalar) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_int_rows_int_cols_int_type_Scalar_s(rows, cols, _type, s) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Size_size_int_type_Scalar_s
    /// @overload
    /// ## Parameters
    /// * size: 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the
    /// number of columns go in the reverse order.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * s: An optional value to initialize each matrix element with. To set all the matrix elements to
    /// the particular value after the construction, use the assignment operator
    /// Mat::operator=(const Scalar& value) .
    pub fn new_size_with_default(size: core::Size, _type: i32, s: core::Scalar) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Size_size_int_type_Scalar_s(size, _type, s) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_int_ndims_const_int_X_sizes_int_type
    /// @overload
    /// ## Parameters
    /// * ndims: Array dimensionality.
    /// * sizes: Array of integers specifying an n-dimensional array shape.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    pub fn new_1(ndims: i32, sizes: &i32, _type: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_int_ndims_const_int_X_sizes_int_type(ndims, sizes, _type) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_VectorOfint_sizes_int_type
    /// @overload
    /// ## Parameters
    /// * sizes: Array of integers specifying an n-dimensional array shape.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    pub fn new_2(sizes: &types::VectorOfint, _type: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_VectorOfint_sizes_int_type(sizes.as_raw_VectorOfint(), _type) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_int_ndims_const_int_X_sizes_int_type_Scalar_s
    /// @overload
    /// ## Parameters
    /// * ndims: Array dimensionality.
    /// * sizes: Array of integers specifying an n-dimensional array shape.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * s: An optional value to initialize each matrix element with. To set all the matrix elements to
    /// the particular value after the construction, use the assignment operator
    /// Mat::operator=(const Scalar& value) .
    pub fn new_3(ndims: i32, sizes: &i32, _type: i32, s: core::Scalar) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_int_ndims_const_int_X_sizes_int_type_Scalar_s(ndims, sizes, _type, s) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_VectorOfint_sizes_int_type_Scalar_s
    /// @overload
    /// ## Parameters
    /// * sizes: Array of integers specifying an n-dimensional array shape.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * s: An optional value to initialize each matrix element with. To set all the matrix elements to
    /// the particular value after the construction, use the assignment operator
    /// Mat::operator=(const Scalar& value) .
    pub fn new_4(sizes: &types::VectorOfint, _type: i32, s: core::Scalar) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_VectorOfint_sizes_int_type_Scalar_s(sizes.as_raw_VectorOfint(), _type, s) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Mat_m
    /// @overload
    /// ## Parameters
    /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied
    /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and
    /// associated with it. The reference counter, if any, is incremented. So, when you modify the matrix
    /// formed using such a constructor, you also modify the corresponding elements of m . If you want to
    /// have an independent copy of the sub-array, use Mat::clone() .
    pub fn copy(m: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Mat_m(m.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_int_rows_int_cols_int_type_void_X_data_size_t_step
    /// @overload
    /// ## Parameters
    /// * rows: Number of rows in a 2D array.
    /// * cols: Number of columns in a 2D array.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * data: Pointer to the user data. Matrix constructors that take data and step parameters do not
    /// allocate matrix data. Instead, they just initialize the matrix header that points to the specified
    /// data, which means that no data is copied. This operation is very efficient and can be used to
    /// process external data using OpenCV functions. The external data is not automatically deallocated, so
    /// you should take care of it.
    /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at
    /// the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed
    /// and the actual step is calculated as cols*elemSize(). See Mat::elemSize.
    ///
    /// ## C++ default parameters:
    /// * step: AUTO_STEP
    pub fn new_5(rows: i32, cols: i32, _type: i32, data: &mut c_void, step: size_t) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_int_rows_int_cols_int_type_void_X_data_size_t_step(rows, cols, _type, data, step) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Size_size_int_type_void_X_data_size_t_step
    /// @overload
    /// ## Parameters
    /// * size: 2D array size: Size(cols, rows) . In the Size() constructor, the number of rows and the
    /// number of columns go in the reverse order.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * data: Pointer to the user data. Matrix constructors that take data and step parameters do not
    /// allocate matrix data. Instead, they just initialize the matrix header that points to the specified
    /// data, which means that no data is copied. This operation is very efficient and can be used to
    /// process external data using OpenCV functions. The external data is not automatically deallocated, so
    /// you should take care of it.
    /// * step: Number of bytes each matrix row occupies. The value should include the padding bytes at
    /// the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed
    /// and the actual step is calculated as cols*elemSize(). See Mat::elemSize.
    ///
    /// ## C++ default parameters:
    /// * step: AUTO_STEP
    pub fn new_6(size: core::Size, _type: i32, data: &mut c_void, step: size_t) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Size_size_int_type_void_X_data_size_t_step(size, _type, data, step) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_int_ndims_const_int_X_sizes_int_type_void_X_data_const_size_t_X_steps
    /// @overload
    /// ## Parameters
    /// * ndims: Array dimensionality.
    /// * sizes: Array of integers specifying an n-dimensional array shape.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * data: Pointer to the user data. Matrix constructors that take data and step parameters do not
    /// allocate matrix data. Instead, they just initialize the matrix header that points to the specified
    /// data, which means that no data is copied. This operation is very efficient and can be used to
    /// process external data using OpenCV functions. The external data is not automatically deallocated, so
    /// you should take care of it.
    /// * steps: Array of ndims-1 steps in case of a multi-dimensional array (the last step is always
    /// set to the element size). If not specified, the matrix is assumed to be continuous.
    ///
    /// ## C++ default parameters:
    /// * steps: 0
    pub fn new_7(ndims: i32, sizes: &i32, _type: i32, data: &mut c_void, steps: &size_t) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_int_ndims_const_int_X_sizes_int_type_void_X_data_const_size_t_X_steps(ndims, sizes, _type, data, steps) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_VectorOfint_sizes_int_type_void_X_data_const_size_t_X_steps
    /// @overload
    /// ## Parameters
    /// * sizes: Array of integers specifying an n-dimensional array shape.
    /// * type: Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or
    /// CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
    /// * data: Pointer to the user data. Matrix constructors that take data and step parameters do not
    /// allocate matrix data. Instead, they just initialize the matrix header that points to the specified
    /// data, which means that no data is copied. This operation is very efficient and can be used to
    /// process external data using OpenCV functions. The external data is not automatically deallocated, so
    /// you should take care of it.
    /// * steps: Array of ndims-1 steps in case of a multi-dimensional array (the last step is always
    /// set to the element size). If not specified, the matrix is assumed to be continuous.
    ///
    /// ## C++ default parameters:
    /// * steps: 0
    pub fn new_8(sizes: &types::VectorOfint, _type: i32, data: &mut c_void, steps: &size_t) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_VectorOfint_sizes_int_type_void_X_data_const_size_t_X_steps(sizes.as_raw_VectorOfint(), _type, data, steps) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Mat_m_Range_rowRange_Range_colRange
    /// @overload
    /// ## Parameters
    /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied
    /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and
    /// associated with it. The reference counter, if any, is incremented. So, when you modify the matrix
    /// formed using such a constructor, you also modify the corresponding elements of m . If you want to
    /// have an independent copy of the sub-array, use Mat::clone() .
    /// * rowRange: Range of the m rows to take. As usual, the range start is inclusive and the range
    /// end is exclusive. Use Range::all() to take all the rows.
    /// * colRange: Range of the m columns to take. Use Range::all() to take all the columns.
    ///
    /// ## C++ default parameters:
    /// * col_range: Range::all()
    pub fn rowscols(m: &core::Mat, row_range: &core::Range, col_range: &core::Range) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Mat_m_Range_rowRange_Range_colRange(m.as_raw_Mat(), row_range.as_raw_Range(), col_range.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Mat_m_Rect_roi
    /// @overload
    /// ## Parameters
    /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied
    /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and
    /// associated with it. The reference counter, if any, is incremented. So, when you modify the matrix
    /// formed using such a constructor, you also modify the corresponding elements of m . If you want to
    /// have an independent copy of the sub-array, use Mat::clone() .
    /// * roi: Region of interest.
    pub fn roi(m: &core::Mat, roi: core::Rect) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Mat_m_Rect_roi(m.as_raw_Mat(), roi) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Mat_m_const_Range_ranges
    /// @overload
    /// ## Parameters
    /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied
    /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and
    /// associated with it. The reference counter, if any, is incremented. So, when you modify the matrix
    /// formed using such a constructor, you also modify the corresponding elements of m . If you want to
    /// have an independent copy of the sub-array, use Mat::clone() .
    /// * ranges: Array of selected ranges of m along each dimensionality.
    pub fn ranges(m: &core::Mat, ranges: &core::Range) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Mat_m_const_Range_ranges(m.as_raw_Mat(), ranges.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_Mat_Mat_m_VectorOfRange_ranges
    /// @overload
    /// ## Parameters
    /// * m: Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied
    /// by these constructors. Instead, the header pointing to m data or its sub-array is constructed and
    /// associated with it. The reference counter, if any, is incremented. So, when you modify the matrix
    /// formed using such a constructor, you also modify the corresponding elements of m . If you want to
    /// have an independent copy of the sub-array, use Mat::clone() .
    /// * ranges: Array of selected ranges of m along each dimensionality.
    pub fn new_9(m: &core::Mat, ranges: &types::VectorOfRange) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_Mat_Mat_m_VectorOfRange_ranges(m.as_raw_Mat(), ranges.as_raw_VectorOfRange()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_row_const_int_y
    /// Creates a matrix header for the specified matrix row.
    /// 
    /// The method makes a new header for the specified matrix row and returns it. This is an O(1)
    /// operation, regardless of the matrix size. The underlying data of the new matrix is shared with the
    /// original matrix. Here is the example of one of the classical basic matrix processing operations,
    /// axpy, used by LU and many other algorithms:
    /// ```ignore
    /// inline void matrix_axpy(Mat& A, int i, int j, double alpha)
    /// {
    /// A.row(i) += A.row(j)*alpha;
    /// }
    /// ```
    /// 
    /// 
    /// Note: In the current implementation, the following code does not work as expected:
    /// ```ignore
    /// Mat A;
    /// ...
    /// A.row(i) = A.row(j); // will not work
    /// ```
    /// 
    /// This happens because A.row(i) forms a temporary header that is further assigned to another header.
    /// Remember that each of these operations is O(1), that is, no data is copied. Thus, the above
    /// assignment is not true if you may have expected the j-th row to be copied to the i-th row. To
    /// achieve that, you should either turn this simple assignment into an expression or use the
    /// Mat::copyTo method:
    /// ```ignore
    /// Mat A;
    /// ...
    /// // works, but looks a bit obscure.
    /// A.row(i) = A.row(j) + 0;
    /// // this is a bit longer, but the recommended method.
    /// A.row(j).copyTo(A.row(i));
    /// ```
    /// 
    /// ## Parameters
    /// * y: A 0-based row index.
    pub fn row(&self, y: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_row_const_int_y(self.as_raw_Mat(), y) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_col_const_int_x
    /// Creates a matrix header for the specified matrix column.
    /// 
    /// The method makes a new header for the specified matrix column and returns it. This is an O(1)
    /// operation, regardless of the matrix size. The underlying data of the new matrix is shared with the
    /// original matrix. See also the Mat::row description.
    /// ## Parameters
    /// * x: A 0-based column index.
    pub fn col(&self, x: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_col_const_int_x(self.as_raw_Mat(), x) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_rowRange_const_int_startrow_int_endrow
    /// Creates a matrix header for the specified row span.
    /// 
    /// The method makes a new header for the specified row span of the matrix. Similarly to Mat::row and
    /// Mat::col , this is an O(1) operation.
    /// ## Parameters
    /// * startrow: An inclusive 0-based start index of the row span.
    /// * endrow: An exclusive 0-based ending index of the row span.
    pub fn rowbounds(&self, startrow: i32, endrow: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_rowRange_const_int_startrow_int_endrow(self.as_raw_Mat(), startrow, endrow) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_rowRange_const_Range_r
    /// @overload
    /// ## Parameters
    /// * r: Range structure containing both the start and the end indices.
    pub fn row_range(&self, r: &core::Range) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_rowRange_const_Range_r(self.as_raw_Mat(), r.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_colRange_const_int_startcol_int_endcol
    /// Creates a matrix header for the specified column span.
    /// 
    /// The method makes a new header for the specified column span of the matrix. Similarly to Mat::row and
    /// Mat::col , this is an O(1) operation.
    /// ## Parameters
    /// * startcol: An inclusive 0-based start index of the column span.
    /// * endcol: An exclusive 0-based ending index of the column span.
    pub fn colbounds(&self, startcol: i32, endcol: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_colRange_const_int_startcol_int_endcol(self.as_raw_Mat(), startcol, endcol) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_colRange_const_Range_r
    /// @overload
    /// ## Parameters
    /// * r: Range structure containing both the start and the end indices.
    pub fn colrange(&self, r: &core::Range) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_colRange_const_Range_r(self.as_raw_Mat(), r.as_raw_Range()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_diag_const_int_d
    /// Extracts a diagonal from a matrix
    /// 
    /// The method makes a new header for the specified matrix diagonal. The new matrix is represented as a
    /// single-column matrix. Similarly to Mat::row and Mat::col, this is an O(1) operation.
    /// ## Parameters
    /// * d: index of the diagonal, with the following values:
    /// - `d=0` is the main diagonal.
    /// - `d<0` is a diagonal from the lower half. For example, d=-1 means the diagonal is set
    /// immediately below the main one.
    /// - `d>0` is a diagonal from the upper half. For example, d=1 means the diagonal is set
    /// immediately above the main one.
    /// For example:
    /// ```ignore
    /// Mat m = (Mat_<int>(3,3) <<
    /// 1,2,3,
    /// 4,5,6,
    /// 7,8,9);
    /// Mat d0 = m.diag(0);
    /// Mat d1 = m.diag(1);
    /// Mat d_1 = m.diag(-1);
    /// ```
    /// 
    /// The resulting matrices are
    /// ```ignore
    /// d0 =
    /// [1;
    /// 5;
    /// 9]
    /// d1 =
    /// [2;
    /// 6]
    /// d_1 =
    /// [4;
    /// 8]
    /// ```
    ///
    /// ## C++ default parameters:
    /// * d: 0
    pub fn diag(&self, d: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_diag_const_int_d(self.as_raw_Mat(), d) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_diag_Mat_d
    /// creates a diagonal matrix
    /// 
    /// The method creates a square diagonal matrix from specified main diagonal.
    /// ## Parameters
    /// * d: One-dimensional matrix that represents the main diagonal.
    pub fn diag_new_mat(d: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_diag_Mat_d(d.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_clone_const
    /// Creates a full copy of the array and the underlying data.
    /// 
    /// The method creates a full copy of the array. The original step[] is not taken into account. So, the
    /// array copy is a continuous array occupying total()*elemSize() bytes.
    pub fn clone(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_clone_const(self.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_copyTo_const_Mat_m
    /// Copies the matrix to another one.
    /// 
    /// The method copies the matrix data to another matrix. Before copying the data, the method invokes :
    /// ```ignore
    /// m.create(this->size(), this->type());
    /// ```
    /// 
    /// so that the destination matrix is reallocated if needed. While m.copyTo(m); works flawlessly, the
    /// function does not handle the case of a partial overlap between the source and the destination
    /// matrices.
    /// 
    /// When the operation mask is specified, if the Mat::create call shown above reallocates the matrix,
    /// the newly allocated matrix is initialized with all zeros before copying the data.
    /// ## Parameters
    /// * m: Destination matrix. If it does not have a proper size or type before the operation, it is
    /// reallocated.
    pub fn copy_to(&self, m: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_copyTo_const_Mat_m(self.as_raw_Mat(), m.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_copyTo_const_Mat_m_Mat_mask
    /// @overload
    /// ## Parameters
    /// * m: Destination matrix. If it does not have a proper size or type before the operation, it is
    /// reallocated.
    /// * mask: Operation mask of the same size as \*this. Its non-zero elements indicate which matrix
    /// elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels.
    pub fn copy_to_masked(&self, m: &mut core::Mat, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_copyTo_const_Mat_m_Mat_mask(self.as_raw_Mat(), m.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_convertTo_const_Mat_m_int_rtype_double_alpha_double_beta
    /// Converts an array to another data type with optional scaling.
    /// 
    /// The method converts source pixel values to the target data type. saturate_cast\<\> is applied at
    /// the end to avoid possible overflows:
    /// 
    /// <div lang='latex'>m(x,y) = saturate \_ cast<rType>( \alpha (*this)(x,y) +  \beta )</div>
    /// ## Parameters
    /// * m: output matrix; if it does not have a proper size or type before the operation, it is
    /// reallocated.
    /// * rtype: desired output matrix type or, rather, the depth since the number of channels are the
    /// same as the input has; if rtype is negative, the output matrix will have the same type as the input.
    /// * alpha: optional scale factor.
    /// * beta: optional delta added to the scaled values.
    ///
    /// ## C++ default parameters:
    /// * alpha: 1
    /// * beta: 0
    pub fn convert_to(&self, m: &mut core::Mat, rtype: i32, alpha: f64, beta: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_convertTo_const_Mat_m_int_rtype_double_alpha_double_beta(self.as_raw_Mat(), m.as_raw_Mat(), rtype, alpha, beta) }.into_result()
    }
    
    // identifier: cv_Mat_assignTo_const_Mat_m_int_type
    /// Provides a functional form of convertTo.
    /// 
    /// This is an internally used method called by the @ref MatrixExpressions engine.
    /// ## Parameters
    /// * m: Destination array.
    /// * type: Desired destination array depth (or -1 if it should be the same as the source type).
    ///
    /// ## C++ default parameters:
    /// * _type: -1
    pub fn assign_to(&self, m: &core::Mat, _type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_assignTo_const_Mat_m_int_type(self.as_raw_Mat(), m.as_raw_Mat(), _type) }.into_result()
    }
    
    // identifier: cv_Mat_setTo_Mat_value_Mat_mask
    /// Sets all or some of the array elements to the specified value.
    /// 
    /// This is an advanced variant of the Mat::operator=(const Scalar& s) operator.
    /// ## Parameters
    /// * value: Assigned scalar converted to the actual array type.
    /// * mask: Operation mask of the same size as \*this. Its non-zero elements indicate which matrix
    /// elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels
    ///
    /// ## C++ default parameters:
    /// * mask: noArray()
    pub fn set_to(&mut self, value: &core::Mat, mask: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_setTo_Mat_value_Mat_mask(self.as_raw_Mat(), value.as_raw_Mat(), mask.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_reshape_const_int_cn_int_rows
    /// Changes the shape and/or the number of channels of a 2D matrix without copying the data.
    /// 
    /// The method makes a new matrix header for \*this elements. The new matrix may have a different size
    /// and/or different number of channels. Any combination is possible if:
    /// *   No extra elements are included into the new matrix and no elements are excluded. Consequently,
    /// the product rows\*cols\*channels() must stay the same after the transformation.
    /// *   No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of
    /// rows, or the operation changes the indices of elements row in some other way, the matrix must be
    /// continuous. See Mat::isContinuous .
    /// 
    /// For example, if there is a set of 3D points stored as an STL vector, and you want to represent the
    /// points as a 3xN matrix, do the following:
    /// ```ignore
    /// std::vector<Point3f> vec;
    /// ...
    /// Mat pointMat = Mat(vec). // convert vector to Mat, O(1) operation
    /// reshape(1). // make Nx3 1-channel matrix out of Nx1 3-channel.
    /// // Also, an O(1) operation
    /// t(); // finally, transpose the Nx3 matrix.
    /// // This involves copying all the elements
    /// ```
    /// 
    /// ## Parameters
    /// * cn: New number of channels. If the parameter is 0, the number of channels remains the same.
    /// * rows: New number of rows. If the parameter is 0, the number of rows remains the same.
    ///
    /// ## C++ default parameters:
    /// * rows: 0
    pub fn reshape(&self, cn: i32, rows: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_reshape_const_int_cn_int_rows(self.as_raw_Mat(), cn, rows) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_reshape_const_int_cn_int_newndims_const_int_X_newsz
    /// @overload
    pub fn reshape_1(&self, cn: i32, newndims: i32, newsz: &i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_reshape_const_int_cn_int_newndims_const_int_X_newsz(self.as_raw_Mat(), cn, newndims, newsz) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_reshape_const_int_cn_VectorOfint_newshape
    /// @overload
    pub fn reshape_2(&self, cn: i32, newshape: &types::VectorOfint) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_reshape_const_int_cn_VectorOfint_newshape(self.as_raw_Mat(), cn, newshape.as_raw_VectorOfint()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_cross_const_Mat_m
    /// Computes a cross-product of two 3-element vectors.
    /// 
    /// The method computes a cross-product of two 3-element vectors. The vectors must be 3-element
    /// floating-point vectors of the same shape and size. The result is another 3-element vector of the
    /// same shape and type as operands.
    /// ## Parameters
    /// * m: Another cross-product operand.
    pub fn cross(&self, m: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_cross_const_Mat_m(self.as_raw_Mat(), m.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_dot_const_Mat_m
    /// Computes a dot-product of two vectors.
    /// 
    /// The method computes a dot-product of two matrices. If the matrices are not single-column or
    /// single-row vectors, the top-to-bottom left-to-right scan ordering is used to treat them as 1D
    /// vectors. The vectors must have the same size and type. If the matrices have more than one channel,
    /// the dot products from all the channels are summed together.
    /// ## Parameters
    /// * m: another dot-product operand.
    pub fn dot(&self, m: &core::Mat) -> Result<f64> {
        unsafe { sys::cv_core_cv_Mat_dot_const_Mat_m(self.as_raw_Mat(), m.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_create_int_ndims_const_int_X_sizes_int_type
    /// @overload
    /// ## Parameters
    /// * ndims: New array dimensionality.
    /// * sizes: Array of integers specifying a new array shape.
    /// * type: New matrix type.
    pub fn create(&mut self, ndims: i32, sizes: &i32, _type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_create_int_ndims_const_int_X_sizes_int_type(self.as_raw_Mat(), ndims, sizes, _type) }.into_result()
    }
    
    // identifier: cv_Mat_create_VectorOfint_sizes_int_type
    /// @overload
    /// ## Parameters
    /// * sizes: Array of integers specifying a new array shape.
    /// * type: New matrix type.
    pub fn create_1(&mut self, sizes: &types::VectorOfint, _type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_create_VectorOfint_sizes_int_type(self.as_raw_Mat(), sizes.as_raw_VectorOfint(), _type) }.into_result()
    }
    
    // identifier: cv_Mat_addref
    /// Increments the reference counter.
    /// 
    /// The method increments the reference counter associated with the matrix data. If the matrix header
    /// points to an external data set (see Mat::Mat ), the reference counter is NULL, and the method has no
    /// effect in this case. Normally, to avoid memory leaks, the method should not be called explicitly. It
    /// is called implicitly by the matrix assignment operator. The reference counter increment is an atomic
    /// operation on the platforms that support it. Thus, it is safe to operate on the same matrices
    /// asynchronously in different threads.
    pub fn addref(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_addref(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_release
    /// Decrements the reference counter and deallocates the matrix if needed.
    /// 
    /// The method decrements the reference counter associated with the matrix data. When the reference
    /// counter reaches 0, the matrix data is deallocated and the data and the reference counter pointers
    /// are set to NULL's. If the matrix header points to an external data set (see Mat::Mat ), the
    /// reference counter is NULL, and the method has no effect in this case.
    /// 
    /// This method can be called manually to force the matrix data deallocation. But since this method is
    /// automatically called in the destructor, or by any other method that changes the data pointer, it is
    /// usually not needed. The reference counter decrement and check for 0 is an atomic operation on the
    /// platforms that support it. Thus, it is safe to operate on the same matrices asynchronously in
    /// different threads.
    pub fn release(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_release(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_deallocate
    pub fn deallocate(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_deallocate(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_copySize_Mat_m
    pub fn copy_size(&mut self, m: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_copySize_Mat_m(self.as_raw_Mat(), m.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_reserve_size_t_sz
    /// Reserves space for the certain number of rows.
    /// 
    /// The method reserves space for sz rows. If the matrix already has enough space to store sz rows,
    /// nothing happens. If the matrix is reallocated, the first Mat::rows rows are preserved. The method
    /// emulates the corresponding method of the STL vector class.
    /// ## Parameters
    /// * sz: Number of rows.
    pub fn reserve(&mut self, sz: size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_reserve_size_t_sz(self.as_raw_Mat(), sz) }.into_result()
    }
    
    // identifier: cv_Mat_reserveBuffer_size_t_sz
    /// Reserves space for the certain number of bytes.
    /// 
    /// The method reserves space for sz bytes. If the matrix already has enough space to store sz bytes,
    /// nothing happens. If matrix has to be reallocated its previous content could be lost.
    /// ## Parameters
    /// * sz: Number of bytes.
    pub fn reserve_buffer(&mut self, sz: size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_reserveBuffer_size_t_sz(self.as_raw_Mat(), sz) }.into_result()
    }
    
    // identifier: cv_Mat_resize_size_t_sz
    /// Changes the number of matrix rows.
    /// 
    /// The methods change the number of matrix rows. If the matrix is reallocated, the first
    /// min(Mat::rows, sz) rows are preserved. The methods emulate the corresponding methods of the STL
    /// vector class.
    /// ## Parameters
    /// * sz: New number of rows.
    pub fn resize(&mut self, sz: size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_resize_size_t_sz(self.as_raw_Mat(), sz) }.into_result()
    }
    
    // identifier: cv_Mat_resize_size_t_sz_Scalar_s
    /// @overload
    /// ## Parameters
    /// * sz: New number of rows.
    /// * s: Value assigned to the newly added elements.
    pub fn resize_with_default(&mut self, sz: size_t, s: core::Scalar) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_resize_size_t_sz_Scalar_s(self.as_raw_Mat(), sz, s) }.into_result()
    }
    
    // identifier: cv_Mat_push_back__const_void_X_elem
    pub fn push_back_(&mut self, elem: &c_void) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_push_back__const_void_X_elem(self.as_raw_Mat(), elem) }.into_result()
    }
    
    // identifier: cv_Mat_push_back_Mat_m
    /// @overload
    /// ## Parameters
    /// * m: Added line(s).
    pub fn push_back(&mut self, m: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_push_back_Mat_m(self.as_raw_Mat(), m.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_pop_back_size_t_nelems
    /// Removes elements from the bottom of the matrix.
    /// 
    /// The method removes one or more rows from the bottom of the matrix.
    /// ## Parameters
    /// * nelems: Number of removed rows. If it is greater than the total number of rows, an exception
    /// is thrown.
    ///
    /// ## C++ default parameters:
    /// * nelems: 1
    pub fn pop_back(&mut self, nelems: size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_pop_back_size_t_nelems(self.as_raw_Mat(), nelems) }.into_result()
    }
    
    // identifier: cv_Mat_locateROI_const_Size_wholeSize_Point_ofs
    /// Locates the matrix header within a parent matrix.
    /// 
    /// After you extracted a submatrix from a matrix using Mat::row, Mat::col, Mat::rowRange,
    /// Mat::colRange, and others, the resultant submatrix points just to the part of the original big
    /// matrix. However, each submatrix contains information (represented by datastart and dataend
    /// fields) that helps reconstruct the original matrix size and the position of the extracted
    /// submatrix within the original matrix. The method locateROI does exactly that.
    /// ## Parameters
    /// * wholeSize: Output parameter that contains the size of the whole matrix containing *this*
    /// as a part.
    /// * ofs: Output parameter that contains an offset of *this* inside the whole matrix.
    pub fn locate_roi(&self, whole_size: core::Size, ofs: core::Point) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_locateROI_const_Size_wholeSize_Point_ofs(self.as_raw_Mat(), whole_size, ofs) }.into_result()
    }
    
    // identifier: cv_Mat_adjustROI_int_dtop_int_dbottom_int_dleft_int_dright
    /// Adjusts a submatrix size and position within the parent matrix.
    /// 
    /// The method is complimentary to Mat::locateROI . The typical use of these functions is to determine
    /// the submatrix position within the parent matrix and then shift the position somehow. Typically, it
    /// can be required for filtering operations when pixels outside of the ROI should be taken into
    /// account. When all the method parameters are positive, the ROI needs to grow in all directions by the
    /// specified amount, for example:
    /// ```ignore
    /// A.adjustROI(2, 2, 2, 2);
    /// ```
    /// 
    /// In this example, the matrix size is increased by 4 elements in each direction. The matrix is shifted
    /// by 2 elements to the left and 2 elements up, which brings in all the necessary pixels for the
    /// filtering with the 5x5 kernel.
    /// 
    /// adjustROI forces the adjusted ROI to be inside of the parent matrix that is boundaries of the
    /// adjusted ROI are constrained by boundaries of the parent matrix. For example, if the submatrix A is
    /// located in the first row of a parent matrix and you called A.adjustROI(2, 2, 2, 2) then A will not
    /// be increased in the upward direction.
    /// 
    /// The function is used internally by the OpenCV filtering functions, like filter2D , morphological
    /// operations, and so on.
    /// ## Parameters
    /// * dtop: Shift of the top submatrix boundary upwards.
    /// * dbottom: Shift of the bottom submatrix boundary downwards.
    /// * dleft: Shift of the left submatrix boundary to the left.
    /// * dright: Shift of the right submatrix boundary to the right.
    /// @sa copyMakeBorder
    pub fn adjust_roi(&mut self, dtop: i32, dbottom: i32, dleft: i32, dright: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_Mat_adjustROI_int_dtop_int_dbottom_int_dleft_int_dright(self.as_raw_Mat(), dtop, dbottom, dleft, dright) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_Mat_isContinuous_const
    /// Reports whether the matrix is continuous or not.
    /// 
    /// The method returns true if the matrix elements are stored continuously without gaps at the end of
    /// each row. Otherwise, it returns false. Obviously, 1x1 or 1xN matrices are always continuous.
    /// Matrices created with Mat::create are always continuous. But if you extract a part of the matrix
    /// using Mat::col, Mat::diag, and so on, or constructed a matrix header for externally allocated data,
    /// such matrices may no longer have this property.
    /// 
    /// The continuity flag is stored as a bit in the Mat::flags field and is computed automatically when
    /// you construct a matrix header. Thus, the continuity check is a very fast operation, though
    /// theoretically it could be done as follows:
    /// ```ignore
    /// // alternative implementation of Mat::isContinuous()
    /// bool myCheckMatContinuity(const Mat& m)
    /// {
    /// //return (m.flags & Mat::CONTINUOUS_FLAG) != 0;
    /// return m.rows == 1 || m.step == m.cols*m.elemSize();
    /// }
    /// ```
    /// 
    /// The method is used in quite a few of OpenCV functions. The point is that element-wise operations
    /// (such as arithmetic and logical operations, math functions, alpha blending, color space
    /// transformations, and others) do not depend on the image geometry. Thus, if all the input and output
    /// arrays are continuous, the functions can process them as very long single-row vectors. The example
    /// below illustrates how an alpha-blending function can be implemented:
    /// ```ignore
    /// template<typename T>
    /// void alphaBlendRGBA(const Mat& src1, const Mat& src2, Mat& dst)
    /// {
    /// const float alpha_scale = (float)std::numeric_limits<T>::max(),
    /// inv_scale = 1.f/alpha_scale;
    /// 
    /// CV_Assert( src1.type() == src2.type() &&
    /// src1.type() == CV_MAKETYPE(traits::Depth<T>::value, 4) &&
    /// src1.size() == src2.size());
    /// Size size = src1.size();
    /// dst.create(size, src1.type());
    /// 
    /// // here is the idiom: check the arrays for continuity and,
    /// // if this is the case,
    /// // treat the arrays as 1D vectors
    /// if( src1.isContinuous() && src2.isContinuous() && dst.isContinuous() )
    /// {
    /// size.width *= size.height;
    /// size.height = 1;
    /// }
    /// size.width *= 4;
    /// 
    /// for( int i = 0; i < size.height; i++ )
    /// {
    /// // when the arrays are continuous,
    /// // the outer loop is executed only once
    /// const T* ptr1 = src1.ptr<T>(i);
    /// const T* ptr2 = src2.ptr<T>(i);
    /// T* dptr = dst.ptr<T>(i);
    /// 
    /// for( int j = 0; j < size.width; j += 4 )
    /// {
    /// float alpha = ptr1[j+3]*inv_scale, beta = ptr2[j+3]*inv_scale;
    /// dptr[j] = saturate_cast<T>(ptr1[j]*alpha + ptr2[j]*beta);
    /// dptr[j+1] = saturate_cast<T>(ptr1[j+1]*alpha + ptr2[j+1]*beta);
    /// dptr[j+2] = saturate_cast<T>(ptr1[j+2]*alpha + ptr2[j+2]*beta);
    /// dptr[j+3] = saturate_cast<T>((1 - (1-alpha)*(1-beta))*alpha_scale);
    /// }
    /// }
    /// }
    /// ```
    /// 
    /// This approach, while being very simple, can boost the performance of a simple element-operation by
    /// 10-20 percents, especially if the image is rather small and the operation is quite simple.
    /// 
    /// Another OpenCV idiom in this function, a call of Mat::create for the destination array, that
    /// allocates the destination array unless it already has the proper size and type. And while the newly
    /// allocated arrays are always continuous, you still need to check the destination array because
    /// Mat::create does not always allocate a new matrix.
    pub fn is_continuous(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Mat_isContinuous_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_isSubmatrix_const
    pub fn is_submatrix(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Mat_isSubmatrix_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_elemSize_const
    /// Returns the matrix element size in bytes.
    /// 
    /// The method returns the matrix element size in bytes. For example, if the matrix type is CV_16SC3 ,
    /// the method returns 3\*sizeof(short) or 6.
    pub fn elem_size(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_Mat_elemSize_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_elemSize1_const
    /// Returns the size of each matrix element channel in bytes.
    /// 
    /// The method returns the matrix element channel size in bytes, that is, it ignores the number of
    /// channels. For example, if the matrix type is CV_16SC3 , the method returns sizeof(short) or 2.
    pub fn elem_size1(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_Mat_elemSize1_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_type_const
    /// Returns the type of a matrix element.
    /// 
    /// The method returns a matrix element type. This is an identifier compatible with the CvMat type
    /// system, like CV_16SC3 or 16-bit signed 3-channel array, and so on.
    pub fn typ(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_Mat_type_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_depth_const
    /// Returns the depth of a matrix element.
    /// 
    /// The method returns the identifier of the matrix element depth (the type of each individual channel).
    /// For example, for a 16-bit signed element array, the method returns CV_16S . A complete list of
    /// matrix types contains the following values:
    /// *   CV_8U - 8-bit unsigned integers ( 0..255 )
    /// *   CV_8S - 8-bit signed integers ( -128..127 )
    /// *   CV_16U - 16-bit unsigned integers ( 0..65535 )
    /// *   CV_16S - 16-bit signed integers ( -32768..32767 )
    /// *   CV_32S - 32-bit signed integers ( -2147483648..2147483647 )
    /// *   CV_32F - 32-bit floating-point numbers ( -FLT_MAX..FLT_MAX, INF, NAN )
    /// *   CV_64F - 64-bit floating-point numbers ( -DBL_MAX..DBL_MAX, INF, NAN )
    pub fn depth(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_Mat_depth_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_channels_const
    /// Returns the number of matrix channels.
    /// 
    /// The method returns the number of matrix channels.
    pub fn channels(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_Mat_channels_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_step1_const_int_i
    /// Returns a normalized step.
    /// 
    /// The method returns a matrix step divided by Mat::elemSize1() . It can be useful to quickly access an
    /// arbitrary matrix element.
    ///
    /// ## C++ default parameters:
    /// * i: 0
    pub fn step1(&self, i: i32) -> Result<size_t> {
        unsafe { sys::cv_core_cv_Mat_step1_const_int_i(self.as_raw_Mat(), i) }.into_result()
    }
    
    // identifier: cv_Mat_empty_const
    /// Returns true if the array has no elements.
    /// 
    /// The method returns true if Mat::total() is 0 or if Mat::data is NULL. Because of pop_back() and
    /// resize() methods `M.total() == 0` does not imply that `M.data == NULL`.
    pub fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Mat_empty_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_total_const
    /// Returns the total number of array elements.
    /// 
    /// The method returns the number of array elements (a number of pixels if the array represents an
    /// image).
    pub fn total(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_Mat_total_const(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_total_const_int_startDim_int_endDim
    /// Returns the total number of array elements.
    /// 
    /// The method returns the number of elements within a certain sub-array slice with startDim <= dim < endDim
    ///
    /// ## C++ default parameters:
    /// * end_dim: INT_MAX
    pub fn total_1(&self, start_dim: i32, end_dim: i32) -> Result<size_t> {
        unsafe { sys::cv_core_cv_Mat_total_const_int_startDim_int_endDim(self.as_raw_Mat(), start_dim, end_dim) }.into_result()
    }
    
    // identifier: cv_Mat_checkVector_const_int_elemChannels_int_depth_bool_requireContinuous
    /// ## Parameters
    /// * elemChannels: Number of channels or number of columns the matrix should have.
    ///      For a 2-D matrix, when the matrix has only 1 column, then it should have
    ///      elemChannels channels; When the matrix has only 1 channel,
    ///      then it should have elemChannels columns.
    ///      For a 3-D matrix, it should have only one channel. Furthermore,
    ///      if the number of planes is not one, then the number of rows
    ///      within every plane has to be 1; if the number of rows within
    ///      every plane is not 1, then the number of planes has to be 1.
    /// * depth: The depth the matrix should have. Set it to -1 when any depth is fine.
    /// * requireContinuous: Set it to true to require the matrix to be continuous
    /// @return -1 if the requirement is not satisfied.
    ///   Otherwise, it returns the number of elements in the matrix. Note
    ///   that an element may have multiple channels.
    /// 
    /// The following code demonstrates its usage for a 2-d matrix:
    /// @snippet snippets/core_mat_checkVector.cpp example-2d
    /// 
    /// The following code demonstrates its usage for a 3-d matrix:
    /// @snippet snippets/core_mat_checkVector.cpp example-3d
    ///
    /// ## C++ default parameters:
    /// * depth: -1
    /// * require_continuous: true
    pub fn check_vector(&self, elem_channels: i32, depth: i32, require_continuous: bool) -> Result<i32> {
        unsafe { sys::cv_core_cv_Mat_checkVector_const_int_elemChannels_int_depth_bool_requireContinuous(self.as_raw_Mat(), elem_channels, depth, require_continuous) }.into_result()
    }
    
    // identifier: cv_Mat_ptr_int_i0
    /// Returns a pointer to the specified matrix row.
    /// 
    /// The methods return `uchar*` or typed pointer to the specified matrix row. See the sample in
    /// Mat::isContinuous to know how to use these methods.
    /// ## Parameters
    /// * i0: A 0-based row index.
    ///
    /// ## C++ default parameters:
    /// * i0: 0
    pub fn ptr_mut(&mut self, i0: i32) -> Result<&mut u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_int_i0(self.as_raw_Mat(), i0) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_ptr_const_int_i0
    /// @overload
    ///
    /// ## C++ default parameters:
    /// * i0: 0
    pub fn ptr(&self, i0: i32) -> Result<&u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_const_int_i0(self.as_raw_Mat(), i0) }.into_result().and_then(|x| unsafe { x.as_ref() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_ptr_int_row_int_col
    /// @overload
    /// ## Parameters
    /// * row: Index along the dimension 0
    /// * col: Index along the dimension 1
    pub fn ptr_2d_mut(&mut self, row: i32, col: i32) -> Result<&mut u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_int_row_int_col(self.as_raw_Mat(), row, col) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_ptr_const_int_row_int_col
    /// @overload
    /// ## Parameters
    /// * row: Index along the dimension 0
    /// * col: Index along the dimension 1
    pub fn ptr_2d(&self, row: i32, col: i32) -> Result<&u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_const_int_row_int_col(self.as_raw_Mat(), row, col) }.into_result().and_then(|x| unsafe { x.as_ref() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_ptr_int_i0_int_i1_int_i2
    /// @overload
    pub fn ptr_3d_mut(&mut self, i0: i32, i1: i32, i2: i32) -> Result<&mut u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_int_i0_int_i1_int_i2(self.as_raw_Mat(), i0, i1, i2) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_ptr_const_int_i0_int_i1_int_i2
    /// @overload
    pub fn ptr_3d(&self, i0: i32, i1: i32, i2: i32) -> Result<&u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_const_int_i0_int_i1_int_i2(self.as_raw_Mat(), i0, i1, i2) }.into_result().and_then(|x| unsafe { x.as_ref() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_ptr_const_int_X_idx
    /// @overload
    pub fn ptr_1(&mut self, idx: &i32) -> Result<&mut u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_const_int_X_idx(self.as_raw_Mat(), idx) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_ptr_const_const_int_X_idx
    /// @overload
    pub fn ptr_2(&self, idx: &i32) -> Result<&u8> {
        unsafe { sys::cv_core_cv_Mat_ptr_const_const_int_X_idx(self.as_raw_Mat(), idx) }.into_result().and_then(|x| unsafe { x.as_ref() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_Mat_at_int_i0
    /// Returns a reference to the specified array element.
    /// 
    /// The template methods return a reference to the specified array element. For the sake of higher
    /// performance, the index range checks are only performed in the Debug configuration.
    /// 
    /// Note that the variants with a single index (i) can be used to access elements of single-row or
    /// single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and
    /// B is an M x 1 integer matrix, you can simply write `A.at<float>(k+4)` and `B.at<int>(2*i+1)`
    /// instead of `A.at<float>(0,k+4)` and `B.at<int>(2*i+1,0)`, respectively.
    /// 
    /// The example below initializes a Hilbert matrix:
    /// ```ignore
    /// Mat H(100, 100, CV_64F);
    /// for(int i = 0; i < H.rows; i++)
    /// for(int j = 0; j < H.cols; j++)
    /// H.at<double>(i,j)=1./(i+j+1);
    /// ```
    /// 
    /// 
    /// Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends
    /// on the image from which you are trying to retrieve the data. The table below gives a better insight in this:
    /// - If matrix is of type `CV_8U` then use `Mat.at<uchar>(y,x)`.
    /// - If matrix is of type `CV_8S` then use `Mat.at<schar>(y,x)`.
    /// - If matrix is of type `CV_16U` then use `Mat.at<ushort>(y,x)`.
    /// - If matrix is of type `CV_16S` then use `Mat.at<short>(y,x)`.
    /// - If matrix is of type `CV_32S`  then use `Mat.at<int>(y,x)`.
    /// - If matrix is of type `CV_32F`  then use `Mat.at<float>(y,x)`.
    /// - If matrix is of type `CV_64F` then use `Mat.at<double>(y,x)`.
    /// 
    /// ## Parameters
    /// * i0: Index along the dimension 0
    ///
    /// ## C++ default parameters:
    /// * i0: 0
    pub fn at_mut<T: core::ValidMatElement>(&mut self, i0: i32) -> Result<&mut T> { self._at_mut(i0) }
    
    // identifier: cv_Mat_at_const_int_i0
    /// @overload
    /// ## Parameters
    /// * i0: Index along the dimension 0
    ///
    /// ## C++ default parameters:
    /// * i0: 0
    pub fn at<T: core::ValidMatElement>(&self, i0: i32) -> Result<&T> { self._at(i0) }
    
    // identifier: cv_Mat_at_int_row_int_col
    /// @overload
    /// ## Parameters
    /// * row: Index along the dimension 0
    /// * col: Index along the dimension 1
    pub fn at_2d_mut<T: core::ValidMatElement>(&mut self, row: i32, col: i32) -> Result<&mut T> { self._at_2d_mut(row, col) }
    
    // identifier: cv_Mat_at_const_int_row_int_col
    /// @overload
    /// ## Parameters
    /// * row: Index along the dimension 0
    /// * col: Index along the dimension 1
    pub fn at_2d<T: core::ValidMatElement>(&self, row: i32, col: i32) -> Result<&T> { self._at_2d(row, col) }
    
    // identifier: cv_Mat_at_int_i0_int_i1_int_i2
    /// @overload
    /// ## Parameters
    /// * i0: Index along the dimension 0
    /// * i1: Index along the dimension 1
    /// * i2: Index along the dimension 2
    pub fn at_3d_mut<T: core::ValidMatElement>(&mut self, i0: i32, i1: i32, i2: i32) -> Result<&mut T> { self._at_3d_mut(i0, i1, i2) }
    
    // identifier: cv_Mat_at_const_int_i0_int_i1_int_i2
    /// @overload
    /// ## Parameters
    /// * i0: Index along the dimension 0
    /// * i1: Index along the dimension 1
    /// * i2: Index along the dimension 2
    pub fn at_3d<T: core::ValidMatElement>(&self, i0: i32, i1: i32, i2: i32) -> Result<&T> { self._at_3d(i0, i1, i2) }
    
    // identifier: cv_Mat_updateContinuityFlag
    pub fn update_continuity_flag(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Mat_updateContinuityFlag(self.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Mat_size_const
    pub fn size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_Mat_size_const(self.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::MatExpr
/// Matrix expression representation
/// @anchor MatrixExpressions
/// This is a list of implemented matrix operations that can be combined in arbitrary complex
/// expressions (here A, B stand for matrices ( Mat ), s for a scalar ( Scalar ), alpha for a
/// real-valued scalar ( double )):
/// *   Addition, subtraction, negation: `A+B`, `A-B`, `A+s`, `A-s`, `s+A`, `s-A`, `-A`
/// *   Scaling: `A*alpha`
/// *   Per-element multiplication and division: `A.mul(B)`, `A/B`, `alpha/A`
/// *   Matrix multiplication: `A*B`
/// *   Transposition: `A.t()` (means A<sup>T</sup>)
/// *   Matrix inversion and pseudo-inversion, solving linear systems and least-squares problems:
/// `A.inv([method]) (~ A<sup>-1</sup>)`,   `A.inv([method])*B (~ X: AX=B)`
/// *   Comparison: `A cmpop B`, `A cmpop alpha`, `alpha cmpop A`, where *cmpop* is one of
/// `>`, `>=`, `==`, `!=`, `<=`, `<`. The result of comparison is an 8-bit single channel mask whose
/// elements are set to 255 (if the particular element or pair of elements satisfy the condition) or
/// 0.
/// *   Bitwise logical operations: `A logicop B`, `A logicop s`, `s logicop A`, `~A`, where *logicop* is one of
/// `&`, `|`, `^`.
/// *   Element-wise minimum and maximum: `min(A, B)`, `min(A, alpha)`, `max(A, B)`, `max(A, alpha)`
/// *   Element-wise absolute value: `abs(A)`
/// *   Cross-product, dot-product: `A.cross(B)`, `A.dot(B)`
/// *   Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as norm,
/// mean, sum, countNonZero, trace, determinant, repeat, and others.
/// *   Matrix initializers ( Mat::eye(), Mat::zeros(), Mat::ones() ), matrix comma-separated
/// initializers, matrix constructors and operators that extract sub-matrices (see Mat description).
/// *   Mat_<destination_type>() constructors to cast the result to the proper type.
/// 
/// Note: Comma-separated initializers and probably some other operations may require additional
/// explicit Mat() or Mat_<T>() constructor calls to resolve a possible ambiguity.
/// 
/// Here are examples of matrix expressions:
/// ```ignore
/// // compute pseudo-inverse of A, equivalent to A.inv(DECOMP_SVD)
/// SVD svd(A);
/// Mat pinvA = svd.vt.t()*Mat::diag(1./svd.w)*svd.u.t();
/// 
/// // compute the new vector of parameters in the Levenberg-Marquardt algorithm
/// x -= (A.t()*A + lambda*Mat::eye(A.cols,A.cols,A.type())).inv(DECOMP_CHOLESKY)*(A.t()*err);
/// 
/// // sharpen image using "unsharp mask" algorithm
/// Mat blurred; double sigma = 1, threshold = 5, amount = 1;
/// GaussianBlur(img, blurred, Size(), sigma, sigma);
/// Mat lowContrastMask = abs(img - blurred) < threshold;
/// Mat sharpened = img*(1+amount) + blurred*(-amount);
/// img.copyTo(sharpened, lowContrastMask);
/// ```
#[allow(dead_code)]
pub struct MatExpr {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MatExpr {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MatExpr(self.ptr) };
    }
}
impl core::MatExpr {
    #[doc(hidden)] pub fn as_raw_MatExpr(&self) -> *mut c_void { self.ptr }
}

impl MatExpr {

    // identifier: cv_MatExpr_size_const
    pub fn size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_MatExpr_size_const(self.as_raw_MatExpr()) }.into_result()
    }
    
    // identifier: cv_MatExpr_type_const
    pub fn typ(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_MatExpr_type_const(self.as_raw_MatExpr()) }.into_result()
    }
    
    // identifier: cv_MatExpr_cross_const_Mat_m
    pub fn cross(&self, m: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_MatExpr_cross_const_Mat_m(self.as_raw_MatExpr(), m.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_MatExpr_dot_const_Mat_m
    pub fn dot(&self, m: &core::Mat) -> Result<f64> {
        unsafe { sys::cv_core_cv_MatExpr_dot_const_Mat_m(self.as_raw_MatExpr(), m.as_raw_Mat()) }.into_result()
    }
    
}

// Generating impl for trait cv::MatOp (trait)
pub trait MatOp {
    #[doc(hidden)] fn as_raw_MatOp(&self) -> *mut c_void;
}

impl<'a> MatOp + 'a {

}

// boxed class cv::MatSize
#[allow(dead_code)]
pub struct MatSize {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MatSize {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MatSize(self.ptr) };
    }
}
impl core::MatSize {
    #[doc(hidden)] pub fn as_raw_MatSize(&self) -> *mut c_void { self.ptr }
}

impl MatSize {

    // identifier: cv_MatSize_MatSize_int_X__p
    pub fn new(_p: &mut i32) -> Result<core::MatSize> {
        unsafe { sys::cv_core_cv_MatSize_MatSize_int_X__p(_p) }.into_result().map(|x| core::MatSize { ptr: x })
    }
    
    // identifier: cv_MatSize_dims_const
    pub fn dims(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_MatSize_dims_const(self.as_raw_MatSize()) }.into_result()
    }
    
}

// boxed class cv::MatStep
#[allow(dead_code)]
pub struct MatStep {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MatStep {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MatStep(self.ptr) };
    }
}
impl core::MatStep {
    #[doc(hidden)] pub fn as_raw_MatStep(&self) -> *mut c_void { self.ptr }
}

impl MatStep {

    // identifier: cv_MatStep_MatStep
    pub fn default() -> Result<core::MatStep> {
        unsafe { sys::cv_core_cv_MatStep_MatStep() }.into_result().map(|x| core::MatStep { ptr: x })
    }
    
    // identifier: cv_MatStep_MatStep_size_t_s
    pub fn new(s: size_t) -> Result<core::MatStep> {
        unsafe { sys::cv_core_cv_MatStep_MatStep_size_t_s(s) }.into_result().map(|x| core::MatStep { ptr: x })
    }
    
}

// boxed class cv::Matx_AddOp
#[allow(dead_code)]
pub struct Matx_AddOp {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Matx_AddOp {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Matx_AddOp(self.ptr) };
    }
}
impl core::Matx_AddOp {
    #[doc(hidden)] pub fn as_raw_Matx_AddOp(&self) -> *mut c_void { self.ptr }
}

impl Matx_AddOp {

    // identifier: cv_Matx_AddOp_Matx_AddOp
    pub fn new() -> Result<core::Matx_AddOp> {
        unsafe { sys::cv_core_cv_Matx_AddOp_Matx_AddOp() }.into_result().map(|x| core::Matx_AddOp { ptr: x })
    }
    
    // identifier: cv_Matx_AddOp_Matx_AddOp_Matx_AddOp_unnamed_arg
    pub fn new_1(unnamed_arg: &core::Matx_AddOp) -> Result<core::Matx_AddOp> {
        unsafe { sys::cv_core_cv_Matx_AddOp_Matx_AddOp_Matx_AddOp_unnamed_arg(unnamed_arg.as_raw_Matx_AddOp()) }.into_result().map(|x| core::Matx_AddOp { ptr: x })
    }
    
}

// boxed class cv::Matx_DivOp
#[allow(dead_code)]
pub struct Matx_DivOp {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Matx_DivOp {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Matx_DivOp(self.ptr) };
    }
}
impl core::Matx_DivOp {
    #[doc(hidden)] pub fn as_raw_Matx_DivOp(&self) -> *mut c_void { self.ptr }
}

impl Matx_DivOp {

    // identifier: cv_Matx_DivOp_Matx_DivOp
    pub fn new() -> Result<core::Matx_DivOp> {
        unsafe { sys::cv_core_cv_Matx_DivOp_Matx_DivOp() }.into_result().map(|x| core::Matx_DivOp { ptr: x })
    }
    
    // identifier: cv_Matx_DivOp_Matx_DivOp_Matx_DivOp_unnamed_arg
    pub fn new_1(unnamed_arg: &core::Matx_DivOp) -> Result<core::Matx_DivOp> {
        unsafe { sys::cv_core_cv_Matx_DivOp_Matx_DivOp_Matx_DivOp_unnamed_arg(unnamed_arg.as_raw_Matx_DivOp()) }.into_result().map(|x| core::Matx_DivOp { ptr: x })
    }
    
}

// boxed class cv::Matx_MatMulOp
#[allow(dead_code)]
pub struct Matx_MatMulOp {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Matx_MatMulOp {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Matx_MatMulOp(self.ptr) };
    }
}
impl core::Matx_MatMulOp {
    #[doc(hidden)] pub fn as_raw_Matx_MatMulOp(&self) -> *mut c_void { self.ptr }
}

impl Matx_MatMulOp {

    // identifier: cv_Matx_MatMulOp_Matx_MatMulOp
    pub fn new() -> Result<core::Matx_MatMulOp> {
        unsafe { sys::cv_core_cv_Matx_MatMulOp_Matx_MatMulOp() }.into_result().map(|x| core::Matx_MatMulOp { ptr: x })
    }
    
    // identifier: cv_Matx_MatMulOp_Matx_MatMulOp_Matx_MatMulOp_unnamed_arg
    pub fn new_1(unnamed_arg: &core::Matx_MatMulOp) -> Result<core::Matx_MatMulOp> {
        unsafe { sys::cv_core_cv_Matx_MatMulOp_Matx_MatMulOp_Matx_MatMulOp_unnamed_arg(unnamed_arg.as_raw_Matx_MatMulOp()) }.into_result().map(|x| core::Matx_MatMulOp { ptr: x })
    }
    
}

// boxed class cv::Matx_MulOp
#[allow(dead_code)]
pub struct Matx_MulOp {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Matx_MulOp {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Matx_MulOp(self.ptr) };
    }
}
impl core::Matx_MulOp {
    #[doc(hidden)] pub fn as_raw_Matx_MulOp(&self) -> *mut c_void { self.ptr }
}

impl Matx_MulOp {

    // identifier: cv_Matx_MulOp_Matx_MulOp
    pub fn new() -> Result<core::Matx_MulOp> {
        unsafe { sys::cv_core_cv_Matx_MulOp_Matx_MulOp() }.into_result().map(|x| core::Matx_MulOp { ptr: x })
    }
    
    // identifier: cv_Matx_MulOp_Matx_MulOp_Matx_MulOp_unnamed_arg
    pub fn new_1(unnamed_arg: &core::Matx_MulOp) -> Result<core::Matx_MulOp> {
        unsafe { sys::cv_core_cv_Matx_MulOp_Matx_MulOp_Matx_MulOp_unnamed_arg(unnamed_arg.as_raw_Matx_MulOp()) }.into_result().map(|x| core::Matx_MulOp { ptr: x })
    }
    
}

// boxed class cv::Matx_ScaleOp
#[allow(dead_code)]
pub struct Matx_ScaleOp {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Matx_ScaleOp {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Matx_ScaleOp(self.ptr) };
    }
}
impl core::Matx_ScaleOp {
    #[doc(hidden)] pub fn as_raw_Matx_ScaleOp(&self) -> *mut c_void { self.ptr }
}

impl Matx_ScaleOp {

    // identifier: cv_Matx_ScaleOp_Matx_ScaleOp
    pub fn new() -> Result<core::Matx_ScaleOp> {
        unsafe { sys::cv_core_cv_Matx_ScaleOp_Matx_ScaleOp() }.into_result().map(|x| core::Matx_ScaleOp { ptr: x })
    }
    
    // identifier: cv_Matx_ScaleOp_Matx_ScaleOp_Matx_ScaleOp_unnamed_arg
    pub fn new_1(unnamed_arg: &core::Matx_ScaleOp) -> Result<core::Matx_ScaleOp> {
        unsafe { sys::cv_core_cv_Matx_ScaleOp_Matx_ScaleOp_Matx_ScaleOp_unnamed_arg(unnamed_arg.as_raw_Matx_ScaleOp()) }.into_result().map(|x| core::Matx_ScaleOp { ptr: x })
    }
    
}

// boxed class cv::Matx_SubOp
#[allow(dead_code)]
pub struct Matx_SubOp {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Matx_SubOp {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Matx_SubOp(self.ptr) };
    }
}
impl core::Matx_SubOp {
    #[doc(hidden)] pub fn as_raw_Matx_SubOp(&self) -> *mut c_void { self.ptr }
}

impl Matx_SubOp {

    // identifier: cv_Matx_SubOp_Matx_SubOp
    pub fn new() -> Result<core::Matx_SubOp> {
        unsafe { sys::cv_core_cv_Matx_SubOp_Matx_SubOp() }.into_result().map(|x| core::Matx_SubOp { ptr: x })
    }
    
    // identifier: cv_Matx_SubOp_Matx_SubOp_Matx_SubOp_unnamed_arg
    pub fn new_1(unnamed_arg: &core::Matx_SubOp) -> Result<core::Matx_SubOp> {
        unsafe { sys::cv_core_cv_Matx_SubOp_Matx_SubOp_Matx_SubOp_unnamed_arg(unnamed_arg.as_raw_Matx_SubOp()) }.into_result().map(|x| core::Matx_SubOp { ptr: x })
    }
    
}

// boxed class cv::Matx_TOp
#[allow(dead_code)]
pub struct Matx_TOp {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Matx_TOp {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Matx_TOp(self.ptr) };
    }
}
impl core::Matx_TOp {
    #[doc(hidden)] pub fn as_raw_Matx_TOp(&self) -> *mut c_void { self.ptr }
}

impl Matx_TOp {

    // identifier: cv_Matx_TOp_Matx_TOp
    pub fn new() -> Result<core::Matx_TOp> {
        unsafe { sys::cv_core_cv_Matx_TOp_Matx_TOp() }.into_result().map(|x| core::Matx_TOp { ptr: x })
    }
    
    // identifier: cv_Matx_TOp_Matx_TOp_Matx_TOp_unnamed_arg
    pub fn new_1(unnamed_arg: &core::Matx_TOp) -> Result<core::Matx_TOp> {
        unsafe { sys::cv_core_cv_Matx_TOp_Matx_TOp_Matx_TOp_unnamed_arg(unnamed_arg.as_raw_Matx_TOp()) }.into_result().map(|x| core::Matx_TOp { ptr: x })
    }
    
}

// boxed class cv::MercatorWarper
#[allow(dead_code)]
pub struct MercatorWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MercatorWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MercatorWarper(self.ptr) };
    }
}
impl core::MercatorWarper {
    #[doc(hidden)] pub fn as_raw_MercatorWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for MercatorWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl MercatorWarper {

}

// Generating impl for trait cv::MergeDebevec (trait)
/// The resulting HDR image is calculated as weighted average of the exposures considering exposure
/// values and camera response.
/// 
/// For more information see @cite DM97 .
pub trait MergeDebevec : core::MergeExposures {
    #[doc(hidden)] fn as_raw_MergeDebevec(&self) -> *mut c_void;
    // identifier: cv_MergeDebevec_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response
    fn process_with_response(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat, times: &core::Mat, response: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeDebevec_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response(self.as_raw_MergeDebevec(), src.as_raw_VectorOfMat(), dst.as_raw_Mat(), times.as_raw_Mat(), response.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_MergeDebevec_process_VectorOfMat_src_Mat_dst_Mat_times
    fn process(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat, times: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeDebevec_process_VectorOfMat_src_Mat_dst_Mat_times(self.as_raw_MergeDebevec(), src.as_raw_VectorOfMat(), dst.as_raw_Mat(), times.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> MergeDebevec + 'a {

}

// Generating impl for trait cv::MergeExposures (trait)
/// The base class algorithms that can merge exposure sequence to a single image.
pub trait MergeExposures : core::Algorithm {
    #[doc(hidden)] fn as_raw_MergeExposures(&self) -> *mut c_void;
    // identifier: cv_MergeExposures_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response
    /// Merges images.
    /// 
    /// ## Parameters
    /// * src: vector of input images
    /// * dst: result image
    /// * times: vector of exposure time values for each image
    /// * response: 256x1 matrix with inverse camera response function for each pixel value, it should
    /// have the same number of channels as images.
    fn process(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat, times: &core::Mat, response: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeExposures_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response(self.as_raw_MergeExposures(), src.as_raw_VectorOfMat(), dst.as_raw_Mat(), times.as_raw_Mat(), response.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> MergeExposures + 'a {

}

// Generating impl for trait cv::MergeMertens (trait)
/// Pixels are weighted using contrast, saturation and well-exposedness measures, than images are
/// combined using laplacian pyramids.
/// 
/// The resulting image weight is constructed as weighted average of contrast, saturation and
/// well-exposedness measures.
/// 
/// The resulting image doesn't require tonemapping and can be converted to 8-bit image by multiplying
/// by 255, but it's recommended to apply gamma correction and/or linear tonemapping.
/// 
/// For more information see @cite MK07 .
pub trait MergeMertens : core::MergeExposures {
    #[doc(hidden)] fn as_raw_MergeMertens(&self) -> *mut c_void;
    // identifier: cv_MergeMertens_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response
    fn process_with_response(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat, times: &core::Mat, response: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeMertens_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response(self.as_raw_MergeMertens(), src.as_raw_VectorOfMat(), dst.as_raw_Mat(), times.as_raw_Mat(), response.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_MergeMertens_process_VectorOfMat_src_Mat_dst
    /// Short version of process, that doesn't take extra arguments.
    /// 
    /// ## Parameters
    /// * src: vector of input images
    /// * dst: result image
    fn process(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeMertens_process_VectorOfMat_src_Mat_dst(self.as_raw_MergeMertens(), src.as_raw_VectorOfMat(), dst.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_MergeMertens_getContrastWeight_const
    fn get_contrast_weight(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_MergeMertens_getContrastWeight_const(self.as_raw_MergeMertens()) }.into_result()
    }
    
    // identifier: cv_MergeMertens_setContrastWeight_float_contrast_weiht
    fn set_contrast_weight(&mut self, contrast_weiht: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeMertens_setContrastWeight_float_contrast_weiht(self.as_raw_MergeMertens(), contrast_weiht) }.into_result()
    }
    
    // identifier: cv_MergeMertens_getSaturationWeight_const
    fn get_saturation_weight(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_MergeMertens_getSaturationWeight_const(self.as_raw_MergeMertens()) }.into_result()
    }
    
    // identifier: cv_MergeMertens_setSaturationWeight_float_saturation_weight
    fn set_saturation_weight(&mut self, saturation_weight: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeMertens_setSaturationWeight_float_saturation_weight(self.as_raw_MergeMertens(), saturation_weight) }.into_result()
    }
    
    // identifier: cv_MergeMertens_getExposureWeight_const
    fn get_exposure_weight(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_MergeMertens_getExposureWeight_const(self.as_raw_MergeMertens()) }.into_result()
    }
    
    // identifier: cv_MergeMertens_setExposureWeight_float_exposure_weight
    fn set_exposure_weight(&mut self, exposure_weight: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeMertens_setExposureWeight_float_exposure_weight(self.as_raw_MergeMertens(), exposure_weight) }.into_result()
    }
    
}

impl<'a> MergeMertens + 'a {

}

// Generating impl for trait cv::MergeRobertson (trait)
/// The resulting HDR image is calculated as weighted average of the exposures considering exposure
/// values and camera response.
/// 
/// For more information see @cite RB99 .
pub trait MergeRobertson : core::MergeExposures {
    #[doc(hidden)] fn as_raw_MergeRobertson(&self) -> *mut c_void;
    // identifier: cv_MergeRobertson_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response
    fn process_with_response(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat, times: &core::Mat, response: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeRobertson_process_VectorOfMat_src_Mat_dst_Mat_times_Mat_response(self.as_raw_MergeRobertson(), src.as_raw_VectorOfMat(), dst.as_raw_Mat(), times.as_raw_Mat(), response.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_MergeRobertson_process_VectorOfMat_src_Mat_dst_Mat_times
    fn process(&mut self, src: &types::VectorOfMat, dst: &mut core::Mat, times: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_MergeRobertson_process_VectorOfMat_src_Mat_dst_Mat_times(self.as_raw_MergeRobertson(), src.as_raw_VectorOfMat(), dst.as_raw_Mat(), times.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> MergeRobertson + 'a {

}

// Generating impl for trait cv::MinProblemSolver (trait)
/// Basic interface for all solvers
pub trait MinProblemSolver : core::Algorithm {
    #[doc(hidden)] fn as_raw_MinProblemSolver(&self) -> *mut c_void;
    // identifier: cv_MinProblemSolver_getFunction_const
    /// Getter for the optimized function.
    /// 
    /// The optimized function is represented by Function interface, which requires derivatives to
    /// implement the calc(double*) and getDim() methods to evaluate the function.
    /// 
    /// @return Smart-pointer to an object that implements Function interface - it represents the
    /// function that is being optimized. It can be empty, if no function was given so far.
    fn get_function(&self) -> Result<types::PtrOfFunction> {
        unsafe { sys::cv_core_cv_MinProblemSolver_getFunction_const(self.as_raw_MinProblemSolver()) }.into_result().map(|x| types::PtrOfFunction { ptr: x })
    }
    
    // identifier: cv_MinProblemSolver_setFunction_PtrOfFunction_f
    /// Setter for the optimized function.
    /// 
    /// *It should be called at least once before the call to* minimize(), as default value is not usable.
    /// 
    /// ## Parameters
    /// * f: The new function to optimize.
    fn set_function(&mut self, f: &types::PtrOfFunction) -> Result<()> {
        unsafe { sys::cv_core_cv_MinProblemSolver_setFunction_PtrOfFunction_f(self.as_raw_MinProblemSolver(), f.as_raw_PtrOfFunction()) }.into_result()
    }
    
    // identifier: cv_MinProblemSolver_getTermCriteria_const
    /// Getter for the previously set terminal criteria for this algorithm.
    /// 
    /// @return Deep copy of the terminal criteria used at the moment.
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_MinProblemSolver_getTermCriteria_const(self.as_raw_MinProblemSolver()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_MinProblemSolver_setTermCriteria_TermCriteria_termcrit
    /// Set terminal criteria for solver.
    /// 
    /// This method *is not necessary* to be called before the first call to minimize(), as the default
    /// value is sensible.
    /// 
    /// Algorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when
    /// the function values at the vertices of simplex are within termcrit.epsilon range or simplex
    /// becomes so small that it can enclosed in a box with termcrit.epsilon sides, whatever comes
    /// first.
    /// ## Parameters
    /// * termcrit: Terminal criteria to be used, represented as cv::TermCriteria structure.
    fn set_term_criteria(&mut self, termcrit: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_MinProblemSolver_setTermCriteria_TermCriteria_termcrit(self.as_raw_MinProblemSolver(), termcrit.as_raw_TermCriteria()) }.into_result()
    }
    
    // identifier: cv_MinProblemSolver_minimize_Mat_x
    /// actually runs the algorithm and performs the minimization.
    /// 
    /// The sole input parameter determines the centroid of the starting simplex (roughly, it tells
    /// where to start), all the others (terminal criteria, initial step, function to be minimized) are
    /// supposed to be set via the setters before the call to this method or the default values (not
    /// always sensible) will be used.
    /// 
    /// ## Parameters
    /// * x: The initial point, that will become a centroid of an initial simplex. After the algorithm
    /// will terminate, it will be set to the point where the algorithm stops, the point of possible
    /// minimum.
    /// @return The value of a function at the point found.
    fn minimize(&mut self, x: &mut core::Mat) -> Result<f64> {
        unsafe { sys::cv_core_cv_MinProblemSolver_minimize_Mat_x(self.as_raw_MinProblemSolver(), x.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> MinProblemSolver + 'a {

}

// Generating impl for trait cv::MinProblemSolver::Function (trait)
/// Represents function being optimized
pub trait MinProblemSolver_Function {
    #[doc(hidden)] fn as_raw_MinProblemSolver_Function(&self) -> *mut c_void;
    // identifier: cv_MinProblemSolver_Function_getDims_const
    fn get_dims(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_MinProblemSolver_Function_getDims_const(self.as_raw_MinProblemSolver_Function()) }.into_result()
    }
    
    // identifier: cv_MinProblemSolver_Function_getGradientEps_const
    fn get_gradient_eps(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_MinProblemSolver_Function_getGradientEps_const(self.as_raw_MinProblemSolver_Function()) }.into_result()
    }
    
    // identifier: cv_MinProblemSolver_Function_calc_const_const_double_X_x
    fn calc(&self, x: &f64) -> Result<f64> {
        unsafe { sys::cv_core_cv_MinProblemSolver_Function_calc_const_const_double_X_x(self.as_raw_MinProblemSolver_Function(), x) }.into_result()
    }
    
    // identifier: cv_MinProblemSolver_Function_getGradient_const_double_X_x_double_X_grad
    fn get_gradient(&mut self, x: &f64, grad: &mut f64) -> Result<()> {
        unsafe { sys::cv_core_cv_MinProblemSolver_Function_getGradient_const_double_X_x_double_X_grad(self.as_raw_MinProblemSolver_Function(), x, grad) }.into_result()
    }
    
}

impl<'a> MinProblemSolver_Function + 'a {

}

impl Moments {

    // identifier: cv_Moments_Moments
    pub fn default() -> Result<core::Moments> {
        unsafe { sys::cv_core_cv_Moments_Moments() }.into_result()
    }
    
    // identifier: cv_Moments_Moments_double_m00_double_m10_double_m01_double_m20_double_m11_double_m02_double_m30_double_m21_double_m12_double_m03
    pub fn new(m00: f64, m10: f64, m01: f64, m20: f64, m11: f64, m02: f64, m30: f64, m21: f64, m12: f64, m03: f64) -> Result<core::Moments> {
        unsafe { sys::cv_core_cv_Moments_Moments_double_m00_double_m10_double_m01_double_m20_double_m11_double_m02_double_m30_double_m21_double_m12_double_m03(m00, m10, m01, m20, m11, m02, m30, m21, m12, m03) }.into_result()
    }
    
}

// boxed class cv::Mutex
#[allow(dead_code)]
pub struct Mutex {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Mutex {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Mutex(self.ptr) };
    }
}
impl core::Mutex {
    #[doc(hidden)] pub fn as_raw_Mutex(&self) -> *mut c_void { self.ptr }
}

impl Mutex {

    // identifier: cv_Mutex_Mutex
    pub fn new() -> Result<core::Mutex> {
        unsafe { sys::cv_core_cv_Mutex_Mutex() }.into_result().map(|x| core::Mutex { ptr: x })
    }
    
    // identifier: cv_Mutex_Mutex_Mutex_m
    pub fn new_1(m: &core::Mutex) -> Result<core::Mutex> {
        unsafe { sys::cv_core_cv_Mutex_Mutex_Mutex_m(m.as_raw_Mutex()) }.into_result().map(|x| core::Mutex { ptr: x })
    }
    
    // identifier: cv_Mutex_lock
    pub fn lock(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Mutex_lock(self.as_raw_Mutex()) }.into_result()
    }
    
    // identifier: cv_Mutex_trylock
    pub fn trylock(&mut self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Mutex_trylock(self.as_raw_Mutex()) }.into_result()
    }
    
    // identifier: cv_Mutex_unlock
    pub fn unlock(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_Mutex_unlock(self.as_raw_Mutex()) }.into_result()
    }
    
}

// boxed class cv::NAryMatIterator
/// n-ary multi-dimensional array iterator.
/// 
/// Use the class to implement unary, binary, and, generally, n-ary element-wise operations on
/// multi-dimensional arrays. Some of the arguments of an n-ary function may be continuous arrays, some
/// may be not. It is possible to use conventional MatIterator 's for each array but incrementing all of
/// the iterators after each small operations may be a big overhead. In this case consider using
/// NAryMatIterator to iterate through several matrices simultaneously as long as they have the same
/// geometry (dimensionality and all the dimension sizes are the same). On each iteration `it.planes[0]`,
/// `it.planes[1]`,... will be the slices of the corresponding matrices.
/// 
/// The example below illustrates how you can compute a normalized and threshold 3D color histogram:
/// ```ignore
/// void computeNormalizedColorHist(const Mat& image, Mat& hist, int N, double minProb)
/// {
/// const int histSize[] = {N, N, N};
/// 
/// // make sure that the histogram has a proper size and type
/// hist.create(3, histSize, CV_32F);
/// 
/// // and clear it
/// hist = Scalar(0);
/// 
/// // the loop below assumes that the image
/// // is a 8-bit 3-channel. check it.
/// CV_Assert(image.type() == CV_8UC3);
/// MatConstIterator_<Vec3b> it = image.begin<Vec3b>(),
/// it_end = image.end<Vec3b>();
/// for( ; it != it_end; ++it )
/// {
/// const Vec3b& pix = *it;
/// hist.at<float>(pix[0]*N/256, pix[1]*N/256, pix[2]*N/256) += 1.f;
/// }
/// 
/// minProb *= image.rows*image.cols;
/// 
/// // initialize iterator (the style is different from STL).
/// // after initialization the iterator will contain
/// // the number of slices or planes the iterator will go through.
/// // it simultaneously increments iterators for several matrices
/// // supplied as a null terminated list of pointers
/// const Mat* arrays[] = {&hist, 0};
/// Mat planes[1];
/// NAryMatIterator itNAry(arrays, planes, 1);
/// double s = 0;
/// // iterate through the matrix. on each iteration
/// // itNAry.planes[i] (of type Mat) will be set to the current plane
/// // of the i-th n-dim matrix passed to the iterator constructor.
/// for(int p = 0; p < itNAry.nplanes; p++, ++itNAry)
/// {
/// threshold(itNAry.planes[0], itNAry.planes[0], minProb, 0, THRESH_TOZERO);
/// s += sum(itNAry.planes[0])[0];
/// }
/// 
/// s = 1./s;
/// itNAry = NAryMatIterator(arrays, planes, 1);
/// for(int p = 0; p < itNAry.nplanes; p++, ++itNAry)
/// itNAry.planes[0] *= s;
/// }
/// ```
#[allow(dead_code)]
pub struct NAryMatIterator {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NAryMatIterator {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NAryMatIterator(self.ptr) };
    }
}
impl core::NAryMatIterator {
    #[doc(hidden)] pub fn as_raw_NAryMatIterator(&self) -> *mut c_void { self.ptr }
}

impl NAryMatIterator {

    // identifier: cv_NAryMatIterator_NAryMatIterator
    pub fn new() -> Result<core::NAryMatIterator> {
        unsafe { sys::cv_core_cv_NAryMatIterator_NAryMatIterator() }.into_result().map(|x| core::NAryMatIterator { ptr: x })
    }
    
}

// Generating impl for trait cv::NormHistogramCostExtractor (trait)
/// A norm based cost extraction. :
pub trait NormHistogramCostExtractor : core::HistogramCostExtractor {
    #[doc(hidden)] fn as_raw_NormHistogramCostExtractor(&self) -> *mut c_void;
    // identifier: cv_NormHistogramCostExtractor_setNormFlag_int_flag
    fn set_norm_flag(&mut self, flag: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_NormHistogramCostExtractor_setNormFlag_int_flag(self.as_raw_NormHistogramCostExtractor(), flag) }.into_result()
    }
    
    // identifier: cv_NormHistogramCostExtractor_getNormFlag_const
    fn get_norm_flag(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_NormHistogramCostExtractor_getNormFlag_const(self.as_raw_NormHistogramCostExtractor()) }.into_result()
    }
    
}

impl<'a> NormHistogramCostExtractor + 'a {

}

// Generating impl for trait cv::ORB (trait)
/// Class implementing the ORB (*oriented BRIEF*) keypoint detector and descriptor extractor
/// 
/// described in @cite RRKB11 . The algorithm uses FAST in pyramids to detect stable keypoints, selects
/// the strongest features using FAST or Harris response, finds their orientation using first-order
/// moments and computes the descriptors using BRIEF (where the coordinates of random point pairs (or
/// k-tuples) are rotated according to the measured orientation).
pub trait ORB : core::Feature2D {
    #[doc(hidden)] fn as_raw_ORB(&self) -> *mut c_void;
    // identifier: cv_ORB_setMaxFeatures_int_maxFeatures
    fn set_max_features(&mut self, max_features: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setMaxFeatures_int_maxFeatures(self.as_raw_ORB(), max_features) }.into_result()
    }
    
    // identifier: cv_ORB_getMaxFeatures_const
    fn get_max_features(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getMaxFeatures_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setScaleFactor_double_scaleFactor
    fn set_scale_factor(&mut self, scale_factor: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setScaleFactor_double_scaleFactor(self.as_raw_ORB(), scale_factor) }.into_result()
    }
    
    // identifier: cv_ORB_getScaleFactor_const
    fn get_scale_factor(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ORB_getScaleFactor_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setNLevels_int_nlevels
    fn set_n_levels(&mut self, nlevels: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setNLevels_int_nlevels(self.as_raw_ORB(), nlevels) }.into_result()
    }
    
    // identifier: cv_ORB_getNLevels_const
    fn get_n_levels(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getNLevels_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setEdgeThreshold_int_edgeThreshold
    fn set_edge_threshold(&mut self, edge_threshold: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setEdgeThreshold_int_edgeThreshold(self.as_raw_ORB(), edge_threshold) }.into_result()
    }
    
    // identifier: cv_ORB_getEdgeThreshold_const
    fn get_edge_threshold(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getEdgeThreshold_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setFirstLevel_int_firstLevel
    fn set_first_level(&mut self, first_level: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setFirstLevel_int_firstLevel(self.as_raw_ORB(), first_level) }.into_result()
    }
    
    // identifier: cv_ORB_getFirstLevel_const
    fn get_first_level(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getFirstLevel_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setWTA_K_int_wta_k
    fn set_wta_k(&mut self, wta_k: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setWTA_K_int_wta_k(self.as_raw_ORB(), wta_k) }.into_result()
    }
    
    // identifier: cv_ORB_getWTA_K_const
    fn get_wta_k(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getWTA_K_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setScoreType_int_scoreType
    fn set_score_type(&mut self, score_type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setScoreType_int_scoreType(self.as_raw_ORB(), score_type) }.into_result()
    }
    
    // identifier: cv_ORB_getScoreType_const
    fn get_score_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getScoreType_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setPatchSize_int_patchSize
    fn set_patch_size(&mut self, patch_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setPatchSize_int_patchSize(self.as_raw_ORB(), patch_size) }.into_result()
    }
    
    // identifier: cv_ORB_getPatchSize_const
    fn get_patch_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getPatchSize_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_setFastThreshold_int_fastThreshold
    fn set_fast_threshold(&mut self, fast_threshold: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ORB_setFastThreshold_int_fastThreshold(self.as_raw_ORB(), fast_threshold) }.into_result()
    }
    
    // identifier: cv_ORB_getFastThreshold_const
    fn get_fast_threshold(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ORB_getFastThreshold_const(self.as_raw_ORB()) }.into_result()
    }
    
    // identifier: cv_ORB_getDefaultName_const
    fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_ORB_getDefaultName_const(self.as_raw_ORB()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl<'a> ORB + 'a {

    // identifier: cv_ORB_create_int_nfeatures_float_scaleFactor_int_nlevels_int_edgeThreshold_int_firstLevel_int_WTA_K_int_scoreType_int_patchSize_int_fastThreshold
    /// The ORB constructor
    /// 
    /// ## Parameters
    /// * nfeatures: The maximum number of features to retain.
    /// * scaleFactor: Pyramid decimation ratio, greater than 1. scaleFactor==2 means the classical
    /// pyramid, where each next level has 4x less pixels than the previous, but such a big scale factor
    /// will degrade feature matching scores dramatically. On the other hand, too close to 1 scale factor
    /// will mean that to cover certain scale range you will need more pyramid levels and so the speed
    /// will suffer.
    /// * nlevels: The number of pyramid levels. The smallest level will have linear size equal to
    /// input_image_linear_size/pow(scaleFactor, nlevels - firstLevel).
    /// * edgeThreshold: This is size of the border where the features are not detected. It should
    /// roughly match the patchSize parameter.
    /// * firstLevel: The level of pyramid to put source image to. Previous layers are filled
    /// with upscaled source image.
    /// * WTA_K: The number of points that produce each element of the oriented BRIEF descriptor. The
    /// default value 2 means the BRIEF where we take a random point pair and compare their brightnesses,
    /// so we get 0/1 response. Other possible values are 3 and 4. For example, 3 means that we take 3
    /// random points (of course, those point coordinates are random, but they are generated from the
    /// pre-defined seed, so each element of BRIEF descriptor is computed deterministically from the pixel
    /// rectangle), find point of maximum brightness and output index of the winner (0, 1 or 2). Such
    /// output will occupy 2 bits, and therefore it will need a special variant of Hamming distance,
    /// denoted as NORM_HAMMING2 (2 bits per bin). When WTA_K=4, we take 4 random points to compute each
    /// bin (that will also occupy 2 bits with possible values 0, 1, 2 or 3).
    /// * scoreType: The default HARRIS_SCORE means that Harris algorithm is used to rank features
    /// (the score is written to KeyPoint::score and is used to retain best nfeatures features);
    /// FAST_SCORE is alternative value of the parameter that produces slightly less stable keypoints,
    /// but it is a little faster to compute.
    /// * patchSize: size of the patch used by the oriented BRIEF descriptor. Of course, on smaller
    /// pyramid layers the perceived image area covered by a feature will be larger.
    /// @param fastThreshold
    ///
    /// ## C++ default parameters:
    /// * nfeatures: 500
    /// * scale_factor: 1.2f
    /// * nlevels: 8
    /// * edge_threshold: 31
    /// * first_level: 0
    /// * wta_k: 2
    /// * score_type: ORB::HARRIS_SCORE
    /// * patch_size: 31
    /// * fast_threshold: 20
    pub fn create(nfeatures: i32, scale_factor: f32, nlevels: i32, edge_threshold: i32, first_level: i32, wta_k: i32, score_type: i32, patch_size: i32, fast_threshold: i32) -> Result<types::PtrOfORB> {
        unsafe { sys::cv_core_cv_ORB_create_int_nfeatures_float_scaleFactor_int_nlevels_int_edgeThreshold_int_firstLevel_int_WTA_K_int_scoreType_int_patchSize_int_fastThreshold(nfeatures, scale_factor, nlevels, edge_threshold, first_level, wta_k, score_type, patch_size, fast_threshold) }.into_result().map(|x| types::PtrOfORB { ptr: x })
    }
    
}

// boxed class cv::PCA
/// Principal Component Analysis
/// 
/// The class is used to calculate a special basis for a set of vectors. The
/// basis will consist of eigenvectors of the covariance matrix calculated
/// from the input set of vectors. The class %PCA can also transform
/// vectors to/from the new coordinate space defined by the basis. Usually,
/// in this new coordinate system, each vector from the original set (and
/// any linear combination of such vectors) can be quite accurately
/// approximated by taking its first few components, corresponding to the
/// eigenvectors of the largest eigenvalues of the covariance matrix.
/// Geometrically it means that you calculate a projection of the vector to
/// a subspace formed by a few eigenvectors corresponding to the dominant
/// eigenvalues of the covariance matrix. And usually such a projection is
/// very close to the original vector. So, you can represent the original
/// vector from a high-dimensional space with a much shorter vector
/// consisting of the projected vector's coordinates in the subspace. Such a
/// transformation is also known as Karhunen-Loeve Transform, or KLT.
/// See http://en.wikipedia.org/wiki/Principal_component_analysis
/// 
/// The sample below is the function that takes two matrices. The first
/// function stores a set of vectors (a row per vector) that is used to
/// calculate PCA. The second function stores another "test" set of vectors
/// (a row per vector). First, these vectors are compressed with PCA, then
/// reconstructed back, and then the reconstruction error norm is computed
/// and printed for each vector. :
/// 
/// ```ignore{.cpp}
/// using namespace cv;
/// 
/// PCA compressPCA(const Mat& pcaset, int maxComponents,
/// const Mat& testset, Mat& compressed)
/// {
/// PCA pca(pcaset, // pass the data
/// Mat(), // we do not have a pre-computed mean vector,
/// // so let the PCA engine to compute it
/// PCA::DATA_AS_ROW, // indicate that the vectors
/// // are stored as matrix rows
/// // (use PCA::DATA_AS_COL if the vectors are
/// // the matrix columns)
/// maxComponents // specify, how many principal components to retain
/// );
/// // if there is no test data, just return the computed basis, ready-to-use
/// if( !testset.data )
/// return pca;
/// CV_Assert( testset.cols == pcaset.cols );
/// 
/// compressed.create(testset.rows, maxComponents, testset.type());
/// 
/// Mat reconstructed;
/// for( int i = 0; i < testset.rows; i++ )
/// {
/// Mat vec = testset.row(i), coeffs = compressed.row(i), reconstructed;
/// // compress the vector, the result will be stored
/// // in the i-th row of the output matrix
/// pca.project(vec, coeffs);
/// // and then reconstruct it
/// pca.backProject(coeffs, reconstructed);
/// // and measure the error
/// printf("%d. diff = %g\n", i, norm(vec, reconstructed, NORM_L2));
/// }
/// return pca;
/// }
/// ```
/// 
/// @sa calcCovarMatrix, mulTransposed, SVD, dft, dct
#[allow(dead_code)]
pub struct PCA {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PCA {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PCA(self.ptr) };
    }
}
impl core::PCA {
    #[doc(hidden)] pub fn as_raw_PCA(&self) -> *mut c_void { self.ptr }
}

impl PCA {

    // identifier: cv_PCA_PCA
    /// default constructor
    /// 
    /// The default constructor initializes an empty %PCA structure. The other
    /// constructors initialize the structure and call PCA::operator()().
    pub fn default() -> Result<core::PCA> {
        unsafe { sys::cv_core_cv_PCA_PCA() }.into_result().map(|x| core::PCA { ptr: x })
    }
    
    // identifier: cv_PCA_PCA_Mat_data_Mat_mean_int_flags_int_maxComponents
    /// @overload
    /// ## Parameters
    /// * data: input samples stored as matrix rows or matrix columns.
    /// * mean: optional mean value; if the matrix is empty (@c noArray()),
    /// the mean is computed from the data.
    /// * flags: operation flags; currently the parameter is only used to
    /// specify the data layout (PCA::Flags)
    /// * maxComponents: maximum number of components that %PCA should
    /// retain; by default, all the components are retained.
    ///
    /// ## C++ default parameters:
    /// * max_components: 0
    pub fn new_mat_max(data: &core::Mat, mean: &core::Mat, flags: i32, max_components: i32) -> Result<core::PCA> {
        unsafe { sys::cv_core_cv_PCA_PCA_Mat_data_Mat_mean_int_flags_int_maxComponents(data.as_raw_Mat(), mean.as_raw_Mat(), flags, max_components) }.into_result().map(|x| core::PCA { ptr: x })
    }
    
    // identifier: cv_PCA_PCA_Mat_data_Mat_mean_int_flags_double_retainedVariance
    /// @overload
    /// ## Parameters
    /// * data: input samples stored as matrix rows or matrix columns.
    /// * mean: optional mean value; if the matrix is empty (noArray()),
    /// the mean is computed from the data.
    /// * flags: operation flags; currently the parameter is only used to
    /// specify the data layout (PCA::Flags)
    /// * retainedVariance: Percentage of variance that PCA should retain.
    /// Using this parameter will let the PCA decided how many components to
    /// retain but it will always keep at least 2.
    pub fn new_mat_variance(data: &core::Mat, mean: &core::Mat, flags: i32, retained_variance: f64) -> Result<core::PCA> {
        unsafe { sys::cv_core_cv_PCA_PCA_Mat_data_Mat_mean_int_flags_double_retainedVariance(data.as_raw_Mat(), mean.as_raw_Mat(), flags, retained_variance) }.into_result().map(|x| core::PCA { ptr: x })
    }
    
    // identifier: cv_PCA_project_const_Mat_vec
    /// Projects vector(s) to the principal component subspace.
    /// 
    /// The methods project one or more vectors to the principal component
    /// subspace, where each vector projection is represented by coefficients in
    /// the principal component basis. The first form of the method returns the
    /// matrix that the second form writes to the result. So the first form can
    /// be used as a part of expression while the second form can be more
    /// efficient in a processing loop.
    /// ## Parameters
    /// * vec: input vector(s); must have the same dimensionality and the
    /// same layout as the input data used at %PCA phase, that is, if
    /// DATA_AS_ROW are specified, then `vec.cols==data.cols`
    /// (vector dimensionality) and `vec.rows` is the number of vectors to
    /// project, and the same is true for the PCA::DATA_AS_COL case.
    pub fn project(&self, vec: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_PCA_project_const_Mat_vec(self.as_raw_PCA(), vec.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_PCA_project_const_Mat_vec_Mat_result
    /// @overload
    /// ## Parameters
    /// * vec: input vector(s); must have the same dimensionality and the
    /// same layout as the input data used at PCA phase, that is, if
    /// DATA_AS_ROW are specified, then `vec.cols==data.cols`
    /// (vector dimensionality) and `vec.rows` is the number of vectors to
    /// project, and the same is true for the PCA::DATA_AS_COL case.
    /// * result: output vectors; in case of PCA::DATA_AS_COL, the
    /// output matrix has as many columns as the number of input vectors, this
    /// means that `result.cols==vec.cols` and the number of rows match the
    /// number of principal components (for example, `maxComponents` parameter
    /// passed to the constructor).
    pub fn project_to(&self, vec: &core::Mat, result: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_PCA_project_const_Mat_vec_Mat_result(self.as_raw_PCA(), vec.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_PCA_backProject_const_Mat_vec
    /// Reconstructs vectors from their PC projections.
    /// 
    /// The methods are inverse operations to PCA::project. They take PC
    /// coordinates of projected vectors and reconstruct the original vectors.
    /// Unless all the principal components have been retained, the
    /// reconstructed vectors are different from the originals. But typically,
    /// the difference is small if the number of components is large enough (but
    /// still much smaller than the original vector dimensionality). As a
    /// result, PCA is used.
    /// ## Parameters
    /// * vec: coordinates of the vectors in the principal component
    /// subspace, the layout and size are the same as of PCA::project output
    /// vectors.
    pub fn back_project(&self, vec: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_PCA_backProject_const_Mat_vec(self.as_raw_PCA(), vec.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_PCA_backProject_const_Mat_vec_Mat_result
    /// @overload
    /// ## Parameters
    /// * vec: coordinates of the vectors in the principal component
    /// subspace, the layout and size are the same as of PCA::project output
    /// vectors.
    /// * result: reconstructed vectors; the layout and size are the same as
    /// of PCA::project input vectors.
    pub fn back_project_to(&self, vec: &core::Mat, result: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_PCA_backProject_const_Mat_vec_Mat_result(self.as_raw_PCA(), vec.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::PaniniPortraitWarper
#[allow(dead_code)]
pub struct PaniniPortraitWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PaniniPortraitWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PaniniPortraitWarper(self.ptr) };
    }
}
impl core::PaniniPortraitWarper {
    #[doc(hidden)] pub fn as_raw_PaniniPortraitWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for PaniniPortraitWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl PaniniPortraitWarper {

    // identifier: cv_PaniniPortraitWarper_PaniniPortraitWarper_float_A_float_B
    ///
    /// ## C++ default parameters:
    /// * a: 1
    /// * b: 1
    pub fn new(a: f32, b: f32) -> Result<core::PaniniPortraitWarper> {
        unsafe { sys::cv_core_cv_PaniniPortraitWarper_PaniniPortraitWarper_float_A_float_B(a, b) }.into_result().map(|x| core::PaniniPortraitWarper { ptr: x })
    }
    
}

// boxed class cv::PaniniWarper
#[allow(dead_code)]
pub struct PaniniWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PaniniWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PaniniWarper(self.ptr) };
    }
}
impl core::PaniniWarper {
    #[doc(hidden)] pub fn as_raw_PaniniWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for PaniniWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl PaniniWarper {

    // identifier: cv_PaniniWarper_PaniniWarper_float_A_float_B
    ///
    /// ## C++ default parameters:
    /// * a: 1
    /// * b: 1
    pub fn new(a: f32, b: f32) -> Result<core::PaniniWarper> {
        unsafe { sys::cv_core_cv_PaniniWarper_PaniniWarper_float_A_float_B(a, b) }.into_result().map(|x| core::PaniniWarper { ptr: x })
    }
    
}

// Generating impl for trait cv::ParallelLoopBody (trait)
/// Base class for parallel data processors
pub trait ParallelLoopBody {
    #[doc(hidden)] fn as_raw_ParallelLoopBody(&self) -> *mut c_void;
}

impl<'a> ParallelLoopBody + 'a {

}

// boxed class cv::ParallelLoopBodyLambdaWrapper
#[allow(dead_code)]
pub struct ParallelLoopBodyLambdaWrapper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ParallelLoopBodyLambdaWrapper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ParallelLoopBodyLambdaWrapper(self.ptr) };
    }
}
impl core::ParallelLoopBodyLambdaWrapper {
    #[doc(hidden)] pub fn as_raw_ParallelLoopBodyLambdaWrapper(&self) -> *mut c_void { self.ptr }
}

impl core::ParallelLoopBody for ParallelLoopBodyLambdaWrapper {
    #[doc(hidden)] fn as_raw_ParallelLoopBody(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::Param
#[allow(dead_code)]
pub struct Param {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Param {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Param(self.ptr) };
    }
}
impl core::Param {
    #[doc(hidden)] pub fn as_raw_Param(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::PlaneWarper
/// Plane warper factory class.
/// @sa detail::PlaneWarper
#[allow(dead_code)]
pub struct PlaneWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PlaneWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PlaneWarper(self.ptr) };
    }
}
impl core::PlaneWarper {
    #[doc(hidden)] pub fn as_raw_PlaneWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for PlaneWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl PlaneWarper {

}

// boxed class cv::QRCodeDetector
#[allow(dead_code)]
pub struct QRCodeDetector {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::QRCodeDetector {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_QRCodeDetector(self.ptr) };
    }
}
impl core::QRCodeDetector {
    #[doc(hidden)] pub fn as_raw_QRCodeDetector(&self) -> *mut c_void { self.ptr }
}

impl QRCodeDetector {

    // identifier: cv_QRCodeDetector_QRCodeDetector
    pub fn new() -> Result<core::QRCodeDetector> {
        unsafe { sys::cv_core_cv_QRCodeDetector_QRCodeDetector() }.into_result().map(|x| core::QRCodeDetector { ptr: x })
    }
    
    // identifier: cv_QRCodeDetector_setEpsX_double_epsX
    /// sets the epsilon used during the horizontal scan of QR code stop marker detection.
    /// ## Parameters
    /// * epsX: Epsilon neighborhood, which allows you to determine the horizontal pattern
    /// of the scheme 1:1:3:1:1 according to QR code standard.
    pub fn set_eps_x(&mut self, eps_x: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_QRCodeDetector_setEpsX_double_epsX(self.as_raw_QRCodeDetector(), eps_x) }.into_result()
    }
    
    // identifier: cv_QRCodeDetector_setEpsY_double_epsY
    /// sets the epsilon used during the vertical scan of QR code stop marker detection.
    /// ## Parameters
    /// * epsY: Epsilon neighborhood, which allows you to determine the vertical pattern
    /// of the scheme 1:1:3:1:1 according to QR code standard.
    pub fn set_eps_y(&mut self, eps_y: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_QRCodeDetector_setEpsY_double_epsY(self.as_raw_QRCodeDetector(), eps_y) }.into_result()
    }
    
    // identifier: cv_QRCodeDetector_detect_const_Mat_img_Mat_points
    /// Detects QR code in image and returns the quadrangle containing the code.
    /// ## Parameters
    /// * img: grayscale or color (BGR) image containing (or not) QR code.
    /// * points: Output vector of vertices of the minimum-area quadrangle containing the code.
    pub fn detect(&self, img: &core::Mat, points: &mut core::Mat) -> Result<bool> {
        unsafe { sys::cv_core_cv_QRCodeDetector_detect_const_Mat_img_Mat_points(self.as_raw_QRCodeDetector(), img.as_raw_Mat(), points.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::QtFont
/// QtFont available only for Qt. See cv::fontQt
#[allow(dead_code)]
pub struct QtFont {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::QtFont {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_QtFont(self.ptr) };
    }
}
impl core::QtFont {
    #[doc(hidden)] pub fn as_raw_QtFont(&self) -> *mut c_void { self.ptr }
}

// Generating impl for trait cv::Range (trait)
/// Template class specifying a continuous subsequence (slice) of a sequence.
/// 
/// The class is used to specify a row or a column span in a matrix ( Mat ) and for many other purposes.
/// Range(a,b) is basically the same as a:b in Matlab or a..b in Python. As in Python, start is an
/// inclusive left boundary of the range and end is an exclusive right boundary of the range. Such a
/// half-opened interval is usually denoted as <span lang='latex'>[start,end)</span> .
/// 
/// The static method Range::all() returns a special variable that means "the whole sequence" or "the
/// whole range", just like " : " in Matlab or " ... " in Python. All the methods and functions in
/// OpenCV that take Range support this special Range::all() value. But, of course, in case of your own
/// custom processing, you will probably have to check and handle it explicitly:
/// ```ignore
/// void my_function(..., const Range& r, ....)
/// {
/// if(r == Range::all()) {
/// // process all the data
/// }
/// else {
/// // process [r.start, r.end)
/// }
/// }
/// ```
pub trait Range {
    #[doc(hidden)] fn as_raw_Range(&self) -> *mut c_void;
    // identifier: cv_Range_size_const
    fn size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_Range_size_const(self.as_raw_Range()) }.into_result()
    }
    
    // identifier: cv_Range_empty_const
    fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Range_empty_const(self.as_raw_Range()) }.into_result()
    }
    
    // identifier: cv_Range_all
    fn all(&mut self) -> Result<core::Range> {
        unsafe { sys::cv_core_cv_Range_all(self.as_raw_Range()) }.into_result().map(|x| core::Range { ptr: x })
    }
    
}

impl<'a> Range + 'a {

}

// boxed class cv::RotatedRect
/// The class represents rotated (i.e. not up-right) rectangles on a plane.
/// 
/// Each rectangle is specified by the center point (mass center), length of each side (represented by
/// #Size2f structure) and the rotation angle in degrees.
/// 
/// The sample below demonstrates how to use RotatedRect:
/// @snippet snippets/core_various.cpp RotatedRect_demo
/// ![image](pics/rotatedrect.png)
/// 
/// @sa CamShift, fitEllipse, minAreaRect, CvBox2D
#[allow(dead_code)]
pub struct RotatedRect {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::RotatedRect {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_RotatedRect(self.ptr) };
    }
}
impl core::RotatedRect {
    #[doc(hidden)] pub fn as_raw_RotatedRect(&self) -> *mut c_void { self.ptr }
}

impl RotatedRect {

    // identifier: RotatedRect_get_angle
    /// returns the angle attr of float type
    pub fn get_angle(&mut self) -> Result<f32> {
        unsafe { sys::cv_core_RotatedRect_get_angle(self.as_raw_RotatedRect()) }.into_result()
    }
    
    // identifier: RotatedRect_get_center
    /// returns the center attr of Point2f type
    pub fn get_center(&mut self) -> Result<core::Point2f> {
        unsafe { sys::cv_core_RotatedRect_get_center(self.as_raw_RotatedRect()) }.into_result()
    }
    
    // identifier: RotatedRect_get_size
    /// returns the size attr of Size2f type
    pub fn get_size(&mut self) -> Result<core::Size2f> {
        unsafe { sys::cv_core_RotatedRect_get_size(self.as_raw_RotatedRect()) }.into_result()
    }
    
    // identifier: cv_RotatedRect_RotatedRect
    pub fn default() -> Result<core::RotatedRect> {
        unsafe { sys::cv_core_cv_RotatedRect_RotatedRect() }.into_result().map(|x| core::RotatedRect { ptr: x })
    }
    
    // identifier: cv_RotatedRect_RotatedRect_Point2f_center_Size2f_size_float_angle
    /// full constructor
    /// ## Parameters
    /// * center: The rectangle mass center.
    /// * size: Width and height of the rectangle.
    /// * angle: The rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc.,
    /// the rectangle becomes an up-right rectangle.
    pub fn new(center: core::Point2f, size: core::Size2f, angle: f32) -> Result<core::RotatedRect> {
        unsafe { sys::cv_core_cv_RotatedRect_RotatedRect_Point2f_center_Size2f_size_float_angle(center, size, angle) }.into_result().map(|x| core::RotatedRect { ptr: x })
    }
    
    // identifier: cv_RotatedRect_RotatedRect_Point2f_point1_Point2f_point2_Point2f_point3
    /// Any 3 end points of the RotatedRect. They must be given in order (either clockwise or
    /// anticlockwise).
    pub fn for_points(point1: core::Point2f, point2: core::Point2f, point3: core::Point2f) -> Result<core::RotatedRect> {
        unsafe { sys::cv_core_cv_RotatedRect_RotatedRect_Point2f_point1_Point2f_point2_Point2f_point3(point1, point2, point3) }.into_result().map(|x| core::RotatedRect { ptr: x })
    }
    
    // identifier: cv_RotatedRect_points_const_Point2f_X_pts
    /// returns 4 vertices of the rectangle
    /// ## Parameters
    /// * pts: The points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.
    pub fn points(&self, pts: &mut core::Point2f) -> Result<()> {
        unsafe { sys::cv_core_cv_RotatedRect_points_const_Point2f_X_pts(self.as_raw_RotatedRect(), pts) }.into_result()
    }
    
    // identifier: cv_RotatedRect_boundingRect_const
    pub fn bounding_rect(&self) -> Result<core::Rect> {
        unsafe { sys::cv_core_cv_RotatedRect_boundingRect_const(self.as_raw_RotatedRect()) }.into_result()
    }
    
    // identifier: cv_RotatedRect_boundingRect2f_const
    pub fn bounding_rect2f(&self) -> Result<core::Rect2f> {
        unsafe { sys::cv_core_cv_RotatedRect_boundingRect2f_const(self.as_raw_RotatedRect()) }.into_result()
    }
    
}

// Generating impl for trait cv::ShapeContextDistanceExtractor (trait)
/// Implementation of the Shape Context descriptor and matching algorithm
/// 
/// proposed by Belongie et al. in "Shape Matching and Object Recognition Using Shape Contexts" (PAMI
/// 2002). This implementation is packaged in a generic scheme, in order to allow you the
/// implementation of the common variations of the original pipeline.
pub trait ShapeContextDistanceExtractor : core::ShapeDistanceExtractor {
    #[doc(hidden)] fn as_raw_ShapeContextDistanceExtractor(&self) -> *mut c_void;
    // identifier: cv_ShapeContextDistanceExtractor_setAngularBins_int_nAngularBins
    /// Establish the number of angular bins for the Shape Context Descriptor used in the shape matching
    /// pipeline.
    /// 
    /// ## Parameters
    /// * nAngularBins: The number of angular bins in the shape context descriptor.
    fn set_angular_bins(&mut self, n_angular_bins: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setAngularBins_int_nAngularBins(self.as_raw_ShapeContextDistanceExtractor(), n_angular_bins) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getAngularBins_const
    fn get_angular_bins(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getAngularBins_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setRadialBins_int_nRadialBins
    /// Establish the number of radial bins for the Shape Context Descriptor used in the shape matching
    /// pipeline.
    /// 
    /// ## Parameters
    /// * nRadialBins: The number of radial bins in the shape context descriptor.
    fn set_radial_bins(&mut self, n_radial_bins: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setRadialBins_int_nRadialBins(self.as_raw_ShapeContextDistanceExtractor(), n_radial_bins) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getRadialBins_const
    fn get_radial_bins(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getRadialBins_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setInnerRadius_float_innerRadius
    /// Set the inner radius of the shape context descriptor.
    /// 
    /// ## Parameters
    /// * innerRadius: The value of the inner radius.
    fn set_inner_radius(&mut self, inner_radius: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setInnerRadius_float_innerRadius(self.as_raw_ShapeContextDistanceExtractor(), inner_radius) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getInnerRadius_const
    fn get_inner_radius(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getInnerRadius_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setOuterRadius_float_outerRadius
    /// Set the outer radius of the shape context descriptor.
    /// 
    /// ## Parameters
    /// * outerRadius: The value of the outer radius.
    fn set_outer_radius(&mut self, outer_radius: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setOuterRadius_float_outerRadius(self.as_raw_ShapeContextDistanceExtractor(), outer_radius) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getOuterRadius_const
    fn get_outer_radius(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getOuterRadius_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setRotationInvariant_bool_rotationInvariant
    fn set_rotation_invariant(&mut self, rotation_invariant: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setRotationInvariant_bool_rotationInvariant(self.as_raw_ShapeContextDistanceExtractor(), rotation_invariant) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getRotationInvariant_const
    fn get_rotation_invariant(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getRotationInvariant_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setShapeContextWeight_float_shapeContextWeight
    /// Set the weight of the shape context distance in the final value of the shape distance. The shape
    /// context distance between two shapes is defined as the symmetric sum of shape context matching costs
    /// over best matching points. The final value of the shape distance is a user-defined linear
    /// combination of the shape context distance, an image appearance distance, and a bending energy.
    /// 
    /// ## Parameters
    /// * shapeContextWeight: The weight of the shape context distance in the final distance value.
    fn set_shape_context_weight(&mut self, shape_context_weight: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setShapeContextWeight_float_shapeContextWeight(self.as_raw_ShapeContextDistanceExtractor(), shape_context_weight) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getShapeContextWeight_const
    fn get_shape_context_weight(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getShapeContextWeight_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setImageAppearanceWeight_float_imageAppearanceWeight
    /// Set the weight of the Image Appearance cost in the final value of the shape distance. The image
    /// appearance cost is defined as the sum of squared brightness differences in Gaussian windows around
    /// corresponding image points. The final value of the shape distance is a user-defined linear
    /// combination of the shape context distance, an image appearance distance, and a bending energy. If
    /// this value is set to a number different from 0, is mandatory to set the images that correspond to
    /// each shape.
    /// 
    /// ## Parameters
    /// * imageAppearanceWeight: The weight of the appearance cost in the final distance value.
    fn set_image_appearance_weight(&mut self, image_appearance_weight: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setImageAppearanceWeight_float_imageAppearanceWeight(self.as_raw_ShapeContextDistanceExtractor(), image_appearance_weight) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getImageAppearanceWeight_const
    fn get_image_appearance_weight(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getImageAppearanceWeight_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setBendingEnergyWeight_float_bendingEnergyWeight
    /// Set the weight of the Bending Energy in the final value of the shape distance. The bending energy
    /// definition depends on what transformation is being used to align the shapes. The final value of the
    /// shape distance is a user-defined linear combination of the shape context distance, an image
    /// appearance distance, and a bending energy.
    /// 
    /// ## Parameters
    /// * bendingEnergyWeight: The weight of the Bending Energy in the final distance value.
    fn set_bending_energy_weight(&mut self, bending_energy_weight: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setBendingEnergyWeight_float_bendingEnergyWeight(self.as_raw_ShapeContextDistanceExtractor(), bending_energy_weight) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getBendingEnergyWeight_const
    fn get_bending_energy_weight(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getBendingEnergyWeight_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setImages_Mat_image1_Mat_image2
    /// Set the images that correspond to each shape. This images are used in the calculation of the Image
    /// Appearance cost.
    /// 
    /// ## Parameters
    /// * image1: Image corresponding to the shape defined by contours1.
    /// * image2: Image corresponding to the shape defined by contours2.
    fn set_images(&mut self, image1: &core::Mat, image2: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setImages_Mat_image1_Mat_image2(self.as_raw_ShapeContextDistanceExtractor(), image1.as_raw_Mat(), image2.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getImages_const_Mat_image1_Mat_image2
    fn get_images(&self, image1: &mut core::Mat, image2: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getImages_const_Mat_image1_Mat_image2(self.as_raw_ShapeContextDistanceExtractor(), image1.as_raw_Mat(), image2.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setIterations_int_iterations
    fn set_iterations(&mut self, iterations: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setIterations_int_iterations(self.as_raw_ShapeContextDistanceExtractor(), iterations) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getIterations_const
    fn get_iterations(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getIterations_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setCostExtractor_PtrOfHistogramCostExtractor_comparer
    /// Set the algorithm used for building the shape context descriptor cost matrix.
    /// 
    /// ## Parameters
    /// * comparer: Smart pointer to a HistogramCostExtractor, an algorithm that defines the cost
    /// matrix between descriptors.
    fn set_cost_extractor(&mut self, comparer: &types::PtrOfHistogramCostExtractor) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setCostExtractor_PtrOfHistogramCostExtractor_comparer(self.as_raw_ShapeContextDistanceExtractor(), comparer.as_raw_PtrOfHistogramCostExtractor()) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getCostExtractor_const
    fn get_cost_extractor(&self) -> Result<types::PtrOfHistogramCostExtractor> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getCostExtractor_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result().map(|x| types::PtrOfHistogramCostExtractor { ptr: x })
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_setStdDev_float_sigma
    /// Set the value of the standard deviation for the Gaussian window for the image appearance cost.
    /// 
    /// ## Parameters
    /// * sigma: Standard Deviation.
    fn set_std_dev(&mut self, sigma: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_setStdDev_float_sigma(self.as_raw_ShapeContextDistanceExtractor(), sigma) }.into_result()
    }
    
    // identifier: cv_ShapeContextDistanceExtractor_getStdDev_const
    fn get_std_dev(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeContextDistanceExtractor_getStdDev_const(self.as_raw_ShapeContextDistanceExtractor()) }.into_result()
    }
    
}

impl<'a> ShapeContextDistanceExtractor + 'a {

}

// Generating impl for trait cv::ShapeDistanceExtractor (trait)
/// Abstract base class for shape distance algorithms.
pub trait ShapeDistanceExtractor : core::Algorithm {
    #[doc(hidden)] fn as_raw_ShapeDistanceExtractor(&self) -> *mut c_void;
    // identifier: cv_ShapeDistanceExtractor_computeDistance_Mat_contour1_Mat_contour2
    /// Compute the shape distance between two shapes defined by its contours.
    /// 
    /// ## Parameters
    /// * contour1: Contour defining first shape.
    /// * contour2: Contour defining second shape.
    fn compute_distance(&mut self, contour1: &core::Mat, contour2: &core::Mat) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeDistanceExtractor_computeDistance_Mat_contour1_Mat_contour2(self.as_raw_ShapeDistanceExtractor(), contour1.as_raw_Mat(), contour2.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> ShapeDistanceExtractor + 'a {

}

// Generating impl for trait cv::ShapeTransformer (trait)
/// Abstract base class for shape transformation algorithms.
pub trait ShapeTransformer : core::Algorithm {
    #[doc(hidden)] fn as_raw_ShapeTransformer(&self) -> *mut c_void;
    // identifier: cv_ShapeTransformer_estimateTransformation_Mat_transformingShape_Mat_targetShape_VectorOfDMatch_matches
    /// Estimate the transformation parameters of the current transformer algorithm, based on point matches.
    /// 
    /// ## Parameters
    /// * transformingShape: Contour defining first shape.
    /// * targetShape: Contour defining second shape (Target).
    /// * matches: Standard vector of Matches between points.
    fn estimate_transformation(&mut self, transforming_shape: &core::Mat, target_shape: &core::Mat, matches: &types::VectorOfDMatch) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeTransformer_estimateTransformation_Mat_transformingShape_Mat_targetShape_VectorOfDMatch_matches(self.as_raw_ShapeTransformer(), transforming_shape.as_raw_Mat(), target_shape.as_raw_Mat(), matches.as_raw_VectorOfDMatch()) }.into_result()
    }
    
    // identifier: cv_ShapeTransformer_applyTransformation_Mat_input_Mat_output
    /// Apply a transformation, given a pre-estimated transformation parameters.
    /// 
    /// ## Parameters
    /// * input: Contour (set of points) to apply the transformation.
    /// * output: Output contour.
    ///
    /// ## C++ default parameters:
    /// * output: noArray()
    fn apply_transformation(&mut self, input: &core::Mat, output: &mut core::Mat) -> Result<f32> {
        unsafe { sys::cv_core_cv_ShapeTransformer_applyTransformation_Mat_input_Mat_output(self.as_raw_ShapeTransformer(), input.as_raw_Mat(), output.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ShapeTransformer_warpImage_const_Mat_transformingImage_Mat_output_int_flags_int_borderMode_Scalar_borderValue
    /// Apply a transformation, given a pre-estimated transformation parameters, to an Image.
    /// 
    /// ## Parameters
    /// * transformingImage: Input image.
    /// * output: Output image.
    /// * flags: Image interpolation method.
    /// * borderMode: border style.
    /// * borderValue: border value.
    ///
    /// ## C++ default parameters:
    /// * flags: INTER_LINEAR
    /// * border_mode: BORDER_CONSTANT
    /// * border_value: Scalar()
    fn warp_image(&self, transforming_image: &core::Mat, output: &mut core::Mat, flags: i32, border_mode: i32, border_value: core::Scalar) -> Result<()> {
        unsafe { sys::cv_core_cv_ShapeTransformer_warpImage_const_Mat_transformingImage_Mat_output_int_flags_int_borderMode_Scalar_borderValue(self.as_raw_ShapeTransformer(), transforming_image.as_raw_Mat(), output.as_raw_Mat(), flags, border_mode, border_value) }.into_result()
    }
    
}

impl<'a> ShapeTransformer + 'a {

}

// boxed class cv::SimilarRects
#[allow(dead_code)]
pub struct SimilarRects {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SimilarRects {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SimilarRects(self.ptr) };
    }
}
impl core::SimilarRects {
    #[doc(hidden)] pub fn as_raw_SimilarRects(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::SimpleBlobDetector
/// Class for extracting blobs from an image. :
/// 
/// The class implements a simple algorithm for extracting blobs from an image:
/// 
/// 1.  Convert the source image to binary images by applying thresholding with several thresholds from
/// minThreshold (inclusive) to maxThreshold (exclusive) with distance thresholdStep between
/// neighboring thresholds.
/// 2.  Extract connected components from every binary image by findContours and calculate their
/// centers.
/// 3.  Group centers from several binary images by their coordinates. Close centers form one group that
/// corresponds to one blob, which is controlled by the minDistBetweenBlobs parameter.
/// 4.  From the groups, estimate final centers of blobs and their radiuses and return as locations and
/// sizes of keypoints.
/// 
/// This class performs several filtrations of returned blobs. You should set filterBy\* to true/false
/// to turn on/off corresponding filtration. Available filtrations:
/// 
/// *   **By color**. This filter compares the intensity of a binary image at the center of a blob to
/// blobColor. If they differ, the blob is filtered out. Use blobColor = 0 to extract dark blobs
/// and blobColor = 255 to extract light blobs.
/// *   **By area**. Extracted blobs have an area between minArea (inclusive) and maxArea (exclusive).
/// *   **By circularity**. Extracted blobs have circularity
/// (<span lang='latex'>\frac{4*\pi*Area}{perimeter * perimeter}</span>) between minCircularity (inclusive) and
/// maxCircularity (exclusive).
/// *   **By ratio of the minimum inertia to maximum inertia**. Extracted blobs have this ratio
/// between minInertiaRatio (inclusive) and maxInertiaRatio (exclusive).
/// *   **By convexity**. Extracted blobs have convexity (area / area of blob convex hull) between
/// minConvexity (inclusive) and maxConvexity (exclusive).
/// 
/// Default values of parameters are tuned to extract dark circular blobs.
#[allow(dead_code)]
pub struct SimpleBlobDetector {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SimpleBlobDetector {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SimpleBlobDetector(self.ptr) };
    }
}
impl core::SimpleBlobDetector {
    #[doc(hidden)] pub fn as_raw_SimpleBlobDetector(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for SimpleBlobDetector {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::Feature2D for SimpleBlobDetector {
    #[doc(hidden)] fn as_raw_Feature2D(&self) -> *mut c_void { self.ptr }
}

impl SimpleBlobDetector {

    // identifier: cv_SimpleBlobDetector_create_SimpleBlobDetector_Params_parameters
    ///
    /// ## C++ default parameters:
    /// * parameters: SimpleBlobDetector::Params()
    pub fn create(parameters: core::SimpleBlobDetector_Params) -> Result<types::PtrOfSimpleBlobDetector> {
        unsafe { sys::cv_core_cv_SimpleBlobDetector_create_SimpleBlobDetector_Params_parameters(parameters) }.into_result().map(|x| types::PtrOfSimpleBlobDetector { ptr: x })
    }
    
    // identifier: cv_SimpleBlobDetector_getDefaultName_const
    pub fn get_default_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_SimpleBlobDetector_getDefaultName_const(self.as_raw_SimpleBlobDetector()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

impl SimpleBlobDetector_Params {

    // identifier: cv_SimpleBlobDetector_Params_Params
    pub fn new() -> Result<core::SimpleBlobDetector_Params> {
        unsafe { sys::cv_core_cv_SimpleBlobDetector_Params_Params() }.into_result()
    }
    
}

// Generating impl for trait cv::SparseOpticalFlow (trait)
/// Base interface for sparse optical flow algorithms.
pub trait SparseOpticalFlow : core::Algorithm {
    #[doc(hidden)] fn as_raw_SparseOpticalFlow(&self) -> *mut c_void;
    // identifier: cv_SparseOpticalFlow_calc_Mat_prevImg_Mat_nextImg_Mat_prevPts_Mat_nextPts_Mat_status_Mat_err
    /// Calculates a sparse optical flow.
    /// 
    /// ## Parameters
    /// * prevImg: First input image.
    /// * nextImg: Second input image of the same size and the same type as prevImg.
    /// * prevPts: Vector of 2D points for which the flow needs to be found.
    /// * nextPts: Output vector of 2D points containing the calculated new positions of input features in the second image.
    /// * status: Output status vector. Each element of the vector is set to 1 if the
    /// flow for the corresponding features has been found. Otherwise, it is set to 0.
    /// * err: Optional output vector that contains error response for each point (inverse confidence).
    ///
    /// ## C++ default parameters:
    /// * err: cv::noArray()
    fn calc(&mut self, prev_img: &core::Mat, next_img: &core::Mat, prev_pts: &core::Mat, next_pts: &mut core::Mat, status: &mut core::Mat, err: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_SparseOpticalFlow_calc_Mat_prevImg_Mat_nextImg_Mat_prevPts_Mat_nextPts_Mat_status_Mat_err(self.as_raw_SparseOpticalFlow(), prev_img.as_raw_Mat(), next_img.as_raw_Mat(), prev_pts.as_raw_Mat(), next_pts.as_raw_Mat(), status.as_raw_Mat(), err.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> SparseOpticalFlow + 'a {

}

// Generating impl for trait cv::SparsePyrLKOpticalFlow (trait)
/// Class used for calculating a sparse optical flow.
/// 
/// The class can calculate an optical flow for a sparse feature set using the
/// iterative Lucas-Kanade method with pyramids.
/// 
/// @sa calcOpticalFlowPyrLK
pub trait SparsePyrLKOpticalFlow : core::SparseOpticalFlow {
    #[doc(hidden)] fn as_raw_SparsePyrLKOpticalFlow(&self) -> *mut c_void;
    // identifier: cv_SparsePyrLKOpticalFlow_getWinSize_const
    fn get_win_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_getWinSize_const(self.as_raw_SparsePyrLKOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_setWinSize_Size_winSize
    fn set_win_size(&mut self, win_size: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_setWinSize_Size_winSize(self.as_raw_SparsePyrLKOpticalFlow(), win_size) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_getMaxLevel_const
    fn get_max_level(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_getMaxLevel_const(self.as_raw_SparsePyrLKOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_setMaxLevel_int_maxLevel
    fn set_max_level(&mut self, max_level: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_setMaxLevel_int_maxLevel(self.as_raw_SparsePyrLKOpticalFlow(), max_level) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_getTermCriteria_const
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_getTermCriteria_const(self.as_raw_SparsePyrLKOpticalFlow()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_setTermCriteria_TermCriteria_crit
    fn set_term_criteria(&mut self, crit: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_setTermCriteria_TermCriteria_crit(self.as_raw_SparsePyrLKOpticalFlow(), crit.as_raw_TermCriteria()) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_getFlags_const
    fn get_flags(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_getFlags_const(self.as_raw_SparsePyrLKOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_setFlags_int_flags
    fn set_flags(&mut self, flags: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_setFlags_int_flags(self.as_raw_SparsePyrLKOpticalFlow(), flags) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_getMinEigThreshold_const
    fn get_min_eig_threshold(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_getMinEigThreshold_const(self.as_raw_SparsePyrLKOpticalFlow()) }.into_result()
    }
    
    // identifier: cv_SparsePyrLKOpticalFlow_setMinEigThreshold_double_minEigThreshold
    fn set_min_eig_threshold(&mut self, min_eig_threshold: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_setMinEigThreshold_double_minEigThreshold(self.as_raw_SparsePyrLKOpticalFlow(), min_eig_threshold) }.into_result()
    }
    
}

impl<'a> SparsePyrLKOpticalFlow + 'a {

    // identifier: cv_SparsePyrLKOpticalFlow_create_Size_winSize_int_maxLevel_TermCriteria_crit_int_flags_double_minEigThreshold
    ///
    /// ## C++ default parameters:
    /// * win_size: Size(21, 21)
    /// * max_level: 3
    /// * crit: TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01)
    /// * flags: 0
    /// * min_eig_threshold: 1e-4
    pub fn create(win_size: core::Size, max_level: i32, crit: &core::TermCriteria, flags: i32, min_eig_threshold: f64) -> Result<types::PtrOfSparsePyrLKOpticalFlow> {
        unsafe { sys::cv_core_cv_SparsePyrLKOpticalFlow_create_Size_winSize_int_maxLevel_TermCriteria_crit_int_flags_double_minEigThreshold(win_size, max_level, crit.as_raw_TermCriteria(), flags, min_eig_threshold) }.into_result().map(|x| types::PtrOfSparsePyrLKOpticalFlow { ptr: x })
    }
    
}

// boxed class cv::SphericalWarper
/// Spherical warper factory class
#[allow(dead_code)]
pub struct SphericalWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SphericalWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SphericalWarper(self.ptr) };
    }
}
impl core::SphericalWarper {
    #[doc(hidden)] pub fn as_raw_SphericalWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for SphericalWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl SphericalWarper {

}

// Generating impl for trait cv::StereoBM (trait)
/// Class for computing stereo correspondence using the block matching algorithm, introduced and
/// contributed to OpenCV by K. Konolige.
pub trait StereoBM : core::StereoMatcher {
    #[doc(hidden)] fn as_raw_StereoBM(&self) -> *mut c_void;
    // identifier: cv_StereoBM_getPreFilterType_const
    fn get_pre_filter_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoBM_getPreFilterType_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setPreFilterType_int_preFilterType
    fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setPreFilterType_int_preFilterType(self.as_raw_StereoBM(), pre_filter_type) }.into_result()
    }
    
    // identifier: cv_StereoBM_getPreFilterSize_const
    fn get_pre_filter_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoBM_getPreFilterSize_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setPreFilterSize_int_preFilterSize
    fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setPreFilterSize_int_preFilterSize(self.as_raw_StereoBM(), pre_filter_size) }.into_result()
    }
    
    // identifier: cv_StereoBM_getPreFilterCap_const
    fn get_pre_filter_cap(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoBM_getPreFilterCap_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setPreFilterCap_int_preFilterCap
    fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setPreFilterCap_int_preFilterCap(self.as_raw_StereoBM(), pre_filter_cap) }.into_result()
    }
    
    // identifier: cv_StereoBM_getTextureThreshold_const
    fn get_texture_threshold(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoBM_getTextureThreshold_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setTextureThreshold_int_textureThreshold
    fn set_texture_threshold(&mut self, texture_threshold: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setTextureThreshold_int_textureThreshold(self.as_raw_StereoBM(), texture_threshold) }.into_result()
    }
    
    // identifier: cv_StereoBM_getUniquenessRatio_const
    fn get_uniqueness_ratio(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoBM_getUniquenessRatio_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setUniquenessRatio_int_uniquenessRatio
    fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setUniquenessRatio_int_uniquenessRatio(self.as_raw_StereoBM(), uniqueness_ratio) }.into_result()
    }
    
    // identifier: cv_StereoBM_getSmallerBlockSize_const
    fn get_smaller_block_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoBM_getSmallerBlockSize_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setSmallerBlockSize_int_blockSize
    fn set_smaller_block_size(&mut self, block_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setSmallerBlockSize_int_blockSize(self.as_raw_StereoBM(), block_size) }.into_result()
    }
    
    // identifier: cv_StereoBM_getROI1_const
    fn get_roi1(&self) -> Result<core::Rect> {
        unsafe { sys::cv_core_cv_StereoBM_getROI1_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setROI1_Rect_roi1
    fn set_roi1(&mut self, roi1: core::Rect) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setROI1_Rect_roi1(self.as_raw_StereoBM(), roi1) }.into_result()
    }
    
    // identifier: cv_StereoBM_getROI2_const
    fn get_roi2(&self) -> Result<core::Rect> {
        unsafe { sys::cv_core_cv_StereoBM_getROI2_const(self.as_raw_StereoBM()) }.into_result()
    }
    
    // identifier: cv_StereoBM_setROI2_Rect_roi2
    fn set_roi2(&mut self, roi2: core::Rect) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoBM_setROI2_Rect_roi2(self.as_raw_StereoBM(), roi2) }.into_result()
    }
    
}

impl<'a> StereoBM + 'a {

    // identifier: cv_StereoBM_create_int_numDisparities_int_blockSize
    /// Creates StereoBM object
    /// 
    /// ## Parameters
    /// * numDisparities: the disparity search range. For each pixel algorithm will find the best
    /// disparity from 0 (default minimum disparity) to numDisparities. The search range can then be
    /// shifted by changing the minimum disparity.
    /// * blockSize: the linear size of the blocks compared by the algorithm. The size should be odd
    /// (as the block is centered at the current pixel). Larger block size implies smoother, though less
    /// accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher
    /// chance for algorithm to find a wrong correspondence.
    /// 
    /// The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for
    /// a specific stereo pair.
    ///
    /// ## C++ default parameters:
    /// * num_disparities: 0
    /// * block_size: 21
    pub fn create(num_disparities: i32, block_size: i32) -> Result<types::PtrOfStereoBM> {
        unsafe { sys::cv_core_cv_StereoBM_create_int_numDisparities_int_blockSize(num_disparities, block_size) }.into_result().map(|x| types::PtrOfStereoBM { ptr: x })
    }
    
}

// Generating impl for trait cv::StereoMatcher (trait)
/// The base class for stereo correspondence algorithms.
pub trait StereoMatcher : core::Algorithm {
    #[doc(hidden)] fn as_raw_StereoMatcher(&self) -> *mut c_void;
    // identifier: cv_StereoMatcher_compute_Mat_left_Mat_right_Mat_disparity
    /// Computes disparity map for the specified stereo pair
    /// 
    /// ## Parameters
    /// * left: Left 8-bit single-channel image.
    /// * right: Right image of the same size and the same type as the left one.
    /// * disparity: Output disparity map. It has the same size as the input images. Some algorithms,
    /// like StereoBM or StereoSGBM compute 16-bit fixed-point disparity map (where each disparity value
    /// has 4 fractional bits), whereas other algorithms output 32-bit floating-point disparity map.
    fn compute(&mut self, left: &core::Mat, right: &core::Mat, disparity: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoMatcher_compute_Mat_left_Mat_right_Mat_disparity(self.as_raw_StereoMatcher(), left.as_raw_Mat(), right.as_raw_Mat(), disparity.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_getMinDisparity_const
    fn get_min_disparity(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoMatcher_getMinDisparity_const(self.as_raw_StereoMatcher()) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_setMinDisparity_int_minDisparity
    fn set_min_disparity(&mut self, min_disparity: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoMatcher_setMinDisparity_int_minDisparity(self.as_raw_StereoMatcher(), min_disparity) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_getNumDisparities_const
    fn get_num_disparities(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoMatcher_getNumDisparities_const(self.as_raw_StereoMatcher()) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_setNumDisparities_int_numDisparities
    fn set_num_disparities(&mut self, num_disparities: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoMatcher_setNumDisparities_int_numDisparities(self.as_raw_StereoMatcher(), num_disparities) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_getBlockSize_const
    fn get_block_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoMatcher_getBlockSize_const(self.as_raw_StereoMatcher()) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_setBlockSize_int_blockSize
    fn set_block_size(&mut self, block_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoMatcher_setBlockSize_int_blockSize(self.as_raw_StereoMatcher(), block_size) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_getSpeckleWindowSize_const
    fn get_speckle_window_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoMatcher_getSpeckleWindowSize_const(self.as_raw_StereoMatcher()) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_setSpeckleWindowSize_int_speckleWindowSize
    fn set_speckle_window_size(&mut self, speckle_window_size: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoMatcher_setSpeckleWindowSize_int_speckleWindowSize(self.as_raw_StereoMatcher(), speckle_window_size) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_getSpeckleRange_const
    fn get_speckle_range(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoMatcher_getSpeckleRange_const(self.as_raw_StereoMatcher()) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_setSpeckleRange_int_speckleRange
    fn set_speckle_range(&mut self, speckle_range: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoMatcher_setSpeckleRange_int_speckleRange(self.as_raw_StereoMatcher(), speckle_range) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_getDisp12MaxDiff_const
    fn get_disp12_max_diff(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoMatcher_getDisp12MaxDiff_const(self.as_raw_StereoMatcher()) }.into_result()
    }
    
    // identifier: cv_StereoMatcher_setDisp12MaxDiff_int_disp12MaxDiff
    fn set_disp12_max_diff(&mut self, disp12_max_diff: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoMatcher_setDisp12MaxDiff_int_disp12MaxDiff(self.as_raw_StereoMatcher(), disp12_max_diff) }.into_result()
    }
    
}

impl<'a> StereoMatcher + 'a {

}

// Generating impl for trait cv::StereoSGBM (trait)
/// The class implements the modified H. Hirschmuller algorithm @cite HH08 that differs from the original
/// one as follows:
/// 
/// *   By default, the algorithm is single-pass, which means that you consider only 5 directions
/// instead of 8. Set mode=StereoSGBM::MODE_HH in createStereoSGBM to run the full variant of the
/// algorithm but beware that it may consume a lot of memory.
/// *   The algorithm matches blocks, not individual pixels. Though, setting blockSize=1 reduces the
/// blocks to single pixels.
/// *   Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi
/// sub-pixel metric from @cite BT98 is used. Though, the color images are supported as well.
/// *   Some pre- and post- processing steps from K. Konolige algorithm StereoBM are included, for
/// example: pre-filtering (StereoBM::PREFILTER_XSOBEL type) and post-filtering (uniqueness
/// check, quadratic interpolation and speckle filtering).
/// 
/// 
/// Note:
/// *   (Python) An example illustrating the use of the StereoSGBM matching algorithm can be found
/// at opencv_source_code/samples/python/stereo_match.py
pub trait StereoSGBM : core::StereoMatcher {
    #[doc(hidden)] fn as_raw_StereoSGBM(&self) -> *mut c_void;
    // identifier: cv_StereoSGBM_getPreFilterCap_const
    fn get_pre_filter_cap(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoSGBM_getPreFilterCap_const(self.as_raw_StereoSGBM()) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_setPreFilterCap_int_preFilterCap
    fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoSGBM_setPreFilterCap_int_preFilterCap(self.as_raw_StereoSGBM(), pre_filter_cap) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_getUniquenessRatio_const
    fn get_uniqueness_ratio(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoSGBM_getUniquenessRatio_const(self.as_raw_StereoSGBM()) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_setUniquenessRatio_int_uniquenessRatio
    fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoSGBM_setUniquenessRatio_int_uniquenessRatio(self.as_raw_StereoSGBM(), uniqueness_ratio) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_getP1_const
    fn get_p1(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoSGBM_getP1_const(self.as_raw_StereoSGBM()) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_setP1_int_P1
    fn set_p1(&mut self, p1: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoSGBM_setP1_int_P1(self.as_raw_StereoSGBM(), p1) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_getP2_const
    fn get_p2(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoSGBM_getP2_const(self.as_raw_StereoSGBM()) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_setP2_int_P2
    fn set_p2(&mut self, p2: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoSGBM_setP2_int_P2(self.as_raw_StereoSGBM(), p2) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_getMode_const
    fn get_mode(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_StereoSGBM_getMode_const(self.as_raw_StereoSGBM()) }.into_result()
    }
    
    // identifier: cv_StereoSGBM_setMode_int_mode
    fn set_mode(&mut self, mode: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_StereoSGBM_setMode_int_mode(self.as_raw_StereoSGBM(), mode) }.into_result()
    }
    
}

impl<'a> StereoSGBM + 'a {

    // identifier: cv_StereoSGBM_create_int_minDisparity_int_numDisparities_int_blockSize_int_P1_int_P2_int_disp12MaxDiff_int_preFilterCap_int_uniquenessRatio_int_speckleWindowSize_int_speckleRange_int_mode
    /// Creates StereoSGBM object
    /// 
    /// ## Parameters
    /// * minDisparity: Minimum possible disparity value. Normally, it is zero but sometimes
    /// rectification algorithms can shift images, so this parameter needs to be adjusted accordingly.
    /// * numDisparities: Maximum disparity minus minimum disparity. The value is always greater than
    /// zero. In the current implementation, this parameter must be divisible by 16.
    /// * blockSize: Matched block size. It must be an odd number \>=1 . Normally, it should be
    /// somewhere in the 3..11 range.
    /// * P1: The first parameter controlling the disparity smoothness. See below.
    /// * P2: The second parameter controlling the disparity smoothness. The larger the values are,
    /// the smoother the disparity is. P1 is the penalty on the disparity change by plus or minus 1
    /// between neighbor pixels. P2 is the penalty on the disparity change by more than 1 between neighbor
    /// pixels. The algorithm requires P2 \> P1 . See stereo_match.cpp sample where some reasonably good
    /// P1 and P2 values are shown (like 8\*number_of_image_channels\*SADWindowSize\*SADWindowSize and
    /// 32\*number_of_image_channels\*SADWindowSize\*SADWindowSize , respectively).
    /// * disp12MaxDiff: Maximum allowed difference (in integer pixel units) in the left-right
    /// disparity check. Set it to a non-positive value to disable the check.
    /// * preFilterCap: Truncation value for the prefiltered image pixels. The algorithm first
    /// computes x-derivative at each pixel and clips its value by [-preFilterCap, preFilterCap] interval.
    /// The result values are passed to the Birchfield-Tomasi pixel cost function.
    /// * uniquenessRatio: Margin in percentage by which the best (minimum) computed cost function
    /// value should "win" the second best value to consider the found match correct. Normally, a value
    /// within the 5-15 range is good enough.
    /// * speckleWindowSize: Maximum size of smooth disparity regions to consider their noise speckles
    /// and invalidate. Set it to 0 to disable speckle filtering. Otherwise, set it somewhere in the
    /// 50-200 range.
    /// * speckleRange: Maximum disparity variation within each connected component. If you do speckle
    /// filtering, set the parameter to a positive value, it will be implicitly multiplied by 16.
    /// Normally, 1 or 2 is good enough.
    /// * mode: Set it to StereoSGBM::MODE_HH to run the full-scale two-pass dynamic programming
    /// algorithm. It will consume O(W\*H\*numDisparities) bytes, which is large for 640x480 stereo and
    /// huge for HD-size pictures. By default, it is set to false .
    /// 
    /// The first constructor initializes StereoSGBM with all the default parameters. So, you only have to
    /// set StereoSGBM::numDisparities at minimum. The second constructor enables you to set each parameter
    /// to a custom value.
    ///
    /// ## C++ default parameters:
    /// * min_disparity: 0
    /// * num_disparities: 16
    /// * block_size: 3
    /// * p1: 0
    /// * p2: 0
    /// * disp12_max_diff: 0
    /// * pre_filter_cap: 0
    /// * uniqueness_ratio: 0
    /// * speckle_window_size: 0
    /// * speckle_range: 0
    /// * mode: StereoSGBM::MODE_SGBM
    pub fn create(min_disparity: i32, num_disparities: i32, block_size: i32, p1: i32, p2: i32, disp12_max_diff: i32, pre_filter_cap: i32, uniqueness_ratio: i32, speckle_window_size: i32, speckle_range: i32, mode: i32) -> Result<types::PtrOfStereoSGBM> {
        unsafe { sys::cv_core_cv_StereoSGBM_create_int_minDisparity_int_numDisparities_int_blockSize_int_P1_int_P2_int_disp12MaxDiff_int_preFilterCap_int_uniquenessRatio_int_speckleWindowSize_int_speckleRange_int_mode(min_disparity, num_disparities, block_size, p1, p2, disp12_max_diff, pre_filter_cap, uniqueness_ratio, speckle_window_size, speckle_range, mode) }.into_result().map(|x| types::PtrOfStereoSGBM { ptr: x })
    }
    
}

// boxed class cv::StereographicWarper
#[allow(dead_code)]
pub struct StereographicWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::StereographicWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_StereographicWarper(self.ptr) };
    }
}
impl core::StereographicWarper {
    #[doc(hidden)] pub fn as_raw_StereographicWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for StereographicWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl StereographicWarper {

}

// boxed class cv::Stitcher
/// High level image stitcher.
/// 
/// It's possible to use this class without being aware of the entire stitching pipeline. However, to
/// be able to achieve higher stitching stability and quality of the final images at least being
/// familiar with the theory is recommended.
/// 
/// 
/// Note:
/// *   A basic example on image stitching can be found at
/// opencv_source_code/samples/cpp/stitching.cpp
/// *   A detailed example on image stitching can be found at
/// opencv_source_code/samples/cpp/stitching_detailed.cpp
#[allow(dead_code)]
pub struct Stitcher {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Stitcher {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Stitcher(self.ptr) };
    }
}
impl core::Stitcher {
    #[doc(hidden)] pub fn as_raw_Stitcher(&self) -> *mut c_void { self.ptr }
}

impl Stitcher {

    // identifier: cv_Stitcher_createDefault_bool_try_use_gpu
    /// Creates a stitcher with the default parameters.
    /// 
    /// ## Parameters
    /// * try_use_gpu: Flag indicating whether GPU should be used whenever it's possible.
    /// @return Stitcher class instance.
    ///
    /// ## C++ default parameters:
    /// * try_use_gpu: false
    pub fn create_default(try_use_gpu: bool) -> Result<core::Stitcher> {
        unsafe { sys::cv_core_cv_Stitcher_createDefault_bool_try_use_gpu(try_use_gpu) }.into_result().map(|x| core::Stitcher { ptr: x })
    }
    
    // identifier: cv_Stitcher_registrationResol_const
    pub fn registration_resol(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_Stitcher_registrationResol_const(self.as_raw_Stitcher()) }.into_result()
    }
    
    // identifier: cv_Stitcher_setRegistrationResol_double_resol_mpx
    pub fn set_registration_resol(&mut self, resol_mpx: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_Stitcher_setRegistrationResol_double_resol_mpx(self.as_raw_Stitcher(), resol_mpx) }.into_result()
    }
    
    // identifier: cv_Stitcher_seamEstimationResol_const
    pub fn seam_estimation_resol(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_Stitcher_seamEstimationResol_const(self.as_raw_Stitcher()) }.into_result()
    }
    
    // identifier: cv_Stitcher_setSeamEstimationResol_double_resol_mpx
    pub fn set_seam_estimation_resol(&mut self, resol_mpx: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_Stitcher_setSeamEstimationResol_double_resol_mpx(self.as_raw_Stitcher(), resol_mpx) }.into_result()
    }
    
    // identifier: cv_Stitcher_compositingResol_const
    pub fn compositing_resol(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_Stitcher_compositingResol_const(self.as_raw_Stitcher()) }.into_result()
    }
    
    // identifier: cv_Stitcher_setCompositingResol_double_resol_mpx
    pub fn set_compositing_resol(&mut self, resol_mpx: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_Stitcher_setCompositingResol_double_resol_mpx(self.as_raw_Stitcher(), resol_mpx) }.into_result()
    }
    
    // identifier: cv_Stitcher_panoConfidenceThresh_const
    pub fn pano_confidence_thresh(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_Stitcher_panoConfidenceThresh_const(self.as_raw_Stitcher()) }.into_result()
    }
    
    // identifier: cv_Stitcher_setPanoConfidenceThresh_double_conf_thresh
    pub fn set_pano_confidence_thresh(&mut self, conf_thresh: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_Stitcher_setPanoConfidenceThresh_double_conf_thresh(self.as_raw_Stitcher(), conf_thresh) }.into_result()
    }
    
    // identifier: cv_Stitcher_waveCorrection_const
    pub fn wave_correction(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_Stitcher_waveCorrection_const(self.as_raw_Stitcher()) }.into_result()
    }
    
    // identifier: cv_Stitcher_setWaveCorrection_bool_flag
    pub fn set_wave_correction(&mut self, flag: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_Stitcher_setWaveCorrection_bool_flag(self.as_raw_Stitcher(), flag) }.into_result()
    }
    
    // identifier: cv_Stitcher_matchingMask_const
    pub fn matching_mask(&self) -> Result<core::UMat> {
        unsafe { sys::cv_core_cv_Stitcher_matchingMask_const(self.as_raw_Stitcher()) }.into_result().map(|x| core::UMat { ptr: x })
    }
    
    // identifier: cv_Stitcher_setMatchingMask_UMat_mask
    pub fn set_matching_mask(&mut self, mask: &core::UMat) -> Result<()> {
        unsafe { sys::cv_core_cv_Stitcher_setMatchingMask_UMat_mask(self.as_raw_Stitcher(), mask.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_Stitcher_component_const
    pub fn component(&self) -> Result<types::VectorOfint> {
        unsafe { sys::cv_core_cv_Stitcher_component_const(self.as_raw_Stitcher()) }.into_result().map(|x| types::VectorOfint { ptr: x })
    }
    
    // identifier: cv_Stitcher_workScale_const
    pub fn work_scale(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_Stitcher_workScale_const(self.as_raw_Stitcher()) }.into_result()
    }
    
}

// boxed class cv::Subdiv2D
#[allow(dead_code)]
pub struct Subdiv2D {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::Subdiv2D {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_Subdiv2D(self.ptr) };
    }
}
impl core::Subdiv2D {
    #[doc(hidden)] pub fn as_raw_Subdiv2D(&self) -> *mut c_void { self.ptr }
}

impl Subdiv2D {

    // identifier: cv_Subdiv2D_Subdiv2D
    /// creates an empty Subdiv2D object.
    /// To create a new empty Delaunay subdivision you need to use the #initDelaunay function.
    pub fn default() -> Result<core::Subdiv2D> {
        unsafe { sys::cv_core_cv_Subdiv2D_Subdiv2D() }.into_result().map(|x| core::Subdiv2D { ptr: x })
    }
    
    // identifier: cv_Subdiv2D_Subdiv2D_Rect_rect
    /// @overload
    /// 
    /// ## Parameters
    /// * rect: Rectangle that includes all of the 2D points that are to be added to the subdivision.
    /// 
    /// The function creates an empty Delaunay subdivision where 2D points can be added using the function
    /// insert() . All of the points to be added must be within the specified rectangle, otherwise a runtime
    /// error is raised.
    pub fn new(rect: core::Rect) -> Result<core::Subdiv2D> {
        unsafe { sys::cv_core_cv_Subdiv2D_Subdiv2D_Rect_rect(rect) }.into_result().map(|x| core::Subdiv2D { ptr: x })
    }
    
    // identifier: cv_Subdiv2D_initDelaunay_Rect_rect
    /// Creates a new empty Delaunay subdivision
    /// 
    /// ## Parameters
    /// * rect: Rectangle that includes all of the 2D points that are to be added to the subdivision.
    pub fn init_delaunay(&mut self, rect: core::Rect) -> Result<()> {
        unsafe { sys::cv_core_cv_Subdiv2D_initDelaunay_Rect_rect(self.as_raw_Subdiv2D(), rect) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_insert_Point2f_pt
    /// Insert a single point into a Delaunay triangulation.
    /// 
    /// ## Parameters
    /// * pt: Point to insert.
    /// 
    /// The function inserts a single point into a subdivision and modifies the subdivision topology
    /// appropriately. If a point with the same coordinates exists already, no new point is added.
    /// @returns the ID of the point.
    /// 
    /// 
    /// Note: If the point is outside of the triangulation specified rect a runtime error is raised.
    pub fn insert(&mut self, pt: core::Point2f) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_insert_Point2f_pt(self.as_raw_Subdiv2D(), pt) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_insert_VectorOfPoint2f_ptvec
    /// Insert multiple points into a Delaunay triangulation.
    /// 
    /// ## Parameters
    /// * ptvec: Points to insert.
    /// 
    /// The function inserts a vector of points into a subdivision and modifies the subdivision topology
    /// appropriately.
    pub fn insert_n(&mut self, ptvec: &types::VectorOfPoint2f) -> Result<()> {
        unsafe { sys::cv_core_cv_Subdiv2D_insert_VectorOfPoint2f_ptvec(self.as_raw_Subdiv2D(), ptvec.as_raw_VectorOfPoint2f()) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_locate_Point2f_pt_int_edge_int_vertex
    /// Returns the location of a point within a Delaunay triangulation.
    /// 
    /// ## Parameters
    /// * pt: Point to locate.
    /// * edge: Output edge that the point belongs to or is located to the right of it.
    /// * vertex: Optional output vertex the input point coincides with.
    /// 
    /// The function locates the input point within the subdivision and gives one of the triangle edges
    /// or vertices.
    /// 
    /// @returns an integer which specify one of the following five cases for point location:
    /// *  The point falls into some facet. The function returns #PTLOC_INSIDE and edge will contain one of
    /// edges of the facet.
    /// *  The point falls onto the edge. The function returns #PTLOC_ON_EDGE and edge will contain this edge.
    /// *  The point coincides with one of the subdivision vertices. The function returns #PTLOC_VERTEX and
    /// vertex will contain a pointer to the vertex.
    /// *  The point is outside the subdivision reference rectangle. The function returns #PTLOC_OUTSIDE_RECT
    /// and no pointers are filled.
    /// *  One of input arguments is invalid. A runtime error is raised or, if silent or "parent" error
    /// processing mode is selected, #PTLOC_ERROR is returned.
    pub fn locate(&mut self, pt: core::Point2f, edge: i32, vertex: i32) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_locate_Point2f_pt_int_edge_int_vertex(self.as_raw_Subdiv2D(), pt, edge, vertex) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_findNearest_Point2f_pt_Point2f_X_nearestPt
    /// Finds the subdivision vertex closest to the given point.
    /// 
    /// ## Parameters
    /// * pt: Input point.
    /// * nearestPt: Output subdivision vertex point.
    /// 
    /// The function is another function that locates the input point within the subdivision. It finds the
    /// subdivision vertex that is the closest to the input point. It is not necessarily one of vertices
    /// of the facet containing the input point, though the facet (located using locate() ) is used as a
    /// starting point.
    /// 
    /// @returns vertex ID.
    ///
    /// ## C++ default parameters:
    /// * nearest_pt: 0
    pub fn find_nearest(&mut self, pt: core::Point2f, nearest_pt: &mut core::Point2f) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_findNearest_Point2f_pt_Point2f_X_nearestPt(self.as_raw_Subdiv2D(), pt, nearest_pt) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_getEdgeList_const_VectorOfVec4f_edgeList
    /// Returns a list of all edges.
    /// 
    /// ## Parameters
    /// * edgeList: Output vector.
    /// 
    /// The function gives each edge as a 4 numbers vector, where each two are one of the edge
    /// vertices. i.e. org_x = v[0], org_y = v[1], dst_x = v[2], dst_y = v[3].
    pub fn get_edge_list(&self, edge_list: &types::VectorOfVec4f) -> Result<()> {
        unsafe { sys::cv_core_cv_Subdiv2D_getEdgeList_const_VectorOfVec4f_edgeList(self.as_raw_Subdiv2D(), edge_list.as_raw_VectorOfVec4f()) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_getLeadingEdgeList_const_VectorOfint_leadingEdgeList
    /// Returns a list of the leading edge ID connected to each triangle.
    /// 
    /// ## Parameters
    /// * leadingEdgeList: Output vector.
    /// 
    /// The function gives one edge ID for each triangle.
    pub fn get_leading_edge_list(&self, leading_edge_list: &types::VectorOfint) -> Result<()> {
        unsafe { sys::cv_core_cv_Subdiv2D_getLeadingEdgeList_const_VectorOfint_leadingEdgeList(self.as_raw_Subdiv2D(), leading_edge_list.as_raw_VectorOfint()) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_getTriangleList_const_VectorOfVec6f_triangleList
    /// Returns a list of all triangles.
    /// 
    /// ## Parameters
    /// * triangleList: Output vector.
    /// 
    /// The function gives each triangle as a 6 numbers vector, where each two are one of the triangle
    /// vertices. i.e. p1_x = v[0], p1_y = v[1], p2_x = v[2], p2_y = v[3], p3_x = v[4], p3_y = v[5].
    pub fn get_triangle_list(&self, triangle_list: &types::VectorOfVec6f) -> Result<()> {
        unsafe { sys::cv_core_cv_Subdiv2D_getTriangleList_const_VectorOfVec6f_triangleList(self.as_raw_Subdiv2D(), triangle_list.as_raw_VectorOfVec6f()) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_getVoronoiFacetList_VectorOfint_idx_VectorOfVectorOfPoint2f_facetList_VectorOfPoint2f_facetCenters
    /// Returns a list of all Voroni facets.
    /// 
    /// ## Parameters
    /// * idx: Vector of vertices IDs to consider. For all vertices you can pass empty vector.
    /// * facetList: Output vector of the Voroni facets.
    /// * facetCenters: Output vector of the Voroni facets center points.
    pub fn get_voronoi_facet_list(&mut self, idx: &types::VectorOfint, facet_list: &types::VectorOfVectorOfPoint2f, facet_centers: &types::VectorOfPoint2f) -> Result<()> {
        unsafe { sys::cv_core_cv_Subdiv2D_getVoronoiFacetList_VectorOfint_idx_VectorOfVectorOfPoint2f_facetList_VectorOfPoint2f_facetCenters(self.as_raw_Subdiv2D(), idx.as_raw_VectorOfint(), facet_list.as_raw_VectorOfVectorOfPoint2f(), facet_centers.as_raw_VectorOfPoint2f()) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_getVertex_const_int_vertex_int_X_firstEdge
    /// Returns vertex location from vertex ID.
    /// 
    /// ## Parameters
    /// * vertex: vertex ID.
    /// * firstEdge: Optional. The first edge ID which is connected to the vertex.
    /// @returns vertex (x,y)
    ///
    /// ## C++ default parameters:
    /// * first_edge: 0
    pub fn get_vertex(&self, vertex: i32, first_edge: &mut i32) -> Result<core::Point2f> {
        unsafe { sys::cv_core_cv_Subdiv2D_getVertex_const_int_vertex_int_X_firstEdge(self.as_raw_Subdiv2D(), vertex, first_edge) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_getEdge_const_int_edge_int_nextEdgeType
    /// Returns one of the edges related to the given edge.
    /// 
    /// ## Parameters
    /// * edge: Subdivision edge ID.
    /// * nextEdgeType: Parameter specifying which of the related edges to return.
    /// The following values are possible:
    /// *   NEXT_AROUND_ORG next around the edge origin ( eOnext on the picture below if e is the input edge)
    /// *   NEXT_AROUND_DST next around the edge vertex ( eDnext )
    /// *   PREV_AROUND_ORG previous around the edge origin (reversed eRnext )
    /// *   PREV_AROUND_DST previous around the edge destination (reversed eLnext )
    /// *   NEXT_AROUND_LEFT next around the left facet ( eLnext )
    /// *   NEXT_AROUND_RIGHT next around the right facet ( eRnext )
    /// *   PREV_AROUND_LEFT previous around the left facet (reversed eOnext )
    /// *   PREV_AROUND_RIGHT previous around the right facet (reversed eDnext )
    /// 
    /// ![sample output](pics/quadedge.png)
    /// 
    /// @returns edge ID related to the input edge.
    pub fn get_edge(&self, edge: i32, next_edge_type: i32) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_getEdge_const_int_edge_int_nextEdgeType(self.as_raw_Subdiv2D(), edge, next_edge_type) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_nextEdge_const_int_edge
    /// Returns next edge around the edge origin.
    /// 
    /// ## Parameters
    /// * edge: Subdivision edge ID.
    /// 
    /// @returns an integer which is next edge ID around the edge origin: eOnext on the
    /// picture above if e is the input edge).
    pub fn next_edge(&self, edge: i32) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_nextEdge_const_int_edge(self.as_raw_Subdiv2D(), edge) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_rotateEdge_const_int_edge_int_rotate
    /// Returns another edge of the same quad-edge.
    /// 
    /// ## Parameters
    /// * edge: Subdivision edge ID.
    /// * rotate: Parameter specifying which of the edges of the same quad-edge as the input
    /// one to return. The following values are possible:
    /// *   0 - the input edge ( e on the picture below if e is the input edge)
    /// *   1 - the rotated edge ( eRot )
    /// *   2 - the reversed edge (reversed e (in green))
    /// *   3 - the reversed rotated edge (reversed eRot (in green))
    /// 
    /// @returns one of the edges ID of the same quad-edge as the input edge.
    pub fn rotate_edge(&self, edge: i32, rotate: i32) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_rotateEdge_const_int_edge_int_rotate(self.as_raw_Subdiv2D(), edge, rotate) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_symEdge_const_int_edge
    pub fn sym_edge(&self, edge: i32) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_symEdge_const_int_edge(self.as_raw_Subdiv2D(), edge) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_edgeOrg_const_int_edge_Point2f_X_orgpt
    /// Returns the edge origin.
    /// 
    /// ## Parameters
    /// * edge: Subdivision edge ID.
    /// * orgpt: Output vertex location.
    /// 
    /// @returns vertex ID.
    ///
    /// ## C++ default parameters:
    /// * orgpt: 0
    pub fn edge_org(&self, edge: i32, orgpt: &mut core::Point2f) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_edgeOrg_const_int_edge_Point2f_X_orgpt(self.as_raw_Subdiv2D(), edge, orgpt) }.into_result()
    }
    
    // identifier: cv_Subdiv2D_edgeDst_const_int_edge_Point2f_X_dstpt
    /// Returns the edge destination.
    /// 
    /// ## Parameters
    /// * edge: Subdivision edge ID.
    /// * dstpt: Output vertex location.
    /// 
    /// @returns vertex ID.
    ///
    /// ## C++ default parameters:
    /// * dstpt: 0
    pub fn edge_dst(&self, edge: i32, dstpt: &mut core::Point2f) -> Result<i32> {
        unsafe { sys::cv_core_cv_Subdiv2D_edgeDst_const_int_edge_Point2f_X_dstpt(self.as_raw_Subdiv2D(), edge, dstpt) }.into_result()
    }
    
}

// boxed class cv::TermCriteria
/// The class defining termination criteria for iterative algorithms.
/// 
/// You can initialize it by default constructor and then override any parameters, or the structure may
/// be fully initialized using the advanced variant of the constructor.
#[allow(dead_code)]
pub struct TermCriteria {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::TermCriteria {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_TermCriteria(self.ptr) };
    }
}
impl core::TermCriteria {
    #[doc(hidden)] pub fn as_raw_TermCriteria(&self) -> *mut c_void { self.ptr }
}

impl TermCriteria {

    // identifier: cv_TermCriteria_TermCriteria
    pub fn default() -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_TermCriteria_TermCriteria() }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_TermCriteria_TermCriteria_int_type_int_maxCount_double_epsilon
    /// ## Parameters
    /// * type: The type of termination criteria, one of TermCriteria::Type
    /// * maxCount: The maximum number of iterations or elements to compute.
    /// * epsilon: The desired accuracy or change in parameters at which the iterative algorithm stops.
    pub fn new(_type: i32, max_count: i32, epsilon: f64) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_TermCriteria_TermCriteria_int_type_int_maxCount_double_epsilon(_type, max_count, epsilon) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_TermCriteria_isValid_const
    pub fn is_valid(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_TermCriteria_isValid_const(self.as_raw_TermCriteria()) }.into_result()
    }
    
}

// Generating impl for trait cv::ThinPlateSplineShapeTransformer (trait)
/// Definition of the transformation
/// 
/// occupied in the paper "Principal Warps: Thin-Plate Splines and Decomposition of Deformations", by
/// F.L. Bookstein (PAMI 1989). :
pub trait ThinPlateSplineShapeTransformer : core::ShapeTransformer {
    #[doc(hidden)] fn as_raw_ThinPlateSplineShapeTransformer(&self) -> *mut c_void;
    // identifier: cv_ThinPlateSplineShapeTransformer_setRegularizationParameter_double_beta
    /// Set the regularization parameter for relaxing the exact interpolation requirements of the TPS
    /// algorithm.
    /// 
    /// ## Parameters
    /// * beta: value of the regularization parameter.
    fn set_regularization_parameter(&mut self, beta: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ThinPlateSplineShapeTransformer_setRegularizationParameter_double_beta(self.as_raw_ThinPlateSplineShapeTransformer(), beta) }.into_result()
    }
    
    // identifier: cv_ThinPlateSplineShapeTransformer_getRegularizationParameter_const
    fn get_regularization_parameter(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ThinPlateSplineShapeTransformer_getRegularizationParameter_const(self.as_raw_ThinPlateSplineShapeTransformer()) }.into_result()
    }
    
}

impl<'a> ThinPlateSplineShapeTransformer + 'a {

}

// boxed class cv::TickMeter
/// a Class to measure passing time.
/// 
/// The class computes passing time by counting the number of ticks per second. That is, the following code computes the
/// execution time in seconds:
/// ```ignore
/// TickMeter tm;
/// tm.start();
/// // do something ...
/// tm.stop();
/// std::cout << tm.getTimeSec();
/// ```
/// 
/// 
/// It is also possible to compute the average time over multiple runs:
/// ```ignore
/// TickMeter tm;
/// for (int i = 0; i < 100; i++)
/// {
/// tm.start();
/// // do something ...
/// tm.stop();
/// }
/// double average_time = tm.getTimeSec() / tm.getCounter();
/// std::cout << "Average time in second per iteration is: " << average_time << std::endl;
/// ```
/// 
/// @sa getTickCount, getTickFrequency
#[allow(dead_code)]
pub struct TickMeter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::TickMeter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_TickMeter(self.ptr) };
    }
}
impl core::TickMeter {
    #[doc(hidden)] pub fn as_raw_TickMeter(&self) -> *mut c_void { self.ptr }
}

impl TickMeter {

    // identifier: cv_TickMeter_TickMeter
    pub fn new() -> Result<core::TickMeter> {
        unsafe { sys::cv_core_cv_TickMeter_TickMeter() }.into_result().map(|x| core::TickMeter { ptr: x })
    }
    
    // identifier: cv_TickMeter_start
    /// starts counting ticks.
    pub fn start(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_TickMeter_start(self.as_raw_TickMeter()) }.into_result()
    }
    
    // identifier: cv_TickMeter_stop
    /// stops counting ticks.
    pub fn stop(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_TickMeter_stop(self.as_raw_TickMeter()) }.into_result()
    }
    
    // identifier: cv_TickMeter_getTimeTicks_const
    /// returns counted ticks.
    pub fn get_time_ticks(&self) -> Result<i64> {
        unsafe { sys::cv_core_cv_TickMeter_getTimeTicks_const(self.as_raw_TickMeter()) }.into_result()
    }
    
    // identifier: cv_TickMeter_getTimeMicro_const
    /// returns passed time in microseconds.
    pub fn get_time_micro(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_TickMeter_getTimeMicro_const(self.as_raw_TickMeter()) }.into_result()
    }
    
    // identifier: cv_TickMeter_getTimeMilli_const
    /// returns passed time in milliseconds.
    pub fn get_time_milli(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_TickMeter_getTimeMilli_const(self.as_raw_TickMeter()) }.into_result()
    }
    
    // identifier: cv_TickMeter_getTimeSec_const
    /// returns passed time in seconds.
    pub fn get_time_sec(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_TickMeter_getTimeSec_const(self.as_raw_TickMeter()) }.into_result()
    }
    
    // identifier: cv_TickMeter_getCounter_const
    /// returns internal counter value.
    pub fn get_counter(&self) -> Result<i64> {
        unsafe { sys::cv_core_cv_TickMeter_getCounter_const(self.as_raw_TickMeter()) }.into_result()
    }
    
    // identifier: cv_TickMeter_reset
    /// resets internal values.
    pub fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_TickMeter_reset(self.as_raw_TickMeter()) }.into_result()
    }
    
}

// Generating impl for trait cv::Tonemap (trait)
/// Base class for tonemapping algorithms - tools that are used to map HDR image to 8-bit range.
pub trait Tonemap : core::Algorithm {
    #[doc(hidden)] fn as_raw_Tonemap(&self) -> *mut c_void;
    // identifier: cv_Tonemap_process_Mat_src_Mat_dst
    /// Tonemaps image
    /// 
    /// ## Parameters
    /// * src: source image - 32-bit 3-channel Mat
    /// * dst: destination image - 32-bit 3-channel Mat with values in [0, 1] range
    fn process(&mut self, src: &core::Mat, dst: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_Tonemap_process_Mat_src_Mat_dst(self.as_raw_Tonemap(), src.as_raw_Mat(), dst.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_Tonemap_getGamma_const
    fn get_gamma(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_Tonemap_getGamma_const(self.as_raw_Tonemap()) }.into_result()
    }
    
    // identifier: cv_Tonemap_setGamma_float_gamma
    fn set_gamma(&mut self, gamma: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_Tonemap_setGamma_float_gamma(self.as_raw_Tonemap(), gamma) }.into_result()
    }
    
}

impl<'a> Tonemap + 'a {

}

// Generating impl for trait cv::TonemapDrago (trait)
/// Adaptive logarithmic mapping is a fast global tonemapping algorithm that scales the image in
/// logarithmic domain.
/// 
/// Since it's a global operator the same function is applied to all the pixels, it is controlled by the
/// bias parameter.
/// 
/// Optional saturation enhancement is possible as described in @cite FL02 .
/// 
/// For more information see @cite DM03 .
pub trait TonemapDrago : core::Tonemap {
    #[doc(hidden)] fn as_raw_TonemapDrago(&self) -> *mut c_void;
    // identifier: cv_TonemapDrago_getSaturation_const
    fn get_saturation(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_TonemapDrago_getSaturation_const(self.as_raw_TonemapDrago()) }.into_result()
    }
    
    // identifier: cv_TonemapDrago_setSaturation_float_saturation
    fn set_saturation(&mut self, saturation: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_TonemapDrago_setSaturation_float_saturation(self.as_raw_TonemapDrago(), saturation) }.into_result()
    }
    
    // identifier: cv_TonemapDrago_getBias_const
    fn get_bias(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_TonemapDrago_getBias_const(self.as_raw_TonemapDrago()) }.into_result()
    }
    
    // identifier: cv_TonemapDrago_setBias_float_bias
    fn set_bias(&mut self, bias: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_TonemapDrago_setBias_float_bias(self.as_raw_TonemapDrago(), bias) }.into_result()
    }
    
}

impl<'a> TonemapDrago + 'a {

}

// Generating impl for trait cv::TonemapMantiuk (trait)
/// This algorithm transforms image to contrast using gradients on all levels of gaussian pyramid,
/// transforms contrast values to HVS response and scales the response. After this the image is
/// reconstructed from new contrast values.
/// 
/// For more information see @cite MM06 .
pub trait TonemapMantiuk : core::Tonemap {
    #[doc(hidden)] fn as_raw_TonemapMantiuk(&self) -> *mut c_void;
    // identifier: cv_TonemapMantiuk_getScale_const
    fn get_scale(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_TonemapMantiuk_getScale_const(self.as_raw_TonemapMantiuk()) }.into_result()
    }
    
    // identifier: cv_TonemapMantiuk_setScale_float_scale
    fn set_scale(&mut self, scale: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_TonemapMantiuk_setScale_float_scale(self.as_raw_TonemapMantiuk(), scale) }.into_result()
    }
    
    // identifier: cv_TonemapMantiuk_getSaturation_const
    fn get_saturation(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_TonemapMantiuk_getSaturation_const(self.as_raw_TonemapMantiuk()) }.into_result()
    }
    
    // identifier: cv_TonemapMantiuk_setSaturation_float_saturation
    fn set_saturation(&mut self, saturation: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_TonemapMantiuk_setSaturation_float_saturation(self.as_raw_TonemapMantiuk(), saturation) }.into_result()
    }
    
}

impl<'a> TonemapMantiuk + 'a {

}

// Generating impl for trait cv::TonemapReinhard (trait)
/// This is a global tonemapping operator that models human visual system.
/// 
/// Mapping function is controlled by adaptation parameter, that is computed using light adaptation and
/// color adaptation.
/// 
/// For more information see @cite RD05 .
pub trait TonemapReinhard : core::Tonemap {
    #[doc(hidden)] fn as_raw_TonemapReinhard(&self) -> *mut c_void;
    // identifier: cv_TonemapReinhard_getIntensity_const
    fn get_intensity(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_TonemapReinhard_getIntensity_const(self.as_raw_TonemapReinhard()) }.into_result()
    }
    
    // identifier: cv_TonemapReinhard_setIntensity_float_intensity
    fn set_intensity(&mut self, intensity: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_TonemapReinhard_setIntensity_float_intensity(self.as_raw_TonemapReinhard(), intensity) }.into_result()
    }
    
    // identifier: cv_TonemapReinhard_getLightAdaptation_const
    fn get_light_adaptation(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_TonemapReinhard_getLightAdaptation_const(self.as_raw_TonemapReinhard()) }.into_result()
    }
    
    // identifier: cv_TonemapReinhard_setLightAdaptation_float_light_adapt
    fn set_light_adaptation(&mut self, light_adapt: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_TonemapReinhard_setLightAdaptation_float_light_adapt(self.as_raw_TonemapReinhard(), light_adapt) }.into_result()
    }
    
    // identifier: cv_TonemapReinhard_getColorAdaptation_const
    fn get_color_adaptation(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_TonemapReinhard_getColorAdaptation_const(self.as_raw_TonemapReinhard()) }.into_result()
    }
    
    // identifier: cv_TonemapReinhard_setColorAdaptation_float_color_adapt
    fn set_color_adaptation(&mut self, color_adapt: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_TonemapReinhard_setColorAdaptation_float_color_adapt(self.as_raw_TonemapReinhard(), color_adapt) }.into_result()
    }
    
}

impl<'a> TonemapReinhard + 'a {

}

// boxed class cv::TransverseMercatorWarper
#[allow(dead_code)]
pub struct TransverseMercatorWarper {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::TransverseMercatorWarper {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_TransverseMercatorWarper(self.ptr) };
    }
}
impl core::TransverseMercatorWarper {
    #[doc(hidden)] pub fn as_raw_TransverseMercatorWarper(&self) -> *mut c_void { self.ptr }
}

impl core::WarperCreator for TransverseMercatorWarper {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void { self.ptr }
}

impl TransverseMercatorWarper {

}

// boxed class cv::UMat
/// @todo document
#[allow(dead_code)]
pub struct UMat {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::UMat {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_UMat(self.ptr) };
    }
}
impl core::UMat {
    #[doc(hidden)] pub fn as_raw_UMat(&self) -> *mut c_void { self.ptr }
}

impl UMat {

    // identifier: cv_UMat_getMat_const_int_flags
    pub fn get_mat(&self, flags: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_UMat_getMat_const_int_flags(self.as_raw_UMat(), flags) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_UMat_copyTo_const_Mat_m
    pub fn copy_to(&self, m: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_copyTo_const_Mat_m(self.as_raw_UMat(), m.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_UMat_copyTo_const_Mat_m_Mat_mask
    pub fn copy_to_masked(&self, m: &mut core::Mat, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_copyTo_const_Mat_m_Mat_mask(self.as_raw_UMat(), m.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_UMat_convertTo_const_Mat_m_int_rtype_double_alpha_double_beta
    ///
    /// ## C++ default parameters:
    /// * alpha: 1
    /// * beta: 0
    pub fn convert_to(&self, m: &mut core::Mat, rtype: i32, alpha: f64, beta: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_convertTo_const_Mat_m_int_rtype_double_alpha_double_beta(self.as_raw_UMat(), m.as_raw_Mat(), rtype, alpha, beta) }.into_result()
    }
    
    // identifier: cv_UMat_dot_const_Mat_m
    pub fn dot(&self, m: &core::Mat) -> Result<f64> {
        unsafe { sys::cv_core_cv_UMat_dot_const_Mat_m(self.as_raw_UMat(), m.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_UMat_addref
    pub fn addref(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_addref(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_release
    pub fn release(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_release(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_deallocate
    pub fn deallocate(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_deallocate(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_locateROI_const_Size_wholeSize_Point_ofs
    pub fn locate_roi(&self, whole_size: core::Size, ofs: core::Point) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_locateROI_const_Size_wholeSize_Point_ofs(self.as_raw_UMat(), whole_size, ofs) }.into_result()
    }
    
    // identifier: cv_UMat_isContinuous_const
    pub fn is_continuous(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMat_isContinuous_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_isSubmatrix_const
    pub fn is_submatrix(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMat_isSubmatrix_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_elemSize_const
    pub fn elem_size(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_UMat_elemSize_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_elemSize1_const
    pub fn elem_size1(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_UMat_elemSize1_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_type_const
    pub fn typ(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_UMat_type_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_depth_const
    pub fn depth(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_UMat_depth_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_channels_const
    pub fn channels(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_UMat_channels_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_step1_const_int_i
    ///
    /// ## C++ default parameters:
    /// * i: 0
    pub fn step1(&self, i: i32) -> Result<size_t> {
        unsafe { sys::cv_core_cv_UMat_step1_const_int_i(self.as_raw_UMat(), i) }.into_result()
    }
    
    // identifier: cv_UMat_empty_const
    pub fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMat_empty_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_total_const
    pub fn total(&self) -> Result<size_t> {
        unsafe { sys::cv_core_cv_UMat_total_const(self.as_raw_UMat()) }.into_result()
    }
    
    // identifier: cv_UMat_checkVector_const_int_elemChannels_int_depth_bool_requireContinuous
    ///
    /// ## C++ default parameters:
    /// * depth: -1
    /// * require_continuous: true
    pub fn check_vector(&self, elem_channels: i32, depth: i32, require_continuous: bool) -> Result<i32> {
        unsafe { sys::cv_core_cv_UMat_checkVector_const_int_elemChannels_int_depth_bool_requireContinuous(self.as_raw_UMat(), elem_channels, depth, require_continuous) }.into_result()
    }
    
    // identifier: cv_UMat_handle_const_int_accessFlags
    pub fn handle(&self, access_flags: i32) -> Result<&mut c_void> {
        unsafe { sys::cv_core_cv_UMat_handle_const_int_accessFlags(self.as_raw_UMat(), access_flags) }.into_result().and_then(|x| unsafe { x.as_mut() }.ok_or_else(|| Error::new(core::StsNullPtr, format!("Function returned Null pointer"))))
    }
    
    // identifier: cv_UMat_ndoffset_const_size_t_X_ofs
    pub fn ndoffset(&self, ofs: &mut size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_ndoffset_const_size_t_X_ofs(self.as_raw_UMat(), ofs) }.into_result()
    }
    
    // identifier: cv_UMat_updateContinuityFlag
    pub fn update_continuity_flag(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_UMat_updateContinuityFlag(self.as_raw_UMat()) }.into_result()
    }
    
}

// boxed class cv::UMatData
/// Comma-separated Matrix Initializer
/// 
/// The class instances are usually not created explicitly.
/// Instead, they are created on "matrix << firstValue" operator.
/// 
/// The sample below initializes 2x2 rotation matrix:
/// 
/// \code
/// double angle = 30, a = cos(angle*CV_PI/180), b = sin(angle*CV_PI/180);
/// Mat R = (Mat_<double>(2,2) << a, -b, b, a);
/// \endcode
#[allow(dead_code)]
pub struct UMatData {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::UMatData {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_UMatData(self.ptr) };
    }
}
impl core::UMatData {
    #[doc(hidden)] pub fn as_raw_UMatData(&self) -> *mut c_void { self.ptr }
}

impl UMatData {

    // identifier: cv_UMatData_lock
    pub fn lock(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_UMatData_lock(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_unlock
    pub fn unlock(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_UMatData_unlock(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_hostCopyObsolete_const
    pub fn host_copy_obsolete(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMatData_hostCopyObsolete_const(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_deviceCopyObsolete_const
    pub fn device_copy_obsolete(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMatData_deviceCopyObsolete_const(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_deviceMemMapped_const
    pub fn device_mem_mapped(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMatData_deviceMemMapped_const(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_copyOnMap_const
    pub fn copy_on_map(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMatData_copyOnMap_const(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_tempUMat_const
    pub fn temp_u_mat(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMatData_tempUMat_const(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_tempCopiedUMat_const
    pub fn temp_copied_u_mat(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_UMatData_tempCopiedUMat_const(self.as_raw_UMatData()) }.into_result()
    }
    
    // identifier: cv_UMatData_markHostCopyObsolete_bool_flag
    pub fn mark_host_copy_obsolete(&mut self, flag: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_UMatData_markHostCopyObsolete_bool_flag(self.as_raw_UMatData(), flag) }.into_result()
    }
    
    // identifier: cv_UMatData_markDeviceCopyObsolete_bool_flag
    pub fn mark_device_copy_obsolete(&mut self, flag: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_UMatData_markDeviceCopyObsolete_bool_flag(self.as_raw_UMatData(), flag) }.into_result()
    }
    
    // identifier: cv_UMatData_markDeviceMemMapped_bool_flag
    pub fn mark_device_mem_mapped(&mut self, flag: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_UMatData_markDeviceMemMapped_bool_flag(self.as_raw_UMatData(), flag) }.into_result()
    }
    
}

// boxed class cv::VideoCapture
/// Class for video capturing from video files, image sequences or cameras.
/// 
/// The class provides C++ API for capturing video from cameras or for reading video files and image sequences.
/// 
/// Here is how the class can be used:
/// @include samples/cpp/videocapture_basic.cpp
/// 
/// 
/// Note: In @ref videoio_c "C API" the black-box structure `CvCapture` is used instead of %VideoCapture.
/// 
/// Note:
/// *   (C++) A basic sample on using the %VideoCapture interface can be found at
/// `OPENCV_SOURCE_CODE/samples/cpp/videocapture_starter.cpp`
/// *   (Python) A basic sample on using the %VideoCapture interface can be found at
/// `OPENCV_SOURCE_CODE/samples/python/video.py`
/// *   (Python) A multi threaded video processing sample can be found at
/// `OPENCV_SOURCE_CODE/samples/python/video_threaded.py`
/// *   (Python) %VideoCapture sample showcasing some features of the Video4Linux2 backend
/// `OPENCV_SOURCE_CODE/samples/python/video_v4l2.py`
#[allow(dead_code)]
pub struct VideoCapture {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::VideoCapture {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_VideoCapture(self.ptr) };
    }
}
impl core::VideoCapture {
    #[doc(hidden)] pub fn as_raw_VideoCapture(&self) -> *mut c_void { self.ptr }
}

impl VideoCapture {

    // identifier: cv_VideoCapture_VideoCapture
    /// Default constructor
    /// 
    /// Note: In @ref videoio_c "C API", when you finished working with video, release CvCapture structure with
    /// cvReleaseCapture(), or use Ptr\<CvCapture\> that calls cvReleaseCapture() automatically in the
    /// destructor.
    pub fn default() -> Result<core::VideoCapture> {
        unsafe { sys::cv_core_cv_VideoCapture_VideoCapture() }.into_result().map(|x| core::VideoCapture { ptr: x })
    }
    
    // identifier: cv_VideoCapture_VideoCapture_String_filename
    /// @overload
    ///   Open video file or a capturing device or a IP video stream for video capturing
    /// 
    /// Same as VideoCapture(const String& filename, int apiPreference) but using default Capture API backends
    pub fn filename(filename: &str) -> Result<core::VideoCapture> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoCapture_VideoCapture_String_filename(filename.as_ptr()) }.into_result().map(|x| core::VideoCapture { ptr: x })
    }
    
    // identifier: cv_VideoCapture_VideoCapture_String_filename_int_apiPreference
    /// @overload
    ///   Open video file or a capturing device or a IP video stream for video capturing with API Preference
    /// 
    /// ## Parameters
    /// * filename: it can be:
    /// - name of video file (eg. `video.avi`)
    /// - or image sequence (eg. `img_%02d.jpg`, which will read samples like `img_00.jpg, img_01.jpg, img_02.jpg, ...`)
    /// - or URL of video stream (eg. `protocol://host:port/script_name?script_params|auth`).
    /// Note that each video stream or IP camera feed has its own URL scheme. Please refer to the
    /// documentation of source stream to know the right URL.
    /// * apiPreference: preferred Capture API backends to use. Can be used to enforce a specific reader
    /// implementation if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW.
    /// @sa The list of supported API backends cv::VideoCaptureAPIs
    pub fn filename_api(filename: &str, api_preference: i32) -> Result<core::VideoCapture> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoCapture_VideoCapture_String_filename_int_apiPreference(filename.as_ptr(), api_preference) }.into_result().map(|x| core::VideoCapture { ptr: x })
    }
    
    // identifier: cv_VideoCapture_VideoCapture_int_index
    /// @overload
    ///   Open a camera for video capturing
    /// 
    /// ## Parameters
    /// * index: camera_id + domain_offset (CAP_*) id of the video capturing device to open. To open default camera using default backend just pass 0.
    /// Use a `domain_offset` to enforce a specific reader implementation if multiple are available like cv::CAP_FFMPEG or cv::CAP_IMAGES or cv::CAP_DSHOW.
    /// e.g. to open Camera 1 using the MS Media Foundation API use `index = 1 + cv::CAP_MSMF`
    /// 
    /// @sa The list of supported API backends cv::VideoCaptureAPIs
    pub fn index(index: i32) -> Result<core::VideoCapture> {
        unsafe { sys::cv_core_cv_VideoCapture_VideoCapture_int_index(index) }.into_result().map(|x| core::VideoCapture { ptr: x })
    }
    
    // identifier: cv_VideoCapture_VideoCapture_int_index_int_apiPreference
    /// @overload
    ///   Opens a camera for video capturing
    /// 
    /// ## Parameters
    /// * index: id of the video capturing device to open. To open default camera using default backend just pass 0.
    /// (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
    /// * apiPreference: preferred Capture API backends to use. Can be used to enforce a specific reader
    /// implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L2.
    /// 
    /// @sa The list of supported API backends cv::VideoCaptureAPIs
    pub fn new(index: i32, api_preference: i32) -> Result<core::VideoCapture> {
        unsafe { sys::cv_core_cv_VideoCapture_VideoCapture_int_index_int_apiPreference(index, api_preference) }.into_result().map(|x| core::VideoCapture { ptr: x })
    }
    
    // identifier: cv_VideoCapture_open_String_filename
    /// Open video file or a capturing device or a IP video stream for video capturing
    /// 
    /// @overload
    /// 
    /// Parameters are same as the constructor VideoCapture(const String& filename)
    /// @return `true` if the file has been successfully opened
    /// 
    /// The method first calls VideoCapture::release to close the already opened file or camera.
    pub fn open_filename(&mut self, filename: &str) -> Result<bool> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoCapture_open_String_filename(self.as_raw_VideoCapture(), filename.as_ptr()) }.into_result()
    }
    
    // identifier: cv_VideoCapture_open_int_index
    /// Open a camera for video capturing
    /// 
    /// @overload
    /// 
    /// Parameters are same as the constructor VideoCapture(int index)
    /// @return `true` if the camera has been successfully opened.
    /// 
    /// The method first calls VideoCapture::release to close the already opened file or camera.
    pub fn open_index(&mut self, index: i32) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoCapture_open_int_index(self.as_raw_VideoCapture(), index) }.into_result()
    }
    
    // identifier: cv_VideoCapture_open_int_cameraNum_int_apiPreference
    /// Open a camera for video capturing
    /// 
    /// @overload
    /// 
    /// Parameters are similar as the constructor VideoCapture(int index),except it takes an additional argument apiPreference.
    /// Definitely, is same as open(int index) where `index=cameraNum + apiPreference`
    /// @return `true` if the camera has been successfully opened.
    pub fn open(&mut self, camera_num: i32, api_preference: i32) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoCapture_open_int_cameraNum_int_apiPreference(self.as_raw_VideoCapture(), camera_num, api_preference) }.into_result()
    }
    
    // identifier: cv_VideoCapture_isOpened_const
    /// Returns true if video capturing has been initialized already.
    /// 
    /// If the previous call to VideoCapture constructor or VideoCapture::open() succeeded, the method returns
    /// true.
    pub fn is_opened(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoCapture_isOpened_const(self.as_raw_VideoCapture()) }.into_result()
    }
    
    // identifier: cv_VideoCapture_release
    /// Closes video file or capturing device.
    /// 
    /// The method is automatically called by subsequent VideoCapture::open and by VideoCapture
    /// destructor.
    /// 
    /// The C function also deallocates memory and clears \*capture pointer.
    pub fn release(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_VideoCapture_release(self.as_raw_VideoCapture()) }.into_result()
    }
    
    // identifier: cv_VideoCapture_grab
    /// Grabs the next frame from video file or capturing device.
    /// 
    /// @return `true` (non-zero) in the case of success.
    /// 
    /// The method/function grabs the next frame from video file or camera and returns true (non-zero) in
    /// the case of success.
    /// 
    /// The primary use of the function is in multi-camera environments, especially when the cameras do not
    /// have hardware synchronization. That is, you call VideoCapture::grab() for each camera and after that
    /// call the slower method VideoCapture::retrieve() to decode and get frame from each camera. This way
    /// the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames
    /// from different cameras will be closer in time.
    /// 
    /// Also, when a connected camera is multi-head (for example, a stereo camera or a Kinect device), the
    /// correct way of retrieving data from it is to call VideoCapture::grab() first and then call
    /// VideoCapture::retrieve() one or more times with different values of the channel parameter.
    /// 
    /// @ref tutorial_kinect_openni
    pub fn grab(&mut self) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoCapture_grab(self.as_raw_VideoCapture()) }.into_result()
    }
    
    // identifier: cv_VideoCapture_retrieve_Mat_image_int_flag
    /// Decodes and returns the grabbed video frame.
    /// 
    /// ## Parameters
    /// * [out]: image the video frame is returned here. If no frames has been grabbed the image will be empty.
    /// * flag: it could be a frame index or a driver specific flag
    /// @return `false` if no frames has been grabbed
    /// 
    /// The method decodes and returns the just grabbed frame. If no frames has been grabbed
    /// (camera has been disconnected, or there are no more frames in video file), the method returns false
    /// and the function returns an empty image (with %cv::Mat, test it with Mat::empty()).
    /// 
    /// @sa read()
    /// 
    /// 
    /// Note: In @ref videoio_c "C API", functions cvRetrieveFrame() and cv.RetrieveFrame() return image stored inside the video
    /// capturing structure. It is not allowed to modify or release the image! You can copy the frame using
    /// cvCloneImage and then do whatever you want with the copy.
    ///
    /// ## C++ default parameters:
    /// * flag: 0
    pub fn retrieve(&mut self, image: &mut core::Mat, flag: i32) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoCapture_retrieve_Mat_image_int_flag(self.as_raw_VideoCapture(), image.as_raw_Mat(), flag) }.into_result()
    }
    
    // identifier: cv_VideoCapture_read_Mat_image
    /// Grabs, decodes and returns the next video frame.
    /// 
    /// ## Parameters
    /// * [out]: image the video frame is returned here. If no frames has been grabbed the image will be empty.
    /// @return `false` if no frames has been grabbed
    /// 
    /// The method/function combines VideoCapture::grab() and VideoCapture::retrieve() in one call. This is the
    /// most convenient method for reading video files or capturing data from decode and returns the just
    /// grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more
    /// frames in video file), the method returns false and the function returns empty image (with %cv::Mat, test it with Mat::empty()).
    /// 
    /// 
    /// Note: In @ref videoio_c "C API", functions cvRetrieveFrame() and cv.RetrieveFrame() return image stored inside the video
    /// capturing structure. It is not allowed to modify or release the image! You can copy the frame using
    /// cvCloneImage and then do whatever you want with the copy.
    pub fn read(&mut self, image: &mut core::Mat) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoCapture_read_Mat_image(self.as_raw_VideoCapture(), image.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_VideoCapture_set_int_propId_double_value
    /// Sets a property in the VideoCapture.
    /// 
    /// ## Parameters
    /// * propId: Property identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...)
    /// or one from @ref videoio_flags_others
    /// * value: Value of the property.
    /// @return `true` if the property is supported by backend used by the VideoCapture instance.
    /// 
    /// Note: Even if it returns `true` this doesn't ensure that the property
    /// value has been accepted by the capture device. See note in VideoCapture::get()
    pub fn set(&mut self, prop_id: i32, value: f64) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoCapture_set_int_propId_double_value(self.as_raw_VideoCapture(), prop_id, value) }.into_result()
    }
    
    // identifier: cv_VideoCapture_get_const_int_propId
    /// Returns the specified VideoCapture property
    /// 
    /// ## Parameters
    /// * propId: Property identifier from cv::VideoCaptureProperties (eg. cv::CAP_PROP_POS_MSEC, cv::CAP_PROP_POS_FRAMES, ...)
    /// or one from @ref videoio_flags_others
    /// @return Value for the specified property. Value 0 is returned when querying a property that is
    /// not supported by the backend used by the VideoCapture instance.
    /// 
    /// 
    /// Note: Reading / writing properties involves many layers. Some unexpected result might happens
    /// along this chain.
    /// ```ignore {.txt}
    /// `VideoCapture -> API Backend -> Operating System -> Device Driver -> Device Hardware`
    /// ```
    /// 
    /// The returned value might be different from what really used by the device or it could be encoded
    /// using device dependent rules (eg. steps or percentage). Effective behaviour depends from device
    /// driver and API Backend
    pub fn get(&self, prop_id: i32) -> Result<f64> {
        unsafe { sys::cv_core_cv_VideoCapture_get_const_int_propId(self.as_raw_VideoCapture(), prop_id) }.into_result()
    }
    
    // identifier: cv_VideoCapture_open_String_filename_int_apiPreference
    /// Open video file or a capturing device or a IP video stream for video capturing with API Preference
    /// 
    /// @overload
    /// 
    /// Parameters are same as the constructor VideoCapture(const String& filename, int apiPreference)
    /// @return `true` if the file has been successfully opened
    /// 
    /// The method first calls VideoCapture::release to close the already opened file or camera.
    pub fn open_filename_api(&mut self, filename: &str, api_preference: i32) -> Result<bool> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoCapture_open_String_filename_int_apiPreference(self.as_raw_VideoCapture(), filename.as_ptr(), api_preference) }.into_result()
    }
    
    // identifier: cv_VideoCapture_getBackendName_const
    /// Returns used backend API name
    /// 
    /// 
    /// Note: Stream should be opened.
    pub fn get_backend_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_VideoCapture_getBackendName_const(self.as_raw_VideoCapture()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

// boxed class cv::VideoWriter
/// Video writer class.
/// 
/// The class provides C++ API for writing video files or image sequences.
#[allow(dead_code)]
pub struct VideoWriter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::VideoWriter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_VideoWriter(self.ptr) };
    }
}
impl core::VideoWriter {
    #[doc(hidden)] pub fn as_raw_VideoWriter(&self) -> *mut c_void { self.ptr }
}

impl VideoWriter {

    // identifier: cv_VideoWriter_VideoWriter
    /// Default constructors
    /// 
    /// The constructors/functions initialize video writers.
    /// *   On Linux FFMPEG is used to write videos;
    /// *   On Windows FFMPEG or VFW is used;
    /// *   On MacOSX QTKit is used.
    pub fn default() -> Result<core::VideoWriter> {
        unsafe { sys::cv_core_cv_VideoWriter_VideoWriter() }.into_result().map(|x| core::VideoWriter { ptr: x })
    }
    
    // identifier: cv_VideoWriter_VideoWriter_String_filename_int_fourcc_double_fps_Size_frameSize_bool_isColor
    /// @overload
    /// ## Parameters
    /// * filename: Name of the output video file.
    /// * fourcc: 4-character code of codec used to compress the frames. For example,
    /// VideoWriter::fourcc('P','I','M','1') is a MPEG-1 codec, VideoWriter::fourcc('M','J','P','G') is a
    /// motion-jpeg codec etc. List of codes can be obtained at [Video Codecs by
    /// FOURCC](http://www.fourcc.org/codecs.php) page. FFMPEG backend with MP4 container natively uses
    /// other values as fourcc code: see [ObjectType](http://www.mp4ra.org/codecs.html),
    /// so you may receive a warning message from OpenCV about fourcc code conversion.
    /// * fps: Framerate of the created video stream.
    /// * frameSize: Size of the video frames.
    /// * isColor: If it is not zero, the encoder will expect and encode color frames, otherwise it
    /// will work with grayscale frames (the flag is currently supported on Windows only).
    /// 
    /// @b Tips:
    /// - With some backends `fourcc=-1` pops up the codec selection dialog from the system.
    /// - To save image sequence use a proper filename (eg. `img_%02d.jpg`) and `fourcc=0`
    /// OR `fps=0`. Use uncompressed image format (eg. `img_%02d.BMP`) to save raw frames.
    /// - Most codecs are lossy. If you want lossless video file you need to use a lossless codecs
    /// (eg. FFMPEG FFV1, Huffman HFYU, Lagarith LAGS, etc...)
    /// - If FFMPEG is enabled, using `codec=0; fps=0;` you can create an uncompressed (raw) video file.
    ///
    /// ## C++ default parameters:
    /// * is_color: true
    pub fn new(filename: &str, fourcc: i32, fps: f64, frame_size: core::Size, is_color: bool) -> Result<core::VideoWriter> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoWriter_VideoWriter_String_filename_int_fourcc_double_fps_Size_frameSize_bool_isColor(filename.as_ptr(), fourcc, fps, frame_size, is_color) }.into_result().map(|x| core::VideoWriter { ptr: x })
    }
    
    // identifier: cv_VideoWriter_VideoWriter_String_filename_int_apiPreference_int_fourcc_double_fps_Size_frameSize_bool_isColor
    /// @overload
    /// The `apiPreference` parameter allows to specify API backends to use. Can be used to enforce a specific reader implementation
    /// if multiple are available: e.g. cv::CAP_FFMPEG or cv::CAP_GSTREAMER.
    ///
    /// ## C++ default parameters:
    /// * is_color: true
    pub fn new_1(filename: &str, api_preference: i32, fourcc: i32, fps: f64, frame_size: core::Size, is_color: bool) -> Result<core::VideoWriter> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoWriter_VideoWriter_String_filename_int_apiPreference_int_fourcc_double_fps_Size_frameSize_bool_isColor(filename.as_ptr(), api_preference, fourcc, fps, frame_size, is_color) }.into_result().map(|x| core::VideoWriter { ptr: x })
    }
    
    // identifier: cv_VideoWriter_open_String_filename_int_fourcc_double_fps_Size_frameSize_bool_isColor
    /// Initializes or reinitializes video writer.
    /// 
    /// The method opens video writer. Parameters are the same as in the constructor
    /// VideoWriter::VideoWriter.
    /// @return `true` if video writer has been successfully initialized
    /// 
    /// The method first calls VideoWriter::release to close the already opened file.
    ///
    /// ## C++ default parameters:
    /// * is_color: true
    pub fn open(&mut self, filename: &str, fourcc: i32, fps: f64, frame_size: core::Size, is_color: bool) -> Result<bool> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoWriter_open_String_filename_int_fourcc_double_fps_Size_frameSize_bool_isColor(self.as_raw_VideoWriter(), filename.as_ptr(), fourcc, fps, frame_size, is_color) }.into_result()
    }
    
    // identifier: cv_VideoWriter_open_String_filename_int_apiPreference_int_fourcc_double_fps_Size_frameSize_bool_isColor
    /// @overload
    ///
    /// ## C++ default parameters:
    /// * is_color: true
    pub fn open_1(&mut self, filename: &str, api_preference: i32, fourcc: i32, fps: f64, frame_size: core::Size, is_color: bool) -> Result<bool> {
        string_arg!(filename);
        unsafe { sys::cv_core_cv_VideoWriter_open_String_filename_int_apiPreference_int_fourcc_double_fps_Size_frameSize_bool_isColor(self.as_raw_VideoWriter(), filename.as_ptr(), api_preference, fourcc, fps, frame_size, is_color) }.into_result()
    }
    
    // identifier: cv_VideoWriter_isOpened_const
    /// Returns true if video writer has been successfully initialized.
    pub fn is_opened(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoWriter_isOpened_const(self.as_raw_VideoWriter()) }.into_result()
    }
    
    // identifier: cv_VideoWriter_release
    /// Closes the video writer.
    /// 
    /// The method is automatically called by subsequent VideoWriter::open and by the VideoWriter
    /// destructor.
    pub fn release(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_VideoWriter_release(self.as_raw_VideoWriter()) }.into_result()
    }
    
    // identifier: cv_VideoWriter_write_Mat_image
    /// Writes the next video frame
    /// 
    /// ## Parameters
    /// * image: The written frame. In general, color images are expected in BGR format.
    /// 
    /// The function/method writes the specified image to video file. It must have the same size as has
    /// been specified when opening the video writer.
    pub fn write(&mut self, image: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_VideoWriter_write_Mat_image(self.as_raw_VideoWriter(), image.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_VideoWriter_set_int_propId_double_value
    /// Sets a property in the VideoWriter.
    /// 
    /// ## Parameters
    /// * propId: Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY)
    /// or one of @ref videoio_flags_others
    /// 
    /// * value: Value of the property.
    /// @return  `true` if the property is supported by the backend used by the VideoWriter instance.
    pub fn set(&mut self, prop_id: i32, value: f64) -> Result<bool> {
        unsafe { sys::cv_core_cv_VideoWriter_set_int_propId_double_value(self.as_raw_VideoWriter(), prop_id, value) }.into_result()
    }
    
    // identifier: cv_VideoWriter_get_const_int_propId
    /// Returns the specified VideoWriter property
    /// 
    /// ## Parameters
    /// * propId: Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY)
    /// or one of @ref videoio_flags_others
    /// 
    /// @return Value for the specified property. Value 0 is returned when querying a property that is
    /// not supported by the backend used by the VideoWriter instance.
    pub fn get(&self, prop_id: i32) -> Result<f64> {
        unsafe { sys::cv_core_cv_VideoWriter_get_const_int_propId(self.as_raw_VideoWriter(), prop_id) }.into_result()
    }
    
    // identifier: cv_VideoWriter_fourcc_char_c1_char_c2_char_c3_char_c4
    /// Concatenates 4 chars to a fourcc code
    /// 
    /// @return a fourcc code
    /// 
    /// This static method constructs the fourcc code of the codec to be used in the constructor
    /// VideoWriter::VideoWriter or VideoWriter::open.
    pub fn fourcc(c1: i8, c2: i8, c3: i8, c4: i8) -> Result<i32> {
        unsafe { sys::cv_core_cv_VideoWriter_fourcc_char_c1_char_c2_char_c3_char_c4(c1, c2, c3, c4) }.into_result()
    }
    
    // identifier: cv_VideoWriter_getBackendName_const
    /// Returns used backend API name
    /// 
    /// 
    /// Note: Stream should be opened.
    pub fn get_backend_name(&self) -> Result<String> {
        unsafe { sys::cv_core_cv_VideoWriter_getBackendName_const(self.as_raw_VideoWriter()) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

// Generating impl for trait cv::WarperCreator (trait)
/// Image warper factories base class.
pub trait WarperCreator {
    #[doc(hidden)] fn as_raw_WarperCreator(&self) -> *mut c_void;
}

impl<'a> WarperCreator + 'a {

}

// boxed class cv::dnn::AbsLayer
#[allow(dead_code)]
pub struct AbsLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::AbsLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_AbsLayer(self.ptr) };
    }
}
impl core::AbsLayer {
    #[doc(hidden)] pub fn as_raw_AbsLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for AbsLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for AbsLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for AbsLayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl AbsLayer {

}

// Generating impl for trait cv::dnn::ActivationLayer (trait)
pub trait ActivationLayer : core::Layer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void;
    // identifier: cv_dnn_ActivationLayer_forwardSlice_const_const_float_X_src_float_X_dst_int_len_size_t_outPlaneSize_int_cn0_int_cn1
    fn forward_slice(&self, src: &f32, dst: &mut f32, len: i32, out_plane_size: size_t, cn0: i32, cn1: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_ActivationLayer_forwardSlice_const_const_float_X_src_float_X_dst_int_len_size_t_outPlaneSize_int_cn0_int_cn1(self.as_raw_ActivationLayer(), src, dst, len, out_plane_size, cn0, cn1) }.into_result()
    }
    
}

impl<'a> ActivationLayer + 'a {

}

// boxed class cv::dnn::BNLLLayer
#[allow(dead_code)]
pub struct BNLLLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BNLLLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BNLLLayer(self.ptr) };
    }
}
impl core::BNLLLayer {
    #[doc(hidden)] pub fn as_raw_BNLLLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for BNLLLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for BNLLLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for BNLLLayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl BNLLLayer {

}

// boxed class cv::dnn::BackendNode
/// Derivatives of this class encapsulates functions of certain backends.
#[allow(dead_code)]
pub struct BackendNode {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BackendNode {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BackendNode(self.ptr) };
    }
}
impl core::BackendNode {
    #[doc(hidden)] pub fn as_raw_BackendNode(&self) -> *mut c_void { self.ptr }
}

impl BackendNode {

    // identifier: cv_dnn_BackendNode_BackendNode_int_backendId
    pub fn new(backend_id: i32) -> Result<core::BackendNode> {
        unsafe { sys::cv_core_cv_dnn_BackendNode_BackendNode_int_backendId(backend_id) }.into_result().map(|x| core::BackendNode { ptr: x })
    }
    
}

// Generating impl for trait cv::dnn::BackendWrapper (trait)
/// Derivatives of this class wraps cv::Mat for different backends and targets.
pub trait BackendWrapper {
    #[doc(hidden)] fn as_raw_BackendWrapper(&self) -> *mut c_void;
    // identifier: cv_dnn_BackendWrapper_copyToHost
    /// Transfer data to CPU host memory.
    fn copy_to_host(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_BackendWrapper_copyToHost(self.as_raw_BackendWrapper()) }.into_result()
    }
    
    // identifier: cv_dnn_BackendWrapper_setHostDirty
    /// Indicate that an actual data is on CPU.
    fn set_host_dirty(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_BackendWrapper_setHostDirty(self.as_raw_BackendWrapper()) }.into_result()
    }
    
}

impl<'a> BackendWrapper + 'a {

}

// Generating impl for trait cv::dnn::BaseConvolutionLayer (trait)
pub trait BaseConvolutionLayer : core::Layer {
    #[doc(hidden)] fn as_raw_BaseConvolutionLayer(&self) -> *mut c_void;
}

impl<'a> BaseConvolutionLayer + 'a {

}

// boxed class cv::dnn::BatchNormLayer
#[allow(dead_code)]
pub struct BatchNormLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BatchNormLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BatchNormLayer(self.ptr) };
    }
}
impl core::BatchNormLayer {
    #[doc(hidden)] pub fn as_raw_BatchNormLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for BatchNormLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for BatchNormLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for BatchNormLayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl BatchNormLayer {

}

// boxed class cv::dnn::BlankLayer
/// Partial List of Implemented Layers
/// 
/// # Partial List of Implemented Layers
/// @{
/// This subsection of dnn module contains information about built-in layers and their descriptions.
/// 
/// Classes listed here, in fact, provides C++ API for creating instances of built-in layers.
/// In addition to this way of layers instantiation, there is a more common factory API (see @ref dnnLayerFactory), it allows to create layers dynamically (by name) and register new ones.
/// You can use both API, but factory API is less convenient for native C++ programming and basically designed for use inside importers (see @ref readNetFromCaffe(), @ref readNetFromTorch(), @ref readNetFromTensorflow()).
/// 
/// Built-in layers partially reproduce functionality of corresponding Caffe and Torch7 layers.
/// In particular, the following layers and Caffe importer were tested to reproduce <a href="http://caffe.berkeleyvision.org/tutorial/layers.html">Caffe</a> functionality:
/// - Convolution
/// - Deconvolution
/// - Pooling
/// - InnerProduct
/// - TanH, ReLU, Sigmoid, BNLL, Power, AbsVal
/// - Softmax
/// - Reshape, Flatten, Slice, Split
/// - LRN
/// - MVN
/// - Dropout (since it does nothing on forward pass -))
#[allow(dead_code)]
pub struct BlankLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::BlankLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_BlankLayer(self.ptr) };
    }
}
impl core::BlankLayer {
    #[doc(hidden)] pub fn as_raw_BlankLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for BlankLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for BlankLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl BlankLayer {

}

// boxed class cv::dnn::ChannelsPReLULayer
#[allow(dead_code)]
pub struct ChannelsPReLULayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ChannelsPReLULayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ChannelsPReLULayer(self.ptr) };
    }
}
impl core::ChannelsPReLULayer {
    #[doc(hidden)] pub fn as_raw_ChannelsPReLULayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ChannelsPReLULayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ChannelsPReLULayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for ChannelsPReLULayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl ChannelsPReLULayer {

}

// boxed class cv::dnn::ConcatLayer
#[allow(dead_code)]
pub struct ConcatLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ConcatLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ConcatLayer(self.ptr) };
    }
}
impl core::ConcatLayer {
    #[doc(hidden)] pub fn as_raw_ConcatLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ConcatLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ConcatLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ConcatLayer {

}

// boxed class cv::dnn::ConstLayer
/// Constant layer produces the same data blob at an every forward pass.
#[allow(dead_code)]
pub struct ConstLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ConstLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ConstLayer(self.ptr) };
    }
}
impl core::ConstLayer {
    #[doc(hidden)] pub fn as_raw_ConstLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ConstLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ConstLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ConstLayer {

}

// boxed class cv::dnn::ConvolutionLayer
#[allow(dead_code)]
pub struct ConvolutionLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ConvolutionLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ConvolutionLayer(self.ptr) };
    }
}
impl core::ConvolutionLayer {
    #[doc(hidden)] pub fn as_raw_ConvolutionLayer(&self) -> *mut c_void { self.ptr }
}

impl core::BaseConvolutionLayer for ConvolutionLayer {
    #[doc(hidden)] fn as_raw_BaseConvolutionLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ConvolutionLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ConvolutionLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl ConvolutionLayer {

}

// boxed class cv::dnn::CropAndResizeLayer
#[allow(dead_code)]
pub struct CropAndResizeLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::CropAndResizeLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_CropAndResizeLayer(self.ptr) };
    }
}
impl core::CropAndResizeLayer {
    #[doc(hidden)] pub fn as_raw_CropAndResizeLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for CropAndResizeLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for CropAndResizeLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl CropAndResizeLayer {

}

// boxed class cv::dnn::CropLayer
#[allow(dead_code)]
pub struct CropLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::CropLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_CropLayer(self.ptr) };
    }
}
impl core::CropLayer {
    #[doc(hidden)] pub fn as_raw_CropLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for CropLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for CropLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl CropLayer {

}

// boxed class cv::dnn::DeconvolutionLayer
#[allow(dead_code)]
pub struct DeconvolutionLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DeconvolutionLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DeconvolutionLayer(self.ptr) };
    }
}
impl core::DeconvolutionLayer {
    #[doc(hidden)] pub fn as_raw_DeconvolutionLayer(&self) -> *mut c_void { self.ptr }
}

impl core::BaseConvolutionLayer for DeconvolutionLayer {
    #[doc(hidden)] fn as_raw_BaseConvolutionLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for DeconvolutionLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for DeconvolutionLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl DeconvolutionLayer {

}

// boxed class cv::dnn::DetectionOutputLayer
#[allow(dead_code)]
pub struct DetectionOutputLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DetectionOutputLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DetectionOutputLayer(self.ptr) };
    }
}
impl core::DetectionOutputLayer {
    #[doc(hidden)] pub fn as_raw_DetectionOutputLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for DetectionOutputLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for DetectionOutputLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl DetectionOutputLayer {

}

// Generating impl for trait cv::dnn::Dict (trait)
/// This class implements name-value dictionary, values are instances of DictValue.
pub trait Dict {
    #[doc(hidden)] fn as_raw_Dict(&self) -> *mut c_void;
    // identifier: cv_dnn_Dict_has_const_String_key
    fn has(&self, key: &str) -> Result<bool> {
        string_arg!(key);
        unsafe { sys::cv_core_cv_dnn_Dict_has_const_String_key(self.as_raw_Dict(), key.as_ptr()) }.into_result()
    }
    
    // identifier: cv_dnn_Dict_ptr_String_key
    fn ptr_mut(&mut self, key: &str) -> Result<core::DictValue> {
        string_arg!(key);
        unsafe { sys::cv_core_cv_dnn_Dict_ptr_String_key(self.as_raw_Dict(), key.as_ptr()) }.into_result().map(|x| core::DictValue { ptr: x })
    }
    
    // identifier: cv_dnn_Dict_ptr_const_String_key
    /// @overload
    fn ptr(&self, key: &str) -> Result<core::DictValue> {
        string_arg!(key);
        unsafe { sys::cv_core_cv_dnn_Dict_ptr_const_String_key(self.as_raw_Dict(), key.as_ptr()) }.into_result().map(|x| core::DictValue { ptr: x })
    }
    
    // identifier: cv_dnn_Dict_get_const_String_key
    fn get(&self, key: &str) -> Result<core::DictValue> {
        string_arg!(key);
        unsafe { sys::cv_core_cv_dnn_Dict_get_const_String_key(self.as_raw_Dict(), key.as_ptr()) }.into_result().map(|x| core::DictValue { ptr: x })
    }
    
    // identifier: cv_dnn_Dict_erase_String_key
    fn erase(&mut self, key: &str) -> Result<()> {
        string_arg!(key);
        unsafe { sys::cv_core_cv_dnn_Dict_erase_String_key(self.as_raw_Dict(), key.as_ptr()) }.into_result()
    }
    
}

impl<'a> Dict + 'a {

}

// boxed class cv::dnn::DictValue
/// This struct stores the scalar value (or array) of one of the following type: double, cv::String or int64.
///  @todo Maybe int64 is useless because double type exactly stores at least 2^52 integers.
#[allow(dead_code)]
pub struct DictValue {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DictValue {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DictValue(self.ptr) };
    }
}
impl core::DictValue {
    #[doc(hidden)] pub fn as_raw_DictValue(&self) -> *mut c_void { self.ptr }
}

impl DictValue {

    // identifier: cv_dnn_DictValue_DictValue_DictValue_r
    pub fn new(r: &core::DictValue) -> Result<core::DictValue> {
        unsafe { sys::cv_core_cv_dnn_DictValue_DictValue_DictValue_r(r.as_raw_DictValue()) }.into_result().map(|x| core::DictValue { ptr: x })
    }
    
    // identifier: cv_dnn_DictValue_size_const
    pub fn size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_dnn_DictValue_size_const(self.as_raw_DictValue()) }.into_result()
    }
    
    // identifier: cv_dnn_DictValue_isInt_const
    pub fn is_int(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_dnn_DictValue_isInt_const(self.as_raw_DictValue()) }.into_result()
    }
    
    // identifier: cv_dnn_DictValue_isString_const
    pub fn is_string(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_dnn_DictValue_isString_const(self.as_raw_DictValue()) }.into_result()
    }
    
    // identifier: cv_dnn_DictValue_isReal_const
    pub fn is_real(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_dnn_DictValue_isReal_const(self.as_raw_DictValue()) }.into_result()
    }
    
    // identifier: cv_dnn_DictValue_getIntValue_const_int_idx
    ///
    /// ## C++ default parameters:
    /// * idx: -1
    pub fn get_int_value(&self, idx: i32) -> Result<i32> {
        unsafe { sys::cv_core_cv_dnn_DictValue_getIntValue_const_int_idx(self.as_raw_DictValue(), idx) }.into_result()
    }
    
    // identifier: cv_dnn_DictValue_getRealValue_const_int_idx
    ///
    /// ## C++ default parameters:
    /// * idx: -1
    pub fn get_real_value(&self, idx: i32) -> Result<f64> {
        unsafe { sys::cv_core_cv_dnn_DictValue_getRealValue_const_int_idx(self.as_raw_DictValue(), idx) }.into_result()
    }
    
    // identifier: cv_dnn_DictValue_getStringValue_const_int_idx
    ///
    /// ## C++ default parameters:
    /// * idx: -1
    pub fn get_string_value(&self, idx: i32) -> Result<String> {
        unsafe { sys::cv_core_cv_dnn_DictValue_getStringValue_const_int_idx(self.as_raw_DictValue(), idx) }.into_result().map(crate::templ::receive_string_mut)
    }
    
}

// boxed class cv::dnn::ELULayer
#[allow(dead_code)]
pub struct ELULayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ELULayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ELULayer(self.ptr) };
    }
}
impl core::ELULayer {
    #[doc(hidden)] pub fn as_raw_ELULayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ELULayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ELULayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for ELULayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl ELULayer {

}

// boxed class cv::dnn::EltwiseLayer
#[allow(dead_code)]
pub struct EltwiseLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::EltwiseLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_EltwiseLayer(self.ptr) };
    }
}
impl core::EltwiseLayer {
    #[doc(hidden)] pub fn as_raw_EltwiseLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for EltwiseLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for EltwiseLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl EltwiseLayer {

}

// boxed class cv::dnn::FlattenLayer
#[allow(dead_code)]
pub struct FlattenLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::FlattenLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_FlattenLayer(self.ptr) };
    }
}
impl core::FlattenLayer {
    #[doc(hidden)] pub fn as_raw_FlattenLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for FlattenLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for FlattenLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl FlattenLayer {

}

// boxed class cv::dnn::InnerProductLayer
#[allow(dead_code)]
pub struct InnerProductLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::InnerProductLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_InnerProductLayer(self.ptr) };
    }
}
impl core::InnerProductLayer {
    #[doc(hidden)] pub fn as_raw_InnerProductLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for InnerProductLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for InnerProductLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl InnerProductLayer {

}

// boxed class cv::dnn::InterpLayer
/// Bilinear resize layer from https://github.com/cdmh/deeplab-public
/// 
/// It differs from @ref ResizeLayer in output shape and resize scales computations.
#[allow(dead_code)]
pub struct InterpLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::InterpLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_InterpLayer(self.ptr) };
    }
}
impl core::InterpLayer {
    #[doc(hidden)] pub fn as_raw_InterpLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for InterpLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for InterpLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl InterpLayer {

}

// boxed class cv::dnn::LRNLayer
#[allow(dead_code)]
pub struct LRNLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::LRNLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_LRNLayer(self.ptr) };
    }
}
impl core::LRNLayer {
    #[doc(hidden)] pub fn as_raw_LRNLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for LRNLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for LRNLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl LRNLayer {

}

// Generating impl for trait cv::dnn::LSTMLayer (trait)
pub trait LSTMLayer : core::Layer {
    #[doc(hidden)] fn as_raw_LSTMLayer(&self) -> *mut c_void;
    // identifier: cv_dnn_LSTMLayer_setWeights_Mat_Wh_Mat_Wx_Mat_b
    /// @deprecated Use LayerParams::blobs instead.
    ///  Set trained weights for LSTM layer.
    /// 
    /// LSTM behavior on each step is defined by current input, previous output, previous cell state and learned weights.
    /// 
    /// Let @f$x_t@f$ be current input, @f$h_t@f$ be current output, @f$c_t@f$ be current state.
    /// Than current output and current cell state is computed as follows:
    /// @f{eqnarray*}{
    /// h_t &= o_t \odot tanh(c_t),               \\
    /// c_t &= f_t \odot c_{t-1} + i_t \odot g_t, \\
    /// @f}
    /// where @f$\odot@f$ is per-element multiply operation and @f$i_t, f_t, o_t, g_t@f$ is internal gates that are computed using learned wights.
    /// 
    /// Gates are computed as follows:
    /// @f{eqnarray*}{
    /// i_t &= sigmoid&(W_{xi} x_t + W_{hi} h_{t-1} + b_i), \\
    /// f_t &= sigmoid&(W_{xf} x_t + W_{hf} h_{t-1} + b_f), \\
    /// o_t &= sigmoid&(W_{xo} x_t + W_{ho} h_{t-1} + b_o), \\
    /// g_t &= tanh   &(W_{xg} x_t + W_{hg} h_{t-1} + b_g), \\
    /// @f}
    /// where @f$W_{x?}@f$, @f$W_{h?}@f$ and @f$b_{?}@f$ are learned weights represented as matrices:
    /// @f$W_{x?} \in R^{N_h \times N_x}@f$, @f$W_{h?} \in R^{N_h \times N_h}@f$, @f$b_? \in R^{N_h}@f$.
    /// 
    /// For simplicity and performance purposes we use @f$ W_x = [W_{xi}; W_{xf}; W_{xo}, W_{xg}] @f$
    /// (i.e. @f$W_x@f$ is vertical concatenation of @f$ W_{x?} @f$), @f$ W_x \in R^{4N_h \times N_x} @f$.
    /// The same for @f$ W_h = [W_{hi}; W_{hf}; W_{ho}, W_{hg}], W_h \in R^{4N_h \times N_h} @f$
    /// and for @f$ b = [b_i; b_f, b_o, b_g]@f$, @f$b \in R^{4N_h} @f$.
    /// 
    /// ## Parameters
    /// * Wh: is matrix defining how previous output is transformed to internal gates (i.e. according to above mentioned notation is @f$ W_h @f$)
    /// * Wx: is matrix defining how current input is transformed to internal gates (i.e. according to above mentioned notation is @f$ W_x @f$)
    /// * b:  is bias vector (i.e. according to above mentioned notation is @f$ b @f$)
    fn set_weights(&mut self, wh: &core::Mat, wx: &core::Mat, b: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_LSTMLayer_setWeights_Mat_Wh_Mat_Wx_Mat_b(self.as_raw_LSTMLayer(), wh.as_raw_Mat(), wx.as_raw_Mat(), b.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_dnn_LSTMLayer_setUseTimstampsDim_bool_use
    /// @deprecated Use flag `produce_cell_output` in LayerParams.
    ///  Specifies either interpret first dimension of input blob as timestamp dimenion either as sample.
    /// 
    /// If flag is set to true then shape of input blob will be interpreted as [`T`, `N`, `[data dims]`] where `T` specifies number of timestamps, `N` is number of independent streams.
    /// In this case each forward() call will iterate through `T` timestamps and update layer's state `T` times.
    /// 
    /// If flag is set to false then shape of input blob will be interpreted as [`N`, `[data dims]`].
    /// In this case each forward() call will make one iteration and produce one timestamp with shape [`N`, `[out dims]`].
    ///
    /// ## C++ default parameters:
    /// * _use: true
    fn set_use_timstamps_dim(&mut self, _use: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_LSTMLayer_setUseTimstampsDim_bool_use(self.as_raw_LSTMLayer(), _use) }.into_result()
    }
    
    // identifier: cv_dnn_LSTMLayer_setProduceCellOutput_bool_produce
    /// @deprecated Use flag `use_timestamp_dim` in LayerParams.
    ///  If this flag is set to true then layer will produce @f$ c_t @f$ as second output.
    /// @details Shape of the second output is the same as first output.
    ///
    /// ## C++ default parameters:
    /// * produce: false
    fn set_produce_cell_output(&mut self, produce: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_LSTMLayer_setProduceCellOutput_bool_produce(self.as_raw_LSTMLayer(), produce) }.into_result()
    }
    
    // identifier: cv_dnn_LSTMLayer_inputNameToIndex_String_inputName
    fn input_name_to_index(&mut self, input_name: &str) -> Result<i32> {
        string_arg!(mut input_name);
        unsafe { sys::cv_core_cv_dnn_LSTMLayer_inputNameToIndex_String_inputName(self.as_raw_LSTMLayer(), input_name.as_ptr() as _) }.into_result()
    }
    
    // identifier: cv_dnn_LSTMLayer_outputNameToIndex_String_outputName
    fn output_name_to_index(&mut self, output_name: &str) -> Result<i32> {
        string_arg!(output_name);
        unsafe { sys::cv_core_cv_dnn_LSTMLayer_outputNameToIndex_String_outputName(self.as_raw_LSTMLayer(), output_name.as_ptr()) }.into_result()
    }
    
}

impl<'a> LSTMLayer + 'a {

}

// Generating impl for trait cv::dnn::Layer (trait)
/// This interface class allows to build new Layers - are building blocks of networks.
/// 
/// Each class, derived from Layer, must implement allocate() methods to declare own outputs and forward() to compute outputs.
/// Also before using the new layer into networks you must register your layer by using one of @ref dnnLayerFactory "LayerFactory" macros.
pub trait Layer : core::Algorithm {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void;
    // identifier: cv_dnn_Layer_finalize_VectorOfMat_inputs_VectorOfMat_outputs
    /// Computes and sets internal parameters according to inputs, outputs and blobs.
    /// ## Parameters
    ///  @param[in]  inputs  vector of already allocated input blobs
    ///  @param[out] outputs vector of already allocated output blobs
    /// 
    /// If this method is called after network has allocated all memory for input and output blobs
    /// and before inferencing.
    fn finalize(&mut self, inputs: &types::VectorOfMat, outputs: &mut types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Layer_finalize_VectorOfMat_inputs_VectorOfMat_outputs(self.as_raw_Layer(), inputs.as_raw_VectorOfMat(), outputs.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_forward_VectorOfMat_inputs_VectorOfMat_outputs_VectorOfMat_internals
    /// Given the @p input blobs, computes the output @p blobs.
    /// ## Parameters
    ///  @param[in]  inputs  the input blobs.
    ///  @param[out] outputs allocated output blobs, which will store results of the computation.
    ///  @param[out] internals allocated internal blobs
    fn forward(&mut self, inputs: &types::VectorOfMat, outputs: &mut types::VectorOfMat, internals: &mut types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Layer_forward_VectorOfMat_inputs_VectorOfMat_outputs_VectorOfMat_internals(self.as_raw_Layer(), inputs.as_raw_VectorOfMat(), outputs.as_raw_VectorOfMat(), internals.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_forward_fallback_VectorOfMat_inputs_VectorOfMat_outputs_VectorOfMat_internals
    /// Given the @p input blobs, computes the output @p blobs.
    /// ## Parameters
    ///  @param[in]  inputs  the input blobs.
    ///  @param[out] outputs allocated output blobs, which will store results of the computation.
    ///  @param[out] internals allocated internal blobs
    fn forward_fallback(&mut self, inputs: &types::VectorOfMat, outputs: &mut types::VectorOfMat, internals: &mut types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Layer_forward_fallback_VectorOfMat_inputs_VectorOfMat_outputs_VectorOfMat_internals(self.as_raw_Layer(), inputs.as_raw_VectorOfMat(), outputs.as_raw_VectorOfMat(), internals.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_finalize_VectorOfMat_inputs
    /// @overload
    /// @deprecated Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead
    fn finalize_1(&mut self, inputs: &types::VectorOfMat) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_dnn_Layer_finalize_VectorOfMat_inputs(self.as_raw_Layer(), inputs.as_raw_VectorOfMat()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_dnn_Layer_run_VectorOfMat_inputs_VectorOfMat_outputs_VectorOfMat_internals
    /// Allocates layer and computes output.
    ///  @deprecated This method will be removed in the future release.
    fn run(&mut self, inputs: &types::VectorOfMat, outputs: &types::VectorOfMat, internals: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Layer_run_VectorOfMat_inputs_VectorOfMat_outputs_VectorOfMat_internals(self.as_raw_Layer(), inputs.as_raw_VectorOfMat(), outputs.as_raw_VectorOfMat(), internals.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_inputNameToIndex_String_inputName
    /// Returns index of input blob into the input array.
    /// ## Parameters
    /// * inputName: label of input blob
    /// 
    /// Each layer input and output can be labeled to easily identify them using "%<layer_name%>[.output_name]" notation.
    /// This method maps label of input blob to its index into input vector.
    fn input_name_to_index(&mut self, input_name: &str) -> Result<i32> {
        string_arg!(mut input_name);
        unsafe { sys::cv_core_cv_dnn_Layer_inputNameToIndex_String_inputName(self.as_raw_Layer(), input_name.as_ptr() as _) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_outputNameToIndex_String_outputName
    /// Returns index of output blob in output array.
    ///  @see inputNameToIndex()
    fn output_name_to_index(&mut self, output_name: &str) -> Result<i32> {
        string_arg!(output_name);
        unsafe { sys::cv_core_cv_dnn_Layer_outputNameToIndex_String_outputName(self.as_raw_Layer(), output_name.as_ptr()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_supportBackend_int_backendId
    /// Ask layer if it support specific backend for doing computations.
    /// ## Parameters
    /// @param[in] backendId computation backend identifier.
    /// @see Backend
    fn support_backend(&mut self, backend_id: i32) -> Result<bool> {
        unsafe { sys::cv_core_cv_dnn_Layer_supportBackend_int_backendId(self.as_raw_Layer(), backend_id) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_initHalide_VectorOfPtrOfBackendWrapper_inputs
    /// Returns Halide backend node.
    /// ## Parameters
    /// @param[in] inputs Input Halide buffers.
    /// @see BackendNode, BackendWrapper
    /// 
    /// Input buffers should be exactly the same that will be used in forward invocations.
    /// Despite we can use Halide::ImageParam based on input shape only,
    /// it helps prevent some memory management issues (if something wrong,
    /// Halide tests will be failed).
    fn init_halide(&mut self, inputs: &types::VectorOfPtrOfBackendWrapper) -> Result<types::PtrOfBackendNode> {
        unsafe { sys::cv_core_cv_dnn_Layer_initHalide_VectorOfPtrOfBackendWrapper_inputs(self.as_raw_Layer(), inputs.as_raw_VectorOfPtrOfBackendWrapper()) }.into_result().map(|x| types::PtrOfBackendNode { ptr: x })
    }
    
    // identifier: cv_dnn_Layer_initInfEngine_VectorOfPtrOfBackendWrapper_inputs
    fn init_inf_engine(&mut self, inputs: &types::VectorOfPtrOfBackendWrapper) -> Result<types::PtrOfBackendNode> {
        unsafe { sys::cv_core_cv_dnn_Layer_initInfEngine_VectorOfPtrOfBackendWrapper_inputs(self.as_raw_Layer(), inputs.as_raw_VectorOfPtrOfBackendWrapper()) }.into_result().map(|x| types::PtrOfBackendNode { ptr: x })
    }
    
    // identifier: cv_dnn_Layer_tryAttach_PtrOfBackendNode_node
    /// Implement layers fusing.
    /// ## Parameters
    /// @param[in] node Backend node of bottom layer.
    /// @see BackendNode
    /// 
    /// Actual for graph-based backends. If layer attached successfully,
    /// returns non-empty cv::Ptr to node of the same backend.
    /// Fuse only over the last function.
    fn try_attach(&mut self, node: &types::PtrOfBackendNode) -> Result<types::PtrOfBackendNode> {
        unsafe { sys::cv_core_cv_dnn_Layer_tryAttach_PtrOfBackendNode_node(self.as_raw_Layer(), node.as_raw_PtrOfBackendNode()) }.into_result().map(|x| types::PtrOfBackendNode { ptr: x })
    }
    
    // identifier: cv_dnn_Layer_setActivation_PtrOfActivationLayer_layer
    /// Tries to attach to the layer the subsequent activation layer, i.e. do the layer fusion in a partial case.
    /// ## Parameters
    /// @param[in] layer The subsequent activation layer.
    /// 
    /// Returns true if the activation layer has been attached successfully.
    fn set_activation(&mut self, layer: &types::PtrOfActivationLayer) -> Result<bool> {
        unsafe { sys::cv_core_cv_dnn_Layer_setActivation_PtrOfActivationLayer_layer(self.as_raw_Layer(), layer.as_raw_PtrOfActivationLayer()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_getScaleShift_const_Mat_scale_Mat_shift
    /// Returns parameters of layers with channel-wise multiplication and addition.
    /// ## Parameters
    /// @param[out] scale Channel-wise multipliers. Total number of values should
    ///                   be equal to number of channels.
    /// @param[out] shift Channel-wise offsets. Total number of values should
    ///                   be equal to number of channels.
    /// 
    /// Some layers can fuse their transformations with further layers.
    /// In example, convolution + batch normalization. This way base layer
    /// use weights from layer after it. Fused layer is skipped.
    /// By default, @p scale and @p shift are empty that means layer has no
    /// element-wise multiplications or additions.
    fn get_scale_shift(&self, scale: &core::Mat, shift: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Layer_getScaleShift_const_Mat_scale_Mat_shift(self.as_raw_Layer(), scale.as_raw_Mat(), shift.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_unsetAttached
    /// "Deattaches" all the layers, attached to particular layer.
    fn unset_attached(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Layer_unsetAttached(self.as_raw_Layer()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_getMemoryShapes_const_VectorOfVectorOfint_inputs_int_requiredOutputs_VectorOfVectorOfint_outputs_VectorOfVectorOfint_internals
    fn get_memory_shapes(&self, inputs: &types::VectorOfVectorOfint, required_outputs: i32, outputs: &types::VectorOfVectorOfint, internals: &types::VectorOfVectorOfint) -> Result<bool> {
        unsafe { sys::cv_core_cv_dnn_Layer_getMemoryShapes_const_VectorOfVectorOfint_inputs_int_requiredOutputs_VectorOfVectorOfint_outputs_VectorOfVectorOfint_internals(self.as_raw_Layer(), inputs.as_raw_VectorOfVectorOfint(), required_outputs, outputs.as_raw_VectorOfVectorOfint(), internals.as_raw_VectorOfVectorOfint()) }.into_result()
    }
    
    // identifier: cv_dnn_Layer_getFLOPS_const_VectorOfVectorOfint_inputs_VectorOfVectorOfint_outputs
    fn get_flops(&self, inputs: &types::VectorOfVectorOfint, outputs: &types::VectorOfVectorOfint) -> Result<i64> {
        unsafe { sys::cv_core_cv_dnn_Layer_getFLOPS_const_VectorOfVectorOfint_inputs_VectorOfVectorOfint_outputs(self.as_raw_Layer(), inputs.as_raw_VectorOfVectorOfint(), outputs.as_raw_VectorOfVectorOfint()) }.into_result()
    }
    
}

impl<'a> Layer + 'a {

}

// boxed class cv::dnn::LayerFactory
/// %Layer factory allows to create instances of registered layers.
#[allow(dead_code)]
pub struct LayerFactory {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::LayerFactory {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_LayerFactory(self.ptr) };
    }
}
impl core::LayerFactory {
    #[doc(hidden)] pub fn as_raw_LayerFactory(&self) -> *mut c_void { self.ptr }
}

impl LayerFactory {

    // identifier: cv_dnn_LayerFactory_unregisterLayer_String_type
    pub fn unregister_layer(_type: &str) -> Result<()> {
        string_arg!(_type);
        unsafe { sys::cv_core_cv_dnn_LayerFactory_unregisterLayer_String_type(_type.as_ptr()) }.into_result()
    }
    
}

// boxed class cv::dnn::LayerParams
/// This class provides all data needed to initialize layer.
/// 
/// It includes dictionary with scalar params (which can be read by using Dict interface),
/// blob params #blobs and optional meta information: #name and #type of layer instance.
#[allow(dead_code)]
pub struct LayerParams {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::LayerParams {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_LayerParams(self.ptr) };
    }
}
impl core::LayerParams {
    #[doc(hidden)] pub fn as_raw_LayerParams(&self) -> *mut c_void { self.ptr }
}

impl core::Dict for LayerParams {
    #[doc(hidden)] fn as_raw_Dict(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::dnn::MVNLayer
#[allow(dead_code)]
pub struct MVNLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MVNLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MVNLayer(self.ptr) };
    }
}
impl core::MVNLayer {
    #[doc(hidden)] pub fn as_raw_MVNLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for MVNLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for MVNLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl MVNLayer {

}

// boxed class cv::dnn::MaxUnpoolLayer
#[allow(dead_code)]
pub struct MaxUnpoolLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MaxUnpoolLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MaxUnpoolLayer(self.ptr) };
    }
}
impl core::MaxUnpoolLayer {
    #[doc(hidden)] pub fn as_raw_MaxUnpoolLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for MaxUnpoolLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for MaxUnpoolLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl MaxUnpoolLayer {

}

impl Net {

    // identifier: cv_dnn_Net_Net
    pub fn new() -> Result<core::Net> {
        unsafe { sys::cv_core_cv_dnn_Net_Net() }.into_result()
    }
    
    // identifier: cv_dnn_Net_readFromModelOptimizer_String_xml_String_bin
    /// Create a network from Intel's Model Optimizer intermediate representation.
    /// ## Parameters
    ///  @param[in] xml XML configuration file with network's topology.
    ///  @param[in] bin Binary file with trained weights.
    ///  Networks imported from Intel's Model Optimizer are launched in Intel's Inference Engine
    ///  backend.
    pub fn read_from_model_optimizer(xml: &str, bin: &str) -> Result<core::Net> {
        string_arg!(xml);
        string_arg!(bin);
        unsafe { sys::cv_core_cv_dnn_Net_readFromModelOptimizer_String_xml_String_bin(xml.as_ptr(), bin.as_ptr()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_empty_const
    /// Returns true if there are no layers in the network.
    pub fn empty(self) -> Result<bool> {
        unsafe { sys::cv_core_cv_dnn_Net_empty_const(self) }.into_result()
    }
    
    // identifier: cv_dnn_Net_addLayer_String_name_String_type_LayerParams_params
    /// Adds new layer to the net.
    /// ## Parameters
    /// * name:   unique name of the adding layer.
    /// * type:   typename of the adding layer (type must be registered in LayerRegister).
    /// * params: parameters which will be used to initialize the creating layer.
    ///  @returns unique identifier of created layer, or -1 if a failure will happen.
    pub fn add_layer(self, name: &str, _type: &str, params: &core::LayerParams) -> Result<i32> {
        string_arg!(name);
        string_arg!(_type);
        unsafe { sys::cv_core_cv_dnn_Net_addLayer_String_name_String_type_LayerParams_params(self, name.as_ptr(), _type.as_ptr(), params.as_raw_LayerParams()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_addLayerToPrev_String_name_String_type_LayerParams_params
    /// Adds new layer and connects its first input to the first output of previously added layer.
    ///  @see addLayer()
    pub fn add_layer_to_prev(self, name: &str, _type: &str, params: &core::LayerParams) -> Result<i32> {
        string_arg!(name);
        string_arg!(_type);
        unsafe { sys::cv_core_cv_dnn_Net_addLayerToPrev_String_name_String_type_LayerParams_params(self, name.as_ptr(), _type.as_ptr(), params.as_raw_LayerParams()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getLayerId_String_layer
    /// Converts string name of the layer to the integer identifier.
    ///  @returns id of the layer, or -1 if the layer wasn't found.
    pub fn get_layer_id(self, layer: &str) -> Result<i32> {
        string_arg!(layer);
        unsafe { sys::cv_core_cv_dnn_Net_getLayerId_String_layer(self, layer.as_ptr()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getLayerNames_const
    pub fn get_layer_names(self) -> Result<types::VectorOfString> {
        unsafe { sys::cv_core_cv_dnn_Net_getLayerNames_const(self) }.into_result().map(|x| types::VectorOfString { ptr: x })
    }
    
    // identifier: cv_dnn_Net_connect_String_outPin_String_inpPin
    /// Connects output of the first layer to input of the second layer.
    /// ## Parameters
    /// * outPin: descriptor of the first layer output.
    /// * inpPin: descriptor of the second layer input.
    /// 
    /// Descriptors have the following template <DFN>&lt;layer_name&gt;[.input_number]</DFN>:
    /// - the first part of the template <DFN>layer_name</DFN> is sting name of the added layer.
    ///   If this part is empty then the network input pseudo layer will be used;
    /// - the second optional part of the template <DFN>input_number</DFN>
    ///   is either number of the layer input, either label one.
    ///   If this part is omitted then the first layer input will be used.
    /// 
    ///  @see setNetInputs(), Layer::inputNameToIndex(), Layer::outputNameToIndex()
    pub fn connect(self, out_pin: &str, inp_pin: &str) -> Result<()> {
        string_arg!(mut out_pin);
        string_arg!(mut inp_pin);
        unsafe { sys::cv_core_cv_dnn_Net_connect_String_outPin_String_inpPin(self, out_pin.as_ptr() as _, inp_pin.as_ptr() as _) }.into_result()
    }
    
    // identifier: cv_dnn_Net_connect_int_outLayerId_int_outNum_int_inpLayerId_int_inpNum
    /// Connects #@p outNum output of the first layer to #@p inNum input of the second layer.
    /// ## Parameters
    /// * outLayerId: identifier of the first layer
    /// * outNum: number of the first layer output
    /// * inpLayerId: identifier of the second layer
    /// * inpNum: number of the second layer input
    pub fn connect_1(self, out_layer_id: i32, out_num: i32, inp_layer_id: i32, inp_num: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_connect_int_outLayerId_int_outNum_int_inpLayerId_int_inpNum(self, out_layer_id, out_num, inp_layer_id, inp_num) }.into_result()
    }
    
    // identifier: cv_dnn_Net_setInputsNames_VectorOfString_inputBlobNames
    /// Sets outputs names of the network input pseudo layer.
    /// 
    /// Each net always has special own the network input pseudo layer with id=0.
    /// This layer stores the user blobs only and don't make any computations.
    /// In fact, this layer provides the only way to pass user data into the network.
    /// As any other layer, this layer can label its outputs and this function provides an easy way to do this.
    pub fn set_inputs_names(self, input_blob_names: &types::VectorOfString) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_setInputsNames_VectorOfString_inputBlobNames(self, input_blob_names.as_raw_VectorOfString()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_forward_String_outputName
    /// Runs forward pass to compute output of layer with name @p outputName.
    /// ## Parameters
    /// * outputName: name for layer which output is needed to get
    ///  @return blob for first output of specified layer.
    ///  @details By default runs forward pass for the whole network.
    ///
    /// ## C++ default parameters:
    /// * output_name: String()
    pub fn forward(self, output_name: &str) -> Result<core::Mat> {
        string_arg!(output_name);
        unsafe { sys::cv_core_cv_dnn_Net_forward_String_outputName(self, output_name.as_ptr()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_dnn_Net_forward_VectorOfMat_outputBlobs_String_outputName
    /// Runs forward pass to compute output of layer with name @p outputName.
    /// ## Parameters
    /// * outputBlobs: contains all output blobs for specified layer.
    /// * outputName: name for layer which output is needed to get
    ///  @details If @p outputName is empty, runs forward pass for the whole network.
    ///
    /// ## C++ default parameters:
    /// * output_name: String()
    pub fn forward_1(self, output_blobs: &mut types::VectorOfMat, output_name: &str) -> Result<()> {
        string_arg!(output_name);
        unsafe { sys::cv_core_cv_dnn_Net_forward_VectorOfMat_outputBlobs_String_outputName(self, output_blobs.as_raw_VectorOfMat(), output_name.as_ptr()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_forward_VectorOfMat_outputBlobs_VectorOfString_outBlobNames
    /// Runs forward pass to compute outputs of layers listed in @p outBlobNames.
    /// ## Parameters
    /// * outputBlobs: contains blobs for first outputs of specified layers.
    /// * outBlobNames: names for layers which outputs are needed to get
    pub fn forward_2(self, output_blobs: &mut types::VectorOfMat, out_blob_names: &types::VectorOfString) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_forward_VectorOfMat_outputBlobs_VectorOfString_outBlobNames(self, output_blobs.as_raw_VectorOfMat(), out_blob_names.as_raw_VectorOfString()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_forward_VectorOfVectorOfMat_outputBlobs_VectorOfString_outBlobNames
    /// Runs forward pass to compute outputs of layers listed in @p outBlobNames.
    /// ## Parameters
    /// * outputBlobs: contains all output blobs for each layer specified in @p outBlobNames.
    /// * outBlobNames: names for layers which outputs are needed to get
    pub fn forward_3(self, output_blobs: &types::VectorOfVectorOfMat, out_blob_names: &types::VectorOfString) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_forward_VectorOfVectorOfMat_outputBlobs_VectorOfString_outBlobNames(self, output_blobs.as_raw_VectorOfVectorOfMat(), out_blob_names.as_raw_VectorOfString()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_setHalideScheduler_String_scheduler
    /// Compile Halide layers.
    /// ## Parameters
    /// @param[in] scheduler Path to YAML file with scheduling directives.
    /// @see setPreferableBackend
    /// 
    /// Schedule layers that support Halide backend. Then compile them for
    /// specific target. For layers that not represented in scheduling file
    /// or if no manual scheduling used at all, automatic scheduling will be applied.
    pub fn set_halide_scheduler(self, scheduler: &str) -> Result<()> {
        string_arg!(scheduler);
        unsafe { sys::cv_core_cv_dnn_Net_setHalideScheduler_String_scheduler(self, scheduler.as_ptr()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_setPreferableBackend_int_backendId
    /// Ask network to use specific computation backend where it supported.
    /// ## Parameters
    /// @param[in] backendId backend identifier.
    /// @see Backend
    /// 
    /// If OpenCV is compiled with Intel's Inference Engine library, DNN_BACKEND_DEFAULT
    /// means DNN_BACKEND_INFERENCE_ENGINE. Otherwise it equals to DNN_BACKEND_OPENCV.
    pub fn set_preferable_backend(self, backend_id: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_setPreferableBackend_int_backendId(self, backend_id) }.into_result()
    }
    
    // identifier: cv_dnn_Net_setPreferableTarget_int_targetId
    /// Ask network to make computations on specific target device.
    /// ## Parameters
    /// @param[in] targetId target identifier.
    /// @see Target
    /// 
    /// List of supported combinations backend / target:
    /// |                        | DNN_BACKEND_OPENCV | DNN_BACKEND_INFERENCE_ENGINE | DNN_BACKEND_HALIDE |
    /// |------------------------|--------------------|------------------------------|--------------------|
    /// | DNN_TARGET_CPU         |                  + |                            + |                  + |
    /// | DNN_TARGET_OPENCL      |                  + |                            + |                  + |
    /// | DNN_TARGET_OPENCL_FP16 |                  + |                            + |                    |
    /// | DNN_TARGET_MYRIAD      |                    |                            + |                    |
    /// | DNN_TARGET_FPGA        |                    |                            + |                    |
    pub fn set_preferable_target(self, target_id: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_setPreferableTarget_int_targetId(self, target_id) }.into_result()
    }
    
    // identifier: cv_dnn_Net_setInput_Mat_blob_String_name_double_scalefactor_Scalar_mean
    /// Sets the new input value for the network
    /// ## Parameters
    /// * blob:        A new blob. Should have CV_32F or CV_8U depth.
    /// * name:        A name of input layer.
    /// * scalefactor: An optional normalization scale.
    /// * mean:        An optional mean subtraction values.
    ///  @see connect(String, String) to know format of the descriptor.
    /// 
    ///  If scale or mean values are specified, a final input blob is computed
    ///  as:
    /// <div lang='latex'>input(n,c,h,w) = scalefactor \times (blob(n,c,h,w) - mean_c)</div>
    ///
    /// ## C++ default parameters:
    /// * name: ""
    /// * scalefactor: 1.0
    /// * mean: Scalar()
    pub fn set_input(self, blob: &core::Mat, name: &str, scalefactor: f64, mean: core::Scalar) -> Result<()> {
        string_arg!(name);
        unsafe { sys::cv_core_cv_dnn_Net_setInput_Mat_blob_String_name_double_scalefactor_Scalar_mean(self, blob.as_raw_Mat(), name.as_ptr(), scalefactor, mean) }.into_result()
    }
    
    // identifier: cv_dnn_Net_setParam_DictValue_layer_int_numParam_Mat_blob
    /// Sets the new value for the learned param of the layer.
    /// ## Parameters
    /// * layer: name or id of the layer.
    /// * numParam: index of the layer parameter in the Layer::blobs array.
    /// * blob: the new value.
    ///  @see Layer::blobs
    ///  
    /// Note: If shape of the new blob differs from the previous shape,
    ///  then the following forward pass may fail.
    pub fn set_param(self, layer: &core::DictValue, num_param: i32, blob: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_setParam_DictValue_layer_int_numParam_Mat_blob(self, layer.as_raw_DictValue(), num_param, blob.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getParam_DictValue_layer_int_numParam
    /// Returns parameter blob of the layer.
    /// ## Parameters
    /// * layer: name or id of the layer.
    /// * numParam: index of the layer parameter in the Layer::blobs array.
    ///  @see Layer::blobs
    ///
    /// ## C++ default parameters:
    /// * num_param: 0
    pub fn get_param(self, layer: &core::DictValue, num_param: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_dnn_Net_getParam_DictValue_layer_int_numParam(self, layer.as_raw_DictValue(), num_param) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_dnn_Net_getUnconnectedOutLayers_const
    /// Returns indexes of layers with unconnected outputs.
    pub fn get_unconnected_out_layers(self) -> Result<types::VectorOfint> {
        unsafe { sys::cv_core_cv_dnn_Net_getUnconnectedOutLayers_const(self) }.into_result().map(|x| types::VectorOfint { ptr: x })
    }
    
    // identifier: cv_dnn_Net_getUnconnectedOutLayersNames_const
    /// Returns names of layers with unconnected outputs.
    pub fn get_unconnected_out_layers_names(self) -> Result<types::VectorOfString> {
        unsafe { sys::cv_core_cv_dnn_Net_getUnconnectedOutLayersNames_const(self) }.into_result().map(|x| types::VectorOfString { ptr: x })
    }
    
    // identifier: cv_dnn_Net_getLayersShapes_const_VectorOfVectorOfint_netInputShapes_VectorOfint_layersIds_VectorOfVectorOfVectorOfint_inLayersShapes_VectorOfVectorOfVectorOfint_outLayersShapes
    /// Returns input and output shapes for all layers in loaded model;
    ///  preliminary inferencing isn't necessary.
    /// ## Parameters
    /// * netInputShapes: shapes for all input blobs in net input layer.
    /// * layersIds: output parameter for layer IDs.
    /// * inLayersShapes: output parameter for input layers shapes;
    /// order is the same as in layersIds
    /// * outLayersShapes: output parameter for output layers shapes;
    /// order is the same as in layersIds
    pub fn get_layers_shapes(self, net_input_shapes: &types::VectorOfVectorOfint, layers_ids: &types::VectorOfint, in_layers_shapes: &types::VectorOfVectorOfVectorOfint, out_layers_shapes: &types::VectorOfVectorOfVectorOfint) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_getLayersShapes_const_VectorOfVectorOfint_netInputShapes_VectorOfint_layersIds_VectorOfVectorOfVectorOfint_inLayersShapes_VectorOfVectorOfVectorOfint_outLayersShapes(self, net_input_shapes.as_raw_VectorOfVectorOfint(), layers_ids.as_raw_VectorOfint(), in_layers_shapes.as_raw_VectorOfVectorOfVectorOfint(), out_layers_shapes.as_raw_VectorOfVectorOfVectorOfint()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getLayerShapes_const_VectorOfVectorOfint_netInputShapes_int_layerId_VectorOfVectorOfint_inLayerShapes_VectorOfVectorOfint_outLayerShapes
    /// @overload
    pub fn get_layer_shapes(self, net_input_shapes: &types::VectorOfVectorOfint, layer_id: i32, in_layer_shapes: &types::VectorOfVectorOfint, out_layer_shapes: &types::VectorOfVectorOfint) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_getLayerShapes_const_VectorOfVectorOfint_netInputShapes_int_layerId_VectorOfVectorOfint_inLayerShapes_VectorOfVectorOfint_outLayerShapes(self, net_input_shapes.as_raw_VectorOfVectorOfint(), layer_id, in_layer_shapes.as_raw_VectorOfVectorOfint(), out_layer_shapes.as_raw_VectorOfVectorOfint()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getFLOPS_const_VectorOfVectorOfint_netInputShapes
    /// Computes FLOP for whole loaded model with specified input shapes.
    /// ## Parameters
    /// * netInputShapes: vector of shapes for all net inputs.
    /// @returns computed FLOP.
    pub fn get_flops(self, net_input_shapes: &types::VectorOfVectorOfint) -> Result<i64> {
        unsafe { sys::cv_core_cv_dnn_Net_getFLOPS_const_VectorOfVectorOfint_netInputShapes(self, net_input_shapes.as_raw_VectorOfVectorOfint()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getFLOPS_const_int_layerId_VectorOfVectorOfint_netInputShapes
    /// @overload
    pub fn get_flops_1(self, layer_id: i32, net_input_shapes: &types::VectorOfVectorOfint) -> Result<i64> {
        unsafe { sys::cv_core_cv_dnn_Net_getFLOPS_const_int_layerId_VectorOfVectorOfint_netInputShapes(self, layer_id, net_input_shapes.as_raw_VectorOfVectorOfint()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getLayerTypes_const_VectorOfString_layersTypes
    /// Returns list of types for layer used in model.
    /// ## Parameters
    /// * layersTypes: output parameter for returning types.
    pub fn get_layer_types(self, layers_types: &types::VectorOfString) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_getLayerTypes_const_VectorOfString_layersTypes(self, layers_types.as_raw_VectorOfString()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getLayersCount_const_String_layerType
    /// Returns count of layers of specified type.
    /// ## Parameters
    /// * layerType: type.
    /// @returns count of layers
    pub fn get_layers_count(self, layer_type: &str) -> Result<i32> {
        string_arg!(layer_type);
        unsafe { sys::cv_core_cv_dnn_Net_getLayersCount_const_String_layerType(self, layer_type.as_ptr()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getMemoryConsumption_const_VectorOfVectorOfint_netInputShapes_size_t_weights_size_t_blobs
    /// Computes bytes number which are required to store
    /// all weights and intermediate blobs for model.
    /// ## Parameters
    /// * netInputShapes: vector of shapes for all net inputs.
    /// * weights: output parameter to store resulting bytes for weights.
    /// * blobs: output parameter to store resulting bytes for intermediate blobs.
    pub fn get_memory_consumption(self, net_input_shapes: &types::VectorOfVectorOfint, weights: size_t, blobs: size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_getMemoryConsumption_const_VectorOfVectorOfint_netInputShapes_size_t_weights_size_t_blobs(self, net_input_shapes.as_raw_VectorOfVectorOfint(), weights, blobs) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getMemoryConsumption_const_int_layerId_VectorOfVectorOfint_netInputShapes_size_t_weights_size_t_blobs
    /// @overload
    pub fn get_memory_consumption_1(self, layer_id: i32, net_input_shapes: &types::VectorOfVectorOfint, weights: size_t, blobs: size_t) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_getMemoryConsumption_const_int_layerId_VectorOfVectorOfint_netInputShapes_size_t_weights_size_t_blobs(self, layer_id, net_input_shapes.as_raw_VectorOfVectorOfint(), weights, blobs) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getMemoryConsumption_const_VectorOfVectorOfint_netInputShapes_VectorOfint_layerIds_VectorOfsize_t_weights_VectorOfsize_t_blobs
    /// Computes bytes number which are required to store
    /// all weights and intermediate blobs for each layer.
    /// ## Parameters
    /// * netInputShapes: vector of shapes for all net inputs.
    /// * layerIds: output vector to save layer IDs.
    /// * weights: output parameter to store resulting bytes for weights.
    /// * blobs: output parameter to store resulting bytes for intermediate blobs.
    pub fn get_memory_consumption_2(self, net_input_shapes: &types::VectorOfVectorOfint, layer_ids: &types::VectorOfint, weights: &types::VectorOfsize_t, blobs: &types::VectorOfsize_t) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_getMemoryConsumption_const_VectorOfVectorOfint_netInputShapes_VectorOfint_layerIds_VectorOfsize_t_weights_VectorOfsize_t_blobs(self, net_input_shapes.as_raw_VectorOfVectorOfint(), layer_ids.as_raw_VectorOfint(), weights.as_raw_VectorOfsize_t(), blobs.as_raw_VectorOfsize_t()) }.into_result()
    }
    
    // identifier: cv_dnn_Net_enableFusion_bool_fusion
    /// Enables or disables layer fusion in the network.
    /// ## Parameters
    /// * fusion: true to enable the fusion, false to disable. The fusion is enabled by default.
    pub fn enable_fusion(self, fusion: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_Net_enableFusion_bool_fusion(self, fusion) }.into_result()
    }
    
    // identifier: cv_dnn_Net_getPerfProfile_VectorOfdouble_timings
    /// Returns overall time for inference and timings (in ticks) for layers.
    /// Indexes in returned vector correspond to layers ids. Some layers can be fused with others,
    /// in this case zero ticks count will be return for that skipped layers.
    /// ## Parameters
    /// * timings: vector for tick timings for all layers.
    /// @return overall ticks for model inference.
    pub fn get_perf_profile(self, timings: &types::VectorOfdouble) -> Result<i64> {
        unsafe { sys::cv_core_cv_dnn_Net_getPerfProfile_VectorOfdouble_timings(self, timings.as_raw_VectorOfdouble()) }.into_result()
    }
    
}

// boxed class cv::dnn::NormalizeBBoxLayer
/// <span lang='latex'> L_p </span> - normalization layer.
/// ## Parameters
/// * p: Normalization factor. The most common `p = 1` for <span lang='latex'> L_1 </span> -
///          normalization or `p = 2` for <span lang='latex'> L_2 </span> - normalization or a custom one.
/// * eps: Parameter <span lang='latex'> \epsilon </span> to prevent a division by zero.
/// * across_spatial: If true, normalize an input across all non-batch dimensions.
///                       Otherwise normalize an every channel separately.
/// 
/// Across spatial:
/// @f[
/// norm = \sqrt[p]{\epsilon + \sum_{x, y, c} |src(x, y, c)|^p } \\
/// dst(x, y, c) = \frac{ src(x, y, c) }{norm}
/// @f]
/// 
/// Channel wise normalization:
/// @f[
/// norm(c) = \sqrt[p]{\epsilon + \sum_{x, y} |src(x, y, c)|^p } \\
/// dst(x, y, c) = \frac{ src(x, y, c) }{norm(c)}
/// @f]
/// 
/// Where `x, y` - spatial coordinates, `c` - channel.
/// 
/// An every sample in the batch is normalized separately. Optionally,
/// output is scaled by the trained parameters.
#[allow(dead_code)]
pub struct NormalizeBBoxLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NormalizeBBoxLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NormalizeBBoxLayer(self.ptr) };
    }
}
impl core::NormalizeBBoxLayer {
    #[doc(hidden)] pub fn as_raw_NormalizeBBoxLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for NormalizeBBoxLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for NormalizeBBoxLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl NormalizeBBoxLayer {

}

// boxed class cv::dnn::PaddingLayer
/// Adds extra values for specific axes.
/// ## Parameters
/// * paddings: Vector of paddings in format
///     ```ignore
///     [ pad_before, pad_after,  // [0]th dimension
///                   pad_before, pad_after,  // [1]st dimension
///                   ...
///                   pad_before, pad_after ] // [n]th dimension
///     ```
/// 
///     that represents number of padded values at every dimension
///     starting from the first one. The rest of dimensions won't
///     be padded.
/// * value: Value to be padded. Defaults to zero.
/// * type: Padding type: 'constant', 'reflect'
/// * input_dims: Torch's parameter. If @p input_dims is not equal to the
///                   actual input dimensionality then the `[0]th` dimension
///                   is considered as a batch dimension and @p paddings are shifted
///                   to a one dimension. Defaults to `-1` that means padding
///                   corresponding to @p paddings.
#[allow(dead_code)]
pub struct PaddingLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PaddingLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PaddingLayer(self.ptr) };
    }
}
impl core::PaddingLayer {
    #[doc(hidden)] pub fn as_raw_PaddingLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for PaddingLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for PaddingLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl PaddingLayer {

}

// boxed class cv::dnn::PermuteLayer
#[allow(dead_code)]
pub struct PermuteLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PermuteLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PermuteLayer(self.ptr) };
    }
}
impl core::PermuteLayer {
    #[doc(hidden)] pub fn as_raw_PermuteLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for PermuteLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for PermuteLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl PermuteLayer {

}

// boxed class cv::dnn::PoolingLayer
#[allow(dead_code)]
pub struct PoolingLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PoolingLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PoolingLayer(self.ptr) };
    }
}
impl core::PoolingLayer {
    #[doc(hidden)] pub fn as_raw_PoolingLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for PoolingLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for PoolingLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl PoolingLayer {

}

// boxed class cv::dnn::PowerLayer
#[allow(dead_code)]
pub struct PowerLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PowerLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PowerLayer(self.ptr) };
    }
}
impl core::PowerLayer {
    #[doc(hidden)] pub fn as_raw_PowerLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for PowerLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for PowerLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for PowerLayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl PowerLayer {

}

// boxed class cv::dnn::PriorBoxLayer
#[allow(dead_code)]
pub struct PriorBoxLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::PriorBoxLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_PriorBoxLayer(self.ptr) };
    }
}
impl core::PriorBoxLayer {
    #[doc(hidden)] pub fn as_raw_PriorBoxLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for PriorBoxLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for PriorBoxLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl PriorBoxLayer {

}

// boxed class cv::dnn::ProposalLayer
#[allow(dead_code)]
pub struct ProposalLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ProposalLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ProposalLayer(self.ptr) };
    }
}
impl core::ProposalLayer {
    #[doc(hidden)] pub fn as_raw_ProposalLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ProposalLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ProposalLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ProposalLayer {

}

// Generating impl for trait cv::dnn::RNNLayer (trait)
/// Classical recurrent layer
/// 
/// Accepts two inputs @f$x_t@f$ and @f$h_{t-1}@f$ and compute two outputs @f$o_t@f$ and @f$h_t@f$.
/// 
/// - input: should contain packed input @f$x_t@f$.
/// - output: should contain output @f$o_t@f$ (and @f$h_t@f$ if setProduceHiddenOutput() is set to true).
/// 
/// input[0] should have shape [`T`, `N`, `data_dims`] where `T` and `N` is number of timestamps and number of independent samples of @f$x_t@f$ respectively.
/// 
/// output[0] will have shape [`T`, `N`, @f$N_o@f$], where @f$N_o@f$ is number of rows in @f$ W_{xo} @f$ matrix.
/// 
/// If setProduceHiddenOutput() is set to true then @p output[1] will contain a Mat with shape [`T`, `N`, @f$N_h@f$], where @f$N_h@f$ is number of rows in @f$ W_{hh} @f$ matrix.
pub trait RNNLayer : core::Layer {
    #[doc(hidden)] fn as_raw_RNNLayer(&self) -> *mut c_void;
    // identifier: cv_dnn_RNNLayer_setWeights_Mat_Wxh_Mat_bh_Mat_Whh_Mat_Who_Mat_bo
    /// Setups learned weights.
    /// 
    /// Recurrent-layer behavior on each step is defined by current input @f$ x_t @f$, previous state @f$ h_t @f$ and learned weights as follows:
    /// @f{eqnarray*}{
    /// h_t &= tanh&(W_{hh} h_{t-1} + W_{xh} x_t + b_h),  \\
    /// o_t &= tanh&(W_{ho} h_t + b_o),
    /// @f}
    /// 
    /// ## Parameters
    /// * Wxh: is @f$ W_{xh} @f$ matrix
    /// * bh:  is @f$ b_{h}  @f$ vector
    /// * Whh: is @f$ W_{hh} @f$ matrix
    /// * Who: is @f$ W_{xo} @f$ matrix
    /// * bo:  is @f$ b_{o}  @f$ vector
    fn set_weights(&mut self, wxh: &core::Mat, bh: &core::Mat, whh: &core::Mat, who: &core::Mat, bo: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_RNNLayer_setWeights_Mat_Wxh_Mat_bh_Mat_Whh_Mat_Who_Mat_bo(self.as_raw_RNNLayer(), wxh.as_raw_Mat(), bh.as_raw_Mat(), whh.as_raw_Mat(), who.as_raw_Mat(), bo.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_dnn_RNNLayer_setProduceHiddenOutput_bool_produce
    /// If this flag is set to true then layer will produce @f$ h_t @f$ as second output.
    /// @details Shape of the second output is the same as first output.
    ///
    /// ## C++ default parameters:
    /// * produce: false
    fn set_produce_hidden_output(&mut self, produce: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_dnn_RNNLayer_setProduceHiddenOutput_bool_produce(self.as_raw_RNNLayer(), produce) }.into_result()
    }
    
}

impl<'a> RNNLayer + 'a {

}

// boxed class cv::dnn::ReLU6Layer
#[allow(dead_code)]
pub struct ReLU6Layer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ReLU6Layer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ReLU6Layer(self.ptr) };
    }
}
impl core::ReLU6Layer {
    #[doc(hidden)] pub fn as_raw_ReLU6Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ReLU6Layer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ReLU6Layer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for ReLU6Layer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl ReLU6Layer {

}

// boxed class cv::dnn::ReLULayer
#[allow(dead_code)]
pub struct ReLULayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ReLULayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ReLULayer(self.ptr) };
    }
}
impl core::ReLULayer {
    #[doc(hidden)] pub fn as_raw_ReLULayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ReLULayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ReLULayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for ReLULayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl ReLULayer {

}

// boxed class cv::dnn::RegionLayer
#[allow(dead_code)]
pub struct RegionLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::RegionLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_RegionLayer(self.ptr) };
    }
}
impl core::RegionLayer {
    #[doc(hidden)] pub fn as_raw_RegionLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for RegionLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for RegionLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl RegionLayer {

}

// boxed class cv::dnn::ReorgLayer
#[allow(dead_code)]
pub struct ReorgLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ReorgLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ReorgLayer(self.ptr) };
    }
}
impl core::ReorgLayer {
    #[doc(hidden)] pub fn as_raw_ReorgLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ReorgLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ReorgLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ReorgLayer {

}

// boxed class cv::dnn::ReshapeLayer
#[allow(dead_code)]
pub struct ReshapeLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ReshapeLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ReshapeLayer(self.ptr) };
    }
}
impl core::ReshapeLayer {
    #[doc(hidden)] pub fn as_raw_ReshapeLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ReshapeLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ReshapeLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ReshapeLayer {

}

// boxed class cv::dnn::ResizeLayer
/// Resize input 4-dimensional blob by nearest neighbor or bilinear strategy.
/// 
/// Layer is used to support TensorFlow's resize_nearest_neighbor and resize_bilinear ops.
#[allow(dead_code)]
pub struct ResizeLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ResizeLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ResizeLayer(self.ptr) };
    }
}
impl core::ResizeLayer {
    #[doc(hidden)] pub fn as_raw_ResizeLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ResizeLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ResizeLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ResizeLayer {

}

// boxed class cv::dnn::ScaleLayer
#[allow(dead_code)]
pub struct ScaleLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ScaleLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ScaleLayer(self.ptr) };
    }
}
impl core::ScaleLayer {
    #[doc(hidden)] pub fn as_raw_ScaleLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ScaleLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ScaleLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ScaleLayer {

}

// boxed class cv::dnn::ShiftLayer
#[allow(dead_code)]
pub struct ShiftLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ShiftLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ShiftLayer(self.ptr) };
    }
}
impl core::ShiftLayer {
    #[doc(hidden)] pub fn as_raw_ShiftLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ShiftLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ShiftLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ShiftLayer {

}

// boxed class cv::dnn::ShuffleChannelLayer
/// Permute channels of 4-dimensional input blob.
/// ## Parameters
/// * group: Number of groups to split input channels and pick in turns
///              into output blob.
/// 
/// <div lang='latex'> groupSize = \frac{number\ of\ channels}{group} </div>
/// <div lang='latex'> output(n, c, h, w) = input(n, groupSize \times (c \% group) + \lfloor \frac{c}{group} \rfloor, h, w) </div>
/// Read more at https://arxiv.org/pdf/1707.01083.pdf
#[allow(dead_code)]
pub struct ShuffleChannelLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ShuffleChannelLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ShuffleChannelLayer(self.ptr) };
    }
}
impl core::ShuffleChannelLayer {
    #[doc(hidden)] pub fn as_raw_ShuffleChannelLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for ShuffleChannelLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for ShuffleChannelLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl ShuffleChannelLayer {

}

// boxed class cv::dnn::SigmoidLayer
#[allow(dead_code)]
pub struct SigmoidLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SigmoidLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SigmoidLayer(self.ptr) };
    }
}
impl core::SigmoidLayer {
    #[doc(hidden)] pub fn as_raw_SigmoidLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for SigmoidLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for SigmoidLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for SigmoidLayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl SigmoidLayer {

}

// boxed class cv::dnn::SliceLayer
/// Slice layer has several modes:
/// 1. Caffe mode
/// ## Parameters
/// @param[in] axis Axis of split operation
/// @param[in] slice_point Array of split points
/// 
/// Number of output blobs equals to number of split points plus one. The
/// first blob is a slice on input from 0 to @p slice_point[0] - 1 by @p axis,
/// the second output blob is a slice of input from @p slice_point[0] to
/// @p slice_point[1] - 1 by @p axis and the last output blob is a slice of
/// input from @p slice_point[-1] up to the end of @p axis size.
/// 
/// 2. TensorFlow mode
/// * begin: Vector of start indices
/// * size: Vector of sizes
/// 
/// More convenient numpy-like slice. One and only output blob
/// is a slice `input[begin[0]:begin[0]+size[0], begin[1]:begin[1]+size[1], ...]`
/// 
/// 3. Torch mode
/// * axis: Axis of split operation
/// 
/// Split input blob on the equal parts by @p axis.
#[allow(dead_code)]
pub struct SliceLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SliceLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SliceLayer(self.ptr) };
    }
}
impl core::SliceLayer {
    #[doc(hidden)] pub fn as_raw_SliceLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for SliceLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for SliceLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl SliceLayer {

}

// boxed class cv::dnn::SoftmaxLayer
#[allow(dead_code)]
pub struct SoftmaxLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SoftmaxLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SoftmaxLayer(self.ptr) };
    }
}
impl core::SoftmaxLayer {
    #[doc(hidden)] pub fn as_raw_SoftmaxLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for SoftmaxLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for SoftmaxLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl SoftmaxLayer {

}

// boxed class cv::dnn::SplitLayer
#[allow(dead_code)]
pub struct SplitLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SplitLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SplitLayer(self.ptr) };
    }
}
impl core::SplitLayer {
    #[doc(hidden)] pub fn as_raw_SplitLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for SplitLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for SplitLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl SplitLayer {

}

// boxed class cv::dnn::TanHLayer
#[allow(dead_code)]
pub struct TanHLayer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::TanHLayer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_TanHLayer(self.ptr) };
    }
}
impl core::TanHLayer {
    #[doc(hidden)] pub fn as_raw_TanHLayer(&self) -> *mut c_void { self.ptr }
}

impl core::Layer for TanHLayer {
    #[doc(hidden)] fn as_raw_Layer(&self) -> *mut c_void { self.ptr }
}

impl core::Algorithm for TanHLayer {
    #[doc(hidden)] fn as_raw_Algorithm(&self) -> *mut c_void { self.ptr }
}

impl core::ActivationLayer for TanHLayer {
    #[doc(hidden)] fn as_raw_ActivationLayer(&self) -> *mut c_void { self.ptr }
}

impl TanHLayer {

}

// boxed class cv::float16_t
#[allow(dead_code)]
pub struct float16_t {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::float16_t {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_float16_t(self.ptr) };
    }
}
impl core::float16_t {
    #[doc(hidden)] pub fn as_raw_float16_t(&self) -> *mut c_void { self.ptr }
}

impl float16_t {

    // identifier: cv_float16_t_float16_t
    pub fn new() -> Result<core::float16_t> {
        unsafe { sys::cv_core_cv_float16_t_float16_t() }.into_result().map(|x| core::float16_t { ptr: x })
    }
    
    // identifier: cv_float16_t_float16_t_float_x
    pub fn new_1(x: f32) -> Result<core::float16_t> {
        unsafe { sys::cv_core_cv_float16_t_float16_t_float_x(x) }.into_result().map(|x| core::float16_t { ptr: x })
    }
    
    // identifier: cv_float16_t_fromBits_ushort_w
    pub fn from_bits(w: u16) -> Result<core::float16_t> {
        unsafe { sys::cv_core_cv_float16_t_fromBits_ushort_w(w) }.into_result().map(|x| core::float16_t { ptr: x })
    }
    
    // identifier: cv_float16_t_zero
    pub fn zero() -> Result<core::float16_t> {
        unsafe { sys::cv_core_cv_float16_t_zero() }.into_result().map(|x| core::float16_t { ptr: x })
    }
    
    // identifier: cv_float16_t_bits_const
    pub fn bits(&self) -> Result<u16> {
        unsafe { sys::cv_core_cv_float16_t_bits_const(self.as_raw_float16_t()) }.into_result()
    }
    
}

// boxed class cv::instr::NodeData
#[allow(dead_code)]
pub struct NodeData {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NodeData {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NodeData(self.ptr) };
    }
}
impl core::NodeData {
    #[doc(hidden)] pub fn as_raw_NodeData(&self) -> *mut c_void { self.ptr }
}

impl NodeData {

    // identifier: cv_instr_NodeData_NodeData_NodeData_ref
    pub fn new(_ref: &core::NodeData) -> Result<core::NodeData> {
        unsafe { sys::cv_core_cv_instr_NodeData_NodeData_NodeData_ref(_ref.as_raw_NodeData()) }.into_result().map(|x| core::NodeData { ptr: x })
    }
    
    // identifier: cv_instr_NodeData_getTotalMs_const
    pub fn get_total_ms(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_instr_NodeData_getTotalMs_const(self.as_raw_NodeData()) }.into_result()
    }
    
    // identifier: cv_instr_NodeData_getMeanMs_const
    pub fn get_mean_ms(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_instr_NodeData_getMeanMs_const(self.as_raw_NodeData()) }.into_result()
    }
    
}

// boxed class cv::instr::NodeDataTls
#[allow(dead_code)]
pub struct NodeDataTls {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NodeDataTls {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NodeDataTls(self.ptr) };
    }
}
impl core::NodeDataTls {
    #[doc(hidden)] pub fn as_raw_NodeDataTls(&self) -> *mut c_void { self.ptr }
}

impl NodeDataTls {

    // identifier: cv_instr_NodeDataTls_NodeDataTls
    pub fn new() -> Result<core::NodeDataTls> {
        unsafe { sys::cv_core_cv_instr_NodeDataTls_NodeDataTls() }.into_result().map(|x| core::NodeDataTls { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::ANN_MLP (trait)
/// Artificial Neural Networks - Multi-Layer Perceptrons.
/// 
/// Unlike many other models in ML that are constructed and trained at once, in the MLP model these
/// steps are separated. First, a network with the specified topology is created using the non-default
/// constructor or the method ANN_MLP::create. All the weights are set to zeros. Then, the network is
/// trained using a set of input and output vectors. The training procedure can be repeated more than
/// once, that is, the weights can be adjusted based on the new training data.
/// 
/// Additional flags for StatModel::train are available: ANN_MLP::TrainFlags.
/// 
/// @sa @ref ml_intro_ann
pub trait ANN_MLP : core::StatModel {
    #[doc(hidden)] fn as_raw_ANN_MLP(&self) -> *mut c_void;
    // identifier: cv_ml_ANN_MLP_setTrainMethod_int_method_double_param1_double_param2
    /// Sets training method and common parameters.
    /// ## Parameters
    /// * method: Default value is ANN_MLP::RPROP. See ANN_MLP::TrainingMethods.
    /// * param1: passed to setRpropDW0 for ANN_MLP::RPROP and to setBackpropWeightScale for ANN_MLP::BACKPROP and to initialT for ANN_MLP::ANNEAL.
    /// * param2: passed to setRpropDWMin for ANN_MLP::RPROP and to setBackpropMomentumScale for ANN_MLP::BACKPROP and to finalT for ANN_MLP::ANNEAL.
    ///
    /// ## C++ default parameters:
    /// * param1: 0
    /// * param2: 0
    fn set_train_method(&mut self, method: i32, param1: f64, param2: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setTrainMethod_int_method_double_param1_double_param2(self.as_raw_ANN_MLP(), method, param1, param2) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getTrainMethod_const
    /// Returns current training method
    fn get_train_method(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getTrainMethod_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setActivationFunction_int_type_double_param1_double_param2
    /// Initialize the activation function for each neuron.
    /// Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM.
    /// ## Parameters
    /// * type: The type of activation function. See ANN_MLP::ActivationFunctions.
    /// * param1: The first parameter of the activation function, <span lang='latex'>\alpha</span>. Default value is 0.
    /// * param2: The second parameter of the activation function, <span lang='latex'>\beta</span>. Default value is 0.
    ///
    /// ## C++ default parameters:
    /// * param1: 0
    /// * param2: 0
    fn set_activation_function(&mut self, _type: i32, param1: f64, param2: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setActivationFunction_int_type_double_param1_double_param2(self.as_raw_ANN_MLP(), _type, param1, param2) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setLayerSizes_Mat__layer_sizes
    /// Integer vector specifying the number of neurons in each layer including the input and output layers.
    /// The very first element specifies the number of elements in the input layer.
    /// The last element - number of elements in the output layer. Default value is empty Mat.
    /// @sa getLayerSizes
    fn set_layer_sizes(&mut self, _layer_sizes: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setLayerSizes_Mat__layer_sizes(self.as_raw_ANN_MLP(), _layer_sizes.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getLayerSizes_const
    /// Integer vector specifying the number of neurons in each layer including the input and output layers.
    /// The very first element specifies the number of elements in the input layer.
    /// The last element - number of elements in the output layer.
    /// @sa setLayerSizes
    fn get_layer_sizes(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getLayerSizes_const(self.as_raw_ANN_MLP()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_ANN_MLP_getTermCriteria_const
    /// @see setTermCriteria
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getTermCriteria_const(self.as_raw_ANN_MLP()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_ml_ANN_MLP_setTermCriteria_TermCriteria_val
    /// @copybrief getTermCriteria @see getTermCriteria
    fn set_term_criteria(&mut self, val: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setTermCriteria_TermCriteria_val(self.as_raw_ANN_MLP(), val.as_raw_TermCriteria()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getBackpropWeightScale_const
    /// @see setBackpropWeightScale
    fn get_backprop_weight_scale(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getBackpropWeightScale_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setBackpropWeightScale_double_val
    /// @copybrief getBackpropWeightScale @see getBackpropWeightScale
    fn set_backprop_weight_scale(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setBackpropWeightScale_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getBackpropMomentumScale_const
    /// @see setBackpropMomentumScale
    fn get_backprop_momentum_scale(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getBackpropMomentumScale_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setBackpropMomentumScale_double_val
    /// @copybrief getBackpropMomentumScale @see getBackpropMomentumScale
    fn set_backprop_momentum_scale(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setBackpropMomentumScale_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getRpropDW0_const
    /// @see setRpropDW0
    fn get_rprop_dw0(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getRpropDW0_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setRpropDW0_double_val
    /// @copybrief getRpropDW0 @see getRpropDW0
    fn set_rprop_dw0(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setRpropDW0_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getRpropDWPlus_const
    /// @see setRpropDWPlus
    fn get_rprop_dw_plus(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getRpropDWPlus_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setRpropDWPlus_double_val
    /// @copybrief getRpropDWPlus @see getRpropDWPlus
    fn set_rprop_dw_plus(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setRpropDWPlus_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getRpropDWMinus_const
    /// @see setRpropDWMinus
    fn get_rprop_dw_minus(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getRpropDWMinus_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setRpropDWMinus_double_val
    /// @copybrief getRpropDWMinus @see getRpropDWMinus
    fn set_rprop_dw_minus(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setRpropDWMinus_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getRpropDWMin_const
    /// @see setRpropDWMin
    fn get_rprop_dw_min(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getRpropDWMin_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setRpropDWMin_double_val
    /// @copybrief getRpropDWMin @see getRpropDWMin
    fn set_rprop_dw_min(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setRpropDWMin_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getRpropDWMax_const
    /// @see setRpropDWMax
    fn get_rprop_dw_max(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getRpropDWMax_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setRpropDWMax_double_val
    /// @copybrief getRpropDWMax @see getRpropDWMax
    fn set_rprop_dw_max(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setRpropDWMax_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getAnnealInitialT_const
    /// @see setAnnealInitialT
    fn get_anneal_initial_t(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getAnnealInitialT_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setAnnealInitialT_double_val
    /// @copybrief getAnnealInitialT @see getAnnealInitialT
    fn set_anneal_initial_t(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setAnnealInitialT_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getAnnealFinalT_const
    /// @see setAnnealFinalT
    fn get_anneal_final_t(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getAnnealFinalT_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setAnnealFinalT_double_val
    /// @copybrief getAnnealFinalT @see getAnnealFinalT
    fn set_anneal_final_t(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setAnnealFinalT_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getAnnealCoolingRatio_const
    /// @see setAnnealCoolingRatio
    fn get_anneal_cooling_ratio(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getAnnealCoolingRatio_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setAnnealCoolingRatio_double_val
    /// @copybrief getAnnealCoolingRatio @see getAnnealCoolingRatio
    fn set_anneal_cooling_ratio(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setAnnealCoolingRatio_double_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getAnnealItePerStep_const
    /// @see setAnnealItePerStep
    fn get_anneal_ite_per_step(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getAnnealItePerStep_const(self.as_raw_ANN_MLP()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_setAnnealItePerStep_int_val
    /// @copybrief getAnnealItePerStep @see getAnnealItePerStep
    fn set_anneal_ite_per_step(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_setAnnealItePerStep_int_val(self.as_raw_ANN_MLP(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_getWeights_const_int_layerIdx
    fn get_weights(&self, layer_idx: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_getWeights_const_int_layerIdx(self.as_raw_ANN_MLP(), layer_idx) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

impl<'a> ANN_MLP + 'a {

    // identifier: cv_ml_ANN_MLP_create
    /// Creates empty model
    /// 
    /// Use StatModel::train to train the model, Algorithm::load\<ANN_MLP\>(filename) to load the pre-trained model.
    /// Note that the train method has optional flags: ANN_MLP::TrainFlags.
    pub fn create() -> Result<types::PtrOfANN_MLP> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_create() }.into_result().map(|x| types::PtrOfANN_MLP { ptr: x })
    }
    
    // identifier: cv_ml_ANN_MLP_load_String_filepath
    /// Loads and creates a serialized ANN from a file
    /// 
    /// Use ANN::save to serialize and store an ANN to disk.
    /// Load the ANN from this file again, by calling this function with the path to the file.
    /// 
    /// ## Parameters
    /// * filepath: path to serialized ANN
    pub fn load(filepath: &str) -> Result<types::PtrOfANN_MLP> {
        string_arg!(filepath);
        unsafe { sys::cv_core_cv_ml_ANN_MLP_load_String_filepath(filepath.as_ptr()) }.into_result().map(|x| types::PtrOfANN_MLP { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::ANN_MLP_ANNEAL (trait)
/// Artificial Neural Networks - Multi-Layer Perceptrons.
/// 
/// @sa @ref ml_intro_ann
pub trait ANN_MLP_ANNEAL : core::ANN_MLP {
    #[doc(hidden)] fn as_raw_ANN_MLP_ANNEAL(&self) -> *mut c_void;
    // identifier: cv_ml_ANN_MLP_ANNEAL_getAnnealInitialT_const
    /// @see setAnnealInitialT
    fn get_anneal_initial_t(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_getAnnealInitialT_const(self.as_raw_ANN_MLP_ANNEAL()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_ANNEAL_setAnnealInitialT_double_val
    /// @copybrief getAnnealInitialT @see getAnnealInitialT
    fn set_anneal_initial_t(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_setAnnealInitialT_double_val(self.as_raw_ANN_MLP_ANNEAL(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_ANNEAL_getAnnealFinalT_const
    /// @see setAnnealFinalT
    fn get_anneal_final_t(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_getAnnealFinalT_const(self.as_raw_ANN_MLP_ANNEAL()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_ANNEAL_setAnnealFinalT_double_val
    /// @copybrief getAnnealFinalT @see getAnnealFinalT
    fn set_anneal_final_t(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_setAnnealFinalT_double_val(self.as_raw_ANN_MLP_ANNEAL(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_ANNEAL_getAnnealCoolingRatio_const
    /// @see setAnnealCoolingRatio
    fn get_anneal_cooling_ratio(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_getAnnealCoolingRatio_const(self.as_raw_ANN_MLP_ANNEAL()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_ANNEAL_setAnnealCoolingRatio_double_val
    /// @copybrief getAnnealCoolingRatio @see getAnnealCoolingRatio
    fn set_anneal_cooling_ratio(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_setAnnealCoolingRatio_double_val(self.as_raw_ANN_MLP_ANNEAL(), val) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_ANNEAL_getAnnealItePerStep_const
    /// @see setAnnealItePerStep
    fn get_anneal_ite_per_step(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_getAnnealItePerStep_const(self.as_raw_ANN_MLP_ANNEAL()) }.into_result()
    }
    
    // identifier: cv_ml_ANN_MLP_ANNEAL_setAnnealItePerStep_int_val
    /// @copybrief getAnnealItePerStep @see getAnnealItePerStep
    fn set_anneal_ite_per_step(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_ANN_MLP_ANNEAL_setAnnealItePerStep_int_val(self.as_raw_ANN_MLP_ANNEAL(), val) }.into_result()
    }
    
}

impl<'a> ANN_MLP_ANNEAL + 'a {

}

// Generating impl for trait cv::ml::Boost (trait)
/// Boosted tree classifier derived from DTrees
/// 
/// @sa @ref ml_intro_boost
pub trait Boost : core::DTrees {
    #[doc(hidden)] fn as_raw_Boost(&self) -> *mut c_void;
    // identifier: cv_ml_Boost_getBoostType_const
    /// @see setBoostType
    fn get_boost_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_Boost_getBoostType_const(self.as_raw_Boost()) }.into_result()
    }
    
    // identifier: cv_ml_Boost_setBoostType_int_val
    /// @copybrief getBoostType @see getBoostType
    fn set_boost_type(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_Boost_setBoostType_int_val(self.as_raw_Boost(), val) }.into_result()
    }
    
    // identifier: cv_ml_Boost_getWeakCount_const
    /// @see setWeakCount
    fn get_weak_count(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_Boost_getWeakCount_const(self.as_raw_Boost()) }.into_result()
    }
    
    // identifier: cv_ml_Boost_setWeakCount_int_val
    /// @copybrief getWeakCount @see getWeakCount
    fn set_weak_count(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_Boost_setWeakCount_int_val(self.as_raw_Boost(), val) }.into_result()
    }
    
    // identifier: cv_ml_Boost_getWeightTrimRate_const
    /// @see setWeightTrimRate
    fn get_weight_trim_rate(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_Boost_getWeightTrimRate_const(self.as_raw_Boost()) }.into_result()
    }
    
    // identifier: cv_ml_Boost_setWeightTrimRate_double_val
    /// @copybrief getWeightTrimRate @see getWeightTrimRate
    fn set_weight_trim_rate(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_Boost_setWeightTrimRate_double_val(self.as_raw_Boost(), val) }.into_result()
    }
    
}

impl<'a> Boost + 'a {

    // identifier: cv_ml_Boost_create
    /// Creates the empty model.
    /// Use StatModel::train to train the model, Algorithm::load\<Boost\>(filename) to load the pre-trained model.
    pub fn create() -> Result<types::PtrOfBoost> {
        unsafe { sys::cv_core_cv_ml_Boost_create() }.into_result().map(|x| types::PtrOfBoost { ptr: x })
    }
    
    // identifier: cv_ml_Boost_load_String_filepath_String_nodeName
    /// Loads and creates a serialized Boost from a file
    /// 
    /// Use Boost::save to serialize and store an RTree to disk.
    /// Load the Boost from this file again, by calling this function with the path to the file.
    /// Optionally specify the node for the file containing the classifier
    /// 
    /// ## Parameters
    /// * filepath: path to serialized Boost
    /// * nodeName: name of node containing the classifier
    ///
    /// ## C++ default parameters:
    /// * node_name: String()
    pub fn load(filepath: &str, node_name: &str) -> Result<types::PtrOfBoost> {
        string_arg!(filepath);
        string_arg!(node_name);
        unsafe { sys::cv_core_cv_ml_Boost_load_String_filepath_String_nodeName(filepath.as_ptr(), node_name.as_ptr()) }.into_result().map(|x| types::PtrOfBoost { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::DTrees (trait)
/// The class represents a single decision tree or a collection of decision trees.
/// 
/// The current public interface of the class allows user to train only a single decision tree, however
/// the class is capable of storing multiple decision trees and using them for prediction (by summing
/// responses or using a voting schemes), and the derived from DTrees classes (such as RTrees and Boost)
/// use this capability to implement decision tree ensembles.
/// 
/// @sa @ref ml_intro_trees
pub trait DTrees : core::StatModel {
    #[doc(hidden)] fn as_raw_DTrees(&self) -> *mut c_void;
    // identifier: cv_ml_DTrees_getMaxCategories_const
    /// @see setMaxCategories
    fn get_max_categories(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_DTrees_getMaxCategories_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setMaxCategories_int_val
    /// @copybrief getMaxCategories @see getMaxCategories
    fn set_max_categories(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setMaxCategories_int_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getMaxDepth_const
    /// @see setMaxDepth
    fn get_max_depth(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_DTrees_getMaxDepth_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setMaxDepth_int_val
    /// @copybrief getMaxDepth @see getMaxDepth
    fn set_max_depth(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setMaxDepth_int_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getMinSampleCount_const
    /// @see setMinSampleCount
    fn get_min_sample_count(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_DTrees_getMinSampleCount_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setMinSampleCount_int_val
    /// @copybrief getMinSampleCount @see getMinSampleCount
    fn set_min_sample_count(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setMinSampleCount_int_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getCVFolds_const
    /// @see setCVFolds
    fn get_cv_folds(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_DTrees_getCVFolds_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setCVFolds_int_val
    /// @copybrief getCVFolds @see getCVFolds
    fn set_cv_folds(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setCVFolds_int_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getUseSurrogates_const
    /// @see setUseSurrogates
    fn get_use_surrogates(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_DTrees_getUseSurrogates_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setUseSurrogates_bool_val
    /// @copybrief getUseSurrogates @see getUseSurrogates
    fn set_use_surrogates(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setUseSurrogates_bool_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getUse1SERule_const
    /// @see setUse1SERule
    fn get_use1_se_rule(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_DTrees_getUse1SERule_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setUse1SERule_bool_val
    /// @copybrief getUse1SERule @see getUse1SERule
    fn set_use1_se_rule(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setUse1SERule_bool_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getTruncatePrunedTree_const
    /// @see setTruncatePrunedTree
    fn get_truncate_pruned_tree(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_DTrees_getTruncatePrunedTree_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setTruncatePrunedTree_bool_val
    /// @copybrief getTruncatePrunedTree @see getTruncatePrunedTree
    fn set_truncate_pruned_tree(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setTruncatePrunedTree_bool_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getRegressionAccuracy_const
    /// @see setRegressionAccuracy
    fn get_regression_accuracy(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_DTrees_getRegressionAccuracy_const(self.as_raw_DTrees()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_setRegressionAccuracy_float_val
    /// @copybrief getRegressionAccuracy @see getRegressionAccuracy
    fn set_regression_accuracy(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setRegressionAccuracy_float_val(self.as_raw_DTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getPriors_const
    /// @see setPriors
    fn get_priors(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_DTrees_getPriors_const(self.as_raw_DTrees()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_DTrees_setPriors_Mat_val
    /// @copybrief getPriors @see getPriors
    fn set_priors(&mut self, val: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_DTrees_setPriors_Mat_val(self.as_raw_DTrees(), val.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_DTrees_getRoots_const
    /// Returns indices of root nodes
    fn get_roots(&self) -> Result<types::VectorOfint> {
        unsafe { sys::cv_core_cv_ml_DTrees_getRoots_const(self.as_raw_DTrees()) }.into_result().map(|x| types::VectorOfint { ptr: x })
    }
    
    // identifier: cv_ml_DTrees_getSplits_const
    /// Returns all the splits
    /// 
    /// all the split indices are indices in the returned vector
    fn get_splits(&self) -> Result<types::VectorOfSplit> {
        unsafe { sys::cv_core_cv_ml_DTrees_getSplits_const(self.as_raw_DTrees()) }.into_result().map(|x| types::VectorOfSplit { ptr: x })
    }
    
    // identifier: cv_ml_DTrees_getSubsets_const
    /// Returns all the bitsets for categorical splits
    /// 
    /// Split::subsetOfs is an offset in the returned vector
    fn get_subsets(&self) -> Result<types::VectorOfint> {
        unsafe { sys::cv_core_cv_ml_DTrees_getSubsets_const(self.as_raw_DTrees()) }.into_result().map(|x| types::VectorOfint { ptr: x })
    }
    
}

impl<'a> DTrees + 'a {

    // identifier: cv_ml_DTrees_create
    /// Creates the empty model
    /// 
    /// The static method creates empty decision tree with the specified parameters. It should be then
    /// trained using train method (see StatModel::train). Alternatively, you can load the model from
    /// file using Algorithm::load\<DTrees\>(filename).
    pub fn create() -> Result<types::PtrOfDTrees> {
        unsafe { sys::cv_core_cv_ml_DTrees_create() }.into_result().map(|x| types::PtrOfDTrees { ptr: x })
    }
    
    // identifier: cv_ml_DTrees_load_String_filepath_String_nodeName
    /// Loads and creates a serialized DTrees from a file
    /// 
    /// Use DTree::save to serialize and store an DTree to disk.
    /// Load the DTree from this file again, by calling this function with the path to the file.
    /// Optionally specify the node for the file containing the classifier
    /// 
    /// ## Parameters
    /// * filepath: path to serialized DTree
    /// * nodeName: name of node containing the classifier
    ///
    /// ## C++ default parameters:
    /// * node_name: String()
    pub fn load(filepath: &str, node_name: &str) -> Result<types::PtrOfDTrees> {
        string_arg!(filepath);
        string_arg!(node_name);
        unsafe { sys::cv_core_cv_ml_DTrees_load_String_filepath_String_nodeName(filepath.as_ptr(), node_name.as_ptr()) }.into_result().map(|x| types::PtrOfDTrees { ptr: x })
    }
    
}

// boxed class cv::ml::DTrees::Node
/// The class represents a decision tree node.
#[allow(dead_code)]
pub struct DTrees_Node {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DTrees_Node {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DTrees_Node(self.ptr) };
    }
}
impl core::DTrees_Node {
    #[doc(hidden)] pub fn as_raw_DTrees_Node(&self) -> *mut c_void { self.ptr }
}

// boxed class cv::ml::DTrees::Split
/// The class represents split in a decision tree.
#[allow(dead_code)]
pub struct DTrees_Split {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::DTrees_Split {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_DTrees_Split(self.ptr) };
    }
}
impl core::DTrees_Split {
    #[doc(hidden)] pub fn as_raw_DTrees_Split(&self) -> *mut c_void { self.ptr }
}

impl DTrees_Split {

    // identifier: cv_ml_DTrees_Split_Split
    pub fn new() -> Result<core::DTrees_Split> {
        unsafe { sys::cv_core_cv_ml_DTrees_Split_Split() }.into_result().map(|x| core::DTrees_Split { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::EM (trait)
/// The class implements the Expectation Maximization algorithm.
/// 
/// @sa @ref ml_intro_em
pub trait EM : core::StatModel {
    #[doc(hidden)] fn as_raw_EM(&self) -> *mut c_void;
    // identifier: cv_ml_EM_getClustersNumber_const
    /// @see setClustersNumber
    fn get_clusters_number(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_EM_getClustersNumber_const(self.as_raw_EM()) }.into_result()
    }
    
    // identifier: cv_ml_EM_setClustersNumber_int_val
    /// @copybrief getClustersNumber @see getClustersNumber
    fn set_clusters_number(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_EM_setClustersNumber_int_val(self.as_raw_EM(), val) }.into_result()
    }
    
    // identifier: cv_ml_EM_getCovarianceMatrixType_const
    /// @see setCovarianceMatrixType
    fn get_covariance_matrix_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_EM_getCovarianceMatrixType_const(self.as_raw_EM()) }.into_result()
    }
    
    // identifier: cv_ml_EM_setCovarianceMatrixType_int_val
    /// @copybrief getCovarianceMatrixType @see getCovarianceMatrixType
    fn set_covariance_matrix_type(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_EM_setCovarianceMatrixType_int_val(self.as_raw_EM(), val) }.into_result()
    }
    
    // identifier: cv_ml_EM_getTermCriteria_const
    /// @see setTermCriteria
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_ml_EM_getTermCriteria_const(self.as_raw_EM()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_ml_EM_setTermCriteria_TermCriteria_val
    /// @copybrief getTermCriteria @see getTermCriteria
    fn set_term_criteria(&mut self, val: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_EM_setTermCriteria_TermCriteria_val(self.as_raw_EM(), val.as_raw_TermCriteria()) }.into_result()
    }
    
    // identifier: cv_ml_EM_getWeights_const
    /// Returns weights of the mixtures
    /// 
    /// Returns vector with the number of elements equal to the number of mixtures.
    fn get_weights(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_EM_getWeights_const(self.as_raw_EM()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_EM_getMeans_const
    /// Returns the cluster centers (means of the Gaussian mixture)
    /// 
    /// Returns matrix with the number of rows equal to the number of mixtures and number of columns
    /// equal to the space dimensionality.
    fn get_means(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_EM_getMeans_const(self.as_raw_EM()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_EM_getCovs_const_VectorOfMat_covs
    /// Returns covariation matrices
    /// 
    /// Returns vector of covariation matrices. Number of matrices is the number of gaussian mixtures,
    /// each matrix is a square floating-point matrix NxN, where N is the space dimensionality.
    fn get_covs(&self, covs: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_EM_getCovs_const_VectorOfMat_covs(self.as_raw_EM(), covs.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_ml_EM_predict_const_Mat_samples_Mat_results_int_flags
    /// Returns posterior probabilities for the provided samples
    /// 
    /// ## Parameters
    /// * samples: The input samples, floating-point matrix
    /// * results: The optional output <span lang='latex'> nSamples \times nClusters</span> matrix of results. It contains
    /// posterior probabilities for each sample from the input
    /// * flags: This parameter will be ignored
    ///
    /// ## C++ default parameters:
    /// * results: noArray()
    /// * flags: 0
    fn predict(&self, samples: &core::Mat, results: &mut core::Mat, flags: i32) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_EM_predict_const_Mat_samples_Mat_results_int_flags(self.as_raw_EM(), samples.as_raw_Mat(), results.as_raw_Mat(), flags) }.into_result()
    }
    
    // identifier: cv_ml_EM_predict2_const_Mat_sample_Mat_probs
    /// Returns a likelihood logarithm value and an index of the most probable mixture component
    /// for the given sample.
    /// 
    /// ## Parameters
    /// * sample: A sample for classification. It should be a one-channel matrix of
    /// <span lang='latex'>1 \times dims</span> or <span lang='latex'>dims \times 1</span> size.
    /// * probs: Optional output matrix that contains posterior probabilities of each component
    /// given the sample. It has <span lang='latex'>1 \times nclusters</span> size and CV_64FC1 type.
    /// 
    /// The method returns a two-element double vector. Zero element is a likelihood logarithm value for
    /// the sample. First element is an index of the most probable mixture component for the given
    /// sample.
    fn predict2(&self, sample: &core::Mat, probs: &mut core::Mat) -> Result<core::Vec2d> {
        unsafe { sys::cv_core_cv_ml_EM_predict2_const_Mat_sample_Mat_probs(self.as_raw_EM(), sample.as_raw_Mat(), probs.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_EM_trainEM_Mat_samples_Mat_logLikelihoods_Mat_labels_Mat_probs
    /// Estimate the Gaussian mixture parameters from a samples set.
    /// 
    /// This variation starts with Expectation step. Initial values of the model parameters will be
    /// estimated by the k-means algorithm.
    /// 
    /// Unlike many of the ML models, %EM is an unsupervised learning algorithm and it does not take
    /// responses (class labels or function values) as input. Instead, it computes the *Maximum
    /// Likelihood Estimate* of the Gaussian mixture parameters from an input sample set, stores all the
    /// parameters inside the structure: <span lang='latex'>p_{i,k}</span> in probs, <span lang='latex'>a_k</span> in means , <span lang='latex'>S_k</span> in
    /// covs[k], <span lang='latex'>\pi_k</span> in weights , and optionally computes the output "class label" for each
    /// sample: <span lang='latex'>\texttt{labels}_i=\texttt{arg max}_k(p_{i,k}), i=1..N</span> (indices of the most
    /// probable mixture component for each sample).
    /// 
    /// The trained model can be used further for prediction, just like any other classifier. The
    /// trained model is similar to the NormalBayesClassifier.
    /// 
    /// ## Parameters
    /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a
    /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type
    /// it will be converted to the inner matrix of such type for the further computing.
    /// * logLikelihoods: The optional output matrix that contains a likelihood logarithm value for
    /// each sample. It has <span lang='latex'>nsamples \times 1</span> size and CV_64FC1 type.
    /// * labels: The optional output "class label" for each sample:
    /// <span lang='latex'>\texttt{labels}_i=\texttt{arg max}_k(p_{i,k}), i=1..N</span> (indices of the most probable
    /// mixture component for each sample). It has <span lang='latex'>nsamples \times 1</span> size and CV_32SC1 type.
    /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian
    /// mixture component given the each sample. It has <span lang='latex'>nsamples \times nclusters</span> size and
    /// CV_64FC1 type.
    ///
    /// ## C++ default parameters:
    /// * log_likelihoods: noArray()
    /// * labels: noArray()
    /// * probs: noArray()
    fn train_em(&mut self, samples: &core::Mat, log_likelihoods: &mut core::Mat, labels: &mut core::Mat, probs: &mut core::Mat) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_EM_trainEM_Mat_samples_Mat_logLikelihoods_Mat_labels_Mat_probs(self.as_raw_EM(), samples.as_raw_Mat(), log_likelihoods.as_raw_Mat(), labels.as_raw_Mat(), probs.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_EM_trainE_Mat_samples_Mat_means0_Mat_covs0_Mat_weights0_Mat_logLikelihoods_Mat_labels_Mat_probs
    /// Estimate the Gaussian mixture parameters from a samples set.
    /// 
    /// This variation starts with Expectation step. You need to provide initial means <span lang='latex'>a_k</span> of
    /// mixture components. Optionally you can pass initial weights <span lang='latex'>\pi_k</span> and covariance matrices
    /// <span lang='latex'>S_k</span> of mixture components.
    /// 
    /// ## Parameters
    /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a
    /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type
    /// it will be converted to the inner matrix of such type for the further computing.
    /// * means0: Initial means <span lang='latex'>a_k</span> of mixture components. It is a one-channel matrix of
    /// <span lang='latex'>nclusters \times dims</span> size. If the matrix does not have CV_64F type it will be
    /// converted to the inner matrix of such type for the further computing.
    /// * covs0: The vector of initial covariance matrices <span lang='latex'>S_k</span> of mixture components. Each of
    /// covariance matrices is a one-channel matrix of <span lang='latex'>dims \times dims</span> size. If the matrices
    /// do not have CV_64F type they will be converted to the inner matrices of such type for the
    /// further computing.
    /// * weights0: Initial weights <span lang='latex'>\pi_k</span> of mixture components. It should be a one-channel
    /// floating-point matrix with <span lang='latex'>1 \times nclusters</span> or <span lang='latex'>nclusters \times 1</span> size.
    /// * logLikelihoods: The optional output matrix that contains a likelihood logarithm value for
    /// each sample. It has <span lang='latex'>nsamples \times 1</span> size and CV_64FC1 type.
    /// * labels: The optional output "class label" for each sample:
    /// <span lang='latex'>\texttt{labels}_i=\texttt{arg max}_k(p_{i,k}), i=1..N</span> (indices of the most probable
    /// mixture component for each sample). It has <span lang='latex'>nsamples \times 1</span> size and CV_32SC1 type.
    /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian
    /// mixture component given the each sample. It has <span lang='latex'>nsamples \times nclusters</span> size and
    /// CV_64FC1 type.
    ///
    /// ## C++ default parameters:
    /// * covs0: noArray()
    /// * weights0: noArray()
    /// * log_likelihoods: noArray()
    /// * labels: noArray()
    /// * probs: noArray()
    fn train_e(&mut self, samples: &core::Mat, means0: &core::Mat, covs0: &core::Mat, weights0: &core::Mat, log_likelihoods: &mut core::Mat, labels: &mut core::Mat, probs: &mut core::Mat) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_EM_trainE_Mat_samples_Mat_means0_Mat_covs0_Mat_weights0_Mat_logLikelihoods_Mat_labels_Mat_probs(self.as_raw_EM(), samples.as_raw_Mat(), means0.as_raw_Mat(), covs0.as_raw_Mat(), weights0.as_raw_Mat(), log_likelihoods.as_raw_Mat(), labels.as_raw_Mat(), probs.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_EM_trainM_Mat_samples_Mat_probs0_Mat_logLikelihoods_Mat_labels_Mat_probs
    /// Estimate the Gaussian mixture parameters from a samples set.
    /// 
    /// This variation starts with Maximization step. You need to provide initial probabilities
    /// <span lang='latex'>p_{i,k}</span> to use this option.
    /// 
    /// ## Parameters
    /// * samples: Samples from which the Gaussian mixture model will be estimated. It should be a
    /// one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type
    /// it will be converted to the inner matrix of such type for the further computing.
    /// * probs0
    /// @param: logLikelihoods The optional output matrix that contains a likelihood logarithm value for
    /// each sample. It has <span lang='latex'>nsamples \times 1</span> size and CV_64FC1 type.
    /// * labels: The optional output "class label" for each sample:
    /// <span lang='latex'>\texttt{labels}_i=\texttt{arg max}_k(p_{i,k}), i=1..N</span> (indices of the most probable
    /// mixture component for each sample). It has <span lang='latex'>nsamples \times 1</span> size and CV_32SC1 type.
    /// * probs: The optional output matrix that contains posterior probabilities of each Gaussian
    /// mixture component given the each sample. It has <span lang='latex'>nsamples \times nclusters</span> size and
    /// CV_64FC1 type.
    ///
    /// ## C++ default parameters:
    /// * log_likelihoods: noArray()
    /// * labels: noArray()
    /// * probs: noArray()
    fn train_m(&mut self, samples: &core::Mat, probs0: &core::Mat, log_likelihoods: &mut core::Mat, labels: &mut core::Mat, probs: &mut core::Mat) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_EM_trainM_Mat_samples_Mat_probs0_Mat_logLikelihoods_Mat_labels_Mat_probs(self.as_raw_EM(), samples.as_raw_Mat(), probs0.as_raw_Mat(), log_likelihoods.as_raw_Mat(), labels.as_raw_Mat(), probs.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> EM + 'a {

    // identifier: cv_ml_EM_create
    /// Creates empty %EM model.
    /// The model should be trained then using StatModel::train(traindata, flags) method. Alternatively, you
    /// can use one of the EM::train\* methods or load it from file using Algorithm::load\<EM\>(filename).
    pub fn create() -> Result<types::PtrOfEM> {
        unsafe { sys::cv_core_cv_ml_EM_create() }.into_result().map(|x| types::PtrOfEM { ptr: x })
    }
    
    // identifier: cv_ml_EM_load_String_filepath_String_nodeName
    /// Loads and creates a serialized EM from a file
    /// 
    /// Use EM::save to serialize and store an EM to disk.
    /// Load the EM from this file again, by calling this function with the path to the file.
    /// Optionally specify the node for the file containing the classifier
    /// 
    /// ## Parameters
    /// * filepath: path to serialized EM
    /// * nodeName: name of node containing the classifier
    ///
    /// ## C++ default parameters:
    /// * node_name: String()
    pub fn load(filepath: &str, node_name: &str) -> Result<types::PtrOfEM> {
        string_arg!(filepath);
        string_arg!(node_name);
        unsafe { sys::cv_core_cv_ml_EM_load_String_filepath_String_nodeName(filepath.as_ptr(), node_name.as_ptr()) }.into_result().map(|x| types::PtrOfEM { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::KNearest (trait)
/// The class implements K-Nearest Neighbors model
/// 
/// @sa @ref ml_intro_knn
pub trait KNearest : core::StatModel {
    #[doc(hidden)] fn as_raw_KNearest(&self) -> *mut c_void;
    // identifier: cv_ml_KNearest_getDefaultK_const
    /// @see setDefaultK
    fn get_default_k(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_KNearest_getDefaultK_const(self.as_raw_KNearest()) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_setDefaultK_int_val
    /// @copybrief getDefaultK @see getDefaultK
    fn set_default_k(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_KNearest_setDefaultK_int_val(self.as_raw_KNearest(), val) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_getIsClassifier_const
    /// @see setIsClassifier
    fn get_is_classifier(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_KNearest_getIsClassifier_const(self.as_raw_KNearest()) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_setIsClassifier_bool_val
    /// @copybrief getIsClassifier @see getIsClassifier
    fn set_is_classifier(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_KNearest_setIsClassifier_bool_val(self.as_raw_KNearest(), val) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_getEmax_const
    /// @see setEmax
    fn get_emax(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_KNearest_getEmax_const(self.as_raw_KNearest()) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_setEmax_int_val
    /// @copybrief getEmax @see getEmax
    fn set_emax(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_KNearest_setEmax_int_val(self.as_raw_KNearest(), val) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_getAlgorithmType_const
    /// @see setAlgorithmType
    fn get_algorithm_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_KNearest_getAlgorithmType_const(self.as_raw_KNearest()) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_setAlgorithmType_int_val
    /// @copybrief getAlgorithmType @see getAlgorithmType
    fn set_algorithm_type(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_KNearest_setAlgorithmType_int_val(self.as_raw_KNearest(), val) }.into_result()
    }
    
    // identifier: cv_ml_KNearest_findNearest_const_Mat_samples_int_k_Mat_results_Mat_neighborResponses_Mat_dist
    /// Finds the neighbors and predicts responses for input vectors.
    /// 
    /// ## Parameters
    /// * samples: Input samples stored by rows. It is a single-precision floating-point matrix of
    /// `<number_of_samples> * k` size.
    /// * k: Number of used nearest neighbors. Should be greater than 1.
    /// * results: Vector with results of prediction (regression or classification) for each input
    /// sample. It is a single-precision floating-point vector with `<number_of_samples>` elements.
    /// * neighborResponses: Optional output values for corresponding neighbors. It is a single-
    /// precision floating-point matrix of `<number_of_samples> * k` size.
    /// * dist: Optional output distances from the input vectors to the corresponding neighbors. It
    /// is a single-precision floating-point matrix of `<number_of_samples> * k` size.
    /// 
    /// For each input vector (a row of the matrix samples), the method finds the k nearest neighbors.
    /// In case of regression, the predicted result is a mean value of the particular vector's neighbor
    /// responses. In case of classification, the class is determined by voting.
    /// 
    /// For each input vector, the neighbors are sorted by their distances to the vector.
    /// 
    /// In case of C++ interface you can use output pointers to empty matrices and the function will
    /// allocate memory itself.
    /// 
    /// If only a single input vector is passed, all output matrices are optional and the predicted
    /// value is returned by the method.
    /// 
    /// The function is parallelized with the TBB library.
    ///
    /// ## C++ default parameters:
    /// * neighbor_responses: noArray()
    /// * dist: noArray()
    fn find_nearest(&self, samples: &core::Mat, k: i32, results: &mut core::Mat, neighbor_responses: &mut core::Mat, dist: &mut core::Mat) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_KNearest_findNearest_const_Mat_samples_int_k_Mat_results_Mat_neighborResponses_Mat_dist(self.as_raw_KNearest(), samples.as_raw_Mat(), k, results.as_raw_Mat(), neighbor_responses.as_raw_Mat(), dist.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> KNearest + 'a {

    // identifier: cv_ml_KNearest_create
    /// Creates the empty model
    /// 
    /// The static method creates empty %KNearest classifier. It should be then trained using StatModel::train method.
    pub fn create() -> Result<types::PtrOfKNearest> {
        unsafe { sys::cv_core_cv_ml_KNearest_create() }.into_result().map(|x| types::PtrOfKNearest { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::LogisticRegression (trait)
/// Implements Logistic Regression classifier.
/// 
/// @sa @ref ml_intro_lr
pub trait LogisticRegression : core::StatModel {
    #[doc(hidden)] fn as_raw_LogisticRegression(&self) -> *mut c_void;
    // identifier: cv_ml_LogisticRegression_getLearningRate_const
    /// @see setLearningRate
    fn get_learning_rate(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_getLearningRate_const(self.as_raw_LogisticRegression()) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_setLearningRate_double_val
    /// @copybrief getLearningRate @see getLearningRate
    fn set_learning_rate(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_setLearningRate_double_val(self.as_raw_LogisticRegression(), val) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_getIterations_const
    /// @see setIterations
    fn get_iterations(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_getIterations_const(self.as_raw_LogisticRegression()) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_setIterations_int_val
    /// @copybrief getIterations @see getIterations
    fn set_iterations(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_setIterations_int_val(self.as_raw_LogisticRegression(), val) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_getRegularization_const
    /// @see setRegularization
    fn get_regularization(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_getRegularization_const(self.as_raw_LogisticRegression()) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_setRegularization_int_val
    /// @copybrief getRegularization @see getRegularization
    fn set_regularization(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_setRegularization_int_val(self.as_raw_LogisticRegression(), val) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_getTrainMethod_const
    /// @see setTrainMethod
    fn get_train_method(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_getTrainMethod_const(self.as_raw_LogisticRegression()) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_setTrainMethod_int_val
    /// @copybrief getTrainMethod @see getTrainMethod
    fn set_train_method(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_setTrainMethod_int_val(self.as_raw_LogisticRegression(), val) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_getMiniBatchSize_const
    /// @see setMiniBatchSize
    fn get_mini_batch_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_getMiniBatchSize_const(self.as_raw_LogisticRegression()) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_setMiniBatchSize_int_val
    /// @copybrief getMiniBatchSize @see getMiniBatchSize
    fn set_mini_batch_size(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_setMiniBatchSize_int_val(self.as_raw_LogisticRegression(), val) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_getTermCriteria_const
    /// @see setTermCriteria
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_getTermCriteria_const(self.as_raw_LogisticRegression()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_ml_LogisticRegression_setTermCriteria_TermCriteria_val
    /// @copybrief getTermCriteria @see getTermCriteria
    fn set_term_criteria(&mut self, val: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_setTermCriteria_TermCriteria_val(self.as_raw_LogisticRegression(), val.as_raw_TermCriteria()) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_predict_const_Mat_samples_Mat_results_int_flags
    /// Predicts responses for input samples and returns a float type.
    /// 
    /// ## Parameters
    /// * samples: The input data for the prediction algorithm. Matrix [m x n], where each row
    /// contains variables (features) of one object being classified. Should have data type CV_32F.
    /// * results: Predicted labels as a column matrix of type CV_32S.
    /// * flags: Not used.
    ///
    /// ## C++ default parameters:
    /// * results: noArray()
    /// * flags: 0
    fn predict(&self, samples: &core::Mat, results: &mut core::Mat, flags: i32) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_predict_const_Mat_samples_Mat_results_int_flags(self.as_raw_LogisticRegression(), samples.as_raw_Mat(), results.as_raw_Mat(), flags) }.into_result()
    }
    
    // identifier: cv_ml_LogisticRegression_get_learnt_thetas_const
    /// This function returns the trained parameters arranged across rows.
    /// 
    /// For a two class classifcation problem, it returns a row matrix. It returns learnt parameters of
    /// the Logistic Regression as a matrix of type CV_32F.
    fn get_learnt_thetas(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_get_learnt_thetas_const(self.as_raw_LogisticRegression()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

impl<'a> LogisticRegression + 'a {

    // identifier: cv_ml_LogisticRegression_create
    /// Creates empty model.
    /// 
    /// Creates Logistic Regression model with parameters given.
    pub fn create() -> Result<types::PtrOfLogisticRegression> {
        unsafe { sys::cv_core_cv_ml_LogisticRegression_create() }.into_result().map(|x| types::PtrOfLogisticRegression { ptr: x })
    }
    
    // identifier: cv_ml_LogisticRegression_load_String_filepath_String_nodeName
    /// Loads and creates a serialized LogisticRegression from a file
    /// 
    /// Use LogisticRegression::save to serialize and store an LogisticRegression to disk.
    /// Load the LogisticRegression from this file again, by calling this function with the path to the file.
    /// Optionally specify the node for the file containing the classifier
    /// 
    /// ## Parameters
    /// * filepath: path to serialized LogisticRegression
    /// * nodeName: name of node containing the classifier
    ///
    /// ## C++ default parameters:
    /// * node_name: String()
    pub fn load(filepath: &str, node_name: &str) -> Result<types::PtrOfLogisticRegression> {
        string_arg!(filepath);
        string_arg!(node_name);
        unsafe { sys::cv_core_cv_ml_LogisticRegression_load_String_filepath_String_nodeName(filepath.as_ptr(), node_name.as_ptr()) }.into_result().map(|x| types::PtrOfLogisticRegression { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::NormalBayesClassifier (trait)
/// Bayes classifier for normally distributed data.
/// 
/// @sa @ref ml_intro_bayes
pub trait NormalBayesClassifier : core::StatModel {
    #[doc(hidden)] fn as_raw_NormalBayesClassifier(&self) -> *mut c_void;
    // identifier: cv_ml_NormalBayesClassifier_predictProb_const_Mat_inputs_Mat_outputs_Mat_outputProbs_int_flags
    /// Predicts the response for sample(s).
    /// 
    /// The method estimates the most probable classes for input vectors. Input vectors (one or more)
    /// are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one
    /// output vector outputs. The predicted class for a single input vector is returned by the method.
    /// The vector outputProbs contains the output probabilities corresponding to each element of
    /// result.
    ///
    /// ## C++ default parameters:
    /// * flags: 0
    fn predict_prob(&self, inputs: &core::Mat, outputs: &mut core::Mat, output_probs: &mut core::Mat, flags: i32) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_NormalBayesClassifier_predictProb_const_Mat_inputs_Mat_outputs_Mat_outputProbs_int_flags(self.as_raw_NormalBayesClassifier(), inputs.as_raw_Mat(), outputs.as_raw_Mat(), output_probs.as_raw_Mat(), flags) }.into_result()
    }
    
}

impl<'a> NormalBayesClassifier + 'a {

    // identifier: cv_ml_NormalBayesClassifier_create
    /// Creates empty model
    /// Use StatModel::train to train the model after creation.
    pub fn create() -> Result<types::PtrOfNormalBayesClassifier> {
        unsafe { sys::cv_core_cv_ml_NormalBayesClassifier_create() }.into_result().map(|x| types::PtrOfNormalBayesClassifier { ptr: x })
    }
    
    // identifier: cv_ml_NormalBayesClassifier_load_String_filepath_String_nodeName
    /// Loads and creates a serialized NormalBayesClassifier from a file
    /// 
    /// Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk.
    /// Load the NormalBayesClassifier from this file again, by calling this function with the path to the file.
    /// Optionally specify the node for the file containing the classifier
    /// 
    /// ## Parameters
    /// * filepath: path to serialized NormalBayesClassifier
    /// * nodeName: name of node containing the classifier
    ///
    /// ## C++ default parameters:
    /// * node_name: String()
    pub fn load(filepath: &str, node_name: &str) -> Result<types::PtrOfNormalBayesClassifier> {
        string_arg!(filepath);
        string_arg!(node_name);
        unsafe { sys::cv_core_cv_ml_NormalBayesClassifier_load_String_filepath_String_nodeName(filepath.as_ptr(), node_name.as_ptr()) }.into_result().map(|x| types::PtrOfNormalBayesClassifier { ptr: x })
    }
    
}

// boxed class cv::ml::ParamGrid
/// The structure represents the logarithmic grid range of statmodel parameters.
/// 
/// It is used for optimizing statmodel accuracy by varying model parameters, the accuracy estimate
/// being computed by cross-validation.
#[allow(dead_code)]
pub struct ParamGrid {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ParamGrid {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ParamGrid(self.ptr) };
    }
}
impl core::ParamGrid {
    #[doc(hidden)] pub fn as_raw_ParamGrid(&self) -> *mut c_void { self.ptr }
}

impl ParamGrid {

    // identifier: cv_ml_ParamGrid_ParamGrid
    /// Default constructor
    pub fn new() -> Result<core::ParamGrid> {
        unsafe { sys::cv_core_cv_ml_ParamGrid_ParamGrid() }.into_result().map(|x| core::ParamGrid { ptr: x })
    }
    
    // identifier: cv_ml_ParamGrid_ParamGrid_double__minVal_double__maxVal_double__logStep
    /// Constructor with parameters
    pub fn for_range(_min_val: f64, _max_val: f64, _log_step: f64) -> Result<core::ParamGrid> {
        unsafe { sys::cv_core_cv_ml_ParamGrid_ParamGrid_double__minVal_double__maxVal_double__logStep(_min_val, _max_val, _log_step) }.into_result().map(|x| core::ParamGrid { ptr: x })
    }
    
    // identifier: cv_ml_ParamGrid_create_double_minVal_double_maxVal_double_logstep
    /// Creates a ParamGrid Ptr that can be given to the %SVM::trainAuto method
    /// 
    /// ## Parameters
    /// * minVal: minimum value of the parameter grid
    /// * maxVal: maximum value of the parameter grid
    /// * logstep: Logarithmic step for iterating the statmodel parameter
    ///
    /// ## C++ default parameters:
    /// * min_val: 0.
    /// * max_val: 0.
    /// * logstep: 1.
    pub fn create(min_val: f64, max_val: f64, logstep: f64) -> Result<types::PtrOfParamGrid> {
        unsafe { sys::cv_core_cv_ml_ParamGrid_create_double_minVal_double_maxVal_double_logstep(min_val, max_val, logstep) }.into_result().map(|x| types::PtrOfParamGrid { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::RTrees (trait)
/// The class implements the random forest predictor.
/// 
/// @sa @ref ml_intro_rtrees
pub trait RTrees : core::DTrees {
    #[doc(hidden)] fn as_raw_RTrees(&self) -> *mut c_void;
    // identifier: cv_ml_RTrees_getCalculateVarImportance_const
    /// @see setCalculateVarImportance
    fn get_calculate_var_importance(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_RTrees_getCalculateVarImportance_const(self.as_raw_RTrees()) }.into_result()
    }
    
    // identifier: cv_ml_RTrees_setCalculateVarImportance_bool_val
    /// @copybrief getCalculateVarImportance @see getCalculateVarImportance
    fn set_calculate_var_importance(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_RTrees_setCalculateVarImportance_bool_val(self.as_raw_RTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_RTrees_getActiveVarCount_const
    /// @see setActiveVarCount
    fn get_active_var_count(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_RTrees_getActiveVarCount_const(self.as_raw_RTrees()) }.into_result()
    }
    
    // identifier: cv_ml_RTrees_setActiveVarCount_int_val
    /// @copybrief getActiveVarCount @see getActiveVarCount
    fn set_active_var_count(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_RTrees_setActiveVarCount_int_val(self.as_raw_RTrees(), val) }.into_result()
    }
    
    // identifier: cv_ml_RTrees_getTermCriteria_const
    /// @see setTermCriteria
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_ml_RTrees_getTermCriteria_const(self.as_raw_RTrees()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_ml_RTrees_setTermCriteria_TermCriteria_val
    /// @copybrief getTermCriteria @see getTermCriteria
    fn set_term_criteria(&mut self, val: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_RTrees_setTermCriteria_TermCriteria_val(self.as_raw_RTrees(), val.as_raw_TermCriteria()) }.into_result()
    }
    
    // identifier: cv_ml_RTrees_getVarImportance_const
    /// Returns the variable importance array.
    /// The method returns the variable importance vector, computed at the training stage when
    /// CalculateVarImportance is set to true. If this flag was set to false, the empty matrix is
    /// returned.
    fn get_var_importance(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_RTrees_getVarImportance_const(self.as_raw_RTrees()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_RTrees_getVotes_const_Mat_samples_Mat_results_int_flags
    /// Returns the result of each individual tree in the forest.
    /// In case the model is a regression problem, the method will return each of the trees'
    /// results for each of the sample cases. If the model is a classifier, it will return
    /// a Mat with samples + 1 rows, where the first row gives the class number and the
    /// following rows return the votes each class had for each sample.
    /// ## Parameters
    /// * samples: Array containing the samples for which votes will be calculated.
    /// * results: Array where the result of the calculation will be written.
    /// * flags: Flags for defining the type of RTrees.
    fn get_votes(&self, samples: &core::Mat, results: &mut core::Mat, flags: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_RTrees_getVotes_const_Mat_samples_Mat_results_int_flags(self.as_raw_RTrees(), samples.as_raw_Mat(), results.as_raw_Mat(), flags) }.into_result()
    }
    
}

impl<'a> RTrees + 'a {

    // identifier: cv_ml_RTrees_create
    /// Creates the empty model.
    /// Use StatModel::train to train the model, StatModel::train to create and train the model,
    /// Algorithm::load to load the pre-trained model.
    pub fn create() -> Result<types::PtrOfRTrees> {
        unsafe { sys::cv_core_cv_ml_RTrees_create() }.into_result().map(|x| types::PtrOfRTrees { ptr: x })
    }
    
    // identifier: cv_ml_RTrees_load_String_filepath_String_nodeName
    /// Loads and creates a serialized RTree from a file
    /// 
    /// Use RTree::save to serialize and store an RTree to disk.
    /// Load the RTree from this file again, by calling this function with the path to the file.
    /// Optionally specify the node for the file containing the classifier
    /// 
    /// ## Parameters
    /// * filepath: path to serialized RTree
    /// * nodeName: name of node containing the classifier
    ///
    /// ## C++ default parameters:
    /// * node_name: String()
    pub fn load(filepath: &str, node_name: &str) -> Result<types::PtrOfRTrees> {
        string_arg!(filepath);
        string_arg!(node_name);
        unsafe { sys::cv_core_cv_ml_RTrees_load_String_filepath_String_nodeName(filepath.as_ptr(), node_name.as_ptr()) }.into_result().map(|x| types::PtrOfRTrees { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::SVM (trait)
/// Support Vector Machines.
/// 
/// @sa @ref ml_intro_svm
pub trait SVM : core::StatModel {
    #[doc(hidden)] fn as_raw_SVM(&self) -> *mut c_void;
    // identifier: cv_ml_SVM_getType_const
    /// @see setType
    fn get_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_SVM_getType_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setType_int_val
    /// @copybrief getType @see getType
    fn set_type(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setType_int_val(self.as_raw_SVM(), val) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getGamma_const
    /// @see setGamma
    fn get_gamma(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_SVM_getGamma_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setGamma_double_val
    /// @copybrief getGamma @see getGamma
    fn set_gamma(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setGamma_double_val(self.as_raw_SVM(), val) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getCoef0_const
    /// @see setCoef0
    fn get_coef0(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_SVM_getCoef0_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setCoef0_double_val
    /// @copybrief getCoef0 @see getCoef0
    fn set_coef0(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setCoef0_double_val(self.as_raw_SVM(), val) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getDegree_const
    /// @see setDegree
    fn get_degree(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_SVM_getDegree_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setDegree_double_val
    /// @copybrief getDegree @see getDegree
    fn set_degree(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setDegree_double_val(self.as_raw_SVM(), val) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getC_const
    /// @see setC
    fn get_c(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_SVM_getC_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setC_double_val
    /// @copybrief getC @see getC
    fn set_c(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setC_double_val(self.as_raw_SVM(), val) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getNu_const
    /// @see setNu
    fn get_nu(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_SVM_getNu_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setNu_double_val
    /// @copybrief getNu @see getNu
    fn set_nu(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setNu_double_val(self.as_raw_SVM(), val) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getP_const
    /// @see setP
    fn get_p(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_SVM_getP_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setP_double_val
    /// @copybrief getP @see getP
    fn set_p(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setP_double_val(self.as_raw_SVM(), val) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getClassWeights_const
    /// @see setClassWeights
    fn get_class_weights(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_SVM_getClassWeights_const(self.as_raw_SVM()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_SVM_setClassWeights_Mat_val
    /// @copybrief getClassWeights @see getClassWeights
    fn set_class_weights(&mut self, val: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setClassWeights_Mat_val(self.as_raw_SVM(), val.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getTermCriteria_const
    /// @see setTermCriteria
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_ml_SVM_getTermCriteria_const(self.as_raw_SVM()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_ml_SVM_setTermCriteria_TermCriteria_val
    /// @copybrief getTermCriteria @see getTermCriteria
    fn set_term_criteria(&mut self, val: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setTermCriteria_TermCriteria_val(self.as_raw_SVM(), val.as_raw_TermCriteria()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getKernelType_const
    /// Type of a %SVM kernel.
    /// See SVM::KernelTypes. Default value is SVM::RBF.
    fn get_kernel_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_SVM_getKernelType_const(self.as_raw_SVM()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setKernel_int_kernelType
    /// Initialize with one of predefined kernels.
    /// See SVM::KernelTypes.
    fn set_kernel(&mut self, kernel_type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setKernel_int_kernelType(self.as_raw_SVM(), kernel_type) }.into_result()
    }
    
    // identifier: cv_ml_SVM_setCustomKernel_PtrOfKernel__kernel
    /// Initialize with custom kernel.
    /// See SVM::Kernel class for implementation details
    fn set_custom_kernel(&mut self, _kernel: &types::PtrOfKernel) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_setCustomKernel_PtrOfKernel__kernel(self.as_raw_SVM(), _kernel.as_raw_PtrOfKernel()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_trainAuto_PtrOfTrainData_data_int_kFold_ParamGrid_Cgrid_ParamGrid_gammaGrid_ParamGrid_pGrid_ParamGrid_nuGrid_ParamGrid_coeffGrid_ParamGrid_degreeGrid_bool_balanced
    /// Trains an %SVM with optimal parameters.
    /// 
    /// ## Parameters
    /// * data: the training data that can be constructed using TrainData::create or
    /// TrainData::loadFromCSV.
    /// * kFold: Cross-validation parameter. The training set is divided into kFold subsets. One
    /// subset is used to test the model, the others form the train set. So, the %SVM algorithm is
    /// executed kFold times.
    /// * Cgrid: grid for C
    /// * gammaGrid: grid for gamma
    /// * pGrid: grid for p
    /// * nuGrid: grid for nu
    /// * coeffGrid: grid for coeff
    /// * degreeGrid: grid for degree
    /// * balanced: If true and the problem is 2-class classification then the method creates more
    /// balanced cross-validation subsets that is proportions between classes in subsets are close
    /// to such proportion in the whole train dataset.
    /// 
    /// The method trains the %SVM model automatically by choosing the optimal parameters C, gamma, p,
    /// nu, coef0, degree. Parameters are considered optimal when the cross-validation
    /// estimate of the test set error is minimal.
    /// 
    /// If there is no need to optimize a parameter, the corresponding grid step should be set to any
    /// value less than or equal to 1. For example, to avoid optimization in gamma, set `gammaGrid.step
    /// = 0`, `gammaGrid.minVal`, `gamma_grid.maxVal` as arbitrary numbers. In this case, the value
    /// `Gamma` is taken for gamma.
    /// 
    /// And, finally, if the optimization in a parameter is required but the corresponding grid is
    /// unknown, you may call the function SVM::getDefaultGrid. To generate a grid, for example, for
    /// gamma, call `SVM::getDefaultGrid(SVM::GAMMA)`.
    /// 
    /// This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the
    /// regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and
    /// the usual %SVM with parameters specified in params is executed.
    ///
    /// ## C++ default parameters:
    /// * k_fold: 10
    /// * cgrid: getDefaultGrid(C)
    /// * gamma_grid: getDefaultGrid(GAMMA)
    /// * p_grid: getDefaultGrid(P)
    /// * nu_grid: getDefaultGrid(NU)
    /// * coeff_grid: getDefaultGrid(COEF)
    /// * degree_grid: getDefaultGrid(DEGREE)
    /// * balanced: false
    fn train_auto(&mut self, data: &types::PtrOfTrainData, k_fold: i32, cgrid: &core::ParamGrid, gamma_grid: &core::ParamGrid, p_grid: &core::ParamGrid, nu_grid: &core::ParamGrid, coeff_grid: &core::ParamGrid, degree_grid: &core::ParamGrid, balanced: bool) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_SVM_trainAuto_PtrOfTrainData_data_int_kFold_ParamGrid_Cgrid_ParamGrid_gammaGrid_ParamGrid_pGrid_ParamGrid_nuGrid_ParamGrid_coeffGrid_ParamGrid_degreeGrid_bool_balanced(self.as_raw_SVM(), data.as_raw_PtrOfTrainData(), k_fold, cgrid.as_raw_ParamGrid(), gamma_grid.as_raw_ParamGrid(), p_grid.as_raw_ParamGrid(), nu_grid.as_raw_ParamGrid(), coeff_grid.as_raw_ParamGrid(), degree_grid.as_raw_ParamGrid(), balanced) }.into_result()
    }
    
    // identifier: cv_ml_SVM_trainAuto_Mat_samples_int_layout_Mat_responses_int_kFold_PtrOfParamGrid_Cgrid_PtrOfParamGrid_gammaGrid_PtrOfParamGrid_pGrid_PtrOfParamGrid_nuGrid_PtrOfParamGrid_coeffGrid_PtrOfParamGrid_degreeGrid_bool_balanced
    /// Trains an %SVM with optimal parameters
    /// 
    /// ## Parameters
    /// * samples: training samples
    /// * layout: See ml::SampleTypes.
    /// * responses: vector of responses associated with the training samples.
    /// * kFold: Cross-validation parameter. The training set is divided into kFold subsets. One
    /// subset is used to test the model, the others form the train set. So, the %SVM algorithm is
    /// * Cgrid: grid for C
    /// * gammaGrid: grid for gamma
    /// * pGrid: grid for p
    /// * nuGrid: grid for nu
    /// * coeffGrid: grid for coeff
    /// * degreeGrid: grid for degree
    /// * balanced: If true and the problem is 2-class classification then the method creates more
    /// balanced cross-validation subsets that is proportions between classes in subsets are close
    /// to such proportion in the whole train dataset.
    /// 
    /// The method trains the %SVM model automatically by choosing the optimal parameters C, gamma, p,
    /// nu, coef0, degree. Parameters are considered optimal when the cross-validation
    /// estimate of the test set error is minimal.
    /// 
    /// This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only
    /// offers rudimentary parameter options.
    /// 
    /// This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the
    /// regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and
    /// the usual %SVM with parameters specified in params is executed.
    ///
    /// ## C++ default parameters:
    /// * k_fold: 10
    /// * cgrid: SVM::getDefaultGridPtr(SVM::C)
    /// * gamma_grid: SVM::getDefaultGridPtr(SVM::GAMMA)
    /// * p_grid: SVM::getDefaultGridPtr(SVM::P)
    /// * nu_grid: SVM::getDefaultGridPtr(SVM::NU)
    /// * coeff_grid: SVM::getDefaultGridPtr(SVM::COEF)
    /// * degree_grid: SVM::getDefaultGridPtr(SVM::DEGREE)
    /// * balanced: false
    fn train_auto_1(&mut self, samples: &core::Mat, layout: i32, responses: &core::Mat, k_fold: i32, cgrid: &types::PtrOfParamGrid, gamma_grid: &types::PtrOfParamGrid, p_grid: &types::PtrOfParamGrid, nu_grid: &types::PtrOfParamGrid, coeff_grid: &types::PtrOfParamGrid, degree_grid: &types::PtrOfParamGrid, balanced: bool) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_SVM_trainAuto_Mat_samples_int_layout_Mat_responses_int_kFold_PtrOfParamGrid_Cgrid_PtrOfParamGrid_gammaGrid_PtrOfParamGrid_pGrid_PtrOfParamGrid_nuGrid_PtrOfParamGrid_coeffGrid_PtrOfParamGrid_degreeGrid_bool_balanced(self.as_raw_SVM(), samples.as_raw_Mat(), layout, responses.as_raw_Mat(), k_fold, cgrid.as_raw_PtrOfParamGrid(), gamma_grid.as_raw_PtrOfParamGrid(), p_grid.as_raw_PtrOfParamGrid(), nu_grid.as_raw_PtrOfParamGrid(), coeff_grid.as_raw_PtrOfParamGrid(), degree_grid.as_raw_PtrOfParamGrid(), balanced) }.into_result()
    }
    
    // identifier: cv_ml_SVM_getSupportVectors_const
    /// Retrieves all the support vectors
    /// 
    /// The method returns all the support vectors as a floating-point matrix, where support vectors are
    /// stored as matrix rows.
    fn get_support_vectors(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_SVM_getSupportVectors_const(self.as_raw_SVM()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_SVM_getUncompressedSupportVectors_const
    /// Retrieves all the uncompressed support vectors of a linear %SVM
    /// 
    /// The method returns all the uncompressed support vectors of a linear %SVM that the compressed
    /// support vector, used for prediction, was derived from. They are returned in a floating-point
    /// matrix, where the support vectors are stored as matrix rows.
    fn get_uncompressed_support_vectors(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_SVM_getUncompressedSupportVectors_const(self.as_raw_SVM()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_SVM_getDecisionFunction_const_int_i_Mat_alpha_Mat_svidx
    /// Retrieves the decision function
    /// 
    /// ## Parameters
    /// * i: the index of the decision function. If the problem solved is regression, 1-class or
    /// 2-class classification, then there will be just one decision function and the index should
    /// always be 0. Otherwise, in the case of N-class classification, there will be <span lang='latex'>N(N-1)/2</span>
    /// decision functions.
    /// * alpha: the optional output vector for weights, corresponding to different support vectors.
    /// In the case of linear %SVM all the alpha's will be 1's.
    /// * svidx: the optional output vector of indices of support vectors within the matrix of
    /// support vectors (which can be retrieved by SVM::getSupportVectors). In the case of linear
    /// %SVM each decision function consists of a single "compressed" support vector.
    /// 
    /// The method returns rho parameter of the decision function, a scalar subtracted from the weighted
    /// sum of kernel responses.
    fn get_decision_function(&self, i: i32, alpha: &mut core::Mat, svidx: &mut core::Mat) -> Result<f64> {
        unsafe { sys::cv_core_cv_ml_SVM_getDecisionFunction_const_int_i_Mat_alpha_Mat_svidx(self.as_raw_SVM(), i, alpha.as_raw_Mat(), svidx.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> SVM + 'a {

    // identifier: cv_ml_SVM_getDefaultGrid_int_param_id
    /// Generates a grid for %SVM parameters.
    /// 
    /// ## Parameters
    /// * param_id: %SVM parameters IDs that must be one of the SVM::ParamTypes. The grid is
    /// generated for the parameter with this ID.
    /// 
    /// The function generates a grid for the specified parameter of the %SVM algorithm. The grid may be
    /// passed to the function SVM::trainAuto.
    pub fn get_default_grid(param_id: i32) -> Result<core::ParamGrid> {
        unsafe { sys::cv_core_cv_ml_SVM_getDefaultGrid_int_param_id(param_id) }.into_result().map(|x| core::ParamGrid { ptr: x })
    }
    
    // identifier: cv_ml_SVM_getDefaultGridPtr_int_param_id
    /// Generates a grid for %SVM parameters.
    /// 
    /// ## Parameters
    /// * param_id: %SVM parameters IDs that must be one of the SVM::ParamTypes. The grid is
    /// generated for the parameter with this ID.
    /// 
    /// The function generates a grid pointer for the specified parameter of the %SVM algorithm.
    /// The grid may be passed to the function SVM::trainAuto.
    pub fn get_default_grid_ptr(param_id: i32) -> Result<types::PtrOfParamGrid> {
        unsafe { sys::cv_core_cv_ml_SVM_getDefaultGridPtr_int_param_id(param_id) }.into_result().map(|x| types::PtrOfParamGrid { ptr: x })
    }
    
    // identifier: cv_ml_SVM_create
    /// Creates empty model.
    /// Use StatModel::train to train the model. Since %SVM has several parameters, you may want to
    /// find the best parameters for your problem, it can be done with SVM::trainAuto.
    pub fn create() -> Result<types::PtrOfSVM> {
        unsafe { sys::cv_core_cv_ml_SVM_create() }.into_result().map(|x| types::PtrOfSVM { ptr: x })
    }
    
    // identifier: cv_ml_SVM_load_String_filepath
    /// Loads and creates a serialized svm from a file
    /// 
    /// Use SVM::save to serialize and store an SVM to disk.
    /// Load the SVM from this file again, by calling this function with the path to the file.
    /// 
    /// ## Parameters
    /// * filepath: path to serialized svm
    pub fn load(filepath: &str) -> Result<types::PtrOfSVM> {
        string_arg!(filepath);
        unsafe { sys::cv_core_cv_ml_SVM_load_String_filepath(filepath.as_ptr()) }.into_result().map(|x| types::PtrOfSVM { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::SVM::Kernel (trait)
pub trait SVM_Kernel : core::Algorithm {
    #[doc(hidden)] fn as_raw_SVM_Kernel(&self) -> *mut c_void;
    // identifier: cv_ml_SVM_Kernel_getType_const
    fn get_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_SVM_Kernel_getType_const(self.as_raw_SVM_Kernel()) }.into_result()
    }
    
    // identifier: cv_ml_SVM_Kernel_calc_int_vcount_int_n_const_float_X_vecs_const_float_X_another_float_X_results
    fn calc(&mut self, vcount: i32, n: i32, vecs: &f32, another: &f32, results: &mut f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVM_Kernel_calc_int_vcount_int_n_const_float_X_vecs_const_float_X_another_float_X_results(self.as_raw_SVM_Kernel(), vcount, n, vecs, another, results) }.into_result()
    }
    
}

impl<'a> SVM_Kernel + 'a {

}

// Generating impl for trait cv::ml::SVMSGD (trait)
/// \
///                        Stochastic Gradient Descent SVM Classifier                      *
pub trait SVMSGD : core::StatModel {
    #[doc(hidden)] fn as_raw_SVMSGD(&self) -> *mut c_void;
    // identifier: cv_ml_SVMSGD_getWeights
    /// @return the weights of the trained model (decision function f(x) = weights * x + shift).
    fn get_weights(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getWeights(self.as_raw_SVMSGD()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_SVMSGD_getShift
    /// @return the shift of the trained model (decision function f(x) = weights * x + shift).
    fn get_shift(&mut self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getShift(self.as_raw_SVMSGD()) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_setOptimalParameters_int_svmsgdType_int_marginType
    /// Function sets optimal parameters values for chosen SVM SGD model.
    /// ## Parameters
    /// * svmsgdType: is the type of SVMSGD classifier.
    /// * marginType: is the type of margin constraint.
    ///
    /// ## C++ default parameters:
    /// * svmsgd_type: SVMSGD::ASGD
    /// * margin_type: SVMSGD::SOFT_MARGIN
    fn set_optimal_parameters(&mut self, svmsgd_type: i32, margin_type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_setOptimalParameters_int_svmsgdType_int_marginType(self.as_raw_SVMSGD(), svmsgd_type, margin_type) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_getSvmsgdType_const
    /// @see setSvmsgdType
    fn get_svmsgd_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getSvmsgdType_const(self.as_raw_SVMSGD()) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_setSvmsgdType_int_svmsgdType
    /// @copybrief getSvmsgdType @see getSvmsgdType
    fn set_svmsgd_type(&mut self, svmsgd_type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_setSvmsgdType_int_svmsgdType(self.as_raw_SVMSGD(), svmsgd_type) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_getMarginType_const
    /// @see setMarginType
    fn get_margin_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getMarginType_const(self.as_raw_SVMSGD()) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_setMarginType_int_marginType
    /// @copybrief getMarginType @see getMarginType
    fn set_margin_type(&mut self, margin_type: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_setMarginType_int_marginType(self.as_raw_SVMSGD(), margin_type) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_getMarginRegularization_const
    /// @see setMarginRegularization
    fn get_margin_regularization(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getMarginRegularization_const(self.as_raw_SVMSGD()) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_setMarginRegularization_float_marginRegularization
    /// @copybrief getMarginRegularization @see getMarginRegularization
    fn set_margin_regularization(&mut self, margin_regularization: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_setMarginRegularization_float_marginRegularization(self.as_raw_SVMSGD(), margin_regularization) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_getInitialStepSize_const
    /// @see setInitialStepSize
    fn get_initial_step_size(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getInitialStepSize_const(self.as_raw_SVMSGD()) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_setInitialStepSize_float_InitialStepSize
    /// @copybrief getInitialStepSize @see getInitialStepSize
    fn set_initial_step_size(&mut self, initial_step_size: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_setInitialStepSize_float_InitialStepSize(self.as_raw_SVMSGD(), initial_step_size) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_getStepDecreasingPower_const
    /// @see setStepDecreasingPower
    fn get_step_decreasing_power(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getStepDecreasingPower_const(self.as_raw_SVMSGD()) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_setStepDecreasingPower_float_stepDecreasingPower
    /// @copybrief getStepDecreasingPower @see getStepDecreasingPower
    fn set_step_decreasing_power(&mut self, step_decreasing_power: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_setStepDecreasingPower_float_stepDecreasingPower(self.as_raw_SVMSGD(), step_decreasing_power) }.into_result()
    }
    
    // identifier: cv_ml_SVMSGD_getTermCriteria_const
    /// @see setTermCriteria
    fn get_term_criteria(&self) -> Result<core::TermCriteria> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_getTermCriteria_const(self.as_raw_SVMSGD()) }.into_result().map(|x| core::TermCriteria { ptr: x })
    }
    
    // identifier: cv_ml_SVMSGD_setTermCriteria_TermCriteria_val
    /// @copybrief getTermCriteria @see getTermCriteria
    fn set_term_criteria(&mut self, val: &core::TermCriteria) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_setTermCriteria_TermCriteria_val(self.as_raw_SVMSGD(), val.as_raw_TermCriteria()) }.into_result()
    }
    
}

impl<'a> SVMSGD + 'a {

    // identifier: cv_ml_SVMSGD_create
    /// Creates empty model.
    /// Use StatModel::train to train the model. Since %SVMSGD has several parameters, you may want to
    /// find the best parameters for your problem or use setOptimalParameters() to set some default parameters.
    pub fn create() -> Result<types::PtrOfSVMSGD> {
        unsafe { sys::cv_core_cv_ml_SVMSGD_create() }.into_result().map(|x| types::PtrOfSVMSGD { ptr: x })
    }
    
    // identifier: cv_ml_SVMSGD_load_String_filepath_String_nodeName
    /// Loads and creates a serialized SVMSGD from a file
    /// 
    /// Use SVMSGD::save to serialize and store an SVMSGD to disk.
    /// Load the SVMSGD from this file again, by calling this function with the path to the file.
    /// Optionally specify the node for the file containing the classifier
    /// 
    /// ## Parameters
    /// * filepath: path to serialized SVMSGD
    /// * nodeName: name of node containing the classifier
    ///
    /// ## C++ default parameters:
    /// * node_name: String()
    pub fn load(filepath: &str, node_name: &str) -> Result<types::PtrOfSVMSGD> {
        string_arg!(filepath);
        string_arg!(node_name);
        unsafe { sys::cv_core_cv_ml_SVMSGD_load_String_filepath_String_nodeName(filepath.as_ptr(), node_name.as_ptr()) }.into_result().map(|x| types::PtrOfSVMSGD { ptr: x })
    }
    
}

// Generating impl for trait cv::ml::StatModel (trait)
/// Base class for statistical models in OpenCV ML.
pub trait StatModel : core::Algorithm {
    #[doc(hidden)] fn as_raw_StatModel(&self) -> *mut c_void;
    // identifier: cv_ml_StatModel_getVarCount_const
    /// Returns the number of variables in training samples
    fn get_var_count(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_StatModel_getVarCount_const(self.as_raw_StatModel()) }.into_result()
    }
    
    // identifier: cv_ml_StatModel_empty_const
    fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_StatModel_empty_const(self.as_raw_StatModel()) }.into_result()
    }
    
    // identifier: cv_ml_StatModel_isTrained_const
    /// Returns true if the model is trained
    fn is_trained(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_StatModel_isTrained_const(self.as_raw_StatModel()) }.into_result()
    }
    
    // identifier: cv_ml_StatModel_isClassifier_const
    /// Returns true if the model is classifier
    fn is_classifier(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_StatModel_isClassifier_const(self.as_raw_StatModel()) }.into_result()
    }
    
    // identifier: cv_ml_StatModel_train_PtrOfTrainData_trainData_int_flags
    /// Trains the statistical model
    /// 
    /// ## Parameters
    /// * trainData: training data that can be loaded from file using TrainData::loadFromCSV or
    /// created with TrainData::create.
    /// * flags: optional flags, depending on the model. Some of the models can be updated with the
    /// new training samples, not completely overwritten (such as NormalBayesClassifier or ANN_MLP).
    ///
    /// ## C++ default parameters:
    /// * flags: 0
    fn train(&mut self, train_data: &types::PtrOfTrainData, flags: i32) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_StatModel_train_PtrOfTrainData_trainData_int_flags(self.as_raw_StatModel(), train_data.as_raw_PtrOfTrainData(), flags) }.into_result()
    }
    
    // identifier: cv_ml_StatModel_train_Mat_samples_int_layout_Mat_responses
    /// Trains the statistical model
    /// 
    /// ## Parameters
    /// * samples: training samples
    /// * layout: See ml::SampleTypes.
    /// * responses: vector of responses associated with the training samples.
    fn train_1(&mut self, samples: &core::Mat, layout: i32, responses: &core::Mat) -> Result<bool> {
        unsafe { sys::cv_core_cv_ml_StatModel_train_Mat_samples_int_layout_Mat_responses(self.as_raw_StatModel(), samples.as_raw_Mat(), layout, responses.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_StatModel_calcError_const_PtrOfTrainData_data_bool_test_Mat_resp
    /// Computes error on the training or test dataset
    /// 
    /// ## Parameters
    /// * data: the training data
    /// * test: if true, the error is computed over the test subset of the data, otherwise it's
    /// computed over the training subset of the data. Please note that if you loaded a completely
    /// different dataset to evaluate already trained classifier, you will probably want not to set
    /// the test subset at all with TrainData::setTrainTestSplitRatio and specify test=false, so
    /// that the error is computed for the whole new set. Yes, this sounds a bit confusing.
    /// * resp: the optional output responses.
    /// 
    /// The method uses StatModel::predict to compute the error. For regression models the error is
    /// computed as RMS, for classifiers - as a percent of missclassified samples (0%-100%).
    fn calc_error(&self, data: &types::PtrOfTrainData, test: bool, resp: &mut core::Mat) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_StatModel_calcError_const_PtrOfTrainData_data_bool_test_Mat_resp(self.as_raw_StatModel(), data.as_raw_PtrOfTrainData(), test, resp.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_ml_StatModel_predict_const_Mat_samples_Mat_results_int_flags
    /// Predicts response(s) for the provided sample(s)
    /// 
    /// ## Parameters
    /// * samples: The input samples, floating-point matrix
    /// * results: The optional output matrix of results.
    /// * flags: The optional flags, model-dependent. See cv::ml::StatModel::Flags.
    ///
    /// ## C++ default parameters:
    /// * results: noArray()
    /// * flags: 0
    fn predict(&self, samples: &core::Mat, results: &mut core::Mat, flags: i32) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_StatModel_predict_const_Mat_samples_Mat_results_int_flags(self.as_raw_StatModel(), samples.as_raw_Mat(), results.as_raw_Mat(), flags) }.into_result()
    }
    
}

impl<'a> StatModel + 'a {

}

// Generating impl for trait cv::ml::TrainData (trait)
/// Class encapsulating training data.
/// 
/// Please note that the class only specifies the interface of training data, but not implementation.
/// All the statistical model classes in _ml_ module accepts Ptr\<TrainData\> as parameter. In other
/// words, you can create your own class derived from TrainData and pass smart pointer to the instance
/// of this class into StatModel::train.
/// 
/// @sa @ref ml_intro_data
pub trait TrainData {
    #[doc(hidden)] fn as_raw_TrainData(&self) -> *mut c_void;
    // identifier: cv_ml_TrainData_missingValue
    fn missing_value(&mut self) -> Result<f32> {
        unsafe { sys::cv_core_cv_ml_TrainData_missingValue(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getLayout_const
    fn get_layout(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getLayout_const(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getNTrainSamples_const
    fn get_n_train_samples(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNTrainSamples_const(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getNTestSamples_const
    fn get_n_test_samples(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNTestSamples_const(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getNSamples_const
    fn get_n_samples(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNSamples_const(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getNVars_const
    fn get_n_vars(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNVars_const(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getNAllVars_const
    fn get_n_all_vars(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNAllVars_const(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getSample_const_Mat_varIdx_int_sidx_float_X_buf
    fn get_sample(&self, var_idx: &core::Mat, sidx: i32, buf: &mut f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_TrainData_getSample_const_Mat_varIdx_int_sidx_float_X_buf(self.as_raw_TrainData(), var_idx.as_raw_Mat(), sidx, buf) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getSamples_const
    fn get_samples(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getSamples_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getMissing_const
    fn get_missing(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getMissing_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTrainSamples_const_int_layout_bool_compressSamples_bool_compressVars
    /// Returns matrix of train samples
    /// 
    /// ## Parameters
    /// * layout: The requested layout. If it's different from the initial one, the matrix is
    /// transposed. See ml::SampleTypes.
    /// * compressSamples: if true, the function returns only the training samples (specified by
    /// sampleIdx)
    /// * compressVars: if true, the function returns the shorter training samples, containing only
    /// the active variables.
    /// 
    /// In current implementation the function tries to avoid physical data copying and returns the
    /// matrix stored inside TrainData (unless the transposition or compression is needed).
    ///
    /// ## C++ default parameters:
    /// * layout: ROW_SAMPLE
    /// * compress_samples: true
    /// * compress_vars: true
    fn get_train_samples(&self, layout: i32, compress_samples: bool, compress_vars: bool) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTrainSamples_const_int_layout_bool_compressSamples_bool_compressVars(self.as_raw_TrainData(), layout, compress_samples, compress_vars) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTrainResponses_const
    /// Returns the vector of responses
    /// 
    /// The function returns ordered or the original categorical responses. Usually it's used in
    /// regression algorithms.
    fn get_train_responses(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTrainResponses_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTrainNormCatResponses_const
    /// Returns the vector of normalized categorical responses
    /// 
    /// The function returns vector of responses. Each response is integer from `0` to `<number of
    /// classes>-1`. The actual label value can be retrieved then from the class label vector, see
    /// TrainData::getClassLabels.
    fn get_train_norm_cat_responses(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTrainNormCatResponses_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTestResponses_const
    fn get_test_responses(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTestResponses_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTestNormCatResponses_const
    fn get_test_norm_cat_responses(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTestNormCatResponses_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getResponses_const
    fn get_responses(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getResponses_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getNormCatResponses_const
    fn get_norm_cat_responses(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNormCatResponses_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getSampleWeights_const
    fn get_sample_weights(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getSampleWeights_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTrainSampleWeights_const
    fn get_train_sample_weights(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTrainSampleWeights_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTestSampleWeights_const
    fn get_test_sample_weights(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTestSampleWeights_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getVarIdx_const
    fn get_var_idx(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getVarIdx_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getVarType_const
    fn get_var_type(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getVarType_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getVarSymbolFlags_const
    fn get_var_symbol_flags(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getVarSymbolFlags_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getResponseType_const
    fn get_response_type(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getResponseType_const(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getTrainSampleIdx_const
    fn get_train_sample_idx(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTrainSampleIdx_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getTestSampleIdx_const
    fn get_test_sample_idx(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTestSampleIdx_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getValues_const_int_vi_Mat_sidx_float_X_values
    fn get_values(&self, vi: i32, sidx: &core::Mat, values: &mut f32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_TrainData_getValues_const_int_vi_Mat_sidx_float_X_values(self.as_raw_TrainData(), vi, sidx.as_raw_Mat(), values) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getNormCatValues_const_int_vi_Mat_sidx_int_X_values
    fn get_norm_cat_values(&self, vi: i32, sidx: &core::Mat, values: &mut i32) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNormCatValues_const_int_vi_Mat_sidx_int_X_values(self.as_raw_TrainData(), vi, sidx.as_raw_Mat(), values) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getDefaultSubstValues_const
    fn get_default_subst_values(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getDefaultSubstValues_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getCatCount_const_int_vi
    fn get_cat_count(&self, vi: i32) -> Result<i32> {
        unsafe { sys::cv_core_cv_ml_TrainData_getCatCount_const_int_vi(self.as_raw_TrainData(), vi) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getClassLabels_const
    /// Returns the vector of class labels
    /// 
    /// The function returns vector of unique labels occurred in the responses.
    fn get_class_labels(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getClassLabels_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getCatOfs_const
    fn get_cat_ofs(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getCatOfs_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getCatMap_const
    fn get_cat_map(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getCatMap_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_setTrainTestSplit_int_count_bool_shuffle
    /// Splits the training data into the training and test parts
    /// @sa TrainData::setTrainTestSplitRatio
    ///
    /// ## C++ default parameters:
    /// * shuffle: true
    fn set_train_test_split(&mut self, count: i32, shuffle: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_TrainData_setTrainTestSplit_int_count_bool_shuffle(self.as_raw_TrainData(), count, shuffle) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_setTrainTestSplitRatio_double_ratio_bool_shuffle
    /// Splits the training data into the training and test parts
    /// 
    /// The function selects a subset of specified relative size and then returns it as the training
    /// set. If the function is not called, all the data is used for training. Please, note that for
    /// each of TrainData::getTrain\* there is corresponding TrainData::getTest\*, so that the test
    /// subset can be retrieved and processed as well.
    /// @sa TrainData::setTrainTestSplit
    ///
    /// ## C++ default parameters:
    /// * shuffle: true
    fn set_train_test_split_ratio(&mut self, ratio: f64, shuffle: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_TrainData_setTrainTestSplitRatio_double_ratio_bool_shuffle(self.as_raw_TrainData(), ratio, shuffle) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_shuffleTrainTest
    fn shuffle_train_test(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_TrainData_shuffleTrainTest(self.as_raw_TrainData()) }.into_result()
    }
    
    // identifier: cv_ml_TrainData_getTestSamples_const
    /// Returns matrix of test samples
    fn get_test_samples(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getTestSamples_const(self.as_raw_TrainData()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getNames_const_VectorOfString_names
    /// Returns vector of symbolic names captured in loadFromCSV()
    fn get_names(&self, names: &types::VectorOfString) -> Result<()> {
        unsafe { sys::cv_core_cv_ml_TrainData_getNames_const_VectorOfString_names(self.as_raw_TrainData(), names.as_raw_VectorOfString()) }.into_result()
    }
    
}

impl<'a> TrainData + 'a {

    // identifier: cv_ml_TrainData_getSubVector_Mat_vec_Mat_idx
    /// Extract from 1D vector elements specified by passed indexes.
    /// ## Parameters
    /// * vec: input vector (supported types: CV_32S, CV_32F, CV_64F)
    /// * idx: 1D index vector
    pub fn get_sub_vector(vec: &core::Mat, idx: &core::Mat) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getSubVector_Mat_vec_Mat_idx(vec.as_raw_Mat(), idx.as_raw_Mat()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_getSubMatrix_Mat_matrix_Mat_idx_int_layout
    /// Extract from matrix rows/cols specified by passed indexes.
    /// ## Parameters
    /// * matrix: input matrix (supported types: CV_32S, CV_32F, CV_64F)
    /// * idx: 1D index vector
    /// * layout: specifies to extract rows (cv::ml::ROW_SAMPLES) or to extract columns (cv::ml::COL_SAMPLES)
    pub fn get_sub_matrix(matrix: &core::Mat, idx: &core::Mat, layout: i32) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_ml_TrainData_getSubMatrix_Mat_matrix_Mat_idx_int_layout(matrix.as_raw_Mat(), idx.as_raw_Mat(), layout) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
    // identifier: cv_ml_TrainData_create_Mat_samples_int_layout_Mat_responses_Mat_varIdx_Mat_sampleIdx_Mat_sampleWeights_Mat_varType
    /// Creates training data from in-memory arrays.
    /// 
    /// ## Parameters
    /// * samples: matrix of samples. It should have CV_32F type.
    /// * layout: see ml::SampleTypes.
    /// * responses: matrix of responses. If the responses are scalar, they should be stored as a
    /// single row or as a single column. The matrix should have type CV_32F or CV_32S (in the
    /// former case the responses are considered as ordered by default; in the latter case - as
    /// categorical)
    /// * varIdx: vector specifying which variables to use for training. It can be an integer vector
    /// (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of
    /// active variables.
    /// * sampleIdx: vector specifying which samples to use for training. It can be an integer
    /// vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask
    /// of training samples.
    /// * sampleWeights: optional vector with weights for each sample. It should have CV_32F type.
    /// * varType: optional vector of type CV_8U and size `<number_of_variables_in_samples> +
    /// <number_of_variables_in_responses>`, containing types of each input and output variable. See
    /// ml::VariableTypes.
    ///
    /// ## C++ default parameters:
    /// * var_idx: noArray()
    /// * sample_idx: noArray()
    /// * sample_weights: noArray()
    /// * var_type: noArray()
    pub fn create(samples: &core::Mat, layout: i32, responses: &core::Mat, var_idx: &core::Mat, sample_idx: &core::Mat, sample_weights: &core::Mat, var_type: &core::Mat) -> Result<types::PtrOfTrainData> {
        unsafe { sys::cv_core_cv_ml_TrainData_create_Mat_samples_int_layout_Mat_responses_Mat_varIdx_Mat_sampleIdx_Mat_sampleWeights_Mat_varType(samples.as_raw_Mat(), layout, responses.as_raw_Mat(), var_idx.as_raw_Mat(), sample_idx.as_raw_Mat(), sample_weights.as_raw_Mat(), var_type.as_raw_Mat()) }.into_result().map(|x| types::PtrOfTrainData { ptr: x })
    }
    
}

// boxed class cv::softdouble
#[allow(dead_code)]
pub struct softdouble {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::softdouble {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_softdouble(self.ptr) };
    }
}
impl core::softdouble {
    #[doc(hidden)] pub fn as_raw_softdouble(&self) -> *mut c_void { self.ptr }
}

impl softdouble {

    // identifier: cv_softdouble_softdouble_softdouble_c
    /// Copy constructor
    pub fn new(c: &core::softdouble) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_softdouble_softdouble_c(c.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_fromRaw_uint64_t_a
    /// Construct from raw
    /// 
    /// Builds new value from raw binary representation
    pub fn from_raw(a: u64) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_fromRaw_uint64_t_a(a) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_softdouble_int_a
    pub fn new_1(a: i32) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_softdouble_int_a(a) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_softdouble_double_a
    /// Construct from double
    pub fn new_2(a: f64) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_softdouble_double_a(a) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_isNaN_const
    /// NaN state indicator
    pub fn is_na_n(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softdouble_isNaN_const(self.as_raw_softdouble()) }.into_result()
    }
    
    // identifier: cv_softdouble_isInf_const
    /// Inf state indicator
    pub fn is_inf(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softdouble_isInf_const(self.as_raw_softdouble()) }.into_result()
    }
    
    // identifier: cv_softdouble_isSubnormal_const
    /// Subnormal number indicator
    pub fn is_subnormal(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softdouble_isSubnormal_const(self.as_raw_softdouble()) }.into_result()
    }
    
    // identifier: cv_softdouble_getSign_const
    /// Get sign bit
    pub fn get_sign(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softdouble_getSign_const(self.as_raw_softdouble()) }.into_result()
    }
    
    // identifier: cv_softdouble_setSign_const_bool_sign
    /// Construct a copy with new sign bit
    pub fn set_sign(&self, sign: bool) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_setSign_const_bool_sign(self.as_raw_softdouble(), sign) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_getExp_const
    /// Get 0-based exponent
    pub fn get_exp(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_softdouble_getExp_const(self.as_raw_softdouble()) }.into_result()
    }
    
    // identifier: cv_softdouble_setExp_const_int_e
    /// Construct a copy with new 0-based exponent
    pub fn set_exp(&self, e: i32) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_setExp_const_int_e(self.as_raw_softdouble(), e) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_getFrac_const
    /// Get a fraction part
    /// 
    /// Returns a number 1 <= x < 2 with the same significand
    pub fn get_frac(&self) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_getFrac_const(self.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_setFrac_const_softdouble_s
    /// Construct a copy with provided significand
    /// 
    /// Constructs a copy of a number with significand taken from parameter
    pub fn set_frac(&self, s: &core::softdouble) -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_setFrac_const_softdouble_s(self.as_raw_softdouble(), s.as_raw_softdouble()) }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_zero
    /// Zero constant
    pub fn zero() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_zero() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_inf
    /// Positive infinity constant
    pub fn inf() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_inf() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_nan
    /// Default NaN constant
    pub fn nan() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_nan() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_one
    /// One constant
    pub fn one() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_one() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_min
    /// Smallest normalized value
    pub fn min() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_min() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_eps
    /// Difference between 1 and next representable value
    pub fn eps() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_eps() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_max
    /// Biggest finite value
    pub fn max() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_max() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
    // identifier: cv_softdouble_pi
    /// Correct pi approximation
    pub fn pi() -> Result<core::softdouble> {
        unsafe { sys::cv_core_cv_softdouble_pi() }.into_result().map(|x| core::softdouble { ptr: x })
    }
    
}

// boxed class cv::softfloat
/// @addtogroup core_utils_softfloat
/// 
/// [SoftFloat](http://www.jhauser.us/arithmetic/SoftFloat.html) is a software implementation
/// of floating-point calculations according to IEEE 754 standard.
/// All calculations are done in integers, that's why they are machine-independent and bit-exact.
/// This library can be useful in accuracy-critical parts like look-up tables generation, tests, etc.
/// OpenCV contains a subset of SoftFloat partially rewritten to C++.
/// 
/// ### Types
/// 
/// There are two basic types: @ref softfloat and @ref softdouble.
/// These types are binary compatible with float and double types respectively
/// and support conversions to/from them.
/// Other types from original SoftFloat library like fp16 or fp128 were thrown away
/// as well as quiet/signaling NaN support, on-the-fly rounding mode switch
/// and exception flags (though exceptions can be implemented in the future).
/// 
/// ### Operations
/// 
/// Both types support the following:
/// - Construction from signed and unsigned 32-bit and 64 integers,
/// float/double or raw binary representation
/// - Conversions between each other, to float or double and to int
/// using @ref cvRound, @ref cvTrunc, @ref cvFloor, @ref cvCeil or a bunch of
/// saturate_cast functions
/// - Add, subtract, multiply, divide, remainder, square root, FMA with absolute precision
/// - Comparison operations
/// - Explicit sign, exponent and significand manipulation through get/set methods,
/// number state indicators (isInf, isNan, isSubnormal)
/// - Type-specific constants like eps, minimum/maximum value, best pi approximation, etc.
/// - min(), max(), abs(), exp(), log() and pow() functions
#[allow(dead_code)]
pub struct softfloat {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::softfloat {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_softfloat(self.ptr) };
    }
}
impl core::softfloat {
    #[doc(hidden)] pub fn as_raw_softfloat(&self) -> *mut c_void { self.ptr }
}

impl softfloat {

    // identifier: cv_softfloat_softfloat
    /// Default constructor
    pub fn new() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_softfloat() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_softfloat_softfloat_c
    /// Copy constructor
    pub fn new_1(c: &core::softfloat) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_softfloat_softfloat_c(c.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_fromRaw_uint32_t_a
    /// Construct from raw
    /// 
    /// Builds new value from raw binary representation
    pub fn from_raw(a: u32) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_fromRaw_uint32_t_a(a) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_softfloat_int_a
    pub fn new_2(a: i32) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_softfloat_int_a(a) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_softfloat_float_a
    /// Construct from float
    pub fn new_3(a: f32) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_softfloat_float_a(a) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_isNaN_const
    /// NaN state indicator
    pub fn is_na_n(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softfloat_isNaN_const(self.as_raw_softfloat()) }.into_result()
    }
    
    // identifier: cv_softfloat_isInf_const
    /// Inf state indicator
    pub fn is_inf(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softfloat_isInf_const(self.as_raw_softfloat()) }.into_result()
    }
    
    // identifier: cv_softfloat_isSubnormal_const
    /// Subnormal number indicator
    pub fn is_subnormal(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softfloat_isSubnormal_const(self.as_raw_softfloat()) }.into_result()
    }
    
    // identifier: cv_softfloat_getSign_const
    /// Get sign bit
    pub fn get_sign(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_softfloat_getSign_const(self.as_raw_softfloat()) }.into_result()
    }
    
    // identifier: cv_softfloat_setSign_const_bool_sign
    /// Construct a copy with new sign bit
    pub fn set_sign(&self, sign: bool) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_setSign_const_bool_sign(self.as_raw_softfloat(), sign) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_getExp_const
    /// Get 0-based exponent
    pub fn get_exp(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_softfloat_getExp_const(self.as_raw_softfloat()) }.into_result()
    }
    
    // identifier: cv_softfloat_setExp_const_int_e
    /// Construct a copy with new 0-based exponent
    pub fn set_exp(&self, e: i32) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_setExp_const_int_e(self.as_raw_softfloat(), e) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_getFrac_const
    /// Get a fraction part
    /// 
    /// Returns a number 1 <= x < 2 with the same significand
    pub fn get_frac(&self) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_getFrac_const(self.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_setFrac_const_softfloat_s
    /// Construct a copy with provided significand
    /// 
    /// Constructs a copy of a number with significand taken from parameter
    pub fn set_frac(&self, s: &core::softfloat) -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_setFrac_const_softfloat_s(self.as_raw_softfloat(), s.as_raw_softfloat()) }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_zero
    /// Zero constant
    pub fn zero() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_zero() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_inf
    /// Positive infinity constant
    pub fn inf() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_inf() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_nan
    /// Default NaN constant
    pub fn nan() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_nan() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_one
    /// One constant
    pub fn one() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_one() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_min
    /// Smallest normalized value
    pub fn min() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_min() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_eps
    /// Difference between 1 and next representable value
    pub fn eps() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_eps() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_max
    /// Biggest finite value
    pub fn max() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_max() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
    // identifier: cv_softfloat_pi
    /// Correct pi approximation
    pub fn pi() -> Result<core::softfloat> {
        unsafe { sys::cv_core_cv_softfloat_pi() }.into_result().map(|x| core::softfloat { ptr: x })
    }
    
}

// Generating impl for trait cv::superres::FrameSource (trait)
/// Super Resolution
/// 
/// # Super Resolution
/// 
/// The Super Resolution module contains a set of functions and classes that can be used to solve the
/// problem of resolution enhancement. There are a few methods implemented, most of them are described in
/// the papers @cite Farsiu03 and @cite Mitzel09 .
pub trait FrameSource {
    #[doc(hidden)] fn as_raw_FrameSource(&self) -> *mut c_void;
    // identifier: cv_superres_FrameSource_nextFrame_Mat_frame
    fn next_frame(&mut self, frame: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_FrameSource_nextFrame_Mat_frame(self.as_raw_FrameSource(), frame.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_superres_FrameSource_reset
    fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_FrameSource_reset(self.as_raw_FrameSource()) }.into_result()
    }
    
}

impl<'a> FrameSource + 'a {

}

// Generating impl for trait cv::superres::SuperResolution (trait)
/// Base class for Super Resolution algorithms.
/// 
/// The class is only used to define the common interface for the whole family of Super Resolution
/// algorithms.
pub trait SuperResolution : core::Algorithm + core::FrameSource {
    #[doc(hidden)] fn as_raw_SuperResolution(&self) -> *mut c_void;
    // identifier: cv_superres_SuperResolution_setInput_PtrOfFrameSource_frameSource
    /// Set input frame source for Super Resolution algorithm.
    /// 
    /// ## Parameters
    /// * frameSource: Input frame source
    fn set_input(&mut self, frame_source: &types::PtrOfFrameSource) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setInput_PtrOfFrameSource_frameSource(self.as_raw_SuperResolution(), frame_source.as_raw_PtrOfFrameSource()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_nextFrame_Mat_frame
    /// Process next frame from input and return output result.
    /// 
    /// ## Parameters
    /// * frame: Output result
    fn next_frame(&mut self, frame: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_nextFrame_Mat_frame(self.as_raw_SuperResolution(), frame.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_reset
    fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_reset(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_collectGarbage
    /// Clear all inner buffers.
    fn collect_garbage(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_collectGarbage(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getScale_const
    /// @see setScale
    fn get_scale(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getScale_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setScale_int_val
    /// @copybrief getScale @see getScale
    fn set_scale(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setScale_int_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getIterations_const
    /// @see setIterations
    fn get_iterations(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getIterations_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setIterations_int_val
    /// @copybrief getIterations @see getIterations
    fn set_iterations(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setIterations_int_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getTau_const
    /// @see setTau
    fn get_tau(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getTau_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setTau_double_val
    /// @copybrief getTau @see getTau
    fn set_tau(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setTau_double_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getLabmda_const
    /// @see setLabmda
    fn get_labmda(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getLabmda_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setLabmda_double_val
    /// @copybrief getLabmda @see getLabmda
    fn set_labmda(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setLabmda_double_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getAlpha_const
    /// @see setAlpha
    fn get_alpha(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getAlpha_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setAlpha_double_val
    /// @copybrief getAlpha @see getAlpha
    fn set_alpha(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setAlpha_double_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getKernelSize_const
    /// @see setKernelSize
    fn get_kernel_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getKernelSize_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setKernelSize_int_val
    /// @copybrief getKernelSize @see getKernelSize
    fn set_kernel_size(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setKernelSize_int_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getBlurKernelSize_const
    /// @see setBlurKernelSize
    fn get_blur_kernel_size(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getBlurKernelSize_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setBlurKernelSize_int_val
    /// @copybrief getBlurKernelSize @see getBlurKernelSize
    fn set_blur_kernel_size(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setBlurKernelSize_int_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getBlurSigma_const
    /// @see setBlurSigma
    fn get_blur_sigma(&self) -> Result<f64> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getBlurSigma_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setBlurSigma_double_val
    /// @copybrief getBlurSigma @see getBlurSigma
    fn set_blur_sigma(&mut self, val: f64) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setBlurSigma_double_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_getTemporalAreaRadius_const
    /// @see setTemporalAreaRadius
    fn get_temporal_area_radius(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_getTemporalAreaRadius_const(self.as_raw_SuperResolution()) }.into_result()
    }
    
    // identifier: cv_superres_SuperResolution_setTemporalAreaRadius_int_val
    /// @copybrief getTemporalAreaRadius @see getTemporalAreaRadius
    fn set_temporal_area_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_superres_SuperResolution_setTemporalAreaRadius_int_val(self.as_raw_SuperResolution(), val) }.into_result()
    }
    
}

impl<'a> SuperResolution + 'a {

}

// boxed class cv::videostab::ColorAverageInpainter
#[allow(dead_code)]
pub struct ColorAverageInpainter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ColorAverageInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ColorAverageInpainter(self.ptr) };
    }
}
impl core::ColorAverageInpainter {
    #[doc(hidden)] pub fn as_raw_ColorAverageInpainter(&self) -> *mut c_void { self.ptr }
}

impl core::InpainterBase for ColorAverageInpainter {
    #[doc(hidden)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl ColorAverageInpainter {

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

// boxed class cv::videostab::ColorInpainter
#[allow(dead_code)]
pub struct ColorInpainter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ColorInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ColorInpainter(self.ptr) };
    }
}
impl core::ColorInpainter {
    #[doc(hidden)] pub fn as_raw_ColorInpainter(&self) -> *mut c_void { self.ptr }
}

impl core::InpainterBase for ColorInpainter {
    #[doc(hidden)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl ColorInpainter {

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

// boxed class cv::videostab::ConsistentMosaicInpainter
#[allow(dead_code)]
pub struct ConsistentMosaicInpainter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ConsistentMosaicInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ConsistentMosaicInpainter(self.ptr) };
    }
}
impl core::ConsistentMosaicInpainter {
    #[doc(hidden)] pub fn as_raw_ConsistentMosaicInpainter(&self) -> *mut c_void { self.ptr }
}

impl core::InpainterBase for ConsistentMosaicInpainter {
    #[doc(hidden)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl ConsistentMosaicInpainter {

    // identifier: cv_videostab_ConsistentMosaicInpainter_ConsistentMosaicInpainter
    pub fn new() -> Result<core::ConsistentMosaicInpainter> {
        unsafe { sys::cv_core_cv_videostab_ConsistentMosaicInpainter_ConsistentMosaicInpainter() }.into_result().map(|x| core::ConsistentMosaicInpainter { ptr: x })
    }
    
    // identifier: cv_videostab_ConsistentMosaicInpainter_setStdevThresh_float_val
    pub fn set_stdev_thresh(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_ConsistentMosaicInpainter_setStdevThresh_float_val(self.as_raw_ConsistentMosaicInpainter(), val) }.into_result()
    }
    
    // identifier: cv_videostab_ConsistentMosaicInpainter_stdevThresh_const
    pub fn stdev_thresh(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_ConsistentMosaicInpainter_stdevThresh_const(self.as_raw_ConsistentMosaicInpainter()) }.into_result()
    }
    
    // identifier: cv_videostab_ConsistentMosaicInpainter_inpaint_int_idx_Mat_frame_Mat_mask
    pub fn inpaint(&mut self, idx: i32, frame: &core::Mat, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_ConsistentMosaicInpainter_inpaint_int_idx_Mat_frame_Mat_mask(self.as_raw_ConsistentMosaicInpainter(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// Generating impl for trait cv::videostab::DeblurerBase (trait)
pub trait DeblurerBase {
    #[doc(hidden)] fn as_raw_DeblurerBase(&self) -> *mut c_void;
    // identifier: cv_videostab_DeblurerBase_setRadius_int_val
    fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_setRadius_int_val(self.as_raw_DeblurerBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_DeblurerBase_radius_const
    fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_radius_const(self.as_raw_DeblurerBase()) }.into_result()
    }
    
    // identifier: cv_videostab_DeblurerBase_deblur_int_idx_Mat_frame
    fn deblur(&mut self, idx: i32, frame: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_deblur_int_idx_Mat_frame(self.as_raw_DeblurerBase(), idx, frame.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_videostab_DeblurerBase_setFrames_VectorOfMat_val
    fn set_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_setFrames_VectorOfMat_val(self.as_raw_DeblurerBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_DeblurerBase_frames_const
    fn frames(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_frames_const(self.as_raw_DeblurerBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_videostab_DeblurerBase_setMotions_VectorOfMat_val
    fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_setMotions_VectorOfMat_val(self.as_raw_DeblurerBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_DeblurerBase_motions_const
    fn motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_motions_const(self.as_raw_DeblurerBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_videostab_DeblurerBase_setBlurrinessRates_VectorOffloat_val
    fn set_blurriness_rates(&mut self, val: &types::VectorOffloat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_setBlurrinessRates_VectorOffloat_val(self.as_raw_DeblurerBase(), val.as_raw_VectorOffloat()) }.into_result()
    }
    
    // identifier: cv_videostab_DeblurerBase_blurrinessRates_const
    fn blurriness_rates(&self) -> Result<types::VectorOffloat> {
        unsafe { sys::cv_core_cv_videostab_DeblurerBase_blurrinessRates_const(self.as_raw_DeblurerBase()) }.into_result().map(|x| types::VectorOffloat { ptr: x })
    }
    
}

impl<'a> DeblurerBase + 'a {

}

// boxed class cv::videostab::FastMarchingMethod
/// Describes the Fast Marching Method implementation.
/// 
/// See http://iwi.eldoc.ub.rug.nl/FILES/root/2004/JGraphToolsTelea/2004JGraphToolsTelea.pdf
#[allow(dead_code)]
pub struct FastMarchingMethod {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::FastMarchingMethod {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_FastMarchingMethod(self.ptr) };
    }
}
impl core::FastMarchingMethod {
    #[doc(hidden)] pub fn as_raw_FastMarchingMethod(&self) -> *mut c_void { self.ptr }
}

impl FastMarchingMethod {

    // identifier: cv_videostab_FastMarchingMethod_distanceMap_const
    /// @return Distance map that's created during working of the method.
    pub fn distance_map(&self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_videostab_FastMarchingMethod_distanceMap_const(self.as_raw_FastMarchingMethod()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// boxed class cv::videostab::FromFileMotionReader
#[allow(dead_code)]
pub struct FromFileMotionReader {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::FromFileMotionReader {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_FromFileMotionReader(self.ptr) };
    }
}
impl core::FromFileMotionReader {
    #[doc(hidden)] pub fn as_raw_FromFileMotionReader(&self) -> *mut c_void { self.ptr }
}

impl core::ImageMotionEstimatorBase for FromFileMotionReader {
    #[doc(hidden)] fn as_raw_ImageMotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl FromFileMotionReader {

    // identifier: cv_videostab_FromFileMotionReader_FromFileMotionReader_String_path
    pub fn new(path: &str) -> Result<core::FromFileMotionReader> {
        string_arg!(path);
        unsafe { sys::cv_core_cv_videostab_FromFileMotionReader_FromFileMotionReader_String_path(path.as_ptr()) }.into_result().map(|x| core::FromFileMotionReader { ptr: x })
    }
    
    // identifier: cv_videostab_FromFileMotionReader_estimate_Mat_frame0_Mat_frame1_bool_X_ok
    ///
    /// ## 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_core_cv_videostab_FromFileMotionReader_estimate_Mat_frame0_Mat_frame1_bool_X_ok(self.as_raw_FromFileMotionReader(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), ok) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// boxed class cv::videostab::GaussianMotionFilter
#[allow(dead_code)]
pub struct GaussianMotionFilter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::GaussianMotionFilter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_GaussianMotionFilter(self.ptr) };
    }
}
impl core::GaussianMotionFilter {
    #[doc(hidden)] pub fn as_raw_GaussianMotionFilter(&self) -> *mut c_void { self.ptr }
}

impl core::IMotionStabilizer for GaussianMotionFilter {
    #[doc(hidden)] fn as_raw_IMotionStabilizer(&self) -> *mut c_void { self.ptr }
}

impl core::MotionFilterBase for GaussianMotionFilter {
    #[doc(hidden)] fn as_raw_MotionFilterBase(&self) -> *mut c_void { self.ptr }
}

impl GaussianMotionFilter {

    // identifier: cv_videostab_GaussianMotionFilter_GaussianMotionFilter_int_radius_float_stdev
    ///
    /// ## C++ default parameters:
    /// * radius: 15
    /// * stdev: -1.f
    pub fn new(radius: i32, stdev: f32) -> Result<core::GaussianMotionFilter> {
        unsafe { sys::cv_core_cv_videostab_GaussianMotionFilter_GaussianMotionFilter_int_radius_float_stdev(radius, stdev) }.into_result().map(|x| core::GaussianMotionFilter { ptr: x })
    }
    
    // identifier: cv_videostab_GaussianMotionFilter_setParams_int_radius_float_stdev
    ///
    /// ## C++ default parameters:
    /// * stdev: -1.f
    pub fn set_params(&mut self, radius: i32, stdev: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_GaussianMotionFilter_setParams_int_radius_float_stdev(self.as_raw_GaussianMotionFilter(), radius, stdev) }.into_result()
    }
    
    // identifier: cv_videostab_GaussianMotionFilter_radius_const
    pub fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_GaussianMotionFilter_radius_const(self.as_raw_GaussianMotionFilter()) }.into_result()
    }
    
    // identifier: cv_videostab_GaussianMotionFilter_stdev_const
    pub fn stdev(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_GaussianMotionFilter_stdev_const(self.as_raw_GaussianMotionFilter()) }.into_result()
    }
    
    // identifier: cv_videostab_GaussianMotionFilter_GaussianMotionFilter_int__radius_float__stdev
    pub fn new_1(_radius: i32, _stdev: f32) -> Result<core::GaussianMotionFilter> {
        unsafe { sys::cv_core_cv_videostab_GaussianMotionFilter_GaussianMotionFilter_int__radius_float__stdev(_radius, _stdev) }.into_result().map(|x| core::GaussianMotionFilter { ptr: x })
    }
    
}

// Generating impl for trait cv::videostab::IDenseOptFlowEstimator (trait)
pub trait IDenseOptFlowEstimator {
    #[doc(hidden)] fn as_raw_IDenseOptFlowEstimator(&self) -> *mut c_void;
    // identifier: cv_videostab_IDenseOptFlowEstimator_run_Mat_frame0_Mat_frame1_Mat_flowX_Mat_flowY_Mat_errors
    fn run(&mut self, frame0: &core::Mat, frame1: &core::Mat, flow_x: &mut core::Mat, flow_y: &mut core::Mat, errors: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_IDenseOptFlowEstimator_run_Mat_frame0_Mat_frame1_Mat_flowX_Mat_flowY_Mat_errors(self.as_raw_IDenseOptFlowEstimator(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), flow_x.as_raw_Mat(), flow_y.as_raw_Mat(), errors.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> IDenseOptFlowEstimator + 'a {

}

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

impl<'a> IFrameSource + 'a {

}

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

impl<'a> ILog + 'a {

}

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

impl<'a> IMotionStabilizer + 'a {

}

// Generating impl for trait cv::videostab::IOutlierRejector (trait)
pub trait IOutlierRejector {
    #[doc(hidden)] fn as_raw_IOutlierRejector(&self) -> *mut c_void;
    // identifier: cv_videostab_IOutlierRejector_process_Size_frameSize_Mat_points0_Mat_points1_Mat_mask
    fn process(&mut self, frame_size: core::Size, points0: &core::Mat, points1: &core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_IOutlierRejector_process_Size_frameSize_Mat_points0_Mat_points1_Mat_mask(self.as_raw_IOutlierRejector(), frame_size, points0.as_raw_Mat(), points1.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> IOutlierRejector + 'a {

}

// Generating impl for trait cv::videostab::ISparseOptFlowEstimator (trait)
pub trait ISparseOptFlowEstimator {
    #[doc(hidden)] fn as_raw_ISparseOptFlowEstimator(&self) -> *mut c_void;
    // identifier: cv_videostab_ISparseOptFlowEstimator_run_Mat_frame0_Mat_frame1_Mat_points0_Mat_points1_Mat_status_Mat_errors
    fn run(&mut self, frame0: &core::Mat, frame1: &core::Mat, points0: &core::Mat, points1: &mut core::Mat, status: &mut core::Mat, errors: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_ISparseOptFlowEstimator_run_Mat_frame0_Mat_frame1_Mat_points0_Mat_points1_Mat_status_Mat_errors(self.as_raw_ISparseOptFlowEstimator(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), points0.as_raw_Mat(), points1.as_raw_Mat(), status.as_raw_Mat(), errors.as_raw_Mat()) }.into_result()
    }
    
}

impl<'a> ISparseOptFlowEstimator + 'a {

}

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

impl<'a> ImageMotionEstimatorBase + 'a {

}

// Generating impl for trait cv::videostab::InpainterBase (trait)
pub trait InpainterBase {
    #[doc(hidden)] fn as_raw_InpainterBase(&self) -> *mut c_void;
    // identifier: cv_videostab_InpainterBase_setRadius_int_val
    fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_setRadius_int_val(self.as_raw_InpainterBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_InpainterBase_radius_const
    fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_radius_const(self.as_raw_InpainterBase()) }.into_result()
    }
    
    // identifier: cv_videostab_InpainterBase_inpaint_int_idx_Mat_frame_Mat_mask
    fn inpaint(&mut self, idx: i32, frame: &core::Mat, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_inpaint_int_idx_Mat_frame_Mat_mask(self.as_raw_InpainterBase(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpainterBase_setFrames_VectorOfMat_val
    fn set_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_setFrames_VectorOfMat_val(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpainterBase_frames_const
    fn frames(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_frames_const(self.as_raw_InpainterBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_videostab_InpainterBase_setMotions_VectorOfMat_val
    fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_setMotions_VectorOfMat_val(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpainterBase_motions_const
    fn motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_motions_const(self.as_raw_InpainterBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_videostab_InpainterBase_setStabilizedFrames_VectorOfMat_val
    fn set_stabilized_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_setStabilizedFrames_VectorOfMat_val(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpainterBase_stabilizedFrames_const
    fn stabilized_frames(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_stabilizedFrames_const(self.as_raw_InpainterBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_videostab_InpainterBase_setStabilizationMotions_VectorOfMat_val
    fn set_stabilization_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_setStabilizationMotions_VectorOfMat_val(self.as_raw_InpainterBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpainterBase_stabilizationMotions_const
    fn stabilization_motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_InpainterBase_stabilizationMotions_const(self.as_raw_InpainterBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
}

impl<'a> InpainterBase + 'a {

}

// boxed class cv::videostab::InpaintingPipeline
#[allow(dead_code)]
pub struct InpaintingPipeline {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::InpaintingPipeline {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_InpaintingPipeline(self.ptr) };
    }
}
impl core::InpaintingPipeline {
    #[doc(hidden)] pub fn as_raw_InpaintingPipeline(&self) -> *mut c_void { self.ptr }
}

impl core::InpainterBase for InpaintingPipeline {
    #[doc(hidden)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl InpaintingPipeline {

    // identifier: cv_videostab_InpaintingPipeline_pushBack_PtrOfInpainterBase_inpainter
    pub fn push_back(&mut self, inpainter: &types::PtrOfInpainterBase) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_pushBack_PtrOfInpainterBase_inpainter(self.as_raw_InpaintingPipeline(), inpainter.as_raw_PtrOfInpainterBase()) }.into_result()
    }
    
    // identifier: cv_videostab_InpaintingPipeline_empty_const
    pub fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_empty_const(self.as_raw_InpaintingPipeline()) }.into_result()
    }
    
    // identifier: cv_videostab_InpaintingPipeline_setRadius_int_val
    pub fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_setRadius_int_val(self.as_raw_InpaintingPipeline(), val) }.into_result()
    }
    
    // identifier: cv_videostab_InpaintingPipeline_setFrames_VectorOfMat_val
    pub fn set_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_setFrames_VectorOfMat_val(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpaintingPipeline_setMotions_VectorOfMat_val
    pub fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_setMotions_VectorOfMat_val(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpaintingPipeline_setStabilizedFrames_VectorOfMat_val
    pub fn set_stabilized_frames(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_setStabilizedFrames_VectorOfMat_val(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpaintingPipeline_setStabilizationMotions_VectorOfMat_val
    pub fn set_stabilization_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_setStabilizationMotions_VectorOfMat_val(self.as_raw_InpaintingPipeline(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_InpaintingPipeline_inpaint_int_idx_Mat_frame_Mat_mask
    pub fn inpaint(&mut self, idx: i32, frame: &core::Mat, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_InpaintingPipeline_inpaint_int_idx_Mat_frame_Mat_mask(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.
#[allow(dead_code)]
pub struct KeypointBasedMotionEstimator {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::KeypointBasedMotionEstimator {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_KeypointBasedMotionEstimator(self.ptr) };
    }
}
impl core::KeypointBasedMotionEstimator {
    #[doc(hidden)] pub fn as_raw_KeypointBasedMotionEstimator(&self) -> *mut c_void { self.ptr }
}

impl core::ImageMotionEstimatorBase for KeypointBasedMotionEstimator {
    #[doc(hidden)] fn as_raw_ImageMotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl KeypointBasedMotionEstimator {

    // identifier: cv_videostab_KeypointBasedMotionEstimator_KeypointBasedMotionEstimator_PtrOfMotionEstimatorBase_estimator
    pub fn new(estimator: &types::PtrOfMotionEstimatorBase) -> Result<core::KeypointBasedMotionEstimator> {
        unsafe { sys::cv_core_cv_videostab_KeypointBasedMotionEstimator_KeypointBasedMotionEstimator_PtrOfMotionEstimatorBase_estimator(estimator.as_raw_PtrOfMotionEstimatorBase()) }.into_result().map(|x| core::KeypointBasedMotionEstimator { ptr: x })
    }
    
    // identifier: cv_videostab_KeypointBasedMotionEstimator_setDetector_PtrOfFeature2D_val
    pub fn set_detector(&mut self, val: &types::PtrOfFeature2D) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_KeypointBasedMotionEstimator_setDetector_PtrOfFeature2D_val(self.as_raw_KeypointBasedMotionEstimator(), val.as_raw_PtrOfFeature2D()) }.into_result()
    }
    
    // identifier: cv_videostab_KeypointBasedMotionEstimator_detector_const
    pub fn detector(&self) -> Result<types::PtrOfFeature2D> {
        unsafe { sys::cv_core_cv_videostab_KeypointBasedMotionEstimator_detector_const(self.as_raw_KeypointBasedMotionEstimator()) }.into_result().map(|x| types::PtrOfFeature2D { ptr: x })
    }
    
    // identifier: cv_videostab_KeypointBasedMotionEstimator_estimate_Mat_frame0_Mat_frame1_bool_X_ok
    ///
    /// ## 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_core_cv_videostab_KeypointBasedMotionEstimator_estimate_Mat_frame0_Mat_frame1_bool_X_ok(self.as_raw_KeypointBasedMotionEstimator(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), ok) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// boxed class cv::videostab::LogToStdout
#[allow(dead_code)]
pub struct LogToStdout {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::LogToStdout {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_LogToStdout(self.ptr) };
    }
}
impl core::LogToStdout {
    #[doc(hidden)] pub fn as_raw_LogToStdout(&self) -> *mut c_void { self.ptr }
}

impl core::ILog for LogToStdout {
    #[doc(hidden)] fn as_raw_ILog(&self) -> *mut c_void { self.ptr }
}

impl LogToStdout {

}

// boxed class cv::videostab::LpMotionStabilizer
#[allow(dead_code)]
pub struct LpMotionStabilizer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::LpMotionStabilizer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_LpMotionStabilizer(self.ptr) };
    }
}
impl core::LpMotionStabilizer {
    #[doc(hidden)] pub fn as_raw_LpMotionStabilizer(&self) -> *mut c_void { self.ptr }
}

impl core::IMotionStabilizer for LpMotionStabilizer {
    #[doc(hidden)] fn as_raw_IMotionStabilizer(&self) -> *mut c_void { self.ptr }
}

impl LpMotionStabilizer {

    // identifier: cv_videostab_LpMotionStabilizer_setFrameSize_Size_val
    pub fn set_frame_size(&mut self, val: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_setFrameSize_Size_val(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_frameSize_const
    pub fn frame_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_frameSize_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_setTrimRatio_float_val
    pub fn set_trim_ratio(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_setTrimRatio_float_val(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_trimRatio_const
    pub fn trim_ratio(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_trimRatio_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_setWeight1_float_val
    pub fn set_weight1(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_setWeight1_float_val(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_weight1_const
    pub fn weight1(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_weight1_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_setWeight2_float_val
    pub fn set_weight2(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_setWeight2_float_val(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_weight2_const
    pub fn weight2(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_weight2_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_setWeight3_float_val
    pub fn set_weight3(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_setWeight3_float_val(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_weight3_const
    pub fn weight3(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_weight3_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_setWeight4_float_val
    pub fn set_weight4(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_setWeight4_float_val(self.as_raw_LpMotionStabilizer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_LpMotionStabilizer_weight4_const
    pub fn weight4(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_LpMotionStabilizer_weight4_const(self.as_raw_LpMotionStabilizer()) }.into_result()
    }
    
}

// boxed class cv::videostab::MoreAccurateMotionWobbleSuppressor
#[allow(dead_code)]
pub struct MoreAccurateMotionWobbleSuppressor {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MoreAccurateMotionWobbleSuppressor {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MoreAccurateMotionWobbleSuppressor(self.ptr) };
    }
}
impl core::MoreAccurateMotionWobbleSuppressor {
    #[doc(hidden)] pub fn as_raw_MoreAccurateMotionWobbleSuppressor(&self) -> *mut c_void { self.ptr }
}

impl core::WobbleSuppressorBase for MoreAccurateMotionWobbleSuppressor {
    #[doc(hidden)] fn as_raw_WobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

impl core::MoreAccurateMotionWobbleSuppressorBase for MoreAccurateMotionWobbleSuppressor {
    #[doc(hidden)] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

impl MoreAccurateMotionWobbleSuppressor {

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

// Generating impl for trait cv::videostab::MoreAccurateMotionWobbleSuppressorBase (trait)
pub trait MoreAccurateMotionWobbleSuppressorBase : core::WobbleSuppressorBase {
    #[doc(hidden)] fn as_raw_MoreAccurateMotionWobbleSuppressorBase(&self) -> *mut c_void;
    // identifier: cv_videostab_MoreAccurateMotionWobbleSuppressorBase_setPeriod_int_val
    fn set_period(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_MoreAccurateMotionWobbleSuppressorBase_setPeriod_int_val(self.as_raw_MoreAccurateMotionWobbleSuppressorBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_MoreAccurateMotionWobbleSuppressorBase_period_const
    fn period(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_MoreAccurateMotionWobbleSuppressorBase_period_const(self.as_raw_MoreAccurateMotionWobbleSuppressorBase()) }.into_result()
    }
    
}

impl<'a> MoreAccurateMotionWobbleSuppressorBase + 'a {

}

// Generating impl for trait cv::videostab::MotionEstimatorBase (trait)
/// Base class for all global motion estimation methods.
pub trait MotionEstimatorBase {
    #[doc(hidden)] fn as_raw_MotionEstimatorBase(&self) -> *mut c_void;
    // identifier: cv_videostab_MotionEstimatorBase_estimate_Mat_points0_Mat_points1_bool_X_ok
    /// 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.
    /// @return 3x3 2D transformation matrix (32F).
    ///
    /// ## C++ default parameters:
    /// * ok: 0
    fn estimate(&mut self, points0: &core::Mat, points1: &core::Mat, ok: &mut bool) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_videostab_MotionEstimatorBase_estimate_Mat_points0_Mat_points1_bool_X_ok(self.as_raw_MotionEstimatorBase(), points0.as_raw_Mat(), points1.as_raw_Mat(), ok) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

impl<'a> MotionEstimatorBase + 'a {

}

// 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. :
#[allow(dead_code)]
pub struct MotionEstimatorL1 {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MotionEstimatorL1 {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MotionEstimatorL1(self.ptr) };
    }
}
impl core::MotionEstimatorL1 {
    #[doc(hidden)] pub fn as_raw_MotionEstimatorL1(&self) -> *mut c_void { self.ptr }
}

impl core::MotionEstimatorBase for MotionEstimatorL1 {
    #[doc(hidden)] fn as_raw_MotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl MotionEstimatorL1 {

    // identifier: cv_videostab_MotionEstimatorL1_estimate_Mat_points0_Mat_points1_bool_X_ok
    ///
    /// ## C++ default parameters:
    /// * ok: 0
    pub fn estimate(&mut self, points0: &core::Mat, points1: &core::Mat, ok: &mut bool) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_videostab_MotionEstimatorL1_estimate_Mat_points0_Mat_points1_bool_X_ok(self.as_raw_MotionEstimatorL1(), points0.as_raw_Mat(), points1.as_raw_Mat(), ok) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// boxed class cv::videostab::MotionEstimatorRansacL2
/// Describes a robust RANSAC-based global 2D motion estimation method which minimizes L2 error.
#[allow(dead_code)]
pub struct MotionEstimatorRansacL2 {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MotionEstimatorRansacL2 {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MotionEstimatorRansacL2(self.ptr) };
    }
}
impl core::MotionEstimatorRansacL2 {
    #[doc(hidden)] pub fn as_raw_MotionEstimatorRansacL2(&self) -> *mut c_void { self.ptr }
}

impl core::MotionEstimatorBase for MotionEstimatorRansacL2 {
    #[doc(hidden)] fn as_raw_MotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl MotionEstimatorRansacL2 {

    // identifier: cv_videostab_MotionEstimatorRansacL2_setMinInlierRatio_float_val
    pub fn set_min_inlier_ratio(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_MotionEstimatorRansacL2_setMinInlierRatio_float_val(self.as_raw_MotionEstimatorRansacL2(), val) }.into_result()
    }
    
    // identifier: cv_videostab_MotionEstimatorRansacL2_minInlierRatio_const
    pub fn min_inlier_ratio(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_MotionEstimatorRansacL2_minInlierRatio_const(self.as_raw_MotionEstimatorRansacL2()) }.into_result()
    }
    
    // identifier: cv_videostab_MotionEstimatorRansacL2_estimate_Mat_points0_Mat_points1_bool_X_ok
    ///
    /// ## C++ default parameters:
    /// * ok: 0
    pub fn estimate(&mut self, points0: &core::Mat, points1: &core::Mat, ok: &mut bool) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_videostab_MotionEstimatorRansacL2_estimate_Mat_points0_Mat_points1_bool_X_ok(self.as_raw_MotionEstimatorRansacL2(), points0.as_raw_Mat(), points1.as_raw_Mat(), ok) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// Generating impl for trait cv::videostab::MotionFilterBase (trait)
pub trait MotionFilterBase : core::IMotionStabilizer {
    #[doc(hidden)] fn as_raw_MotionFilterBase(&self) -> *mut c_void;
}

impl<'a> MotionFilterBase + 'a {

}

// boxed class cv::videostab::MotionInpainter
#[allow(dead_code)]
pub struct MotionInpainter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MotionInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MotionInpainter(self.ptr) };
    }
}
impl core::MotionInpainter {
    #[doc(hidden)] pub fn as_raw_MotionInpainter(&self) -> *mut c_void { self.ptr }
}

impl core::InpainterBase for MotionInpainter {
    #[doc(hidden)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl MotionInpainter {

    // identifier: cv_videostab_MotionInpainter_MotionInpainter
    pub fn new() -> Result<core::MotionInpainter> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_MotionInpainter() }.into_result().map(|x| core::MotionInpainter { ptr: x })
    }
    
    // identifier: cv_videostab_MotionInpainter_setFlowErrorThreshold_float_val
    pub fn set_flow_error_threshold(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_setFlowErrorThreshold_float_val(self.as_raw_MotionInpainter(), val) }.into_result()
    }
    
    // identifier: cv_videostab_MotionInpainter_flowErrorThreshold_const
    pub fn flow_error_threshold(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_flowErrorThreshold_const(self.as_raw_MotionInpainter()) }.into_result()
    }
    
    // identifier: cv_videostab_MotionInpainter_setDistThreshold_float_val
    pub fn set_dist_threshold(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_setDistThreshold_float_val(self.as_raw_MotionInpainter(), val) }.into_result()
    }
    
    // identifier: cv_videostab_MotionInpainter_distThresh_const
    pub fn dist_thresh(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_distThresh_const(self.as_raw_MotionInpainter()) }.into_result()
    }
    
    // identifier: cv_videostab_MotionInpainter_setBorderMode_int_val
    pub fn set_border_mode(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_setBorderMode_int_val(self.as_raw_MotionInpainter(), val) }.into_result()
    }
    
    // identifier: cv_videostab_MotionInpainter_borderMode_const
    pub fn border_mode(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_borderMode_const(self.as_raw_MotionInpainter()) }.into_result()
    }
    
    // identifier: cv_videostab_MotionInpainter_inpaint_int_idx_Mat_frame_Mat_mask
    pub fn inpaint(&mut self, idx: i32, frame: &core::Mat, mask: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_MotionInpainter_inpaint_int_idx_Mat_frame_Mat_mask(self.as_raw_MotionInpainter(), idx, frame.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::MotionStabilizationPipeline
#[allow(dead_code)]
pub struct MotionStabilizationPipeline {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::MotionStabilizationPipeline {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_MotionStabilizationPipeline(self.ptr) };
    }
}
impl core::MotionStabilizationPipeline {
    #[doc(hidden)] pub fn as_raw_MotionStabilizationPipeline(&self) -> *mut c_void { self.ptr }
}

impl core::IMotionStabilizer for MotionStabilizationPipeline {
    #[doc(hidden)] fn as_raw_IMotionStabilizer(&self) -> *mut c_void { self.ptr }
}

impl MotionStabilizationPipeline {

    // identifier: cv_videostab_MotionStabilizationPipeline_pushBack_PtrOfIMotionStabilizer_stabilizer
    pub fn push_back(&mut self, stabilizer: &types::PtrOfIMotionStabilizer) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_MotionStabilizationPipeline_pushBack_PtrOfIMotionStabilizer_stabilizer(self.as_raw_MotionStabilizationPipeline(), stabilizer.as_raw_PtrOfIMotionStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_MotionStabilizationPipeline_empty_const
    pub fn empty(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_videostab_MotionStabilizationPipeline_empty_const(self.as_raw_MotionStabilizationPipeline()) }.into_result()
    }
    
}

// boxed class cv::videostab::NullDeblurer
#[allow(dead_code)]
pub struct NullDeblurer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NullDeblurer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NullDeblurer(self.ptr) };
    }
}
impl core::NullDeblurer {
    #[doc(hidden)] pub fn as_raw_NullDeblurer(&self) -> *mut c_void { self.ptr }
}

impl core::DeblurerBase for NullDeblurer {
    #[doc(hidden)] fn as_raw_DeblurerBase(&self) -> *mut c_void { self.ptr }
}

impl NullDeblurer {

    // identifier: cv_videostab_NullDeblurer_deblur_int_unnamed_arg_Mat_unnamed_arg_1
    pub fn deblur(&mut self, unnamed_arg: i32, unnamed_arg_1: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_NullDeblurer_deblur_int_unnamed_arg_Mat_unnamed_arg_1(self.as_raw_NullDeblurer(), unnamed_arg, unnamed_arg_1.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::NullFrameSource
#[allow(dead_code)]
pub struct NullFrameSource {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NullFrameSource {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NullFrameSource(self.ptr) };
    }
}
impl core::NullFrameSource {
    #[doc(hidden)] pub fn as_raw_NullFrameSource(&self) -> *mut c_void { self.ptr }
}

impl core::IFrameSource for NullFrameSource {
    #[doc(hidden)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl NullFrameSource {

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

// boxed class cv::videostab::NullInpainter
#[allow(dead_code)]
pub struct NullInpainter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NullInpainter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NullInpainter(self.ptr) };
    }
}
impl core::NullInpainter {
    #[doc(hidden)] pub fn as_raw_NullInpainter(&self) -> *mut c_void { self.ptr }
}

impl core::InpainterBase for NullInpainter {
    #[doc(hidden)] fn as_raw_InpainterBase(&self) -> *mut c_void { self.ptr }
}

impl NullInpainter {

    // identifier: cv_videostab_NullInpainter_inpaint_int_unnamed_arg_Mat_unnamed_arg_1_Mat_unnamed_arg_2
    pub fn inpaint(&mut self, unnamed_arg: i32, unnamed_arg_1: &core::Mat, unnamed_arg_2: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_NullInpainter_inpaint_int_unnamed_arg_Mat_unnamed_arg_1_Mat_unnamed_arg_2(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
#[allow(dead_code)]
pub struct NullLog {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NullLog {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NullLog(self.ptr) };
    }
}
impl core::NullLog {
    #[doc(hidden)] pub fn as_raw_NullLog(&self) -> *mut c_void { self.ptr }
}

impl core::ILog for NullLog {
    #[doc(hidden)] fn as_raw_ILog(&self) -> *mut c_void { self.ptr }
}

impl NullLog {

}

// boxed class cv::videostab::NullOutlierRejector
#[allow(dead_code)]
pub struct NullOutlierRejector {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NullOutlierRejector {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NullOutlierRejector(self.ptr) };
    }
}
impl core::NullOutlierRejector {
    #[doc(hidden)] pub fn as_raw_NullOutlierRejector(&self) -> *mut c_void { self.ptr }
}

impl core::IOutlierRejector for NullOutlierRejector {
    #[doc(hidden)] fn as_raw_IOutlierRejector(&self) -> *mut c_void { self.ptr }
}

impl NullOutlierRejector {

    // identifier: cv_videostab_NullOutlierRejector_process_Size_frameSize_Mat_points0_Mat_points1_Mat_mask
    pub fn process(&mut self, frame_size: core::Size, points0: &core::Mat, points1: &core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_NullOutlierRejector_process_Size_frameSize_Mat_points0_Mat_points1_Mat_mask(self.as_raw_NullOutlierRejector(), frame_size, points0.as_raw_Mat(), points1.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::NullWobbleSuppressor
#[allow(dead_code)]
pub struct NullWobbleSuppressor {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::NullWobbleSuppressor {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_NullWobbleSuppressor(self.ptr) };
    }
}
impl core::NullWobbleSuppressor {
    #[doc(hidden)] pub fn as_raw_NullWobbleSuppressor(&self) -> *mut c_void { self.ptr }
}

impl core::WobbleSuppressorBase for NullWobbleSuppressor {
    #[doc(hidden)] fn as_raw_WobbleSuppressorBase(&self) -> *mut c_void { self.ptr }
}

impl NullWobbleSuppressor {

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

// boxed class cv::videostab::OnePassStabilizer
#[allow(dead_code)]
pub struct OnePassStabilizer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::OnePassStabilizer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_OnePassStabilizer(self.ptr) };
    }
}
impl core::OnePassStabilizer {
    #[doc(hidden)] pub fn as_raw_OnePassStabilizer(&self) -> *mut c_void { self.ptr }
}

impl core::IFrameSource for OnePassStabilizer {
    #[doc(hidden)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl core::StabilizerBase for OnePassStabilizer {
    #[doc(hidden)] fn as_raw_StabilizerBase(&self) -> *mut c_void { self.ptr }
}

impl OnePassStabilizer {

    // identifier: cv_videostab_OnePassStabilizer_OnePassStabilizer
    pub fn new() -> Result<core::OnePassStabilizer> {
        unsafe { sys::cv_core_cv_videostab_OnePassStabilizer_OnePassStabilizer() }.into_result().map(|x| core::OnePassStabilizer { ptr: x })
    }
    
    // identifier: cv_videostab_OnePassStabilizer_setMotionFilter_PtrOfMotionFilterBase_val
    pub fn set_motion_filter(&mut self, val: &types::PtrOfMotionFilterBase) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_OnePassStabilizer_setMotionFilter_PtrOfMotionFilterBase_val(self.as_raw_OnePassStabilizer(), val.as_raw_PtrOfMotionFilterBase()) }.into_result()
    }
    
    // identifier: cv_videostab_OnePassStabilizer_motionFilter_const
    pub fn motion_filter(&self) -> Result<types::PtrOfMotionFilterBase> {
        unsafe { sys::cv_core_cv_videostab_OnePassStabilizer_motionFilter_const(self.as_raw_OnePassStabilizer()) }.into_result().map(|x| types::PtrOfMotionFilterBase { ptr: x })
    }
    
    // identifier: cv_videostab_OnePassStabilizer_reset
    pub fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_OnePassStabilizer_reset(self.as_raw_OnePassStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_OnePassStabilizer_nextFrame
    pub fn next_frame(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_videostab_OnePassStabilizer_nextFrame(self.as_raw_OnePassStabilizer()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// Generating impl for trait cv::videostab::PyrLkOptFlowEstimatorBase (trait)
pub trait PyrLkOptFlowEstimatorBase {
    #[doc(hidden)] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *mut c_void;
    // identifier: cv_videostab_PyrLkOptFlowEstimatorBase_setWinSize_Size_val
    fn set_win_size(&mut self, val: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_PyrLkOptFlowEstimatorBase_setWinSize_Size_val(self.as_raw_PyrLkOptFlowEstimatorBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_PyrLkOptFlowEstimatorBase_winSize_const
    fn win_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_videostab_PyrLkOptFlowEstimatorBase_winSize_const(self.as_raw_PyrLkOptFlowEstimatorBase()) }.into_result()
    }
    
    // identifier: cv_videostab_PyrLkOptFlowEstimatorBase_setMaxLevel_int_val
    fn set_max_level(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_PyrLkOptFlowEstimatorBase_setMaxLevel_int_val(self.as_raw_PyrLkOptFlowEstimatorBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_PyrLkOptFlowEstimatorBase_maxLevel_const
    fn max_level(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_PyrLkOptFlowEstimatorBase_maxLevel_const(self.as_raw_PyrLkOptFlowEstimatorBase()) }.into_result()
    }
    
}

impl<'a> PyrLkOptFlowEstimatorBase + 'a {

}

// boxed class cv::videostab::RansacParams
/// Describes RANSAC method parameters.
#[allow(dead_code)]
pub struct RansacParams {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::RansacParams {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_RansacParams(self.ptr) };
    }
}
impl core::RansacParams {
    #[doc(hidden)] pub fn as_raw_RansacParams(&self) -> *mut c_void { self.ptr }
}

impl RansacParams {

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

// boxed class cv::videostab::SparsePyrLkOptFlowEstimator
#[allow(dead_code)]
pub struct SparsePyrLkOptFlowEstimator {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::SparsePyrLkOptFlowEstimator {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_SparsePyrLkOptFlowEstimator(self.ptr) };
    }
}
impl core::SparsePyrLkOptFlowEstimator {
    #[doc(hidden)] pub fn as_raw_SparsePyrLkOptFlowEstimator(&self) -> *mut c_void { self.ptr }
}

impl core::ISparseOptFlowEstimator for SparsePyrLkOptFlowEstimator {
    #[doc(hidden)] fn as_raw_ISparseOptFlowEstimator(&self) -> *mut c_void { self.ptr }
}

impl core::PyrLkOptFlowEstimatorBase for SparsePyrLkOptFlowEstimator {
    #[doc(hidden)] fn as_raw_PyrLkOptFlowEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl SparsePyrLkOptFlowEstimator {

    // identifier: cv_videostab_SparsePyrLkOptFlowEstimator_run_Mat_frame0_Mat_frame1_Mat_points0_Mat_points1_Mat_status_Mat_errors
    pub fn run(&mut self, frame0: &core::Mat, frame1: &core::Mat, points0: &core::Mat, points1: &mut core::Mat, status: &mut core::Mat, errors: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_SparsePyrLkOptFlowEstimator_run_Mat_frame0_Mat_frame1_Mat_points0_Mat_points1_Mat_status_Mat_errors(self.as_raw_SparsePyrLkOptFlowEstimator(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), points0.as_raw_Mat(), points1.as_raw_Mat(), status.as_raw_Mat(), errors.as_raw_Mat()) }.into_result()
    }
    
}

// Generating impl for trait cv::videostab::StabilizerBase (trait)
pub trait StabilizerBase {
    #[doc(hidden)] fn as_raw_StabilizerBase(&self) -> *mut c_void;
    // identifier: cv_videostab_StabilizerBase_setLog_PtrOfILog_ilog
    fn set_log(&mut self, ilog: &types::PtrOfILog) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setLog_PtrOfILog_ilog(self.as_raw_StabilizerBase(), ilog.as_raw_PtrOfILog()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_log_const
    fn log(&self) -> Result<types::PtrOfILog> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_log_const(self.as_raw_StabilizerBase()) }.into_result().map(|x| types::PtrOfILog { ptr: x })
    }
    
    // identifier: cv_videostab_StabilizerBase_setRadius_int_val
    fn set_radius(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setRadius_int_val(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_radius_const
    fn radius(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_radius_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_setFrameSource_PtrOfIFrameSource_val
    fn set_frame_source(&mut self, val: &types::PtrOfIFrameSource) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setFrameSource_PtrOfIFrameSource_val(self.as_raw_StabilizerBase(), val.as_raw_PtrOfIFrameSource()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_frameSource_const
    fn frame_source(&self) -> Result<types::PtrOfIFrameSource> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_frameSource_const(self.as_raw_StabilizerBase()) }.into_result().map(|x| types::PtrOfIFrameSource { ptr: x })
    }
    
    // identifier: cv_videostab_StabilizerBase_setMotionEstimator_PtrOfImageMotionEstimatorBase_val
    fn set_motion_estimator(&mut self, val: &types::PtrOfImageMotionEstimatorBase) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setMotionEstimator_PtrOfImageMotionEstimatorBase_val(self.as_raw_StabilizerBase(), val.as_raw_PtrOfImageMotionEstimatorBase()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_motionEstimator_const
    fn motion_estimator(&self) -> Result<types::PtrOfImageMotionEstimatorBase> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_motionEstimator_const(self.as_raw_StabilizerBase()) }.into_result().map(|x| types::PtrOfImageMotionEstimatorBase { ptr: x })
    }
    
    // identifier: cv_videostab_StabilizerBase_setDeblurer_PtrOfDeblurerBase_val
    fn set_deblurer(&mut self, val: &types::PtrOfDeblurerBase) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setDeblurer_PtrOfDeblurerBase_val(self.as_raw_StabilizerBase(), val.as_raw_PtrOfDeblurerBase()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_deblurrer_const
    fn deblurrer(&self) -> Result<types::PtrOfDeblurerBase> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_deblurrer_const(self.as_raw_StabilizerBase()) }.into_result().map(|x| types::PtrOfDeblurerBase { ptr: x })
    }
    
    // identifier: cv_videostab_StabilizerBase_setTrimRatio_float_val
    fn set_trim_ratio(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setTrimRatio_float_val(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_trimRatio_const
    fn trim_ratio(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_trimRatio_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_setCorrectionForInclusion_bool_val
    fn set_correction_for_inclusion(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setCorrectionForInclusion_bool_val(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_doCorrectionForInclusion_const
    fn do_correction_for_inclusion(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_doCorrectionForInclusion_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_setBorderMode_int_val
    fn set_border_mode(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setBorderMode_int_val(self.as_raw_StabilizerBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_borderMode_const
    fn border_mode(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_borderMode_const(self.as_raw_StabilizerBase()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_setInpainter_PtrOfInpainterBase_val
    fn set_inpainter(&mut self, val: &types::PtrOfInpainterBase) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_setInpainter_PtrOfInpainterBase_val(self.as_raw_StabilizerBase(), val.as_raw_PtrOfInpainterBase()) }.into_result()
    }
    
    // identifier: cv_videostab_StabilizerBase_inpainter_const
    fn inpainter(&self) -> Result<types::PtrOfInpainterBase> {
        unsafe { sys::cv_core_cv_videostab_StabilizerBase_inpainter_const(self.as_raw_StabilizerBase()) }.into_result().map(|x| types::PtrOfInpainterBase { ptr: x })
    }
    
}

impl<'a> StabilizerBase + 'a {

}

// boxed class cv::videostab::ToFileMotionWriter
#[allow(dead_code)]
pub struct ToFileMotionWriter {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::ToFileMotionWriter {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_ToFileMotionWriter(self.ptr) };
    }
}
impl core::ToFileMotionWriter {
    #[doc(hidden)] pub fn as_raw_ToFileMotionWriter(&self) -> *mut c_void { self.ptr }
}

impl core::ImageMotionEstimatorBase for ToFileMotionWriter {
    #[doc(hidden)] fn as_raw_ImageMotionEstimatorBase(&self) -> *mut c_void { self.ptr }
}

impl ToFileMotionWriter {

    // identifier: cv_videostab_ToFileMotionWriter_ToFileMotionWriter_String_path_PtrOfImageMotionEstimatorBase_estimator
    pub fn new(path: &str, estimator: &types::PtrOfImageMotionEstimatorBase) -> Result<core::ToFileMotionWriter> {
        string_arg!(path);
        unsafe { sys::cv_core_cv_videostab_ToFileMotionWriter_ToFileMotionWriter_String_path_PtrOfImageMotionEstimatorBase_estimator(path.as_ptr(), estimator.as_raw_PtrOfImageMotionEstimatorBase()) }.into_result().map(|x| core::ToFileMotionWriter { ptr: x })
    }
    
    // identifier: cv_videostab_ToFileMotionWriter_estimate_Mat_frame0_Mat_frame1_bool_X_ok
    ///
    /// ## 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_core_cv_videostab_ToFileMotionWriter_estimate_Mat_frame0_Mat_frame1_bool_X_ok(self.as_raw_ToFileMotionWriter(), frame0.as_raw_Mat(), frame1.as_raw_Mat(), ok) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// boxed class cv::videostab::TranslationBasedLocalOutlierRejector
#[allow(dead_code)]
pub struct TranslationBasedLocalOutlierRejector {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::TranslationBasedLocalOutlierRejector {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_TranslationBasedLocalOutlierRejector(self.ptr) };
    }
}
impl core::TranslationBasedLocalOutlierRejector {
    #[doc(hidden)] pub fn as_raw_TranslationBasedLocalOutlierRejector(&self) -> *mut c_void { self.ptr }
}

impl core::IOutlierRejector for TranslationBasedLocalOutlierRejector {
    #[doc(hidden)] fn as_raw_IOutlierRejector(&self) -> *mut c_void { self.ptr }
}

impl TranslationBasedLocalOutlierRejector {

    // identifier: cv_videostab_TranslationBasedLocalOutlierRejector_TranslationBasedLocalOutlierRejector
    pub fn new() -> Result<core::TranslationBasedLocalOutlierRejector> {
        unsafe { sys::cv_core_cv_videostab_TranslationBasedLocalOutlierRejector_TranslationBasedLocalOutlierRejector() }.into_result().map(|x| core::TranslationBasedLocalOutlierRejector { ptr: x })
    }
    
    // identifier: cv_videostab_TranslationBasedLocalOutlierRejector_setCellSize_Size_val
    pub fn set_cell_size(&mut self, val: core::Size) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_TranslationBasedLocalOutlierRejector_setCellSize_Size_val(self.as_raw_TranslationBasedLocalOutlierRejector(), val) }.into_result()
    }
    
    // identifier: cv_videostab_TranslationBasedLocalOutlierRejector_cellSize_const
    pub fn cell_size(&self) -> Result<core::Size> {
        unsafe { sys::cv_core_cv_videostab_TranslationBasedLocalOutlierRejector_cellSize_const(self.as_raw_TranslationBasedLocalOutlierRejector()) }.into_result()
    }
    
    // identifier: cv_videostab_TranslationBasedLocalOutlierRejector_process_Size_frameSize_Mat_points0_Mat_points1_Mat_mask
    pub fn process(&mut self, frame_size: core::Size, points0: &core::Mat, points1: &core::Mat, mask: &mut core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_TranslationBasedLocalOutlierRejector_process_Size_frameSize_Mat_points0_Mat_points1_Mat_mask(self.as_raw_TranslationBasedLocalOutlierRejector(), frame_size, points0.as_raw_Mat(), points1.as_raw_Mat(), mask.as_raw_Mat()) }.into_result()
    }
    
}

// boxed class cv::videostab::TwoPassStabilizer
#[allow(dead_code)]
pub struct TwoPassStabilizer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::TwoPassStabilizer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_TwoPassStabilizer(self.ptr) };
    }
}
impl core::TwoPassStabilizer {
    #[doc(hidden)] pub fn as_raw_TwoPassStabilizer(&self) -> *mut c_void { self.ptr }
}

impl core::IFrameSource for TwoPassStabilizer {
    #[doc(hidden)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl core::StabilizerBase for TwoPassStabilizer {
    #[doc(hidden)] fn as_raw_StabilizerBase(&self) -> *mut c_void { self.ptr }
}

impl TwoPassStabilizer {

    // identifier: cv_videostab_TwoPassStabilizer_TwoPassStabilizer
    pub fn new() -> Result<core::TwoPassStabilizer> {
        unsafe { sys::cv_core_cv_videostab_TwoPassStabilizer_TwoPassStabilizer() }.into_result().map(|x| core::TwoPassStabilizer { ptr: x })
    }
    
    // identifier: cv_videostab_TwoPassStabilizer_setMotionStabilizer_PtrOfIMotionStabilizer_val
    pub fn set_motion_stabilizer(&mut self, val: &types::PtrOfIMotionStabilizer) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_TwoPassStabilizer_setMotionStabilizer_PtrOfIMotionStabilizer_val(self.as_raw_TwoPassStabilizer(), val.as_raw_PtrOfIMotionStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_TwoPassStabilizer_motionStabilizer_const
    pub fn motion_stabilizer(&self) -> Result<types::PtrOfIMotionStabilizer> {
        unsafe { sys::cv_core_cv_videostab_TwoPassStabilizer_motionStabilizer_const(self.as_raw_TwoPassStabilizer()) }.into_result().map(|x| types::PtrOfIMotionStabilizer { ptr: x })
    }
    
    // identifier: cv_videostab_TwoPassStabilizer_setEstimateTrimRatio_bool_val
    pub fn set_estimate_trim_ratio(&mut self, val: bool) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_TwoPassStabilizer_setEstimateTrimRatio_bool_val(self.as_raw_TwoPassStabilizer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_TwoPassStabilizer_mustEstimateTrimaRatio_const
    pub fn must_estimate_trima_ratio(&self) -> Result<bool> {
        unsafe { sys::cv_core_cv_videostab_TwoPassStabilizer_mustEstimateTrimaRatio_const(self.as_raw_TwoPassStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_TwoPassStabilizer_reset
    pub fn reset(&mut self) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_TwoPassStabilizer_reset(self.as_raw_TwoPassStabilizer()) }.into_result()
    }
    
    // identifier: cv_videostab_TwoPassStabilizer_nextFrame
    pub fn next_frame(&mut self) -> Result<core::Mat> {
        unsafe { sys::cv_core_cv_videostab_TwoPassStabilizer_nextFrame(self.as_raw_TwoPassStabilizer()) }.into_result().map(|x| core::Mat { ptr: x })
    }
    
}

// boxed class cv::videostab::VideoFileSource
#[allow(dead_code)]
pub struct VideoFileSource {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::VideoFileSource {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_VideoFileSource(self.ptr) };
    }
}
impl core::VideoFileSource {
    #[doc(hidden)] pub fn as_raw_VideoFileSource(&self) -> *mut c_void { self.ptr }
}

impl core::IFrameSource for VideoFileSource {
    #[doc(hidden)] fn as_raw_IFrameSource(&self) -> *mut c_void { self.ptr }
}

impl VideoFileSource {

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

// boxed class cv::videostab::WeightingDeblurer
#[allow(dead_code)]
pub struct WeightingDeblurer {
    #[doc(hidden)] pub ptr: *mut c_void
}
impl Drop for core::WeightingDeblurer {
    fn drop(&mut self) {
        unsafe { sys::cv_delete_WeightingDeblurer(self.ptr) };
    }
}
impl core::WeightingDeblurer {
    #[doc(hidden)] pub fn as_raw_WeightingDeblurer(&self) -> *mut c_void { self.ptr }
}

impl core::DeblurerBase for WeightingDeblurer {
    #[doc(hidden)] fn as_raw_DeblurerBase(&self) -> *mut c_void { self.ptr }
}

impl WeightingDeblurer {

    // identifier: cv_videostab_WeightingDeblurer_WeightingDeblurer
    pub fn new() -> Result<core::WeightingDeblurer> {
        unsafe { sys::cv_core_cv_videostab_WeightingDeblurer_WeightingDeblurer() }.into_result().map(|x| core::WeightingDeblurer { ptr: x })
    }
    
    // identifier: cv_videostab_WeightingDeblurer_setSensitivity_float_val
    pub fn set_sensitivity(&mut self, val: f32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WeightingDeblurer_setSensitivity_float_val(self.as_raw_WeightingDeblurer(), val) }.into_result()
    }
    
    // identifier: cv_videostab_WeightingDeblurer_sensitivity_const
    pub fn sensitivity(&self) -> Result<f32> {
        unsafe { sys::cv_core_cv_videostab_WeightingDeblurer_sensitivity_const(self.as_raw_WeightingDeblurer()) }.into_result()
    }
    
    // identifier: cv_videostab_WeightingDeblurer_deblur_int_idx_Mat_frame
    pub fn deblur(&mut self, idx: i32, frame: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WeightingDeblurer_deblur_int_idx_Mat_frame(self.as_raw_WeightingDeblurer(), idx, frame.as_raw_Mat()) }.into_result()
    }
    
}

// Generating impl for trait cv::videostab::WobbleSuppressorBase (trait)
pub trait WobbleSuppressorBase {
    #[doc(hidden)] fn as_raw_WobbleSuppressorBase(&self) -> *mut c_void;
    // identifier: cv_videostab_WobbleSuppressorBase_setMotionEstimator_PtrOfImageMotionEstimatorBase_val
    fn set_motion_estimator(&mut self, val: &types::PtrOfImageMotionEstimatorBase) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_setMotionEstimator_PtrOfImageMotionEstimatorBase_val(self.as_raw_WobbleSuppressorBase(), val.as_raw_PtrOfImageMotionEstimatorBase()) }.into_result()
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_motionEstimator_const
    fn motion_estimator(&self) -> Result<types::PtrOfImageMotionEstimatorBase> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_motionEstimator_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|x| types::PtrOfImageMotionEstimatorBase { ptr: x })
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_suppress_int_idx_Mat_frame_Mat_result
    fn suppress(&mut self, idx: i32, frame: &core::Mat, result: &core::Mat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_suppress_int_idx_Mat_frame_Mat_result(self.as_raw_WobbleSuppressorBase(), idx, frame.as_raw_Mat(), result.as_raw_Mat()) }.into_result()
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_setFrameCount_int_val
    fn set_frame_count(&mut self, val: i32) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_setFrameCount_int_val(self.as_raw_WobbleSuppressorBase(), val) }.into_result()
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_frameCount_const
    fn frame_count(&self) -> Result<i32> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_frameCount_const(self.as_raw_WobbleSuppressorBase()) }.into_result()
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_setMotions_VectorOfMat_val
    fn set_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_setMotions_VectorOfMat_val(self.as_raw_WobbleSuppressorBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_motions_const
    fn motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_motions_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_setMotions2_VectorOfMat_val
    fn set_motions2(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_setMotions2_VectorOfMat_val(self.as_raw_WobbleSuppressorBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_motions2_const
    fn motions2(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_motions2_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_setStabilizationMotions_VectorOfMat_val
    fn set_stabilization_motions(&mut self, val: &types::VectorOfMat) -> Result<()> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_setStabilizationMotions_VectorOfMat_val(self.as_raw_WobbleSuppressorBase(), val.as_raw_VectorOfMat()) }.into_result()
    }
    
    // identifier: cv_videostab_WobbleSuppressorBase_stabilizationMotions_const
    fn stabilization_motions(&self) -> Result<types::VectorOfMat> {
        unsafe { sys::cv_core_cv_videostab_WobbleSuppressorBase_stabilizationMotions_const(self.as_raw_WobbleSuppressorBase()) }.into_result().map(|x| types::VectorOfMat { ptr: x })
    }
    
}

impl<'a> WobbleSuppressorBase + 'a {

}