opencv 0.81.2

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
pub mod face {
	//! # Face Analysis
	//! 
	//! - [face_changelog]
	//! - [tutorial_face_main]
	use crate::{mod_prelude::*, core, sys, types};
	pub mod prelude {
		pub use { super::PredictCollectorConst, super::PredictCollector, super::StandardCollectorTraitConst, super::StandardCollectorTrait, super::FaceRecognizerConst, super::FaceRecognizer, super::BasicFaceRecognizerConst, super::BasicFaceRecognizer, super::EigenFaceRecognizerConst, super::EigenFaceRecognizer, super::FisherFaceRecognizerConst, super::FisherFaceRecognizer, super::LBPHFaceRecognizerConst, super::LBPHFaceRecognizer, super::FacemarkConst, super::Facemark, super::CParamsTraitConst, super::CParamsTrait, super::FacemarkTrainConst, super::FacemarkTrain, super::FacemarkLBF_ParamsTraitConst, super::FacemarkLBF_ParamsTrait, super::FacemarkLBFConst, super::FacemarkLBF, super::FacemarkAAM_ParamsTraitConst, super::FacemarkAAM_ParamsTrait, super::FacemarkAAM_ConfigTraitConst, super::FacemarkAAM_ConfigTrait, super::FacemarkAAM_DataTraitConst, super::FacemarkAAM_DataTrait, super::FacemarkAAM_Model_TextureTraitConst, super::FacemarkAAM_Model_TextureTrait, super::FacemarkAAM_ModelTraitConst, super::FacemarkAAM_ModelTrait, super::FacemarkAAMConst, super::FacemarkAAM, super::FacemarkKazemi_ParamsTraitConst, super::FacemarkKazemi_ParamsTrait, super::FacemarkKazemiConst, super::FacemarkKazemi, super::MACEConst, super::MACE, super::BIFConst, super::BIF };
	}
	
	pub type FN_FaceDetector = Option<Box<dyn FnMut(*const c_void, *const c_void) -> bool + Send + Sync + 'static>>;
	/// construct an AAM facemark detector
	#[inline]
	pub fn create_facemark_aam() -> Result<core::Ptr<dyn crate::face::Facemark>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_createFacemarkAAM(ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<dyn crate::face::Facemark>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// construct a Kazemi facemark detector
	#[inline]
	pub fn create_facemark_kazemi() -> Result<core::Ptr<dyn crate::face::Facemark>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_createFacemarkKazemi(ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<dyn crate::face::Facemark>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// construct an LBF facemark detector
	#[inline]
	pub fn create_facemark_lbf() -> Result<core::Ptr<dyn crate::face::Facemark>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_createFacemarkLBF(ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<dyn crate::face::Facemark>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Utility to draw the detected facial landmark points
	/// 
	/// ## Parameters
	/// * image: The input image to be processed.
	/// * points: Contains the data of points which will be drawn.
	/// * color: The color of points in BGR format represented by cv::Scalar.
	/// 
	/// <B>Example of usage</B>
	/// ```C++
	/// std::vector<Rect> faces;
	/// std::vector<std::vector<Point2f> > landmarks;
	/// facemark->getFaces(img, faces);
	/// facemark->fit(img, faces, landmarks);
	/// for(int j=0;j<rects.size();j++){
	///    face::drawFacemarks(frame, landmarks[j], Scalar(0,0,255));
	/// }
	/// ```
	/// 
	/// 
	/// ## C++ default parameters
	/// * color: Scalar(255,0,0)
	#[inline]
	pub fn draw_facemarks(image: &mut dyn core::ToInputOutputArray, points: &dyn core::ToInputArray, color: core::Scalar) -> Result<()> {
		extern_container_arg!(image);
		extern_container_arg!(points);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_drawFacemarks_const__InputOutputArrayR_const__InputArrayR_Scalar(image.as_raw__InputOutputArray(), points.as_raw__InputArray(), color.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	#[inline]
	pub fn get_faces_haar(image: &dyn core::ToInputArray, faces: &mut dyn core::ToOutputArray, face_cascade_name: &str) -> Result<bool> {
		extern_container_arg!(image);
		extern_container_arg!(faces);
		extern_container_arg!(face_cascade_name);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_getFacesHAAR_const__InputArrayR_const__OutputArrayR_const_StringR(image.as_raw__InputArray(), faces.as_raw__OutputArray(), face_cascade_name.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Default face detector
	/// This function is mainly utilized by the implementation of a Facemark Algorithm.
	/// End users are advised to use function Facemark::getFaces which can be manually defined
	/// and circumvented to the algorithm by Facemark::setFaceDetector.
	/// 
	/// ## Parameters
	/// * image: The input image to be processed.
	/// * faces: Output of the function which represent region of interest of the detected faces.
	/// Each face is stored in cv::Rect container.
	/// * params: detector parameters
	/// 
	/// <B>Example of usage</B>
	/// ```C++
	/// std::vector<cv::Rect> faces;
	/// CParams params("haarcascade_frontalface_alt.xml");
	/// cv::face::getFaces(frame, faces, &params);
	/// for(int j=0;j<faces.size();j++){
	///    cv::rectangle(frame, faces[j], cv::Scalar(255,0,255));
	/// }
	/// cv::imshow("detection", frame);
	/// ```
	/// 
	#[inline]
	pub fn get_faces(image: &dyn core::ToInputArray, faces: &mut dyn core::ToOutputArray, params: &mut crate::face::CParams) -> Result<bool> {
		extern_container_arg!(image);
		extern_container_arg!(faces);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_getFaces_const__InputArrayR_const__OutputArrayR_CParamsX(image.as_raw__InputArray(), faces.as_raw__OutputArray(), params.as_raw_mut_CParams(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// A utility to load list of paths to training image and annotation file.
	/// ## Parameters
	/// * imageList: The specified file contains paths to the training images.
	/// * annotationList: The specified file contains paths to the training annotations.
	/// * images: The loaded paths of training images.
	/// * annotations: The loaded paths of annotation files.
	/// 
	/// Example of usage:
	/// ```C++
	/// String imageFiles = "images_path.txt";
	/// String ptsFiles = "annotations_path.txt";
	/// std::vector<String> images_train;
	/// std::vector<String> landmarks_train;
	/// loadDatasetList(imageFiles,ptsFiles,images_train,landmarks_train);
	/// ```
	/// 
	#[inline]
	pub fn load_dataset_list(image_list: &str, annotation_list: &str, images: &mut core::Vector<String>, annotations: &mut core::Vector<String>) -> Result<bool> {
		extern_container_arg!(mut image_list);
		extern_container_arg!(mut annotation_list);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_loadDatasetList_String_String_vectorLStringGR_vectorLStringGR(image_list.opencv_as_extern_mut(), annotation_list.opencv_as_extern_mut(), images.as_raw_mut_VectorOfString(), annotations.as_raw_mut_VectorOfString(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// A utility to load facial landmark information from a given file.
	/// 
	/// ## Parameters
	/// * filename: The filename of file contains the facial landmarks data.
	/// * points: The loaded facial landmark points.
	/// * offset: An offset value to adjust the loaded points.
	/// 
	/// <B>Example of usage</B>
	/// ```C++
	/// std::vector<Point2f> points;
	/// face::loadFacePoints("filename.txt", points, 0.0f);
	/// ```
	/// 
	/// 
	/// The annotation file should follow the default format which is
	/// ```C++
	/// version: 1
	/// n_points:  68
	/// {
	/// 212.716603 499.771793
	/// 230.232816 566.290071
	/// ...
	/// }
	/// ```
	/// 
	/// where n_points is the number of points considered
	/// and each point is represented as its position in x and y.
	/// 
	/// ## C++ default parameters
	/// * offset: 0.0f
	#[inline]
	pub fn load_face_points(filename: &str, points: &mut dyn core::ToOutputArray, offset: f32) -> Result<bool> {
		extern_container_arg!(mut filename);
		extern_container_arg!(points);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_loadFacePoints_String_const__OutputArrayR_float(filename.opencv_as_extern_mut(), points.as_raw__OutputArray(), offset, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// A utility to load facial landmark information from the dataset.
	/// 
	/// ## Parameters
	/// * imageList: A file contains the list of image filenames in the training dataset.
	/// * groundTruth: A file contains the list of filenames
	/// where the landmarks points information are stored.
	/// The content in each file should follow the standard format (see face::loadFacePoints).
	/// * images: A vector where each element represent the filename of image in the dataset.
	/// Images are not loaded by default to save the memory.
	/// * facePoints: The loaded landmark points for all training data.
	/// * offset: An offset value to adjust the loaded points.
	/// 
	/// <B>Example of usage</B>
	/// ```C++
	/// cv::String imageFiles = "../data/images_train.txt";
	/// cv::String ptsFiles = "../data/points_train.txt";
	/// std::vector<String> images;
	/// std::vector<std::vector<Point2f> > facePoints;
	/// loadTrainingData(imageFiles, ptsFiles, images, facePoints, 0.0f);
	/// ```
	/// 
	/// 
	/// example of content in the images_train.txt
	/// ```C++
	/// /home/user/ibug/image_003_1.jpg
	/// /home/user/ibug/image_004_1.jpg
	/// /home/user/ibug/image_005_1.jpg
	/// /home/user/ibug/image_006.jpg
	/// ```
	/// 
	/// 
	/// example of content in the points_train.txt
	/// ```C++
	/// /home/user/ibug/image_003_1.pts
	/// /home/user/ibug/image_004_1.pts
	/// /home/user/ibug/image_005_1.pts
	/// /home/user/ibug/image_006.pts
	/// ```
	/// 
	/// 
	/// ## C++ default parameters
	/// * offset: 0.0f
	#[inline]
	pub fn load_training_data_1(image_list: &str, ground_truth: &str, images: &mut core::Vector<String>, face_points: &mut dyn core::ToOutputArray, offset: f32) -> Result<bool> {
		extern_container_arg!(mut image_list);
		extern_container_arg!(mut ground_truth);
		extern_container_arg!(face_points);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_loadTrainingData_String_String_vectorLStringGR_const__OutputArrayR_float(image_list.opencv_as_extern_mut(), ground_truth.opencv_as_extern_mut(), images.as_raw_mut_VectorOfString(), face_points.as_raw__OutputArray(), offset, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// A utility to load facial landmark dataset from a single file.
	/// 
	/// ## Parameters
	/// * filename: The filename of a file that contains the dataset information.
	/// Each line contains the filename of an image followed by
	/// pairs of x and y values of facial landmarks points separated by a space.
	/// Example
	/// ```C++
	/// /home/user/ibug/image_003_1.jpg 336.820955 240.864510 334.238298 260.922709 335.266918 ...
	/// /home/user/ibug/image_005_1.jpg 376.158428 230.845712 376.736984 254.924635 383.265403 ...
	/// ```
	/// 
	/// * images: A vector where each element represent the filename of image in the dataset.
	/// Images are not loaded by default to save the memory.
	/// * facePoints: The loaded landmark points for all training data.
	/// * delim: Delimiter between each element, the default value is a whitespace.
	/// * offset: An offset value to adjust the loaded points.
	/// 
	/// <B>Example of usage</B>
	/// ```C++
	/// cv::String imageFiles = "../data/images_train.txt";
	/// cv::String ptsFiles = "../data/points_train.txt";
	/// std::vector<String> images;
	/// std::vector<std::vector<Point2f> > facePoints;
	/// loadTrainingData(imageFiles, ptsFiles, images, facePoints, 0.0f);
	/// ```
	/// 
	/// 
	/// ## C++ default parameters
	/// * delim: ' '
	/// * offset: 0.0f
	#[inline]
	pub fn load_training_data(filename: &str, images: &mut core::Vector<String>, face_points: &mut dyn core::ToOutputArray, delim: i8, offset: f32) -> Result<bool> {
		extern_container_arg!(mut filename);
		extern_container_arg!(face_points);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_loadTrainingData_String_vectorLStringGR_const__OutputArrayR_char_float(filename.opencv_as_extern_mut(), images.as_raw_mut_VectorOfString(), face_points.as_raw__OutputArray(), delim, offset, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// This function extracts the data for training from .txt files which contains the corresponding image name and landmarks.
	/// The first file in each file should give the path of the image whose
	/// landmarks are being described in the file. Then in the subsequent
	/// lines there should be coordinates of the landmarks in the image
	/// i.e each line should be of the form x,y
	/// where x represents the x coordinate of the landmark and y represents
	/// the y coordinate of the landmark.
	/// 
	/// For reference you can see the files as provided in the
	/// <a href="http://www.ifp.illinois.edu/~vuongle2/helen/">HELEN dataset</a>
	/// 
	/// ## Parameters
	/// * filename: A vector of type cv::String containing name of the .txt files.
	/// * trainlandmarks: A vector of type cv::Point2f that would store shape or landmarks of all images.
	/// * trainimages: A vector of type cv::String which stores the name of images whose landmarks are tracked
	/// ## Returns
	/// A boolean value. It returns true when it reads the data successfully and false otherwise
	#[inline]
	pub fn load_training_data_2(mut filename: core::Vector<String>, trainlandmarks: &mut core::Vector<core::Vector<core::Point2f>>, trainimages: &mut core::Vector<String>) -> Result<bool> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_face_loadTrainingData_vectorLStringG_vectorLvectorLPoint2fGGR_vectorLStringGR(filename.as_raw_mut_VectorOfString(), trainlandmarks.as_raw_mut_VectorOfVectorOfPoint2f(), trainimages.as_raw_mut_VectorOfString(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Constant methods for [crate::face::BIF]
	pub trait BIFConst: core::AlgorithmTraitConst {
		fn as_raw_BIF(&self) -> *const c_void;
	
		/// ## Returns
		/// The number of filter bands used for computing BIF.
		#[inline]
		fn get_num_bands(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BIF_getNumBands_const(self.as_raw_BIF(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## Returns
		/// The number of image rotations.
		#[inline]
		fn get_num_rotations(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BIF_getNumRotations_const(self.as_raw_BIF(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Computes features sby input image.
		/// ## Parameters
		/// * image: Input image (CV_32FC1).
		/// * features: Feature vector (CV_32FC1).
		#[inline]
		fn compute(&self, image: &dyn core::ToInputArray, features: &mut dyn core::ToOutputArray) -> Result<()> {
			extern_container_arg!(image);
			extern_container_arg!(features);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BIF_compute_const_const__InputArrayR_const__OutputArrayR(self.as_raw_BIF(), image.as_raw__InputArray(), features.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Implementation of bio-inspired features (BIF) from the paper:
	/// Guo, Guodong, et al. "Human age estimation using bio-inspired features."
	/// Computer Vision and Pattern Recognition, 2009. CVPR 2009.
	pub trait BIF: core::AlgorithmTrait + crate::face::BIFConst {
		fn as_raw_mut_BIF(&mut self) -> *mut c_void;
	
	}
	
	impl dyn BIF + '_ {
		/// ## Parameters
		/// * num_bands: The number of filter bands (<=8) used for computing BIF.
		/// * num_rotations: The number of image rotations for computing BIF.
		/// ## Returns
		/// Object for computing BIF.
		/// 
		/// ## C++ default parameters
		/// * num_bands: 8
		/// * num_rotations: 12
		#[inline]
		pub fn create(num_bands: i32, num_rotations: i32) -> Result<core::Ptr<dyn crate::face::BIF>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BIF_create_int_int(num_bands, num_rotations, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::BIF>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::BasicFaceRecognizer]
	pub trait BasicFaceRecognizerConst: crate::face::FaceRecognizerConst {
		fn as_raw_BasicFaceRecognizer(&self) -> *const c_void;
	
		/// ## See also
		/// setNumComponents
		#[inline]
		fn get_num_components(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_getNumComponents_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setThreshold
		#[inline]
		fn get_threshold(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_getThreshold_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_projections(&self) -> Result<core::Vector<core::Mat>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_getProjections_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Vector::<core::Mat>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		#[inline]
		fn get_labels(&self) -> Result<core::Mat> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_getLabels_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		#[inline]
		fn get_eigen_values(&self) -> Result<core::Mat> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_getEigenValues_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		#[inline]
		fn get_eigen_vectors(&self) -> Result<core::Mat> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_getEigenVectors_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		#[inline]
		fn get_mean(&self) -> Result<core::Mat> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_getMean_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		#[inline]
		fn write(&self, fs: &mut core::FileStorage) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_write_const_FileStorageR(self.as_raw_BasicFaceRecognizer(), fs.as_raw_mut_FileStorage(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn empty(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_empty_const(self.as_raw_BasicFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	pub trait BasicFaceRecognizer: crate::face::BasicFaceRecognizerConst + crate::face::FaceRecognizer {
		fn as_raw_mut_BasicFaceRecognizer(&mut self) -> *mut c_void;
	
		/// ## See also
		/// setNumComponents getNumComponents
		#[inline]
		fn set_num_components(&mut self, val: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_setNumComponents_int(self.as_raw_mut_BasicFaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setThreshold getThreshold
		#[inline]
		fn set_threshold(&mut self, val: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_setThreshold_double(self.as_raw_mut_BasicFaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn read(&mut self, fn_: &core::FileNode) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_BasicFaceRecognizer_read_const_FileNodeR(self.as_raw_mut_BasicFaceRecognizer(), fn_.as_raw_FileNode(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::CParams]
	pub trait CParamsTraitConst {
		fn as_raw_CParams(&self) -> *const c_void;
	
		/// the face detector
		#[inline]
		fn cascade(&self) -> String {
			let ret = unsafe { sys::cv_face_CParams_getPropCascade_const(self.as_raw_CParams()) };
			let ret = unsafe { String::opencv_from_extern(ret) };
			ret
		}
		
		/// Parameter specifying how much the image size is reduced at each image scale.
		#[inline]
		fn scale_factor(&self) -> f64 {
			let ret = unsafe { sys::cv_face_CParams_getPropScaleFactor_const(self.as_raw_CParams()) };
			ret
		}
		
		/// Parameter specifying how many neighbors each candidate rectangle should have to retain it.
		#[inline]
		fn min_neighbors(&self) -> i32 {
			let ret = unsafe { sys::cv_face_CParams_getPropMinNeighbors_const(self.as_raw_CParams()) };
			ret
		}
		
		/// Minimum possible object size.
		#[inline]
		fn min_size(&self) -> core::Size {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_CParams_getPropMinSize_const(self.as_raw_CParams(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			ret
		}
		
		/// Maximum possible object size.
		#[inline]
		fn max_size(&self) -> core::Size {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_CParams_getPropMaxSize_const(self.as_raw_CParams(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			ret
		}
		
		#[inline]
		fn face_cascade(&self) -> crate::objdetect::CascadeClassifier {
			let ret = unsafe { sys::cv_face_CParams_getPropFace_cascade_const(self.as_raw_CParams()) };
			let ret = unsafe { crate::objdetect::CascadeClassifier::opencv_from_extern(ret) };
			ret
		}
		
	}
	
	/// Mutable methods for [crate::face::CParams]
	pub trait CParamsTrait: crate::face::CParamsTraitConst {
		fn as_raw_mut_CParams(&mut self) -> *mut c_void;
	
		/// the face detector
		#[inline]
		fn set_cascade(&mut self, val: &str) {
			extern_container_arg!(nofail mut val);
			let ret = unsafe { sys::cv_face_CParams_setPropCascade_String(self.as_raw_mut_CParams(), val.opencv_as_extern_mut()) };
			ret
		}
		
		/// Parameter specifying how much the image size is reduced at each image scale.
		#[inline]
		fn set_scale_factor(&mut self, val: f64) {
			let ret = unsafe { sys::cv_face_CParams_setPropScaleFactor_double(self.as_raw_mut_CParams(), val) };
			ret
		}
		
		/// Parameter specifying how many neighbors each candidate rectangle should have to retain it.
		#[inline]
		fn set_min_neighbors(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_CParams_setPropMinNeighbors_int(self.as_raw_mut_CParams(), val) };
			ret
		}
		
		/// Minimum possible object size.
		#[inline]
		fn set_min_size(&mut self, val: core::Size) {
			let ret = unsafe { sys::cv_face_CParams_setPropMinSize_Size(self.as_raw_mut_CParams(), val.opencv_as_extern()) };
			ret
		}
		
		/// Maximum possible object size.
		#[inline]
		fn set_max_size(&mut self, val: core::Size) {
			let ret = unsafe { sys::cv_face_CParams_setPropMaxSize_Size(self.as_raw_mut_CParams(), val.opencv_as_extern()) };
			ret
		}
		
		#[inline]
		fn set_face_cascade(&mut self, mut val: crate::objdetect::CascadeClassifier) {
			let ret = unsafe { sys::cv_face_CParams_setPropFace_cascade_CascadeClassifier(self.as_raw_mut_CParams(), val.as_raw_mut_CascadeClassifier()) };
			ret
		}
		
	}
	
	pub struct CParams {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CParams }
	
	impl Drop for CParams {
		fn drop(&mut self) {
			extern "C" { fn cv_CParams_delete(instance: *mut c_void); }
			unsafe { cv_CParams_delete(self.as_raw_mut_CParams()) };
		}
	}
	
	unsafe impl Send for CParams {}
	
	impl crate::face::CParamsTraitConst for CParams {
		#[inline] fn as_raw_CParams(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::CParamsTrait for CParams {
		#[inline] fn as_raw_mut_CParams(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CParams {
		/// ## C++ default parameters
		/// * sf: 1.1
		/// * min_n: 3
		/// * min_sz: Size(30,30)
		/// * max_sz: Size()
		#[inline]
		pub fn new(cascade_model: &str, sf: f64, min_n: i32, min_sz: core::Size, max_sz: core::Size) -> Result<crate::face::CParams> {
			extern_container_arg!(mut cascade_model);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_CParams_CParams_String_double_int_Size_Size(cascade_model.opencv_as_extern_mut(), sf, min_n, min_sz.opencv_as_extern(), max_sz.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::face::CParams::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::EigenFaceRecognizer]
	pub trait EigenFaceRecognizerConst: crate::face::BasicFaceRecognizerConst {
		fn as_raw_EigenFaceRecognizer(&self) -> *const c_void;
	
	}
	
	pub trait EigenFaceRecognizer: crate::face::BasicFaceRecognizer + crate::face::EigenFaceRecognizerConst {
		fn as_raw_mut_EigenFaceRecognizer(&mut self) -> *mut c_void;
	
	}
	
	impl dyn EigenFaceRecognizer + '_ {
		/// ## Parameters
		/// * num_components: The number of components (read: Eigenfaces) kept for this Principal
		/// Component Analysis. As a hint: There's no rule how many components (read: Eigenfaces) should be
		/// kept for good reconstruction capabilities. It is based on your input data, so experiment with the
		/// number. Keeping 80 components should almost always be sufficient.
		/// * threshold: The threshold applied in the prediction.
		/// 
		/// ### Notes:
		/// 
		/// *   Training and prediction must be done on grayscale images, use cvtColor to convert between the
		///    color spaces.
		/// *   **THE EIGENFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL
		///    SIZE.** (caps-lock, because I got so many mails asking for this). You have to make sure your
		///    input data has the correct shape, else a meaningful exception is thrown. Use resize to resize
		///    the images.
		/// *   This model does not support updating.
		/// 
		/// ### Model internal data:
		/// 
		/// *   num_components see EigenFaceRecognizer::create.
		/// *   threshold see EigenFaceRecognizer::create.
		/// *   eigenvalues The eigenvalues for this Principal Component Analysis (ordered descending).
		/// *   eigenvectors The eigenvectors for this Principal Component Analysis (ordered by their
		///    eigenvalue).
		/// *   mean The sample mean calculated from the training data.
		/// *   projections The projections of the training data.
		/// *   labels The threshold applied in the prediction. If the distance to the nearest neighbor is
		///    larger than the threshold, this method returns -1.
		/// 
		/// ## C++ default parameters
		/// * num_components: 0
		/// * threshold: DBL_MAX
		#[inline]
		pub fn create(num_components: i32, threshold: f64) -> Result<core::Ptr<dyn crate::face::EigenFaceRecognizer>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_EigenFaceRecognizer_create_int_double(num_components, threshold, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::EigenFaceRecognizer>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::FaceRecognizer]
	pub trait FaceRecognizerConst: core::AlgorithmTraitConst {
		fn as_raw_FaceRecognizer(&self) -> *const c_void;
	
		/// Predicts a label and associated confidence (e.g. distance) for a given input image.
		/// 
		/// ## Parameters
		/// * src: Sample image to get a prediction from.
		/// * label: The predicted label for the given image.
		/// * confidence: Associated confidence (e.g. distance) for the predicted label.
		/// 
		/// The suffix const means that prediction does not affect the internal model state, so the method can
		/// be safely called from within different threads.
		/// 
		/// The following example shows how to get a prediction from a trained model:
		/// 
		/// ```C++
		/// using namespace cv;
		/// // Do your initialization here (create the cv::FaceRecognizer model) ...
		/// // ...
		/// // Read in a sample image:
		/// Mat img = imread("person1/3.jpg", IMREAD_GRAYSCALE);
		/// // And get a prediction from the cv::FaceRecognizer:
		/// int predicted = model->predict(img);
		/// ```
		/// 
		/// 
		/// Or to get a prediction and the associated confidence (e.g. distance):
		/// 
		/// ```C++
		/// using namespace cv;
		/// // Do your initialization here (create the cv::FaceRecognizer model) ...
		/// // ...
		/// Mat img = imread("person1/3.jpg", IMREAD_GRAYSCALE);
		/// // Some variables for the predicted label and associated confidence (e.g. distance):
		/// int predicted_label = -1;
		/// double predicted_confidence = 0.0;
		/// // Get the prediction and associated confidence from the model
		/// model->predict(img, predicted_label, predicted_confidence);
		/// ```
		/// 
		/// 
		/// ## Overloaded parameters
		#[inline]
		fn predict_label(&self, src: &dyn core::ToInputArray) -> Result<i32> {
			extern_container_arg!(src);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_predict_const_const__InputArrayR(self.as_raw_FaceRecognizer(), src.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Predicts a label and associated confidence (e.g. distance) for a given input image.
		/// 
		/// ## Parameters
		/// * src: Sample image to get a prediction from.
		/// * label: The predicted label for the given image.
		/// * confidence: Associated confidence (e.g. distance) for the predicted label.
		/// 
		/// The suffix const means that prediction does not affect the internal model state, so the method can
		/// be safely called from within different threads.
		/// 
		/// The following example shows how to get a prediction from a trained model:
		/// 
		/// ```C++
		/// using namespace cv;
		/// // Do your initialization here (create the cv::FaceRecognizer model) ...
		/// // ...
		/// // Read in a sample image:
		/// Mat img = imread("person1/3.jpg", IMREAD_GRAYSCALE);
		/// // And get a prediction from the cv::FaceRecognizer:
		/// int predicted = model->predict(img);
		/// ```
		/// 
		/// 
		/// Or to get a prediction and the associated confidence (e.g. distance):
		/// 
		/// ```C++
		/// using namespace cv;
		/// // Do your initialization here (create the cv::FaceRecognizer model) ...
		/// // ...
		/// Mat img = imread("person1/3.jpg", IMREAD_GRAYSCALE);
		/// // Some variables for the predicted label and associated confidence (e.g. distance):
		/// int predicted_label = -1;
		/// double predicted_confidence = 0.0;
		/// // Get the prediction and associated confidence from the model
		/// model->predict(img, predicted_label, predicted_confidence);
		/// ```
		/// 
		#[inline]
		fn predict(&self, src: &dyn core::ToInputArray, label: &mut i32, confidence: &mut f64) -> Result<()> {
			extern_container_arg!(src);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_predict_const_const__InputArrayR_intR_doubleR(self.as_raw_FaceRecognizer(), src.as_raw__InputArray(), label, confidence, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// - if implemented - send all result of prediction to collector that can be used for somehow custom result handling
		/// ## Parameters
		/// * src: Sample image to get a prediction from.
		/// * collector: User-defined collector object that accepts all results
		/// 
		/// To implement this method u just have to do same internal cycle as in predict(InputArray src, CV_OUT int &label, CV_OUT double &confidence) but
		/// not try to get "best@ result, just resend it to caller side with given collector
		#[inline]
		fn predict_collect(&self, src: &dyn core::ToInputArray, mut collector: core::Ptr<dyn crate::face::PredictCollector>) -> Result<()> {
			extern_container_arg!(src);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_predict_const_const__InputArrayR_PtrLPredictCollectorG(self.as_raw_FaceRecognizer(), src.as_raw__InputArray(), collector.as_raw_mut_PtrOfPredictCollector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Saves a FaceRecognizer and its model state.
		/// 
		/// Saves this model to a given filename, either as XML or YAML.
		/// ## Parameters
		/// * filename: The filename to store this FaceRecognizer to (either XML/YAML).
		/// 
		/// Every FaceRecognizer overwrites FaceRecognizer::save(FileStorage& fs) to save the internal model
		/// state. FaceRecognizer::save(const String& filename) saves the state of a model to the given
		/// filename.
		/// 
		/// The suffix const means that prediction does not affect the internal model state, so the method can
		/// be safely called from within different threads.
		#[inline]
		fn write(&self, filename: &str) -> Result<()> {
			extern_container_arg!(filename);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_write_const_const_StringR(self.as_raw_FaceRecognizer(), filename.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Saves a FaceRecognizer and its model state.
		/// 
		/// Saves this model to a given filename, either as XML or YAML.
		/// ## Parameters
		/// * filename: The filename to store this FaceRecognizer to (either XML/YAML).
		/// 
		/// Every FaceRecognizer overwrites FaceRecognizer::save(FileStorage& fs) to save the internal model
		/// state. FaceRecognizer::save(const String& filename) saves the state of a model to the given
		/// filename.
		/// 
		/// The suffix const means that prediction does not affect the internal model state, so the method can
		/// be safely called from within different threads.
		/// 
		/// ## Overloaded parameters
		/// 
		///    Saves this model to a given FileStorage.
		/// * fs: The FileStorage to store this FaceRecognizer to.
		#[inline]
		fn write_1(&self, fs: &mut core::FileStorage) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_write_const_FileStorageR(self.as_raw_FaceRecognizer(), fs.as_raw_mut_FileStorage(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
		#[inline]
		fn empty(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_empty_const(self.as_raw_FaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Gets string information by label.
		/// 
		/// If an unknown label id is provided or there is no label information associated with the specified
		/// label id the method returns an empty string.
		#[inline]
		fn get_label_info(&self, label: i32) -> Result<String> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_getLabelInfo_const_int(self.as_raw_FaceRecognizer(), label, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { String::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		/// Gets vector of labels by string.
		/// 
		/// The function searches for the labels containing the specified sub-string in the associated string
		/// info.
		#[inline]
		fn get_labels_by_string(&self, str: &str) -> Result<core::Vector<i32>> {
			extern_container_arg!(str);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_getLabelsByString_const_const_StringR(self.as_raw_FaceRecognizer(), str.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Vector::<i32>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		/// threshold parameter accessor - required for default BestMinDist collector
		#[inline]
		fn get_threshold(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_getThreshold_const(self.as_raw_FaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Abstract base class for all face recognition models
	/// 
	/// All face recognition models in OpenCV are derived from the abstract base class FaceRecognizer, which
	/// provides a unified access to all face recongition algorithms in OpenCV.
	/// 
	/// ### Description
	/// 
	/// I'll go a bit more into detail explaining FaceRecognizer, because it doesn't look like a powerful
	/// interface at first sight. But: Every FaceRecognizer is an Algorithm, so you can easily get/set all
	/// model internals (if allowed by the implementation). Algorithm is a relatively new OpenCV concept,
	/// which is available since the 2.4 release. I suggest you take a look at its description.
	/// 
	/// Algorithm provides the following features for all derived classes:
	/// 
	/// *   So called "virtual constructor". That is, each Algorithm derivative is registered at program
	///    start and you can get the list of registered algorithms and create instance of a particular
	///    algorithm by its name (see Algorithm::create). If you plan to add your own algorithms, it is
	///    good practice to add a unique prefix to your algorithms to distinguish them from other
	///    algorithms.
	/// *   Setting/Retrieving algorithm parameters by name. If you used video capturing functionality from
	///    OpenCV highgui module, you are probably familar with cv::cvSetCaptureProperty,
	/// ocvcvGetCaptureProperty, VideoCapture::set and VideoCapture::get. Algorithm provides similar
	///    method where instead of integer id's you specify the parameter names as text Strings. See
	///    Algorithm::set and Algorithm::get for details.
	/// *   Reading and writing parameters from/to XML or YAML files. Every Algorithm derivative can store
	///    all its parameters and then read them back. There is no need to re-implement it each time.
	/// 
	/// Moreover every FaceRecognizer supports the:
	/// 
	/// *   **Training** of a FaceRecognizer with FaceRecognizer::train on a given set of images (your face
	///    database!).
	/// *   **Prediction** of a given sample image, that means a face. The image is given as a Mat.
	/// *   **Loading/Saving** the model state from/to a given XML or YAML.
	/// *   **Setting/Getting labels info**, that is stored as a string. String labels info is useful for
	///    keeping names of the recognized people.
	/// 
	/// 
	/// Note: When using the FaceRecognizer interface in combination with Python, please stick to Python 2.
	/// Some underlying scripts like create_csv will not work in other versions, like Python 3. Setting the
	/// Thresholds +++++++++++++++++++++++
	/// 
	/// Sometimes you run into the situation, when you want to apply a threshold on the prediction. A common
	/// scenario in face recognition is to tell, whether a face belongs to the training dataset or if it is
	/// unknown. You might wonder, why there's no public API in FaceRecognizer to set the threshold for the
	/// prediction, but rest assured: It's supported. It just means there's no generic way in an abstract
	/// class to provide an interface for setting/getting the thresholds of *every possible* FaceRecognizer
	/// algorithm. The appropriate place to set the thresholds is in the constructor of the specific
	/// FaceRecognizer and since every FaceRecognizer is a Algorithm (see above), you can get/set the
	/// thresholds at runtime!
	/// 
	/// Here is an example of setting a threshold for the Eigenfaces method, when creating the model:
	/// 
	/// ```C++
	/// // Let's say we want to keep 10 Eigenfaces and have a threshold value of 10.0
	/// int num_components = 10;
	/// double threshold = 10.0;
	/// // Then if you want to have a cv::FaceRecognizer with a confidence threshold,
	/// // create the concrete implementation with the appropriate parameters:
	/// Ptr<FaceRecognizer> model = EigenFaceRecognizer::create(num_components, threshold);
	/// ```
	/// 
	/// 
	/// Sometimes it's impossible to train the model, just to experiment with threshold values. Thanks to
	/// Algorithm it's possible to set internal model thresholds during runtime. Let's see how we would
	/// set/get the prediction for the Eigenface model, we've created above:
	/// 
	/// ```C++
	/// // The following line reads the threshold from the Eigenfaces model:
	/// double current_threshold = model->getDouble("threshold");
	/// // And this line sets the threshold to 0.0:
	/// model->set("threshold", 0.0);
	/// ```
	/// 
	/// 
	/// If you've set the threshold to 0.0 as we did above, then:
	/// 
	/// ```C++
	/// //
	/// Mat img = imread("person1/3.jpg", IMREAD_GRAYSCALE);
	/// // Get a prediction from the model. Note: We've set a threshold of 0.0 above,
	/// // since the distance is almost always larger than 0.0, you'll get -1 as
	/// // label, which indicates, this face is unknown
	/// int predicted_label = model->predict(img);
	/// // ...
	/// ```
	/// 
	/// 
	/// is going to yield -1 as predicted label, which states this face is unknown.
	/// 
	/// ### Getting the name of a FaceRecognizer
	/// 
	/// Since every FaceRecognizer is a Algorithm, you can use Algorithm::name to get the name of a
	/// FaceRecognizer:
	/// 
	/// ```C++
	/// // Create a FaceRecognizer:
	/// Ptr<FaceRecognizer> model = EigenFaceRecognizer::create();
	/// // And here's how to get its name:
	/// String name = model->name();
	/// ```
	/// 
	pub trait FaceRecognizer: core::AlgorithmTrait + crate::face::FaceRecognizerConst {
		fn as_raw_mut_FaceRecognizer(&mut self) -> *mut c_void;
	
		/// Trains a FaceRecognizer with given data and associated labels.
		/// 
		/// ## Parameters
		/// * src: The training images, that means the faces you want to learn. The data has to be
		/// given as a vector\<Mat\>.
		/// * labels: The labels corresponding to the images have to be given either as a vector\<int\>
		/// or a Mat of type CV_32SC1.
		/// 
		/// The following source code snippet shows you how to learn a Fisherfaces model on a given set of
		/// images. The images are read with imread and pushed into a std::vector\<Mat\>. The labels of each
		/// image are stored within a std::vector\<int\> (you could also use a Mat of type CV_32SC1). Think of
		/// the label as the subject (the person) this image belongs to, so same subjects (persons) should have
		/// the same label. For the available FaceRecognizer you don't have to pay any attention to the order of
		/// the labels, just make sure same persons have the same label:
		/// 
		/// ```C++
		/// // holds images and labels
		/// vector<Mat> images;
		/// vector<int> labels;
		/// // using Mat of type CV_32SC1
		/// // Mat labels(number_of_samples, 1, CV_32SC1);
		/// // images for first person
		/// images.push_back(imread("person0/0.jpg", IMREAD_GRAYSCALE)); labels.push_back(0);
		/// images.push_back(imread("person0/1.jpg", IMREAD_GRAYSCALE)); labels.push_back(0);
		/// images.push_back(imread("person0/2.jpg", IMREAD_GRAYSCALE)); labels.push_back(0);
		/// // images for second person
		/// images.push_back(imread("person1/0.jpg", IMREAD_GRAYSCALE)); labels.push_back(1);
		/// images.push_back(imread("person1/1.jpg", IMREAD_GRAYSCALE)); labels.push_back(1);
		/// images.push_back(imread("person1/2.jpg", IMREAD_GRAYSCALE)); labels.push_back(1);
		/// ```
		/// 
		/// 
		/// Now that you have read some images, we can create a new FaceRecognizer. In this example I'll create
		/// a Fisherfaces model and decide to keep all of the possible Fisherfaces:
		/// 
		/// ```C++
		/// // Create a new Fisherfaces model and retain all available Fisherfaces,
		/// // this is the most common usage of this specific FaceRecognizer:
		/// //
		/// Ptr<FaceRecognizer> model =  FisherFaceRecognizer::create();
		/// ```
		/// 
		/// 
		/// And finally train it on the given dataset (the face images and labels):
		/// 
		/// ```C++
		/// // This is the common interface to train all of the available cv::FaceRecognizer
		/// // implementations:
		/// //
		/// model->train(images, labels);
		/// ```
		/// 
		#[inline]
		fn train(&mut self, src: &dyn core::ToInputArray, labels: &dyn core::ToInputArray) -> Result<()> {
			extern_container_arg!(src);
			extern_container_arg!(labels);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_train_const__InputArrayR_const__InputArrayR(self.as_raw_mut_FaceRecognizer(), src.as_raw__InputArray(), labels.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Updates a FaceRecognizer with given data and associated labels.
		/// 
		/// ## Parameters
		/// * src: The training images, that means the faces you want to learn. The data has to be given
		/// as a vector\<Mat\>.
		/// * labels: The labels corresponding to the images have to be given either as a vector\<int\> or
		/// a Mat of type CV_32SC1.
		/// 
		/// This method updates a (probably trained) FaceRecognizer, but only if the algorithm supports it. The
		/// Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated.
		/// For the Eigenfaces and Fisherfaces method, this is algorithmically not possible and you have to
		/// re-estimate the model with FaceRecognizer::train. In any case, a call to train empties the existing
		/// model and learns a new model, while update does not delete any model data.
		/// 
		/// ```C++
		/// // Create a new LBPH model (it can be updated) and use the default parameters,
		/// // this is the most common usage of this specific FaceRecognizer:
		/// //
		/// Ptr<FaceRecognizer> model =  LBPHFaceRecognizer::create();
		/// // This is the common interface to train all of the available cv::FaceRecognizer
		/// // implementations:
		/// //
		/// model->train(images, labels);
		/// // Some containers to hold new image:
		/// vector<Mat> newImages;
		/// vector<int> newLabels;
		/// // You should add some images to the containers:
		/// //
		/// // ...
		/// //
		/// // Now updating the model is as easy as calling:
		/// model->update(newImages,newLabels);
		/// // This will preserve the old model data and extend the existing model
		/// // with the new features extracted from newImages!
		/// ```
		/// 
		/// 
		/// Calling update on an Eigenfaces model (see EigenFaceRecognizer::create), which doesn't support
		/// updating, will throw an error similar to:
		/// 
		/// ```C++
		/// OpenCV Error: The function/feature is not implemented (This FaceRecognizer (FaceRecognizer.Eigenfaces) does not support updating, you have to use FaceRecognizer::train to update it.) in update, file /home/philipp/git/opencv/modules/contrib/src/facerec.cpp, line 305
		/// terminate called after throwing an instance of "cv::Exception"
		/// ```
		/// 
		/// 
		/// 
		/// Note: The FaceRecognizer does not store your training images, because this would be very
		/// memory intense and it's not the responsibility of te FaceRecognizer to do so. The caller is
		/// responsible for maintaining the dataset, he want to work with.
		#[inline]
		fn update(&mut self, src: &dyn core::ToInputArray, labels: &dyn core::ToInputArray) -> Result<()> {
			extern_container_arg!(src);
			extern_container_arg!(labels);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_update_const__InputArrayR_const__InputArrayR(self.as_raw_mut_FaceRecognizer(), src.as_raw__InputArray(), labels.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Loads a FaceRecognizer and its model state.
		/// 
		/// Loads a persisted model and state from a given XML or YAML file . Every FaceRecognizer has to
		/// overwrite FaceRecognizer::load(FileStorage& fs) to enable loading the model state.
		/// FaceRecognizer::load(FileStorage& fs) in turn gets called by
		/// FaceRecognizer::load(const String& filename), to ease saving a model.
		#[inline]
		fn read(&mut self, filename: &str) -> Result<()> {
			extern_container_arg!(filename);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_read_const_StringR(self.as_raw_mut_FaceRecognizer(), filename.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Loads a FaceRecognizer and its model state.
		/// 
		/// Loads a persisted model and state from a given XML or YAML file . Every FaceRecognizer has to
		/// overwrite FaceRecognizer::load(FileStorage& fs) to enable loading the model state.
		/// FaceRecognizer::load(FileStorage& fs) in turn gets called by
		/// FaceRecognizer::load(const String& filename), to ease saving a model.
		/// 
		/// ## Overloaded parameters
		#[inline]
		fn read_1(&mut self, fn_: &core::FileNode) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_read_const_FileNodeR(self.as_raw_mut_FaceRecognizer(), fn_.as_raw_FileNode(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Sets string info for the specified model's label.
		/// 
		/// The string info is replaced by the provided value if it was set before for the specified label.
		#[inline]
		fn set_label_info(&mut self, label: i32, str_info: &str) -> Result<()> {
			extern_container_arg!(str_info);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_setLabelInfo_int_const_StringR(self.as_raw_mut_FaceRecognizer(), label, str_info.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Sets threshold of model
		#[inline]
		fn set_threshold(&mut self, val: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FaceRecognizer_setThreshold_double(self.as_raw_mut_FaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::Facemark]
	pub trait FacemarkConst: core::AlgorithmTraitConst {
		fn as_raw_Facemark(&self) -> *const c_void;
	
	}
	
	/// Abstract base class for all facemark models
	/// 
	/// To utilize this API in your program, please take a look at the [tutorial_table_of_content_facemark]
	/// ### Description
	/// 
	/// Facemark is a base class which provides universal access to any specific facemark algorithm.
	/// Therefore, the users should declare a desired algorithm before they can use it in their application.
	/// 
	/// Here is an example on how to declare a facemark algorithm:
	/// ```C++
	/// // Using Facemark in your code:
	/// Ptr<Facemark> facemark = createFacemarkLBF();
	/// ```
	/// 
	/// 
	/// The typical pipeline for facemark detection is as follows:
	/// - Load the trained model using Facemark::loadModel.
	/// - Perform the fitting on an image via Facemark::fit.
	pub trait Facemark: core::AlgorithmTrait + crate::face::FacemarkConst {
		fn as_raw_mut_Facemark(&mut self) -> *mut c_void;
	
		/// A function to load the trained model before the fitting process.
		/// ## Parameters
		/// * model: A string represent the filename of a trained model.
		/// 
		/// <B>Example of usage</B>
		/// ```C++
		/// facemark->loadModel("../data/lbf.model");
		/// ```
		/// 
		#[inline]
		fn load_model(&mut self, model: &str) -> Result<()> {
			extern_container_arg!(mut model);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_Facemark_loadModel_String(self.as_raw_mut_Facemark(), model.opencv_as_extern_mut(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Detect facial landmarks from an image.
		/// ## Parameters
		/// * image: Input image.
		/// * faces: Output of the function which represent region of interest of the detected faces.
		/// Each face is stored in cv::Rect container.
		/// * landmarks: The detected landmark points for each faces.
		/// 
		/// <B>Example of usage</B>
		/// ```C++
		/// Mat image = imread("image.jpg");
		/// std::vector<Rect> faces;
		/// std::vector<std::vector<Point2f> > landmarks;
		/// facemark->fit(image, faces, landmarks);
		/// ```
		/// 
		#[inline]
		fn fit(&mut self, image: &dyn core::ToInputArray, faces: &dyn core::ToInputArray, landmarks: &mut dyn core::ToOutputArray) -> Result<bool> {
			extern_container_arg!(image);
			extern_container_arg!(faces);
			extern_container_arg!(landmarks);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_Facemark_fit_const__InputArrayR_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_Facemark(), image.as_raw__InputArray(), faces.as_raw__InputArray(), landmarks.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::FacemarkAAM]
	pub trait FacemarkAAMConst: crate::face::FacemarkTrainConst {
		fn as_raw_FacemarkAAM(&self) -> *const c_void;
	
	}
	
	pub trait FacemarkAAM: crate::face::FacemarkAAMConst + crate::face::FacemarkTrain {
		fn as_raw_mut_FacemarkAAM(&mut self) -> *mut c_void;
	
		/// overload with additional Config structures
		#[inline]
		fn fit_config(&mut self, image: &dyn core::ToInputArray, roi: &dyn core::ToInputArray, _landmarks: &mut dyn core::ToOutputArray, runtime_params: &core::Vector<crate::face::FacemarkAAM_Config>) -> Result<bool> {
			extern_container_arg!(image);
			extern_container_arg!(roi);
			extern_container_arg!(_landmarks);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_fitConfig_const__InputArrayR_const__InputArrayR_const__OutputArrayR_const_vectorLConfigGR(self.as_raw_mut_FacemarkAAM(), image.as_raw__InputArray(), roi.as_raw__InputArray(), _landmarks.as_raw__OutputArray(), runtime_params.as_raw_VectorOfFacemarkAAM_Config(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	impl dyn FacemarkAAM + '_ {
		/// initializer
		/// 
		/// ## C++ default parameters
		/// * parameters: FacemarkAAM::Params()
		#[inline]
		pub fn create(parameters: &crate::face::FacemarkAAM_Params) -> Result<core::Ptr<dyn crate::face::FacemarkAAM>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_create_const_ParamsR(parameters.as_raw_FacemarkAAM_Params(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::FacemarkAAM>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::FacemarkAAM_Config]
	pub trait FacemarkAAM_ConfigTraitConst {
		fn as_raw_FacemarkAAM_Config(&self) -> *const c_void;
	
		#[inline]
		fn r(&self) -> core::Mat {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Config_getPropR_const(self.as_raw_FacemarkAAM_Config()) };
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn t(&self) -> core::Point2f {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_Config_getPropT_const(self.as_raw_FacemarkAAM_Config(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			ret
		}
		
		#[inline]
		fn scale(&self) -> f32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Config_getPropScale_const(self.as_raw_FacemarkAAM_Config()) };
			ret
		}
		
		#[inline]
		fn model_scale_idx(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Config_getPropModel_scale_idx_const(self.as_raw_FacemarkAAM_Config()) };
			ret
		}
		
	}
	
	/// Mutable methods for [crate::face::FacemarkAAM_Config]
	pub trait FacemarkAAM_ConfigTrait: crate::face::FacemarkAAM_ConfigTraitConst {
		fn as_raw_mut_FacemarkAAM_Config(&mut self) -> *mut c_void;
	
		#[inline]
		fn set_r(&mut self, mut val: core::Mat) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Config_setPropR_Mat(self.as_raw_mut_FacemarkAAM_Config(), val.as_raw_mut_Mat()) };
			ret
		}
		
		#[inline]
		fn set_t(&mut self, val: core::Point2f) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Config_setPropT_Point2f(self.as_raw_mut_FacemarkAAM_Config(), val.opencv_as_extern()) };
			ret
		}
		
		#[inline]
		fn set_scale(&mut self, val: f32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Config_setPropScale_float(self.as_raw_mut_FacemarkAAM_Config(), val) };
			ret
		}
		
		#[inline]
		fn set_model_scale_idx(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Config_setPropModel_scale_idx_int(self.as_raw_mut_FacemarkAAM_Config(), val) };
			ret
		}
		
	}
	
	/// \brief Optional parameter for fitting process.
	pub struct FacemarkAAM_Config {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { FacemarkAAM_Config }
	
	impl Drop for FacemarkAAM_Config {
		fn drop(&mut self) {
			extern "C" { fn cv_FacemarkAAM_Config_delete(instance: *mut c_void); }
			unsafe { cv_FacemarkAAM_Config_delete(self.as_raw_mut_FacemarkAAM_Config()) };
		}
	}
	
	unsafe impl Send for FacemarkAAM_Config {}
	
	impl crate::face::FacemarkAAM_ConfigTraitConst for FacemarkAAM_Config {
		#[inline] fn as_raw_FacemarkAAM_Config(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::FacemarkAAM_ConfigTrait for FacemarkAAM_Config {
		#[inline] fn as_raw_mut_FacemarkAAM_Config(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl FacemarkAAM_Config {
		/// ## C++ default parameters
		/// * rot: Mat::eye(2,2,CV_32F)
		/// * trans: Point2f(0.0f,0.0f)
		/// * scaling: 1.0f
		/// * scale_id: 0
		#[inline]
		pub fn new(mut rot: core::Mat, trans: core::Point2f, scaling: f32, scale_id: i32) -> Result<crate::face::FacemarkAAM_Config> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_Config_Config_Mat_Point2f_float_int(rot.as_raw_mut_Mat(), trans.opencv_as_extern(), scaling, scale_id, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::face::FacemarkAAM_Config::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::FacemarkAAM_Data]
	pub trait FacemarkAAM_DataTraitConst {
		fn as_raw_FacemarkAAM_Data(&self) -> *const c_void;
	
		#[inline]
		fn s0(&self) -> core::Vector<core::Point2f> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Data_getPropS0_const(self.as_raw_FacemarkAAM_Data()) };
			let ret = unsafe { core::Vector::<core::Point2f>::opencv_from_extern(ret) };
			ret
		}
		
	}
	
	/// Mutable methods for [crate::face::FacemarkAAM_Data]
	pub trait FacemarkAAM_DataTrait: crate::face::FacemarkAAM_DataTraitConst {
		fn as_raw_mut_FacemarkAAM_Data(&mut self) -> *mut c_void;
	
		#[inline]
		fn set_s0(&mut self, mut val: core::Vector<core::Point2f>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Data_setPropS0_vectorLPoint2fG(self.as_raw_mut_FacemarkAAM_Data(), val.as_raw_mut_VectorOfPoint2f()) };
			ret
		}
		
	}
	
	/// \brief Data container for the facemark::getData function
	pub struct FacemarkAAM_Data {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { FacemarkAAM_Data }
	
	impl Drop for FacemarkAAM_Data {
		fn drop(&mut self) {
			extern "C" { fn cv_FacemarkAAM_Data_delete(instance: *mut c_void); }
			unsafe { cv_FacemarkAAM_Data_delete(self.as_raw_mut_FacemarkAAM_Data()) };
		}
	}
	
	unsafe impl Send for FacemarkAAM_Data {}
	
	impl crate::face::FacemarkAAM_DataTraitConst for FacemarkAAM_Data {
		#[inline] fn as_raw_FacemarkAAM_Data(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::FacemarkAAM_DataTrait for FacemarkAAM_Data {
		#[inline] fn as_raw_mut_FacemarkAAM_Data(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl FacemarkAAM_Data {
	}
	
	/// Constant methods for [crate::face::FacemarkAAM_Model]
	pub trait FacemarkAAM_ModelTraitConst {
		fn as_raw_FacemarkAAM_Model(&self) -> *const c_void;
	
		#[inline]
		fn scales(&self) -> core::Vector<f32> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_getPropScales_const(self.as_raw_FacemarkAAM_Model()) };
			let ret = unsafe { core::Vector::<f32>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn triangles(&self) -> core::Vector<core::Vec3i> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_getPropTriangles_const(self.as_raw_FacemarkAAM_Model()) };
			let ret = unsafe { core::Vector::<core::Vec3i>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn textures(&self) -> core::Vector<crate::face::FacemarkAAM_Model_Texture> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_getPropTextures_const(self.as_raw_FacemarkAAM_Model()) };
			let ret = unsafe { core::Vector::<crate::face::FacemarkAAM_Model_Texture>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn s0(&self) -> core::Vector<core::Point2f> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_getPropS0_const(self.as_raw_FacemarkAAM_Model()) };
			let ret = unsafe { core::Vector::<core::Point2f>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn s(&self) -> core::Mat {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_getPropS_const(self.as_raw_FacemarkAAM_Model()) };
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn q(&self) -> core::Mat {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_getPropQ_const(self.as_raw_FacemarkAAM_Model()) };
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			ret
		}
		
	}
	
	/// Mutable methods for [crate::face::FacemarkAAM_Model]
	pub trait FacemarkAAM_ModelTrait: crate::face::FacemarkAAM_ModelTraitConst {
		fn as_raw_mut_FacemarkAAM_Model(&mut self) -> *mut c_void;
	
		#[inline]
		fn set_scales(&mut self, mut val: core::Vector<f32>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_setPropScales_vectorLfloatG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_mut_VectorOff32()) };
			ret
		}
		
		#[inline]
		fn set_triangles(&mut self, mut val: core::Vector<core::Vec3i>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_setPropTriangles_vectorLVec3iG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_mut_VectorOfVec3i()) };
			ret
		}
		
		#[inline]
		fn set_textures(&mut self, mut val: core::Vector<crate::face::FacemarkAAM_Model_Texture>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_setPropTextures_vectorLTextureG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_mut_VectorOfFacemarkAAM_Model_Texture()) };
			ret
		}
		
		#[inline]
		fn set_s0(&mut self, mut val: core::Vector<core::Point2f>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_setPropS0_vectorLPoint2fG(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_mut_VectorOfPoint2f()) };
			ret
		}
		
		#[inline]
		fn set_s(&mut self, mut val: core::Mat) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_setPropS_Mat(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_mut_Mat()) };
			ret
		}
		
		#[inline]
		fn set_q(&mut self, mut val: core::Mat) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_setPropQ_Mat(self.as_raw_mut_FacemarkAAM_Model(), val.as_raw_mut_Mat()) };
			ret
		}
		
	}
	
	/// \brief The model of AAM Algorithm
	pub struct FacemarkAAM_Model {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { FacemarkAAM_Model }
	
	impl Drop for FacemarkAAM_Model {
		fn drop(&mut self) {
			extern "C" { fn cv_FacemarkAAM_Model_delete(instance: *mut c_void); }
			unsafe { cv_FacemarkAAM_Model_delete(self.as_raw_mut_FacemarkAAM_Model()) };
		}
	}
	
	unsafe impl Send for FacemarkAAM_Model {}
	
	impl crate::face::FacemarkAAM_ModelTraitConst for FacemarkAAM_Model {
		#[inline] fn as_raw_FacemarkAAM_Model(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::FacemarkAAM_ModelTrait for FacemarkAAM_Model {
		#[inline] fn as_raw_mut_FacemarkAAM_Model(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl FacemarkAAM_Model {
	}
	
	/// Constant methods for [crate::face::FacemarkAAM_Model_Texture]
	pub trait FacemarkAAM_Model_TextureTraitConst {
		fn as_raw_FacemarkAAM_Model_Texture(&self) -> *const c_void;
	
		/// unused delete
		#[inline]
		fn max_m(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropMax_m_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			ret
		}
		
		#[inline]
		fn resolution(&self) -> core::Rect {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropResolution_const(self.as_raw_FacemarkAAM_Model_Texture(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			ret
		}
		
		#[inline]
		fn a(&self) -> core::Mat {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropA_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn a0(&self) -> core::Mat {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropA0_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn aa(&self) -> core::Mat {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropAA_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn aa0(&self) -> core::Mat {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropAA0_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn texture_idx(&self) -> core::Vector<core::Vector<core::Point>> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropTextureIdx_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Vector::<core::Vector<core::Point>>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn base_shape(&self) -> core::Vector<core::Point2f> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropBase_shape_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Vector::<core::Point2f>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn ind1(&self) -> core::Vector<i32> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropInd1_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Vector::<i32>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn ind2(&self) -> core::Vector<i32> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_getPropInd2_const(self.as_raw_FacemarkAAM_Model_Texture()) };
			let ret = unsafe { core::Vector::<i32>::opencv_from_extern(ret) };
			ret
		}
		
	}
	
	/// Mutable methods for [crate::face::FacemarkAAM_Model_Texture]
	pub trait FacemarkAAM_Model_TextureTrait: crate::face::FacemarkAAM_Model_TextureTraitConst {
		fn as_raw_mut_FacemarkAAM_Model_Texture(&mut self) -> *mut c_void;
	
		/// unused delete
		#[inline]
		fn set_max_m(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropMax_m_int(self.as_raw_mut_FacemarkAAM_Model_Texture(), val) };
			ret
		}
		
		#[inline]
		fn set_resolution(&mut self, val: core::Rect) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropResolution_Rect(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.opencv_as_extern()) };
			ret
		}
		
		#[inline]
		fn set_a(&mut self, mut val: core::Mat) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropA_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_Mat()) };
			ret
		}
		
		#[inline]
		fn set_a0(&mut self, mut val: core::Mat) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropA0_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_Mat()) };
			ret
		}
		
		#[inline]
		fn set_aa(&mut self, mut val: core::Mat) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropAA_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_Mat()) };
			ret
		}
		
		#[inline]
		fn set_aa0(&mut self, mut val: core::Mat) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropAA0_Mat(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_Mat()) };
			ret
		}
		
		#[inline]
		fn set_texture_idx(&mut self, mut val: core::Vector<core::Vector<core::Point>>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropTextureIdx_vectorLvectorLPointGG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_VectorOfVectorOfPoint()) };
			ret
		}
		
		#[inline]
		fn set_base_shape(&mut self, mut val: core::Vector<core::Point2f>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropBase_shape_vectorLPoint2fG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_VectorOfPoint2f()) };
			ret
		}
		
		#[inline]
		fn set_ind1(&mut self, mut val: core::Vector<i32>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropInd1_vectorLintG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_VectorOfi32()) };
			ret
		}
		
		#[inline]
		fn set_ind2(&mut self, mut val: core::Vector<i32>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Model_Texture_setPropInd2_vectorLintG(self.as_raw_mut_FacemarkAAM_Model_Texture(), val.as_raw_mut_VectorOfi32()) };
			ret
		}
		
	}
	
	pub struct FacemarkAAM_Model_Texture {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { FacemarkAAM_Model_Texture }
	
	impl Drop for FacemarkAAM_Model_Texture {
		fn drop(&mut self) {
			extern "C" { fn cv_FacemarkAAM_Model_Texture_delete(instance: *mut c_void); }
			unsafe { cv_FacemarkAAM_Model_Texture_delete(self.as_raw_mut_FacemarkAAM_Model_Texture()) };
		}
	}
	
	unsafe impl Send for FacemarkAAM_Model_Texture {}
	
	impl crate::face::FacemarkAAM_Model_TextureTraitConst for FacemarkAAM_Model_Texture {
		#[inline] fn as_raw_FacemarkAAM_Model_Texture(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::FacemarkAAM_Model_TextureTrait for FacemarkAAM_Model_Texture {
		#[inline] fn as_raw_mut_FacemarkAAM_Model_Texture(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl FacemarkAAM_Model_Texture {
	}
	
	/// Constant methods for [crate::face::FacemarkAAM_Params]
	pub trait FacemarkAAM_ParamsTraitConst {
		fn as_raw_FacemarkAAM_Params(&self) -> *const c_void;
	
		#[inline]
		fn model_filename(&self) -> String {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropModel_filename_const(self.as_raw_FacemarkAAM_Params()) };
			let ret = unsafe { String::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn m(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropM_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn n(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropN_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn n_iter(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropN_iter_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn verbose(&self) -> bool {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropVerbose_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn save_model(&self) -> bool {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropSave_model_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn max_m(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropMax_m_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn max_n(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropMax_n_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn texture_max_m(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropTexture_max_m_const(self.as_raw_FacemarkAAM_Params()) };
			ret
		}
		
		#[inline]
		fn scales(&self) -> core::Vector<f32> {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_getPropScales_const(self.as_raw_FacemarkAAM_Params()) };
			let ret = unsafe { core::Vector::<f32>::opencv_from_extern(ret) };
			ret
		}
		
		/// \brief Read parameters from file, currently unused
		#[inline]
		fn write(&self, unnamed: &mut core::FileStorage) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_Params_write_const_FileStorageR(self.as_raw_FacemarkAAM_Params(), unnamed.as_raw_mut_FileStorage(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Mutable methods for [crate::face::FacemarkAAM_Params]
	pub trait FacemarkAAM_ParamsTrait: crate::face::FacemarkAAM_ParamsTraitConst {
		fn as_raw_mut_FacemarkAAM_Params(&mut self) -> *mut c_void;
	
		#[inline]
		fn set_model_filename(&mut self, val: &str) {
			extern_container_arg!(nofail mut val);
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropModel_filename_string(self.as_raw_mut_FacemarkAAM_Params(), val.opencv_as_extern_mut()) };
			ret
		}
		
		#[inline]
		fn set_m(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropM_int(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_n(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropN_int(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_n_iter(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropN_iter_int(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_verbose(&mut self, val: bool) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropVerbose_bool(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_save_model(&mut self, val: bool) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropSave_model_bool(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_max_m(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropMax_m_int(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_max_n(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropMax_n_int(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_texture_max_m(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropTexture_max_m_int(self.as_raw_mut_FacemarkAAM_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_scales(&mut self, mut val: core::Vector<f32>) {
			let ret = unsafe { sys::cv_face_FacemarkAAM_Params_setPropScales_vectorLfloatG(self.as_raw_mut_FacemarkAAM_Params(), val.as_raw_mut_VectorOff32()) };
			ret
		}
		
		/// \brief Read parameters from file, currently unused
		#[inline]
		fn read(&mut self, unnamed: &core::FileNode) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_Params_read_const_FileNodeR(self.as_raw_mut_FacemarkAAM_Params(), unnamed.as_raw_FileNode(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	pub struct FacemarkAAM_Params {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { FacemarkAAM_Params }
	
	impl Drop for FacemarkAAM_Params {
		fn drop(&mut self) {
			extern "C" { fn cv_FacemarkAAM_Params_delete(instance: *mut c_void); }
			unsafe { cv_FacemarkAAM_Params_delete(self.as_raw_mut_FacemarkAAM_Params()) };
		}
	}
	
	unsafe impl Send for FacemarkAAM_Params {}
	
	impl crate::face::FacemarkAAM_ParamsTraitConst for FacemarkAAM_Params {
		#[inline] fn as_raw_FacemarkAAM_Params(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::FacemarkAAM_ParamsTrait for FacemarkAAM_Params {
		#[inline] fn as_raw_mut_FacemarkAAM_Params(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl FacemarkAAM_Params {
		/// \brief Constructor
		#[inline]
		pub fn default() -> Result<crate::face::FacemarkAAM_Params> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkAAM_Params_Params(ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::face::FacemarkAAM_Params::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::FacemarkKazemi]
	pub trait FacemarkKazemiConst: crate::face::FacemarkConst {
		fn as_raw_FacemarkKazemi(&self) -> *const c_void;
	
	}
	
	pub trait FacemarkKazemi: crate::face::Facemark + crate::face::FacemarkKazemiConst {
		fn as_raw_mut_FacemarkKazemi(&mut self) -> *mut c_void;
	
		/// This function is used to train the model using gradient boosting to get a cascade of regressors
		/// which can then be used to predict shape.
		/// ## Parameters
		/// * images: A vector of type cv::Mat which stores the images which are used in training samples.
		/// * landmarks: A vector of vectors of type cv::Point2f which stores the landmarks detected in a particular image.
		/// * scale: A size of type cv::Size to which all images and landmarks have to be scaled to.
		/// * configfile: A variable of type std::string which stores the name of the file storing parameters for training the model.
		/// * modelFilename: A variable of type std::string which stores the name of the trained model file that has to be saved.
		/// ## Returns
		/// A boolean value. The function returns true if the model is trained properly or false if it is not trained.
		/// 
		/// ## C++ default parameters
		/// * model_filename: "face_landmarks.dat"
		#[inline]
		fn training(&mut self, images: &mut core::Vector<core::Mat>, landmarks: &mut core::Vector<core::Vector<core::Point2f>>, configfile: &str, scale: core::Size, model_filename: &str) -> Result<bool> {
			extern_container_arg!(mut configfile);
			extern_container_arg!(mut model_filename);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkKazemi_training_vectorLMatGR_vectorLvectorLPoint2fGGR_string_Size_string(self.as_raw_mut_FacemarkKazemi(), images.as_raw_mut_VectorOfMat(), landmarks.as_raw_mut_VectorOfVectorOfPoint2f(), configfile.opencv_as_extern_mut(), scale.opencv_as_extern(), model_filename.opencv_as_extern_mut(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// set the custom face detector
		#[inline]
		fn set_face_detector(&mut self, f: Option<Box<dyn FnMut(*const c_void, *const c_void) -> bool + Send + Sync + 'static>>) -> Result<bool> {
			callback_arg!(f_trampoline(unnamed: *const c_void, unnamed_1: *const c_void, unnamed_2: *mut c_void) -> bool => unnamed_2 in callbacks => f(unnamed: *const c_void, unnamed_1: *const c_void) -> bool);
			userdata_arg!(user_data in callbacks => f);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkKazemi_setFaceDetector_bool__X__const_cv__InputArrayR__const_cv__OutputArrayR__voidX__voidX(self.as_raw_mut_FacemarkKazemi(), f_trampoline, user_data, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// get faces using the custom detector
		#[inline]
		fn get_faces(&mut self, image: &dyn core::ToInputArray, faces: &mut dyn core::ToOutputArray) -> Result<bool> {
			extern_container_arg!(image);
			extern_container_arg!(faces);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkKazemi_getFaces_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_FacemarkKazemi(), image.as_raw__InputArray(), faces.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	impl dyn FacemarkKazemi + '_ {
		/// ## C++ default parameters
		/// * parameters: FacemarkKazemi::Params()
		#[inline]
		pub fn create(parameters: &crate::face::FacemarkKazemi_Params) -> Result<core::Ptr<dyn crate::face::FacemarkKazemi>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkKazemi_create_const_ParamsR(parameters.as_raw_FacemarkKazemi_Params(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::FacemarkKazemi>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::FacemarkKazemi_Params]
	pub trait FacemarkKazemi_ParamsTraitConst {
		fn as_raw_FacemarkKazemi_Params(&self) -> *const c_void;
	
		/// cascade_depth This stores the deapth of cascade used for training.
		#[inline]
		fn cascade_depth(&self) -> u32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropCascade_depth_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// tree_depth This stores the max height of the regression tree built.
		#[inline]
		fn tree_depth(&self) -> u32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropTree_depth_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// num_trees_per_cascade_level This stores number of trees fit per cascade level.
		#[inline]
		fn num_trees_per_cascade_level(&self) -> u32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropNum_trees_per_cascade_level_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// learning_rate stores the learning rate in gradient boosting, also referred as shrinkage.
		#[inline]
		fn learning_rate(&self) -> f32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropLearning_rate_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// oversampling_amount stores number of initialisations used to create training samples.
		#[inline]
		fn oversampling_amount(&self) -> u32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropOversampling_amount_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// num_test_coordinates stores number of test coordinates.
		#[inline]
		fn num_test_coordinates(&self) -> u32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropNum_test_coordinates_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// lambda stores a value to calculate probability of closeness of two coordinates.
		#[inline]
		fn lambda(&self) -> f32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropLambda_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// num_test_splits stores number of random test splits generated.
		#[inline]
		fn num_test_splits(&self) -> u32 {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropNum_test_splits_const(self.as_raw_FacemarkKazemi_Params()) };
			ret
		}
		
		/// configfile stores the name of the file containing the values of training parameters
		#[inline]
		fn configfile(&self) -> String {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_getPropConfigfile_const(self.as_raw_FacemarkKazemi_Params()) };
			let ret = unsafe { String::opencv_from_extern(ret) };
			ret
		}
		
	}
	
	/// Mutable methods for [crate::face::FacemarkKazemi_Params]
	pub trait FacemarkKazemi_ParamsTrait: crate::face::FacemarkKazemi_ParamsTraitConst {
		fn as_raw_mut_FacemarkKazemi_Params(&mut self) -> *mut c_void;
	
		/// cascade_depth This stores the deapth of cascade used for training.
		#[inline]
		fn set_cascade_depth(&mut self, val: u32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropCascade_depth_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// tree_depth This stores the max height of the regression tree built.
		#[inline]
		fn set_tree_depth(&mut self, val: u32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropTree_depth_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// num_trees_per_cascade_level This stores number of trees fit per cascade level.
		#[inline]
		fn set_num_trees_per_cascade_level(&mut self, val: u32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropNum_trees_per_cascade_level_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// learning_rate stores the learning rate in gradient boosting, also referred as shrinkage.
		#[inline]
		fn set_learning_rate(&mut self, val: f32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropLearning_rate_float(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// oversampling_amount stores number of initialisations used to create training samples.
		#[inline]
		fn set_oversampling_amount(&mut self, val: u32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropOversampling_amount_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// num_test_coordinates stores number of test coordinates.
		#[inline]
		fn set_num_test_coordinates(&mut self, val: u32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropNum_test_coordinates_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// lambda stores a value to calculate probability of closeness of two coordinates.
		#[inline]
		fn set_lambda(&mut self, val: f32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropLambda_float(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// num_test_splits stores number of random test splits generated.
		#[inline]
		fn set_num_test_splits(&mut self, val: u32) {
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropNum_test_splits_unsigned_long(self.as_raw_mut_FacemarkKazemi_Params(), val) };
			ret
		}
		
		/// configfile stores the name of the file containing the values of training parameters
		#[inline]
		fn set_configfile(&mut self, val: &str) {
			extern_container_arg!(nofail mut val);
			let ret = unsafe { sys::cv_face_FacemarkKazemi_Params_setPropConfigfile_String(self.as_raw_mut_FacemarkKazemi_Params(), val.opencv_as_extern_mut()) };
			ret
		}
		
	}
	
	pub struct FacemarkKazemi_Params {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { FacemarkKazemi_Params }
	
	impl Drop for FacemarkKazemi_Params {
		fn drop(&mut self) {
			extern "C" { fn cv_FacemarkKazemi_Params_delete(instance: *mut c_void); }
			unsafe { cv_FacemarkKazemi_Params_delete(self.as_raw_mut_FacemarkKazemi_Params()) };
		}
	}
	
	unsafe impl Send for FacemarkKazemi_Params {}
	
	impl crate::face::FacemarkKazemi_ParamsTraitConst for FacemarkKazemi_Params {
		#[inline] fn as_raw_FacemarkKazemi_Params(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::FacemarkKazemi_ParamsTrait for FacemarkKazemi_Params {
		#[inline] fn as_raw_mut_FacemarkKazemi_Params(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl FacemarkKazemi_Params {
		/// \brief Constructor
		#[inline]
		pub fn default() -> Result<crate::face::FacemarkKazemi_Params> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkKazemi_Params_Params(ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::face::FacemarkKazemi_Params::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::FacemarkLBF]
	pub trait FacemarkLBFConst: crate::face::FacemarkTrainConst {
		fn as_raw_FacemarkLBF(&self) -> *const c_void;
	
	}
	
	pub trait FacemarkLBF: crate::face::FacemarkLBFConst + crate::face::FacemarkTrain {
		fn as_raw_mut_FacemarkLBF(&mut self) -> *mut c_void;
	
	}
	
	impl dyn FacemarkLBF + '_ {
		/// ## C++ default parameters
		/// * parameters: FacemarkLBF::Params()
		#[inline]
		pub fn create(parameters: &crate::face::FacemarkLBF_Params) -> Result<core::Ptr<dyn crate::face::FacemarkLBF>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkLBF_create_const_ParamsR(parameters.as_raw_FacemarkLBF_Params(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::FacemarkLBF>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::FacemarkLBF_Params]
	pub trait FacemarkLBF_ParamsTraitConst {
		fn as_raw_FacemarkLBF_Params(&self) -> *const c_void;
	
		#[inline]
		fn shape_offset(&self) -> f64 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropShape_offset_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn cascade_face(&self) -> String {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropCascade_face_const(self.as_raw_FacemarkLBF_Params()) };
			let ret = unsafe { String::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn verbose(&self) -> bool {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropVerbose_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn n_landmarks(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropN_landmarks_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn init_shape_n(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropInitShape_n_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn stages_n(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropStages_n_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn tree_n(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropTree_n_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn tree_depth(&self) -> i32 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropTree_depth_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn bagging_overlap(&self) -> f64 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropBagging_overlap_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn model_filename(&self) -> String {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropModel_filename_const(self.as_raw_FacemarkLBF_Params()) };
			let ret = unsafe { String::opencv_from_extern(ret) };
			ret
		}
		
		/// flag to save the trained model or not
		#[inline]
		fn save_model(&self) -> bool {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropSave_model_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		/// seed for shuffling the training data
		#[inline]
		fn seed(&self) -> u32 {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropSeed_const(self.as_raw_FacemarkLBF_Params()) };
			ret
		}
		
		#[inline]
		fn feats_m(&self) -> core::Vector<i32> {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropFeats_m_const(self.as_raw_FacemarkLBF_Params()) };
			let ret = unsafe { core::Vector::<i32>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn radius_m(&self) -> core::Vector<f64> {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_getPropRadius_m_const(self.as_raw_FacemarkLBF_Params()) };
			let ret = unsafe { core::Vector::<f64>::opencv_from_extern(ret) };
			ret
		}
		
		#[inline]
		fn detect_roi(&self) -> core::Rect {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkLBF_Params_getPropDetectROI_const(self.as_raw_FacemarkLBF_Params(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			ret
		}
		
		#[inline]
		fn write(&self, unnamed: &mut core::FileStorage) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkLBF_Params_write_const_FileStorageR(self.as_raw_FacemarkLBF_Params(), unnamed.as_raw_mut_FileStorage(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Mutable methods for [crate::face::FacemarkLBF_Params]
	pub trait FacemarkLBF_ParamsTrait: crate::face::FacemarkLBF_ParamsTraitConst {
		fn as_raw_mut_FacemarkLBF_Params(&mut self) -> *mut c_void;
	
		#[inline]
		fn set_shape_offset(&mut self, val: f64) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropShape_offset_double(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_cascade_face(&mut self, val: &str) {
			extern_container_arg!(nofail mut val);
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropCascade_face_String(self.as_raw_mut_FacemarkLBF_Params(), val.opencv_as_extern_mut()) };
			ret
		}
		
		#[inline]
		fn set_verbose(&mut self, val: bool) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropVerbose_bool(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_n_landmarks(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropN_landmarks_int(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_init_shape_n(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropInitShape_n_int(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_stages_n(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropStages_n_int(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_tree_n(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropTree_n_int(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_tree_depth(&mut self, val: i32) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropTree_depth_int(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_bagging_overlap(&mut self, val: f64) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropBagging_overlap_double(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_model_filename(&mut self, val: &str) {
			extern_container_arg!(nofail mut val);
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropModel_filename_string(self.as_raw_mut_FacemarkLBF_Params(), val.opencv_as_extern_mut()) };
			ret
		}
		
		/// flag to save the trained model or not
		#[inline]
		fn set_save_model(&mut self, val: bool) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropSave_model_bool(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		/// seed for shuffling the training data
		#[inline]
		fn set_seed(&mut self, val: u32) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropSeed_unsigned_int(self.as_raw_mut_FacemarkLBF_Params(), val) };
			ret
		}
		
		#[inline]
		fn set_feats_m(&mut self, mut val: core::Vector<i32>) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropFeats_m_vectorLintG(self.as_raw_mut_FacemarkLBF_Params(), val.as_raw_mut_VectorOfi32()) };
			ret
		}
		
		#[inline]
		fn set_radius_m(&mut self, mut val: core::Vector<f64>) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropRadius_m_vectorLdoubleG(self.as_raw_mut_FacemarkLBF_Params(), val.as_raw_mut_VectorOff64()) };
			ret
		}
		
		#[inline]
		fn set_detect_roi(&mut self, val: core::Rect) {
			let ret = unsafe { sys::cv_face_FacemarkLBF_Params_setPropDetectROI_Rect(self.as_raw_mut_FacemarkLBF_Params(), val.opencv_as_extern()) };
			ret
		}
		
		#[inline]
		fn read(&mut self, unnamed: &core::FileNode) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkLBF_Params_read_const_FileNodeR(self.as_raw_mut_FacemarkLBF_Params(), unnamed.as_raw_FileNode(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	pub struct FacemarkLBF_Params {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { FacemarkLBF_Params }
	
	impl Drop for FacemarkLBF_Params {
		fn drop(&mut self) {
			extern "C" { fn cv_FacemarkLBF_Params_delete(instance: *mut c_void); }
			unsafe { cv_FacemarkLBF_Params_delete(self.as_raw_mut_FacemarkLBF_Params()) };
		}
	}
	
	unsafe impl Send for FacemarkLBF_Params {}
	
	impl crate::face::FacemarkLBF_ParamsTraitConst for FacemarkLBF_Params {
		#[inline] fn as_raw_FacemarkLBF_Params(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::FacemarkLBF_ParamsTrait for FacemarkLBF_Params {
		#[inline] fn as_raw_mut_FacemarkLBF_Params(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl FacemarkLBF_Params {
		/// \brief Constructor
		#[inline]
		pub fn default() -> Result<crate::face::FacemarkLBF_Params> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkLBF_Params_Params(ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::face::FacemarkLBF_Params::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::FacemarkTrain]
	pub trait FacemarkTrainConst: crate::face::FacemarkConst {
		fn as_raw_FacemarkTrain(&self) -> *const c_void;
	
	}
	
	/// Abstract base class for trainable facemark models
	/// 
	/// To utilize this API in your program, please take a look at the [tutorial_table_of_content_facemark]
	/// ### Description
	/// 
	/// The AAM and LBF facemark models in OpenCV are derived from the abstract base class FacemarkTrain, which
	/// provides a unified access to those facemark algorithms in OpenCV.
	/// 
	/// Here is an example on how to declare facemark algorithm:
	/// ```C++
	/// // Using Facemark in your code:
	/// Ptr<Facemark> facemark = FacemarkLBF::create();
	/// ```
	/// 
	/// 
	/// 
	/// The typical pipeline for facemark detection is listed as follows:
	/// - (Non-mandatory) Set a user defined face detection using FacemarkTrain::setFaceDetector.
	///   The facemark algorithms are designed to fit the facial points into a face.
	///   Therefore, the face information should be provided to the facemark algorithm.
	///   Some algorithms might provides a default face recognition function.
	///   However, the users might prefer to use their own face detector to obtains the best possible detection result.
	/// - (Non-mandatory) Training the model for a specific algorithm using FacemarkTrain::training.
	///   In this case, the model should be automatically saved by the algorithm.
	///   If the user already have a trained model, then this part can be omitted.
	/// - Load the trained model using Facemark::loadModel.
	/// - Perform the fitting via the Facemark::fit.
	pub trait FacemarkTrain: crate::face::Facemark + crate::face::FacemarkTrainConst {
		fn as_raw_mut_FacemarkTrain(&mut self) -> *mut c_void;
	
		/// Add one training sample to the trainer.
		/// 
		/// ## Parameters
		/// * image: Input image.
		/// * landmarks: The ground-truth of facial landmarks points corresponds to the image.
		/// 
		/// <B>Example of usage</B>
		/// ```C++
		/// String imageFiles = "../data/images_train.txt";
		/// String ptsFiles = "../data/points_train.txt";
		/// std::vector<String> images_train;
		/// std::vector<String> landmarks_train;
		/// 
		/// // load the list of dataset: image paths and landmark file paths
		/// loadDatasetList(imageFiles,ptsFiles,images_train,landmarks_train);
		/// 
		/// Mat image;
		/// std::vector<Point2f> facial_points;
		/// for(size_t i=0;i<images_train.size();i++){
		///    image = imread(images_train[i].c_str());
		///    loadFacePoints(landmarks_train[i],facial_points);
		///    facemark->addTrainingSample(image, facial_points);
		/// }
		/// ```
		/// 
		/// 
		/// The contents in the training files should follows the standard format.
		/// Here are examples for the contents in these files.
		/// example of content in the images_train.txt
		/// ```C++
		/// /home/user/ibug/image_003_1.jpg
		/// /home/user/ibug/image_004_1.jpg
		/// /home/user/ibug/image_005_1.jpg
		/// /home/user/ibug/image_006.jpg
		/// ```
		/// 
		/// 
		/// example of content in the points_train.txt
		/// ```C++
		/// /home/user/ibug/image_003_1.pts
		/// /home/user/ibug/image_004_1.pts
		/// /home/user/ibug/image_005_1.pts
		/// /home/user/ibug/image_006.pts
		/// ```
		/// 
		#[inline]
		fn add_training_sample(&mut self, image: &dyn core::ToInputArray, landmarks: &dyn core::ToInputArray) -> Result<bool> {
			extern_container_arg!(image);
			extern_container_arg!(landmarks);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkTrain_addTrainingSample_const__InputArrayR_const__InputArrayR(self.as_raw_mut_FacemarkTrain(), image.as_raw__InputArray(), landmarks.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Trains a Facemark algorithm using the given dataset.
		/// Before the training process, training samples should be added to the trainer
		/// using face::addTrainingSample function.
		/// 
		/// ## Parameters
		/// * parameters: Optional extra parameters (algorithm dependent).
		/// 
		/// <B>Example of usage</B>
		/// ```C++
		/// FacemarkLBF::Params params;
		/// params.model_filename = "ibug68.model"; // filename to save the trained model
		/// Ptr<Facemark> facemark = FacemarkLBF::create(params);
		/// 
		/// // add training samples (see Facemark::addTrainingSample)
		/// 
		/// facemark->training();
		/// ```
		/// 
		/// 
		/// ## C++ default parameters
		/// * parameters: 0
		#[inline]
		unsafe fn training(&mut self, parameters: *mut c_void) -> Result<()> {
			return_send!(via ocvrs_return);
			{ sys::cv_face_FacemarkTrain_training_voidX(self.as_raw_mut_FacemarkTrain(), parameters, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Set a user defined face detector for the Facemark algorithm.
		/// ## Parameters
		/// * detector: The user defined face detector function
		/// * userData: Detector parameters
		/// 
		/// <B>Example of usage</B>
		/// ```C++
		/// MyDetectorParameters detectorParameters(...);
		/// facemark->setFaceDetector(myDetector, &detectorParameters);
		/// ```
		/// 
		/// 
		/// Example of a user defined face detector
		/// ```C++
		/// bool myDetector( InputArray image, OutputArray faces, void* userData)
		/// {
		///    MyDetectorParameters* params = (MyDetectorParameters*)userData;
		///    // -------- do something --------
		/// }
		/// ```
		/// 
		/// 
		/// TODO Lifetime of detector parameters is uncontrolled. Rework interface design to "Ptr<FaceDetector>".
		/// 
		/// ## C++ default parameters
		/// * user_data: 0
		#[inline]
		fn set_face_detector(&mut self, detector: crate::face::FN_FaceDetector) -> Result<bool> {
			callback_arg!(detector_trampoline(unnamed: *const c_void, unnamed_1: *const c_void, user_data: *mut c_void) -> bool => user_data in callbacks => detector(unnamed: *const c_void, unnamed_1: *const c_void) -> bool);
			userdata_arg!(user_data in callbacks => detector);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkTrain_setFaceDetector_FN_FaceDetector_voidX(self.as_raw_mut_FacemarkTrain(), detector_trampoline, user_data, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Detect faces from a given image using default or user defined face detector.
		/// Some Algorithm might not provide a default face detector.
		/// 
		/// ## Parameters
		/// * image: Input image.
		/// * faces: Output of the function which represent region of interest of the detected faces. Each face is stored in cv::Rect container.
		/// 
		/// <B>Example of usage</B>
		/// ```C++
		/// std::vector<cv::Rect> faces;
		/// facemark->getFaces(img, faces);
		/// for(int j=0;j<faces.size();j++){
		///    cv::rectangle(img, faces[j], cv::Scalar(255,0,255));
		/// }
		/// ```
		/// 
		#[inline]
		fn get_faces(&mut self, image: &dyn core::ToInputArray, faces: &mut dyn core::ToOutputArray) -> Result<bool> {
			extern_container_arg!(image);
			extern_container_arg!(faces);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FacemarkTrain_getFaces_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_FacemarkTrain(), image.as_raw__InputArray(), faces.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Get data from an algorithm
		/// 
		/// ## Parameters
		/// * items: The obtained data, algorithm dependent.
		/// 
		/// <B>Example of usage</B>
		/// ```C++
		/// Ptr<FacemarkAAM> facemark = FacemarkAAM::create();
		/// facemark->loadModel("AAM.yml");
		/// 
		/// FacemarkAAM::Data data;
		/// facemark->getData(&data);
		/// std::vector<Point2f> s0 = data.s0;
		/// 
		/// cout<<s0<<endl;
		/// ```
		/// 
		/// 
		/// ## C++ default parameters
		/// * items: 0
		#[inline]
		unsafe fn get_data(&mut self, items: *mut c_void) -> Result<bool> {
			return_send!(via ocvrs_return);
			{ sys::cv_face_FacemarkTrain_getData_voidX(self.as_raw_mut_FacemarkTrain(), items, ocvrs_return.as_mut_ptr()) };
			return_receive!(ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::FisherFaceRecognizer]
	pub trait FisherFaceRecognizerConst: crate::face::BasicFaceRecognizerConst {
		fn as_raw_FisherFaceRecognizer(&self) -> *const c_void;
	
	}
	
	pub trait FisherFaceRecognizer: crate::face::BasicFaceRecognizer + crate::face::FisherFaceRecognizerConst {
		fn as_raw_mut_FisherFaceRecognizer(&mut self) -> *mut c_void;
	
	}
	
	impl dyn FisherFaceRecognizer + '_ {
		/// ## Parameters
		/// * num_components: The number of components (read: Fisherfaces) kept for this Linear
		/// Discriminant Analysis with the Fisherfaces criterion. It's useful to keep all components, that
		/// means the number of your classes c (read: subjects, persons you want to recognize). If you leave
		/// this at the default (0) or set it to a value less-equal 0 or greater (c-1), it will be set to the
		/// correct number (c-1) automatically.
		/// * threshold: The threshold applied in the prediction. If the distance to the nearest neighbor
		/// is larger than the threshold, this method returns -1.
		/// 
		/// ### Notes:
		/// 
		/// *   Training and prediction must be done on grayscale images, use cvtColor to convert between the
		///    color spaces.
		/// *   **THE FISHERFACES METHOD MAKES THE ASSUMPTION, THAT THE TRAINING AND TEST IMAGES ARE OF EQUAL
		///    SIZE.** (caps-lock, because I got so many mails asking for this). You have to make sure your
		///    input data has the correct shape, else a meaningful exception is thrown. Use resize to resize
		///    the images.
		/// *   This model does not support updating.
		/// 
		/// ### Model internal data:
		/// 
		/// *   num_components see FisherFaceRecognizer::create.
		/// *   threshold see FisherFaceRecognizer::create.
		/// *   eigenvalues The eigenvalues for this Linear Discriminant Analysis (ordered descending).
		/// *   eigenvectors The eigenvectors for this Linear Discriminant Analysis (ordered by their
		///    eigenvalue).
		/// *   mean The sample mean calculated from the training data.
		/// *   projections The projections of the training data.
		/// *   labels The labels corresponding to the projections.
		/// 
		/// ## C++ default parameters
		/// * num_components: 0
		/// * threshold: DBL_MAX
		#[inline]
		pub fn create(num_components: i32, threshold: f64) -> Result<core::Ptr<dyn crate::face::FisherFaceRecognizer>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_FisherFaceRecognizer_create_int_double(num_components, threshold, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::FisherFaceRecognizer>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::LBPHFaceRecognizer]
	pub trait LBPHFaceRecognizerConst: crate::face::FaceRecognizerConst {
		fn as_raw_LBPHFaceRecognizer(&self) -> *const c_void;
	
		/// ## See also
		/// setGridX
		#[inline]
		fn get_grid_x(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_getGridX_const(self.as_raw_LBPHFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setGridY
		#[inline]
		fn get_grid_y(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_getGridY_const(self.as_raw_LBPHFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setRadius
		#[inline]
		fn get_radius(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_getRadius_const(self.as_raw_LBPHFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setNeighbors
		#[inline]
		fn get_neighbors(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_getNeighbors_const(self.as_raw_LBPHFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setThreshold
		#[inline]
		fn get_threshold(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_getThreshold_const(self.as_raw_LBPHFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_histograms(&self) -> Result<core::Vector<core::Mat>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_getHistograms_const(self.as_raw_LBPHFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Vector::<core::Mat>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		#[inline]
		fn get_labels(&self) -> Result<core::Mat> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_getLabels_const(self.as_raw_LBPHFaceRecognizer(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Mat::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	pub trait LBPHFaceRecognizer: crate::face::FaceRecognizer + crate::face::LBPHFaceRecognizerConst {
		fn as_raw_mut_LBPHFaceRecognizer(&mut self) -> *mut c_void;
	
		/// ## See also
		/// setGridX getGridX
		#[inline]
		fn set_grid_x(&mut self, val: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_setGridX_int(self.as_raw_mut_LBPHFaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setGridY getGridY
		#[inline]
		fn set_grid_y(&mut self, val: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_setGridY_int(self.as_raw_mut_LBPHFaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setRadius getRadius
		#[inline]
		fn set_radius(&mut self, val: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_setRadius_int(self.as_raw_mut_LBPHFaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setNeighbors getNeighbors
		#[inline]
		fn set_neighbors(&mut self, val: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_setNeighbors_int(self.as_raw_mut_LBPHFaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// ## See also
		/// setThreshold getThreshold
		#[inline]
		fn set_threshold(&mut self, val: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_setThreshold_double(self.as_raw_mut_LBPHFaceRecognizer(), val, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	impl dyn LBPHFaceRecognizer + '_ {
		/// ## Parameters
		/// * radius: The radius used for building the Circular Local Binary Pattern. The greater the
		/// radius, the smoother the image but more spatial information you can get.
		/// * neighbors: The number of sample points to build a Circular Local Binary Pattern from. An
		/// appropriate value is to use `8` sample points. Keep in mind: the more sample points you include,
		/// the higher the computational cost.
		/// * grid_x: The number of cells in the horizontal direction, 8 is a common value used in
		/// publications. The more cells, the finer the grid, the higher the dimensionality of the resulting
		/// feature vector.
		/// * grid_y: The number of cells in the vertical direction, 8 is a common value used in
		/// publications. The more cells, the finer the grid, the higher the dimensionality of the resulting
		/// feature vector.
		/// * threshold: The threshold applied in the prediction. If the distance to the nearest neighbor
		/// is larger than the threshold, this method returns -1.
		/// 
		/// ### Notes:
		/// 
		/// *   The Circular Local Binary Patterns (used in training and prediction) expect the data given as
		///    grayscale images, use cvtColor to convert between the color spaces.
		/// *   This model supports updating.
		/// 
		/// ### Model internal data:
		/// 
		/// *   radius see LBPHFaceRecognizer::create.
		/// *   neighbors see LBPHFaceRecognizer::create.
		/// *   grid_x see LLBPHFaceRecognizer::create.
		/// *   grid_y see LBPHFaceRecognizer::create.
		/// *   threshold see LBPHFaceRecognizer::create.
		/// *   histograms Local Binary Patterns Histograms calculated from the given training data (empty if
		///    none was given).
		/// *   labels Labels corresponding to the calculated Local Binary Patterns Histograms.
		/// 
		/// ## C++ default parameters
		/// * radius: 1
		/// * neighbors: 8
		/// * grid_x: 8
		/// * grid_y: 8
		/// * threshold: DBL_MAX
		#[inline]
		pub fn create(radius: i32, neighbors: i32, grid_x: i32, grid_y: i32, threshold: f64) -> Result<core::Ptr<dyn crate::face::LBPHFaceRecognizer>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_LBPHFaceRecognizer_create_int_int_int_int_double(radius, neighbors, grid_x, grid_y, threshold, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::LBPHFaceRecognizer>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::MACE]
	pub trait MACEConst: core::AlgorithmTraitConst {
		fn as_raw_MACE(&self) -> *const c_void;
	
		/// correlate query img and threshold to min class value
		/// ## Parameters
		/// * query: a Mat with query image
		#[inline]
		fn same(&self, query: &dyn core::ToInputArray) -> Result<bool> {
			extern_container_arg!(query);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_MACE_same_const_const__InputArrayR(self.as_raw_MACE(), query.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Minimum Average Correlation Energy Filter
	///    useful for authentication with (cancellable) biometrical features.
	///    (does not need many positives to train (10-50), and no negatives at all, also robust to noise/salting)
	/// 
	///    see also: [Savvides04](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Savvides04)
	/// 
	///    this implementation is largely based on: <https://code.google.com/archive/p/pam-face-authentication> (GSOC 2009)
	/// 
	///    use it like:
	///    ```C++
	/// 
	///    Ptr<face::MACE> mace = face::MACE::create(64);
	/// 
	///    vector<Mat> pos_images = ...
	///    mace->train(pos_images);
	/// 
	///    Mat query = ...
	///    bool same = mace->same(query);
	/// 
	///    ```
	/// 
	/// 
	///    you can also use two-factor authentication, with an additional passphrase:
	/// 
	///    ```C++
	///    String owners_passphrase = "ilikehotdogs";
	///    Ptr<face::MACE> mace = face::MACE::create(64);
	///    mace->salt(owners_passphrase);
	///    vector<Mat> pos_images = ...
	///    mace->train(pos_images);
	/// 
	///    // now, users have to give a valid passphrase, along with the image:
	///    Mat query = ...
	///    cout << "enter passphrase: ";
	///    string pass;
	///    getline(cin, pass);
	///    mace->salt(pass);
	///    bool same = mace->same(query);
	///    ```
	/// 
	/// 
	///    save/load your model:
	///    ```C++
	///    Ptr<face::MACE> mace = face::MACE::create(64);
	///    mace->train(pos_images);
	///    mace->save("my_mace.xml");
	/// 
	///    // later:
	///    Ptr<MACE> reloaded = MACE::load("my_mace.xml");
	///    reloaded->same(some_image);
	///    ```
	/// 
	pub trait MACE: core::AlgorithmTrait + crate::face::MACEConst {
		fn as_raw_mut_MACE(&mut self) -> *mut c_void;
	
		/// optionally encrypt images with random convolution
		/// ## Parameters
		/// * passphrase: a crc64 random seed will get generated from this
		#[inline]
		fn salt(&mut self, passphrase: &str) -> Result<()> {
			extern_container_arg!(passphrase);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_MACE_salt_const_StringR(self.as_raw_mut_MACE(), passphrase.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// train it on positive features
		///    compute the mace filter: `h = D(-1) * X * (X(+) * D(-1) * X)(-1) * C`
		///    also calculate a minimal threshold for this class, the smallest self-similarity from the train images
		/// ## Parameters
		/// * images: a vector<Mat> with the train images
		#[inline]
		fn train(&mut self, images: &dyn core::ToInputArray) -> Result<()> {
			extern_container_arg!(images);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_MACE_train_const__InputArrayR(self.as_raw_mut_MACE(), images.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	impl dyn MACE + '_ {
		/// constructor
		/// ## Parameters
		/// * filename: build a new MACE instance from a pre-serialized FileStorage
		/// * objname: (optional) top-level node in the FileStorage
		/// 
		/// ## C++ default parameters
		/// * objname: String()
		#[inline]
		pub fn load(filename: &str, objname: &str) -> Result<core::Ptr<dyn crate::face::MACE>> {
			extern_container_arg!(filename);
			extern_container_arg!(objname);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_MACE_load_const_StringR_const_StringR(filename.opencv_as_extern(), objname.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::MACE>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		/// constructor
		/// ## Parameters
		/// * IMGSIZE: images will get resized to this (should be an even number)
		/// 
		/// ## C++ default parameters
		/// * imgsize: 64
		#[inline]
		pub fn create(imgsize: i32) -> Result<core::Ptr<dyn crate::face::MACE>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_MACE_create_int(imgsize, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<dyn crate::face::MACE>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	/// Constant methods for [crate::face::PredictCollector]
	pub trait PredictCollectorConst {
		fn as_raw_PredictCollector(&self) -> *const c_void;
	
	}
	
	/// Abstract base class for all strategies of prediction result handling
	pub trait PredictCollector: crate::face::PredictCollectorConst {
		fn as_raw_mut_PredictCollector(&mut self) -> *mut c_void;
	
		/// Interface method called by face recognizer before results processing
		/// ## Parameters
		/// * size: total size of prediction evaluation that recognizer could perform
		#[inline]
		fn init(&mut self, size: size_t) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_PredictCollector_init_size_t(self.as_raw_mut_PredictCollector(), size, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Interface method called by face recognizer for each result
		/// ## Parameters
		/// * label: current prediction label
		/// * dist: current prediction distance (confidence)
		#[inline]
		fn collect(&mut self, label: i32, dist: f64) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_PredictCollector_collect_int_double(self.as_raw_mut_PredictCollector(), label, dist, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Constant methods for [crate::face::StandardCollector]
	pub trait StandardCollectorTraitConst: crate::face::PredictCollectorConst {
		fn as_raw_StandardCollector(&self) -> *const c_void;
	
		/// Returns label with minimal distance
		#[inline]
		fn get_min_label(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_getMinLabel_const(self.as_raw_StandardCollector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Returns minimal distance value
		#[inline]
		fn get_min_dist(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_getMinDist_const(self.as_raw_StandardCollector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Return results as vector
		/// ## Parameters
		/// * sorted: If set, results will be sorted by distance
		/// Each values is a pair of label and distance.
		/// 
		/// ## C++ default parameters
		/// * sorted: false
		#[inline]
		fn get_results(&self, sorted: bool) -> Result<core::Vector<core::Tuple<(i32, f64)>>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_getResults_const_bool(self.as_raw_StandardCollector(), sorted, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Vector::<core::Tuple<(i32, f64)>>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	/// Mutable methods for [crate::face::StandardCollector]
	pub trait StandardCollectorTrait: crate::face::PredictCollector + crate::face::StandardCollectorTraitConst {
		fn as_raw_mut_StandardCollector(&mut self) -> *mut c_void;
	
		/// overloaded interface method
		#[inline]
		fn init(&mut self, size: size_t) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_init_size_t(self.as_raw_mut_StandardCollector(), size, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// overloaded interface method
		#[inline]
		fn collect(&mut self, label: i32, dist: f64) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_collect_int_double(self.as_raw_mut_StandardCollector(), label, dist, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Default predict collector
	/// 
	/// Trace minimal distance with treshhold checking (that is default behavior for most predict logic)
	pub struct StandardCollector {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { StandardCollector }
	
	impl Drop for StandardCollector {
		fn drop(&mut self) {
			extern "C" { fn cv_StandardCollector_delete(instance: *mut c_void); }
			unsafe { cv_StandardCollector_delete(self.as_raw_mut_StandardCollector()) };
		}
	}
	
	unsafe impl Send for StandardCollector {}
	
	impl crate::face::PredictCollectorConst for StandardCollector {
		#[inline] fn as_raw_PredictCollector(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::PredictCollector for StandardCollector {
		#[inline] fn as_raw_mut_PredictCollector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::face::StandardCollectorTraitConst for StandardCollector {
		#[inline] fn as_raw_StandardCollector(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::face::StandardCollectorTrait for StandardCollector {
		#[inline] fn as_raw_mut_StandardCollector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl StandardCollector {
		/// Constructor
		/// ## Parameters
		/// * threshold_: set threshold
		/// 
		/// ## C++ default parameters
		/// * threshold_: DBL_MAX
		#[inline]
		pub fn new(threshold_: f64) -> Result<crate::face::StandardCollector> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_StandardCollector_double(threshold_, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { crate::face::StandardCollector::opencv_from_extern(ret) };
			Ok(ret)
		}
		
		/// Static constructor
		/// ## Parameters
		/// * threshold: set threshold
		/// 
		/// ## C++ default parameters
		/// * threshold: DBL_MAX
		#[inline]
		pub fn create(threshold: f64) -> Result<core::Ptr<crate::face::StandardCollector>> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_create_double(threshold, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			let ret = unsafe { core::Ptr::<crate::face::StandardCollector>::opencv_from_extern(ret) };
			Ok(ret)
		}
		
	}
	
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq)]
	pub struct StandardCollector_PredictResult {
		pub label: i32,
		pub distance: f64,
	}
	
	opencv_type_simple! { crate::face::StandardCollector_PredictResult }
	
	impl StandardCollector_PredictResult {
		/// ## C++ default parameters
		/// * label_: -1
		/// * distance_: DBL_MAX
		#[inline]
		pub fn new(label_: i32, distance_: f64) -> Result<crate::face::StandardCollector_PredictResult> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_face_StandardCollector_PredictResult_PredictResult_int_double(label_, distance_, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
}