opencv 0.82.1

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
pub mod cudaimgproc {
	//! # Image Processing
	//!    # Color space processing
	//!    # Histogram Calculation
	//!    # Hough Transform
	//!    # Feature Detection
	use crate::{mod_prelude::*, core, sys, types};
	pub mod prelude {
		pub use { super::CUDA_CLAHETraitConst, super::CUDA_CLAHETrait, super::CUDA_CannyEdgeDetectorTraitConst, super::CUDA_CannyEdgeDetectorTrait, super::CUDA_HoughLinesDetectorTraitConst, super::CUDA_HoughLinesDetectorTrait, super::CUDA_HoughSegmentDetectorTraitConst, super::CUDA_HoughSegmentDetectorTrait, super::CUDA_HoughCirclesDetectorTraitConst, super::CUDA_HoughCirclesDetectorTrait, super::CUDA_CornernessCriteriaTraitConst, super::CUDA_CornernessCriteriaTrait, super::CUDA_CornersDetectorTraitConst, super::CUDA_CornersDetectorTrait, super::CUDA_TemplateMatchingTraitConst, super::CUDA_TemplateMatchingTrait };
	}
	
	pub const CUDA_ALPHA_ATOP: i32 = 3;
	pub const CUDA_ALPHA_ATOP_PREMUL: i32 = 9;
	pub const CUDA_ALPHA_IN: i32 = 1;
	pub const CUDA_ALPHA_IN_PREMUL: i32 = 7;
	pub const CUDA_ALPHA_OUT: i32 = 2;
	pub const CUDA_ALPHA_OUT_PREMUL: i32 = 8;
	pub const CUDA_ALPHA_OVER: i32 = 0;
	pub const CUDA_ALPHA_OVER_PREMUL: i32 = 6;
	pub const CUDA_ALPHA_PLUS: i32 = 5;
	pub const CUDA_ALPHA_PLUS_PREMUL: i32 = 11;
	pub const CUDA_ALPHA_PREMUL: i32 = 12;
	pub const CUDA_ALPHA_XOR: i32 = 4;
	pub const CUDA_ALPHA_XOR_PREMUL: i32 = 10;
	/// BKE [Allegretti2019](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity.
	pub const CUDA_CCL_BKE: i32 = 0;
	/// BKE [Allegretti2019](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity.
	pub const CUDA_CCL_DEFAULT: i32 = -1;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerBG2BGR_MHT: i32 = 256;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerBG2GRAY_MHT: i32 = 260;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerBG2RGB_MHT: i32 = 258;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerGB2BGR_MHT: i32 = 257;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerGB2GRAY_MHT: i32 = 261;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerGB2RGB_MHT: i32 = 259;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerGR2BGR_MHT: i32 = 259;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerGR2GRAY_MHT: i32 = 263;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerGR2RGB_MHT: i32 = 257;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerRG2BGR_MHT: i32 = 258;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerRG2GRAY_MHT: i32 = 262;
	/// Bayer Demosaicing (Malvar, He, and Cutler)
	pub const CUDA_COLOR_BayerRG2RGB_MHT: i32 = 256;
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum CUDA_AlphaCompTypes {
		ALPHA_OVER = 0,
		ALPHA_IN = 1,
		ALPHA_OUT = 2,
		ALPHA_ATOP = 3,
		ALPHA_XOR = 4,
		ALPHA_PLUS = 5,
		ALPHA_OVER_PREMUL = 6,
		ALPHA_IN_PREMUL = 7,
		ALPHA_OUT_PREMUL = 8,
		ALPHA_ATOP_PREMUL = 9,
		ALPHA_XOR_PREMUL = 10,
		ALPHA_PLUS_PREMUL = 11,
		ALPHA_PREMUL = 12,
	}
	
	opencv_type_enum! { crate::cudaimgproc::CUDA_AlphaCompTypes }
	
	/// Connected Components Algorithm
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum CUDA_ConnectedComponentsAlgorithmsTypes {
		/// BKE [Allegretti2019](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity.
		CCL_DEFAULT = -1,
		/// BKE [Allegretti2019](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Allegretti2019) algorithm for 8-way connectivity.
		CCL_BKE = 0,
	}
	
	opencv_type_enum! { crate::cudaimgproc::CUDA_ConnectedComponentsAlgorithmsTypes }
	
	#[repr(C)]
	#[derive(Copy, Clone, Debug, PartialEq, Eq)]
	pub enum CUDA_DemosaicTypes {
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerBG2BGR_MHT = 256,
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerGB2BGR_MHT = 257,
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerRG2BGR_MHT = 258,
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerGR2BGR_MHT = 259,
		// Bayer Demosaicing (Malvar, He, and Cutler)
		// Duplicate, use COLOR_BayerRG2BGR_MHT instead
		// COLOR_BayerBG2RGB_MHT = 258,
		// Bayer Demosaicing (Malvar, He, and Cutler)
		// Duplicate, use COLOR_BayerGR2BGR_MHT instead
		// COLOR_BayerGB2RGB_MHT = 259,
		// Bayer Demosaicing (Malvar, He, and Cutler)
		// Duplicate, use COLOR_BayerBG2BGR_MHT instead
		// COLOR_BayerRG2RGB_MHT = 256,
		// Bayer Demosaicing (Malvar, He, and Cutler)
		// Duplicate, use COLOR_BayerGB2BGR_MHT instead
		// COLOR_BayerGR2RGB_MHT = 257,
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerBG2GRAY_MHT = 260,
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerGB2GRAY_MHT = 261,
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerRG2GRAY_MHT = 262,
		/// Bayer Demosaicing (Malvar, He, and Cutler)
		COLOR_BayerGR2GRAY_MHT = 263,
	}
	
	opencv_type_enum! { crate::cudaimgproc::CUDA_DemosaicTypes }
	
	/// Composites two images using alpha opacity values contained in each image.
	/// 
	/// ## Parameters
	/// * img1: First image. Supports CV_8UC4 , CV_16UC4 , CV_32SC4 and CV_32FC4 types.
	/// * img2: Second image. Must have the same size and the same type as img1 .
	/// * dst: Destination image.
	/// * alpha_op: Flag specifying the alpha-blending operation:
	/// *   **ALPHA_OVER**
	/// *   **ALPHA_IN**
	/// *   **ALPHA_OUT**
	/// *   **ALPHA_ATOP**
	/// *   **ALPHA_XOR**
	/// *   **ALPHA_PLUS**
	/// *   **ALPHA_OVER_PREMUL**
	/// *   **ALPHA_IN_PREMUL**
	/// *   **ALPHA_OUT_PREMUL**
	/// *   **ALPHA_ATOP_PREMUL**
	/// *   **ALPHA_XOR_PREMUL**
	/// *   **ALPHA_PLUS_PREMUL**
	/// *   **ALPHA_PREMUL**
	/// * stream: Stream for the asynchronous version.
	/// 
	/// 
	/// Note:
	///    *   An example demonstrating the use of alphaComp can be found at
	///        opencv_source_code/samples/gpu/alpha_comp.cpp
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn alpha_comp(img1: &impl core::ToInputArray, img2: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, alpha_op: i32, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(img1);
		input_array_arg!(img2);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_alphaComp_const__InputArrayR_const__InputArrayR_const__OutputArrayR_int_StreamR(img1.as_raw__InputArray(), img2.as_raw__InputArray(), dst.as_raw__OutputArray(), alpha_op, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Performs bilateral filtering of passed image
	/// 
	/// ## Parameters
	/// * src: Source image. Supports only (channels != 2 && depth() != CV_8S && depth() != CV_32S
	/// && depth() != CV_64F).
	/// * dst: Destination imagwe.
	/// * kernel_size: Kernel window size.
	/// * sigma_color: Filter sigma in the color space.
	/// * sigma_spatial: Filter sigma in the coordinate space.
	/// * borderMode: Border type. See borderInterpolate for details. BORDER_REFLECT101 ,
	/// BORDER_REPLICATE , BORDER_CONSTANT , BORDER_REFLECT and BORDER_WRAP are supported for now.
	/// * stream: Stream for the asynchronous version.
	/// ## See also
	/// bilateralFilter
	/// 
	/// ## C++ default parameters
	/// * border_mode: BORDER_DEFAULT
	/// * stream: Stream::Null()
	#[inline]
	pub fn bilateral_filter(src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, kernel_size: i32, sigma_color: f32, sigma_spatial: f32, border_mode: i32, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_bilateralFilter_const__InputArrayR_const__OutputArrayR_int_float_float_int_StreamR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), kernel_size, sigma_color, sigma_spatial, border_mode, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Performs linear blending of two images.
	/// 
	/// ## Parameters
	/// * img1: First image. Supports only CV_8U and CV_32F depth.
	/// * img2: Second image. Must have the same size and the same type as img1 .
	/// * weights1: Weights for first image. Must have tha same size as img1 . Supports only CV_32F
	/// type.
	/// * weights2: Weights for second image. Must have tha same size as img2 . Supports only CV_32F
	/// type.
	/// * result: Destination image.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn blend_linear(img1: &impl core::ToInputArray, img2: &impl core::ToInputArray, weights1: &impl core::ToInputArray, weights2: &impl core::ToInputArray, result: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(img1);
		input_array_arg!(img2);
		input_array_arg!(weights1);
		input_array_arg!(weights2);
		output_array_arg!(result);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_blendLinear_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__InputArrayR_const__OutputArrayR_StreamR(img1.as_raw__InputArray(), img2.as_raw__InputArray(), weights1.as_raw__InputArray(), weights2.as_raw__InputArray(), result.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Calculates histogram for one channel 8-bit image confined in given mask.
	/// 
	/// ## Parameters
	/// * src: Source image with CV_8UC1 type.
	/// * hist: Destination histogram with one row, 256 columns, and the CV_32SC1 type.
	/// * mask: A mask image same size as src and of type CV_8UC1.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn calc_hist_1(src: &impl core::ToInputArray, mask: &impl core::ToInputArray, hist: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		input_array_arg!(mask);
		output_array_arg!(hist);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_calcHist_const__InputArrayR_const__InputArrayR_const__OutputArrayR_StreamR(src.as_raw__InputArray(), mask.as_raw__InputArray(), hist.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Calculates histogram for one channel 8-bit image.
	/// 
	/// ## Parameters
	/// * src: Source image with CV_8UC1 type.
	/// * hist: Destination histogram with one row, 256 columns, and the CV_32SC1 type.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn calc_hist(src: &impl core::ToInputArray, hist: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(hist);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_calcHist_const__InputArrayR_const__OutputArrayR_StreamR(src.as_raw__InputArray(), hist.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Computes the Connected Components Labeled image of a binary image.
	/// 
	/// The function takes as input a binary image and performs Connected Components Labeling. The output
	/// is an image where each Connected Component is assigned a unique label (integer value).
	/// ltype specifies the output label image type, an important consideration based on the total
	/// number of labels or alternatively the total number of pixels in the source image.
	/// ccltype specifies the connected components labeling algorithm to use, currently
	/// BKE [Allegretti2019](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Allegretti2019) is supported, see the #ConnectedComponentsAlgorithmsTypes
	/// for details. Note that labels in the output are not required to be sequential.
	/// 
	/// ## Parameters
	/// * image: The 8-bit single-channel image to be labeled.
	/// * labels: Destination labeled image.
	/// * connectivity: Connectivity to use for the labeling procedure. 8 for 8-way connectivity is supported.
	/// * ltype: Output image label type. Currently CV_32S is supported.
	/// * ccltype: Connected components algorithm type (see the #ConnectedComponentsAlgorithmsTypes).
	/// 
	/// 
	/// Note: A sample program demonstrating Connected Components Labeling in CUDA can be found at
	/// 
	/// opencv_contrib_source_code/modules/cudaimgproc/samples/connected_components.cpp
	/// 
	/// ## Overloaded parameters
	/// 
	/// 
	/// * image: The 8-bit single-channel image to be labeled.
	/// * labels: Destination labeled image.
	/// * connectivity: Connectivity to use for the labeling procedure. 8 for 8-way connectivity is supported.
	/// * ltype: Output image label type. Currently CV_32S is supported.
	/// 
	/// ## C++ default parameters
	/// * connectivity: 8
	/// * ltype: CV_32S
	#[inline]
	pub fn connected_components(image: &impl core::ToInputArray, labels: &mut impl core::ToOutputArray, connectivity: i32, ltype: i32) -> Result<()> {
		input_array_arg!(image);
		output_array_arg!(labels);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_connectedComponents_const__InputArrayR_const__OutputArrayR_int_int(image.as_raw__InputArray(), labels.as_raw__OutputArray(), connectivity, ltype, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Computes the Connected Components Labeled image of a binary image.
	/// 
	/// The function takes as input a binary image and performs Connected Components Labeling. The output
	/// is an image where each Connected Component is assigned a unique label (integer value).
	/// ltype specifies the output label image type, an important consideration based on the total
	/// number of labels or alternatively the total number of pixels in the source image.
	/// ccltype specifies the connected components labeling algorithm to use, currently
	/// BKE [Allegretti2019](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Allegretti2019) is supported, see the #ConnectedComponentsAlgorithmsTypes
	/// for details. Note that labels in the output are not required to be sequential.
	/// 
	/// ## Parameters
	/// * image: The 8-bit single-channel image to be labeled.
	/// * labels: Destination labeled image.
	/// * connectivity: Connectivity to use for the labeling procedure. 8 for 8-way connectivity is supported.
	/// * ltype: Output image label type. Currently CV_32S is supported.
	/// * ccltype: Connected components algorithm type (see the #ConnectedComponentsAlgorithmsTypes).
	/// 
	/// 
	/// Note: A sample program demonstrating Connected Components Labeling in CUDA can be found at
	/// 
	/// opencv_contrib_source_code/modules/cudaimgproc/samples/connected_components.cpp
	#[inline]
	pub fn connected_components_with_algorithm(image: &impl core::ToInputArray, labels: &mut impl core::ToOutputArray, connectivity: i32, ltype: i32, ccltype: crate::cudaimgproc::CUDA_ConnectedComponentsAlgorithmsTypes) -> Result<()> {
		input_array_arg!(image);
		output_array_arg!(labels);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_connectedComponents_const__InputArrayR_const__OutputArrayR_int_int_ConnectedComponentsAlgorithmsTypes(image.as_raw__InputArray(), labels.as_raw__OutputArray(), connectivity, ltype, ccltype, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Creates implementation for cuda::CLAHE .
	/// 
	/// ## Parameters
	/// * clipLimit: Threshold for contrast limiting.
	/// * tileGridSize: Size of grid for histogram equalization. Input image will be divided into
	/// equally sized rectangular tiles. tileGridSize defines the number of tiles in row and column.
	/// 
	/// ## C++ default parameters
	/// * clip_limit: 40.0
	/// * tile_grid_size: Size(8,8)
	#[inline]
	pub fn create_clahe(clip_limit: f64, tile_grid_size: core::Size) -> Result<core::Ptr<crate::cudaimgproc::CUDA_CLAHE>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createCLAHE_double_Size(clip_limit, tile_grid_size.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_CLAHE>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for cuda::CannyEdgeDetector .
	/// 
	/// ## Parameters
	/// * low_thresh: First threshold for the hysteresis procedure.
	/// * high_thresh: Second threshold for the hysteresis procedure.
	/// * apperture_size: Aperture size for the Sobel operator.
	/// * L2gradient: Flag indicating whether a more accurate ![inline formula](https://latex.codecogs.com/png.latex?L%5F2) norm
	/// ![inline formula](https://latex.codecogs.com/png.latex?%3D%5Csqrt%7B%28dI%2Fdx%29%5E2%20%2B%20%28dI%2Fdy%29%5E2%7D) should be used to compute the image gradient magnitude (
	/// L2gradient=true ), or a faster default ![inline formula](https://latex.codecogs.com/png.latex?L%5F1) norm ![inline formula](https://latex.codecogs.com/png.latex?%3D%7CdI%2Fdx%7C%2B%7CdI%2Fdy%7C) is enough ( L2gradient=false
	/// ).
	/// 
	/// ## C++ default parameters
	/// * apperture_size: 3
	/// * l2gradient: false
	#[inline]
	pub fn create_canny_edge_detector(low_thresh: f64, high_thresh: f64, apperture_size: i32, l2gradient: bool) -> Result<core::Ptr<crate::cudaimgproc::CUDA_CannyEdgeDetector>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createCannyEdgeDetector_double_double_int_bool(low_thresh, high_thresh, apperture_size, l2gradient, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_CannyEdgeDetector>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for generalized hough transform from [Ballard1981](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Ballard1981) .
	#[inline]
	pub fn create_generalized_hough_ballard() -> Result<core::Ptr<crate::imgproc::GeneralizedHoughBallard>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createGeneralizedHoughBallard(ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::imgproc::GeneralizedHoughBallard>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for generalized hough transform from [Guil1999](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Guil1999) .
	#[inline]
	pub fn create_generalized_hough_guil() -> Result<core::Ptr<crate::imgproc::GeneralizedHoughGuil>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createGeneralizedHoughGuil(ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::imgproc::GeneralizedHoughGuil>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for cuda::CornersDetector .
	/// 
	/// ## Parameters
	/// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now.
	/// * maxCorners: Maximum number of corners to return. If there are more corners than are found,
	/// the strongest of them is returned.
	/// * qualityLevel: Parameter characterizing the minimal accepted quality of image corners. The
	/// parameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue
	/// (see cornerMinEigenVal ) or the Harris function response (see cornerHarris ). The corners with the
	/// quality measure less than the product are rejected. For example, if the best corner has the
	/// quality measure = 1500, and the qualityLevel=0.01 , then all the corners with the quality measure
	/// less than 15 are rejected.
	/// * minDistance: Minimum possible Euclidean distance between the returned corners.
	/// * blockSize: Size of an average block for computing a derivative covariation matrix over each
	/// pixel neighborhood. See cornerEigenValsAndVecs .
	/// * useHarrisDetector: Parameter indicating whether to use a Harris detector (see cornerHarris)
	/// or cornerMinEigenVal.
	/// * harrisK: Free parameter of the Harris detector.
	/// 
	/// ## C++ default parameters
	/// * max_corners: 1000
	/// * quality_level: 0.01
	/// * min_distance: 0.0
	/// * block_size: 3
	/// * use_harris_detector: false
	/// * harris_k: 0.04
	#[inline]
	pub fn create_good_features_to_track_detector(src_type: i32, max_corners: i32, quality_level: f64, min_distance: f64, block_size: i32, use_harris_detector: bool, harris_k: f64) -> Result<core::Ptr<crate::cudaimgproc::CUDA_CornersDetector>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createGoodFeaturesToTrackDetector_int_int_double_double_int_bool_double(src_type, max_corners, quality_level, min_distance, block_size, use_harris_detector, harris_k, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_CornersDetector>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for Harris cornerness criteria.
	/// 
	/// ## Parameters
	/// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now.
	/// * blockSize: Neighborhood size.
	/// * ksize: Aperture parameter for the Sobel operator.
	/// * k: Harris detector free parameter.
	/// * borderType: Pixel extrapolation method. Only BORDER_REFLECT101 and BORDER_REPLICATE are
	/// supported for now.
	/// ## See also
	/// cornerHarris
	/// 
	/// ## C++ default parameters
	/// * border_type: BORDER_REFLECT101
	#[inline]
	pub fn create_harris_corner(src_type: i32, block_size: i32, ksize: i32, k: f64, border_type: i32) -> Result<core::Ptr<crate::cudaimgproc::CUDA_CornernessCriteria>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createHarrisCorner_int_int_int_double_int(src_type, block_size, ksize, k, border_type, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_CornernessCriteria>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for cuda::HoughCirclesDetector .
	/// 
	/// ## Parameters
	/// * dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if
	/// dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has
	/// half as big width and height.
	/// * minDist: Minimum distance between the centers of the detected circles. If the parameter is
	/// too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is
	/// too large, some circles may be missed.
	/// * cannyThreshold: The higher threshold of the two passed to Canny edge detector (the lower one
	/// is twice smaller).
	/// * votesThreshold: The accumulator threshold for the circle centers at the detection stage. The
	/// smaller it is, the more false circles may be detected.
	/// * minRadius: Minimum circle radius.
	/// * maxRadius: Maximum circle radius.
	/// * maxCircles: Maximum number of output circles.
	/// 
	/// ## C++ default parameters
	/// * max_circles: 4096
	#[inline]
	pub fn create_hough_circles_detector(dp: f32, min_dist: f32, canny_threshold: i32, votes_threshold: i32, min_radius: i32, max_radius: i32, max_circles: i32) -> Result<core::Ptr<crate::cudaimgproc::CUDA_HoughCirclesDetector>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createHoughCirclesDetector_float_float_int_int_int_int_int(dp, min_dist, canny_threshold, votes_threshold, min_radius, max_radius, max_circles, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_HoughCirclesDetector>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for cuda::HoughLinesDetector .
	/// 
	/// ## Parameters
	/// * rho: Distance resolution of the accumulator in pixels.
	/// * theta: Angle resolution of the accumulator in radians.
	/// * threshold: Accumulator threshold parameter. Only those lines are returned that get enough
	/// votes ( ![inline formula](https://latex.codecogs.com/png.latex?%3E%5Ctexttt%7Bthreshold%7D) ).
	/// * doSort: Performs lines sort by votes.
	/// * maxLines: Maximum number of output lines.
	/// 
	/// ## C++ default parameters
	/// * do_sort: false
	/// * max_lines: 4096
	#[inline]
	pub fn create_hough_lines_detector(rho: f32, theta: f32, threshold: i32, do_sort: bool, max_lines: i32) -> Result<core::Ptr<crate::cudaimgproc::CUDA_HoughLinesDetector>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createHoughLinesDetector_float_float_int_bool_int(rho, theta, threshold, do_sort, max_lines, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_HoughLinesDetector>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for cuda::HoughSegmentDetector .
	/// 
	/// ## Parameters
	/// * rho: Distance resolution of the accumulator in pixels.
	/// * theta: Angle resolution of the accumulator in radians.
	/// * minLineLength: Minimum line length. Line segments shorter than that are rejected.
	/// * maxLineGap: Maximum allowed gap between points on the same line to link them.
	/// * maxLines: Maximum number of output lines.
	/// 
	/// ## C++ default parameters
	/// * max_lines: 4096
	#[inline]
	pub fn create_hough_segment_detector(rho: f32, theta: f32, min_line_length: i32, max_line_gap: i32, max_lines: i32) -> Result<core::Ptr<crate::cudaimgproc::CUDA_HoughSegmentDetector>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createHoughSegmentDetector_float_float_int_int_int(rho, theta, min_line_length, max_line_gap, max_lines, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_HoughSegmentDetector>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for the minimum eigen value of a 2x2 derivative covariation matrix (the
	/// cornerness criteria).
	/// 
	/// ## Parameters
	/// * srcType: Input source type. Only CV_8UC1 and CV_32FC1 are supported for now.
	/// * blockSize: Neighborhood size.
	/// * ksize: Aperture parameter for the Sobel operator.
	/// * borderType: Pixel extrapolation method. Only BORDER_REFLECT101 and BORDER_REPLICATE are
	/// supported for now.
	/// ## See also
	/// cornerMinEigenVal
	/// 
	/// ## C++ default parameters
	/// * border_type: BORDER_REFLECT101
	#[inline]
	pub fn create_min_eigen_val_corner(src_type: i32, block_size: i32, ksize: i32, border_type: i32) -> Result<core::Ptr<crate::cudaimgproc::CUDA_CornernessCriteria>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createMinEigenValCorner_int_int_int_int(src_type, block_size, ksize, border_type, ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_CornernessCriteria>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Creates implementation for cuda::TemplateMatching .
	/// 
	/// ## Parameters
	/// * srcType: Input source type. CV_32F and CV_8U depth images (1..4 channels) are supported
	/// for now.
	/// * method: Specifies the way to compare the template with the image.
	/// * user_block_size: You can use field user_block_size to set specific block size. If you
	/// leave its default value Size(0,0) then automatic estimation of block size will be used (which is
	/// optimized for speed). By varying user_block_size you can reduce memory requirements at the cost
	/// of speed.
	/// 
	/// The following methods are supported for the CV_8U depth images for now:
	/// 
	/// *   CV_TM_SQDIFF
	/// *   CV_TM_SQDIFF_NORMED
	/// *   CV_TM_CCORR
	/// *   CV_TM_CCORR_NORMED
	/// *   CV_TM_CCOEFF
	/// *   CV_TM_CCOEFF_NORMED
	/// 
	/// The following methods are supported for the CV_32F images for now:
	/// 
	/// *   CV_TM_SQDIFF
	/// *   CV_TM_CCORR
	/// ## See also
	/// matchTemplate
	/// 
	/// ## C++ default parameters
	/// * user_block_size: Size()
	#[inline]
	pub fn create_template_matching(src_type: i32, method: i32, user_block_size: core::Size) -> Result<core::Ptr<crate::cudaimgproc::CUDA_TemplateMatching>> {
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_createTemplateMatching_int_int_Size(src_type, method, user_block_size.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		let ret = unsafe { core::Ptr::<crate::cudaimgproc::CUDA_TemplateMatching>::opencv_from_extern(ret) };
		Ok(ret)
	}
	
	/// Converts an image from one color space to another.
	/// 
	/// ## Parameters
	/// * src: Source image with CV_8U , CV_16U , or CV_32F depth and 1, 3, or 4 channels.
	/// * dst: Destination image.
	/// * code: Color space conversion code. For details, see cvtColor .
	/// * dcn: Number of channels in the destination image. If the parameter is 0, the number of the
	/// channels is derived automatically from src and the code .
	/// * stream: Stream for the asynchronous version.
	/// 
	/// 3-channel color spaces (like HSV, XYZ, and so on) can be stored in a 4-channel image for better
	/// performance.
	/// ## See also
	/// cvtColor
	/// 
	/// ## C++ default parameters
	/// * dcn: 0
	/// * stream: Stream::Null()
	#[inline]
	pub fn cvt_color(src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, code: i32, dcn: i32, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_cvtColor_const__InputArrayR_const__OutputArrayR_int_int_StreamR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), code, dcn, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Converts an image from Bayer pattern to RGB or grayscale.
	/// 
	/// ## Parameters
	/// * src: Source image (8-bit or 16-bit single channel).
	/// * dst: Destination image.
	/// * code: Color space conversion code (see the description below).
	/// * dcn: Number of channels in the destination image. If the parameter is 0, the number of the
	/// channels is derived automatically from src and the code .
	/// * stream: Stream for the asynchronous version.
	/// 
	/// The function can do the following transformations:
	/// 
	/// *   Demosaicing using bilinear interpolation
	/// 
	///    > -   COLOR_BayerBG2GRAY , COLOR_BayerGB2GRAY , COLOR_BayerRG2GRAY , COLOR_BayerGR2GRAY
	///    > -   COLOR_BayerBG2BGR , COLOR_BayerGB2BGR , COLOR_BayerRG2BGR , COLOR_BayerGR2BGR
	/// 
	/// *   Demosaicing using Malvar-He-Cutler algorithm ([MHT2011](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_MHT2011))
	/// 
	///    > -   COLOR_BayerBG2GRAY_MHT , COLOR_BayerGB2GRAY_MHT , COLOR_BayerRG2GRAY_MHT ,
	///    >     COLOR_BayerGR2GRAY_MHT
	///    > -   COLOR_BayerBG2BGR_MHT , COLOR_BayerGB2BGR_MHT , COLOR_BayerRG2BGR_MHT ,
	///    >     COLOR_BayerGR2BGR_MHT
	/// ## See also
	/// cvtColor
	/// 
	/// ## C++ default parameters
	/// * dcn: -1
	/// * stream: Stream::Null()
	#[inline]
	pub fn demosaicing(src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, code: i32, dcn: i32, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_demosaicing_const__InputArrayR_const__OutputArrayR_int_int_StreamR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), code, dcn, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Equalizes the histogram of a grayscale image.
	/// 
	/// ## Parameters
	/// * src: Source image with CV_8UC1 type.
	/// * dst: Destination image.
	/// * stream: Stream for the asynchronous version.
	/// ## See also
	/// equalizeHist
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn equalize_hist(src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_equalizeHist_const__InputArrayR_const__OutputArrayR_StreamR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Computes levels with even distribution.
	/// 
	/// ## Parameters
	/// * levels: Destination array. levels has 1 row, nLevels columns, and the CV_32SC1 type.
	/// * nLevels: Number of computed levels. nLevels must be at least 2.
	/// * lowerLevel: Lower boundary value of the lowest level.
	/// * upperLevel: Upper boundary value of the greatest level.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn even_levels(levels: &mut impl core::ToOutputArray, n_levels: i32, lower_level: i32, upper_level: i32, stream: &mut core::Stream) -> Result<()> {
		output_array_arg!(levels);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_evenLevels_const__OutputArrayR_int_int_int_StreamR(levels.as_raw__OutputArray(), n_levels, lower_level, upper_level, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Routines for correcting image color gamma.
	/// 
	/// ## Parameters
	/// * src: Source image (3- or 4-channel 8 bit).
	/// * dst: Destination image.
	/// * forward: true for forward gamma correction or false for inverse gamma correction.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * forward: true
	/// * stream: Stream::Null()
	#[inline]
	pub fn gamma_correction(src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, forward: bool, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_gammaCorrection_const__InputArrayR_const__OutputArrayR_bool_StreamR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), forward, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Calculates a histogram with evenly distributed bins.
	/// 
	/// ## Parameters
	/// * src: Source image. CV_8U, CV_16U, or CV_16S depth and 1 or 4 channels are supported. For
	/// a four-channel image, all channels are processed separately.
	/// * hist: Destination histogram with one row, histSize columns, and the CV_32S type.
	/// * histSize: Size of the histogram.
	/// * lowerLevel: Lower boundary of lowest-level bin.
	/// * upperLevel: Upper boundary of highest-level bin.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn hist_even(src: &impl core::ToInputArray, hist: &mut impl core::ToOutputArray, hist_size: i32, lower_level: i32, upper_level: i32, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(hist);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_histEven_const__InputArrayR_const__OutputArrayR_int_int_int_StreamR(src.as_raw__InputArray(), hist.as_raw__OutputArray(), hist_size, lower_level, upper_level, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Calculates a histogram with bins determined by the levels array.
	/// 
	/// ## Parameters
	/// * src: Source image. CV_8U , CV_16U , or CV_16S depth and 1 or 4 channels are supported.
	/// For a four-channel image, all channels are processed separately.
	/// * hist: Destination histogram with one row, (levels.cols-1) columns, and the CV_32SC1 type.
	/// * levels: Number of levels in the histogram.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn hist_range(src: &impl core::ToInputArray, hist: &mut impl core::ToOutputArray, levels: &impl core::ToInputArray, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(hist);
		input_array_arg!(levels);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_histRange_const__InputArrayR_const__OutputArrayR_const__InputArrayR_StreamR(src.as_raw__InputArray(), hist.as_raw__OutputArray(), levels.as_raw__InputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Performs mean-shift filtering for each point of the source image.
	/// 
	/// ## Parameters
	/// * src: Source image. Only CV_8UC4 images are supported for now.
	/// * dst: Destination image containing the color of mapped points. It has the same size and type
	/// as src .
	/// * sp: Spatial window radius.
	/// * sr: Color window radius.
	/// * criteria: Termination criteria. See TermCriteria.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// It maps each point of the source image into another point. As a result, you have a new color and new
	/// position of each point.
	/// 
	/// ## C++ default parameters
	/// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1)
	/// * stream: Stream::Null()
	#[inline]
	pub fn mean_shift_filtering(src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, sp: i32, sr: i32, criteria: core::TermCriteria, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_meanShiftFiltering_const__InputArrayR_const__OutputArrayR_int_int_TermCriteria_StreamR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), sp, sr, criteria.opencv_as_extern(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Performs a mean-shift procedure and stores information about processed points (their colors and
	/// positions) in two images.
	/// 
	/// ## Parameters
	/// * src: Source image. Only CV_8UC4 images are supported for now.
	/// * dstr: Destination image containing the color of mapped points. The size and type is the same
	/// as src .
	/// * dstsp: Destination image containing the position of mapped points. The size is the same as
	/// src size. The type is CV_16SC2 .
	/// * sp: Spatial window radius.
	/// * sr: Color window radius.
	/// * criteria: Termination criteria. See TermCriteria.
	/// * stream: Stream for the asynchronous version.
	/// ## See also
	/// cuda::meanShiftFiltering
	/// 
	/// ## C++ default parameters
	/// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1)
	/// * stream: Stream::Null()
	#[inline]
	pub fn mean_shift_proc(src: &impl core::ToInputArray, dstr: &mut impl core::ToOutputArray, dstsp: &mut impl core::ToOutputArray, sp: i32, sr: i32, criteria: core::TermCriteria, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dstr);
		output_array_arg!(dstsp);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_meanShiftProc_const__InputArrayR_const__OutputArrayR_const__OutputArrayR_int_int_TermCriteria_StreamR(src.as_raw__InputArray(), dstr.as_raw__OutputArray(), dstsp.as_raw__OutputArray(), sp, sr, criteria.opencv_as_extern(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Performs a mean-shift segmentation of the source image and eliminates small segments.
	/// 
	/// ## Parameters
	/// * src: Source image. Only CV_8UC4 images are supported for now.
	/// * dst: Segmented image with the same size and type as src (host or gpu memory).
	/// * sp: Spatial window radius.
	/// * sr: Color window radius.
	/// * minsize: Minimum segment size. Smaller segments are merged.
	/// * criteria: Termination criteria. See TermCriteria.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// ## C++ default parameters
	/// * criteria: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5,1)
	/// * stream: Stream::Null()
	#[inline]
	pub fn mean_shift_segmentation(src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, sp: i32, sr: i32, minsize: i32, criteria: core::TermCriteria, stream: &mut core::Stream) -> Result<()> {
		input_array_arg!(src);
		output_array_arg!(dst);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_meanShiftSegmentation_const__InputArrayR_const__OutputArrayR_int_int_int_TermCriteria_StreamR(src.as_raw__InputArray(), dst.as_raw__OutputArray(), sp, sr, minsize, criteria.opencv_as_extern(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Exchanges the color channels of an image in-place.
	/// 
	/// ## Parameters
	/// * image: Source image. Supports only CV_8UC4 type.
	/// * dstOrder: Integer array describing how channel values are permutated. The n-th entry of the
	/// array contains the number of the channel that is stored in the n-th channel of the output image.
	/// E.g. Given an RGBA image, aDstOrder = [3,2,1,0] converts this to ABGR channel order.
	/// * stream: Stream for the asynchronous version.
	/// 
	/// The methods support arbitrary permutations of the original channels, including replication.
	/// 
	/// ## C++ default parameters
	/// * stream: Stream::Null()
	#[inline]
	pub fn swap_channels(image: &mut impl core::ToInputOutputArray, dst_order: &[i32; 4], stream: &mut core::Stream) -> Result<()> {
		input_output_array_arg!(image);
		return_send!(via ocvrs_return);
		unsafe { sys::cv_cuda_swapChannels_const__InputOutputArrayR_const_intXX_StreamR(image.as_raw__InputOutputArray(), dst_order, stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
		return_receive!(unsafe ocvrs_return => ret);
		let ret = ret.into_result()?;
		Ok(ret)
	}
	
	/// Constant methods for [crate::cudaimgproc::CUDA_CLAHE]
	pub trait CUDA_CLAHETraitConst: crate::imgproc::CLAHETraitConst {
		fn as_raw_CUDA_CLAHE(&self) -> *const c_void;
	
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_CLAHE]
	pub trait CUDA_CLAHETrait: crate::cudaimgproc::CUDA_CLAHETraitConst + crate::imgproc::CLAHETrait {
		fn as_raw_mut_CUDA_CLAHE(&mut self) -> *mut c_void;
	
		/// Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization.
		/// 
		/// ## Parameters
		/// * src: Source image with CV_8UC1 type.
		/// * dst: Destination image.
		/// * stream: Stream for the asynchronous version.
		#[inline]
		fn apply(&mut self, src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CLAHE_apply_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_CLAHE(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for Contrast Limited Adaptive Histogram Equalization. :
	pub struct CUDA_CLAHE {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_CLAHE }
	
	impl Drop for CUDA_CLAHE {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_CLAHE_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_CLAHE_delete(self.as_raw_mut_CUDA_CLAHE()) };
		}
	}
	
	unsafe impl Send for CUDA_CLAHE {}
	
	impl core::AlgorithmTraitConst for CUDA_CLAHE {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_CLAHE {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::imgproc::CLAHETraitConst for CUDA_CLAHE {
		#[inline] fn as_raw_CLAHE(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::imgproc::CLAHETrait for CUDA_CLAHE {
		#[inline] fn as_raw_mut_CLAHE(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_CLAHETraitConst for CUDA_CLAHE {
		#[inline] fn as_raw_CUDA_CLAHE(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_CLAHETrait for CUDA_CLAHE {
		#[inline] fn as_raw_mut_CUDA_CLAHE(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_CLAHE {
	}
	
	boxed_cast_base! { CUDA_CLAHE, core::Algorithm, cv_CUDA_CLAHE_to_Algorithm }
	
	/// Constant methods for [crate::cudaimgproc::CUDA_CannyEdgeDetector]
	pub trait CUDA_CannyEdgeDetectorTraitConst: core::AlgorithmTraitConst {
		fn as_raw_CUDA_CannyEdgeDetector(&self) -> *const c_void;
	
		#[inline]
		fn get_low_threshold(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_getLowThreshold_const(self.as_raw_CUDA_CannyEdgeDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_high_threshold(&self) -> Result<f64> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_getHighThreshold_const(self.as_raw_CUDA_CannyEdgeDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_apperture_size(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_getAppertureSize_const(self.as_raw_CUDA_CannyEdgeDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_l2_gradient(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_getL2Gradient_const(self.as_raw_CUDA_CannyEdgeDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_CannyEdgeDetector]
	pub trait CUDA_CannyEdgeDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_CannyEdgeDetectorTraitConst {
		fn as_raw_mut_CUDA_CannyEdgeDetector(&mut self) -> *mut c_void;
	
		/// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm.
		/// 
		/// ## Parameters
		/// * image: Single-channel 8-bit input image.
		/// * edges: Output edge map. It has the same size and type as image.
		/// * stream: Stream for the asynchronous version.
		/// 
		/// ## C++ default parameters
		/// * stream: Stream::Null()
		#[inline]
		fn detect(&mut self, image: &impl core::ToInputArray, edges: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(image);
			output_array_arg!(edges);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_detect_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_CannyEdgeDetector(), image.as_raw__InputArray(), edges.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Finds edges in an image using the [Canny86](https://docs.opencv.org/4.7.0/d0/de3/citelist.html#CITEREF_Canny86) algorithm.
		/// 
		/// ## Parameters
		/// * image: Single-channel 8-bit input image.
		/// * edges: Output edge map. It has the same size and type as image.
		/// * stream: Stream for the asynchronous version.
		/// 
		/// ## Overloaded parameters
		/// 
		/// * dx: First derivative of image in the vertical direction. Support only CV_32S type.
		/// * dy: First derivative of image in the horizontal direction. Support only CV_32S type.
		/// * edges: Output edge map. It has the same size and type as image.
		/// * stream: Stream for the asynchronous version.
		/// 
		/// ## C++ default parameters
		/// * stream: Stream::Null()
		#[inline]
		fn detect_1(&mut self, dx: &impl core::ToInputArray, dy: &impl core::ToInputArray, edges: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(dx);
			input_array_arg!(dy);
			output_array_arg!(edges);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_detect_const__InputArrayR_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_CannyEdgeDetector(), dx.as_raw__InputArray(), dy.as_raw__InputArray(), edges.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_low_threshold(&mut self, low_thresh: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_setLowThreshold_double(self.as_raw_mut_CUDA_CannyEdgeDetector(), low_thresh, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_high_threshold(&mut self, high_thresh: f64) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_setHighThreshold_double(self.as_raw_mut_CUDA_CannyEdgeDetector(), high_thresh, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_apperture_size(&mut self, apperture_size: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_setAppertureSize_int(self.as_raw_mut_CUDA_CannyEdgeDetector(), apperture_size, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_l2_gradient(&mut self, l2gradient: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CannyEdgeDetector_setL2Gradient_bool(self.as_raw_mut_CUDA_CannyEdgeDetector(), l2gradient, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for Canny Edge Detector. :
	pub struct CUDA_CannyEdgeDetector {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_CannyEdgeDetector }
	
	impl Drop for CUDA_CannyEdgeDetector {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_CannyEdgeDetector_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_CannyEdgeDetector_delete(self.as_raw_mut_CUDA_CannyEdgeDetector()) };
		}
	}
	
	unsafe impl Send for CUDA_CannyEdgeDetector {}
	
	impl core::AlgorithmTraitConst for CUDA_CannyEdgeDetector {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_CannyEdgeDetector {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_CannyEdgeDetectorTraitConst for CUDA_CannyEdgeDetector {
		#[inline] fn as_raw_CUDA_CannyEdgeDetector(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_CannyEdgeDetectorTrait for CUDA_CannyEdgeDetector {
		#[inline] fn as_raw_mut_CUDA_CannyEdgeDetector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_CannyEdgeDetector {
	}
	
	boxed_cast_base! { CUDA_CannyEdgeDetector, core::Algorithm, cv_CUDA_CannyEdgeDetector_to_Algorithm }
	
	/// Constant methods for [crate::cudaimgproc::CUDA_CornernessCriteria]
	pub trait CUDA_CornernessCriteriaTraitConst: core::AlgorithmTraitConst {
		fn as_raw_CUDA_CornernessCriteria(&self) -> *const c_void;
	
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_CornernessCriteria]
	pub trait CUDA_CornernessCriteriaTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_CornernessCriteriaTraitConst {
		fn as_raw_mut_CUDA_CornernessCriteria(&mut self) -> *mut c_void;
	
		/// Computes the cornerness criteria at each image pixel.
		/// 
		/// ## Parameters
		/// * src: Source image.
		/// * dst: Destination image containing cornerness values. It will have the same size as src and
		/// CV_32FC1 type.
		/// * stream: Stream for the asynchronous version.
		/// 
		/// ## C++ default parameters
		/// * stream: Stream::Null()
		#[inline]
		fn compute(&mut self, src: &impl core::ToInputArray, dst: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(dst);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CornernessCriteria_compute_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_CornernessCriteria(), src.as_raw__InputArray(), dst.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for Cornerness Criteria computation. :
	pub struct CUDA_CornernessCriteria {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_CornernessCriteria }
	
	impl Drop for CUDA_CornernessCriteria {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_CornernessCriteria_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_CornernessCriteria_delete(self.as_raw_mut_CUDA_CornernessCriteria()) };
		}
	}
	
	unsafe impl Send for CUDA_CornernessCriteria {}
	
	impl core::AlgorithmTraitConst for CUDA_CornernessCriteria {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_CornernessCriteria {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_CornernessCriteriaTraitConst for CUDA_CornernessCriteria {
		#[inline] fn as_raw_CUDA_CornernessCriteria(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_CornernessCriteriaTrait for CUDA_CornernessCriteria {
		#[inline] fn as_raw_mut_CUDA_CornernessCriteria(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_CornernessCriteria {
	}
	
	boxed_cast_base! { CUDA_CornernessCriteria, core::Algorithm, cv_CUDA_CornernessCriteria_to_Algorithm }
	
	/// Constant methods for [crate::cudaimgproc::CUDA_CornersDetector]
	pub trait CUDA_CornersDetectorTraitConst: core::AlgorithmTraitConst {
		fn as_raw_CUDA_CornersDetector(&self) -> *const c_void;
	
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_CornersDetector]
	pub trait CUDA_CornersDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_CornersDetectorTraitConst {
		fn as_raw_mut_CUDA_CornersDetector(&mut self) -> *mut c_void;
	
		/// Determines strong corners on an image.
		/// 
		/// ## Parameters
		/// * image: Input 8-bit or floating-point 32-bit, single-channel image.
		/// * corners: Output vector of detected corners (1-row matrix with CV_32FC2 type with corners
		/// positions).
		/// * mask: Optional region of interest. If the image is not empty (it needs to have the type
		/// CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected.
		/// * stream: Stream for the asynchronous version.
		/// 
		/// ## C++ default parameters
		/// * mask: noArray()
		/// * stream: Stream::Null()
		#[inline]
		fn detect(&mut self, image: &impl core::ToInputArray, corners: &mut impl core::ToOutputArray, mask: &impl core::ToInputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(image);
			output_array_arg!(corners);
			input_array_arg!(mask);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_CornersDetector_detect_const__InputArrayR_const__OutputArrayR_const__InputArrayR_StreamR(self.as_raw_mut_CUDA_CornersDetector(), image.as_raw__InputArray(), corners.as_raw__OutputArray(), mask.as_raw__InputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for Corners Detector. :
	pub struct CUDA_CornersDetector {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_CornersDetector }
	
	impl Drop for CUDA_CornersDetector {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_CornersDetector_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_CornersDetector_delete(self.as_raw_mut_CUDA_CornersDetector()) };
		}
	}
	
	unsafe impl Send for CUDA_CornersDetector {}
	
	impl core::AlgorithmTraitConst for CUDA_CornersDetector {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_CornersDetector {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_CornersDetectorTraitConst for CUDA_CornersDetector {
		#[inline] fn as_raw_CUDA_CornersDetector(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_CornersDetectorTrait for CUDA_CornersDetector {
		#[inline] fn as_raw_mut_CUDA_CornersDetector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_CornersDetector {
	}
	
	boxed_cast_base! { CUDA_CornersDetector, core::Algorithm, cv_CUDA_CornersDetector_to_Algorithm }
	
	/// Constant methods for [crate::cudaimgproc::CUDA_HoughCirclesDetector]
	pub trait CUDA_HoughCirclesDetectorTraitConst: core::AlgorithmTraitConst {
		fn as_raw_CUDA_HoughCirclesDetector(&self) -> *const c_void;
	
		#[inline]
		fn get_dp(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_getDp_const(self.as_raw_CUDA_HoughCirclesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_min_dist(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_getMinDist_const(self.as_raw_CUDA_HoughCirclesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_canny_threshold(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_getCannyThreshold_const(self.as_raw_CUDA_HoughCirclesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_votes_threshold(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_getVotesThreshold_const(self.as_raw_CUDA_HoughCirclesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_min_radius(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_getMinRadius_const(self.as_raw_CUDA_HoughCirclesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_max_radius(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_getMaxRadius_const(self.as_raw_CUDA_HoughCirclesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_max_circles(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_getMaxCircles_const(self.as_raw_CUDA_HoughCirclesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_HoughCirclesDetector]
	pub trait CUDA_HoughCirclesDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_HoughCirclesDetectorTraitConst {
		fn as_raw_mut_CUDA_HoughCirclesDetector(&mut self) -> *mut c_void;
	
		/// Finds circles in a grayscale image using the Hough transform.
		/// 
		/// ## Parameters
		/// * src: 8-bit, single-channel grayscale input image.
		/// * circles: Output vector of found circles. Each vector is encoded as a 3-element
		/// floating-point vector ![inline formula](https://latex.codecogs.com/png.latex?%28x%2C%20y%2C%20radius%29) .
		/// * stream: Stream for the asynchronous version.
		/// ## See also
		/// HoughCircles
		/// 
		/// ## C++ default parameters
		/// * stream: Stream::Null()
		#[inline]
		fn detect(&mut self, src: &impl core::ToInputArray, circles: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(circles);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_detect_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_HoughCirclesDetector(), src.as_raw__InputArray(), circles.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_dp(&mut self, dp: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_setDp_float(self.as_raw_mut_CUDA_HoughCirclesDetector(), dp, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_min_dist(&mut self, min_dist: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_setMinDist_float(self.as_raw_mut_CUDA_HoughCirclesDetector(), min_dist, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_canny_threshold(&mut self, canny_threshold: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_setCannyThreshold_int(self.as_raw_mut_CUDA_HoughCirclesDetector(), canny_threshold, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_votes_threshold(&mut self, votes_threshold: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_setVotesThreshold_int(self.as_raw_mut_CUDA_HoughCirclesDetector(), votes_threshold, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_min_radius(&mut self, min_radius: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_setMinRadius_int(self.as_raw_mut_CUDA_HoughCirclesDetector(), min_radius, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_max_radius(&mut self, max_radius: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_setMaxRadius_int(self.as_raw_mut_CUDA_HoughCirclesDetector(), max_radius, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_max_circles(&mut self, max_circles: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughCirclesDetector_setMaxCircles_int(self.as_raw_mut_CUDA_HoughCirclesDetector(), max_circles, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for circles detector algorithm. :
	pub struct CUDA_HoughCirclesDetector {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_HoughCirclesDetector }
	
	impl Drop for CUDA_HoughCirclesDetector {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_HoughCirclesDetector_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_HoughCirclesDetector_delete(self.as_raw_mut_CUDA_HoughCirclesDetector()) };
		}
	}
	
	unsafe impl Send for CUDA_HoughCirclesDetector {}
	
	impl core::AlgorithmTraitConst for CUDA_HoughCirclesDetector {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_HoughCirclesDetector {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_HoughCirclesDetectorTraitConst for CUDA_HoughCirclesDetector {
		#[inline] fn as_raw_CUDA_HoughCirclesDetector(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_HoughCirclesDetectorTrait for CUDA_HoughCirclesDetector {
		#[inline] fn as_raw_mut_CUDA_HoughCirclesDetector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_HoughCirclesDetector {
	}
	
	boxed_cast_base! { CUDA_HoughCirclesDetector, core::Algorithm, cv_CUDA_HoughCirclesDetector_to_Algorithm }
	
	/// Constant methods for [crate::cudaimgproc::CUDA_HoughLinesDetector]
	pub trait CUDA_HoughLinesDetectorTraitConst: core::AlgorithmTraitConst {
		fn as_raw_CUDA_HoughLinesDetector(&self) -> *const c_void;
	
		#[inline]
		fn get_rho(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_getRho_const(self.as_raw_CUDA_HoughLinesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_theta(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_getTheta_const(self.as_raw_CUDA_HoughLinesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_threshold(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_getThreshold_const(self.as_raw_CUDA_HoughLinesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_do_sort(&self) -> Result<bool> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_getDoSort_const(self.as_raw_CUDA_HoughLinesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_max_lines(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_getMaxLines_const(self.as_raw_CUDA_HoughLinesDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_HoughLinesDetector]
	pub trait CUDA_HoughLinesDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_HoughLinesDetectorTraitConst {
		fn as_raw_mut_CUDA_HoughLinesDetector(&mut self) -> *mut c_void;
	
		/// Finds lines in a binary image using the classical Hough transform.
		/// 
		/// ## Parameters
		/// * src: 8-bit, single-channel binary source image.
		/// * lines: Output vector of lines. Each line is represented by a two-element vector
		/// ![inline formula](https://latex.codecogs.com/png.latex?%28%5Crho%2C%20%5Ctheta%29) . ![inline formula](https://latex.codecogs.com/png.latex?%5Crho) is the distance from the coordinate origin ![inline formula](https://latex.codecogs.com/png.latex?%280%2C0%29) (top-left corner of
		/// the image). ![inline formula](https://latex.codecogs.com/png.latex?%5Ctheta) is the line rotation angle in radians (
		/// ![inline formula](https://latex.codecogs.com/png.latex?0%20%5Csim%20%5Ctextrm%7Bvertical%20line%7D%2C%20%5Cpi%2F2%20%5Csim%20%5Ctextrm%7Bhorizontal%20line%7D) ).
		/// * stream: Stream for the asynchronous version.
		/// ## See also
		/// HoughLines
		/// 
		/// ## C++ default parameters
		/// * stream: Stream::Null()
		#[inline]
		fn detect(&mut self, src: &impl core::ToInputArray, lines: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(lines);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_detect_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_HoughLinesDetector(), src.as_raw__InputArray(), lines.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		/// Downloads results from cuda::HoughLinesDetector::detect to host memory.
		/// 
		/// ## Parameters
		/// * d_lines: Result of cuda::HoughLinesDetector::detect .
		/// * h_lines: Output host array.
		/// * h_votes: Optional output array for line's votes.
		/// * stream: Stream for the asynchronous version.
		/// 
		/// ## C++ default parameters
		/// * h_votes: noArray()
		/// * stream: Stream::Null()
		#[inline]
		fn download_results(&mut self, d_lines: &impl core::ToInputArray, h_lines: &mut impl core::ToOutputArray, h_votes: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(d_lines);
			output_array_arg!(h_lines);
			output_array_arg!(h_votes);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_downloadResults_const__InputArrayR_const__OutputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_HoughLinesDetector(), d_lines.as_raw__InputArray(), h_lines.as_raw__OutputArray(), h_votes.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_rho(&mut self, rho: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_setRho_float(self.as_raw_mut_CUDA_HoughLinesDetector(), rho, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_theta(&mut self, theta: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_setTheta_float(self.as_raw_mut_CUDA_HoughLinesDetector(), theta, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_threshold(&mut self, threshold: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_setThreshold_int(self.as_raw_mut_CUDA_HoughLinesDetector(), threshold, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_do_sort(&mut self, do_sort: bool) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_setDoSort_bool(self.as_raw_mut_CUDA_HoughLinesDetector(), do_sort, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_max_lines(&mut self, max_lines: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughLinesDetector_setMaxLines_int(self.as_raw_mut_CUDA_HoughLinesDetector(), max_lines, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for lines detector algorithm. :
	pub struct CUDA_HoughLinesDetector {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_HoughLinesDetector }
	
	impl Drop for CUDA_HoughLinesDetector {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_HoughLinesDetector_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_HoughLinesDetector_delete(self.as_raw_mut_CUDA_HoughLinesDetector()) };
		}
	}
	
	unsafe impl Send for CUDA_HoughLinesDetector {}
	
	impl core::AlgorithmTraitConst for CUDA_HoughLinesDetector {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_HoughLinesDetector {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_HoughLinesDetectorTraitConst for CUDA_HoughLinesDetector {
		#[inline] fn as_raw_CUDA_HoughLinesDetector(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_HoughLinesDetectorTrait for CUDA_HoughLinesDetector {
		#[inline] fn as_raw_mut_CUDA_HoughLinesDetector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_HoughLinesDetector {
	}
	
	boxed_cast_base! { CUDA_HoughLinesDetector, core::Algorithm, cv_CUDA_HoughLinesDetector_to_Algorithm }
	
	/// Constant methods for [crate::cudaimgproc::CUDA_HoughSegmentDetector]
	pub trait CUDA_HoughSegmentDetectorTraitConst: core::AlgorithmTraitConst {
		fn as_raw_CUDA_HoughSegmentDetector(&self) -> *const c_void;
	
		#[inline]
		fn get_rho(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_getRho_const(self.as_raw_CUDA_HoughSegmentDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_theta(&self) -> Result<f32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_getTheta_const(self.as_raw_CUDA_HoughSegmentDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_min_line_length(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_getMinLineLength_const(self.as_raw_CUDA_HoughSegmentDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_max_line_gap(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_getMaxLineGap_const(self.as_raw_CUDA_HoughSegmentDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn get_max_lines(&self) -> Result<i32> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_getMaxLines_const(self.as_raw_CUDA_HoughSegmentDetector(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_HoughSegmentDetector]
	pub trait CUDA_HoughSegmentDetectorTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_HoughSegmentDetectorTraitConst {
		fn as_raw_mut_CUDA_HoughSegmentDetector(&mut self) -> *mut c_void;
	
		/// Finds line segments in a binary image using the probabilistic Hough transform.
		/// 
		/// ## Parameters
		/// * src: 8-bit, single-channel binary source image.
		/// * lines: Output vector of lines. Each line is represented by a 4-element vector
		/// ![inline formula](https://latex.codecogs.com/png.latex?%28x%5F1%2C%20y%5F1%2C%20x%5F2%2C%20y%5F2%29) , where ![inline formula](https://latex.codecogs.com/png.latex?%28x%5F1%2Cy%5F1%29) and ![inline formula](https://latex.codecogs.com/png.latex?%28x%5F2%2C%20y%5F2%29) are the ending points of each detected
		/// line segment.
		/// * stream: Stream for the asynchronous version.
		/// ## See also
		/// HoughLinesP
		/// 
		/// ## C++ default parameters
		/// * stream: Stream::Null()
		#[inline]
		fn detect(&mut self, src: &impl core::ToInputArray, lines: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(src);
			output_array_arg!(lines);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_detect_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_HoughSegmentDetector(), src.as_raw__InputArray(), lines.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_rho(&mut self, rho: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_setRho_float(self.as_raw_mut_CUDA_HoughSegmentDetector(), rho, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_theta(&mut self, theta: f32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_setTheta_float(self.as_raw_mut_CUDA_HoughSegmentDetector(), theta, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_min_line_length(&mut self, min_line_length: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_setMinLineLength_int(self.as_raw_mut_CUDA_HoughSegmentDetector(), min_line_length, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_max_line_gap(&mut self, max_line_gap: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_setMaxLineGap_int(self.as_raw_mut_CUDA_HoughSegmentDetector(), max_line_gap, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
		#[inline]
		fn set_max_lines(&mut self, max_lines: i32) -> Result<()> {
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_HoughSegmentDetector_setMaxLines_int(self.as_raw_mut_CUDA_HoughSegmentDetector(), max_lines, ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for line segments detector algorithm. :
	pub struct CUDA_HoughSegmentDetector {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_HoughSegmentDetector }
	
	impl Drop for CUDA_HoughSegmentDetector {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_HoughSegmentDetector_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_HoughSegmentDetector_delete(self.as_raw_mut_CUDA_HoughSegmentDetector()) };
		}
	}
	
	unsafe impl Send for CUDA_HoughSegmentDetector {}
	
	impl core::AlgorithmTraitConst for CUDA_HoughSegmentDetector {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_HoughSegmentDetector {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_HoughSegmentDetectorTraitConst for CUDA_HoughSegmentDetector {
		#[inline] fn as_raw_CUDA_HoughSegmentDetector(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_HoughSegmentDetectorTrait for CUDA_HoughSegmentDetector {
		#[inline] fn as_raw_mut_CUDA_HoughSegmentDetector(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_HoughSegmentDetector {
	}
	
	boxed_cast_base! { CUDA_HoughSegmentDetector, core::Algorithm, cv_CUDA_HoughSegmentDetector_to_Algorithm }
	
	/// Constant methods for [crate::cudaimgproc::CUDA_TemplateMatching]
	pub trait CUDA_TemplateMatchingTraitConst: core::AlgorithmTraitConst {
		fn as_raw_CUDA_TemplateMatching(&self) -> *const c_void;
	
	}
	
	/// Mutable methods for [crate::cudaimgproc::CUDA_TemplateMatching]
	pub trait CUDA_TemplateMatchingTrait: core::AlgorithmTrait + crate::cudaimgproc::CUDA_TemplateMatchingTraitConst {
		fn as_raw_mut_CUDA_TemplateMatching(&mut self) -> *mut c_void;
	
		/// Computes a proximity map for a raster template and an image where the template is searched for.
		/// 
		/// ## Parameters
		/// * image: Source image.
		/// * templ: Template image with the size and type the same as image .
		/// * result: Map containing comparison results ( CV_32FC1 ). If image is *W x H* and templ is *w
		/// x h*, then result must be *W-w+1 x H-h+1*.
		/// * stream: Stream for the asynchronous version.
		/// 
		/// ## C++ default parameters
		/// * stream: Stream::Null()
		#[inline]
		fn match_(&mut self, image: &impl core::ToInputArray, templ: &impl core::ToInputArray, result: &mut impl core::ToOutputArray, stream: &mut core::Stream) -> Result<()> {
			input_array_arg!(image);
			input_array_arg!(templ);
			output_array_arg!(result);
			return_send!(via ocvrs_return);
			unsafe { sys::cv_cuda_TemplateMatching_match_const__InputArrayR_const__InputArrayR_const__OutputArrayR_StreamR(self.as_raw_mut_CUDA_TemplateMatching(), image.as_raw__InputArray(), templ.as_raw__InputArray(), result.as_raw__OutputArray(), stream.as_raw_mut_Stream(), ocvrs_return.as_mut_ptr()) };
			return_receive!(unsafe ocvrs_return => ret);
			let ret = ret.into_result()?;
			Ok(ret)
		}
		
	}
	
	/// Base class for Template Matching. :
	pub struct CUDA_TemplateMatching {
		ptr: *mut c_void
	}
	
	opencv_type_boxed! { CUDA_TemplateMatching }
	
	impl Drop for CUDA_TemplateMatching {
		#[inline]
		fn drop(&mut self) {
			extern "C" { fn cv_CUDA_TemplateMatching_delete(instance: *mut c_void); }
			unsafe { cv_CUDA_TemplateMatching_delete(self.as_raw_mut_CUDA_TemplateMatching()) };
		}
	}
	
	unsafe impl Send for CUDA_TemplateMatching {}
	
	impl core::AlgorithmTraitConst for CUDA_TemplateMatching {
		#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
	}
	
	impl core::AlgorithmTrait for CUDA_TemplateMatching {
		#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl crate::cudaimgproc::CUDA_TemplateMatchingTraitConst for CUDA_TemplateMatching {
		#[inline] fn as_raw_CUDA_TemplateMatching(&self) -> *const c_void { self.as_raw() }
	}
	
	impl crate::cudaimgproc::CUDA_TemplateMatchingTrait for CUDA_TemplateMatching {
		#[inline] fn as_raw_mut_CUDA_TemplateMatching(&mut self) -> *mut c_void { self.as_raw_mut() }
	}
	
	impl CUDA_TemplateMatching {
	}
	
	boxed_cast_base! { CUDA_TemplateMatching, core::Algorithm, cv_CUDA_TemplateMatching_to_Algorithm }
}