opencv 0.94.4

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
pub mod ximgproc {
	//! # Extended Image Processing
	//!    # Structured forests for fast edge detection
	//!
	//!    This module contains implementations of modern structured edge detection algorithms,
	//!    i.e. algorithms which somehow takes into account pixel affinities in natural images.
	//!
	//!    # EdgeBoxes
	//!
	//!    # Filters
	//!
	//!    # Superpixels
	//!
	//!    # Image segmentation
	//!
	//!    # Fast line detector
	//!
	//!    # EdgeDrawing
	//!
	//!    EDGE DRAWING LIBRARY FOR GEOMETRIC FEATURE EXTRACTION AND VALIDATION
	//!
	//!    Edge Drawing (ED) algorithm is an proactive approach on edge detection problem. In contrast to many other existing edge detection algorithms which follow a subtractive
	//!    approach (i.e. after applying gradient filters onto an image eliminating pixels w.r.t. several rules, e.g. non-maximal suppression and hysteresis in Canny), ED algorithm
	//!    works via an additive strategy, i.e. it picks edge pixels one by one, hence the name Edge Drawing. Then we process those random shaped edge segments to extract higher level
	//!    edge features, i.e. lines, circles, ellipses, etc. The popular method of extraction edge pixels from the thresholded gradient magnitudes is non-maximal supression that tests
	//!    every pixel whether it has the maximum gradient response along its gradient direction and eliminates if it does not. However, this method does not check status of the
	//!    neighboring pixels, and therefore might result low quality (in terms of edge continuity, smoothness, thinness, localization) edge segments. Instead of non-maximal supression,
	//!    ED points a set of edge pixels and join them by maximizing the total gradient response of edge segments. Therefore it can extract high quality edge segments without need for
	//!    an additional hysteresis step.
	//!
	//!    # Fourier descriptors
	//!
	//!    # Binary morphology on run-length encoded image
	//!
	//!    These functions support morphological operations on binary images. In order to be fast and space efficient binary images are encoded with a run-length representation.
	//!    This representation groups continuous horizontal sequences of "on" pixels together in a "run". A run is charactarized by the column position of the first pixel in the run, the column
	//!    position of the last pixel in the run and the row position. This representation is very compact for binary images which contain large continuous areas of "on" and "off" pixels. A checkerboard
	//!    pattern would be a good example. The representation is not so suitable for binary images created from random noise images or other images where little correlation between neighboring pixels
	//!    exists.
	//!
	//!    The morphological operations supported here are very similar to the operations supported in the imgproc module. In general they are fast. However on several occasions they are slower than the functions
	//!    from imgproc. The structuring elements of cv::MORPH_RECT and cv::MORPH_CROSS have very good support from the imgproc module. Also small structuring elements are very fast in imgproc (presumably
	//!    due to opencl support). Therefore the functions from this module are recommended for larger structuring elements (cv::MORPH_ELLIPSE or self defined structuring elements). A sample application
	//!    (run_length_morphology_demo) is supplied which allows to compare the speed of some morphological operations for the functions using run-length encoding and the imgproc functions for a given image.
	//!
	//!    Run length encoded images are stored in standard opencv images. Images have a single column of cv::Point3i elements. The number of rows is the number of run + 1. The first row contains
	//!    the size of the original (not encoded) image.  For the runs the following mapping is used (x: column begin, y: column end (last column), z: row).
	//!
	//!    The size of the original image is required for compatibility with the imgproc functions when the boundary handling requires that pixel outside the image boundary are
	//!    "on".
	use crate::mod_prelude::*;
	use crate::{core, sys, types};
	pub mod prelude {
		pub use super::{AdaptiveManifoldFilterTrait, AdaptiveManifoldFilterTraitConst, ContourFittingTrait, ContourFittingTraitConst, DTFilterTrait, DTFilterTraitConst, DisparityFilterTrait, DisparityFilterTraitConst, DisparityWLSFilterTrait, DisparityWLSFilterTraitConst, EdgeAwareInterpolatorTrait, EdgeAwareInterpolatorTraitConst, EdgeBoxesTrait, EdgeBoxesTraitConst, EdgeDrawingTrait, EdgeDrawingTraitConst, FastBilateralSolverFilterTrait, FastBilateralSolverFilterTraitConst, FastGlobalSmootherFilterTrait, FastGlobalSmootherFilterTraitConst, FastLineDetectorTrait, FastLineDetectorTraitConst, GraphSegmentationTrait, GraphSegmentationTraitConst, GuidedFilterTrait, GuidedFilterTraitConst, RFFeatureGetterTrait, RFFeatureGetterTraitConst, RICInterpolatorTrait, RICInterpolatorTraitConst, RidgeDetectionFilterTrait, RidgeDetectionFilterTraitConst, ScanSegmentTrait, ScanSegmentTraitConst, SelectiveSearchSegmentationStrategyColorTrait, SelectiveSearchSegmentationStrategyColorTraitConst, SelectiveSearchSegmentationStrategyFillTrait, SelectiveSearchSegmentationStrategyFillTraitConst, SelectiveSearchSegmentationStrategyMultipleTrait, SelectiveSearchSegmentationStrategyMultipleTraitConst, SelectiveSearchSegmentationStrategySizeTrait, SelectiveSearchSegmentationStrategySizeTraitConst, SelectiveSearchSegmentationStrategyTextureTrait, SelectiveSearchSegmentationStrategyTextureTraitConst, SelectiveSearchSegmentationStrategyTrait, SelectiveSearchSegmentationStrategyTraitConst, SelectiveSearchSegmentationTrait, SelectiveSearchSegmentationTraitConst, SparseMatchInterpolatorTrait, SparseMatchInterpolatorTraitConst, StructuredEdgeDetectionTrait, StructuredEdgeDetectionTraitConst, SuperpixelLSCTrait, SuperpixelLSCTraitConst, SuperpixelSEEDSTrait, SuperpixelSEEDSTraitConst, SuperpixelSLICTrait, SuperpixelSLICTraitConst};
	}

	pub const AM_FILTER: i32 = 4;
	pub const ARO_0_45: i32 = 0;
	pub const ARO_315_0: i32 = 3;
	pub const ARO_315_135: i32 = 6;
	pub const ARO_315_45: i32 = 4;
	pub const ARO_45_135: i32 = 5;
	pub const ARO_45_90: i32 = 1;
	pub const ARO_90_135: i32 = 2;
	pub const ARO_CTR_HOR: i32 = 7;
	pub const ARO_CTR_VER: i32 = 8;
	/// Classic Niblack binarization. See [Niblack1985](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Niblack1985) .
	pub const BINARIZATION_NIBLACK: i32 = 0;
	/// NICK technique. See [Khurshid2009](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Khurshid2009) .
	pub const BINARIZATION_NICK: i32 = 3;
	/// Sauvola's technique. See [Sauvola1997](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Sauvola1997) .
	pub const BINARIZATION_SAUVOLA: i32 = 1;
	/// Wolf's technique. See [Wolf2004](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Wolf2004) .
	pub const BINARIZATION_WOLF: i32 = 2;
	pub const DTF_IC: i32 = 1;
	pub const DTF_NC: i32 = 0;
	pub const DTF_RF: i32 = 2;
	pub const EdgeDrawing_LSD: i32 = 3;
	pub const EdgeDrawing_PREWITT: i32 = 0;
	pub const EdgeDrawing_SCHARR: i32 = 2;
	pub const EdgeDrawing_SOBEL: i32 = 1;
	pub const FHT_ADD: i32 = 2;
	pub const FHT_AVE: i32 = 3;
	pub const FHT_MAX: i32 = 1;
	pub const FHT_MIN: i32 = 0;
	pub const GUIDED_FILTER: i32 = 3;
	pub const HDO_DESKEW: i32 = 1;
	pub const HDO_RAW: i32 = 0;
	pub const MSLIC: i32 = 102;
	/// Skip validations of image borders.
	pub const RO_IGNORE_BORDERS: i32 = 1;
	/// Validate each rule in a proper way.
	pub const RO_STRICT: i32 = 0;
	pub const SLIC: i32 = 100;
	pub const SLICO: i32 = 101;
	pub const THINNING_GUOHALL: i32 = 1;
	pub const THINNING_ZHANGSUEN: i32 = 0;
	/// ![inline formula](https://latex.codecogs.com/png.latex?dot%28I1%2CI2%29%2F%28%7CI1%7C%2A%7CI2%7C%29)
	pub const WMF_COS: i32 = 8;
	/// ![inline formula](https://latex.codecogs.com/png.latex?exp%28%2D%7CI1%2DI2%7C%5E2%2F%282%2Asigma%5E2%29%29)
	pub const WMF_EXP: i32 = 1;
	/// ![inline formula](https://latex.codecogs.com/png.latex?%28%7CI1%2DI2%7C%2Bsigma%29%5E%2D1)
	pub const WMF_IV1: i32 = 2;
	/// ![inline formula](https://latex.codecogs.com/png.latex?%28%7CI1%2DI2%7C%5E2%2Bsigma%5E2%29%5E%2D1)
	pub const WMF_IV2: i32 = 4;
	/// ![inline formula](https://latex.codecogs.com/png.latex?%28min%28r1%2Cr2%29%2Bmin%28g1%2Cg2%29%2Bmin%28b1%2Cb2%29%29%2F%28max%28r1%2Cr2%29%2Bmax%28g1%2Cg2%29%2Bmax%28b1%2Cb2%29%29)
	pub const WMF_JAC: i32 = 16;
	/// unweighted
	pub const WMF_OFF: i32 = 32;
	/// Specifies the part of Hough space to calculate
	/// @details The enum specifies the part of Hough space to calculate. Each
	/// member specifies primarily direction of lines (horizontal or vertical)
	/// and the direction of angle changes.
	/// Direction of angle changes is from multiples of 90 to odd multiples of 45.
	/// The image considered to be written top-down and left-to-right.
	/// Angles are started from vertical line and go clockwise.
	/// Separate quarters and halves are written in orientation they should be in
	/// full Hough space.
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum AngleRangeOption {
		ARO_0_45 = 0,
		ARO_45_90 = 1,
		ARO_90_135 = 2,
		ARO_315_0 = 3,
		ARO_315_45 = 4,
		ARO_45_135 = 5,
		ARO_315_135 = 6,
		ARO_CTR_HOR = 7,
		ARO_CTR_VER = 8,
	}

	impl TryFrom<i32> for AngleRangeOption {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::ARO_0_45),
				1 => Ok(Self::ARO_45_90),
				2 => Ok(Self::ARO_90_135),
				3 => Ok(Self::ARO_315_0),
				4 => Ok(Self::ARO_315_45),
				5 => Ok(Self::ARO_45_135),
				6 => Ok(Self::ARO_315_135),
				7 => Ok(Self::ARO_CTR_HOR),
				8 => Ok(Self::ARO_CTR_VER),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::AngleRangeOption"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::AngleRangeOption }

	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum EdgeAwareFiltersList {
		DTF_NC = 0,
		DTF_IC = 1,
		DTF_RF = 2,
		GUIDED_FILTER = 3,
		AM_FILTER = 4,
	}

	impl TryFrom<i32> for EdgeAwareFiltersList {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::DTF_NC),
				1 => Ok(Self::DTF_IC),
				2 => Ok(Self::DTF_RF),
				3 => Ok(Self::GUIDED_FILTER),
				4 => Ok(Self::AM_FILTER),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::EdgeAwareFiltersList"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::EdgeAwareFiltersList }

	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum EdgeDrawing_GradientOperator {
		PREWITT = 0,
		SOBEL = 1,
		SCHARR = 2,
		LSD = 3,
	}

	impl TryFrom<i32> for EdgeDrawing_GradientOperator {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::PREWITT),
				1 => Ok(Self::SOBEL),
				2 => Ok(Self::SCHARR),
				3 => Ok(Self::LSD),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::EdgeDrawing_GradientOperator"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::EdgeDrawing_GradientOperator }

	/// Specifies to do or not to do skewing of Hough transform image
	/// @details The enum specifies to do or not to do skewing of Hough transform image
	/// so it would be no cycling in Hough transform image through borders of image.
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum HoughDeskewOption {
		HDO_RAW = 0,
		HDO_DESKEW = 1,
	}

	impl TryFrom<i32> for HoughDeskewOption {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::HDO_RAW),
				1 => Ok(Self::HDO_DESKEW),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::HoughDeskewOption"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::HoughDeskewOption }

	/// Specifies binary operations.
	/// @details The enum specifies binary operations, that is such ones which involve
	///          two operands. Formally, a binary operation @f$ f @f$ on a set @f$ S @f$
	///          is a binary relation that maps elements of the Cartesian product
	///          @f$ S \times S @f$ to @f$ S @f$:
	///          @f[ f: S \times S \to S @f]
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum HoughOp {
		FHT_MIN = 0,
		FHT_MAX = 1,
		FHT_ADD = 2,
		FHT_AVE = 3,
	}

	impl TryFrom<i32> for HoughOp {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::FHT_MIN),
				1 => Ok(Self::FHT_MAX),
				2 => Ok(Self::FHT_ADD),
				3 => Ok(Self::FHT_AVE),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::HoughOp"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::HoughOp }

	/// Specifies the binarization method to use in cv::ximgproc::niBlackThreshold
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum LocalBinarizationMethods {
		/// Classic Niblack binarization. See [Niblack1985](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Niblack1985) .
		BINARIZATION_NIBLACK = 0,
		/// Sauvola's technique. See [Sauvola1997](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Sauvola1997) .
		BINARIZATION_SAUVOLA = 1,
		/// Wolf's technique. See [Wolf2004](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Wolf2004) .
		BINARIZATION_WOLF = 2,
		/// NICK technique. See [Khurshid2009](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Khurshid2009) .
		BINARIZATION_NICK = 3,
	}

	impl TryFrom<i32> for LocalBinarizationMethods {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::BINARIZATION_NIBLACK),
				1 => Ok(Self::BINARIZATION_SAUVOLA),
				2 => Ok(Self::BINARIZATION_WOLF),
				3 => Ok(Self::BINARIZATION_NICK),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::LocalBinarizationMethods"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::LocalBinarizationMethods }

	/// Specifies the degree of rules validation.
	/// @details The enum specifies the degree of rules validation. This can be used,
	///          for example, to choose a proper way of input arguments validation.
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum RulesOption {
		/// Validate each rule in a proper way.
		RO_STRICT = 0,
		/// Skip validations of image borders.
		RO_IGNORE_BORDERS = 1,
	}

	impl TryFrom<i32> for RulesOption {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::RO_STRICT),
				1 => Ok(Self::RO_IGNORE_BORDERS),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::RulesOption"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::RulesOption }

	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum SLICType {
		SLIC = 100,
		SLICO = 101,
		MSLIC = 102,
	}

	impl TryFrom<i32> for SLICType {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				100 => Ok(Self::SLIC),
				101 => Ok(Self::SLICO),
				102 => Ok(Self::MSLIC),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::SLICType"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::SLICType }

	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum ThinningTypes {
		THINNING_ZHANGSUEN = 0,
		THINNING_GUOHALL = 1,
	}

	impl TryFrom<i32> for ThinningTypes {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				0 => Ok(Self::THINNING_ZHANGSUEN),
				1 => Ok(Self::THINNING_GUOHALL),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::ThinningTypes"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::ThinningTypes }

	/// Specifies weight types of weighted median filter.
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum WMFWeightType {
		/// ![inline formula](https://latex.codecogs.com/png.latex?exp%28%2D%7CI1%2DI2%7C%5E2%2F%282%2Asigma%5E2%29%29)
		WMF_EXP = 1,
		/// ![inline formula](https://latex.codecogs.com/png.latex?%28%7CI1%2DI2%7C%2Bsigma%29%5E%2D1)
		WMF_IV1 = 2,
		/// ![inline formula](https://latex.codecogs.com/png.latex?%28%7CI1%2DI2%7C%5E2%2Bsigma%5E2%29%5E%2D1)
		WMF_IV2 = 4,
		/// ![inline formula](https://latex.codecogs.com/png.latex?dot%28I1%2CI2%29%2F%28%7CI1%7C%2A%7CI2%7C%29)
		WMF_COS = 8,
		/// ![inline formula](https://latex.codecogs.com/png.latex?%28min%28r1%2Cr2%29%2Bmin%28g1%2Cg2%29%2Bmin%28b1%2Cb2%29%29%2F%28max%28r1%2Cr2%29%2Bmax%28g1%2Cg2%29%2Bmax%28b1%2Cb2%29%29)
		WMF_JAC = 16,
		/// unweighted
		WMF_OFF = 32,
	}

	impl TryFrom<i32> for WMFWeightType {
		type Error = crate::Error;

		fn try_from(value: i32) -> Result<Self, Self::Error> {
			match value {
				1 => Ok(Self::WMF_EXP),
				2 => Ok(Self::WMF_IV1),
				4 => Ok(Self::WMF_IV2),
				8 => Ok(Self::WMF_COS),
				16 => Ok(Self::WMF_JAC),
				32 => Ok(Self::WMF_OFF),
				_ => Err(crate::Error::new(crate::core::StsBadArg, format!("Value: {value} is not valid for enum: crate::ximgproc::WMFWeightType"))),
			}
		}
	}

	opencv_type_enum! { crate::ximgproc::WMFWeightType }

	pub type Boxes = core::Vector<crate::ximgproc::Box>;
	/// ## Note
	/// This alternative version of [bright_edges] function uses the following default values for its arguments:
	/// * contrast: 1
	/// * shortrange: 3
	/// * longrange: 9
	#[inline]
	pub fn bright_edges_def(_original: &mut impl core::MatTrait, _edgeview: &mut impl core::MatTrait) -> Result<()> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_BrightEdges_MatR_MatR(_original.as_raw_mut_Mat(), _edgeview.as_raw_mut_Mat(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// ## C++ default parameters
	/// * contrast: 1
	/// * shortrange: 3
	/// * longrange: 9
	#[inline]
	pub fn bright_edges(_original: &mut impl core::MatTrait, _edgeview: &mut impl core::MatTrait, contrast: i32, shortrange: i32, longrange: i32) -> Result<()> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_BrightEdges_MatR_MatR_int_int_int(_original.as_raw_mut_Mat(), _edgeview.as_raw_mut_Mat(), contrast, shortrange, longrange, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculates 2D Fast Hough transform of an image.
	/// ## Parameters
	/// * dst: The destination image, result of transformation.
	/// * src: The source (input) image.
	/// * dstMatDepth: The depth of destination image
	/// * op: The operation to be applied, see cv::HoughOp
	/// * angleRange: The part of Hough space to calculate, see cv::AngleRangeOption
	/// * makeSkew: Specifies to do or not to do image skewing, see cv::HoughDeskewOption
	///
	/// The function calculates the fast Hough transform for full, half or quarter
	/// range of angles.
	///
	/// ## Note
	/// This alternative version of [fast_hough_transform] function uses the following default values for its arguments:
	/// * angle_range: ARO_315_135
	/// * op: FHT_ADD
	/// * make_skew: HDO_DESKEW
	#[inline]
	pub fn fast_hough_transform_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray, dst_mat_depth: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_FastHoughTransform_const__InputArrayR_const__OutputArrayR_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), dst_mat_depth, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculates 2D Fast Hough transform of an image.
	/// ## Parameters
	/// * dst: The destination image, result of transformation.
	/// * src: The source (input) image.
	/// * dstMatDepth: The depth of destination image
	/// * op: The operation to be applied, see cv::HoughOp
	/// * angleRange: The part of Hough space to calculate, see cv::AngleRangeOption
	/// * makeSkew: Specifies to do or not to do image skewing, see cv::HoughDeskewOption
	///
	/// The function calculates the fast Hough transform for full, half or quarter
	/// range of angles.
	///
	/// ## C++ default parameters
	/// * angle_range: ARO_315_135
	/// * op: FHT_ADD
	/// * make_skew: HDO_DESKEW
	#[inline]
	pub fn fast_hough_transform(src: &impl ToInputArray, dst: &mut impl ToOutputArray, dst_mat_depth: i32, angle_range: i32, op: i32, make_skew: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_FastHoughTransform_const__InputArrayR_const__OutputArrayR_int_int_int_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), dst_mat_depth, angle_range, op, make_skew, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies X Deriche filter to an image.
	///
	/// For more details about this implementation, please see <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.476.5736&rep=rep1&type=pdf>
	///
	/// ## Parameters
	/// * op: Source 8-bit or 16bit image, 1-channel or 3-channel image.
	/// * dst: result CV_32FC image with same number of channel than _op.
	/// * alpha: double see paper
	/// * omega: double see paper
	#[inline]
	pub fn gradient_deriche_x(op: &impl ToInputArray, dst: &mut impl ToOutputArray, alpha: f64, omega: f64) -> Result<()> {
		input_array_arg!(op);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_GradientDericheX_const__InputArrayR_const__OutputArrayR_double_double(op.as_raw__InputArray(), dst.as_raw__OutputArray(), alpha, omega, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies Y Deriche filter to an image.
	///
	/// For more details about this implementation, please see <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.476.5736&rep=rep1&type=pdf>
	///
	/// ## Parameters
	/// * op: Source 8-bit or 16bit image, 1-channel or 3-channel image.
	/// * dst: result CV_32FC image with same number of channel than _op.
	/// * alpha: double see paper
	/// * omega: double see paper
	#[inline]
	pub fn gradient_deriche_y(op: &impl ToInputArray, dst: &mut impl ToOutputArray, alpha: f64, omega: f64) -> Result<()> {
		input_array_arg!(op);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_GradientDericheY_const__InputArrayR_const__OutputArrayR_double_double(op.as_raw__InputArray(), dst.as_raw__OutputArray(), alpha, omega, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	#[inline]
	pub fn gradient_paillou_x(op: &impl ToInputArray, _dst: &mut impl ToOutputArray, alpha: f64, omega: f64) -> Result<()> {
		input_array_arg!(op);
		output_array_arg!(_dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_GradientPaillouX_const__InputArrayR_const__OutputArrayR_double_double(op.as_raw__InputArray(), _dst.as_raw__OutputArray(), alpha, omega, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies Paillou filter to an image.
	///
	/// For more details about this implementation, please see [paillou1997detecting](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_paillou1997detecting)
	///
	/// ## Parameters
	/// * op: Source CV_8U(S) or CV_16U(S), 1-channel or 3-channels image.
	/// * _dst: result CV_32F image with same number of channel than op.
	/// * omega: double see paper
	/// * alpha: double see paper
	/// ## See also
	/// GradientPaillouX, GradientPaillouY
	#[inline]
	pub fn gradient_paillou_y(op: &impl ToInputArray, _dst: &mut impl ToOutputArray, alpha: f64, omega: f64) -> Result<()> {
		input_array_arg!(op);
		output_array_arg!(_dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_GradientPaillouY_const__InputArrayR_const__OutputArrayR_double_double(op.as_raw__InputArray(), _dst.as_raw__OutputArray(), alpha, omega, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculates coordinates of line segment corresponded by point in Hough space.
	/// ## Parameters
	/// * houghPoint: Point in Hough space.
	/// * srcImgInfo: The source (input) image of Hough transform.
	/// * angleRange: The part of Hough space where point is situated, see cv::AngleRangeOption
	/// * makeSkew: Specifies to do or not to do image skewing, see cv::HoughDeskewOption
	/// * rules: Specifies strictness of line segment calculating, see cv::RulesOption
	/// @retval  [Vec4i]     Coordinates of line segment corresponded by point in Hough space.
	/// @remarks If rules parameter set to RO_STRICT
	///        then returned line cut along the border of source image.
	/// @remarks If rules parameter set to RO_WEAK then in case of point, which belongs
	///        the incorrect part of Hough image, returned line will not intersect source image.
	///
	/// The function calculates coordinates of line segment corresponded by point in Hough space.
	///
	/// ## Note
	/// This alternative version of [hough_point2_line] function uses the following default values for its arguments:
	/// * angle_range: ARO_315_135
	/// * make_skew: HDO_DESKEW
	/// * rules: RO_IGNORE_BORDERS
	#[inline]
	pub fn hough_point2_line_def(hough_point: core::Point, src_img_info: &impl ToInputArray) -> Result<core::Vec4i> {
		input_array_arg!(src_img_info);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_HoughPoint2Line_const_PointR_const__InputArrayR(&hough_point, src_img_info.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculates coordinates of line segment corresponded by point in Hough space.
	/// ## Parameters
	/// * houghPoint: Point in Hough space.
	/// * srcImgInfo: The source (input) image of Hough transform.
	/// * angleRange: The part of Hough space where point is situated, see cv::AngleRangeOption
	/// * makeSkew: Specifies to do or not to do image skewing, see cv::HoughDeskewOption
	/// * rules: Specifies strictness of line segment calculating, see cv::RulesOption
	/// @retval  [Vec4i]     Coordinates of line segment corresponded by point in Hough space.
	/// @remarks If rules parameter set to RO_STRICT
	///        then returned line cut along the border of source image.
	/// @remarks If rules parameter set to RO_WEAK then in case of point, which belongs
	///        the incorrect part of Hough image, returned line will not intersect source image.
	///
	/// The function calculates coordinates of line segment corresponded by point in Hough space.
	///
	/// ## C++ default parameters
	/// * angle_range: ARO_315_135
	/// * make_skew: HDO_DESKEW
	/// * rules: RO_IGNORE_BORDERS
	#[inline]
	pub fn hough_point2_line(hough_point: core::Point, src_img_info: &impl ToInputArray, angle_range: i32, make_skew: i32, rules: i32) -> Result<core::Vec4i> {
		input_array_arg!(src_img_info);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_HoughPoint2Line_const_PointR_const__InputArrayR_int_int_int(&hough_point, src_img_info.as_raw__InputArray(), angle_range, make_skew, rules, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculates an affine transformation that normalize given image using Pei&Lin Normalization.
	///
	/// Assume given image ![inline formula](https://latex.codecogs.com/png.latex?I%3DT%28%5Cbar%7BI%7D%29) where ![inline formula](https://latex.codecogs.com/png.latex?%5Cbar%7BI%7D) is a normalized image and ![inline formula](https://latex.codecogs.com/png.latex?T) is an affine transformation distorting this image by translation, rotation, scaling and skew.
	/// The function returns an affine transformation matrix corresponding to the transformation ![inline formula](https://latex.codecogs.com/png.latex?T%5E%7B%2D1%7D) described in [PeiLin95].
	/// For more details about this implementation, please see
	/// [PeiLin95] Soo-Chang Pei and Chao-Nan Lin. Image normalization for pattern recognition. Image and Vision Computing, Vol. 13, N.10, pp. 711-723, 1995.
	///
	/// ## Parameters
	/// * I: Given transformed image.
	/// ## Returns
	/// Transformation matrix corresponding to inversed image transformation
	#[inline]
	pub fn pei_lin_normalization(i: &impl ToInputArray) -> Result<core::Matx23d> {
		input_array_arg!(i);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_PeiLinNormalization_const__InputArrayR(i.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculates an affine transformation that normalize given image using Pei&Lin Normalization.
	///
	/// Assume given image ![inline formula](https://latex.codecogs.com/png.latex?I%3DT%28%5Cbar%7BI%7D%29) where ![inline formula](https://latex.codecogs.com/png.latex?%5Cbar%7BI%7D) is a normalized image and ![inline formula](https://latex.codecogs.com/png.latex?T) is an affine transformation distorting this image by translation, rotation, scaling and skew.
	/// The function returns an affine transformation matrix corresponding to the transformation ![inline formula](https://latex.codecogs.com/png.latex?T%5E%7B%2D1%7D) described in [PeiLin95].
	/// For more details about this implementation, please see
	/// [PeiLin95] Soo-Chang Pei and Chao-Nan Lin. Image normalization for pattern recognition. Image and Vision Computing, Vol. 13, N.10, pp. 711-723, 1995.
	///
	/// ## Parameters
	/// * I: Given transformed image.
	/// ## Returns
	/// Transformation matrix corresponding to inversed image transformation
	///
	/// ## Overloaded parameters
	#[inline]
	pub fn pei_lin_normalization_1(i: &impl ToInputArray, t: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(i);
		output_array_arg!(t);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_PeiLinNormalization_const__InputArrayR_const__OutputArrayR(i.as_raw__InputArray(), t.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculate Radon Transform of an image.
	/// ## Parameters
	/// * src: The source (input) image.
	/// * dst: The destination image, result of transformation.
	/// * theta: Angle resolution of the transform in degrees.
	/// * start_angle: Start angle of the transform in degrees.
	/// * end_angle: End angle of the transform in degrees.
	/// * crop: Crop the source image into a circle.
	/// * norm: Normalize the output Mat to grayscale and convert type to CV_8U
	///
	/// This function calculates the Radon Transform of a given image in any range.
	/// See <https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf> for detail.
	/// If the input type is CV_8U, the output will be CV_32S.
	/// If the input type is CV_32F or CV_64F, the output will be CV_64F
	/// The output size will be num_of_integral x src_diagonal_length.
	/// If crop is selected, the input image will be crop into square then circle,
	/// and output size will be num_of_integral x min_edge.
	///
	/// ## Note
	/// This alternative version of [radon_transform] function uses the following default values for its arguments:
	/// * theta: 1
	/// * start_angle: 0
	/// * end_angle: 180
	/// * crop: false
	/// * norm: false
	#[inline]
	pub fn radon_transform_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_RadonTransform_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculate Radon Transform of an image.
	/// ## Parameters
	/// * src: The source (input) image.
	/// * dst: The destination image, result of transformation.
	/// * theta: Angle resolution of the transform in degrees.
	/// * start_angle: Start angle of the transform in degrees.
	/// * end_angle: End angle of the transform in degrees.
	/// * crop: Crop the source image into a circle.
	/// * norm: Normalize the output Mat to grayscale and convert type to CV_8U
	///
	/// This function calculates the Radon Transform of a given image in any range.
	/// See <https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf> for detail.
	/// If the input type is CV_8U, the output will be CV_32S.
	/// If the input type is CV_32F or CV_64F, the output will be CV_64F
	/// The output size will be num_of_integral x src_diagonal_length.
	/// If crop is selected, the input image will be crop into square then circle,
	/// and output size will be num_of_integral x min_edge.
	///
	/// ## C++ default parameters
	/// * theta: 1
	/// * start_angle: 0
	/// * end_angle: 180
	/// * crop: false
	/// * norm: false
	#[inline]
	pub fn radon_transform(src: &impl ToInputArray, dst: &mut impl ToOutputArray, theta: f64, start_angle: f64, end_angle: f64, crop: bool, norm: bool) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_RadonTransform_const__InputArrayR_const__OutputArrayR_double_double_double_bool_bool(src.as_raw__InputArray(), dst.as_raw__OutputArray(), theta, start_angle, end_angle, crop, norm, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line Adaptive Manifold Filter call.
	///
	/// ## Parameters
	/// * joint: joint (also called as guided) image or array of images with any numbers of channels.
	///
	/// * src: filtering image with any numbers of channels.
	///
	/// * dst: output image.
	///
	/// * sigma_s: spatial standard deviation.
	///
	/// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into
	/// bilateralFilter.
	///
	/// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the
	/// original paper.
	///
	///
	/// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
	/// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
	/// sigmas in bilateralFilter and dtFilter functions. see also: bilateralFilter, dtFilter, guidedFilter
	///
	/// ## Note
	/// This alternative version of [am_filter] function uses the following default values for its arguments:
	/// * adjust_outliers: false
	#[inline]
	pub fn am_filter_def(joint: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, sigma_s: f64, sigma_r: f64) -> Result<()> {
		input_array_arg!(joint);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_amFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_double_double(joint.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), sigma_s, sigma_r, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line Adaptive Manifold Filter call.
	///
	/// ## Parameters
	/// * joint: joint (also called as guided) image or array of images with any numbers of channels.
	///
	/// * src: filtering image with any numbers of channels.
	///
	/// * dst: output image.
	///
	/// * sigma_s: spatial standard deviation.
	///
	/// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into
	/// bilateralFilter.
	///
	/// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the
	/// original paper.
	///
	///
	/// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
	/// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
	/// sigmas in bilateralFilter and dtFilter functions. see also: bilateralFilter, dtFilter, guidedFilter
	///
	/// ## C++ default parameters
	/// * adjust_outliers: false
	#[inline]
	pub fn am_filter(joint: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, sigma_s: f64, sigma_r: f64, adjust_outliers: bool) -> Result<()> {
		input_array_arg!(joint);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_amFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_double_double_bool(joint.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), sigma_s, sigma_r, adjust_outliers, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Performs anisotropic diffusion on an image.
	///
	/// The function applies Perona-Malik anisotropic diffusion to an image. This is the solution to the partial differential equation:
	///
	/// ![block formula](https://latex.codecogs.com/png.latex?%7B%5Cfrac%20%20%7B%5Cpartial%20I%7D%7B%5Cpartial%20t%7D%7D%3D%7B%5Cmathrm%20%20%7Bdiv%7D%7D%5Cleft%28c%28x%2Cy%2Ct%29%5Cnabla%20I%5Cright%29%3D%5Cnabla%20c%5Ccdot%20%5Cnabla%20I%2Bc%28x%2Cy%2Ct%29%5CDelta%20I)
	///
	/// Suggested functions for c(x,y,t) are:
	///
	/// ![block formula](https://latex.codecogs.com/png.latex?c%5Cleft%28%5C%7C%5Cnabla%20I%5C%7C%5Cright%29%3De%5E%7B%7B%2D%5Cleft%28%5C%7C%5Cnabla%20I%5C%7C%2FK%5Cright%29%5E%7B2%7D%7D%7D)
	///
	/// or
	///
	/// ![block formula](https://latex.codecogs.com/png.latex?%20c%5Cleft%28%5C%7C%5Cnabla%20I%5C%7C%5Cright%29%3D%7B%5Cfrac%20%7B1%7D%7B1%2B%5Cleft%28%7B%5Cfrac%20%20%7B%5C%7C%5Cnabla%20I%5C%7C%7D%7BK%7D%7D%5Cright%29%5E%7B2%7D%7D%7D%20)
	///
	/// ## Parameters
	/// * src: Source image with 3 channels.
	/// * dst: Destination image of the same size and the same number of channels as src .
	/// * alpha: The amount of time to step forward by on each iteration (normally, it's between 0 and 1).
	/// * K: sensitivity to the edges
	/// * niters: The number of iterations
	#[inline]
	pub fn anisotropic_diffusion(src: &impl ToInputArray, dst: &mut impl ToOutputArray, alpha: f32, k: f32, niters: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_anisotropicDiffusion_const__InputArrayR_const__OutputArrayR_float_float_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), alpha, k, niters, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies the bilateral texture filter to an image. It performs structure-preserving texture filter.
	/// For more details about this filter see [Cho2014](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Cho2014).
	///
	/// ## Parameters
	/// * src: Source image whose depth is 8-bit UINT or 32-bit FLOAT
	///
	/// * dst: Destination image of the same size and type as src.
	///
	/// * fr: Radius of kernel to be used for filtering. It should be positive integer
	///
	/// * numIter: Number of iterations of algorithm, It should be positive integer
	///
	/// * sigmaAlpha: Controls the sharpness of the weight transition from edges to smooth/texture regions, where
	/// a bigger value means sharper transition. When the value is negative, it is automatically calculated.
	///
	/// * sigmaAvg: Range blur parameter for texture blurring. Larger value makes result to be more blurred. When the
	/// value is negative, it is automatically calculated as described in the paper.
	/// ## See also
	/// rollingGuidanceFilter, bilateralFilter
	///
	/// ## Note
	/// This alternative version of [bilateral_texture_filter] function uses the following default values for its arguments:
	/// * fr: 3
	/// * num_iter: 1
	/// * sigma_alpha: -1.
	/// * sigma_avg: -1.
	#[inline]
	pub fn bilateral_texture_filter_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_bilateralTextureFilter_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies the bilateral texture filter to an image. It performs structure-preserving texture filter.
	/// For more details about this filter see [Cho2014](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Cho2014).
	///
	/// ## Parameters
	/// * src: Source image whose depth is 8-bit UINT or 32-bit FLOAT
	///
	/// * dst: Destination image of the same size and type as src.
	///
	/// * fr: Radius of kernel to be used for filtering. It should be positive integer
	///
	/// * numIter: Number of iterations of algorithm, It should be positive integer
	///
	/// * sigmaAlpha: Controls the sharpness of the weight transition from edges to smooth/texture regions, where
	/// a bigger value means sharper transition. When the value is negative, it is automatically calculated.
	///
	/// * sigmaAvg: Range blur parameter for texture blurring. Larger value makes result to be more blurred. When the
	/// value is negative, it is automatically calculated as described in the paper.
	/// ## See also
	/// rollingGuidanceFilter, bilateralFilter
	///
	/// ## C++ default parameters
	/// * fr: 3
	/// * num_iter: 1
	/// * sigma_alpha: -1.
	/// * sigma_avg: -1.
	#[inline]
	pub fn bilateral_texture_filter(src: &impl ToInputArray, dst: &mut impl ToOutputArray, fr: i32, num_iter: i32, sigma_alpha: f64, sigma_avg: f64) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_bilateralTextureFilter_const__InputArrayR_const__OutputArrayR_int_int_double_double(src.as_raw__InputArray(), dst.as_raw__OutputArray(), fr, num_iter, sigma_alpha, sigma_avg, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Compares a color template against overlapped color image regions.
	///
	/// ## Parameters
	/// * img: Image where the search is running. It must be 3 channels image
	/// * templ: Searched template. It must be not greater than the source image and have 3 channels
	/// * result: Map of comparison results. It must be single-channel 64-bit floating-point
	#[inline]
	pub fn color_match_template(img: &impl ToInputArray, templ: &impl ToInputArray, result: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(img);
		input_array_arg!(templ);
		output_array_arg!(result);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_colorMatchTemplate_const__InputArrayR_const__InputArrayR_const__OutputArrayR(img.as_raw__InputArray(), templ.as_raw__InputArray(), result.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Function for computing the percent of "bad" pixels in the disparity map
	/// (pixels where error is higher than a specified threshold)
	///
	/// ## Parameters
	/// * GT: ground truth disparity map
	///
	/// * src: disparity map to evaluate
	///
	/// * ROI: region of interest
	///
	/// * thresh: threshold used to determine "bad" pixels
	///
	/// @result returns mean square error between GT and src
	///
	/// ## Note
	/// This alternative version of [compute_bad_pixel_percent] function uses the following default values for its arguments:
	/// * thresh: 24
	#[inline]
	pub fn compute_bad_pixel_percent_def(gt: &impl ToInputArray, src: &impl ToInputArray, roi: core::Rect) -> Result<f64> {
		input_array_arg!(gt);
		input_array_arg!(src);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_computeBadPixelPercent_const__InputArrayR_const__InputArrayR_Rect(gt.as_raw__InputArray(), src.as_raw__InputArray(), &roi, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Function for computing the percent of "bad" pixels in the disparity map
	/// (pixels where error is higher than a specified threshold)
	///
	/// ## Parameters
	/// * GT: ground truth disparity map
	///
	/// * src: disparity map to evaluate
	///
	/// * ROI: region of interest
	///
	/// * thresh: threshold used to determine "bad" pixels
	///
	/// @result returns mean square error between GT and src
	///
	/// ## C++ default parameters
	/// * thresh: 24
	#[inline]
	pub fn compute_bad_pixel_percent(gt: &impl ToInputArray, src: &impl ToInputArray, roi: core::Rect, thresh: i32) -> Result<f64> {
		input_array_arg!(gt);
		input_array_arg!(src);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_computeBadPixelPercent_const__InputArrayR_const__InputArrayR_Rect_int(gt.as_raw__InputArray(), src.as_raw__InputArray(), &roi, thresh, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Function for computing mean square error for disparity maps
	///
	/// ## Parameters
	/// * GT: ground truth disparity map
	///
	/// * src: disparity map to evaluate
	///
	/// * ROI: region of interest
	///
	/// @result returns mean square error between GT and src
	#[inline]
	pub fn compute_mse(gt: &impl ToInputArray, src: &impl ToInputArray, roi: core::Rect) -> Result<f64> {
		input_array_arg!(gt);
		input_array_arg!(src);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_computeMSE_const__InputArrayR_const__InputArrayR_Rect(gt.as_raw__InputArray(), src.as_raw__InputArray(), &roi, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Contour sampling .
	///
	/// ## Parameters
	/// * src: contour type vector<Point> , vector<Point2f>  or vector<Point2d>
	/// * out: Mat of type CV_64FC2 and nbElt rows
	/// * nbElt: number of points in out contour
	#[inline]
	pub fn contour_sampling(src: &impl ToInputArray, out: &mut impl ToOutputArray, nb_elt: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(out);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_contourSampling_const__InputArrayR_const__OutputArrayR_int(src.as_raw__InputArray(), out.as_raw__OutputArray(), nb_elt, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Computes the estimated covariance matrix of an image using the sliding
	/// window forumlation.
	///
	/// ## Parameters
	/// * src: The source image. Input image must be of a complex type.
	/// * dst: The destination estimated covariance matrix. Output matrix will be size (windowRows*windowCols, windowRows*windowCols).
	/// * windowRows: The number of rows in the window.
	/// * windowCols: The number of cols in the window.
	/// The window size parameters control the accuracy of the estimation.
	/// The sliding window moves over the entire image from the top-left corner
	/// to the bottom right corner. Each location of the window represents a sample.
	/// If the window is the size of the image, then this gives the exact covariance matrix.
	/// For all other cases, the sizes of the window will impact the number of samples
	/// and the number of elements in the estimated covariance matrix.
	#[inline]
	pub fn covariance_estimation(src: &impl ToInputArray, dst: &mut impl ToOutputArray, window_rows: i32, window_cols: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_covarianceEstimation_const__InputArrayR_const__OutputArrayR_int_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), window_rows, window_cols, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines.
	///
	/// ## Parameters
	/// * sigma_s: spatial standard deviation.
	///
	/// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into
	/// bilateralFilter.
	///
	/// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the
	/// original paper.
	///
	/// For more details about Adaptive Manifold Filter parameters, see the original article [Gastal12](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Gastal12) .
	///
	///
	/// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
	/// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
	/// sigmas in bilateralFilter and dtFilter functions.
	///
	/// ## Note
	/// This alternative version of [create_am_filter] function uses the following default values for its arguments:
	/// * adjust_outliers: false
	#[inline]
	pub fn create_am_filter_def(sigma_s: f64, sigma_r: f64) -> Result<core::Ptr<crate::ximgproc::AdaptiveManifoldFilter>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createAMFilter_double_double(sigma_s, sigma_r, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::AdaptiveManifoldFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines.
	///
	/// ## Parameters
	/// * sigma_s: spatial standard deviation.
	///
	/// * sigma_r: color space standard deviation, it is similar to the sigma in the color space into
	/// bilateralFilter.
	///
	/// * adjust_outliers: optional, specify perform outliers adjust operation or not, (Eq. 9) in the
	/// original paper.
	///
	/// For more details about Adaptive Manifold Filter parameters, see the original article [Gastal12](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Gastal12) .
	///
	///
	/// Note: Joint images with CV_8U and CV_16U depth converted to images with CV_32F depth and [0; 1]
	/// color range before processing. Hence color space sigma sigma_r must be in [0; 1] range, unlike same
	/// sigmas in bilateralFilter and dtFilter functions.
	///
	/// ## C++ default parameters
	/// * adjust_outliers: false
	#[inline]
	pub fn create_am_filter(sigma_s: f64, sigma_r: f64, adjust_outliers: bool) -> Result<core::Ptr<crate::ximgproc::AdaptiveManifoldFilter>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createAMFilter_double_double_bool(sigma_s, sigma_r, adjust_outliers, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::AdaptiveManifoldFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// create ContourFitting algorithm object
	///
	/// ## Parameters
	/// * ctr: number of Fourier descriptors equal to number of contour points after resampling.
	/// * fd: Contour defining second shape (Target).
	///
	/// ## Note
	/// This alternative version of [create_contour_fitting] function uses the following default values for its arguments:
	/// * ctr: 1024
	/// * fd: 16
	#[inline]
	pub fn create_contour_fitting_def() -> Result<core::Ptr<crate::ximgproc::ContourFitting>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createContourFitting(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::ContourFitting>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// create ContourFitting algorithm object
	///
	/// ## Parameters
	/// * ctr: number of Fourier descriptors equal to number of contour points after resampling.
	/// * fd: Contour defining second shape (Target).
	///
	/// ## C++ default parameters
	/// * ctr: 1024
	/// * fd: 16
	#[inline]
	pub fn create_contour_fitting(ctr: i32, fd: i32) -> Result<core::Ptr<crate::ximgproc::ContourFitting>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createContourFitting_int_int(ctr, fd, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::ContourFitting>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of DTFilter and produce initialization routines.
	///
	/// ## Parameters
	/// * guide: guided image (used to build transformed distance, which describes edge structure of
	/// guided image).
	///
	/// * sigmaSpatial: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5FH) parameter in the original article, it's similar to the sigma in the
	/// coordinate space into bilateralFilter.
	///
	/// * sigmaColor: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5Fr) parameter in the original article, it's similar to the sigma in the
	/// color space into bilateralFilter.
	///
	/// * mode: one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
	/// filtering 2D signals in the article.
	///
	/// * numIters: optional number of iterations used for filtering, 3 is quite enough.
	///
	/// For more details about Domain Transform filter parameters, see the original article [Gastal11](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Gastal11) and
	/// [Domain Transform filter homepage](http://www.inf.ufrgs.br/~eslgastal/DomainTransform/).
	///
	/// ## Note
	/// This alternative version of [create_dt_filter] function uses the following default values for its arguments:
	/// * mode: DTF_NC
	/// * num_iters: 3
	#[inline]
	pub fn create_dt_filter_def(guide: &impl ToInputArray, sigma_spatial: f64, sigma_color: f64) -> Result<core::Ptr<crate::ximgproc::DTFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createDTFilter_const__InputArrayR_double_double(guide.as_raw__InputArray(), sigma_spatial, sigma_color, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::DTFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of DTFilter and produce initialization routines.
	///
	/// ## Parameters
	/// * guide: guided image (used to build transformed distance, which describes edge structure of
	/// guided image).
	///
	/// * sigmaSpatial: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5FH) parameter in the original article, it's similar to the sigma in the
	/// coordinate space into bilateralFilter.
	///
	/// * sigmaColor: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5Fr) parameter in the original article, it's similar to the sigma in the
	/// color space into bilateralFilter.
	///
	/// * mode: one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
	/// filtering 2D signals in the article.
	///
	/// * numIters: optional number of iterations used for filtering, 3 is quite enough.
	///
	/// For more details about Domain Transform filter parameters, see the original article [Gastal11](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Gastal11) and
	/// [Domain Transform filter homepage](http://www.inf.ufrgs.br/~eslgastal/DomainTransform/).
	///
	/// ## C++ default parameters
	/// * mode: DTF_NC
	/// * num_iters: 3
	#[inline]
	pub fn create_dt_filter(guide: &impl ToInputArray, sigma_spatial: f64, sigma_color: f64, mode: i32, num_iters: i32) -> Result<core::Ptr<crate::ximgproc::DTFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createDTFilter_const__InputArrayR_double_double_int_int(guide.as_raw__InputArray(), sigma_spatial, sigma_color, mode, num_iters, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::DTFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// More generic factory method, create instance of DisparityWLSFilter and execute basic
	/// initialization routines. When using this method you will need to set-up the ROI, matchers and
	/// other parameters by yourself.
	///
	/// ## Parameters
	/// * use_confidence: filtering with confidence requires two disparity maps (for the left and right views) and is
	/// approximately two times slower. However, quality is typically significantly better.
	#[inline]
	pub fn create_disparity_wls_filter_generic(use_confidence: bool) -> Result<core::Ptr<crate::ximgproc::DisparityWLSFilter>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createDisparityWLSFilterGeneric_bool(use_confidence, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::DisparityWLSFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Convenience factory method that creates an instance of DisparityWLSFilter and sets up all the relevant
	/// filter parameters automatically based on the matcher instance. Currently supports only StereoBM and StereoSGBM.
	///
	/// ## Parameters
	/// * matcher_left: stereo matcher instance that will be used with the filter
	#[inline]
	pub fn create_disparity_wls_filter(mut matcher_left: core::Ptr<crate::calib3d::StereoMatcher>) -> Result<core::Ptr<crate::ximgproc::DisparityWLSFilter>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createDisparityWLSFilter_PtrLStereoMatcherG(matcher_left.as_raw_mut_PtrOfStereoMatcher(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::DisparityWLSFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method that creates an instance of the
	/// EdgeAwareInterpolator.
	#[inline]
	pub fn create_edge_aware_interpolator() -> Result<core::Ptr<crate::ximgproc::EdgeAwareInterpolator>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createEdgeAwareInterpolator(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::EdgeAwareInterpolator>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Creates a Edgeboxes
	///
	/// ## Parameters
	/// * alpha: step size of sliding window search.
	/// * beta: nms threshold for object proposals.
	/// * eta: adaptation rate for nms threshold.
	/// * minScore: min score of boxes to detect.
	/// * maxBoxes: max number of boxes to detect.
	/// * edgeMinMag: edge min magnitude. Increase to trade off accuracy for speed.
	/// * edgeMergeThr: edge merge threshold. Increase to trade off accuracy for speed.
	/// * clusterMinMag: cluster min magnitude. Increase to trade off accuracy for speed.
	/// * maxAspectRatio: max aspect ratio of boxes.
	/// * minBoxArea: minimum area of boxes.
	/// * gamma: affinity sensitivity.
	/// * kappa: scale sensitivity.
	///
	/// ## Note
	/// This alternative version of [create_edge_boxes] function uses the following default values for its arguments:
	/// * alpha: 0.65f
	/// * beta: 0.75f
	/// * eta: 1
	/// * min_score: 0.01f
	/// * max_boxes: 10000
	/// * edge_min_mag: 0.1f
	/// * edge_merge_thr: 0.5f
	/// * cluster_min_mag: 0.5f
	/// * max_aspect_ratio: 3
	/// * min_box_area: 1000
	/// * gamma: 2
	/// * kappa: 1.5f
	#[inline]
	pub fn create_edge_boxes_def() -> Result<core::Ptr<crate::ximgproc::EdgeBoxes>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createEdgeBoxes(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::EdgeBoxes>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Creates a Edgeboxes
	///
	/// ## Parameters
	/// * alpha: step size of sliding window search.
	/// * beta: nms threshold for object proposals.
	/// * eta: adaptation rate for nms threshold.
	/// * minScore: min score of boxes to detect.
	/// * maxBoxes: max number of boxes to detect.
	/// * edgeMinMag: edge min magnitude. Increase to trade off accuracy for speed.
	/// * edgeMergeThr: edge merge threshold. Increase to trade off accuracy for speed.
	/// * clusterMinMag: cluster min magnitude. Increase to trade off accuracy for speed.
	/// * maxAspectRatio: max aspect ratio of boxes.
	/// * minBoxArea: minimum area of boxes.
	/// * gamma: affinity sensitivity.
	/// * kappa: scale sensitivity.
	///
	/// ## C++ default parameters
	/// * alpha: 0.65f
	/// * beta: 0.75f
	/// * eta: 1
	/// * min_score: 0.01f
	/// * max_boxes: 10000
	/// * edge_min_mag: 0.1f
	/// * edge_merge_thr: 0.5f
	/// * cluster_min_mag: 0.5f
	/// * max_aspect_ratio: 3
	/// * min_box_area: 1000
	/// * gamma: 2
	/// * kappa: 1.5f
	#[inline]
	pub fn create_edge_boxes(alpha: f32, beta: f32, eta: f32, min_score: f32, max_boxes: i32, edge_min_mag: f32, edge_merge_thr: f32, cluster_min_mag: f32, max_aspect_ratio: f32, min_box_area: f32, gamma: f32, kappa: f32) -> Result<core::Ptr<crate::ximgproc::EdgeBoxes>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createEdgeBoxes_float_float_float_float_int_float_float_float_float_float_float_float(alpha, beta, eta, min_score, max_boxes, edge_min_mag, edge_merge_thr, cluster_min_mag, max_aspect_ratio, min_box_area, gamma, kappa, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::EdgeBoxes>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Creates a smart pointer to a EdgeDrawing object and initializes it
	#[inline]
	pub fn create_edge_drawing() -> Result<core::Ptr<crate::ximgproc::EdgeDrawing>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createEdgeDrawing(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::EdgeDrawing>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
	///
	/// * lambda: smoothness strength parameter for solver.
	///
	/// * num_iter: number of iterations used for solver, 25 is usually enough.
	///
	/// * max_tol: convergence tolerance used for solver.
	///
	/// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BarronPoole2016).
	///
	/// ## Note
	/// This alternative version of [create_fast_bilateral_solver_filter] function uses the following default values for its arguments:
	/// * lambda: 128.0
	/// * num_iter: 25
	/// * max_tol: 1e-5
	#[inline]
	pub fn create_fast_bilateral_solver_filter_def(guide: &impl ToInputArray, sigma_spatial: f64, sigma_luma: f64, sigma_chroma: f64) -> Result<core::Ptr<crate::ximgproc::FastBilateralSolverFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createFastBilateralSolverFilter_const__InputArrayR_double_double_double(guide.as_raw__InputArray(), sigma_spatial, sigma_luma, sigma_chroma, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::FastBilateralSolverFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of FastBilateralSolverFilter and execute the initialization routines.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
	///
	/// * lambda: smoothness strength parameter for solver.
	///
	/// * num_iter: number of iterations used for solver, 25 is usually enough.
	///
	/// * max_tol: convergence tolerance used for solver.
	///
	/// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BarronPoole2016).
	///
	/// ## C++ default parameters
	/// * lambda: 128.0
	/// * num_iter: 25
	/// * max_tol: 1e-5
	#[inline]
	pub fn create_fast_bilateral_solver_filter(guide: &impl ToInputArray, sigma_spatial: f64, sigma_luma: f64, sigma_chroma: f64, lambda: f64, num_iter: i32, max_tol: f64) -> Result<core::Ptr<crate::ximgproc::FastBilateralSolverFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createFastBilateralSolverFilter_const__InputArrayR_double_double_double_double_int_double(guide.as_raw__InputArray(), sigma_spatial, sigma_luma, sigma_chroma, lambda, num_iter, max_tol, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::FastBilateralSolverFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * lambda: parameter defining the amount of regularization
	///
	/// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter.
	///
	/// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally,
	/// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
	///
	/// * num_iter: number of iterations used for filtering, 3 is usually enough.
	///
	/// For more details about Fast Global Smoother parameters, see the original paper [Min2014](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Min2014). However, please note that
	/// there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not
	/// expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to
	/// achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors
	/// propose to dynamically update the guide image after each iteration. To maximize the performance this feature
	/// was not implemented here.
	///
	/// ## Note
	/// This alternative version of [create_fast_global_smoother_filter] function uses the following default values for its arguments:
	/// * lambda_attenuation: 0.25
	/// * num_iter: 3
	#[inline]
	pub fn create_fast_global_smoother_filter_def(guide: &impl ToInputArray, lambda: f64, sigma_color: f64) -> Result<core::Ptr<crate::ximgproc::FastGlobalSmootherFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createFastGlobalSmootherFilter_const__InputArrayR_double_double(guide.as_raw__InputArray(), lambda, sigma_color, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::FastGlobalSmootherFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of FastGlobalSmootherFilter and execute the initialization routines.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * lambda: parameter defining the amount of regularization
	///
	/// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter.
	///
	/// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally,
	/// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
	///
	/// * num_iter: number of iterations used for filtering, 3 is usually enough.
	///
	/// For more details about Fast Global Smoother parameters, see the original paper [Min2014](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Min2014). However, please note that
	/// there are several differences. Lambda attenuation described in the paper is implemented a bit differently so do not
	/// expect the results to be identical to those from the paper; sigma_color values from the paper should be multiplied by 255.0 to
	/// achieve the same effect. Also, in case of image filtering where source and guide image are the same, authors
	/// propose to dynamically update the guide image after each iteration. To maximize the performance this feature
	/// was not implemented here.
	///
	/// ## C++ default parameters
	/// * lambda_attenuation: 0.25
	/// * num_iter: 3
	#[inline]
	pub fn create_fast_global_smoother_filter(guide: &impl ToInputArray, lambda: f64, sigma_color: f64, lambda_attenuation: f64, num_iter: i32) -> Result<core::Ptr<crate::ximgproc::FastGlobalSmootherFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createFastGlobalSmootherFilter_const__InputArrayR_double_double_double_int(guide.as_raw__InputArray(), lambda, sigma_color, lambda_attenuation, num_iter, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::FastGlobalSmootherFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Creates a smart pointer to a FastLineDetector object and initializes it
	///
	/// ## Parameters
	/// * length_threshold: Segment shorter than this will be discarded
	/// * distance_threshold: A point placed from a hypothesis line
	///                            segment farther than this will be regarded as an outlier
	/// * canny_th1: First threshold for hysteresis procedure in Canny()
	/// * canny_th2: Second threshold for hysteresis procedure in Canny()
	/// * canny_aperture_size: Aperturesize for the sobel operator in Canny().
	///                            If zero, Canny() is not applied and the input image is taken as an edge image.
	/// * do_merge: If true, incremental merging of segments will be performed
	///
	/// ## Note
	/// This alternative version of [create_fast_line_detector] function uses the following default values for its arguments:
	/// * length_threshold: 10
	/// * distance_threshold: 1.414213562f
	/// * canny_th1: 50.0
	/// * canny_th2: 50.0
	/// * canny_aperture_size: 3
	/// * do_merge: false
	#[inline]
	pub fn create_fast_line_detector_def() -> Result<core::Ptr<crate::ximgproc::FastLineDetector>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createFastLineDetector(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::FastLineDetector>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Creates a smart pointer to a FastLineDetector object and initializes it
	///
	/// ## Parameters
	/// * length_threshold: Segment shorter than this will be discarded
	/// * distance_threshold: A point placed from a hypothesis line
	///                            segment farther than this will be regarded as an outlier
	/// * canny_th1: First threshold for hysteresis procedure in Canny()
	/// * canny_th2: Second threshold for hysteresis procedure in Canny()
	/// * canny_aperture_size: Aperturesize for the sobel operator in Canny().
	///                            If zero, Canny() is not applied and the input image is taken as an edge image.
	/// * do_merge: If true, incremental merging of segments will be performed
	///
	/// ## C++ default parameters
	/// * length_threshold: 10
	/// * distance_threshold: 1.414213562f
	/// * canny_th1: 50.0
	/// * canny_th2: 50.0
	/// * canny_aperture_size: 3
	/// * do_merge: false
	#[inline]
	pub fn create_fast_line_detector(length_threshold: i32, distance_threshold: f32, canny_th1: f64, canny_th2: f64, canny_aperture_size: i32, do_merge: bool) -> Result<core::Ptr<crate::ximgproc::FastLineDetector>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createFastLineDetector_int_float_double_double_int_bool(length_threshold, distance_threshold, canny_th1, canny_th2, canny_aperture_size, do_merge, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::FastLineDetector>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of GuidedFilter and produce initialization routines.
	///
	/// ## Parameters
	/// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3
	/// channels then only first 3 channels will be used.
	///
	/// * radius: radius of Guided Filter.
	///
	/// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color
	/// space into bilateralFilter.
	///
	/// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation
	/// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter)
	///
	/// For more details about (Fast) Guided Filter parameters, see the original articles [Kaiming10](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Kaiming10) [Kaiming15](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Kaiming15) .
	///
	/// ## Note
	/// This alternative version of [create_guided_filter] function uses the following default values for its arguments:
	/// * scale: 1.0
	#[inline]
	pub fn create_guided_filter_def(guide: &impl ToInputArray, radius: i32, eps: f64) -> Result<core::Ptr<crate::ximgproc::GuidedFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createGuidedFilter_const__InputArrayR_int_double(guide.as_raw__InputArray(), radius, eps, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::GuidedFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method, create instance of GuidedFilter and produce initialization routines.
	///
	/// ## Parameters
	/// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3
	/// channels then only first 3 channels will be used.
	///
	/// * radius: radius of Guided Filter.
	///
	/// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color
	/// space into bilateralFilter.
	///
	/// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation
	/// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter)
	///
	/// For more details about (Fast) Guided Filter parameters, see the original articles [Kaiming10](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Kaiming10) [Kaiming15](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Kaiming15) .
	///
	/// ## C++ default parameters
	/// * scale: 1.0
	#[inline]
	pub fn create_guided_filter(guide: &impl ToInputArray, radius: i32, eps: f64, scale: f64) -> Result<core::Ptr<crate::ximgproc::GuidedFilter>> {
		input_array_arg!(guide);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createGuidedFilter_const__InputArrayR_int_double_double(guide.as_raw__InputArray(), radius, eps, scale, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::GuidedFilter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// creates a quaternion image.
	///
	/// ## Parameters
	/// * img: Source 8-bit, 32-bit or 64-bit image, with 3-channel image.
	/// * qimg: result CV_64FC4 a quaternion image( 4 chanels zero channel and B,G,R).
	#[inline]
	pub fn create_quaternion_image(img: &impl ToInputArray, qimg: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(img);
		output_array_arg!(qimg);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createQuaternionImage_const__InputArrayR_const__OutputArrayR(img.as_raw__InputArray(), qimg.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	#[inline]
	pub fn create_rf_feature_getter() -> Result<core::Ptr<crate::ximgproc::RFFeatureGetter>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createRFFeatureGetter(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::RFFeatureGetter>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Factory method that creates an instance of the
	/// RICInterpolator.
	#[inline]
	pub fn create_ric_interpolator() -> Result<core::Ptr<crate::ximgproc::RICInterpolator>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createRICInterpolator(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::RICInterpolator>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Convenience method to set up the matcher for computing the right-view disparity map
	/// that is required in case of filtering with confidence.
	///
	/// ## Parameters
	/// * matcher_left: main stereo matcher instance that will be used with the filter
	#[inline]
	pub fn create_right_matcher(mut matcher_left: core::Ptr<crate::calib3d::StereoMatcher>) -> Result<core::Ptr<crate::calib3d::StereoMatcher>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createRightMatcher_PtrLStereoMatcherG(matcher_left.as_raw_mut_PtrOfStereoMatcher(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::calib3d::StereoMatcher>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Initializes a ScanSegment object.
	///
	/// The function initializes a ScanSegment object for the input image. It stores the parameters of
	/// the image: image_width and image_height. It also sets the parameters of the F-DBSCAN superpixel
	/// algorithm, which are: num_superpixels, threads, and merge_small.
	///
	/// ## Parameters
	/// * image_width: Image width.
	/// * image_height: Image height.
	/// * num_superpixels: Desired number of superpixels. Note that the actual number may be smaller
	/// due to restrictions (depending on the image size). Use getNumberOfSuperpixels() to
	/// get the actual number.
	/// * slices: Number of processing threads for parallelisation. Setting -1 uses the maximum number
	/// of threads. In practice, four threads is enough for smaller images and eight threads for larger ones.
	/// * merge_small: merge small segments to give the desired number of superpixels. Processing is
	/// much faster without merging, but many small segments will be left in the image.
	///
	/// ## Note
	/// This alternative version of [create_scan_segment] function uses the following default values for its arguments:
	/// * slices: 8
	/// * merge_small: true
	#[inline]
	pub fn create_scan_segment_def(image_width: i32, image_height: i32, num_superpixels: i32) -> Result<core::Ptr<crate::ximgproc::ScanSegment>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createScanSegment_int_int_int(image_width, image_height, num_superpixels, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::ScanSegment>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Initializes a ScanSegment object.
	///
	/// The function initializes a ScanSegment object for the input image. It stores the parameters of
	/// the image: image_width and image_height. It also sets the parameters of the F-DBSCAN superpixel
	/// algorithm, which are: num_superpixels, threads, and merge_small.
	///
	/// ## Parameters
	/// * image_width: Image width.
	/// * image_height: Image height.
	/// * num_superpixels: Desired number of superpixels. Note that the actual number may be smaller
	/// due to restrictions (depending on the image size). Use getNumberOfSuperpixels() to
	/// get the actual number.
	/// * slices: Number of processing threads for parallelisation. Setting -1 uses the maximum number
	/// of threads. In practice, four threads is enough for smaller images and eight threads for larger ones.
	/// * merge_small: merge small segments to give the desired number of superpixels. Processing is
	/// much faster without merging, but many small segments will be left in the image.
	///
	/// ## C++ default parameters
	/// * slices: 8
	/// * merge_small: true
	#[inline]
	pub fn create_scan_segment(image_width: i32, image_height: i32, num_superpixels: i32, slices: i32, merge_small: bool) -> Result<core::Ptr<crate::ximgproc::ScanSegment>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createScanSegment_int_int_int_int_bool(image_width, image_height, num_superpixels, slices, merge_small, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::ScanSegment>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// !
	/// * The only constructor
	/// *
	/// * \param model : name of the file where the model is stored
	/// * \param howToGetFeatures : optional object inheriting from RFFeatureGetter.
	/// *                           You need it only if you would like to train your
	/// *                           own forest, pass NULL otherwise
	///
	/// ## Note
	/// This alternative version of [create_structured_edge_detection] function uses the following default values for its arguments:
	/// * how_to_get_features: Ptr<RFFeatureGetter>()
	#[inline]
	pub fn create_structured_edge_detection_def(model: &str) -> Result<core::Ptr<crate::ximgproc::StructuredEdgeDetection>> {
		extern_container_arg!(model);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createStructuredEdgeDetection_const_StringR(model.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::StructuredEdgeDetection>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// !
	/// * The only constructor
	/// *
	/// * \param model : name of the file where the model is stored
	/// * \param howToGetFeatures : optional object inheriting from RFFeatureGetter.
	/// *                           You need it only if you would like to train your
	/// *                           own forest, pass NULL otherwise
	///
	/// ## C++ default parameters
	/// * how_to_get_features: Ptr<RFFeatureGetter>()
	#[inline]
	pub fn create_structured_edge_detection(model: &str, how_to_get_features: Option<core::Ptr<crate::ximgproc::RFFeatureGetter>>) -> Result<core::Ptr<crate::ximgproc::StructuredEdgeDetection>> {
		extern_container_arg!(model);
		smart_ptr_option_arg!(how_to_get_features);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createStructuredEdgeDetection_const_StringR_PtrLconst_RFFeatureGetterG(model.opencv_as_extern(), how_to_get_features.as_raw_PtrOfRFFeatureGetter(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::StructuredEdgeDetection>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Class implementing the LSC (Linear Spectral Clustering) superpixels
	///
	/// ## Parameters
	/// * image: Image to segment
	/// * region_size: Chooses an average superpixel size measured in pixels
	/// * ratio: Chooses the enforcement of superpixel compactness factor of superpixel
	///
	/// The function initializes a SuperpixelLSC object for the input image. It sets the parameters of
	/// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
	/// computing iterations over the given image. An example of LSC is ilustrated in the following picture.
	/// For enanched results it is recommended for color images to preprocess image with little gaussian blur
	/// with a small 3 x 3 kernel and additional conversion into CieLAB color space.
	///
	/// ![image](https://docs.opencv.org/4.11.0/superpixels_lsc.png)
	///
	/// ## Note
	/// This alternative version of [create_superpixel_lsc] function uses the following default values for its arguments:
	/// * region_size: 10
	/// * ratio: 0.075f
	#[inline]
	pub fn create_superpixel_lsc_def(image: &impl ToInputArray) -> Result<core::Ptr<crate::ximgproc::SuperpixelLSC>> {
		input_array_arg!(image);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createSuperpixelLSC_const__InputArrayR(image.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SuperpixelLSC>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Class implementing the LSC (Linear Spectral Clustering) superpixels
	///
	/// ## Parameters
	/// * image: Image to segment
	/// * region_size: Chooses an average superpixel size measured in pixels
	/// * ratio: Chooses the enforcement of superpixel compactness factor of superpixel
	///
	/// The function initializes a SuperpixelLSC object for the input image. It sets the parameters of
	/// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
	/// computing iterations over the given image. An example of LSC is ilustrated in the following picture.
	/// For enanched results it is recommended for color images to preprocess image with little gaussian blur
	/// with a small 3 x 3 kernel and additional conversion into CieLAB color space.
	///
	/// ![image](https://docs.opencv.org/4.11.0/superpixels_lsc.png)
	///
	/// ## C++ default parameters
	/// * region_size: 10
	/// * ratio: 0.075f
	#[inline]
	pub fn create_superpixel_lsc(image: &impl ToInputArray, region_size: i32, ratio: f32) -> Result<core::Ptr<crate::ximgproc::SuperpixelLSC>> {
		input_array_arg!(image);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createSuperpixelLSC_const__InputArrayR_int_float(image.as_raw__InputArray(), region_size, ratio, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SuperpixelLSC>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Initializes a SuperpixelSEEDS object.
	///
	/// ## Parameters
	/// * image_width: Image width.
	/// * image_height: Image height.
	/// * image_channels: Number of channels of the image.
	/// * num_superpixels: Desired number of superpixels. Note that the actual number may be smaller
	/// due to restrictions (depending on the image size and num_levels). Use getNumberOfSuperpixels() to
	/// get the actual number.
	/// * num_levels: Number of block levels. The more levels, the more accurate is the segmentation,
	/// but needs more memory and CPU time.
	/// * prior: enable 3x3 shape smoothing term if \>0. A larger value leads to smoother shapes. prior
	/// must be in the range [0, 5].
	/// * histogram_bins: Number of histogram bins.
	/// * double_step: If true, iterate each block level twice for higher accuracy.
	///
	/// The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of
	/// the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS
	/// superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and
	/// double_step.
	///
	/// The number of levels in num_levels defines the amount of block levels that the algorithm use in the
	/// optimization. The initialization is a grid, in which the superpixels are equally distributed through
	/// the width and the height of the image. The larger blocks correspond to the superpixel size, and the
	/// levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels,
	/// recursively until the smaller block level. An example of initialization of 4 block levels is
	/// illustrated in the following figure.
	///
	/// ![image](https://docs.opencv.org/4.11.0/superpixels_blocks.png)
	///
	/// ## Note
	/// This alternative version of [create_superpixel_seeds] function uses the following default values for its arguments:
	/// * prior: 2
	/// * histogram_bins: 5
	/// * double_step: false
	#[inline]
	pub fn create_superpixel_seeds_def(image_width: i32, image_height: i32, image_channels: i32, num_superpixels: i32, num_levels: i32) -> Result<core::Ptr<crate::ximgproc::SuperpixelSEEDS>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createSuperpixelSEEDS_int_int_int_int_int(image_width, image_height, image_channels, num_superpixels, num_levels, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SuperpixelSEEDS>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Initializes a SuperpixelSEEDS object.
	///
	/// ## Parameters
	/// * image_width: Image width.
	/// * image_height: Image height.
	/// * image_channels: Number of channels of the image.
	/// * num_superpixels: Desired number of superpixels. Note that the actual number may be smaller
	/// due to restrictions (depending on the image size and num_levels). Use getNumberOfSuperpixels() to
	/// get the actual number.
	/// * num_levels: Number of block levels. The more levels, the more accurate is the segmentation,
	/// but needs more memory and CPU time.
	/// * prior: enable 3x3 shape smoothing term if \>0. A larger value leads to smoother shapes. prior
	/// must be in the range [0, 5].
	/// * histogram_bins: Number of histogram bins.
	/// * double_step: If true, iterate each block level twice for higher accuracy.
	///
	/// The function initializes a SuperpixelSEEDS object for the input image. It stores the parameters of
	/// the image: image_width, image_height and image_channels. It also sets the parameters of the SEEDS
	/// superpixel algorithm, which are: num_superpixels, num_levels, use_prior, histogram_bins and
	/// double_step.
	///
	/// The number of levels in num_levels defines the amount of block levels that the algorithm use in the
	/// optimization. The initialization is a grid, in which the superpixels are equally distributed through
	/// the width and the height of the image. The larger blocks correspond to the superpixel size, and the
	/// levels with smaller blocks are formed by dividing the larger blocks into 2 x 2 blocks of pixels,
	/// recursively until the smaller block level. An example of initialization of 4 block levels is
	/// illustrated in the following figure.
	///
	/// ![image](https://docs.opencv.org/4.11.0/superpixels_blocks.png)
	///
	/// ## C++ default parameters
	/// * prior: 2
	/// * histogram_bins: 5
	/// * double_step: false
	#[inline]
	pub fn create_superpixel_seeds(image_width: i32, image_height: i32, image_channels: i32, num_superpixels: i32, num_levels: i32, prior: i32, histogram_bins: i32, double_step: bool) -> Result<core::Ptr<crate::ximgproc::SuperpixelSEEDS>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createSuperpixelSEEDS_int_int_int_int_int_int_int_bool(image_width, image_height, image_channels, num_superpixels, num_levels, prior, histogram_bins, double_step, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SuperpixelSEEDS>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Initialize a SuperpixelSLIC object
	///
	/// ## Parameters
	/// * image: Image to segment
	/// * algorithm: Chooses the algorithm variant to use:
	/// SLIC segments image using a desired region_size, and in addition SLICO will optimize using adaptive compactness factor,
	/// while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels.
	/// * region_size: Chooses an average superpixel size measured in pixels
	/// * ruler: Chooses the enforcement of superpixel smoothness factor of superpixel
	///
	/// The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed
	/// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
	/// computing iterations over the given image. For enanched results it is recommended for color images to
	/// preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into
	/// CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture.
	///
	/// ![image](https://docs.opencv.org/4.11.0/superpixels_slic.png)
	///
	/// ## Note
	/// This alternative version of [create_superpixel_slic] function uses the following default values for its arguments:
	/// * algorithm: SLICO
	/// * region_size: 10
	/// * ruler: 10.0f
	#[inline]
	pub fn create_superpixel_slic_def(image: &impl ToInputArray) -> Result<core::Ptr<crate::ximgproc::SuperpixelSLIC>> {
		input_array_arg!(image);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createSuperpixelSLIC_const__InputArrayR(image.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SuperpixelSLIC>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Initialize a SuperpixelSLIC object
	///
	/// ## Parameters
	/// * image: Image to segment
	/// * algorithm: Chooses the algorithm variant to use:
	/// SLIC segments image using a desired region_size, and in addition SLICO will optimize using adaptive compactness factor,
	/// while MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels.
	/// * region_size: Chooses an average superpixel size measured in pixels
	/// * ruler: Chooses the enforcement of superpixel smoothness factor of superpixel
	///
	/// The function initializes a SuperpixelSLIC object for the input image. It sets the parameters of choosed
	/// superpixel algorithm, which are: region_size and ruler. It preallocate some buffers for future
	/// computing iterations over the given image. For enanched results it is recommended for color images to
	/// preprocess image with little gaussian blur using a small 3 x 3 kernel and additional conversion into
	/// CieLAB color space. An example of SLIC versus SLICO and MSLIC is ilustrated in the following picture.
	///
	/// ![image](https://docs.opencv.org/4.11.0/superpixels_slic.png)
	///
	/// ## C++ default parameters
	/// * algorithm: SLICO
	/// * region_size: 10
	/// * ruler: 10.0f
	#[inline]
	pub fn create_superpixel_slic(image: &impl ToInputArray, algorithm: i32, region_size: i32, ruler: f32) -> Result<core::Ptr<crate::ximgproc::SuperpixelSLIC>> {
		input_array_arg!(image);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_createSuperpixelSLIC_const__InputArrayR_int_int_float(image.as_raw__InputArray(), algorithm, region_size, ruler, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SuperpixelSLIC>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Simple one-line Domain Transform filter call. If you have multiple images to filter with the same
	/// guided image then use DTFilter interface to avoid extra computations on initialization stage.
	///
	/// ## Parameters
	/// * guide: guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit
	/// depth and up to 4 channels.
	/// * src: filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.
	/// * dst: destination image
	/// * sigmaSpatial: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5FH) parameter in the original article, it's similar to the sigma in the
	/// coordinate space into bilateralFilter.
	/// * sigmaColor: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5Fr) parameter in the original article, it's similar to the sigma in the
	/// color space into bilateralFilter.
	/// * mode: one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
	/// filtering 2D signals in the article.
	/// * numIters: optional number of iterations used for filtering, 3 is quite enough.
	/// ## See also
	/// bilateralFilter, guidedFilter, amFilter
	///
	/// ## Note
	/// This alternative version of [dt_filter] function uses the following default values for its arguments:
	/// * mode: DTF_NC
	/// * num_iters: 3
	#[inline]
	pub fn dt_filter_def(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, sigma_spatial: f64, sigma_color: f64) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_dtFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_double_double(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), sigma_spatial, sigma_color, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line Domain Transform filter call. If you have multiple images to filter with the same
	/// guided image then use DTFilter interface to avoid extra computations on initialization stage.
	///
	/// ## Parameters
	/// * guide: guided image (also called as joint image) with unsigned 8-bit or floating-point 32-bit
	/// depth and up to 4 channels.
	/// * src: filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.
	/// * dst: destination image
	/// * sigmaSpatial: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5FH) parameter in the original article, it's similar to the sigma in the
	/// coordinate space into bilateralFilter.
	/// * sigmaColor: ![inline formula](https://latex.codecogs.com/png.latex?%7B%5Csigma%7D%5Fr) parameter in the original article, it's similar to the sigma in the
	/// color space into bilateralFilter.
	/// * mode: one form three modes DTF_NC, DTF_RF and DTF_IC which corresponds to three modes for
	/// filtering 2D signals in the article.
	/// * numIters: optional number of iterations used for filtering, 3 is quite enough.
	/// ## See also
	/// bilateralFilter, guidedFilter, amFilter
	///
	/// ## C++ default parameters
	/// * mode: DTF_NC
	/// * num_iters: 3
	#[inline]
	pub fn dt_filter(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, sigma_spatial: f64, sigma_color: f64, mode: i32, num_iters: i32) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_dtFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_double_double_int_int(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), sigma_spatial, sigma_color, mode, num_iters, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Smoothes an image using the Edge-Preserving filter.
	///
	/// The function smoothes Gaussian noise as well as salt & pepper noise.
	/// For more details about this implementation, please see
	/// [ReiWoe18]  Reich, S. and Wörgötter, F. and Dellen, B. (2018). A Real-Time Edge-Preserving Denoising Filter. Proceedings of the 13th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP): Visapp, 85-94, 4. DOI: 10.5220/0006509000850094.
	///
	/// ## Parameters
	/// * src: Source 8-bit 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. Must be greater or equal 3.
	/// * threshold: Threshold, which distinguishes between noise, outliers, and data.
	#[inline]
	pub fn edge_preserving_filter(src: &impl ToInputArray, dst: &mut impl ToOutputArray, d: i32, threshold: f64) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_edgePreservingFilter_const__InputArrayR_const__OutputArrayR_int_double(src.as_raw__InputArray(), dst.as_raw__OutputArray(), d, threshold, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
	/// guide then use FastBilateralSolverFilter interface to avoid extra computations.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
	///
	/// * confidence: confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
	///
	/// * dst: destination image.
	///
	/// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
	///
	/// * lambda: smoothness strength parameter for solver.
	///
	/// * num_iter: number of iterations used for solver, 25 is usually enough.
	///
	/// * max_tol: convergence tolerance used for solver.
	///
	/// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BarronPoole2016).
	///
	///
	/// Note: Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
	///
	/// ## Note
	/// This alternative version of [fast_bilateral_solver_filter] function uses the following default values for its arguments:
	/// * sigma_spatial: 8
	/// * sigma_luma: 8
	/// * sigma_chroma: 8
	/// * lambda: 128.0
	/// * num_iter: 25
	/// * max_tol: 1e-5
	#[inline]
	pub fn fast_bilateral_solver_filter_def(guide: &impl ToInputArray, src: &impl ToInputArray, confidence: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		input_array_arg!(confidence);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_fastBilateralSolverFilter_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR(guide.as_raw__InputArray(), src.as_raw__InputArray(), confidence.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line Fast Bilateral Solver filter call. If you have multiple images to filter with the same
	/// guide then use FastBilateralSolverFilter interface to avoid extra computations.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
	///
	/// * confidence: confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
	///
	/// * dst: destination image.
	///
	/// * sigma_spatial: parameter, that is similar to spatial space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_luma: parameter, that is similar to luma space sigma (bandwidth) in bilateralFilter.
	///
	/// * sigma_chroma: parameter, that is similar to chroma space sigma (bandwidth) in bilateralFilter.
	///
	/// * lambda: smoothness strength parameter for solver.
	///
	/// * num_iter: number of iterations used for solver, 25 is usually enough.
	///
	/// * max_tol: convergence tolerance used for solver.
	///
	/// For more details about the Fast Bilateral Solver parameters, see the original paper [BarronPoole2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BarronPoole2016).
	///
	///
	/// Note: Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
	///
	/// ## C++ default parameters
	/// * sigma_spatial: 8
	/// * sigma_luma: 8
	/// * sigma_chroma: 8
	/// * lambda: 128.0
	/// * num_iter: 25
	/// * max_tol: 1e-5
	#[inline]
	pub fn fast_bilateral_solver_filter(guide: &impl ToInputArray, src: &impl ToInputArray, confidence: &impl ToInputArray, dst: &mut impl ToOutputArray, sigma_spatial: f64, sigma_luma: f64, sigma_chroma: f64, lambda: f64, num_iter: i32, max_tol: f64) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		input_array_arg!(confidence);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_fastBilateralSolverFilter_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR_double_double_double_double_int_double(guide.as_raw__InputArray(), src.as_raw__InputArray(), confidence.as_raw__InputArray(), dst.as_raw__OutputArray(), sigma_spatial, sigma_luma, sigma_chroma, lambda, num_iter, max_tol, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same
	/// guide then use FastGlobalSmootherFilter interface to avoid extra computations.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
	///
	/// * dst: destination image.
	///
	/// * lambda: parameter defining the amount of regularization
	///
	/// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter.
	///
	/// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally,
	/// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
	///
	/// * num_iter: number of iterations used for filtering, 3 is usually enough.
	///
	/// ## Note
	/// This alternative version of [fast_global_smoother_filter] function uses the following default values for its arguments:
	/// * lambda_attenuation: 0.25
	/// * num_iter: 3
	#[inline]
	pub fn fast_global_smoother_filter_def(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, lambda: f64, sigma_color: f64) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_fastGlobalSmootherFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_double_double(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), lambda, sigma_color, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line Fast Global Smoother filter call. If you have multiple images to filter with the same
	/// guide then use FastGlobalSmootherFilter interface to avoid extra computations.
	///
	/// ## Parameters
	/// * guide: image serving as guide for filtering. It should have 8-bit depth and either 1 or 3 channels.
	///
	/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
	///
	/// * dst: destination image.
	///
	/// * lambda: parameter defining the amount of regularization
	///
	/// * sigma_color: parameter, that is similar to color space sigma in bilateralFilter.
	///
	/// * lambda_attenuation: internal parameter, defining how much lambda decreases after each iteration. Normally,
	/// it should be 0.25. Setting it to 1.0 may lead to streaking artifacts.
	///
	/// * num_iter: number of iterations used for filtering, 3 is usually enough.
	///
	/// ## C++ default parameters
	/// * lambda_attenuation: 0.25
	/// * num_iter: 3
	#[inline]
	pub fn fast_global_smoother_filter(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, lambda: f64, sigma_color: f64, lambda_attenuation: f64, num_iter: i32) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_fastGlobalSmootherFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_double_double_double_int(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), lambda, sigma_color, lambda_attenuation, num_iter, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Finds ellipses fastly in an image using projective invariant pruning.
	/// *
	/// * The function detects ellipses in images using projective invariant pruning.
	/// * For more details about this implementation, please see [jia2017fast](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_jia2017fast)
	/// * Jia, Qi et al, (2017).
	/// * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing.
	/// *
	/// ## Parameters
	/// * image: input image, could be gray or color.
	/// * ellipses: output vector of found ellipses. each vector is encoded as five float $x, y, a, b, radius, score$.
	/// * scoreThreshold: float, the threshold of ellipse score.
	/// * reliabilityThreshold: float, the threshold of reliability.
	/// * centerDistanceThreshold: float, the threshold of center distance.
	///
	/// ## Note
	/// This alternative version of [find_ellipses] function uses the following default values for its arguments:
	/// * score_threshold: 0.7f
	/// * reliability_threshold: 0.5f
	/// * center_distance_threshold: 0.05f
	#[inline]
	pub fn find_ellipses_def(image: &impl ToInputArray, ellipses: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(image);
		output_array_arg!(ellipses);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_findEllipses_const__InputArrayR_const__OutputArrayR(image.as_raw__InputArray(), ellipses.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Finds ellipses fastly in an image using projective invariant pruning.
	/// *
	/// * The function detects ellipses in images using projective invariant pruning.
	/// * For more details about this implementation, please see [jia2017fast](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_jia2017fast)
	/// * Jia, Qi et al, (2017).
	/// * A Fast Ellipse Detector using Projective Invariant Pruning. IEEE Transactions on Image Processing.
	/// *
	/// ## Parameters
	/// * image: input image, could be gray or color.
	/// * ellipses: output vector of found ellipses. each vector is encoded as five float $x, y, a, b, radius, score$.
	/// * scoreThreshold: float, the threshold of ellipse score.
	/// * reliabilityThreshold: float, the threshold of reliability.
	/// * centerDistanceThreshold: float, the threshold of center distance.
	///
	/// ## C++ default parameters
	/// * score_threshold: 0.7f
	/// * reliability_threshold: 0.5f
	/// * center_distance_threshold: 0.05f
	#[inline]
	pub fn find_ellipses(image: &impl ToInputArray, ellipses: &mut impl ToOutputArray, score_threshold: f32, reliability_threshold: f32, center_distance_threshold: f32) -> Result<()> {
		input_array_arg!(image);
		output_array_arg!(ellipses);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_findEllipses_const__InputArrayR_const__OutputArrayR_float_float_float(image.as_raw__InputArray(), ellipses.as_raw__OutputArray(), score_threshold, reliability_threshold, center_distance_threshold, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Fourier descriptors for planed closed curves
	///
	/// For more details about this implementation, please see [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977)
	///
	/// ## Parameters
	/// * src: contour type vector<Point> , vector<Point2f>  or vector<Point2d>
	/// * dst: Mat of type CV_64FC2 and nbElt rows A VERIFIER
	/// * nbElt: number of rows in dst or getOptimalDFTSize rows if nbElt=-1
	/// * nbFD: number of FD return in dst dst = [FD(1...nbFD/2) FD(nbFD/2-nbElt+1...:nbElt)]
	///
	/// ## Note
	/// This alternative version of [fourier_descriptor] function uses the following default values for its arguments:
	/// * nb_elt: -1
	/// * nb_fd: -1
	#[inline]
	pub fn fourier_descriptor_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_fourierDescriptor_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Fourier descriptors for planed closed curves
	///
	/// For more details about this implementation, please see [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977)
	///
	/// ## Parameters
	/// * src: contour type vector<Point> , vector<Point2f>  or vector<Point2d>
	/// * dst: Mat of type CV_64FC2 and nbElt rows A VERIFIER
	/// * nbElt: number of rows in dst or getOptimalDFTSize rows if nbElt=-1
	/// * nbFD: number of FD return in dst dst = [FD(1...nbFD/2) FD(nbFD/2-nbElt+1...:nbElt)]
	///
	/// ## C++ default parameters
	/// * nb_elt: -1
	/// * nb_fd: -1
	#[inline]
	pub fn fourier_descriptor(src: &impl ToInputArray, dst: &mut impl ToOutputArray, nb_elt: i32, nb_fd: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_fourierDescriptor_const__InputArrayR_const__OutputArrayR_int_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), nb_elt, nb_fd, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Function for creating a disparity map visualization (clamped CV_8U image)
	///
	/// ## Parameters
	/// * src: input disparity map (CV_16S depth)
	///
	/// * dst: output visualization
	///
	/// * scale: disparity map will be multiplied by this value for visualization
	///
	/// ## Note
	/// This alternative version of [get_disparity_vis] function uses the following default values for its arguments:
	/// * scale: 1.0
	#[inline]
	pub fn get_disparity_vis_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_getDisparityVis_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Function for creating a disparity map visualization (clamped CV_8U image)
	///
	/// ## Parameters
	/// * src: input disparity map (CV_16S depth)
	///
	/// * dst: output visualization
	///
	/// * scale: disparity map will be multiplied by this value for visualization
	///
	/// ## C++ default parameters
	/// * scale: 1.0
	#[inline]
	pub fn get_disparity_vis(src: &impl ToInputArray, dst: &mut impl ToOutputArray, scale: f64) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_getDisparityVis_const__InputArrayR_const__OutputArrayR_double(src.as_raw__InputArray(), dst.as_raw__OutputArray(), scale, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line (Fast) Guided Filter call.
	///
	/// If you have multiple images to filter with the same guided image then use GuidedFilter interface to
	/// avoid extra computations on initialization stage.
	///
	/// ## Parameters
	/// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3
	/// channels then only first 3 channels will be used.
	///
	/// * src: filtering image with any numbers of channels.
	///
	/// * dst: output image.
	///
	/// * radius: radius of Guided Filter.
	///
	/// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color
	/// space into bilateralFilter.
	///
	/// * dDepth: optional depth of the output image.
	///
	/// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation
	/// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter)
	/// ## See also
	/// bilateralFilter, dtFilter, amFilter
	///
	/// ## Note
	/// This alternative version of [guided_filter] function uses the following default values for its arguments:
	/// * d_depth: -1
	/// * scale: 1.0
	#[inline]
	pub fn guided_filter_def(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, radius: i32, eps: f64) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_guidedFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), radius, eps, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Simple one-line (Fast) Guided Filter call.
	///
	/// If you have multiple images to filter with the same guided image then use GuidedFilter interface to
	/// avoid extra computations on initialization stage.
	///
	/// ## Parameters
	/// * guide: guided image (or array of images) with up to 3 channels, if it have more then 3
	/// channels then only first 3 channels will be used.
	///
	/// * src: filtering image with any numbers of channels.
	///
	/// * dst: output image.
	///
	/// * radius: radius of Guided Filter.
	///
	/// * eps: regularization term of Guided Filter. ![inline formula](https://latex.codecogs.com/png.latex?%7Beps%7D%5E2) is similar to the sigma in the color
	/// space into bilateralFilter.
	///
	/// * dDepth: optional depth of the output image.
	///
	/// * scale: subsample factor of Fast Guided Filter, use a scale less than 1 to speeds up computation
	/// with almost no visible degradation. (e.g. scale==0.5 shrinks the image by 2x inside the filter)
	/// ## See also
	/// bilateralFilter, dtFilter, amFilter
	///
	/// ## C++ default parameters
	/// * d_depth: -1
	/// * scale: 1.0
	#[inline]
	pub fn guided_filter(guide: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, radius: i32, eps: f64, d_depth: i32, scale: f64) -> Result<()> {
		input_array_arg!(guide);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_guidedFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_int_double(guide.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), radius, eps, d_depth, scale, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies the joint bilateral filter to an image.
	///
	/// ## Parameters
	/// * joint: Joint 8-bit or floating-point, 1-channel or 3-channel image.
	///
	/// * src: Source 8-bit or floating-point, 1-channel or 3-channel image with the same depth as joint
	/// 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: 
	///
	///
	/// Note: bilateralFilter and jointBilateralFilter use L1 norm to compute difference between colors.
	/// ## See also
	/// bilateralFilter, amFilter
	///
	/// ## Note
	/// This alternative version of [joint_bilateral_filter] function uses the following default values for its arguments:
	/// * border_type: BORDER_DEFAULT
	#[inline]
	pub fn joint_bilateral_filter_def(joint: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, d: i32, sigma_color: f64, sigma_space: f64) -> Result<()> {
		input_array_arg!(joint);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_jointBilateralFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_double(joint.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), d, sigma_color, sigma_space, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies the joint bilateral filter to an image.
	///
	/// ## Parameters
	/// * joint: Joint 8-bit or floating-point, 1-channel or 3-channel image.
	///
	/// * src: Source 8-bit or floating-point, 1-channel or 3-channel image with the same depth as joint
	/// 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: 
	///
	///
	/// Note: bilateralFilter and jointBilateralFilter use L1 norm to compute difference between colors.
	/// ## See also
	/// bilateralFilter, amFilter
	///
	/// ## C++ default parameters
	/// * border_type: BORDER_DEFAULT
	#[inline]
	pub fn joint_bilateral_filter(joint: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, d: i32, sigma_color: f64, sigma_space: f64, border_type: i32) -> Result<()> {
		input_array_arg!(joint);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_jointBilateralFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_double_int(joint.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), d, sigma_color, sigma_space, border_type, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Global image smoothing via L0 gradient minimization.
	///
	/// ## Parameters
	/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point depth.
	///
	/// * dst: destination image.
	///
	/// * lambda: parameter defining the smooth term weight.
	///
	/// * kappa: parameter defining the increasing factor of the weight of the gradient data term.
	///
	/// For more details about L0 Smoother, see the original paper [xu2011image](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_xu2011image).
	///
	/// ## Note
	/// This alternative version of [l0_smooth] function uses the following default values for its arguments:
	/// * lambda: 0.02
	/// * kappa: 2.0
	#[inline]
	pub fn l0_smooth_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_l0Smooth_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Global image smoothing via L0 gradient minimization.
	///
	/// ## Parameters
	/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point depth.
	///
	/// * dst: destination image.
	///
	/// * lambda: parameter defining the smooth term weight.
	///
	/// * kappa: parameter defining the increasing factor of the weight of the gradient data term.
	///
	/// For more details about L0 Smoother, see the original paper [xu2011image](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_xu2011image).
	///
	/// ## C++ default parameters
	/// * lambda: 0.02
	/// * kappa: 2.0
	#[inline]
	pub fn l0_smooth(src: &impl ToInputArray, dst: &mut impl ToOutputArray, lambda: f64, kappa: f64) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_l0Smooth_const__InputArrayR_const__OutputArrayR_double_double(src.as_raw__InputArray(), dst.as_raw__OutputArray(), lambda, kappa, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Performs thresholding on input images using Niblack's technique or some of the
	/// popular variations it inspired.
	///
	/// The function transforms a grayscale image to a binary image according to the formulae:
	/// *   **THRESH_BINARY**
	///    ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B%5Ctexttt%7BmaxValue%7D%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B0%7D%7Botherwise%7D)
	/// *   **THRESH_BINARY_INV**
	///    ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B0%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B%5Ctexttt%7BmaxValue%7D%7D%7Botherwise%7D)
	/// where ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2Cy%29) is a threshold calculated individually for each pixel.
	///
	/// The threshold value ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2C%20y%29) is determined based on the binarization method chosen. For
	/// classic Niblack, it is the mean minus ![inline formula](https://latex.codecogs.com/png.latex?%20k%20) times standard deviation of
	/// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BblockSize%7D%20%5Ctimes%5Ctexttt%7BblockSize%7D) neighborhood of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29).
	///
	/// The function can't 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,
	/// used with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
	/// * type: Thresholding type, see cv::ThresholdTypes.
	/// * blockSize: Size of a pixel neighborhood that is used to calculate a threshold value
	/// for the pixel: 3, 5, 7, and so on.
	/// * k: The user-adjustable parameter used by Niblack and inspired techniques. For Niblack, this is
	/// normally a value between 0 and 1 that is multiplied with the standard deviation and subtracted from
	/// the mean.
	/// * binarizationMethod: Binarization method to use. By default, Niblack's technique is used.
	/// Other techniques can be specified, see cv::ximgproc::LocalBinarizationMethods.
	/// * r: The user-adjustable parameter used by Sauvola's technique. This is the dynamic range
	/// of standard deviation.
	/// ## See also
	/// threshold, adaptiveThreshold
	///
	/// ## Note
	/// This alternative version of [ni_black_threshold] function uses the following default values for its arguments:
	/// * binarization_method: BINARIZATION_NIBLACK
	/// * r: 128
	#[inline]
	pub fn ni_black_threshold_def(_src: &impl ToInputArray, _dst: &mut impl ToOutputArray, max_value: f64, typ: i32, block_size: i32, k: f64) -> Result<()> {
		input_array_arg!(_src);
		output_array_arg!(_dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_niBlackThreshold_const__InputArrayR_const__OutputArrayR_double_int_int_double(_src.as_raw__InputArray(), _dst.as_raw__OutputArray(), max_value, typ, block_size, k, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Performs thresholding on input images using Niblack's technique or some of the
	/// popular variations it inspired.
	///
	/// The function transforms a grayscale image to a binary image according to the formulae:
	/// *   **THRESH_BINARY**
	///    ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B%5Ctexttt%7BmaxValue%7D%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B0%7D%7Botherwise%7D)
	/// *   **THRESH_BINARY_INV**
	///    ![block formula](https://latex.codecogs.com/png.latex?dst%28x%2Cy%29%20%3D%20%20%5Cfork%7B0%7D%7Bif%20%5C%28src%28x%2Cy%29%20%3E%20T%28x%2Cy%29%5C%29%7D%7B%5Ctexttt%7BmaxValue%7D%7D%7Botherwise%7D)
	/// where ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2Cy%29) is a threshold calculated individually for each pixel.
	///
	/// The threshold value ![inline formula](https://latex.codecogs.com/png.latex?T%28x%2C%20y%29) is determined based on the binarization method chosen. For
	/// classic Niblack, it is the mean minus ![inline formula](https://latex.codecogs.com/png.latex?%20k%20) times standard deviation of
	/// ![inline formula](https://latex.codecogs.com/png.latex?%5Ctexttt%7BblockSize%7D%20%5Ctimes%5Ctexttt%7BblockSize%7D) neighborhood of ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%29).
	///
	/// The function can't 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,
	/// used with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
	/// * type: Thresholding type, see cv::ThresholdTypes.
	/// * blockSize: Size of a pixel neighborhood that is used to calculate a threshold value
	/// for the pixel: 3, 5, 7, and so on.
	/// * k: The user-adjustable parameter used by Niblack and inspired techniques. For Niblack, this is
	/// normally a value between 0 and 1 that is multiplied with the standard deviation and subtracted from
	/// the mean.
	/// * binarizationMethod: Binarization method to use. By default, Niblack's technique is used.
	/// Other techniques can be specified, see cv::ximgproc::LocalBinarizationMethods.
	/// * r: The user-adjustable parameter used by Sauvola's technique. This is the dynamic range
	/// of standard deviation.
	/// ## See also
	/// threshold, adaptiveThreshold
	///
	/// ## C++ default parameters
	/// * binarization_method: BINARIZATION_NIBLACK
	/// * r: 128
	#[inline]
	pub fn ni_black_threshold(_src: &impl ToInputArray, _dst: &mut impl ToOutputArray, max_value: f64, typ: i32, block_size: i32, k: f64, binarization_method: i32, r: f64) -> Result<()> {
		input_array_arg!(_src);
		output_array_arg!(_dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_niBlackThreshold_const__InputArrayR_const__OutputArrayR_double_int_int_double_int_double(_src.as_raw__InputArray(), _dst.as_raw__OutputArray(), max_value, typ, block_size, k, binarization_method, r, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// calculates conjugate of a quaternion image.
	///
	/// ## Parameters
	/// * qimg: quaternion image.
	/// * qcimg: conjugate of qimg
	#[inline]
	pub fn qconj(qimg: &impl ToInputArray, qcimg: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(qimg);
		output_array_arg!(qcimg);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_qconj_const__InputArrayR_const__OutputArrayR(qimg.as_raw__InputArray(), qcimg.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Performs a forward or inverse Discrete quaternion Fourier transform of a 2D quaternion array.
	///
	/// ## Parameters
	/// * img: quaternion image.
	/// * qimg: quaternion image in dual space.
	/// * flags: quaternion image in dual space. only DFT_INVERSE flags is supported
	/// * sideLeft: true the hypercomplex exponential is to be multiplied on the left (false on the right ).
	#[inline]
	pub fn qdft(img: &impl ToInputArray, qimg: &mut impl ToOutputArray, flags: i32, side_left: bool) -> Result<()> {
		input_array_arg!(img);
		output_array_arg!(qimg);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_qdft_const__InputArrayR_const__OutputArrayR_int_bool(img.as_raw__InputArray(), qimg.as_raw__OutputArray(), flags, side_left, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Calculates the per-element quaternion product of two arrays
	///
	/// ## Parameters
	/// * src1: quaternion image.
	/// * src2: quaternion image.
	/// * dst: product dst(I)=src1(I) . src2(I)
	#[inline]
	pub fn qmultiply(src1: &impl ToInputArray, src2: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src1);
		input_array_arg!(src2);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_qmultiply_const__InputArrayR_const__InputArrayR_const__OutputArrayR(src1.as_raw__InputArray(), src2.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// divides each element by its modulus.
	///
	/// ## Parameters
	/// * qimg: quaternion image.
	/// * qnimg: conjugate of qimg
	#[inline]
	pub fn qunitary(qimg: &impl ToInputArray, qnimg: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(qimg);
		output_array_arg!(qnimg);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_qunitary_const__InputArrayR_const__OutputArrayR(qimg.as_raw__InputArray(), qnimg.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Function for reading ground truth disparity maps. Supports basic Middlebury
	/// and MPI-Sintel formats. Note that the resulting disparity map is scaled by 16.
	///
	/// ## Parameters
	/// * src_path: path to the image, containing ground-truth disparity map
	///
	/// * dst: output disparity map, CV_16S depth
	///
	/// @result returns zero if successfully read the ground truth
	#[inline]
	pub fn read_gt(src_path: &str, dst: &mut impl ToOutputArray) -> Result<i32> {
		extern_container_arg!(src_path);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_readGT_String_const__OutputArrayR(src_path.opencv_as_extern(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Creates a run-length encoded image from a vector of runs (column begin, column end, row)
	///
	/// ## Parameters
	/// * runs: vector of runs
	/// * res: result
	/// * size: image size (to be used if an "on" boundary should be used in erosion, using the default
	///                  means that the size is computed from the extension of the input)
	///
	/// ## Note
	/// This alternative version of [create_rle_image] function uses the following default values for its arguments:
	/// * size: Size(0,0)
	#[inline]
	pub fn create_rle_image_def(runs: &core::Vector<core::Point3i>, res: &mut impl ToOutputArray) -> Result<()> {
		output_array_arg!(res);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_createRLEImage_const_vectorLPoint3iGR_const__OutputArrayR(runs.as_raw_VectorOfPoint3i(), res.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Creates a run-length encoded image from a vector of runs (column begin, column end, row)
	///
	/// ## Parameters
	/// * runs: vector of runs
	/// * res: result
	/// * size: image size (to be used if an "on" boundary should be used in erosion, using the default
	///                  means that the size is computed from the extension of the input)
	///
	/// ## C++ default parameters
	/// * size: Size(0,0)
	#[inline]
	pub fn create_rle_image(runs: &core::Vector<core::Point3i>, res: &mut impl ToOutputArray, size: core::Size) -> Result<()> {
		output_array_arg!(res);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_createRLEImage_const_vectorLPoint3iGR_const__OutputArrayR_Size(runs.as_raw_VectorOfPoint3i(), res.as_raw__OutputArray(), &size, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Dilates an run-length encoded binary image by using a specific structuring element.
	///
	///
	/// ## Parameters
	/// * rlSrc: input image
	/// * rlDest: result
	/// * rlKernel: kernel
	/// * anchor: position of the anchor within the element; default value (0, 0)
	///                      is usually the element center.
	///
	/// ## Note
	/// This alternative version of [dilate] function uses the following default values for its arguments:
	/// * anchor: Point(0,0)
	#[inline]
	pub fn dilate_def(rl_src: &impl ToInputArray, rl_dest: &mut impl ToOutputArray, rl_kernel: &impl ToInputArray) -> Result<()> {
		input_array_arg!(rl_src);
		output_array_arg!(rl_dest);
		input_array_arg!(rl_kernel);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_dilate_const__InputArrayR_const__OutputArrayR_const__InputArrayR(rl_src.as_raw__InputArray(), rl_dest.as_raw__OutputArray(), rl_kernel.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Dilates an run-length encoded binary image by using a specific structuring element.
	///
	///
	/// ## Parameters
	/// * rlSrc: input image
	/// * rlDest: result
	/// * rlKernel: kernel
	/// * anchor: position of the anchor within the element; default value (0, 0)
	///                      is usually the element center.
	///
	/// ## C++ default parameters
	/// * anchor: Point(0,0)
	#[inline]
	pub fn dilate(rl_src: &impl ToInputArray, rl_dest: &mut impl ToOutputArray, rl_kernel: &impl ToInputArray, anchor: core::Point) -> Result<()> {
		input_array_arg!(rl_src);
		output_array_arg!(rl_dest);
		input_array_arg!(rl_kernel);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_dilate_const__InputArrayR_const__OutputArrayR_const__InputArrayR_Point(rl_src.as_raw__InputArray(), rl_dest.as_raw__OutputArray(), rl_kernel.as_raw__InputArray(), &anchor, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Erodes an run-length encoded binary image by using a specific structuring element.
	///
	///
	/// ## Parameters
	/// * rlSrc: input image
	/// * rlDest: result
	/// * rlKernel: kernel
	/// * bBoundaryOn: indicates whether pixel outside the image boundary are assumed to be on
	///          (True: works in the same way as the default of cv::erode, False: is a little faster)
	/// * anchor: position of the anchor within the element; default value (0, 0)
	///                      is usually the element center.
	///
	/// ## Note
	/// This alternative version of [erode] function uses the following default values for its arguments:
	/// * b_boundary_on: true
	/// * anchor: Point(0,0)
	#[inline]
	pub fn erode_def(rl_src: &impl ToInputArray, rl_dest: &mut impl ToOutputArray, rl_kernel: &impl ToInputArray) -> Result<()> {
		input_array_arg!(rl_src);
		output_array_arg!(rl_dest);
		input_array_arg!(rl_kernel);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_erode_const__InputArrayR_const__OutputArrayR_const__InputArrayR(rl_src.as_raw__InputArray(), rl_dest.as_raw__OutputArray(), rl_kernel.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Erodes an run-length encoded binary image by using a specific structuring element.
	///
	///
	/// ## Parameters
	/// * rlSrc: input image
	/// * rlDest: result
	/// * rlKernel: kernel
	/// * bBoundaryOn: indicates whether pixel outside the image boundary are assumed to be on
	///          (True: works in the same way as the default of cv::erode, False: is a little faster)
	/// * anchor: position of the anchor within the element; default value (0, 0)
	///                      is usually the element center.
	///
	/// ## C++ default parameters
	/// * b_boundary_on: true
	/// * anchor: Point(0,0)
	#[inline]
	pub fn erode(rl_src: &impl ToInputArray, rl_dest: &mut impl ToOutputArray, rl_kernel: &impl ToInputArray, b_boundary_on: bool, anchor: core::Point) -> Result<()> {
		input_array_arg!(rl_src);
		output_array_arg!(rl_dest);
		input_array_arg!(rl_kernel);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_erode_const__InputArrayR_const__OutputArrayR_const__InputArrayR_bool_Point(rl_src.as_raw__InputArray(), rl_dest.as_raw__OutputArray(), rl_kernel.as_raw__InputArray(), b_boundary_on, &anchor, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Returns a run length encoded structuring element of the specified size and shape.
	///
	///
	/// ## Parameters
	/// * shape: 	Element shape that can be one of cv::MorphShapes
	/// * ksize: 	Size of the structuring element.
	#[inline]
	pub fn get_structuring_element(shape: i32, ksize: core::Size) -> Result<core::Mat> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_getStructuringElement_int_Size(shape, &ksize, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Mat::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Check whether a custom made structuring element can be used with run length morphological operations.
	///          (It must consist of a continuous array of single runs per row)
	///
	/// ## Parameters
	/// * rlStructuringElement: mask to be tested
	#[inline]
	pub fn is_rl_morphology_possible(rl_structuring_element: &impl ToInputArray) -> Result<bool> {
		input_array_arg!(rl_structuring_element);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_isRLMorphologyPossible_const__InputArrayR(rl_structuring_element.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies a morphological operation to a run-length encoded binary image.
	///
	///
	/// ## Parameters
	/// * rlSrc: input image
	/// * rlDest: result
	/// * op: all operations supported by cv::morphologyEx (except cv::MORPH_HITMISS)
	/// * rlKernel: kernel
	/// * bBoundaryOnForErosion: indicates whether pixel outside the image boundary are assumed
	///          to be on for erosion operations (True: works in the same way as the default of cv::erode,
	///          False: is a little faster)
	/// * anchor: position of the anchor within the element; default value (0, 0) is usually the element center.
	///
	/// ## Note
	/// This alternative version of [morphology_ex] function uses the following default values for its arguments:
	/// * b_boundary_on_for_erosion: true
	/// * anchor: Point(0,0)
	#[inline]
	pub fn morphology_ex_def(rl_src: &impl ToInputArray, rl_dest: &mut impl ToOutputArray, op: i32, rl_kernel: &impl ToInputArray) -> Result<()> {
		input_array_arg!(rl_src);
		output_array_arg!(rl_dest);
		input_array_arg!(rl_kernel);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_morphologyEx_const__InputArrayR_const__OutputArrayR_int_const__InputArrayR(rl_src.as_raw__InputArray(), rl_dest.as_raw__OutputArray(), op, rl_kernel.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies a morphological operation to a run-length encoded binary image.
	///
	///
	/// ## Parameters
	/// * rlSrc: input image
	/// * rlDest: result
	/// * op: all operations supported by cv::morphologyEx (except cv::MORPH_HITMISS)
	/// * rlKernel: kernel
	/// * bBoundaryOnForErosion: indicates whether pixel outside the image boundary are assumed
	///          to be on for erosion operations (True: works in the same way as the default of cv::erode,
	///          False: is a little faster)
	/// * anchor: position of the anchor within the element; default value (0, 0) is usually the element center.
	///
	/// ## C++ default parameters
	/// * b_boundary_on_for_erosion: true
	/// * anchor: Point(0,0)
	#[inline]
	pub fn morphology_ex(rl_src: &impl ToInputArray, rl_dest: &mut impl ToOutputArray, op: i32, rl_kernel: &impl ToInputArray, b_boundary_on_for_erosion: bool, anchor: core::Point) -> Result<()> {
		input_array_arg!(rl_src);
		output_array_arg!(rl_dest);
		input_array_arg!(rl_kernel);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_morphologyEx_const__InputArrayR_const__OutputArrayR_int_const__InputArrayR_bool_Point(rl_src.as_raw__InputArray(), rl_dest.as_raw__OutputArray(), op, rl_kernel.as_raw__InputArray(), b_boundary_on_for_erosion, &anchor, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Paint run length encoded binary image into an image.
	///
	///
	/// ## Parameters
	/// * image: image to paint into (currently only single channel images).
	/// * rlSrc: run length encoded image
	/// * value: all foreground pixel of the binary image are set to this value
	#[inline]
	pub fn paint(image: &mut impl ToInputOutputArray, rl_src: &impl ToInputArray, value: core::Scalar) -> Result<()> {
		input_output_array_arg!(image);
		input_array_arg!(rl_src);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_paint_const__InputOutputArrayR_const__InputArrayR_const_ScalarR(image.as_raw__InputOutputArray(), rl_src.as_raw__InputArray(), &value, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies a fixed-level threshold to each array element.
	///
	///
	/// ## Parameters
	/// * src: input array (single-channel).
	/// * rlDest: resulting run length encoded image.
	/// * thresh: threshold value.
	/// * type: thresholding type (only cv::THRESH_BINARY and cv::THRESH_BINARY_INV are supported)
	#[inline]
	pub fn threshold(src: &impl ToInputArray, rl_dest: &mut impl ToOutputArray, thresh: f64, typ: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(rl_dest);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rl_threshold_const__InputArrayR_const__OutputArrayR_double_int(src.as_raw__InputArray(), rl_dest.as_raw__OutputArray(), thresh, typ, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies the rolling guidance filter to an image.
	///
	/// For more details, please see [zhang2014rolling](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_zhang2014rolling)
	///
	/// ## 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 .
	///
	/// * numOfIter: Number of iterations of joint edge-preserving filtering applied on the source image.
	///
	/// * borderType: 
	///
	///
	/// Note:  rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
	/// ## See also
	/// jointBilateralFilter, bilateralFilter, amFilter
	///
	/// ## Note
	/// This alternative version of [rolling_guidance_filter] function uses the following default values for its arguments:
	/// * d: -1
	/// * sigma_color: 25
	/// * sigma_space: 3
	/// * num_of_iter: 4
	/// * border_type: BORDER_DEFAULT
	#[inline]
	pub fn rolling_guidance_filter_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rollingGuidanceFilter_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies the rolling guidance filter to an image.
	///
	/// For more details, please see [zhang2014rolling](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_zhang2014rolling)
	///
	/// ## 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 .
	///
	/// * numOfIter: Number of iterations of joint edge-preserving filtering applied on the source image.
	///
	/// * borderType: 
	///
	///
	/// Note:  rollingGuidanceFilter uses jointBilateralFilter as the edge-preserving filter.
	/// ## See also
	/// jointBilateralFilter, bilateralFilter, amFilter
	///
	/// ## C++ default parameters
	/// * d: -1
	/// * sigma_color: 25
	/// * sigma_space: 3
	/// * num_of_iter: 4
	/// * border_type: BORDER_DEFAULT
	#[inline]
	pub fn rolling_guidance_filter(src: &impl ToInputArray, dst: &mut impl ToOutputArray, d: i32, sigma_color: f64, sigma_space: f64, num_of_iter: i32, border_type: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_rollingGuidanceFilter_const__InputArrayR_const__OutputArrayR_int_double_double_int_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), d, sigma_color, sigma_space, num_of_iter, border_type, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Creates a graph based segmentor
	/// ## Parameters
	/// * sigma: The sigma parameter, used to smooth image
	/// * k: The k parameter of the algorythm
	/// * min_size: The minimum size of segments
	///
	/// ## Note
	/// This alternative version of [create_graph_segmentation] function uses the following default values for its arguments:
	/// * sigma: 0.5
	/// * k: 300
	/// * min_size: 100
	#[inline]
	pub fn create_graph_segmentation_def() -> Result<core::Ptr<crate::ximgproc::GraphSegmentation>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createGraphSegmentation(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::GraphSegmentation>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Creates a graph based segmentor
	/// ## Parameters
	/// * sigma: The sigma parameter, used to smooth image
	/// * k: The k parameter of the algorythm
	/// * min_size: The minimum size of segments
	///
	/// ## C++ default parameters
	/// * sigma: 0.5
	/// * k: 300
	/// * min_size: 100
	#[inline]
	pub fn create_graph_segmentation(sigma: f64, k: f32, min_size: i32) -> Result<core::Ptr<crate::ximgproc::GraphSegmentation>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createGraphSegmentation_double_float_int(sigma, k, min_size, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::GraphSegmentation>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new SelectiveSearchSegmentation class.
	#[inline]
	pub fn create_selective_search_segmentation() -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentation>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentation(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentation>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new color-based strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_color() -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyColor>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyColor(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyColor>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new fill-based strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_fill() -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyFill>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyFill(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyFill>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new multiple strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_multiple() -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyMultiple(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new multiple strategy and set one subtrategy
	/// ## Parameters
	/// * s1: The first strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_multiple_1(mut s1: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>) -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyMultiple_PtrLSelectiveSearchSegmentationStrategyG(s1.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new multiple strategy and set two subtrategies, with equal weights
	/// ## Parameters
	/// * s1: The first strategy
	/// * s2: The second strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_multiple_2(mut s1: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>, mut s2: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>) -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyMultiple_PtrLSelectiveSearchSegmentationStrategyG_PtrLSelectiveSearchSegmentationStrategyG(s1.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), s2.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new multiple strategy and set three subtrategies, with equal weights
	/// ## Parameters
	/// * s1: The first strategy
	/// * s2: The second strategy
	/// * s3: The third strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_multiple_3(mut s1: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>, mut s2: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>, mut s3: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>) -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyMultiple_PtrLSelectiveSearchSegmentationStrategyG_PtrLSelectiveSearchSegmentationStrategyG_PtrLSelectiveSearchSegmentationStrategyG(s1.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), s2.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), s3.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new multiple strategy and set four subtrategies, with equal weights
	/// ## Parameters
	/// * s1: The first strategy
	/// * s2: The second strategy
	/// * s3: The third strategy
	/// * s4: The forth strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_multiple_4(mut s1: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>, mut s2: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>, mut s3: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>, mut s4: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>) -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyMultiple_PtrLSelectiveSearchSegmentationStrategyG_PtrLSelectiveSearchSegmentationStrategyG_PtrLSelectiveSearchSegmentationStrategyG_PtrLSelectiveSearchSegmentationStrategyG(s1.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), s2.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), s3.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), s4.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new size-based strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_size() -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategySize>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategySize(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategySize>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Create a new size-based strategy
	#[inline]
	pub fn create_selective_search_segmentation_strategy_texture() -> Result<core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategyTexture>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_segmentation_createSelectiveSearchSegmentationStrategyTexture(ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::ximgproc::SelectiveSearchSegmentationStrategyTexture>::opencv_from_extern(ret) };
		Ok(ret)
	}

	/// Applies a binary blob thinning operation, to achieve a skeletization of the input image.
	///
	/// The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen.
	///
	/// ## Parameters
	/// * src: Source 8-bit single-channel image, containing binary blobs, with blobs having 255 pixel values.
	/// * dst: Destination image of the same size and the same type as src. The function can work in-place.
	/// * thinningType: Value that defines which thinning algorithm should be used. See cv::ximgproc::ThinningTypes
	///
	/// ## Note
	/// This alternative version of [thinning] function uses the following default values for its arguments:
	/// * thinning_type: THINNING_ZHANGSUEN
	#[inline]
	pub fn thinning_def(src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_thinning_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies a binary blob thinning operation, to achieve a skeletization of the input image.
	///
	/// The function transforms a binary blob image into a skeletized form using the technique of Zhang-Suen.
	///
	/// ## Parameters
	/// * src: Source 8-bit single-channel image, containing binary blobs, with blobs having 255 pixel values.
	/// * dst: Destination image of the same size and the same type as src. The function can work in-place.
	/// * thinningType: Value that defines which thinning algorithm should be used. See cv::ximgproc::ThinningTypes
	///
	/// ## C++ default parameters
	/// * thinning_type: THINNING_ZHANGSUEN
	#[inline]
	pub fn thinning(src: &impl ToInputArray, dst: &mut impl ToOutputArray, thinning_type: i32) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_thinning_const__InputArrayR_const__OutputArrayR_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), thinning_type, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// transform a contour
	///
	/// ## Parameters
	/// * src: contour or Fourier Descriptors if fd is true
	/// * t: transform Mat given by estimateTransformation
	/// * dst: Mat of type CV_64FC2 and nbElt rows
	/// * fdContour: true src are Fourier Descriptors. fdContour false src is a contour
	///
	/// ## Note
	/// This alternative version of [transform_fd] function uses the following default values for its arguments:
	/// * fd_contour: true
	#[inline]
	pub fn transform_fd_def(src: &impl ToInputArray, t: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
		input_array_arg!(src);
		input_array_arg!(t);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_transformFD_const__InputArrayR_const__InputArrayR_const__OutputArrayR(src.as_raw__InputArray(), t.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// transform a contour
	///
	/// ## Parameters
	/// * src: contour or Fourier Descriptors if fd is true
	/// * t: transform Mat given by estimateTransformation
	/// * dst: Mat of type CV_64FC2 and nbElt rows
	/// * fdContour: true src are Fourier Descriptors. fdContour false src is a contour
	///
	/// ## C++ default parameters
	/// * fd_contour: true
	#[inline]
	pub fn transform_fd(src: &impl ToInputArray, t: &impl ToInputArray, dst: &mut impl ToOutputArray, fd_contour: bool) -> Result<()> {
		input_array_arg!(src);
		input_array_arg!(t);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_transformFD_const__InputArrayR_const__InputArrayR_const__OutputArrayR_bool(src.as_raw__InputArray(), t.as_raw__InputArray(), dst.as_raw__OutputArray(), fd_contour, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies weighted median filter to an image.
	///
	/// For more details about this implementation, please see [zhang2014100](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_zhang2014100)+
	///
	/// ## Parameters
	/// * joint: Joint 8-bit, 1-channel or 3-channel image.
	/// * src: Source 8-bit or floating-point, 1-channel or 3-channel image.
	/// * dst: Destination image.
	/// * r: Radius of filtering kernel, should be a positive integer.
	/// * sigma: Filter range standard deviation for the joint image.
	/// * weightType: weightType The type of weight definition, see WMFWeightType
	/// * mask: A 0-1 mask that has the same size with I. This mask is used to ignore the effect of some pixels. If the pixel value on mask is 0,
	///                           the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling.
	/// ## See also
	/// medianBlur, jointBilateralFilter
	///
	/// ## Note
	/// This alternative version of [weighted_median_filter] function uses the following default values for its arguments:
	/// * sigma: 25.5
	/// * weight_type: WMF_EXP
	/// * mask: noArray()
	#[inline]
	pub fn weighted_median_filter_def(joint: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, r: i32) -> Result<()> {
		input_array_arg!(joint);
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_weightedMedianFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int(joint.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), r, ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Applies weighted median filter to an image.
	///
	/// For more details about this implementation, please see [zhang2014100](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_zhang2014100)+
	///
	/// ## Parameters
	/// * joint: Joint 8-bit, 1-channel or 3-channel image.
	/// * src: Source 8-bit or floating-point, 1-channel or 3-channel image.
	/// * dst: Destination image.
	/// * r: Radius of filtering kernel, should be a positive integer.
	/// * sigma: Filter range standard deviation for the joint image.
	/// * weightType: weightType The type of weight definition, see WMFWeightType
	/// * mask: A 0-1 mask that has the same size with I. This mask is used to ignore the effect of some pixels. If the pixel value on mask is 0,
	///                           the pixel will be ignored when maintaining the joint-histogram. This is useful for applications like optical flow occlusion handling.
	/// ## See also
	/// medianBlur, jointBilateralFilter
	///
	/// ## C++ default parameters
	/// * sigma: 25.5
	/// * weight_type: WMF_EXP
	/// * mask: noArray()
	#[inline]
	pub fn weighted_median_filter(joint: &impl ToInputArray, src: &impl ToInputArray, dst: &mut impl ToOutputArray, r: i32, sigma: f64, weight_type: i32, mask: &impl ToInputArray) -> Result<()> {
		input_array_arg!(joint);
		input_array_arg!(src);
		output_array_arg!(dst);
		input_array_arg!(mask);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_ximgproc_weightedMedianFilter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_double_int_const__InputArrayR(joint.as_raw__InputArray(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), r, sigma, weight_type, mask.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
		return_receive!(ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}

	/// Interface for Adaptive Manifold Filter realizations.
	///
	/// For more details about this filter see [Gastal12](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Gastal12) and References_.
	///
	/// Below listed optional parameters which may be set up with Algorithm::set function.
	/// *   member double sigma_s = 16.0
	/// Spatial standard deviation.
	/// *   member double sigma_r = 0.2
	/// Color space standard deviation.
	/// *   member int tree_height = -1
	/// Height of the manifold tree (default = -1 : automatically computed).
	/// *   member int num_pca_iterations = 1
	/// Number of iterations to computed the eigenvector.
	/// *   member bool adjust_outliers = false
	/// Specify adjust outliers using Eq. 9 or not.
	/// *   member bool use_RNG = true
	/// Specify use random number generator to compute eigenvector or not.
	pub struct AdaptiveManifoldFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { AdaptiveManifoldFilter }

	impl Drop for AdaptiveManifoldFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_delete(self.as_raw_mut_AdaptiveManifoldFilter()) };
		}
	}

	unsafe impl Send for AdaptiveManifoldFilter {}

	impl AdaptiveManifoldFilter {
		#[inline]
		pub fn create() -> Result<core::Ptr<crate::ximgproc::AdaptiveManifoldFilter>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_create(ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<crate::ximgproc::AdaptiveManifoldFilter>::opencv_from_extern(ret) };
			Ok(ret)
		}

	}

	/// Constant methods for [crate::ximgproc::AdaptiveManifoldFilter]
	pub trait AdaptiveManifoldFilterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_AdaptiveManifoldFilter(&self) -> *const c_void;

		/// ## See also
		/// setSigmaS
		#[inline]
		fn get_sigma_s(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_getSigmaS_const(self.as_raw_AdaptiveManifoldFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setSigmaR
		#[inline]
		fn get_sigma_r(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_getSigmaR_const(self.as_raw_AdaptiveManifoldFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setTreeHeight
		#[inline]
		fn get_tree_height(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_getTreeHeight_const(self.as_raw_AdaptiveManifoldFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setPCAIterations
		#[inline]
		fn get_pca_iterations(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_getPCAIterations_const(self.as_raw_AdaptiveManifoldFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setAdjustOutliers
		#[inline]
		fn get_adjust_outliers(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_getAdjustOutliers_const(self.as_raw_AdaptiveManifoldFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setUseRNG
		#[inline]
		fn get_use_rng(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_getUseRNG_const(self.as_raw_AdaptiveManifoldFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::AdaptiveManifoldFilter]
	pub trait AdaptiveManifoldFilterTrait: core::AlgorithmTrait + crate::ximgproc::AdaptiveManifoldFilterTraitConst {
		fn as_raw_mut_AdaptiveManifoldFilter(&mut self) -> *mut c_void;

		/// Apply high-dimensional filtering using adaptive manifolds.
		///
		/// ## Parameters
		/// * src: filtering image with any numbers of channels.
		///
		/// * dst: output image.
		///
		/// * joint: optional joint (also called as guided) image with any numbers of channels.
		///
		/// ## C++ default parameters
		/// * joint: noArray()
		#[inline]
		fn filter(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, joint: &impl ToInputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			input_array_arg!(joint);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_filter_const__InputArrayR_const__OutputArrayR_const__InputArrayR(self.as_raw_mut_AdaptiveManifoldFilter(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), joint.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Apply high-dimensional filtering using adaptive manifolds.
		///
		/// ## Parameters
		/// * src: filtering image with any numbers of channels.
		///
		/// * dst: output image.
		///
		/// * joint: optional joint (also called as guided) image with any numbers of channels.
		///
		/// ## Note
		/// This alternative version of [AdaptiveManifoldFilterTrait::filter] function uses the following default values for its arguments:
		/// * joint: noArray()
		#[inline]
		fn filter_def(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_filter_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_AdaptiveManifoldFilter(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		fn collect_garbage(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_collectGarbage(self.as_raw_mut_AdaptiveManifoldFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setSigmaS getSigmaS
		#[inline]
		fn set_sigma_s(&mut self, val: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_setSigmaS_double(self.as_raw_mut_AdaptiveManifoldFilter(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setSigmaR getSigmaR
		#[inline]
		fn set_sigma_r(&mut self, val: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_setSigmaR_double(self.as_raw_mut_AdaptiveManifoldFilter(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setTreeHeight getTreeHeight
		#[inline]
		fn set_tree_height(&mut self, val: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_setTreeHeight_int(self.as_raw_mut_AdaptiveManifoldFilter(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setPCAIterations getPCAIterations
		#[inline]
		fn set_pca_iterations(&mut self, val: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_setPCAIterations_int(self.as_raw_mut_AdaptiveManifoldFilter(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setAdjustOutliers getAdjustOutliers
		#[inline]
		fn set_adjust_outliers(&mut self, val: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_setAdjustOutliers_bool(self.as_raw_mut_AdaptiveManifoldFilter(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setUseRNG getUseRNG
		#[inline]
		fn set_use_rng(&mut self, val: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_AdaptiveManifoldFilter_setUseRNG_bool(self.as_raw_mut_AdaptiveManifoldFilter(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for AdaptiveManifoldFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("AdaptiveManifoldFilter")
				.finish()
		}
	}

	boxed_cast_base! { AdaptiveManifoldFilter, core::Algorithm, cv_ximgproc_AdaptiveManifoldFilter_to_Algorithm }

	impl core::AlgorithmTraitConst for AdaptiveManifoldFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for AdaptiveManifoldFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { AdaptiveManifoldFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::AdaptiveManifoldFilterTraitConst for AdaptiveManifoldFilter {
		#[inline] fn as_raw_AdaptiveManifoldFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::AdaptiveManifoldFilterTrait for AdaptiveManifoldFilter {
		#[inline] fn as_raw_mut_AdaptiveManifoldFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { AdaptiveManifoldFilter, crate::ximgproc::AdaptiveManifoldFilterTraitConst, as_raw_AdaptiveManifoldFilter, crate::ximgproc::AdaptiveManifoldFilterTrait, as_raw_mut_AdaptiveManifoldFilter }

	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq)]
	pub struct Box {
		pub x: i32,
		pub y: i32,
		pub w: i32,
		pub h: i32,
		pub score: f32,
	}

	opencv_type_simple! { crate::ximgproc::Box }

	/// Class for ContourFitting algorithms.
	/// ContourFitting match two contours ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fa%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fb%20) minimizing distance
	/// ![block formula](https://latex.codecogs.com/png.latex?%20d%28z%5Fa%2Cz%5Fb%29%3D%5Csum%20%28a%5Fn%20%2D%20s%20%20b%5Fn%20e%5E%7Bj%28n%20%5Calpha%20%2B%5Cphi%20%29%7D%29%5E2%20) where ![inline formula](https://latex.codecogs.com/png.latex?%20a%5Fn%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20b%5Fn%20) are Fourier descriptors of ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fa%20) and ![inline formula](https://latex.codecogs.com/png.latex?%20z%5Fb%20) and s is a scaling factor and  ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20) is angle rotation and ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20) is starting point factor adjustement
	pub struct ContourFitting {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { ContourFitting }

	impl Drop for ContourFitting {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_ContourFitting_delete(self.as_raw_mut_ContourFitting()) };
		}
	}

	unsafe impl Send for ContourFitting {}

	impl ContourFitting {
		/// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998)
		///
		/// ## Parameters
		/// * ctr: number of Fourier descriptors equal to number of contour points after resampling.
		/// * fd: Contour defining second shape (Target).
		///
		/// ## C++ default parameters
		/// * ctr: 1024
		/// * fd: 16
		#[inline]
		pub fn new(ctr: i32, fd: i32) -> Result<crate::ximgproc::ContourFitting> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_ContourFitting_int_int(ctr, fd, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::ximgproc::ContourFitting::opencv_from_extern(ret) };
			Ok(ret)
		}

		/// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998)
		///
		/// ## Parameters
		/// * ctr: number of Fourier descriptors equal to number of contour points after resampling.
		/// * fd: Contour defining second shape (Target).
		///
		/// ## Note
		/// This alternative version of [new] function uses the following default values for its arguments:
		/// * ctr: 1024
		/// * fd: 16
		#[inline]
		pub fn new_def() -> Result<crate::ximgproc::ContourFitting> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_ContourFitting(ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::ximgproc::ContourFitting::opencv_from_extern(ret) };
			Ok(ret)
		}

	}

	/// Constant methods for [crate::ximgproc::ContourFitting]
	pub trait ContourFittingTraitConst: core::AlgorithmTraitConst {
		fn as_raw_ContourFitting(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::ContourFitting]
	pub trait ContourFittingTrait: core::AlgorithmTrait + crate::ximgproc::ContourFittingTraitConst {
		fn as_raw_mut_ContourFitting(&mut self) -> *mut c_void;

		/// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998)
		///
		/// ## Parameters
		/// * src: Contour defining first shape.
		/// * dst: Contour defining second shape (Target).
		/// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
		/// * dist: distance between src and dst after matching.
		/// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors.
		///
		/// ## C++ default parameters
		/// * dist: 0
		/// * fd_contour: false
		#[inline]
		fn estimate_transformation(&mut self, src: &impl ToInputArray, dst: &impl ToInputArray, alpha_phi_st: &mut impl ToOutputArray, dist: &mut f64, fd_contour: bool) -> Result<()> {
			input_array_arg!(src);
			input_array_arg!(dst);
			output_array_arg!(alpha_phi_st);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_estimateTransformation_const__InputArrayR_const__InputArrayR_const__OutputArrayR_doubleX_bool(self.as_raw_mut_ContourFitting(), src.as_raw__InputArray(), dst.as_raw__InputArray(), alpha_phi_st.as_raw__OutputArray(), dist, fd_contour, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998)
		///
		/// ## Parameters
		/// * src: Contour defining first shape.
		/// * dst: Contour defining second shape (Target).
		/// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
		/// * dist: distance between src and dst after matching.
		/// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors.
		///
		/// ## Note
		/// This alternative version of [ContourFittingTrait::estimate_transformation] function uses the following default values for its arguments:
		/// * dist: 0
		/// * fd_contour: false
		#[inline]
		fn estimate_transformation_def(&mut self, src: &impl ToInputArray, dst: &impl ToInputArray, alpha_phi_st: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			input_array_arg!(dst);
			output_array_arg!(alpha_phi_st);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_estimateTransformation_const__InputArrayR_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_ContourFitting(), src.as_raw__InputArray(), dst.as_raw__InputArray(), alpha_phi_st.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998)
		///
		/// ## Parameters
		/// * src: Contour defining first shape.
		/// * dst: Contour defining second shape (Target).
		/// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
		/// * dist: distance between src and dst after matching.
		/// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors.
		///
		/// ## C++ default parameters
		/// * fd_contour: false
		#[inline]
		fn estimate_transformation_1(&mut self, src: &impl ToInputArray, dst: &impl ToInputArray, alpha_phi_st: &mut impl ToOutputArray, dist: &mut f64, fd_contour: bool) -> Result<()> {
			input_array_arg!(src);
			input_array_arg!(dst);
			output_array_arg!(alpha_phi_st);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_estimateTransformation_const__InputArrayR_const__InputArrayR_const__OutputArrayR_doubleR_bool(self.as_raw_mut_ContourFitting(), src.as_raw__InputArray(), dst.as_raw__InputArray(), alpha_phi_st.as_raw__OutputArray(), dist, fd_contour, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Fit two closed curves using fourier descriptors. More details in [PersoonFu1977](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PersoonFu1977) and [BergerRaghunathan1998](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BergerRaghunathan1998)
		///
		/// ## Parameters
		/// * src: Contour defining first shape.
		/// * dst: Contour defining second shape (Target).
		/// * alphaPhiST: : ![inline formula](https://latex.codecogs.com/png.latex?%20%5Calpha%20)=alphaPhiST(0,0), ![inline formula](https://latex.codecogs.com/png.latex?%20%5Cphi%20)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
		/// * dist: distance between src and dst after matching.
		/// * fdContour: false then src and dst are contours and true src and dst are fourier descriptors.
		///
		/// ## Note
		/// This alternative version of [ContourFittingTrait::estimate_transformation] function uses the following default values for its arguments:
		/// * fd_contour: false
		#[inline]
		fn estimate_transformation_def_1(&mut self, src: &impl ToInputArray, dst: &impl ToInputArray, alpha_phi_st: &mut impl ToOutputArray, dist: &mut f64) -> Result<()> {
			input_array_arg!(src);
			input_array_arg!(dst);
			output_array_arg!(alpha_phi_st);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_estimateTransformation_const__InputArrayR_const__InputArrayR_const__OutputArrayR_doubleR(self.as_raw_mut_ContourFitting(), src.as_raw__InputArray(), dst.as_raw__InputArray(), alpha_phi_st.as_raw__OutputArray(), dist, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// set number of Fourier descriptors used in estimateTransformation
		///
		/// ## Parameters
		/// * n: number of Fourier descriptors equal to number of contour points after resampling.
		#[inline]
		fn set_ctr_size(&mut self, n: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_setCtrSize_int(self.as_raw_mut_ContourFitting(), n, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// set number of Fourier descriptors when estimateTransformation used vector<Point>
		///
		/// ## Parameters
		/// * n: number of fourier descriptors used for optimal curve matching.
		#[inline]
		fn set_fd_size(&mut self, n: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_setFDSize_int(self.as_raw_mut_ContourFitting(), n, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## Returns
		/// number of fourier descriptors
		#[inline]
		fn get_ctr_size(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_getCtrSize(self.as_raw_mut_ContourFitting(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## Returns
		/// number of fourier descriptors used for optimal curve matching
		#[inline]
		fn get_fd_size(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ContourFitting_getFDSize(self.as_raw_mut_ContourFitting(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for ContourFitting {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("ContourFitting")
				.finish()
		}
	}

	boxed_cast_base! { ContourFitting, core::Algorithm, cv_ximgproc_ContourFitting_to_Algorithm }

	impl core::AlgorithmTraitConst for ContourFitting {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for ContourFitting {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { ContourFitting, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::ContourFittingTraitConst for ContourFitting {
		#[inline] fn as_raw_ContourFitting(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::ContourFittingTrait for ContourFitting {
		#[inline] fn as_raw_mut_ContourFitting(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { ContourFitting, crate::ximgproc::ContourFittingTraitConst, as_raw_ContourFitting, crate::ximgproc::ContourFittingTrait, as_raw_mut_ContourFitting }

	/// Interface for realizations of Domain Transform filter.
	///
	/// For more details about this filter see [Gastal11](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Gastal11) .
	pub struct DTFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { DTFilter }

	impl Drop for DTFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_DTFilter_delete(self.as_raw_mut_DTFilter()) };
		}
	}

	unsafe impl Send for DTFilter {}

	/// Constant methods for [crate::ximgproc::DTFilter]
	pub trait DTFilterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_DTFilter(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::DTFilter]
	pub trait DTFilterTrait: core::AlgorithmTrait + crate::ximgproc::DTFilterTraitConst {
		fn as_raw_mut_DTFilter(&mut self) -> *mut c_void;

		/// Produce domain transform filtering operation on source image.
		///
		/// ## Parameters
		/// * src: filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.
		///
		/// * dst: destination image.
		///
		/// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent
		/// to src.depth().
		///
		/// ## C++ default parameters
		/// * d_depth: -1
		#[inline]
		fn filter(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, d_depth: i32) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DTFilter_filter_const__InputArrayR_const__OutputArrayR_int(self.as_raw_mut_DTFilter(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), d_depth, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Produce domain transform filtering operation on source image.
		///
		/// ## Parameters
		/// * src: filtering image with unsigned 8-bit or floating-point 32-bit depth and up to 4 channels.
		///
		/// * dst: destination image.
		///
		/// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent
		/// to src.depth().
		///
		/// ## Note
		/// This alternative version of [DTFilterTrait::filter] function uses the following default values for its arguments:
		/// * d_depth: -1
		#[inline]
		fn filter_def(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DTFilter_filter_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_DTFilter(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for DTFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("DTFilter")
				.finish()
		}
	}

	boxed_cast_base! { DTFilter, core::Algorithm, cv_ximgproc_DTFilter_to_Algorithm }

	impl core::AlgorithmTraitConst for DTFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for DTFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { DTFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::DTFilterTraitConst for DTFilter {
		#[inline] fn as_raw_DTFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::DTFilterTrait for DTFilter {
		#[inline] fn as_raw_mut_DTFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { DTFilter, crate::ximgproc::DTFilterTraitConst, as_raw_DTFilter, crate::ximgproc::DTFilterTrait, as_raw_mut_DTFilter }

	/// Main interface for all disparity map filters.
	pub struct DisparityFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { DisparityFilter }

	impl Drop for DisparityFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_DisparityFilter_delete(self.as_raw_mut_DisparityFilter()) };
		}
	}

	unsafe impl Send for DisparityFilter {}

	/// Constant methods for [crate::ximgproc::DisparityFilter]
	pub trait DisparityFilterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_DisparityFilter(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::DisparityFilter]
	pub trait DisparityFilterTrait: core::AlgorithmTrait + crate::ximgproc::DisparityFilterTraitConst {
		fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void;

		/// Apply filtering to the disparity map.
		///
		/// ## Parameters
		/// * disparity_map_left: disparity map of the left view, 1 channel, CV_16S type. Implicitly assumes that disparity
		/// values are scaled by 16 (one-pixel disparity corresponds to the value of 16 in the disparity map). Disparity map
		/// can have any resolution, it will be automatically resized to fit left_view resolution.
		///
		/// * left_view: left view of the original stereo-pair to guide the filtering process, 8-bit single-channel
		/// or three-channel image.
		///
		/// * filtered_disparity_map: output disparity map.
		///
		/// * disparity_map_right: optional argument, some implementations might also use the disparity map
		/// of the right view to compute confidence maps, for instance.
		///
		/// * ROI: region of the disparity map to filter. Optional, usually it should be set automatically.
		///
		/// * right_view: optional argument, some implementations might also use the right view of the original
		/// stereo-pair.
		///
		/// ## C++ default parameters
		/// * disparity_map_right: Mat()
		/// * roi: Rect()
		/// * right_view: Mat()
		#[inline]
		fn filter(&mut self, disparity_map_left: &impl ToInputArray, left_view: &impl ToInputArray, filtered_disparity_map: &mut impl ToOutputArray, disparity_map_right: &impl ToInputArray, roi: core::Rect, right_view: &impl ToInputArray) -> Result<()> {
			input_array_arg!(disparity_map_left);
			input_array_arg!(left_view);
			output_array_arg!(filtered_disparity_map);
			input_array_arg!(disparity_map_right);
			input_array_arg!(right_view);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityFilter_filter_const__InputArrayR_const__InputArrayR_const__OutputArrayR_const__InputArrayR_Rect_const__InputArrayR(self.as_raw_mut_DisparityFilter(), disparity_map_left.as_raw__InputArray(), left_view.as_raw__InputArray(), filtered_disparity_map.as_raw__OutputArray(), disparity_map_right.as_raw__InputArray(), &roi, right_view.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Apply filtering to the disparity map.
		///
		/// ## Parameters
		/// * disparity_map_left: disparity map of the left view, 1 channel, CV_16S type. Implicitly assumes that disparity
		/// values are scaled by 16 (one-pixel disparity corresponds to the value of 16 in the disparity map). Disparity map
		/// can have any resolution, it will be automatically resized to fit left_view resolution.
		///
		/// * left_view: left view of the original stereo-pair to guide the filtering process, 8-bit single-channel
		/// or three-channel image.
		///
		/// * filtered_disparity_map: output disparity map.
		///
		/// * disparity_map_right: optional argument, some implementations might also use the disparity map
		/// of the right view to compute confidence maps, for instance.
		///
		/// * ROI: region of the disparity map to filter. Optional, usually it should be set automatically.
		///
		/// * right_view: optional argument, some implementations might also use the right view of the original
		/// stereo-pair.
		///
		/// ## Note
		/// This alternative version of [DisparityFilterTrait::filter] function uses the following default values for its arguments:
		/// * disparity_map_right: Mat()
		/// * roi: Rect()
		/// * right_view: Mat()
		#[inline]
		fn filter_def(&mut self, disparity_map_left: &impl ToInputArray, left_view: &impl ToInputArray, filtered_disparity_map: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(disparity_map_left);
			input_array_arg!(left_view);
			output_array_arg!(filtered_disparity_map);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityFilter_filter_const__InputArrayR_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_DisparityFilter(), disparity_map_left.as_raw__InputArray(), left_view.as_raw__InputArray(), filtered_disparity_map.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for DisparityFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("DisparityFilter")
				.finish()
		}
	}

	boxed_cast_base! { DisparityFilter, core::Algorithm, cv_ximgproc_DisparityFilter_to_Algorithm }

	boxed_cast_descendant! { DisparityFilter, crate::ximgproc::DisparityWLSFilter, cv_ximgproc_DisparityFilter_to_DisparityWLSFilter }

	impl core::AlgorithmTraitConst for DisparityFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for DisparityFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { DisparityFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::DisparityFilterTraitConst for DisparityFilter {
		#[inline] fn as_raw_DisparityFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::DisparityFilterTrait for DisparityFilter {
		#[inline] fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { DisparityFilter, crate::ximgproc::DisparityFilterTraitConst, as_raw_DisparityFilter, crate::ximgproc::DisparityFilterTrait, as_raw_mut_DisparityFilter }

	/// Disparity map filter based on Weighted Least Squares filter (in form of Fast Global Smoother that
	/// is a lot faster than traditional Weighted Least Squares filter implementations) and optional use of
	/// left-right-consistency-based confidence to refine the results in half-occlusions and uniform areas.
	pub struct DisparityWLSFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { DisparityWLSFilter }

	impl Drop for DisparityWLSFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_delete(self.as_raw_mut_DisparityWLSFilter()) };
		}
	}

	unsafe impl Send for DisparityWLSFilter {}

	/// Constant methods for [crate::ximgproc::DisparityWLSFilter]
	pub trait DisparityWLSFilterTraitConst: crate::ximgproc::DisparityFilterTraitConst {
		fn as_raw_DisparityWLSFilter(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::DisparityWLSFilter]
	pub trait DisparityWLSFilterTrait: crate::ximgproc::DisparityFilterTrait + crate::ximgproc::DisparityWLSFilterTraitConst {
		fn as_raw_mut_DisparityWLSFilter(&mut self) -> *mut c_void;

		/// Lambda is a parameter defining the amount of regularization during filtering. Larger values force
		/// filtered disparity map edges to adhere more to source image edges. Typical value is 8000.
		#[inline]
		fn get_lambda(&mut self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_getLambda(self.as_raw_mut_DisparityWLSFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// getLambda
		#[inline]
		fn set_lambda(&mut self, _lambda: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_setLambda_double(self.as_raw_mut_DisparityWLSFilter(), _lambda, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// SigmaColor is a parameter defining how sensitive the filtering process is to source image edges.
		/// Large values can lead to disparity leakage through low-contrast edges. Small values can make the filter too
		/// sensitive to noise and textures in the source image. Typical values range from 0.8 to 2.0.
		#[inline]
		fn get_sigma_color(&mut self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_getSigmaColor(self.as_raw_mut_DisparityWLSFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// getSigmaColor
		#[inline]
		fn set_sigma_color(&mut self, _sigma_color: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_setSigmaColor_double(self.as_raw_mut_DisparityWLSFilter(), _sigma_color, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// LRCthresh is a threshold of disparity difference used in left-right-consistency check during
		/// confidence map computation. The default value of 24 (1.5 pixels) is virtually always good enough.
		#[inline]
		fn get_lr_cthresh(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_getLRCthresh(self.as_raw_mut_DisparityWLSFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// getLRCthresh
		#[inline]
		fn set_lr_cthresh(&mut self, _lrc_thresh: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_setLRCthresh_int(self.as_raw_mut_DisparityWLSFilter(), _lrc_thresh, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// DepthDiscontinuityRadius is a parameter used in confidence computation. It defines the size of
		/// low-confidence regions around depth discontinuities.
		#[inline]
		fn get_depth_discontinuity_radius(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_getDepthDiscontinuityRadius(self.as_raw_mut_DisparityWLSFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// getDepthDiscontinuityRadius
		#[inline]
		fn set_depth_discontinuity_radius(&mut self, _disc_radius: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_setDepthDiscontinuityRadius_int(self.as_raw_mut_DisparityWLSFilter(), _disc_radius, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Get the confidence map that was used in the last filter call. It is a CV_32F one-channel image
		/// with values ranging from 0.0 (totally untrusted regions of the raw disparity map) to 255.0 (regions containing
		/// correct disparity values with a high degree of confidence).
		#[inline]
		fn get_confidence_map(&mut self) -> Result<core::Mat> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_getConfidenceMap(self.as_raw_mut_DisparityWLSFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			Ok(ret)
		}

		/// Get the ROI used in the last filter call
		#[inline]
		fn get_roi(&mut self) -> Result<core::Rect> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_DisparityWLSFilter_getROI(self.as_raw_mut_DisparityWLSFilter(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for DisparityWLSFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("DisparityWLSFilter")
				.finish()
		}
	}

	boxed_cast_base! { DisparityWLSFilter, core::Algorithm, cv_ximgproc_DisparityWLSFilter_to_Algorithm }

	boxed_cast_base! { DisparityWLSFilter, crate::ximgproc::DisparityFilter, cv_ximgproc_DisparityWLSFilter_to_DisparityFilter }

	impl core::AlgorithmTraitConst for DisparityWLSFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for DisparityWLSFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { DisparityWLSFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::DisparityFilterTraitConst for DisparityWLSFilter {
		#[inline] fn as_raw_DisparityFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::DisparityFilterTrait for DisparityWLSFilter {
		#[inline] fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { DisparityWLSFilter, crate::ximgproc::DisparityFilterTraitConst, as_raw_DisparityFilter, crate::ximgproc::DisparityFilterTrait, as_raw_mut_DisparityFilter }

	impl crate::ximgproc::DisparityWLSFilterTraitConst for DisparityWLSFilter {
		#[inline] fn as_raw_DisparityWLSFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::DisparityWLSFilterTrait for DisparityWLSFilter {
		#[inline] fn as_raw_mut_DisparityWLSFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { DisparityWLSFilter, crate::ximgproc::DisparityWLSFilterTraitConst, as_raw_DisparityWLSFilter, crate::ximgproc::DisparityWLSFilterTrait, as_raw_mut_DisparityWLSFilter }

	/// Sparse match interpolation algorithm based on modified locally-weighted affine
	/// estimator from [Revaud2015](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Revaud2015) and Fast Global Smoother as post-processing filter.
	pub struct EdgeAwareInterpolator {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { EdgeAwareInterpolator }

	impl Drop for EdgeAwareInterpolator {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_delete(self.as_raw_mut_EdgeAwareInterpolator()) };
		}
	}

	unsafe impl Send for EdgeAwareInterpolator {}

	/// Constant methods for [crate::ximgproc::EdgeAwareInterpolator]
	pub trait EdgeAwareInterpolatorTraitConst: crate::ximgproc::SparseMatchInterpolatorTraitConst {
		fn as_raw_EdgeAwareInterpolator(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::EdgeAwareInterpolator]
	pub trait EdgeAwareInterpolatorTrait: crate::ximgproc::EdgeAwareInterpolatorTraitConst + crate::ximgproc::SparseMatchInterpolatorTrait {
		fn as_raw_mut_EdgeAwareInterpolator(&mut self) -> *mut c_void;

		/// Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term.
		/// This implementation is based on a rather simple gradient-based edge map estimation.
		/// To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been
		/// used in the original publication) that may lead to improved accuracies, the internal
		/// edge map estimation can be bypassed here.
		/// ## Parameters
		/// * _costMap: a type CV_32FC1 Mat is required.
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		#[inline]
		fn set_cost_map(&mut self, _cost_map: &impl core::MatTraitConst) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_setCostMap_const_MatR(self.as_raw_mut_EdgeAwareInterpolator(), _cost_map.as_raw_Mat(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to tune the approximate size of the superpixel used for oversegmentation.
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		/// /
		/// K is a number of nearest-neighbor matches considered, when fitting a locally affine
		///   model. Usually it should be around 128. However, lower values would make the interpolation
		///   noticeably faster.
		#[inline]
		fn set_k(&mut self, _k: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_setK_int(self.as_raw_mut_EdgeAwareInterpolator(), _k, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setK
		#[inline]
		fn get_k(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_getK(self.as_raw_mut_EdgeAwareInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sigma is a parameter defining how fast the weights decrease in the locally-weighted affine
		/// fitting. Higher values can help preserve fine details, lower values can help to get rid of noise in the
		/// output flow.
		#[inline]
		fn set_sigma(&mut self, _sigma: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_setSigma_float(self.as_raw_mut_EdgeAwareInterpolator(), _sigma, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setSigma
		#[inline]
		fn get_sigma(&mut self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_getSigma(self.as_raw_mut_EdgeAwareInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Lambda is a parameter defining the weight of the edge-aware term in geodesic distance,
		/// should be in the range of 0 to 1000.
		#[inline]
		fn set_lambda(&mut self, _lambda: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_setLambda_float(self.as_raw_mut_EdgeAwareInterpolator(), _lambda, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setLambda
		#[inline]
		fn get_lambda(&mut self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_getLambda(self.as_raw_mut_EdgeAwareInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets whether the fastGlobalSmootherFilter() post-processing is employed. It is turned on by
		/// default.
		#[inline]
		fn set_use_post_processing(&mut self, _use_post_proc: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_setUsePostProcessing_bool(self.as_raw_mut_EdgeAwareInterpolator(), _use_post_proc, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setUsePostProcessing
		#[inline]
		fn get_use_post_processing(&mut self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_getUsePostProcessing(self.as_raw_mut_EdgeAwareInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the respective fastGlobalSmootherFilter() parameter.
		#[inline]
		fn set_fgs_lambda(&mut self, _lambda: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_setFGSLambda_float(self.as_raw_mut_EdgeAwareInterpolator(), _lambda, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setFGSLambda
		#[inline]
		fn get_fgs_lambda(&mut self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_getFGSLambda(self.as_raw_mut_EdgeAwareInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setFGSLambda
		#[inline]
		fn set_fgs_sigma(&mut self, _sigma: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_setFGSSigma_float(self.as_raw_mut_EdgeAwareInterpolator(), _sigma, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// ## See also
		/// setFGSLambda
		#[inline]
		fn get_fgs_sigma(&mut self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeAwareInterpolator_getFGSSigma(self.as_raw_mut_EdgeAwareInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for EdgeAwareInterpolator {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("EdgeAwareInterpolator")
				.finish()
		}
	}

	boxed_cast_base! { EdgeAwareInterpolator, core::Algorithm, cv_ximgproc_EdgeAwareInterpolator_to_Algorithm }

	boxed_cast_base! { EdgeAwareInterpolator, crate::ximgproc::SparseMatchInterpolator, cv_ximgproc_EdgeAwareInterpolator_to_SparseMatchInterpolator }

	impl core::AlgorithmTraitConst for EdgeAwareInterpolator {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for EdgeAwareInterpolator {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { EdgeAwareInterpolator, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SparseMatchInterpolatorTraitConst for EdgeAwareInterpolator {
		#[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SparseMatchInterpolatorTrait for EdgeAwareInterpolator {
		#[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { EdgeAwareInterpolator, crate::ximgproc::SparseMatchInterpolatorTraitConst, as_raw_SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTrait, as_raw_mut_SparseMatchInterpolator }

	impl crate::ximgproc::EdgeAwareInterpolatorTraitConst for EdgeAwareInterpolator {
		#[inline] fn as_raw_EdgeAwareInterpolator(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::EdgeAwareInterpolatorTrait for EdgeAwareInterpolator {
		#[inline] fn as_raw_mut_EdgeAwareInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { EdgeAwareInterpolator, crate::ximgproc::EdgeAwareInterpolatorTraitConst, as_raw_EdgeAwareInterpolator, crate::ximgproc::EdgeAwareInterpolatorTrait, as_raw_mut_EdgeAwareInterpolator }

	/// Class implementing EdgeBoxes algorithm from [ZitnickECCV14edgeBoxes](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_ZitnickECCV14edgeBoxes) :
	pub struct EdgeBoxes {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { EdgeBoxes }

	impl Drop for EdgeBoxes {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_EdgeBoxes_delete(self.as_raw_mut_EdgeBoxes()) };
		}
	}

	unsafe impl Send for EdgeBoxes {}

	/// Constant methods for [crate::ximgproc::EdgeBoxes]
	pub trait EdgeBoxesTraitConst: core::AlgorithmTraitConst {
		fn as_raw_EdgeBoxes(&self) -> *const c_void;

		/// Returns the step size of sliding window search.
		#[inline]
		fn get_alpha(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getAlpha_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the nms threshold for object proposals.
		#[inline]
		fn get_beta(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getBeta_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns adaptation rate for nms threshold.
		#[inline]
		fn get_eta(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getEta_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the min score of boxes to detect.
		#[inline]
		fn get_min_score(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getMinScore_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the max number of boxes to detect.
		#[inline]
		fn get_max_boxes(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getMaxBoxes_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the edge min magnitude.
		#[inline]
		fn get_edge_min_mag(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getEdgeMinMag_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the edge merge threshold.
		#[inline]
		fn get_edge_merge_thr(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getEdgeMergeThr_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the cluster min magnitude.
		#[inline]
		fn get_cluster_min_mag(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getClusterMinMag_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the max aspect ratio of boxes.
		#[inline]
		fn get_max_aspect_ratio(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getMaxAspectRatio_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the minimum area of boxes.
		#[inline]
		fn get_min_box_area(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getMinBoxArea_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the affinity sensitivity.
		#[inline]
		fn get_gamma(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getGamma_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the scale sensitivity.
		#[inline]
		fn get_kappa(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getKappa_const(self.as_raw_EdgeBoxes(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::EdgeBoxes]
	pub trait EdgeBoxesTrait: core::AlgorithmTrait + crate::ximgproc::EdgeBoxesTraitConst {
		fn as_raw_mut_EdgeBoxes(&mut self) -> *mut c_void;

		/// Returns array containing proposal boxes.
		///
		/// ## Parameters
		/// * edge_map: edge image.
		/// * orientation_map: orientation map.
		/// * boxes: proposal boxes.
		/// * scores: of the proposal boxes, provided a vector of float types.
		///
		/// ## C++ default parameters
		/// * scores: noArray()
		#[inline]
		fn get_bounding_boxes(&mut self, edge_map: &impl ToInputArray, orientation_map: &impl ToInputArray, boxes: &mut core::Vector<core::Rect>, scores: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(edge_map);
			input_array_arg!(orientation_map);
			output_array_arg!(scores);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getBoundingBoxes_const__InputArrayR_const__InputArrayR_vectorLRectGR_const__OutputArrayR(self.as_raw_mut_EdgeBoxes(), edge_map.as_raw__InputArray(), orientation_map.as_raw__InputArray(), boxes.as_raw_mut_VectorOfRect(), scores.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns array containing proposal boxes.
		///
		/// ## Parameters
		/// * edge_map: edge image.
		/// * orientation_map: orientation map.
		/// * boxes: proposal boxes.
		/// * scores: of the proposal boxes, provided a vector of float types.
		///
		/// ## Note
		/// This alternative version of [EdgeBoxesTrait::get_bounding_boxes] function uses the following default values for its arguments:
		/// * scores: noArray()
		#[inline]
		fn get_bounding_boxes_def(&mut self, edge_map: &impl ToInputArray, orientation_map: &impl ToInputArray, boxes: &mut core::Vector<core::Rect>) -> Result<()> {
			input_array_arg!(edge_map);
			input_array_arg!(orientation_map);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_getBoundingBoxes_const__InputArrayR_const__InputArrayR_vectorLRectGR(self.as_raw_mut_EdgeBoxes(), edge_map.as_raw__InputArray(), orientation_map.as_raw__InputArray(), boxes.as_raw_mut_VectorOfRect(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the step size of sliding window search.
		#[inline]
		fn set_alpha(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setAlpha_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the nms threshold for object proposals.
		#[inline]
		fn set_beta(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setBeta_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the adaptation rate for nms threshold.
		#[inline]
		fn set_eta(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setEta_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the min score of boxes to detect.
		#[inline]
		fn set_min_score(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setMinScore_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets max number of boxes to detect.
		#[inline]
		fn set_max_boxes(&mut self, value: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setMaxBoxes_int(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the edge min magnitude.
		#[inline]
		fn set_edge_min_mag(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setEdgeMinMag_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the edge merge threshold.
		#[inline]
		fn set_edge_merge_thr(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setEdgeMergeThr_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the cluster min magnitude.
		#[inline]
		fn set_cluster_min_mag(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setClusterMinMag_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the max aspect ratio of boxes.
		#[inline]
		fn set_max_aspect_ratio(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setMaxAspectRatio_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the minimum area of boxes.
		#[inline]
		fn set_min_box_area(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setMinBoxArea_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the affinity sensitivity
		#[inline]
		fn set_gamma(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setGamma_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the scale sensitivity.
		#[inline]
		fn set_kappa(&mut self, value: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeBoxes_setKappa_float(self.as_raw_mut_EdgeBoxes(), value, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for EdgeBoxes {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("EdgeBoxes")
				.finish()
		}
	}

	boxed_cast_base! { EdgeBoxes, core::Algorithm, cv_ximgproc_EdgeBoxes_to_Algorithm }

	impl core::AlgorithmTraitConst for EdgeBoxes {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for EdgeBoxes {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { EdgeBoxes, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::EdgeBoxesTraitConst for EdgeBoxes {
		#[inline] fn as_raw_EdgeBoxes(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::EdgeBoxesTrait for EdgeBoxes {
		#[inline] fn as_raw_mut_EdgeBoxes(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { EdgeBoxes, crate::ximgproc::EdgeBoxesTraitConst, as_raw_EdgeBoxes, crate::ximgproc::EdgeBoxesTrait, as_raw_mut_EdgeBoxes }

	/// Class implementing the ED (EdgeDrawing) [topal2012edge](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_topal2012edge), EDLines [akinlar2011edlines](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_akinlar2011edlines), EDPF [akinlar2012edpf](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_akinlar2012edpf) and EDCircles [akinlar2013edcircles](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_akinlar2013edcircles) algorithms
	pub struct EdgeDrawing {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { EdgeDrawing }

	impl Drop for EdgeDrawing {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_EdgeDrawing_delete(self.as_raw_mut_EdgeDrawing()) };
		}
	}

	unsafe impl Send for EdgeDrawing {}

	/// Constant methods for [crate::ximgproc::EdgeDrawing]
	pub trait EdgeDrawingTraitConst: core::AlgorithmTraitConst {
		fn as_raw_EdgeDrawing(&self) -> *const c_void;

		#[inline]
		fn params(&self) -> crate::ximgproc::EdgeDrawing_Params {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_propParams_const(self.as_raw_EdgeDrawing(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			ret
		}

		/// Returns for each line found in detectLines() its edge segment index in getSegments()
		#[inline]
		fn get_segment_indices_of_lines(&self) -> Result<core::Vector<i32>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_getSegmentIndicesOfLines_const(self.as_raw_EdgeDrawing(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Vector::<i32>::opencv_from_extern(ret) };
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::EdgeDrawing]
	pub trait EdgeDrawingTrait: core::AlgorithmTrait + crate::ximgproc::EdgeDrawingTraitConst {
		fn as_raw_mut_EdgeDrawing(&mut self) -> *mut c_void;

		#[inline]
		fn set_params(&mut self, val: crate::ximgproc::EdgeDrawing_Params) {
			let ret = unsafe { sys::cv_ximgproc_EdgeDrawing_propParams_const_Params(self.as_raw_mut_EdgeDrawing(), &val) };
			ret
		}

		/// Detects edges in a grayscale image and prepares them to detect lines and ellipses.
		///
		/// ## Parameters
		/// * src: 8-bit, single-channel, grayscale input image.
		#[inline]
		fn detect_edges(&mut self, src: &impl ToInputArray) -> Result<()> {
			input_array_arg!(src);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_detectEdges_const__InputArrayR(self.as_raw_mut_EdgeDrawing(), src.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// returns Edge Image prepared by detectEdges() function.
		///
		/// ## Parameters
		/// * dst: returns 8-bit, single-channel output image.
		#[inline]
		fn get_edge_image(&mut self, dst: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_getEdgeImage_const__OutputArrayR(self.as_raw_mut_EdgeDrawing(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// returns Gradient Image prepared by detectEdges() function.
		///
		/// ## Parameters
		/// * dst: returns 16-bit, single-channel output image.
		#[inline]
		fn get_gradient_image(&mut self, dst: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_getGradientImage_const__OutputArrayR(self.as_raw_mut_EdgeDrawing(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns std::vector<std::vector<Point>> of detected edge segments, see detectEdges()
		#[inline]
		fn get_segments(&mut self) -> Result<core::Vector<core::Vector<core::Point>>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_getSegments(self.as_raw_mut_EdgeDrawing(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Vector::<core::Vector<core::Point>>::opencv_from_extern(ret) };
			Ok(ret)
		}

		/// Detects lines.
		///
		/// ## Parameters
		/// * lines: output Vec<4f> contains the start point and the end point of detected lines.
		///
		/// Note: you should call detectEdges() before calling this function.
		#[inline]
		fn detect_lines(&mut self, lines: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(lines);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_detectLines_const__OutputArrayR(self.as_raw_mut_EdgeDrawing(), lines.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Detects circles and ellipses.
		///
		/// ## Parameters
		/// * ellipses: output Vec<6d> contains center point and perimeter for circles, center point, axes and angle for ellipses.
		///
		/// Note: you should call detectEdges() before calling this function.
		#[inline]
		fn detect_ellipses(&mut self, ellipses: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(ellipses);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_detectEllipses_const__OutputArrayR(self.as_raw_mut_EdgeDrawing(), ellipses.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// sets parameters.
		///
		/// this function is meant to be used for parameter setting in other languages than c++ like python.
		/// ## Parameters
		/// * parameters: Parameters of the algorithm
		#[inline]
		fn set_params_1(&mut self, parameters: crate::ximgproc::EdgeDrawing_Params) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_setParams_const_ParamsR(self.as_raw_mut_EdgeDrawing(), &parameters, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for EdgeDrawing {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("EdgeDrawing")
				.field("params", &crate::ximgproc::EdgeDrawingTraitConst::params(self))
				.finish()
		}
	}

	boxed_cast_base! { EdgeDrawing, core::Algorithm, cv_ximgproc_EdgeDrawing_to_Algorithm }

	impl core::AlgorithmTraitConst for EdgeDrawing {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for EdgeDrawing {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { EdgeDrawing, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::EdgeDrawingTraitConst for EdgeDrawing {
		#[inline] fn as_raw_EdgeDrawing(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::EdgeDrawingTrait for EdgeDrawing {
		#[inline] fn as_raw_mut_EdgeDrawing(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { EdgeDrawing, crate::ximgproc::EdgeDrawingTraitConst, as_raw_EdgeDrawing, crate::ximgproc::EdgeDrawingTrait, as_raw_mut_EdgeDrawing }

	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq)]
	pub struct EdgeDrawing_Params {
		/// Parameter Free mode will be activated when this value is set as true. Default value is false.
		pub p_fmode: bool,
		/// indicates the operator used for gradient calculation.
		///
		/// one of the flags cv::ximgproc::EdgeDrawing::GradientOperator. Default value is PREWITT
		pub edge_detection_operator: i32,
		/// threshold value of gradiential difference between pixels. Used to create gradient image. Default value is 20
		pub gradient_threshold_value: i32,
		/// threshold value used to select anchor points. Default value is 0
		pub anchor_threshold_value: i32,
		/// Default value is 1
		pub scan_interval: i32,
		/// minimun connected pixels length processed to create an edge segment.
		///
		/// in gradient image, minimum connected pixels length processed to create an edge segment. pixels having upper value than GradientThresholdValue
		/// will be processed. Default value is 10
		pub min_path_length: i32,
		/// sigma value for internal GaussianBlur() function. Default value is 1.0
		pub sigma: f32,
		pub sum_flag: bool,
		/// Default value is true. indicates if NFA (Number of False Alarms) algorithm will be used for line and ellipse validation.
		pub nfa_validation: bool,
		/// minimun line length to detect.
		pub min_line_length: i32,
		/// Default value is 6.0
		pub max_distance_between_two_lines: f64,
		/// Default value is 1.0
		pub line_fit_error_threshold: f64,
		/// Default value is 1.3
		pub max_error_threshold: f64,
	}

	opencv_type_simple! { crate::ximgproc::EdgeDrawing_Params }

	impl EdgeDrawing_Params {
		#[inline]
		pub fn write(self, fs: &mut impl core::FileStorageTrait) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_Params_write_const_FileStorageR(&self, fs.as_raw_mut_FileStorage(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		pub fn default() -> Result<crate::ximgproc::EdgeDrawing_Params> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_Params_Params(ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		pub fn read(self, fn_: &impl core::FileNodeTraitConst) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_EdgeDrawing_Params_read_const_FileNodeR(&self, fn_.as_raw_FileNode(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Interface for implementations of Fast Bilateral Solver.
	///
	/// For more details about this solver see [BarronPoole2016](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_BarronPoole2016) .
	pub struct FastBilateralSolverFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { FastBilateralSolverFilter }

	impl Drop for FastBilateralSolverFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_FastBilateralSolverFilter_delete(self.as_raw_mut_FastBilateralSolverFilter()) };
		}
	}

	unsafe impl Send for FastBilateralSolverFilter {}

	/// Constant methods for [crate::ximgproc::FastBilateralSolverFilter]
	pub trait FastBilateralSolverFilterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_FastBilateralSolverFilter(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::FastBilateralSolverFilter]
	pub trait FastBilateralSolverFilterTrait: core::AlgorithmTrait + crate::ximgproc::FastBilateralSolverFilterTraitConst {
		fn as_raw_mut_FastBilateralSolverFilter(&mut self) -> *mut c_void;

		/// Apply smoothing operation to the source image.
		///
		/// ## Parameters
		/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 3 channels.
		///
		/// * confidence: confidence image with unsigned 8-bit or floating-point 32-bit confidence and 1 channel.
		///
		/// * dst: destination image.
		///
		///
		/// Note: Confidence images with CV_8U depth are expected to in [0, 255] and CV_32F in [0, 1] range.
		#[inline]
		fn filter(&mut self, src: &impl ToInputArray, confidence: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			input_array_arg!(confidence);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_FastBilateralSolverFilter_filter_const__InputArrayR_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_FastBilateralSolverFilter(), src.as_raw__InputArray(), confidence.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for FastBilateralSolverFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("FastBilateralSolverFilter")
				.finish()
		}
	}

	boxed_cast_base! { FastBilateralSolverFilter, core::Algorithm, cv_ximgproc_FastBilateralSolverFilter_to_Algorithm }

	impl core::AlgorithmTraitConst for FastBilateralSolverFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for FastBilateralSolverFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { FastBilateralSolverFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::FastBilateralSolverFilterTraitConst for FastBilateralSolverFilter {
		#[inline] fn as_raw_FastBilateralSolverFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::FastBilateralSolverFilterTrait for FastBilateralSolverFilter {
		#[inline] fn as_raw_mut_FastBilateralSolverFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { FastBilateralSolverFilter, crate::ximgproc::FastBilateralSolverFilterTraitConst, as_raw_FastBilateralSolverFilter, crate::ximgproc::FastBilateralSolverFilterTrait, as_raw_mut_FastBilateralSolverFilter }

	/// Interface for implementations of Fast Global Smoother filter.
	///
	/// For more details about this filter see [Min2014](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Min2014) and [Farbman2008](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Farbman2008) .
	pub struct FastGlobalSmootherFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { FastGlobalSmootherFilter }

	impl Drop for FastGlobalSmootherFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_FastGlobalSmootherFilter_delete(self.as_raw_mut_FastGlobalSmootherFilter()) };
		}
	}

	unsafe impl Send for FastGlobalSmootherFilter {}

	/// Constant methods for [crate::ximgproc::FastGlobalSmootherFilter]
	pub trait FastGlobalSmootherFilterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_FastGlobalSmootherFilter(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::FastGlobalSmootherFilter]
	pub trait FastGlobalSmootherFilterTrait: core::AlgorithmTrait + crate::ximgproc::FastGlobalSmootherFilterTraitConst {
		fn as_raw_mut_FastGlobalSmootherFilter(&mut self) -> *mut c_void;

		/// Apply smoothing operation to the source image.
		///
		/// ## Parameters
		/// * src: source image for filtering with unsigned 8-bit or signed 16-bit or floating-point 32-bit depth and up to 4 channels.
		///
		/// * dst: destination image.
		#[inline]
		fn filter(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_FastGlobalSmootherFilter_filter_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_FastGlobalSmootherFilter(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for FastGlobalSmootherFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("FastGlobalSmootherFilter")
				.finish()
		}
	}

	boxed_cast_base! { FastGlobalSmootherFilter, core::Algorithm, cv_ximgproc_FastGlobalSmootherFilter_to_Algorithm }

	impl core::AlgorithmTraitConst for FastGlobalSmootherFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for FastGlobalSmootherFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { FastGlobalSmootherFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::FastGlobalSmootherFilterTraitConst for FastGlobalSmootherFilter {
		#[inline] fn as_raw_FastGlobalSmootherFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::FastGlobalSmootherFilterTrait for FastGlobalSmootherFilter {
		#[inline] fn as_raw_mut_FastGlobalSmootherFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { FastGlobalSmootherFilter, crate::ximgproc::FastGlobalSmootherFilterTraitConst, as_raw_FastGlobalSmootherFilter, crate::ximgproc::FastGlobalSmootherFilterTrait, as_raw_mut_FastGlobalSmootherFilter }

	/// @include samples/fld_lines.cpp
	pub struct FastLineDetector {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { FastLineDetector }

	impl Drop for FastLineDetector {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_FastLineDetector_delete(self.as_raw_mut_FastLineDetector()) };
		}
	}

	unsafe impl Send for FastLineDetector {}

	/// Constant methods for [crate::ximgproc::FastLineDetector]
	pub trait FastLineDetectorTraitConst: core::AlgorithmTraitConst {
		fn as_raw_FastLineDetector(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::FastLineDetector]
	pub trait FastLineDetectorTrait: core::AlgorithmTrait + crate::ximgproc::FastLineDetectorTraitConst {
		fn as_raw_mut_FastLineDetector(&mut self) -> *mut c_void;

		/// @example fld_lines.cpp
		///       An example using the FastLineDetector
		///
		/// Finds lines in the input image.
		///       This is the output of the default parameters of the algorithm on the above
		///       shown image.
		///
		///       ![image](https://docs.opencv.org/4.11.0/corridor_fld.jpg)
		///
		/// ## Parameters
		/// * image: A grayscale (CV_8UC1) input image. If only a roi needs to be
		///       selected, use: `fld_ptr-\>detect(image(roi), lines, ...);
		///       lines += Scalar(roi.x, roi.y, roi.x, roi.y);`
		/// * lines: A vector of Vec4f elements specifying the beginning
		///       and ending point of a line.  Where Vec4f is (x1, y1, x2, y2), point
		///       1 is the start, point 2 - end. Returned lines are directed so that the
		///       brighter side is on their left.
		#[inline]
		fn detect(&mut self, image: &impl ToInputArray, lines: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(image);
			output_array_arg!(lines);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_FastLineDetector_detect_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_FastLineDetector(), image.as_raw__InputArray(), lines.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// 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.
		/// * draw_arrow: If true, arrow heads will be drawn.
		/// * linecolor: Line color.
		/// * linethickness: Line thickness.
		///
		/// ## C++ default parameters
		/// * draw_arrow: false
		/// * linecolor: Scalar(0,0,255)
		/// * linethickness: 1
		#[inline]
		fn draw_segments(&mut self, image: &mut impl ToInputOutputArray, lines: &impl ToInputArray, draw_arrow: bool, linecolor: core::Scalar, linethickness: i32) -> Result<()> {
			input_output_array_arg!(image);
			input_array_arg!(lines);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_FastLineDetector_drawSegments_const__InputOutputArrayR_const__InputArrayR_bool_Scalar_int(self.as_raw_mut_FastLineDetector(), image.as_raw__InputOutputArray(), lines.as_raw__InputArray(), draw_arrow, &linecolor, linethickness, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// 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.
		/// * draw_arrow: If true, arrow heads will be drawn.
		/// * linecolor: Line color.
		/// * linethickness: Line thickness.
		///
		/// ## Note
		/// This alternative version of [FastLineDetectorTrait::draw_segments] function uses the following default values for its arguments:
		/// * draw_arrow: false
		/// * linecolor: Scalar(0,0,255)
		/// * linethickness: 1
		#[inline]
		fn draw_segments_def(&mut self, image: &mut impl ToInputOutputArray, lines: &impl ToInputArray) -> Result<()> {
			input_output_array_arg!(image);
			input_array_arg!(lines);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_FastLineDetector_drawSegments_const__InputOutputArrayR_const__InputArrayR(self.as_raw_mut_FastLineDetector(), image.as_raw__InputOutputArray(), lines.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for FastLineDetector {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("FastLineDetector")
				.finish()
		}
	}

	boxed_cast_base! { FastLineDetector, core::Algorithm, cv_ximgproc_FastLineDetector_to_Algorithm }

	impl core::AlgorithmTraitConst for FastLineDetector {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for FastLineDetector {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { FastLineDetector, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::FastLineDetectorTraitConst for FastLineDetector {
		#[inline] fn as_raw_FastLineDetector(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::FastLineDetectorTrait for FastLineDetector {
		#[inline] fn as_raw_mut_FastLineDetector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { FastLineDetector, crate::ximgproc::FastLineDetectorTraitConst, as_raw_FastLineDetector, crate::ximgproc::FastLineDetectorTrait, as_raw_mut_FastLineDetector }

	/// Interface for realizations of (Fast) Guided Filter.
	///
	/// For more details about this filter see [Kaiming10](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Kaiming10) [Kaiming15](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Kaiming15) .
	pub struct GuidedFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { GuidedFilter }

	impl Drop for GuidedFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_GuidedFilter_delete(self.as_raw_mut_GuidedFilter()) };
		}
	}

	unsafe impl Send for GuidedFilter {}

	/// Constant methods for [crate::ximgproc::GuidedFilter]
	pub trait GuidedFilterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_GuidedFilter(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::GuidedFilter]
	pub trait GuidedFilterTrait: core::AlgorithmTrait + crate::ximgproc::GuidedFilterTraitConst {
		fn as_raw_mut_GuidedFilter(&mut self) -> *mut c_void;

		/// Apply (Fast) Guided Filter to the filtering image.
		///
		/// ## Parameters
		/// * src: filtering image with any numbers of channels.
		///
		/// * dst: output image.
		///
		/// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent
		/// to src.depth().
		///
		/// ## C++ default parameters
		/// * d_depth: -1
		#[inline]
		fn filter(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, d_depth: i32) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_GuidedFilter_filter_const__InputArrayR_const__OutputArrayR_int(self.as_raw_mut_GuidedFilter(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), d_depth, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Apply (Fast) Guided Filter to the filtering image.
		///
		/// ## Parameters
		/// * src: filtering image with any numbers of channels.
		///
		/// * dst: output image.
		///
		/// * dDepth: optional depth of the output image. dDepth can be set to -1, which will be equivalent
		/// to src.depth().
		///
		/// ## Note
		/// This alternative version of [GuidedFilterTrait::filter] function uses the following default values for its arguments:
		/// * d_depth: -1
		#[inline]
		fn filter_def(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_GuidedFilter_filter_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_GuidedFilter(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for GuidedFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("GuidedFilter")
				.finish()
		}
	}

	boxed_cast_base! { GuidedFilter, core::Algorithm, cv_ximgproc_GuidedFilter_to_Algorithm }

	impl core::AlgorithmTraitConst for GuidedFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for GuidedFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { GuidedFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::GuidedFilterTraitConst for GuidedFilter {
		#[inline] fn as_raw_GuidedFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::GuidedFilterTrait for GuidedFilter {
		#[inline] fn as_raw_mut_GuidedFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { GuidedFilter, crate::ximgproc::GuidedFilterTraitConst, as_raw_GuidedFilter, crate::ximgproc::GuidedFilterTrait, as_raw_mut_GuidedFilter }

	/// !
	/// Helper class for training part of [P. Dollar and C. L. Zitnick. Structured Forests for Fast Edge Detection, 2013].
	pub struct RFFeatureGetter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { RFFeatureGetter }

	impl Drop for RFFeatureGetter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_RFFeatureGetter_delete(self.as_raw_mut_RFFeatureGetter()) };
		}
	}

	unsafe impl Send for RFFeatureGetter {}

	/// Constant methods for [crate::ximgproc::RFFeatureGetter]
	pub trait RFFeatureGetterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_RFFeatureGetter(&self) -> *const c_void;

		/// !
		/// * This functions extracts feature channels from src.
		/// * Than StructureEdgeDetection uses this feature space
		/// * to detect edges.
		/// *
		/// * \param src : source image to extract features
		/// * \param features : output n-channel floating point feature matrix.
		/// *
		/// * \param gnrmRad : __rf.options.gradientNormalizationRadius
		/// * \param gsmthRad : __rf.options.gradientSmoothingRadius
		/// * \param shrink : __rf.options.shrinkNumber
		/// * \param outNum : __rf.options.numberOfOutputChannels
		/// * \param gradNum : __rf.options.numberOfGradientOrientations
		#[inline]
		fn get_features(&self, src: &impl core::MatTraitConst, features: &mut impl core::MatTrait, gnrm_rad: i32, gsmth_rad: i32, shrink: i32, out_num: i32, grad_num: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RFFeatureGetter_getFeatures_const_const_MatR_MatR_const_int_const_int_const_int_const_int_const_int(self.as_raw_RFFeatureGetter(), src.as_raw_Mat(), features.as_raw_mut_Mat(), gnrm_rad, gsmth_rad, shrink, out_num, grad_num, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::RFFeatureGetter]
	pub trait RFFeatureGetterTrait: core::AlgorithmTrait + crate::ximgproc::RFFeatureGetterTraitConst {
		fn as_raw_mut_RFFeatureGetter(&mut self) -> *mut c_void;

	}

	impl std::fmt::Debug for RFFeatureGetter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("RFFeatureGetter")
				.finish()
		}
	}

	boxed_cast_base! { RFFeatureGetter, core::Algorithm, cv_ximgproc_RFFeatureGetter_to_Algorithm }

	impl core::AlgorithmTraitConst for RFFeatureGetter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for RFFeatureGetter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { RFFeatureGetter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::RFFeatureGetterTraitConst for RFFeatureGetter {
		#[inline] fn as_raw_RFFeatureGetter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::RFFeatureGetterTrait for RFFeatureGetter {
		#[inline] fn as_raw_mut_RFFeatureGetter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { RFFeatureGetter, crate::ximgproc::RFFeatureGetterTraitConst, as_raw_RFFeatureGetter, crate::ximgproc::RFFeatureGetterTrait, as_raw_mut_RFFeatureGetter }

	/// Sparse match interpolation algorithm based on modified piecewise locally-weighted affine
	/// estimator called Robust Interpolation method of Correspondences or RIC from [Hu2017](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Hu2017) and Variational
	/// and Fast Global Smoother as post-processing filter. The RICInterpolator is a extension of the EdgeAwareInterpolator.
	/// Main concept of this extension is an piece-wise affine model based on over-segmentation via SLIC superpixel estimation.
	/// The method contains an efficient propagation mechanism to estimate among the pieces-wise models.
	pub struct RICInterpolator {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { RICInterpolator }

	impl Drop for RICInterpolator {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_RICInterpolator_delete(self.as_raw_mut_RICInterpolator()) };
		}
	}

	unsafe impl Send for RICInterpolator {}

	/// Constant methods for [crate::ximgproc::RICInterpolator]
	pub trait RICInterpolatorTraitConst: crate::ximgproc::SparseMatchInterpolatorTraitConst {
		fn as_raw_RICInterpolator(&self) -> *const c_void;

		/// K is a number of nearest-neighbor matches considered, when fitting a locally affine
		/// model for a superpixel segment. However, lower values would make the interpolation
		/// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32.
		/// ## See also
		/// setK
		#[inline]
		fn get_k(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getK_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Get the internal cost, i.e. edge map, used for estimating the edge-aware term.
		/// ## See also
		/// setCostMap
		/// setSuperpixelSize
		#[inline]
		fn get_superpixel_size(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getSuperpixelSize_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine
		/// model.
		/// ## See also
		/// setSuperpixelNNCnt
		#[inline]
		fn get_superpixel_nn_cnt(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getSuperpixelNNCnt_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		/// setSuperpixelRuler
		#[inline]
		fn get_superpixel_ruler(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getSuperpixelRuler_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose superpixel algorithm variant to use:
		/// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100)
		/// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101)
		/// - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		/// setSuperpixelMode
		#[inline]
		fn get_superpixel_mode(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getSuperpixelMode_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
		/// ## See also
		/// setAlpha
		#[inline]
		fn get_alpha(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getAlpha_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter defining the number of iterations for piece-wise affine model estimation.
		/// ## See also
		/// setModelIter
		#[inline]
		fn get_model_iter(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getModelIter_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose wether additional refinement of the piece-wise affine models is employed.
		/// ## See also
		/// setRefineModels
		#[inline]
		fn get_refine_models(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getRefineModels_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.
		/// If the prediction exceeds the treshold the translational model will be applied instead.
		/// ## See also
		/// setMaxFlow
		#[inline]
		fn get_max_flow(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getMaxFlow_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose wether the VariationalRefinement post-processing  is employed.
		/// ## See also
		/// setUseVariationalRefinement
		#[inline]
		fn get_use_variational_refinement(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getUseVariationalRefinement_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets whether the fastGlobalSmootherFilter() post-processing is employed.
		/// ## See also
		/// setUseGlobalSmootherFilter
		#[inline]
		fn get_use_global_smoother_filter(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getUseGlobalSmootherFilter_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the respective fastGlobalSmootherFilter() parameter.
		/// ## See also
		/// setFGSLambda
		#[inline]
		fn get_fgs_lambda(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getFGSLambda_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the respective fastGlobalSmootherFilter() parameter.
		/// ## See also
		/// setFGSSigma
		#[inline]
		fn get_fgs_sigma(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_getFGSSigma_const(self.as_raw_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::RICInterpolator]
	pub trait RICInterpolatorTrait: crate::ximgproc::RICInterpolatorTraitConst + crate::ximgproc::SparseMatchInterpolatorTrait {
		fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void;

		/// K is a number of nearest-neighbor matches considered, when fitting a locally affine
		/// model for a superpixel segment. However, lower values would make the interpolation
		/// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32.
		///
		/// ## C++ default parameters
		/// * k: 32
		#[inline]
		fn set_k(&mut self, k: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setK_int(self.as_raw_mut_RICInterpolator(), k, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// K is a number of nearest-neighbor matches considered, when fitting a locally affine
		/// model for a superpixel segment. However, lower values would make the interpolation
		/// noticeably faster. The original implementation of [Hu2017](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Hu2017) uses 32.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_k] function uses the following default values for its arguments:
		/// * k: 32
		#[inline]
		fn set_k_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setK(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Interface to provide a more elaborated cost map, i.e. edge map, for the edge-aware term.
		/// This implementation is based on a rather simple gradient-based edge map estimation.
		/// To used more complex edge map estimator (e.g. StructuredEdgeDetection that has been
		/// used in the original publication) that may lead to improved accuracies, the internal
		/// edge map estimation can be bypassed here.
		/// ## Parameters
		/// * costMap: a type CV_32FC1 Mat is required.
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		#[inline]
		fn set_cost_map(&mut self, cost_map: &impl core::MatTraitConst) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setCostMap_const_MatR(self.as_raw_mut_RICInterpolator(), cost_map.as_raw_Mat(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Get the internal cost, i.e. edge map, used for estimating the edge-aware term.
		/// ## See also
		/// setCostMap
		///
		/// ## C++ default parameters
		/// * sp_size: 15
		#[inline]
		fn set_superpixel_size(&mut self, sp_size: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelSize_int(self.as_raw_mut_RICInterpolator(), sp_size, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Get the internal cost, i.e. edge map, used for estimating the edge-aware term.
		/// ## See also
		/// setCostMap
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_superpixel_size] function uses the following default values for its arguments:
		/// * sp_size: 15
		#[inline]
		fn set_superpixel_size_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelSize(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine
		/// model.
		///
		/// ## C++ default parameters
		/// * sp_nn: 150
		#[inline]
		fn set_superpixel_nn_cnt(&mut self, sp_nn: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelNNCnt_int(self.as_raw_mut_RICInterpolator(), sp_nn, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter defines the number of nearest-neighbor matches for each superpixel considered, when fitting a locally affine
		/// model.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_superpixel_nn_cnt] function uses the following default values for its arguments:
		/// * sp_nn: 150
		#[inline]
		fn set_superpixel_nn_cnt_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelNNCnt(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		///
		/// ## C++ default parameters
		/// * ruler: 15.f
		#[inline]
		fn set_superpixel_ruler(&mut self, ruler: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelRuler_float(self.as_raw_mut_RICInterpolator(), ruler, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to tune enforcement of superpixel smoothness factor used for oversegmentation.
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_superpixel_ruler] function uses the following default values for its arguments:
		/// * ruler: 15.f
		#[inline]
		fn set_superpixel_ruler_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelRuler(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose superpixel algorithm variant to use:
		/// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100)
		/// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101)
		/// - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		///
		/// ## C++ default parameters
		/// * mode: 100
		#[inline]
		fn set_superpixel_mode(&mut self, mode: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelMode_int(self.as_raw_mut_RICInterpolator(), mode, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose superpixel algorithm variant to use:
		/// - cv::ximgproc::SLICType SLIC segments image using a desired region_size (value: 100)
		/// - cv::ximgproc::SLICType SLICO will optimize using adaptive compactness factor (value: 101)
		/// - cv::ximgproc::SLICType MSLIC will optimize using manifold methods resulting in more content-sensitive superpixels (value: 102).
		/// ## See also
		/// cv::ximgproc::createSuperpixelSLIC
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_superpixel_mode] function uses the following default values for its arguments:
		/// * mode: 100
		#[inline]
		fn set_superpixel_mode_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setSuperpixelMode(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
		///
		/// ## C++ default parameters
		/// * alpha: 0.7f
		#[inline]
		fn set_alpha(&mut self, alpha: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setAlpha_float(self.as_raw_mut_RICInterpolator(), alpha, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Alpha is a parameter defining a global weight for transforming geodesic distance into weight.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_alpha] function uses the following default values for its arguments:
		/// * alpha: 0.7f
		#[inline]
		fn set_alpha_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setAlpha(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter defining the number of iterations for piece-wise affine model estimation.
		///
		/// ## C++ default parameters
		/// * model_iter: 4
		#[inline]
		fn set_model_iter(&mut self, model_iter: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setModelIter_int(self.as_raw_mut_RICInterpolator(), model_iter, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter defining the number of iterations for piece-wise affine model estimation.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_model_iter] function uses the following default values for its arguments:
		/// * model_iter: 4
		#[inline]
		fn set_model_iter_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setModelIter(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose wether additional refinement of the piece-wise affine models is employed.
		///
		/// ## C++ default parameters
		/// * refine_modles: true
		#[inline]
		fn set_refine_models(&mut self, refine_modles: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setRefineModels_bool(self.as_raw_mut_RICInterpolator(), refine_modles, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose wether additional refinement of the piece-wise affine models is employed.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_refine_models] function uses the following default values for its arguments:
		/// * refine_modles: true
		#[inline]
		fn set_refine_models_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setRefineModels(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.
		/// If the prediction exceeds the treshold the translational model will be applied instead.
		///
		/// ## C++ default parameters
		/// * max_flow: 250.f
		#[inline]
		fn set_max_flow(&mut self, max_flow: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setMaxFlow_float(self.as_raw_mut_RICInterpolator(), max_flow, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// MaxFlow is a threshold to validate the predictions using a certain piece-wise affine model.
		/// If the prediction exceeds the treshold the translational model will be applied instead.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_max_flow] function uses the following default values for its arguments:
		/// * max_flow: 250.f
		#[inline]
		fn set_max_flow_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setMaxFlow(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose wether the VariationalRefinement post-processing  is employed.
		///
		/// ## C++ default parameters
		/// * use_variational_refinement: false
		#[inline]
		fn set_use_variational_refinement(&mut self, use_variational_refinement: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setUseVariationalRefinement_bool(self.as_raw_mut_RICInterpolator(), use_variational_refinement, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Parameter to choose wether the VariationalRefinement post-processing  is employed.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_use_variational_refinement] function uses the following default values for its arguments:
		/// * use_variational_refinement: false
		#[inline]
		fn set_use_variational_refinement_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setUseVariationalRefinement(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets whether the fastGlobalSmootherFilter() post-processing is employed.
		///
		/// ## C++ default parameters
		/// * use_fgs: true
		#[inline]
		fn set_use_global_smoother_filter(&mut self, use_fgs: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setUseGlobalSmootherFilter_bool(self.as_raw_mut_RICInterpolator(), use_fgs, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets whether the fastGlobalSmootherFilter() post-processing is employed.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_use_global_smoother_filter] function uses the following default values for its arguments:
		/// * use_fgs: true
		#[inline]
		fn set_use_global_smoother_filter_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setUseGlobalSmootherFilter(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the respective fastGlobalSmootherFilter() parameter.
		///
		/// ## C++ default parameters
		/// * lambda: 500.f
		#[inline]
		fn set_fgs_lambda(&mut self, lambda: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setFGSLambda_float(self.as_raw_mut_RICInterpolator(), lambda, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the respective fastGlobalSmootherFilter() parameter.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_fgs_lambda] function uses the following default values for its arguments:
		/// * lambda: 500.f
		#[inline]
		fn set_fgs_lambda_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setFGSLambda(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the respective fastGlobalSmootherFilter() parameter.
		///
		/// ## C++ default parameters
		/// * sigma: 1.5f
		#[inline]
		fn set_fgs_sigma(&mut self, sigma: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setFGSSigma_float(self.as_raw_mut_RICInterpolator(), sigma, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Sets the respective fastGlobalSmootherFilter() parameter.
		///
		/// ## Note
		/// This alternative version of [RICInterpolatorTrait::set_fgs_sigma] function uses the following default values for its arguments:
		/// * sigma: 1.5f
		#[inline]
		fn set_fgs_sigma_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RICInterpolator_setFGSSigma(self.as_raw_mut_RICInterpolator(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for RICInterpolator {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("RICInterpolator")
				.finish()
		}
	}

	boxed_cast_base! { RICInterpolator, core::Algorithm, cv_ximgproc_RICInterpolator_to_Algorithm }

	boxed_cast_base! { RICInterpolator, crate::ximgproc::SparseMatchInterpolator, cv_ximgproc_RICInterpolator_to_SparseMatchInterpolator }

	impl core::AlgorithmTraitConst for RICInterpolator {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for RICInterpolator {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { RICInterpolator, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SparseMatchInterpolatorTraitConst for RICInterpolator {
		#[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SparseMatchInterpolatorTrait for RICInterpolator {
		#[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { RICInterpolator, crate::ximgproc::SparseMatchInterpolatorTraitConst, as_raw_SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTrait, as_raw_mut_SparseMatchInterpolator }

	impl crate::ximgproc::RICInterpolatorTraitConst for RICInterpolator {
		#[inline] fn as_raw_RICInterpolator(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::RICInterpolatorTrait for RICInterpolator {
		#[inline] fn as_raw_mut_RICInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { RICInterpolator, crate::ximgproc::RICInterpolatorTraitConst, as_raw_RICInterpolator, crate::ximgproc::RICInterpolatorTrait, as_raw_mut_RICInterpolator }

	/// Applies Ridge Detection Filter to an input image.
	/// Implements Ridge detection similar to the one in [Mathematica](http://reference.wolfram.com/language/ref/RidgeFilter.html)
	/// using the eigen values from the Hessian Matrix of the input image using Sobel Derivatives.
	/// Additional refinement can be done using Skeletonization and Binarization. Adapted from [segleafvein](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_segleafvein) and [M_RF](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_M_RF)
	pub struct RidgeDetectionFilter {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { RidgeDetectionFilter }

	impl Drop for RidgeDetectionFilter {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_RidgeDetectionFilter_delete(self.as_raw_mut_RidgeDetectionFilter()) };
		}
	}

	unsafe impl Send for RidgeDetectionFilter {}

	impl RidgeDetectionFilter {
		/// Create pointer to the Ridge detection filter.
		/// ## Parameters
		/// * ddepth: Specifies output image depth. Defualt is CV_32FC1
		/// * dx: Order of derivative x, default is 1
		/// * dy: Order of derivative y, default is 1
		/// * ksize: Sobel kernel size , default is 3
		/// * out_dtype: Converted format for output, default is CV_8UC1
		/// * scale: Optional scale value for derivative values, default is 1
		/// * delta: Optional bias added to output, default is 0
		/// * borderType: Pixel extrapolation method, default is BORDER_DEFAULT
		/// ## See also
		/// Sobel, threshold, getStructuringElement, morphologyEx.( for additional refinement)
		///
		/// ## C++ default parameters
		/// * ddepth: CV_32FC1
		/// * dx: 1
		/// * dy: 1
		/// * ksize: 3
		/// * out_dtype: CV_8UC1
		/// * scale: 1
		/// * delta: 0
		/// * border_type: BORDER_DEFAULT
		#[inline]
		pub fn create(ddepth: i32, dx: i32, dy: i32, ksize: i32, out_dtype: i32, scale: f64, delta: f64, border_type: i32) -> Result<core::Ptr<crate::ximgproc::RidgeDetectionFilter>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RidgeDetectionFilter_create_int_int_int_int_int_double_double_int(ddepth, dx, dy, ksize, out_dtype, scale, delta, border_type, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<crate::ximgproc::RidgeDetectionFilter>::opencv_from_extern(ret) };
			Ok(ret)
		}

		/// Create pointer to the Ridge detection filter.
		/// ## Parameters
		/// * ddepth: Specifies output image depth. Defualt is CV_32FC1
		/// * dx: Order of derivative x, default is 1
		/// * dy: Order of derivative y, default is 1
		/// * ksize: Sobel kernel size , default is 3
		/// * out_dtype: Converted format for output, default is CV_8UC1
		/// * scale: Optional scale value for derivative values, default is 1
		/// * delta: Optional bias added to output, default is 0
		/// * borderType: Pixel extrapolation method, default is BORDER_DEFAULT
		/// ## See also
		/// Sobel, threshold, getStructuringElement, morphologyEx.( for additional refinement)
		///
		/// ## Note
		/// This alternative version of [RidgeDetectionFilter::create] function uses the following default values for its arguments:
		/// * ddepth: CV_32FC1
		/// * dx: 1
		/// * dy: 1
		/// * ksize: 3
		/// * out_dtype: CV_8UC1
		/// * scale: 1
		/// * delta: 0
		/// * border_type: BORDER_DEFAULT
		#[inline]
		pub fn create_def() -> Result<core::Ptr<crate::ximgproc::RidgeDetectionFilter>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RidgeDetectionFilter_create(ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<crate::ximgproc::RidgeDetectionFilter>::opencv_from_extern(ret) };
			Ok(ret)
		}

	}

	/// Constant methods for [crate::ximgproc::RidgeDetectionFilter]
	pub trait RidgeDetectionFilterTraitConst: core::AlgorithmTraitConst {
		fn as_raw_RidgeDetectionFilter(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::RidgeDetectionFilter]
	pub trait RidgeDetectionFilterTrait: core::AlgorithmTrait + crate::ximgproc::RidgeDetectionFilterTraitConst {
		fn as_raw_mut_RidgeDetectionFilter(&mut self) -> *mut c_void;

		/// Apply Ridge detection filter on input image.
		/// ## Parameters
		/// * _img: InputArray as supported by Sobel. img can be 1-Channel or 3-Channels.
		/// * out: OutputAray of structure as RidgeDetectionFilter::ddepth. Output image with ridges.
		#[inline]
		fn get_ridge_filtered_image(&mut self, _img: &impl ToInputArray, out: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(_img);
			output_array_arg!(out);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_RidgeDetectionFilter_getRidgeFilteredImage_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_RidgeDetectionFilter(), _img.as_raw__InputArray(), out.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for RidgeDetectionFilter {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("RidgeDetectionFilter")
				.finish()
		}
	}

	boxed_cast_base! { RidgeDetectionFilter, core::Algorithm, cv_ximgproc_RidgeDetectionFilter_to_Algorithm }

	impl core::AlgorithmTraitConst for RidgeDetectionFilter {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for RidgeDetectionFilter {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { RidgeDetectionFilter, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::RidgeDetectionFilterTraitConst for RidgeDetectionFilter {
		#[inline] fn as_raw_RidgeDetectionFilter(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::RidgeDetectionFilterTrait for RidgeDetectionFilter {
		#[inline] fn as_raw_mut_RidgeDetectionFilter(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { RidgeDetectionFilter, crate::ximgproc::RidgeDetectionFilterTraitConst, as_raw_RidgeDetectionFilter, crate::ximgproc::RidgeDetectionFilterTrait, as_raw_mut_RidgeDetectionFilter }

	/// Class implementing the F-DBSCAN (Accelerated superpixel image segmentation with a parallelized DBSCAN algorithm) superpixels
	/// algorithm by Loke SC, et al. [loke2021accelerated](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_loke2021accelerated) for original paper.
	///
	/// The algorithm uses a parallelised DBSCAN cluster search that is resistant to noise, competitive in segmentation quality, and faster than
	/// existing superpixel segmentation methods. When tested on the Berkeley Segmentation Dataset, the average processing speed is 175 frames/s
	/// with a Boundary Recall of 0.797 and an Achievable Segmentation Accuracy of 0.944. The computational complexity is quadratic O(n2) and
	/// more suited to smaller images, but can still process a 2MP colour image faster than the SEEDS algorithm in OpenCV. The output is deterministic
	/// when the number of processing threads is fixed, and requires the source image to be in Lab colour format.
	pub struct ScanSegment {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { ScanSegment }

	impl Drop for ScanSegment {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_ScanSegment_delete(self.as_raw_mut_ScanSegment()) };
		}
	}

	unsafe impl Send for ScanSegment {}

	/// Constant methods for [crate::ximgproc::ScanSegment]
	pub trait ScanSegmentTraitConst: core::AlgorithmTraitConst {
		fn as_raw_ScanSegment(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::ScanSegment]
	pub trait ScanSegmentTrait: core::AlgorithmTrait + crate::ximgproc::ScanSegmentTraitConst {
		fn as_raw_mut_ScanSegment(&mut self) -> *mut c_void;

		/// Returns the actual superpixel segmentation from the last image processed using iterate.
		///
		/// Returns zero if no image has been processed.
		#[inline]
		fn get_number_of_superpixels(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ScanSegment_getNumberOfSuperpixels(self.as_raw_mut_ScanSegment(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Calculates the superpixel segmentation on a given image with the initialized
		/// parameters in the ScanSegment object.
		///
		/// This function can be called again for other images without the need of initializing the algorithm with createScanSegment().
		/// This save the computational cost of allocating memory for all the structures of the algorithm.
		///
		/// ## Parameters
		/// * img: Input image. Supported format: CV_8UC3. Image size must match with the initialized
		/// image size with the function createScanSegment(). It MUST be in Lab color space.
		#[inline]
		fn iterate(&mut self, img: &impl ToInputArray) -> Result<()> {
			input_array_arg!(img);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ScanSegment_iterate_const__InputArrayR(self.as_raw_mut_ScanSegment(), img.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the segmentation labeling of the image.
		///
		/// Each label represents a superpixel, and each pixel is assigned to one superpixel label.
		///
		/// ## Parameters
		/// * labels_out: Return: A CV_32UC1 integer array containing the labels of the superpixel
		/// segmentation. The labels are in the range [0, getNumberOfSuperpixels()].
		#[inline]
		fn get_labels(&mut self, labels_out: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(labels_out);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ScanSegment_getLabels_const__OutputArrayR(self.as_raw_mut_ScanSegment(), labels_out.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in the ScanSegment object.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		/// ## Parameters
		/// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, and 0 otherwise.
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border are masked.
		///
		/// ## C++ default parameters
		/// * thick_line: false
		#[inline]
		fn get_label_contour_mask(&mut self, image: &mut impl ToOutputArray, thick_line: bool) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ScanSegment_getLabelContourMask_const__OutputArrayR_bool(self.as_raw_mut_ScanSegment(), image.as_raw__OutputArray(), thick_line, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in the ScanSegment object.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		/// ## Parameters
		/// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, and 0 otherwise.
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border are masked.
		///
		/// ## Note
		/// This alternative version of [ScanSegmentTrait::get_label_contour_mask] function uses the following default values for its arguments:
		/// * thick_line: false
		#[inline]
		fn get_label_contour_mask_def(&mut self, image: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_ScanSegment_getLabelContourMask_const__OutputArrayR(self.as_raw_mut_ScanSegment(), image.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for ScanSegment {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("ScanSegment")
				.finish()
		}
	}

	boxed_cast_base! { ScanSegment, core::Algorithm, cv_ximgproc_ScanSegment_to_Algorithm }

	impl core::AlgorithmTraitConst for ScanSegment {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for ScanSegment {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { ScanSegment, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::ScanSegmentTraitConst for ScanSegment {
		#[inline] fn as_raw_ScanSegment(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::ScanSegmentTrait for ScanSegment {
		#[inline] fn as_raw_mut_ScanSegment(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { ScanSegment, crate::ximgproc::ScanSegmentTraitConst, as_raw_ScanSegment, crate::ximgproc::ScanSegmentTrait, as_raw_mut_ScanSegment }

	/// Main interface for all filters, that take sparse matches as an
	/// input and produce a dense per-pixel matching (optical flow) as an output.
	pub struct SparseMatchInterpolator {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SparseMatchInterpolator }

	impl Drop for SparseMatchInterpolator {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_SparseMatchInterpolator_delete(self.as_raw_mut_SparseMatchInterpolator()) };
		}
	}

	unsafe impl Send for SparseMatchInterpolator {}

	/// Constant methods for [crate::ximgproc::SparseMatchInterpolator]
	pub trait SparseMatchInterpolatorTraitConst: core::AlgorithmTraitConst {
		fn as_raw_SparseMatchInterpolator(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SparseMatchInterpolator]
	pub trait SparseMatchInterpolatorTrait: core::AlgorithmTrait + crate::ximgproc::SparseMatchInterpolatorTraitConst {
		fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void;

		/// Interpolate input sparse matches.
		///
		/// ## Parameters
		/// * from_image: first of the two matched images, 8-bit single-channel or three-channel.
		///
		/// * from_points: points of the from_image for which there are correspondences in the
		/// to_image (Point2f vector or Mat of depth CV_32F)
		///
		/// * to_image: second of the two matched images, 8-bit single-channel or three-channel.
		///
		/// * to_points: points in the to_image corresponding to from_points
		/// (Point2f vector or Mat of depth CV_32F)
		///
		/// * dense_flow: output dense matching (two-channel CV_32F image)
		#[inline]
		fn interpolate(&mut self, from_image: &impl ToInputArray, from_points: &impl ToInputArray, to_image: &impl ToInputArray, to_points: &impl ToInputArray, dense_flow: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(from_image);
			input_array_arg!(from_points);
			input_array_arg!(to_image);
			input_array_arg!(to_points);
			output_array_arg!(dense_flow);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SparseMatchInterpolator_interpolate_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_SparseMatchInterpolator(), from_image.as_raw__InputArray(), from_points.as_raw__InputArray(), to_image.as_raw__InputArray(), to_points.as_raw__InputArray(), dense_flow.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for SparseMatchInterpolator {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SparseMatchInterpolator")
				.finish()
		}
	}

	boxed_cast_base! { SparseMatchInterpolator, core::Algorithm, cv_ximgproc_SparseMatchInterpolator_to_Algorithm }

	boxed_cast_descendant! { SparseMatchInterpolator, crate::ximgproc::EdgeAwareInterpolator, cv_ximgproc_SparseMatchInterpolator_to_EdgeAwareInterpolator }

	boxed_cast_descendant! { SparseMatchInterpolator, crate::ximgproc::RICInterpolator, cv_ximgproc_SparseMatchInterpolator_to_RICInterpolator }

	impl core::AlgorithmTraitConst for SparseMatchInterpolator {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SparseMatchInterpolator {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SparseMatchInterpolator, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SparseMatchInterpolatorTraitConst for SparseMatchInterpolator {
		#[inline] fn as_raw_SparseMatchInterpolator(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SparseMatchInterpolatorTrait for SparseMatchInterpolator {
		#[inline] fn as_raw_mut_SparseMatchInterpolator(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTraitConst, as_raw_SparseMatchInterpolator, crate::ximgproc::SparseMatchInterpolatorTrait, as_raw_mut_SparseMatchInterpolator }

	/// Class implementing edge detection algorithm from [Dollar2013](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Dollar2013) :
	pub struct StructuredEdgeDetection {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { StructuredEdgeDetection }

	impl Drop for StructuredEdgeDetection {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_StructuredEdgeDetection_delete(self.as_raw_mut_StructuredEdgeDetection()) };
		}
	}

	unsafe impl Send for StructuredEdgeDetection {}

	/// Constant methods for [crate::ximgproc::StructuredEdgeDetection]
	pub trait StructuredEdgeDetectionTraitConst: core::AlgorithmTraitConst {
		fn as_raw_StructuredEdgeDetection(&self) -> *const c_void;

		/// The function detects edges in src and draw them to dst.
		///
		/// The algorithm underlies this function is much more robust to texture presence, than common
		/// approaches, e.g. Sobel
		/// ## Parameters
		/// * src: source image (RGB, float, in [0;1]) to detect edges
		/// * dst: destination image (grayscale, float, in [0;1]) where edges are drawn
		/// ## See also
		/// Sobel, Canny
		#[inline]
		fn detect_edges(&self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_StructuredEdgeDetection_detectEdges_const_const__InputArrayR_const__OutputArrayR(self.as_raw_StructuredEdgeDetection(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// The function computes orientation from edge image.
		///
		/// ## Parameters
		/// * src: edge image.
		/// * dst: orientation image.
		#[inline]
		fn compute_orientation(&self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_StructuredEdgeDetection_computeOrientation_const_const__InputArrayR_const__OutputArrayR(self.as_raw_StructuredEdgeDetection(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction.
		///
		/// ## Parameters
		/// * edge_image: edge image from detectEdges function.
		/// * orientation_image: orientation image from computeOrientation function.
		/// * dst: suppressed image (grayscale, float, in [0;1])
		/// * r: radius for NMS suppression.
		/// * s: radius for boundary suppression.
		/// * m: multiplier for conservative suppression.
		/// * isParallel: enables/disables parallel computing.
		///
		/// ## C++ default parameters
		/// * r: 2
		/// * s: 0
		/// * m: 1
		/// * is_parallel: true
		#[inline]
		fn edges_nms(&self, edge_image: &impl ToInputArray, orientation_image: &impl ToInputArray, dst: &mut impl ToOutputArray, r: i32, s: i32, m: f32, is_parallel: bool) -> Result<()> {
			input_array_arg!(edge_image);
			input_array_arg!(orientation_image);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_StructuredEdgeDetection_edgesNms_const_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_int_float_bool(self.as_raw_StructuredEdgeDetection(), edge_image.as_raw__InputArray(), orientation_image.as_raw__InputArray(), dst.as_raw__OutputArray(), r, s, m, is_parallel, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction.
		///
		/// ## Parameters
		/// * edge_image: edge image from detectEdges function.
		/// * orientation_image: orientation image from computeOrientation function.
		/// * dst: suppressed image (grayscale, float, in [0;1])
		/// * r: radius for NMS suppression.
		/// * s: radius for boundary suppression.
		/// * m: multiplier for conservative suppression.
		/// * isParallel: enables/disables parallel computing.
		///
		/// ## Note
		/// This alternative version of [StructuredEdgeDetectionTraitConst::edges_nms] function uses the following default values for its arguments:
		/// * r: 2
		/// * s: 0
		/// * m: 1
		/// * is_parallel: true
		#[inline]
		fn edges_nms_def(&self, edge_image: &impl ToInputArray, orientation_image: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(edge_image);
			input_array_arg!(orientation_image);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_StructuredEdgeDetection_edgesNms_const_const__InputArrayR_const__InputArrayR_const__OutputArrayR(self.as_raw_StructuredEdgeDetection(), edge_image.as_raw__InputArray(), orientation_image.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::StructuredEdgeDetection]
	pub trait StructuredEdgeDetectionTrait: core::AlgorithmTrait + crate::ximgproc::StructuredEdgeDetectionTraitConst {
		fn as_raw_mut_StructuredEdgeDetection(&mut self) -> *mut c_void;

	}

	impl std::fmt::Debug for StructuredEdgeDetection {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("StructuredEdgeDetection")
				.finish()
		}
	}

	boxed_cast_base! { StructuredEdgeDetection, core::Algorithm, cv_ximgproc_StructuredEdgeDetection_to_Algorithm }

	impl core::AlgorithmTraitConst for StructuredEdgeDetection {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for StructuredEdgeDetection {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { StructuredEdgeDetection, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::StructuredEdgeDetectionTraitConst for StructuredEdgeDetection {
		#[inline] fn as_raw_StructuredEdgeDetection(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::StructuredEdgeDetectionTrait for StructuredEdgeDetection {
		#[inline] fn as_raw_mut_StructuredEdgeDetection(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { StructuredEdgeDetection, crate::ximgproc::StructuredEdgeDetectionTraitConst, as_raw_StructuredEdgeDetection, crate::ximgproc::StructuredEdgeDetectionTrait, as_raw_mut_StructuredEdgeDetection }

	/// Class implementing the LSC (Linear Spectral Clustering) superpixels
	/// algorithm described in [LiCVPR2015LSC](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_LiCVPR2015LSC).
	///
	/// LSC (Linear Spectral Clustering) produces compact and uniform superpixels with low
	/// computational costs. Basically, a normalized cuts formulation of the superpixel
	/// segmentation is adopted based on a similarity metric that measures the color
	/// similarity and space proximity between image pixels. LSC is of linear computational
	/// complexity and high memory efficiency and is able to preserve global properties of images
	pub struct SuperpixelLSC {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SuperpixelLSC }

	impl Drop for SuperpixelLSC {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_SuperpixelLSC_delete(self.as_raw_mut_SuperpixelLSC()) };
		}
	}

	unsafe impl Send for SuperpixelLSC {}

	/// Constant methods for [crate::ximgproc::SuperpixelLSC]
	pub trait SuperpixelLSCTraitConst: core::AlgorithmTraitConst {
		fn as_raw_SuperpixelLSC(&self) -> *const c_void;

		/// Calculates the actual amount of superpixels on a given segmentation computed
		/// and stored in SuperpixelLSC object.
		#[inline]
		fn get_number_of_superpixels(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_getNumberOfSuperpixels_const(self.as_raw_SuperpixelLSC(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the segmentation labeling of the image.
		///
		/// Each label represents a superpixel, and each pixel is assigned to one superpixel label.
		///
		/// ## Parameters
		/// * labels_out: Return: A CV_32SC1 integer array containing the labels of the superpixel
		/// segmentation. The labels are in the range [0, getNumberOfSuperpixels()].
		///
		/// The function returns an image with the labels of the superpixel segmentation. The labels are in
		/// the range [0, getNumberOfSuperpixels()].
		#[inline]
		fn get_labels(&self, labels_out: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(labels_out);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_getLabels_const_const__OutputArrayR(self.as_raw_SuperpixelLSC(), labels_out.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in SuperpixelLSC object.
		///
		/// ## Parameters
		/// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border,
		/// and 0 otherwise.
		///
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border
		/// are masked.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		/// ## C++ default parameters
		/// * thick_line: true
		#[inline]
		fn get_label_contour_mask(&self, image: &mut impl ToOutputArray, thick_line: bool) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_getLabelContourMask_const_const__OutputArrayR_bool(self.as_raw_SuperpixelLSC(), image.as_raw__OutputArray(), thick_line, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in SuperpixelLSC object.
		///
		/// ## Parameters
		/// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border,
		/// and 0 otherwise.
		///
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border
		/// are masked.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		/// ## Note
		/// This alternative version of [SuperpixelLSCTraitConst::get_label_contour_mask] function uses the following default values for its arguments:
		/// * thick_line: true
		#[inline]
		fn get_label_contour_mask_def(&self, image: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_getLabelContourMask_const_const__OutputArrayR(self.as_raw_SuperpixelLSC(), image.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::SuperpixelLSC]
	pub trait SuperpixelLSCTrait: core::AlgorithmTrait + crate::ximgproc::SuperpixelLSCTraitConst {
		fn as_raw_mut_SuperpixelLSC(&mut self) -> *mut c_void;

		/// Calculates the superpixel segmentation on a given image with the initialized
		/// parameters in the SuperpixelLSC object.
		///
		/// This function can be called again without the need of initializing the algorithm with
		/// createSuperpixelLSC(). This save the computational cost of allocating memory for all the
		/// structures of the algorithm.
		///
		/// ## Parameters
		/// * num_iterations: Number of iterations. Higher number improves the result.
		///
		/// The function computes the superpixels segmentation of an image with the parameters initialized
		/// with the function createSuperpixelLSC(). The algorithms starts from a grid of superpixels and
		/// then refines the boundaries by proposing updates of edges boundaries.
		///
		/// ## C++ default parameters
		/// * num_iterations: 10
		#[inline]
		fn iterate(&mut self, num_iterations: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_iterate_int(self.as_raw_mut_SuperpixelLSC(), num_iterations, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Calculates the superpixel segmentation on a given image with the initialized
		/// parameters in the SuperpixelLSC object.
		///
		/// This function can be called again without the need of initializing the algorithm with
		/// createSuperpixelLSC(). This save the computational cost of allocating memory for all the
		/// structures of the algorithm.
		///
		/// ## Parameters
		/// * num_iterations: Number of iterations. Higher number improves the result.
		///
		/// The function computes the superpixels segmentation of an image with the parameters initialized
		/// with the function createSuperpixelLSC(). The algorithms starts from a grid of superpixels and
		/// then refines the boundaries by proposing updates of edges boundaries.
		///
		/// ## Note
		/// This alternative version of [SuperpixelLSCTrait::iterate] function uses the following default values for its arguments:
		/// * num_iterations: 10
		#[inline]
		fn iterate_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_iterate(self.as_raw_mut_SuperpixelLSC(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Enforce label connectivity.
		///
		/// ## Parameters
		/// * min_element_size: The minimum element size in percents that should be absorbed into a bigger
		/// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means
		/// that less then a quarter sized superpixel should be absorbed, this is default.
		///
		/// The function merge component that is too small, assigning the previously found adjacent label
		/// to this component. Calling this function may change the final number of superpixels.
		///
		/// ## C++ default parameters
		/// * min_element_size: 25
		#[inline]
		fn enforce_label_connectivity(&mut self, min_element_size: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_enforceLabelConnectivity_int(self.as_raw_mut_SuperpixelLSC(), min_element_size, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Enforce label connectivity.
		///
		/// ## Parameters
		/// * min_element_size: The minimum element size in percents that should be absorbed into a bigger
		/// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means
		/// that less then a quarter sized superpixel should be absorbed, this is default.
		///
		/// The function merge component that is too small, assigning the previously found adjacent label
		/// to this component. Calling this function may change the final number of superpixels.
		///
		/// ## Note
		/// This alternative version of [SuperpixelLSCTrait::enforce_label_connectivity] function uses the following default values for its arguments:
		/// * min_element_size: 25
		#[inline]
		fn enforce_label_connectivity_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelLSC_enforceLabelConnectivity(self.as_raw_mut_SuperpixelLSC(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for SuperpixelLSC {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SuperpixelLSC")
				.finish()
		}
	}

	boxed_cast_base! { SuperpixelLSC, core::Algorithm, cv_ximgproc_SuperpixelLSC_to_Algorithm }

	impl core::AlgorithmTraitConst for SuperpixelLSC {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SuperpixelLSC {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SuperpixelLSC, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SuperpixelLSCTraitConst for SuperpixelLSC {
		#[inline] fn as_raw_SuperpixelLSC(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SuperpixelLSCTrait for SuperpixelLSC {
		#[inline] fn as_raw_mut_SuperpixelLSC(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SuperpixelLSC, crate::ximgproc::SuperpixelLSCTraitConst, as_raw_SuperpixelLSC, crate::ximgproc::SuperpixelLSCTrait, as_raw_mut_SuperpixelLSC }

	/// Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels
	/// algorithm described in [VBRV14](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_VBRV14) .
	///
	/// The algorithm uses an efficient hill-climbing algorithm to optimize the superpixels' energy
	/// function that is based on color histograms and a boundary term, which is optional. The energy
	/// function encourages superpixels to be of the same color, and if the boundary term is activated, the
	/// superpixels have smooth boundaries and are of similar shape. In practice it starts from a regular
	/// grid of superpixels and moves the pixels or blocks of pixels at the boundaries to refine the
	/// solution. The algorithm runs in real-time using a single CPU.
	pub struct SuperpixelSEEDS {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SuperpixelSEEDS }

	impl Drop for SuperpixelSEEDS {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_SuperpixelSEEDS_delete(self.as_raw_mut_SuperpixelSEEDS()) };
		}
	}

	unsafe impl Send for SuperpixelSEEDS {}

	/// Constant methods for [crate::ximgproc::SuperpixelSEEDS]
	pub trait SuperpixelSEEDSTraitConst: core::AlgorithmTraitConst {
		fn as_raw_SuperpixelSEEDS(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SuperpixelSEEDS]
	pub trait SuperpixelSEEDSTrait: core::AlgorithmTrait + crate::ximgproc::SuperpixelSEEDSTraitConst {
		fn as_raw_mut_SuperpixelSEEDS(&mut self) -> *mut c_void;

		/// Calculates the superpixel segmentation on a given image stored in SuperpixelSEEDS object.
		///
		/// The function computes the superpixels segmentation of an image with the parameters initialized
		/// with the function createSuperpixelSEEDS().
		#[inline]
		fn get_number_of_superpixels(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSEEDS_getNumberOfSuperpixels(self.as_raw_mut_SuperpixelSEEDS(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Calculates the superpixel segmentation on a given image with the initialized
		/// parameters in the SuperpixelSEEDS object.
		///
		/// This function can be called again for other images without the need of initializing the
		/// algorithm with createSuperpixelSEEDS(). This save the computational cost of allocating memory
		/// for all the structures of the algorithm.
		///
		/// ## Parameters
		/// * img: Input image. Supported formats: CV_8U, CV_16U, CV_32F. Image size & number of
		/// channels must match with the initialized image size & channels with the function
		/// createSuperpixelSEEDS(). It should be in HSV or Lab color space. Lab is a bit better, but also
		/// slower.
		///
		/// * num_iterations: Number of pixel level iterations. Higher number improves the result.
		///
		/// The function computes the superpixels segmentation of an image with the parameters initialized
		/// with the function createSuperpixelSEEDS(). The algorithms starts from a grid of superpixels and
		/// then refines the boundaries by proposing updates of blocks of pixels that lie at the boundaries
		/// from large to smaller size, finalizing with proposing pixel updates. An illustrative example
		/// can be seen below.
		///
		/// ![image](https://docs.opencv.org/4.11.0/superpixels_blocks2.png)
		///
		/// ## C++ default parameters
		/// * num_iterations: 4
		#[inline]
		fn iterate(&mut self, img: &impl ToInputArray, num_iterations: i32) -> Result<()> {
			input_array_arg!(img);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSEEDS_iterate_const__InputArrayR_int(self.as_raw_mut_SuperpixelSEEDS(), img.as_raw__InputArray(), num_iterations, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Calculates the superpixel segmentation on a given image with the initialized
		/// parameters in the SuperpixelSEEDS object.
		///
		/// This function can be called again for other images without the need of initializing the
		/// algorithm with createSuperpixelSEEDS(). This save the computational cost of allocating memory
		/// for all the structures of the algorithm.
		///
		/// ## Parameters
		/// * img: Input image. Supported formats: CV_8U, CV_16U, CV_32F. Image size & number of
		/// channels must match with the initialized image size & channels with the function
		/// createSuperpixelSEEDS(). It should be in HSV or Lab color space. Lab is a bit better, but also
		/// slower.
		///
		/// * num_iterations: Number of pixel level iterations. Higher number improves the result.
		///
		/// The function computes the superpixels segmentation of an image with the parameters initialized
		/// with the function createSuperpixelSEEDS(). The algorithms starts from a grid of superpixels and
		/// then refines the boundaries by proposing updates of blocks of pixels that lie at the boundaries
		/// from large to smaller size, finalizing with proposing pixel updates. An illustrative example
		/// can be seen below.
		///
		/// ![image](https://docs.opencv.org/4.11.0/superpixels_blocks2.png)
		///
		/// ## Note
		/// This alternative version of [SuperpixelSEEDSTrait::iterate] function uses the following default values for its arguments:
		/// * num_iterations: 4
		#[inline]
		fn iterate_def(&mut self, img: &impl ToInputArray) -> Result<()> {
			input_array_arg!(img);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSEEDS_iterate_const__InputArrayR(self.as_raw_mut_SuperpixelSEEDS(), img.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the segmentation labeling of the image.
		///
		/// Each label represents a superpixel, and each pixel is assigned to one superpixel label.
		///
		/// ## Parameters
		/// * labels_out: Return: A CV_32UC1 integer array containing the labels of the superpixel
		/// segmentation. The labels are in the range [0, getNumberOfSuperpixels()].
		///
		/// The function returns an image with ssthe labels of the superpixel segmentation. The labels are in
		/// the range [0, getNumberOfSuperpixels()].
		#[inline]
		fn get_labels(&mut self, labels_out: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(labels_out);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSEEDS_getLabels_const__OutputArrayR(self.as_raw_mut_SuperpixelSEEDS(), labels_out.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in SuperpixelSEEDS object.
		///
		/// ## Parameters
		/// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border,
		/// and 0 otherwise.
		///
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border
		/// are masked.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		///
		/// Note:
		///    *   (Python) A demo on how to generate superpixels in images from the webcam can be found at
		///        opencv_source_code/samples/python2/seeds.py
		///    *   (cpp) A demo on how to generate superpixels in images from the webcam can be found at
		///        opencv_source_code/modules/ximgproc/samples/seeds.cpp. By adding a file image as a command
		///        line argument, the static image will be used instead of the webcam.
		///    *   It will show a window with the video from the webcam with the superpixel boundaries marked
		///        in red (see below). Use Space to switch between different output modes. At the top of the
		///        window there are 4 sliders, from which the user can change on-the-fly the number of
		///        superpixels, the number of block levels, the strength of the boundary prior term to modify
		///        the shape, and the number of iterations at pixel level. This is useful to play with the
		///        parameters and set them to the user convenience. In the console the frame-rate of the
		///        algorithm is indicated.
		///
		/// ![image](https://docs.opencv.org/4.11.0/superpixels_demo.png)
		///
		/// ## C++ default parameters
		/// * thick_line: false
		#[inline]
		fn get_label_contour_mask(&mut self, image: &mut impl ToOutputArray, thick_line: bool) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSEEDS_getLabelContourMask_const__OutputArrayR_bool(self.as_raw_mut_SuperpixelSEEDS(), image.as_raw__OutputArray(), thick_line, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in SuperpixelSEEDS object.
		///
		/// ## Parameters
		/// * image: Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border,
		/// and 0 otherwise.
		///
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border
		/// are masked.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		///
		/// Note:
		///    *   (Python) A demo on how to generate superpixels in images from the webcam can be found at
		///        opencv_source_code/samples/python2/seeds.py
		///    *   (cpp) A demo on how to generate superpixels in images from the webcam can be found at
		///        opencv_source_code/modules/ximgproc/samples/seeds.cpp. By adding a file image as a command
		///        line argument, the static image will be used instead of the webcam.
		///    *   It will show a window with the video from the webcam with the superpixel boundaries marked
		///        in red (see below). Use Space to switch between different output modes. At the top of the
		///        window there are 4 sliders, from which the user can change on-the-fly the number of
		///        superpixels, the number of block levels, the strength of the boundary prior term to modify
		///        the shape, and the number of iterations at pixel level. This is useful to play with the
		///        parameters and set them to the user convenience. In the console the frame-rate of the
		///        algorithm is indicated.
		///
		/// ![image](https://docs.opencv.org/4.11.0/superpixels_demo.png)
		///
		/// ## Note
		/// This alternative version of [SuperpixelSEEDSTrait::get_label_contour_mask] function uses the following default values for its arguments:
		/// * thick_line: false
		#[inline]
		fn get_label_contour_mask_def(&mut self, image: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSEEDS_getLabelContourMask_const__OutputArrayR(self.as_raw_mut_SuperpixelSEEDS(), image.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for SuperpixelSEEDS {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SuperpixelSEEDS")
				.finish()
		}
	}

	boxed_cast_base! { SuperpixelSEEDS, core::Algorithm, cv_ximgproc_SuperpixelSEEDS_to_Algorithm }

	impl core::AlgorithmTraitConst for SuperpixelSEEDS {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SuperpixelSEEDS {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SuperpixelSEEDS, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SuperpixelSEEDSTraitConst for SuperpixelSEEDS {
		#[inline] fn as_raw_SuperpixelSEEDS(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SuperpixelSEEDSTrait for SuperpixelSEEDS {
		#[inline] fn as_raw_mut_SuperpixelSEEDS(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SuperpixelSEEDS, crate::ximgproc::SuperpixelSEEDSTraitConst, as_raw_SuperpixelSEEDS, crate::ximgproc::SuperpixelSEEDSTrait, as_raw_mut_SuperpixelSEEDS }

	/// Class implementing the SLIC (Simple Linear Iterative Clustering) superpixels
	/// algorithm described in [Achanta2012](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Achanta2012).
	///
	/// SLIC (Simple Linear Iterative Clustering) clusters pixels using pixel channels and image plane space
	/// to efficiently generate compact, nearly uniform superpixels. The simplicity of approach makes it
	/// extremely easy to use a lone parameter specifies the number of superpixels and the efficiency of
	/// the algorithm makes it very practical.
	/// Several optimizations are available for SLIC class:
	/// SLICO stands for "Zero parameter SLIC" and it is an optimization of baseline SLIC described in [Achanta2012](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Achanta2012).
	/// MSLIC stands for "Manifold SLIC" and it is an optimization of baseline SLIC described in [Liu_2017_IEEE](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_Liu_2017_IEEE).
	pub struct SuperpixelSLIC {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SuperpixelSLIC }

	impl Drop for SuperpixelSLIC {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_delete(self.as_raw_mut_SuperpixelSLIC()) };
		}
	}

	unsafe impl Send for SuperpixelSLIC {}

	/// Constant methods for [crate::ximgproc::SuperpixelSLIC]
	pub trait SuperpixelSLICTraitConst: core::AlgorithmTraitConst {
		fn as_raw_SuperpixelSLIC(&self) -> *const c_void;

		/// Calculates the actual amount of superpixels on a given segmentation computed
		/// and stored in SuperpixelSLIC object.
		#[inline]
		fn get_number_of_superpixels(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_getNumberOfSuperpixels_const(self.as_raw_SuperpixelSLIC(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the segmentation labeling of the image.
		///
		/// Each label represents a superpixel, and each pixel is assigned to one superpixel label.
		///
		/// ## Parameters
		/// * labels_out: Return: A CV_32SC1 integer array containing the labels of the superpixel
		/// segmentation. The labels are in the range [0, getNumberOfSuperpixels()].
		///
		/// The function returns an image with the labels of the superpixel segmentation. The labels are in
		/// the range [0, getNumberOfSuperpixels()].
		#[inline]
		fn get_labels(&self, labels_out: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(labels_out);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_getLabels_const_const__OutputArrayR(self.as_raw_SuperpixelSLIC(), labels_out.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in SuperpixelSLIC object.
		///
		/// ## Parameters
		/// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border,
		/// and 0 otherwise.
		///
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border
		/// are masked.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		/// ## C++ default parameters
		/// * thick_line: true
		#[inline]
		fn get_label_contour_mask(&self, image: &mut impl ToOutputArray, thick_line: bool) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_getLabelContourMask_const_const__OutputArrayR_bool(self.as_raw_SuperpixelSLIC(), image.as_raw__OutputArray(), thick_line, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Returns the mask of the superpixel segmentation stored in SuperpixelSLIC object.
		///
		/// ## Parameters
		/// * image: Return: CV_8U1 image mask where -1 indicates that the pixel is a superpixel border,
		/// and 0 otherwise.
		///
		/// * thick_line: If false, the border is only one pixel wide, otherwise all pixels at the border
		/// are masked.
		///
		/// The function return the boundaries of the superpixel segmentation.
		///
		/// ## Note
		/// This alternative version of [SuperpixelSLICTraitConst::get_label_contour_mask] function uses the following default values for its arguments:
		/// * thick_line: true
		#[inline]
		fn get_label_contour_mask_def(&self, image: &mut impl ToOutputArray) -> Result<()> {
			output_array_arg!(image);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_getLabelContourMask_const_const__OutputArrayR(self.as_raw_SuperpixelSLIC(), image.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	/// Mutable methods for [crate::ximgproc::SuperpixelSLIC]
	pub trait SuperpixelSLICTrait: core::AlgorithmTrait + crate::ximgproc::SuperpixelSLICTraitConst {
		fn as_raw_mut_SuperpixelSLIC(&mut self) -> *mut c_void;

		/// Calculates the superpixel segmentation on a given image with the initialized
		/// parameters in the SuperpixelSLIC object.
		///
		/// This function can be called again without the need of initializing the algorithm with
		/// createSuperpixelSLIC(). This save the computational cost of allocating memory for all the
		/// structures of the algorithm.
		///
		/// ## Parameters
		/// * num_iterations: Number of iterations. Higher number improves the result.
		///
		/// The function computes the superpixels segmentation of an image with the parameters initialized
		/// with the function createSuperpixelSLIC(). The algorithms starts from a grid of superpixels and
		/// then refines the boundaries by proposing updates of edges boundaries.
		///
		/// ## C++ default parameters
		/// * num_iterations: 10
		#[inline]
		fn iterate(&mut self, num_iterations: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_iterate_int(self.as_raw_mut_SuperpixelSLIC(), num_iterations, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Calculates the superpixel segmentation on a given image with the initialized
		/// parameters in the SuperpixelSLIC object.
		///
		/// This function can be called again without the need of initializing the algorithm with
		/// createSuperpixelSLIC(). This save the computational cost of allocating memory for all the
		/// structures of the algorithm.
		///
		/// ## Parameters
		/// * num_iterations: Number of iterations. Higher number improves the result.
		///
		/// The function computes the superpixels segmentation of an image with the parameters initialized
		/// with the function createSuperpixelSLIC(). The algorithms starts from a grid of superpixels and
		/// then refines the boundaries by proposing updates of edges boundaries.
		///
		/// ## Note
		/// This alternative version of [SuperpixelSLICTrait::iterate] function uses the following default values for its arguments:
		/// * num_iterations: 10
		#[inline]
		fn iterate_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_iterate(self.as_raw_mut_SuperpixelSLIC(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Enforce label connectivity.
		///
		/// ## Parameters
		/// * min_element_size: The minimum element size in percents that should be absorbed into a bigger
		/// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means
		/// that less then a quarter sized superpixel should be absorbed, this is default.
		///
		/// The function merge component that is too small, assigning the previously found adjacent label
		/// to this component. Calling this function may change the final number of superpixels.
		///
		/// ## C++ default parameters
		/// * min_element_size: 25
		#[inline]
		fn enforce_label_connectivity(&mut self, min_element_size: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_enforceLabelConnectivity_int(self.as_raw_mut_SuperpixelSLIC(), min_element_size, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Enforce label connectivity.
		///
		/// ## Parameters
		/// * min_element_size: The minimum element size in percents that should be absorbed into a bigger
		/// superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means
		/// that less then a quarter sized superpixel should be absorbed, this is default.
		///
		/// The function merge component that is too small, assigning the previously found adjacent label
		/// to this component. Calling this function may change the final number of superpixels.
		///
		/// ## Note
		/// This alternative version of [SuperpixelSLICTrait::enforce_label_connectivity] function uses the following default values for its arguments:
		/// * min_element_size: 25
		#[inline]
		fn enforce_label_connectivity_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_SuperpixelSLIC_enforceLabelConnectivity(self.as_raw_mut_SuperpixelSLIC(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for SuperpixelSLIC {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SuperpixelSLIC")
				.finish()
		}
	}

	boxed_cast_base! { SuperpixelSLIC, core::Algorithm, cv_ximgproc_SuperpixelSLIC_to_Algorithm }

	impl core::AlgorithmTraitConst for SuperpixelSLIC {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SuperpixelSLIC {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SuperpixelSLIC, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SuperpixelSLICTraitConst for SuperpixelSLIC {
		#[inline] fn as_raw_SuperpixelSLIC(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SuperpixelSLICTrait for SuperpixelSLIC {
		#[inline] fn as_raw_mut_SuperpixelSLIC(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SuperpixelSLIC, crate::ximgproc::SuperpixelSLICTraitConst, as_raw_SuperpixelSLIC, crate::ximgproc::SuperpixelSLICTrait, as_raw_mut_SuperpixelSLIC }

	/// Graph Based Segmentation Algorithm.
	/// The class implements the algorithm described in [PFF2004](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_PFF2004) .
	pub struct GraphSegmentation {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { GraphSegmentation }

	impl Drop for GraphSegmentation {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_delete(self.as_raw_mut_GraphSegmentation()) };
		}
	}

	unsafe impl Send for GraphSegmentation {}

	/// Constant methods for [crate::ximgproc::GraphSegmentation]
	pub trait GraphSegmentationTraitConst: core::AlgorithmTraitConst {
		fn as_raw_GraphSegmentation(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::GraphSegmentation]
	pub trait GraphSegmentationTrait: core::AlgorithmTrait + crate::ximgproc::GraphSegmentationTraitConst {
		fn as_raw_mut_GraphSegmentation(&mut self) -> *mut c_void;

		/// Segment an image and store output in dst
		/// ## Parameters
		/// * src: The input image. Any number of channel (1 (Eg: Gray), 3 (Eg: RGB), 4 (Eg: RGB-D)) can be provided
		/// * dst: The output segmentation. It's a CV_32SC1 Mat with the same number of cols and rows as input image, with an unique, sequential, id for each pixel.
		#[inline]
		fn process_image(&mut self, src: &impl ToInputArray, dst: &mut impl ToOutputArray) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_processImage_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_GraphSegmentation(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		fn set_sigma(&mut self, sigma: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_setSigma_double(self.as_raw_mut_GraphSegmentation(), sigma, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		fn get_sigma(&mut self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_getSigma(self.as_raw_mut_GraphSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		fn set_k(&mut self, k: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_setK_float(self.as_raw_mut_GraphSegmentation(), k, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		fn get_k(&mut self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_getK(self.as_raw_mut_GraphSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		fn set_min_size(&mut self, min_size: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_setMinSize_int(self.as_raw_mut_GraphSegmentation(), min_size, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		#[inline]
		fn get_min_size(&mut self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_GraphSegmentation_getMinSize(self.as_raw_mut_GraphSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for GraphSegmentation {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("GraphSegmentation")
				.finish()
		}
	}

	boxed_cast_base! { GraphSegmentation, core::Algorithm, cv_ximgproc_segmentation_GraphSegmentation_to_Algorithm }

	impl core::AlgorithmTraitConst for GraphSegmentation {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for GraphSegmentation {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { GraphSegmentation, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::GraphSegmentationTraitConst for GraphSegmentation {
		#[inline] fn as_raw_GraphSegmentation(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::GraphSegmentationTrait for GraphSegmentation {
		#[inline] fn as_raw_mut_GraphSegmentation(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { GraphSegmentation, crate::ximgproc::GraphSegmentationTraitConst, as_raw_GraphSegmentation, crate::ximgproc::GraphSegmentationTrait, as_raw_mut_GraphSegmentation }

	/// Selective search segmentation algorithm
	/// The class implements the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
	pub struct SelectiveSearchSegmentation {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SelectiveSearchSegmentation }

	impl Drop for SelectiveSearchSegmentation {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_delete(self.as_raw_mut_SelectiveSearchSegmentation()) };
		}
	}

	unsafe impl Send for SelectiveSearchSegmentation {}

	/// Constant methods for [crate::ximgproc::SelectiveSearchSegmentation]
	pub trait SelectiveSearchSegmentationTraitConst: core::AlgorithmTraitConst {
		fn as_raw_SelectiveSearchSegmentation(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentation]
	pub trait SelectiveSearchSegmentationTrait: core::AlgorithmTrait + crate::ximgproc::SelectiveSearchSegmentationTraitConst {
		fn as_raw_mut_SelectiveSearchSegmentation(&mut self) -> *mut c_void;

		/// Set a image used by switch* functions to initialize the class
		/// ## Parameters
		/// * img: The image
		#[inline]
		fn set_base_image(&mut self, img: &impl ToInputArray) -> Result<()> {
			input_array_arg!(img);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_setBaseImage_const__InputArrayR(self.as_raw_mut_SelectiveSearchSegmentation(), img.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Initialize the class with the 'Single stragegy' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
		/// ## Parameters
		/// * k: The k parameter for the graph segmentation
		/// * sigma: The sigma parameter for the graph segmentation
		///
		/// ## C++ default parameters
		/// * k: 200
		/// * sigma: 0.8f
		#[inline]
		fn switch_to_single_strategy(&mut self, k: i32, sigma: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_switchToSingleStrategy_int_float(self.as_raw_mut_SelectiveSearchSegmentation(), k, sigma, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Initialize the class with the 'Single stragegy' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
		/// ## Parameters
		/// * k: The k parameter for the graph segmentation
		/// * sigma: The sigma parameter for the graph segmentation
		///
		/// ## Note
		/// This alternative version of [SelectiveSearchSegmentationTrait::switch_to_single_strategy] function uses the following default values for its arguments:
		/// * k: 200
		/// * sigma: 0.8f
		#[inline]
		fn switch_to_single_strategy_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_switchToSingleStrategy(self.as_raw_mut_SelectiveSearchSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
		/// ## Parameters
		/// * base_k: The k parameter for the first graph segmentation
		/// * inc_k: The increment of the k parameter for all graph segmentations
		/// * sigma: The sigma parameter for the graph segmentation
		///
		/// ## C++ default parameters
		/// * base_k: 150
		/// * inc_k: 150
		/// * sigma: 0.8f
		#[inline]
		fn switch_to_selective_search_fast(&mut self, base_k: i32, inc_k: i32, sigma: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_switchToSelectiveSearchFast_int_int_float(self.as_raw_mut_SelectiveSearchSegmentation(), base_k, inc_k, sigma, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
		/// ## Parameters
		/// * base_k: The k parameter for the first graph segmentation
		/// * inc_k: The increment of the k parameter for all graph segmentations
		/// * sigma: The sigma parameter for the graph segmentation
		///
		/// ## Note
		/// This alternative version of [SelectiveSearchSegmentationTrait::switch_to_selective_search_fast] function uses the following default values for its arguments:
		/// * base_k: 150
		/// * inc_k: 150
		/// * sigma: 0.8f
		#[inline]
		fn switch_to_selective_search_fast_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_switchToSelectiveSearchFast(self.as_raw_mut_SelectiveSearchSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
		/// ## Parameters
		/// * base_k: The k parameter for the first graph segmentation
		/// * inc_k: The increment of the k parameter for all graph segmentations
		/// * sigma: The sigma parameter for the graph segmentation
		///
		/// ## C++ default parameters
		/// * base_k: 150
		/// * inc_k: 150
		/// * sigma: 0.8f
		#[inline]
		fn switch_to_selective_search_quality(&mut self, base_k: i32, inc_k: i32, sigma: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_switchToSelectiveSearchQuality_int_int_float(self.as_raw_mut_SelectiveSearchSegmentation(), base_k, inc_k, sigma, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Initialize the class with the 'Selective search fast' parameters describled in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
		/// ## Parameters
		/// * base_k: The k parameter for the first graph segmentation
		/// * inc_k: The increment of the k parameter for all graph segmentations
		/// * sigma: The sigma parameter for the graph segmentation
		///
		/// ## Note
		/// This alternative version of [SelectiveSearchSegmentationTrait::switch_to_selective_search_quality] function uses the following default values for its arguments:
		/// * base_k: 150
		/// * inc_k: 150
		/// * sigma: 0.8f
		#[inline]
		fn switch_to_selective_search_quality_def(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_switchToSelectiveSearchQuality(self.as_raw_mut_SelectiveSearchSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Add a new image in the list of images to process.
		/// ## Parameters
		/// * img: The image
		#[inline]
		fn add_image(&mut self, img: &impl ToInputArray) -> Result<()> {
			input_array_arg!(img);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_addImage_const__InputArrayR(self.as_raw_mut_SelectiveSearchSegmentation(), img.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Clear the list of images to process
		#[inline]
		fn clear_images(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_clearImages(self.as_raw_mut_SelectiveSearchSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Add a new graph segmentation in the list of graph segementations to process.
		/// ## Parameters
		/// * g: The graph segmentation
		#[inline]
		fn add_graph_segmentation(&mut self, mut g: core::Ptr<crate::ximgproc::GraphSegmentation>) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_addGraphSegmentation_PtrLGraphSegmentationG(self.as_raw_mut_SelectiveSearchSegmentation(), g.as_raw_mut_PtrOfGraphSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Clear the list of graph segmentations to process;
		#[inline]
		fn clear_graph_segmentations(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_clearGraphSegmentations(self.as_raw_mut_SelectiveSearchSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Add a new strategy in the list of strategy to process.
		/// ## Parameters
		/// * s: The strategy
		#[inline]
		fn add_strategy(&mut self, mut s: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_addStrategy_PtrLSelectiveSearchSegmentationStrategyG(self.as_raw_mut_SelectiveSearchSegmentation(), s.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Clear the list of strategy to process;
		#[inline]
		fn clear_strategies(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_clearStrategies(self.as_raw_mut_SelectiveSearchSegmentation(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Based on all images, graph segmentations and stragies, computes all possible rects and return them
		/// ## Parameters
		/// * rects: The list of rects. The first ones are more relevents than the lasts ones.
		#[inline]
		fn process(&mut self, rects: &mut core::Vector<core::Rect>) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentation_process_vectorLRectGR(self.as_raw_mut_SelectiveSearchSegmentation(), rects.as_raw_mut_VectorOfRect(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for SelectiveSearchSegmentation {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SelectiveSearchSegmentation")
				.finish()
		}
	}

	boxed_cast_base! { SelectiveSearchSegmentation, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentation_to_Algorithm }

	impl core::AlgorithmTraitConst for SelectiveSearchSegmentation {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SelectiveSearchSegmentation {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentation, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SelectiveSearchSegmentationTraitConst for SelectiveSearchSegmentation {
		#[inline] fn as_raw_SelectiveSearchSegmentation(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationTrait for SelectiveSearchSegmentation {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentation(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentation, crate::ximgproc::SelectiveSearchSegmentationTraitConst, as_raw_SelectiveSearchSegmentation, crate::ximgproc::SelectiveSearchSegmentationTrait, as_raw_mut_SelectiveSearchSegmentation }

	/// Strategie for the selective search segmentation algorithm
	/// The class implements a generic stragery for the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
	pub struct SelectiveSearchSegmentationStrategy {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SelectiveSearchSegmentationStrategy }

	impl Drop for SelectiveSearchSegmentationStrategy {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategy()) };
		}
	}

	unsafe impl Send for SelectiveSearchSegmentationStrategy {}

	/// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategy]
	pub trait SelectiveSearchSegmentationStrategyTraitConst: core::AlgorithmTraitConst {
		fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategy]
	pub trait SelectiveSearchSegmentationStrategyTrait: core::AlgorithmTrait + crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst {
		fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void;

		/// Set a initial image, with a segmentation.
		/// ## Parameters
		/// * img: The input image. Any number of channel can be provided
		/// * regions: A segmentation of the image. The parameter must be the same size of img.
		/// * sizes: The sizes of different regions
		/// * image_id: If not set to -1, try to cache pre-computations. If the same set og (img, regions, size) is used, the image_id need to be the same.
		///
		/// ## C++ default parameters
		/// * image_id: -1
		#[inline]
		fn set_image(&mut self, img: &impl ToInputArray, regions: &impl ToInputArray, sizes: &impl ToInputArray, image_id: i32) -> Result<()> {
			input_array_arg!(img);
			input_array_arg!(regions);
			input_array_arg!(sizes);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_setImage_const__InputArrayR_const__InputArrayR_const__InputArrayR_int(self.as_raw_mut_SelectiveSearchSegmentationStrategy(), img.as_raw__InputArray(), regions.as_raw__InputArray(), sizes.as_raw__InputArray(), image_id, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Set a initial image, with a segmentation.
		/// ## Parameters
		/// * img: The input image. Any number of channel can be provided
		/// * regions: A segmentation of the image. The parameter must be the same size of img.
		/// * sizes: The sizes of different regions
		/// * image_id: If not set to -1, try to cache pre-computations. If the same set og (img, regions, size) is used, the image_id need to be the same.
		///
		/// ## Note
		/// This alternative version of [SelectiveSearchSegmentationStrategyTrait::set_image] function uses the following default values for its arguments:
		/// * image_id: -1
		#[inline]
		fn set_image_def(&mut self, img: &impl ToInputArray, regions: &impl ToInputArray, sizes: &impl ToInputArray) -> Result<()> {
			input_array_arg!(img);
			input_array_arg!(regions);
			input_array_arg!(sizes);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_setImage_const__InputArrayR_const__InputArrayR_const__InputArrayR(self.as_raw_mut_SelectiveSearchSegmentationStrategy(), img.as_raw__InputArray(), regions.as_raw__InputArray(), sizes.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Return the score between two regions (between 0 and 1)
		/// ## Parameters
		/// * r1: The first region
		/// * r2: The second region
		#[inline]
		fn get(&mut self, r1: i32, r2: i32) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_get_int_int(self.as_raw_mut_SelectiveSearchSegmentationStrategy(), r1, r2, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Inform the strategy that two regions will be merged
		/// ## Parameters
		/// * r1: The first region
		/// * r2: The second region
		#[inline]
		fn merge(&mut self, r1: i32, r2: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_merge_int_int(self.as_raw_mut_SelectiveSearchSegmentationStrategy(), r1, r2, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for SelectiveSearchSegmentationStrategy {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SelectiveSearchSegmentationStrategy")
				.finish()
		}
	}

	boxed_cast_base! { SelectiveSearchSegmentationStrategy, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_Algorithm }

	boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyColor, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyColor }

	boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyFill, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyFill }

	boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyMultiple }

	boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategySize, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategySize }

	boxed_cast_descendant! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTexture, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategy_to_SelectiveSearchSegmentationStrategyTexture }

	impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategy {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategy {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategy, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategy {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategy {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy }

	/// Color-based strategy for the selective search segmentation algorithm
	/// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
	pub struct SelectiveSearchSegmentationStrategyColor {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SelectiveSearchSegmentationStrategyColor }

	impl Drop for SelectiveSearchSegmentationStrategyColor {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColor_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyColor()) };
		}
	}

	unsafe impl Send for SelectiveSearchSegmentationStrategyColor {}

	/// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyColor]
	pub trait SelectiveSearchSegmentationStrategyColorTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst {
		fn as_raw_SelectiveSearchSegmentationStrategyColor(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyColor]
	pub trait SelectiveSearchSegmentationStrategyColorTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyColorTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait {
		fn as_raw_mut_SelectiveSearchSegmentationStrategyColor(&mut self) -> *mut c_void;

	}

	impl std::fmt::Debug for SelectiveSearchSegmentationStrategyColor {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SelectiveSearchSegmentationStrategyColor")
				.finish()
		}
	}

	boxed_cast_base! { SelectiveSearchSegmentationStrategyColor, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColor_to_Algorithm }

	boxed_cast_base! { SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyColor_to_SelectiveSearchSegmentationStrategy }

	impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyColor {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyColor {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyColor, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyColor {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyColor {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyColorTraitConst for SelectiveSearchSegmentationStrategyColor {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategyColor(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyColorTrait for SelectiveSearchSegmentationStrategyColor {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyColor(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategyColorTraitConst, as_raw_SelectiveSearchSegmentationStrategyColor, crate::ximgproc::SelectiveSearchSegmentationStrategyColorTrait, as_raw_mut_SelectiveSearchSegmentationStrategyColor }

	/// Fill-based strategy for the selective search segmentation algorithm
	/// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
	pub struct SelectiveSearchSegmentationStrategyFill {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SelectiveSearchSegmentationStrategyFill }

	impl Drop for SelectiveSearchSegmentationStrategyFill {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFill_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyFill()) };
		}
	}

	unsafe impl Send for SelectiveSearchSegmentationStrategyFill {}

	/// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyFill]
	pub trait SelectiveSearchSegmentationStrategyFillTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst {
		fn as_raw_SelectiveSearchSegmentationStrategyFill(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyFill]
	pub trait SelectiveSearchSegmentationStrategyFillTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyFillTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait {
		fn as_raw_mut_SelectiveSearchSegmentationStrategyFill(&mut self) -> *mut c_void;

	}

	impl std::fmt::Debug for SelectiveSearchSegmentationStrategyFill {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SelectiveSearchSegmentationStrategyFill")
				.finish()
		}
	}

	boxed_cast_base! { SelectiveSearchSegmentationStrategyFill, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFill_to_Algorithm }

	boxed_cast_base! { SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyFill_to_SelectiveSearchSegmentationStrategy }

	impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyFill {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyFill {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyFill, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyFill {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyFill {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyFillTraitConst for SelectiveSearchSegmentationStrategyFill {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategyFill(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyFillTrait for SelectiveSearchSegmentationStrategyFill {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyFill(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategyFillTraitConst, as_raw_SelectiveSearchSegmentationStrategyFill, crate::ximgproc::SelectiveSearchSegmentationStrategyFillTrait, as_raw_mut_SelectiveSearchSegmentationStrategyFill }

	/// Regroup multiple strategies for the selective search segmentation algorithm
	pub struct SelectiveSearchSegmentationStrategyMultiple {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SelectiveSearchSegmentationStrategyMultiple }

	impl Drop for SelectiveSearchSegmentationStrategyMultiple {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyMultiple()) };
		}
	}

	unsafe impl Send for SelectiveSearchSegmentationStrategyMultiple {}

	/// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple]
	pub trait SelectiveSearchSegmentationStrategyMultipleTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst {
		fn as_raw_SelectiveSearchSegmentationStrategyMultiple(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyMultiple]
	pub trait SelectiveSearchSegmentationStrategyMultipleTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait {
		fn as_raw_mut_SelectiveSearchSegmentationStrategyMultiple(&mut self) -> *mut c_void;

		/// Add a new sub-strategy
		/// ## Parameters
		/// * g: The strategy
		/// * weight: The weight of the strategy
		#[inline]
		fn add_strategy(&mut self, mut g: core::Ptr<crate::ximgproc::SelectiveSearchSegmentationStrategy>, weight: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_addStrategy_PtrLSelectiveSearchSegmentationStrategyG_float(self.as_raw_mut_SelectiveSearchSegmentationStrategyMultiple(), g.as_raw_mut_PtrOfSelectiveSearchSegmentationStrategy(), weight, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

		/// Remove all sub-strategies
		#[inline]
		fn clear_strategies(&mut self) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_clearStrategies(self.as_raw_mut_SelectiveSearchSegmentationStrategyMultiple(), ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}

	}

	impl std::fmt::Debug for SelectiveSearchSegmentationStrategyMultiple {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SelectiveSearchSegmentationStrategyMultiple")
				.finish()
		}
	}

	boxed_cast_base! { SelectiveSearchSegmentationStrategyMultiple, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_to_Algorithm }

	boxed_cast_base! { SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyMultiple_to_SelectiveSearchSegmentationStrategy }

	impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyMultiple {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyMultiple {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyMultiple, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyMultiple {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyMultiple {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTraitConst for SelectiveSearchSegmentationStrategyMultiple {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategyMultiple(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTrait for SelectiveSearchSegmentationStrategyMultiple {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyMultiple(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTraitConst, as_raw_SelectiveSearchSegmentationStrategyMultiple, crate::ximgproc::SelectiveSearchSegmentationStrategyMultipleTrait, as_raw_mut_SelectiveSearchSegmentationStrategyMultiple }

	/// Size-based strategy for the selective search segmentation algorithm
	/// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
	pub struct SelectiveSearchSegmentationStrategySize {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SelectiveSearchSegmentationStrategySize }

	impl Drop for SelectiveSearchSegmentationStrategySize {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySize_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategySize()) };
		}
	}

	unsafe impl Send for SelectiveSearchSegmentationStrategySize {}

	/// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategySize]
	pub trait SelectiveSearchSegmentationStrategySizeTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst {
		fn as_raw_SelectiveSearchSegmentationStrategySize(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategySize]
	pub trait SelectiveSearchSegmentationStrategySizeTrait: crate::ximgproc::SelectiveSearchSegmentationStrategySizeTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait {
		fn as_raw_mut_SelectiveSearchSegmentationStrategySize(&mut self) -> *mut c_void;

	}

	impl std::fmt::Debug for SelectiveSearchSegmentationStrategySize {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SelectiveSearchSegmentationStrategySize")
				.finish()
		}
	}

	boxed_cast_base! { SelectiveSearchSegmentationStrategySize, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySize_to_Algorithm }

	boxed_cast_base! { SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategySize_to_SelectiveSearchSegmentationStrategy }

	impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategySize {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategySize {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategySize, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategySize {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategySize {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategySizeTraitConst for SelectiveSearchSegmentationStrategySize {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategySize(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategySizeTrait for SelectiveSearchSegmentationStrategySize {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategySize(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategySizeTraitConst, as_raw_SelectiveSearchSegmentationStrategySize, crate::ximgproc::SelectiveSearchSegmentationStrategySizeTrait, as_raw_mut_SelectiveSearchSegmentationStrategySize }

	/// Texture-based strategy for the selective search segmentation algorithm
	/// The class is implemented from the algorithm described in [uijlings2013selective](https://docs.opencv.org/4.11.0/d0/de3/citelist.html#CITEREF_uijlings2013selective).
	pub struct SelectiveSearchSegmentationStrategyTexture {
		ptr: *mut c_void,
	}

	opencv_type_boxed! { SelectiveSearchSegmentationStrategyTexture }

	impl Drop for SelectiveSearchSegmentationStrategyTexture {
		#[inline]
		fn drop(&mut self) {
			unsafe { sys::cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTexture_delete(self.as_raw_mut_SelectiveSearchSegmentationStrategyTexture()) };
		}
	}

	unsafe impl Send for SelectiveSearchSegmentationStrategyTexture {}

	/// Constant methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyTexture]
	pub trait SelectiveSearchSegmentationStrategyTextureTraitConst: crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst {
		fn as_raw_SelectiveSearchSegmentationStrategyTexture(&self) -> *const c_void;

	}

	/// Mutable methods for [crate::ximgproc::SelectiveSearchSegmentationStrategyTexture]
	pub trait SelectiveSearchSegmentationStrategyTextureTrait: crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTraitConst + crate::ximgproc::SelectiveSearchSegmentationStrategyTrait {
		fn as_raw_mut_SelectiveSearchSegmentationStrategyTexture(&mut self) -> *mut c_void;

	}

	impl std::fmt::Debug for SelectiveSearchSegmentationStrategyTexture {
		#[inline]
		fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
			f.debug_struct("SelectiveSearchSegmentationStrategyTexture")
				.finish()
		}
	}

	boxed_cast_base! { SelectiveSearchSegmentationStrategyTexture, core::Algorithm, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTexture_to_Algorithm }

	boxed_cast_base! { SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategy, cv_ximgproc_segmentation_SelectiveSearchSegmentationStrategyTexture_to_SelectiveSearchSegmentationStrategy }

	impl core::AlgorithmTraitConst for SelectiveSearchSegmentationStrategyTexture {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}

	impl core::AlgorithmTrait for SelectiveSearchSegmentationStrategyTexture {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyTexture, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst for SelectiveSearchSegmentationStrategyTexture {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategy(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTrait for SelectiveSearchSegmentationStrategyTexture {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategy(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategyTraitConst, as_raw_SelectiveSearchSegmentationStrategy, crate::ximgproc::SelectiveSearchSegmentationStrategyTrait, as_raw_mut_SelectiveSearchSegmentationStrategy }

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTraitConst for SelectiveSearchSegmentationStrategyTexture {
		#[inline] fn as_raw_SelectiveSearchSegmentationStrategyTexture(&self) -> *const c_void { self.as_raw() }
	}

	impl crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTrait for SelectiveSearchSegmentationStrategyTexture {
		#[inline] fn as_raw_mut_SelectiveSearchSegmentationStrategyTexture(&mut self) -> *mut c_void { self.as_raw_mut() }
	}

	boxed_ref! { SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTraitConst, as_raw_SelectiveSearchSegmentationStrategyTexture, crate::ximgproc::SelectiveSearchSegmentationStrategyTextureTrait, as_raw_mut_SelectiveSearchSegmentationStrategyTexture }

}