oarust 0.17.0

GPU-first semantic computing runtime written in Rust
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
// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
// schema=image.json schema_version=1 generator_version=64
// schema_sha256=b49cf13c5c000ebf985020b5b9eb0a98ddc2d64d8757d5cc3b5cb39d7aecbf00
use crate::image::{
	AutoThreshold, BorderMode, ColorConversion, ColorMap, Connectivity, CornerScore, DistanceType,
	ImageFormat, InterpolationMode, MatchTemplate, NormalizationConfig, PolarMode,
};
use crate::{Image, Matrix, Result};

impl Image {
	/// Resize an FP32 channel-first image while preserving its layout and format.
	///
	/// Delegates to [`crate::image::resize`].
	pub fn resize(
		&self,
		target_width: u32,
		target_height: u32,
		interpolation: InterpolationMode,
	) -> Result<Self> {
		crate::image::resize(self, target_width, target_height, interpolation)
	}

	/// Extract a region, clipping its right and bottom edges to the source extent.
	///
	/// Delegates to [`crate::image::crop`].
	pub fn crop(&self, x: u32, y: u32, width: u32, height: u32) -> Result<Self> {
		crate::image::crop(self, x, y, width, height)
	}

	/// Flip an image horizontally, vertically, or along both axes.
	///
	/// Delegates to [`crate::image::flip`].
	pub fn flip(&self, horizontal: bool, vertical: bool) -> Result<Self> {
		crate::image::flip(self, horizontal, vertical)
	}

	/// Rotate clockwise by a multiple of 90 degrees.
	///
	/// Delegates to [`crate::image::rotate`].
	pub fn rotate(&self, degrees: u32) -> Result<Self> {
		crate::image::rotate(self, degrees)
	}

	/// Add asymmetric padding with an explicit border policy.
	///
	/// Delegates to [`crate::image::pad`].
	pub fn pad(
		&self,
		left: u32,
		right: u32,
		top: u32,
		bottom: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::pad(self, left, right, top, bottom, border, border_value)
	}

	/// Extract a centered region with the requested exact extent.
	///
	/// Delegates to [`crate::image::center_crop`].
	pub fn center_crop(&self, width: u32, height: u32) -> Result<Self> {
		crate::image::center_crop(self, width, height)
	}

	/// Resample an image from an FP32 absolute-coordinate map shaped
	///
	/// Delegates to [`crate::image::remap`].
	pub fn remap(
		&self,
		map: &Matrix,
		interpolation: InterpolationMode,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::remap(self, map, interpolation, border, border_value)
	}

	/// Apply an inverse FP32 2x3 affine transform to an image.
	///
	/// Delegates to [`crate::image::warp_affine`].
	pub fn warp_affine(
		&self,
		transform: &Matrix,
		width: u32,
		height: u32,
		interpolation: InterpolationMode,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::warp_affine(
			self,
			transform,
			width,
			height,
			interpolation,
			border,
			border_value,
		)
	}

	/// Apply an inverse FP32 3x3 perspective transform to an image.
	///
	/// Delegates to [`crate::image::warp_perspective`].
	pub fn warp_perspective(
		&self,
		transform: &Matrix,
		width: u32,
		height: u32,
		interpolation: InterpolationMode,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::warp_perspective(
			self,
			transform,
			width,
			height,
			interpolation,
			border,
			border_value,
		)
	}

	/// Replace values above `threshold` with `max_value` and all others with zero.
	///
	/// Delegates to [`crate::image::threshold_binary`].
	pub fn threshold_binary(&self, threshold: f32, max_value: f32) -> Result<Self> {
		crate::image::threshold_binary(self, threshold, max_value)
	}

	/// Replace values at or below `threshold` with `max_value` and all others with zero.
	///
	/// Delegates to [`crate::image::threshold_binary_inv`].
	pub fn threshold_binary_inv(&self, threshold: f32, max_value: f32) -> Result<Self> {
		crate::image::threshold_binary_inv(self, threshold, max_value)
	}

	/// Truncate values above `threshold`.
	///
	/// Delegates to [`crate::image::threshold_truncate`].
	pub fn threshold_truncate(&self, threshold: f32) -> Result<Self> {
		crate::image::threshold_truncate(self, threshold)
	}

	/// Replace values at or below `threshold` with zero.
	///
	/// Delegates to [`crate::image::threshold_to_zero`].
	pub fn threshold_to_zero(&self, threshold: f32) -> Result<Self> {
		crate::image::threshold_to_zero(self, threshold)
	}

	/// Replace values above `threshold` with zero.
	///
	/// Delegates to [`crate::image::threshold_to_zero_inv`].
	pub fn threshold_to_zero_inv(&self, threshold: f32) -> Result<Self> {
		crate::image::threshold_to_zero_inv(self, threshold)
	}

	/// Produce `true_value` for values inside the inclusive interval and zero outside it.
	///
	/// Delegates to [`crate::image::in_range`].
	pub fn in_range(&self, low: f32, high: f32, true_value: f32) -> Result<Self> {
		crate::image::in_range(self, low, high, true_value)
	}

	/// Clamp every pixel to the inclusive interval.
	///
	/// Delegates to [`crate::image::clamp`].
	pub fn clamp(&self, low: f32, high: f32) -> Result<Self> {
		crate::image::clamp(self, low, high)
	}

	/// Invert every value around `max_value`.
	///
	/// Delegates to [`crate::image::invert`].
	pub fn invert(&self, max_value: f32) -> Result<Self> {
		crate::image::invert(self, max_value)
	}

	/// Apply `value * contrast + brightness`.
	///
	/// Delegates to [`crate::image::brightness_contrast`].
	pub fn brightness_contrast(&self, brightness: f32, contrast: f32) -> Result<Self> {
		crate::image::brightness_contrast(self, brightness, contrast)
	}

	/// Apply `max(value, 0)^gamma * gain`.
	///
	/// Delegates to [`crate::image::gamma_contrast`].
	pub fn gamma_contrast(&self, gamma: f32, gain: f32) -> Result<Self> {
		crate::image::gamma_contrast(self, gamma, gain)
	}

	/// Invert values at or above `threshold` around `max_value`.
	///
	/// Delegates to [`crate::image::solarize`].
	pub fn solarize(&self, threshold: f32, max_value: f32) -> Result<Self> {
		crate::image::solarize(self, threshold, max_value)
	}

	/// Quantize `[low, high]` to `levels` evenly spaced values using round-half-up.
	///
	/// Delegates to [`crate::image::posterize`].
	pub fn posterize(&self, levels: u32, low: f32, high: f32) -> Result<Self> {
		crate::image::posterize(self, levels, low, high)
	}

	/// Convert an RGB or RGBA image to Rec.709 grayscale.
	///
	/// Delegates to [`crate::image::grayscale`].
	pub fn grayscale(&self) -> Result<Self> {
		crate::image::grayscale(self)
	}

	/// Blend two equal semantic images using `left * (1-alpha) + right * alpha`.
	///
	/// Delegates to [`crate::image::alpha_blend`].
	pub fn alpha_blend(&self, right: &Image, alpha: f32) -> Result<Self> {
		crate::image::alpha_blend(self, right, alpha)
	}

	/// Composite two equal images with a clamped Gray or per-channel mask.
	///
	/// Delegates to [`crate::image::composite`].
	pub fn composite(&self, right: &Image, mask: &Image) -> Result<Self> {
		crate::image::composite(self, right, mask)
	}

	/// Fill the intersection of a rectangle and the image with one finite value.
	///
	/// Delegates to [`crate::image::erase`].
	pub fn erase(&self, x: u32, y: u32, width: u32, height: u32, value: f32) -> Result<Self> {
		crate::image::erase(self, x, y, width, height, value)
	}

	/// Apply one shared FP32 `[3, 4]` affine color transform to RGB channels.
	///
	/// Delegates to [`crate::image::color_twist`].
	pub fn color_twist(&self, transform: &Matrix) -> Result<Self> {
		crate::image::color_twist(self, transform)
	}

	/// Reorder one to four channels and explicitly assign the resulting format.
	///
	/// Delegates to [`crate::image::channel_reorder`].
	pub fn channel_reorder(&self, order: [u32; 4], output_format: ImageFormat) -> Result<Self> {
		crate::image::channel_reorder(self, order, output_format)
	}

	/// Add explicit-seed Philox Gaussian noise to every pixel.
	///
	/// Delegates to [`crate::image::gaussian_noise`].
	pub fn gaussian_noise(&self, mean: f32, stddev: f32, seed: u64) -> Result<Self> {
		crate::image::gaussian_noise(self, mean, stddev, seed)
	}

	/// Replace a seeded fraction of pixels with salt or pepper values.
	///
	/// Delegates to [`crate::image::salt_pepper_noise`].
	pub fn salt_pepper_noise(
		&self,
		probability: f32,
		salt_value: f32,
		pepper_value: f32,
		seed: u64,
	) -> Result<Self> {
		crate::image::salt_pepper_noise(self, probability, salt_value, pepper_value, seed)
	}

	/// Apply same-shape 2D cross-correlation with an odd FP32 kernel up to 31×31.
	///
	/// Delegates to [`crate::image::convolve_2d`].
	pub fn convolve_2d(
		&self,
		kernel: &Matrix,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::convolve_2d(self, kernel, border, border_value)
	}

	/// Apply horizontal and vertical odd FP32 vector kernels up to length 31.
	///
	/// Delegates to [`crate::image::separable_convolve_2d`].
	pub fn separable_convolve_2d(
		&self,
		kernel_x: &Matrix,
		kernel_y: &Matrix,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::separable_convolve_2d(self, kernel_x, kernel_y, border, border_value)
	}

	/// Average an odd rectangular neighborhood up to 31×31.
	///
	/// Delegates to [`crate::image::average_blur`].
	pub fn average_blur(&self, width: u32, height: u32, border: BorderMode) -> Result<Self> {
		crate::image::average_blur(self, width, height, border)
	}

	/// Compute one first-order Sobel derivative.
	///
	/// Delegates to [`crate::image::sobel`].
	pub fn sobel(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self> {
		crate::image::sobel(self, dx, dy, border)
	}

	/// Compute one first-order Scharr derivative.
	///
	/// Delegates to [`crate::image::scharr`].
	pub fn scharr(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self> {
		crate::image::scharr(self, dx, dy, border)
	}

	/// Apply the four-neighbor discrete Laplacian.
	///
	/// Delegates to [`crate::image::laplacian`].
	pub fn laplacian(&self, border: BorderMode) -> Result<Self> {
		crate::image::laplacian(self, border)
	}

	/// Erode with an odd rectangular structuring element up to 31×31.
	///
	/// Delegates to [`crate::image::erode`].
	pub fn erode(
		&self,
		width: u32,
		height: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::erode(self, width, height, border, border_value)
	}

	/// Dilate with an odd rectangular structuring element up to 31×31.
	///
	/// Delegates to [`crate::image::dilate`].
	pub fn dilate(
		&self,
		width: u32,
		height: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::dilate(self, width, height, border, border_value)
	}

	/// Erode and then dilate with the same rectangular element.
	///
	/// Delegates to [`crate::image::morphology_open`].
	pub fn morphology_open(
		&self,
		width: u32,
		height: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::morphology_open(self, width, height, border, border_value)
	}

	/// Dilate and then erode with the same rectangular element.
	///
	/// Delegates to [`crate::image::morphology_close`].
	pub fn morphology_close(
		&self,
		width: u32,
		height: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::morphology_close(self, width, height, border, border_value)
	}

	/// Return dilation minus erosion.
	///
	/// Delegates to [`crate::image::morphology_gradient`].
	pub fn morphology_gradient(
		&self,
		width: u32,
		height: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::morphology_gradient(self, width, height, border, border_value)
	}

	/// Apply a normalized Gaussian blur with replicate borders.
	///
	/// Delegates to [`crate::image::gaussian_blur`].
	pub fn gaussian_blur(&self, sigma: f32, kernel_size: u32) -> Result<Self> {
		crate::image::gaussian_blur(self, sigma, kernel_size)
	}

	/// Apply a nonnegative four-neighbor sharpening amount.
	///
	/// Delegates to [`crate::image::sharpen`].
	pub fn sharpen(&self, amount: f32, border: BorderMode) -> Result<Self> {
		crate::image::sharpen(self, amount, border)
	}

	/// Select the median of an odd square neighborhood up to 15×15.
	///
	/// Delegates to [`crate::image::median_blur`].
	pub fn median_blur(&self, kernel_size: u32, border: BorderMode) -> Result<Self> {
		crate::image::median_blur(self, kernel_size, border)
	}

	/// Apply a bilateral neighborhood filter.
	///
	/// Delegates to [`crate::image::bilateral_filter`].
	pub fn bilateral_filter(
		&self,
		kernel_size: u32,
		sigma_color: f32,
		sigma_space: f32,
		border: BorderMode,
	) -> Result<Self> {
		crate::image::bilateral_filter(self, kernel_size, sigma_color, sigma_space, border)
	}

	/// Apply an unsharp mask using a Gaussian detail estimate.
	///
	/// Delegates to [`crate::image::unsharp_mask`].
	pub fn unsharp_mask(&self, sigma: f32, amount: f32, kernel_size: u32) -> Result<Self> {
		crate::image::unsharp_mask(self, sigma, amount, kernel_size)
	}

	/// Return the source minus its morphological opening.
	///
	/// Delegates to [`crate::image::morphology_top_hat`].
	pub fn morphology_top_hat(
		&self,
		width: u32,
		height: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::morphology_top_hat(self, width, height, border, border_value)
	}

	/// Return the morphological closing minus the source.
	///
	/// Delegates to [`crate::image::morphology_black_hat`].
	pub fn morphology_black_hat(
		&self,
		width: u32,
		height: u32,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::morphology_black_hat(self, width, height, border, border_value)
	}

	/// Threshold against the local arithmetic mean minus `c`.
	///
	/// Delegates to [`crate::image::adaptive_threshold_mean`].
	pub fn adaptive_threshold_mean(
		&self,
		kernel_size: u32,
		c: f32,
		max_value: f32,
		border: BorderMode,
	) -> Result<Self> {
		crate::image::adaptive_threshold_mean(self, kernel_size, c, max_value, border)
	}

	/// Threshold against a local Gaussian-weighted mean minus `c`.
	///
	/// Delegates to [`crate::image::adaptive_threshold_gaussian`].
	pub fn adaptive_threshold_gaussian(
		&self,
		kernel_size: u32,
		c: f32,
		max_value: f32,
		sigma: f32,
		border: BorderMode,
	) -> Result<Self> {
		crate::image::adaptive_threshold_gaussian(self, kernel_size, c, max_value, sigma, border)
	}

	/// Apply `(pixel - mean[channel]) / std[channel]` to up to three channels.
	///
	/// Delegates to [`crate::image::normalize`].
	pub fn normalize(&self, parameters: NormalizationConfig) -> Result<Self> {
		crate::image::normalize(self, parameters)
	}

	/// Convert between three-channel RGB and BGR semantics, including identity.
	///
	/// Delegates to [`crate::image::convert_color`].
	pub fn convert_color(&self, destination_format: crate::ImageFormat) -> Result<Self> {
		crate::image::convert_color(self, destination_format)
	}

	/// Bilinearly resize and normalize in one semantic and executable operation.
	///
	/// Delegates to [`crate::image::resize_normalize`].
	pub fn resize_normalize(
		&self,
		width: u32,
		height: u32,
		parameters: NormalizationConfig,
	) -> Result<Self> {
		crate::image::resize_normalize(self, width, height, parameters)
	}

	/// Blend a class palette over an RGB/RGBA image using an I32 label map.
	///
	/// Delegates to [`crate::image::segmentation_overlay`].
	pub fn segmentation_overlay(&self, mask: &Matrix, palette: &Matrix, alpha: f32) -> Result<Self> {
		crate::image::segmentation_overlay(self, mask, palette, alpha)
	}

	/// Accumulate a per-plane histogram over an FP32 NCHW or CHW image.
	///
	/// Delegates to [`crate::image::calc_hist`].
	pub fn calc_hist(&self, bins: u32, lower: f32, upper: f32) -> Result<Matrix> {
		crate::image::calc_hist(self, bins, lower, upper)
	}

	/// Equalize a normalized FP32 image histogram per `(batch, channel)` plane.
	///
	/// Delegates to [`crate::image::equalize_hist`].
	pub fn equalize_hist(&self) -> Result<Self> {
		crate::image::equalize_hist(self)
	}

	/// Halve an FP32 image with the `pyrDown` Gaussian-decimate contract.
	///
	/// Delegates to [`crate::image::pyr_down`].
	pub fn pyr_down(&self) -> Result<Self> {
		crate::image::pyr_down(self)
	}

	/// Double an FP32 image with the `pyrUp` interpolate-blur contract.
	///
	/// Delegates to [`crate::image::pyr_up`].
	pub fn pyr_up(&self) -> Result<Self> {
		crate::image::pyr_up(self)
	}

	/// Binary-threshold an FP32 image with a histogram-selected level.
	///
	/// Delegates to [`crate::image::threshold_auto`].
	pub fn threshold_auto(&self, method: AutoThreshold, max_value: f32) -> Result<(Image, Matrix)> {
		crate::image::threshold_auto(self, method, max_value)
	}

	/// Compute the per-plane summed-area table of an FP32 image.
	///
	/// Delegates to [`crate::image::integral`].
	pub fn integral(&self) -> Result<Matrix> {
		crate::image::integral(self)
	}

	/// Convert an FP32 image between color spaces following `cvtColor`.
	///
	/// Delegates to [`crate::image::cvt_color`].
	pub fn cvt_color(&self, conversion: ColorConversion) -> Result<Self> {
		crate::image::cvt_color(self, conversion)
	}

	/// Map a single-channel FP32 image to RGB through a colormap.
	///
	/// Delegates to [`crate::image::apply_color_map`].
	pub fn apply_color_map(&self, colormap: ColorMap) -> Result<Self> {
		crate::image::apply_color_map(self, colormap)
	}

	/// Back-project a per-plane U32 histogram onto an FP32 image.
	///
	/// Delegates to [`crate::image::calc_back_project`].
	pub fn calc_back_project(&self, histogram: &Matrix, lower: f32, upper: f32) -> Result<Self> {
		crate::image::calc_back_project(self, histogram, lower, upper)
	}

	/// Contrast-limited adaptive histogram equalization per plane.
	///
	/// Delegates to [`crate::image::clahe`].
	pub fn clahe(&self, clip_limit: f32, tile_width: u32, tile_height: u32) -> Result<Self> {
		crate::image::clahe(self, clip_limit, tile_width, tile_height)
	}

	/// Add one image to a running accumulation image elementwise,
	///
	/// Delegates to [`crate::image::accumulate`].
	pub fn accumulate(&self, accumulator: &Image) -> Result<Self> {
		crate::image::accumulate(self, accumulator)
	}

	/// Blend an image into a running average as
	///
	/// Delegates to [`crate::image::accumulate_weighted`].
	pub fn accumulate_weighted(&self, accumulator: &Image, alpha: f32) -> Result<Self> {
		crate::image::accumulate_weighted(self, accumulator, alpha)
	}

	/// Compute the ten spatial moments `m00, m10, m01, m20, m11, m02,
	///
	/// Delegates to [`crate::image::moments`].
	pub fn moments(&self) -> Result<Matrix> {
		crate::image::moments(self)
	}

	/// Peak signal-to-noise ratio per image plane in decibels,
	///
	/// Delegates to [`crate::image::psnr`].
	pub fn psnr(&self, second: &Image, peak_value: f32) -> Result<Matrix> {
		crate::image::psnr(self, second, peak_value)
	}

	/// Global structural similarity per image plane through a serial
	///
	/// Delegates to [`crate::image::ssim`].
	pub fn ssim(&self, second: &Image) -> Result<Matrix> {
		crate::image::ssim(self, second)
	}

	/// Slide a single-plane template over each image plane and write the
	///
	/// Delegates to [`crate::image::match_template`].
	pub fn match_template(&self, template: &Image, method: MatchTemplate) -> Result<Matrix> {
		crate::image::match_template(self, template, method)
	}

	/// Warp each image plane to polar coordinates about a center, following
	///
	/// Delegates to [`crate::image::warp_polar`].
	#[allow(clippy::too_many_arguments)]
	pub fn warp_polar(
		&self,
		center_x: f32,
		center_y: f32,
		max_radius: f32,
		out_width: u32,
		out_height: u32,
		mode: PolarMode,
		interpolation: InterpolationMode,
		border: BorderMode,
		border_value: f32,
	) -> Result<Self> {
		crate::image::warp_polar(
			self,
			center_x,
			center_y,
			max_radius,
			out_width,
			out_height,
			mode,
			interpolation,
			border,
			border_value,
		)
	}

	/// Canny edge detection per plane: 3x3 Sobel gradient magnitude,
	///
	/// Delegates to [`crate::image::canny`].
	pub fn canny(
		&self,
		low_threshold: f32,
		high_threshold: f32,
		hysteresis_passes: u32,
	) -> Result<Self> {
		crate::image::canny(self, low_threshold, high_threshold, hysteresis_passes)
	}

	/// Connected-component labeling per plane, following
	///
	/// Delegates to [`crate::image::connected_components`].
	pub fn connected_components(
		&self,
		threshold: f32,
		connectivity: Connectivity,
		propagation_passes: u32,
	) -> Result<Matrix> {
		crate::image::connected_components(self, threshold, connectivity, propagation_passes)
	}

	/// Distance transform per plane, following `distanceTransform`:
	///
	/// Delegates to [`crate::image::distance_transform`].
	pub fn distance_transform(
		&self,
		threshold: f32,
		distance: DistanceType,
		propagation_passes: u32,
	) -> Result<Matrix> {
		crate::image::distance_transform(self, threshold, distance, propagation_passes)
	}

	/// Standard Hough line transform per plane, following
	///
	/// Delegates to [`crate::image::hough_lines`].
	pub fn hough_lines(
		&self,
		edge_threshold: f32,
		rho_step: f32,
		theta_step: f32,
		threshold: u32,
		max_lines: u32,
	) -> Result<Matrix> {
		crate::image::hough_lines(
			self,
			edge_threshold,
			rho_step,
			theta_step,
			threshold,
			max_lines,
		)
	}

	/// Probabilistic Hough segment transform per plane, following
	///
	/// Delegates to [`crate::image::hough_lines_p`].
	#[allow(clippy::too_many_arguments)]
	pub fn hough_lines_p(
		&self,
		edge_threshold: f32,
		rho_step: f32,
		theta_step: f32,
		threshold: u32,
		max_lines: u32,
		min_line_length: f32,
		max_line_gap: u32,
	) -> Result<Matrix> {
		crate::image::hough_lines_p(
			self,
			edge_threshold,
			rho_step,
			theta_step,
			threshold,
			max_lines,
			min_line_length,
			max_line_gap,
		)
	}

	/// External contour extraction per plane, following `findContours`
	///
	/// Delegates to [`crate::image::find_contours`].
	pub fn find_contours(
		&self,
		threshold: f32,
		connectivity: Connectivity,
		max_contours: u32,
		max_points: u32,
		propagation_passes: u32,
	) -> Result<(Matrix, Matrix)> {
		crate::image::find_contours(
			self,
			threshold,
			connectivity,
			max_contours,
			max_points,
			propagation_passes,
		)
	}

	/// Floating-range flood fill per plane, following `floodFill`:
	///
	/// Delegates to [`crate::image::flood_fill`].
	#[allow(clippy::too_many_arguments)]
	pub fn flood_fill(
		&self,
		seed_x: u32,
		seed_y: u32,
		value: f32,
		lo_diff: f32,
		up_diff: f32,
		connectivity: Connectivity,
		propagation_passes: u32,
	) -> Result<Self> {
		crate::image::flood_fill(
			self,
			seed_x,
			seed_y,
			value,
			lo_diff,
			up_diff,
			connectivity,
			propagation_passes,
		)
	}

	/// Draw a straight segment over a copy of the input, following `line`:
	///
	/// Delegates to [`crate::image::draw_line`].
	pub fn draw_line(
		&self,
		x1: f32,
		y1: f32,
		x2: f32,
		y2: f32,
		color: f32,
		thickness: f32,
	) -> Result<Self> {
		crate::image::draw_line(self, x1, y1, x2, y2, color, thickness)
	}

	/// Draw a rectangle border or fill over a copy of the input, following
	///
	/// Delegates to [`crate::image::draw_rectangle`].
	pub fn draw_rectangle(
		&self,
		x: f32,
		y: f32,
		width: f32,
		height: f32,
		color: f32,
		thickness: f32,
	) -> Result<Self> {
		crate::image::draw_rectangle(self, x, y, width, height, color, thickness)
	}

	/// Draw a circle ring or disk over a copy of the input, following
	///
	/// Delegates to [`crate::image::draw_circle`].
	pub fn draw_circle(
		&self,
		cx: f32,
		cy: f32,
		radius: f32,
		color: f32,
		thickness: f32,
	) -> Result<Self> {
		crate::image::draw_circle(self, cx, cy, radius, color, thickness)
	}

	/// Fill a polygon over a copy of the input, following `fillPoly`: the
	///
	/// Delegates to [`crate::image::fill_polygon`].
	pub fn fill_polygon(&self, points: &Matrix, color: f32) -> Result<Self> {
		crate::image::fill_polygon(self, points, color)
	}

	/// Per-pixel corner response over each plane: 3x3 Sobel gradients feed
	///
	/// Delegates to [`crate::image::corner_score`].
	pub fn corner_score(&self, block_size: u32, k: f32, score_type: CornerScore) -> Result<Self> {
		crate::image::corner_score(self, block_size, k, score_type)
	}

	/// FAST corner response per plane on the radius-3 circle of 16
	///
	/// Delegates to [`crate::image::corner_fast`].
	pub fn corner_fast(&self, arc_length: u32) -> Result<Self> {
		crate::image::corner_fast(self, arc_length)
	}

	/// Bounded `goodFeaturesToTrack` selection over a per-plane corner
	///
	/// Delegates to [`crate::image::good_features_to_track`].
	pub fn good_features_to_track(
		&self,
		max_corners: u32,
		quality: f32,
		min_distance: f32,
	) -> Result<(Matrix, Matrix)> {
		crate::image::good_features_to_track(self, max_corners, quality, min_distance)
	}

	/// Bounded ORB keypoint + steered rBRIEF descriptor pipeline,
	///
	/// Delegates to [`crate::image::orb`].
	pub fn orb(
		&self,
		max_features: u32,
		quality: f32,
		min_distance: f32,
		levels: u32,
		edge: u32,
	) -> Result<(Matrix, Matrix, Matrix)> {
		crate::image::orb(self, max_features, quality, min_distance, levels, edge)
	}
}

#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, InterpolationMode) -> Result<Image> = crate::image::resize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, InterpolationMode) -> Result<Image> = Image::resize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, u32, u32) -> Result<Image> = crate::image::crop;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, u32, u32) -> Result<Image> = Image::crop;
#[allow(clippy::type_complexity)]
const _: fn(&Image, bool, bool) -> Result<Image> = crate::image::flip;
#[allow(clippy::type_complexity)]
const _: fn(&Image, bool, bool) -> Result<Image> = Image::flip;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32) -> Result<Image> = crate::image::rotate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32) -> Result<Image> = Image::rotate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::pad;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, u32, u32, BorderMode, f32) -> Result<Image> = Image::pad;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32) -> Result<Image> = crate::image::center_crop;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32) -> Result<Image> = Image::center_crop;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, InterpolationMode, BorderMode, f32) -> Result<Image> =
	crate::image::remap;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, InterpolationMode, BorderMode, f32) -> Result<Image> = Image::remap;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
	crate::image::warp_affine;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
	Image::warp_affine;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
	crate::image::warp_perspective;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
	Image::warp_perspective;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::threshold_binary;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = Image::threshold_binary;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::threshold_binary_inv;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = Image::threshold_binary_inv;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_truncate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = Image::threshold_truncate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_to_zero;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = Image::threshold_to_zero;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_to_zero_inv;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = Image::threshold_to_zero_inv;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32) -> Result<Image> = crate::image::in_range;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32) -> Result<Image> = Image::in_range;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::clamp;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = Image::clamp;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = crate::image::invert;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32) -> Result<Image> = Image::invert;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::brightness_contrast;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = Image::brightness_contrast;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::gamma_contrast;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = Image::gamma_contrast;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::solarize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32) -> Result<Image> = Image::solarize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32) -> Result<Image> = crate::image::posterize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32) -> Result<Image> = Image::posterize;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = crate::image::grayscale;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = Image::grayscale;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, f32) -> Result<Image> = crate::image::alpha_blend;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, f32) -> Result<Image> = Image::alpha_blend;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, &Image) -> Result<Image> = crate::image::composite;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, &Image) -> Result<Image> = Image::composite;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, u32, u32, f32) -> Result<Image> = crate::image::erase;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, u32, u32, f32) -> Result<Image> = Image::erase;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix) -> Result<Image> = crate::image::color_twist;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix) -> Result<Image> = Image::color_twist;
#[allow(clippy::type_complexity)]
const _: fn(&Image, [u32; 4], ImageFormat) -> Result<Image> = crate::image::channel_reorder;
#[allow(clippy::type_complexity)]
const _: fn(&Image, [u32; 4], ImageFormat) -> Result<Image> = Image::channel_reorder;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, u64) -> Result<Image> = crate::image::gaussian_noise;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, u64) -> Result<Image> = Image::gaussian_noise;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, u64) -> Result<Image> = crate::image::salt_pepper_noise;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, u64) -> Result<Image> = Image::salt_pepper_noise;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, BorderMode, f32) -> Result<Image> = crate::image::convolve_2d;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, BorderMode, f32) -> Result<Image> = Image::convolve_2d;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, &Matrix, BorderMode, f32) -> Result<Image> =
	crate::image::separable_convolve_2d;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, &Matrix, BorderMode, f32) -> Result<Image> =
	Image::separable_convolve_2d;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::average_blur;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::average_blur;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::sobel;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::sobel;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::scharr;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::scharr;
#[allow(clippy::type_complexity)]
const _: fn(&Image, BorderMode) -> Result<Image> = crate::image::laplacian;
#[allow(clippy::type_complexity)]
const _: fn(&Image, BorderMode) -> Result<Image> = Image::laplacian;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::erode;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::erode;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::dilate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::dilate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_open;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_open;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_close;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_close;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_gradient;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_gradient;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, u32) -> Result<Image> = crate::image::gaussian_blur;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, u32) -> Result<Image> = Image::gaussian_blur;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, BorderMode) -> Result<Image> = crate::image::sharpen;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, BorderMode) -> Result<Image> = Image::sharpen;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, BorderMode) -> Result<Image> = crate::image::median_blur;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, BorderMode) -> Result<Image> = Image::median_blur;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = crate::image::bilateral_filter;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = Image::bilateral_filter;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, u32) -> Result<Image> = crate::image::unsharp_mask;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, u32) -> Result<Image> = Image::unsharp_mask;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_top_hat;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_top_hat;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> =
	crate::image::morphology_black_hat;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_black_hat;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> =
	crate::image::adaptive_threshold_mean;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = Image::adaptive_threshold_mean;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, f32, BorderMode) -> Result<Image> =
	crate::image::adaptive_threshold_gaussian;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, f32, BorderMode) -> Result<Image> =
	Image::adaptive_threshold_gaussian;
#[allow(clippy::type_complexity)]
const _: fn(&Image, NormalizationConfig) -> Result<Image> = crate::image::normalize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, NormalizationConfig) -> Result<Image> = Image::normalize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, crate::ImageFormat) -> Result<Image> = crate::image::convert_color;
#[allow(clippy::type_complexity)]
const _: fn(&Image, crate::ImageFormat) -> Result<Image> = Image::convert_color;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, NormalizationConfig) -> Result<Image> =
	crate::image::resize_normalize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, NormalizationConfig) -> Result<Image> = Image::resize_normalize;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, &Matrix, f32) -> Result<Image> = crate::image::segmentation_overlay;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, &Matrix, f32) -> Result<Image> = Image::segmentation_overlay;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32) -> Result<Matrix> = crate::image::calc_hist;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32) -> Result<Matrix> = Image::calc_hist;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = crate::image::equalize_hist;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = Image::equalize_hist;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = crate::image::pyr_down;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = Image::pyr_down;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = crate::image::pyr_up;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Image> = Image::pyr_up;
#[allow(clippy::type_complexity)]
const _: fn(&Image, AutoThreshold, f32) -> Result<(Image, Matrix)> = crate::image::threshold_auto;
#[allow(clippy::type_complexity)]
const _: fn(&Image, AutoThreshold, f32) -> Result<(Image, Matrix)> = Image::threshold_auto;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Matrix> = crate::image::integral;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Matrix> = Image::integral;
#[allow(clippy::type_complexity)]
const _: fn(&Image, ColorConversion) -> Result<Image> = crate::image::cvt_color;
#[allow(clippy::type_complexity)]
const _: fn(&Image, ColorConversion) -> Result<Image> = Image::cvt_color;
#[allow(clippy::type_complexity)]
const _: fn(&Image, ColorMap) -> Result<Image> = crate::image::apply_color_map;
#[allow(clippy::type_complexity)]
const _: fn(&Image, ColorMap) -> Result<Image> = Image::apply_color_map;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, f32, f32) -> Result<Image> = crate::image::calc_back_project;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, f32, f32) -> Result<Image> = Image::calc_back_project;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, u32, u32) -> Result<Image> = crate::image::clahe;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, u32, u32) -> Result<Image> = Image::clahe;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image) -> Result<Image> = crate::image::accumulate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image) -> Result<Image> = Image::accumulate;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, f32) -> Result<Image> = crate::image::accumulate_weighted;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, f32) -> Result<Image> = Image::accumulate_weighted;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Matrix> = crate::image::moments;
#[allow(clippy::type_complexity)]
const _: fn(&Image) -> Result<Matrix> = Image::moments;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, f32) -> Result<Matrix> = crate::image::psnr;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, f32) -> Result<Matrix> = Image::psnr;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image) -> Result<Matrix> = crate::image::ssim;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image) -> Result<Matrix> = Image::ssim;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, MatchTemplate) -> Result<Matrix> = crate::image::match_template;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Image, MatchTemplate) -> Result<Matrix> = Image::match_template;
#[allow(clippy::type_complexity)]
const _: fn(
	&Image,
	f32,
	f32,
	f32,
	u32,
	u32,
	PolarMode,
	InterpolationMode,
	BorderMode,
	f32,
) -> Result<Image> = crate::image::warp_polar;
#[allow(clippy::type_complexity)]
const _: fn(
	&Image,
	f32,
	f32,
	f32,
	u32,
	u32,
	PolarMode,
	InterpolationMode,
	BorderMode,
	f32,
) -> Result<Image> = Image::warp_polar;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, u32) -> Result<Image> = crate::image::canny;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, u32) -> Result<Image> = Image::canny;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, Connectivity, u32) -> Result<Matrix> = crate::image::connected_components;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, Connectivity, u32) -> Result<Matrix> = Image::connected_components;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, DistanceType, u32) -> Result<Matrix> = crate::image::distance_transform;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, DistanceType, u32) -> Result<Matrix> = Image::distance_transform;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, u32, u32) -> Result<Matrix> = crate::image::hough_lines;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, u32, u32) -> Result<Matrix> = Image::hough_lines;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, u32, u32, f32, u32) -> Result<Matrix> =
	crate::image::hough_lines_p;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, u32, u32, f32, u32) -> Result<Matrix> = Image::hough_lines_p;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, Connectivity, u32, u32, u32) -> Result<(Matrix, Matrix)> =
	crate::image::find_contours;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, Connectivity, u32, u32, u32) -> Result<(Matrix, Matrix)> =
	Image::find_contours;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, f32, f32, f32, Connectivity, u32) -> Result<Image> =
	crate::image::flood_fill;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, u32, f32, f32, f32, Connectivity, u32) -> Result<Image> =
	Image::flood_fill;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = crate::image::draw_line;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = Image::draw_line;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = crate::image::draw_rectangle;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = Image::draw_rectangle;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, f32, f32) -> Result<Image> = crate::image::draw_circle;
#[allow(clippy::type_complexity)]
const _: fn(&Image, f32, f32, f32, f32, f32) -> Result<Image> = Image::draw_circle;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, f32) -> Result<Image> = crate::image::fill_polygon;
#[allow(clippy::type_complexity)]
const _: fn(&Image, &Matrix, f32) -> Result<Image> = Image::fill_polygon;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, CornerScore) -> Result<Image> = crate::image::corner_score;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, CornerScore) -> Result<Image> = Image::corner_score;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32) -> Result<Image> = crate::image::corner_fast;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32) -> Result<Image> = Image::corner_fast;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32) -> Result<(Matrix, Matrix)> =
	crate::image::good_features_to_track;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32) -> Result<(Matrix, Matrix)> = Image::good_features_to_track;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, u32, u32) -> Result<(Matrix, Matrix, Matrix)> =
	crate::image::orb;
#[allow(clippy::type_complexity)]
const _: fn(&Image, u32, f32, f32, u32, u32) -> Result<(Matrix, Matrix, Matrix)> = Image::orb;