Skip to main content

oa/image/
image.gen.rs

1// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
2// schema=image.json schema_version=1 generator_version=64
3// schema_sha256=850fff7da094fda90deb1885822908eb59de961a0e67423335fc6de4de68b058
4use crate::image::{
5	AutoThreshold, BorderMode, ColorConversion, ColorMap, Connectivity, CornerScore, DistanceType,
6	ImageFormat, InterpolationMode, MatchTemplate, NormalizationConfig, PolarMode,
7};
8use crate::{Image, Matrix, Result};
9
10impl Image {
11	/// Resize an FP32 channel-first image while preserving its layout and format.
12	///
13	/// Delegates to [`crate::image::resize`].
14	pub fn resize(
15		&self,
16		target_width: u32,
17		target_height: u32,
18		interpolation: InterpolationMode,
19	) -> Result<Self> {
20		crate::image::resize(self, target_width, target_height, interpolation)
21	}
22
23	/// Extract a region, clipping its right and bottom edges to the source extent.
24	///
25	/// Delegates to [`crate::image::crop`].
26	pub fn crop(&self, x: u32, y: u32, width: u32, height: u32) -> Result<Self> {
27		crate::image::crop(self, x, y, width, height)
28	}
29
30	/// Flip an image horizontally, vertically, or along both axes.
31	///
32	/// Delegates to [`crate::image::flip`].
33	pub fn flip(&self, horizontal: bool, vertical: bool) -> Result<Self> {
34		crate::image::flip(self, horizontal, vertical)
35	}
36
37	/// Rotate clockwise by a multiple of 90 degrees.
38	///
39	/// Delegates to [`crate::image::rotate`].
40	pub fn rotate(&self, degrees: u32) -> Result<Self> {
41		crate::image::rotate(self, degrees)
42	}
43
44	/// Add asymmetric padding with an explicit border policy.
45	///
46	/// Delegates to [`crate::image::pad`].
47	pub fn pad(
48		&self,
49		left: u32,
50		right: u32,
51		top: u32,
52		bottom: u32,
53		border: BorderMode,
54		border_value: f32,
55	) -> Result<Self> {
56		crate::image::pad(self, left, right, top, bottom, border, border_value)
57	}
58
59	/// Extract a centered region with the requested exact extent.
60	///
61	/// Delegates to [`crate::image::center_crop`].
62	pub fn center_crop(&self, width: u32, height: u32) -> Result<Self> {
63		crate::image::center_crop(self, width, height)
64	}
65
66	/// Resample an image from an FP32 absolute-coordinate map shaped
67	///
68	/// Delegates to [`crate::image::remap`].
69	pub fn remap(
70		&self,
71		map: &Matrix,
72		interpolation: InterpolationMode,
73		border: BorderMode,
74		border_value: f32,
75	) -> Result<Self> {
76		crate::image::remap(self, map, interpolation, border, border_value)
77	}
78
79	/// Apply an inverse FP32 2x3 affine transform to an image.
80	///
81	/// Delegates to [`crate::image::warp_affine`].
82	pub fn warp_affine(
83		&self,
84		transform: &Matrix,
85		width: u32,
86		height: u32,
87		interpolation: InterpolationMode,
88		border: BorderMode,
89		border_value: f32,
90	) -> Result<Self> {
91		crate::image::warp_affine(
92			self,
93			transform,
94			width,
95			height,
96			interpolation,
97			border,
98			border_value,
99		)
100	}
101
102	/// Apply an inverse FP32 3x3 perspective transform to an image.
103	///
104	/// Delegates to [`crate::image::warp_perspective`].
105	pub fn warp_perspective(
106		&self,
107		transform: &Matrix,
108		width: u32,
109		height: u32,
110		interpolation: InterpolationMode,
111		border: BorderMode,
112		border_value: f32,
113	) -> Result<Self> {
114		crate::image::warp_perspective(
115			self,
116			transform,
117			width,
118			height,
119			interpolation,
120			border,
121			border_value,
122		)
123	}
124
125	/// Replace values above `threshold` with `max_value` and all others with zero.
126	///
127	/// Delegates to [`crate::image::threshold_binary`].
128	pub fn threshold_binary(&self, threshold: f32, max_value: f32) -> Result<Self> {
129		crate::image::threshold_binary(self, threshold, max_value)
130	}
131
132	/// Replace values at or below `threshold` with `max_value` and all others with zero.
133	///
134	/// Delegates to [`crate::image::threshold_binary_inv`].
135	pub fn threshold_binary_inv(&self, threshold: f32, max_value: f32) -> Result<Self> {
136		crate::image::threshold_binary_inv(self, threshold, max_value)
137	}
138
139	/// Truncate values above `threshold`.
140	///
141	/// Delegates to [`crate::image::threshold_truncate`].
142	pub fn threshold_truncate(&self, threshold: f32) -> Result<Self> {
143		crate::image::threshold_truncate(self, threshold)
144	}
145
146	/// Replace values at or below `threshold` with zero.
147	///
148	/// Delegates to [`crate::image::threshold_to_zero`].
149	pub fn threshold_to_zero(&self, threshold: f32) -> Result<Self> {
150		crate::image::threshold_to_zero(self, threshold)
151	}
152
153	/// Replace values above `threshold` with zero.
154	///
155	/// Delegates to [`crate::image::threshold_to_zero_inv`].
156	pub fn threshold_to_zero_inv(&self, threshold: f32) -> Result<Self> {
157		crate::image::threshold_to_zero_inv(self, threshold)
158	}
159
160	/// Produce `true_value` for values inside the inclusive interval and zero outside it.
161	///
162	/// Delegates to [`crate::image::in_range`].
163	pub fn in_range(&self, low: f32, high: f32, true_value: f32) -> Result<Self> {
164		crate::image::in_range(self, low, high, true_value)
165	}
166
167	/// Clamp every pixel to the inclusive interval.
168	///
169	/// Delegates to [`crate::image::clamp`].
170	pub fn clamp(&self, low: f32, high: f32) -> Result<Self> {
171		crate::image::clamp(self, low, high)
172	}
173
174	/// Invert every value around `max_value`.
175	///
176	/// Delegates to [`crate::image::invert`].
177	pub fn invert(&self, max_value: f32) -> Result<Self> {
178		crate::image::invert(self, max_value)
179	}
180
181	/// Apply `value * contrast + brightness`.
182	///
183	/// Delegates to [`crate::image::brightness_contrast`].
184	pub fn brightness_contrast(&self, brightness: f32, contrast: f32) -> Result<Self> {
185		crate::image::brightness_contrast(self, brightness, contrast)
186	}
187
188	/// Apply `max(value, 0)^gamma * gain`.
189	///
190	/// Delegates to [`crate::image::gamma_contrast`].
191	pub fn gamma_contrast(&self, gamma: f32, gain: f32) -> Result<Self> {
192		crate::image::gamma_contrast(self, gamma, gain)
193	}
194
195	/// Invert values at or above `threshold` around `max_value`.
196	///
197	/// Delegates to [`crate::image::solarize`].
198	pub fn solarize(&self, threshold: f32, max_value: f32) -> Result<Self> {
199		crate::image::solarize(self, threshold, max_value)
200	}
201
202	/// Quantize `[low, high]` to `levels` evenly spaced values using round-half-up.
203	///
204	/// Delegates to [`crate::image::posterize`].
205	pub fn posterize(&self, levels: u32, low: f32, high: f32) -> Result<Self> {
206		crate::image::posterize(self, levels, low, high)
207	}
208
209	/// Convert an RGB or RGBA image to Rec.709 grayscale.
210	///
211	/// Delegates to [`crate::image::grayscale`].
212	pub fn grayscale(&self) -> Result<Self> {
213		crate::image::grayscale(self)
214	}
215
216	/// Blend two equal semantic images using `left * (1-alpha) + right * alpha`.
217	///
218	/// Delegates to [`crate::image::alpha_blend`].
219	pub fn alpha_blend(&self, right: &Image, alpha: f32) -> Result<Self> {
220		crate::image::alpha_blend(self, right, alpha)
221	}
222
223	/// Composite two equal images with a clamped Gray or per-channel mask.
224	///
225	/// Delegates to [`crate::image::composite`].
226	pub fn composite(&self, right: &Image, mask: &Image) -> Result<Self> {
227		crate::image::composite(self, right, mask)
228	}
229
230	/// Fill the intersection of a rectangle and the image with one finite value.
231	///
232	/// Delegates to [`crate::image::erase`].
233	pub fn erase(&self, x: u32, y: u32, width: u32, height: u32, value: f32) -> Result<Self> {
234		crate::image::erase(self, x, y, width, height, value)
235	}
236
237	/// Apply one shared FP32 `[3, 4]` affine color transform to RGB channels.
238	///
239	/// Delegates to [`crate::image::color_twist`].
240	pub fn color_twist(&self, transform: &Matrix) -> Result<Self> {
241		crate::image::color_twist(self, transform)
242	}
243
244	/// Reorder one to four channels and explicitly assign the resulting format.
245	///
246	/// Delegates to [`crate::image::channel_reorder`].
247	pub fn channel_reorder(&self, order: [u32; 4], output_format: ImageFormat) -> Result<Self> {
248		crate::image::channel_reorder(self, order, output_format)
249	}
250
251	/// Add explicit-seed Philox Gaussian noise to every pixel.
252	///
253	/// Delegates to [`crate::image::gaussian_noise`].
254	pub fn gaussian_noise(&self, mean: f32, stddev: f32, seed: u64) -> Result<Self> {
255		crate::image::gaussian_noise(self, mean, stddev, seed)
256	}
257
258	/// Replace a seeded fraction of pixels with salt or pepper values.
259	///
260	/// Delegates to [`crate::image::salt_pepper_noise`].
261	pub fn salt_pepper_noise(
262		&self,
263		probability: f32,
264		salt_value: f32,
265		pepper_value: f32,
266		seed: u64,
267	) -> Result<Self> {
268		crate::image::salt_pepper_noise(self, probability, salt_value, pepper_value, seed)
269	}
270
271	/// Apply same-shape 2D cross-correlation with an odd FP32 kernel up to 31×31.
272	///
273	/// Delegates to [`crate::image::convolve_2d`].
274	pub fn convolve_2d(
275		&self,
276		kernel: &Matrix,
277		border: BorderMode,
278		border_value: f32,
279	) -> Result<Self> {
280		crate::image::convolve_2d(self, kernel, border, border_value)
281	}
282
283	/// Apply horizontal and vertical odd FP32 vector kernels up to length 31.
284	///
285	/// Delegates to [`crate::image::separable_convolve_2d`].
286	pub fn separable_convolve_2d(
287		&self,
288		kernel_x: &Matrix,
289		kernel_y: &Matrix,
290		border: BorderMode,
291		border_value: f32,
292	) -> Result<Self> {
293		crate::image::separable_convolve_2d(self, kernel_x, kernel_y, border, border_value)
294	}
295
296	/// Average an odd rectangular neighborhood up to 31×31.
297	///
298	/// Delegates to [`crate::image::average_blur`].
299	pub fn average_blur(&self, width: u32, height: u32, border: BorderMode) -> Result<Self> {
300		crate::image::average_blur(self, width, height, border)
301	}
302
303	/// Compute one first-order Sobel derivative.
304	///
305	/// Delegates to [`crate::image::sobel`].
306	pub fn sobel(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self> {
307		crate::image::sobel(self, dx, dy, border)
308	}
309
310	/// Compute one first-order Scharr derivative.
311	///
312	/// Delegates to [`crate::image::scharr`].
313	pub fn scharr(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self> {
314		crate::image::scharr(self, dx, dy, border)
315	}
316
317	/// Apply the four-neighbor discrete Laplacian.
318	///
319	/// Delegates to [`crate::image::laplacian`].
320	pub fn laplacian(&self, border: BorderMode) -> Result<Self> {
321		crate::image::laplacian(self, border)
322	}
323
324	/// Erode with an odd rectangular structuring element up to 31×31.
325	///
326	/// Delegates to [`crate::image::erode`].
327	pub fn erode(
328		&self,
329		width: u32,
330		height: u32,
331		border: BorderMode,
332		border_value: f32,
333	) -> Result<Self> {
334		crate::image::erode(self, width, height, border, border_value)
335	}
336
337	/// Dilate with an odd rectangular structuring element up to 31×31.
338	///
339	/// Delegates to [`crate::image::dilate`].
340	pub fn dilate(
341		&self,
342		width: u32,
343		height: u32,
344		border: BorderMode,
345		border_value: f32,
346	) -> Result<Self> {
347		crate::image::dilate(self, width, height, border, border_value)
348	}
349
350	/// Erode and then dilate with the same rectangular element.
351	///
352	/// Delegates to [`crate::image::morphology_open`].
353	pub fn morphology_open(
354		&self,
355		width: u32,
356		height: u32,
357		border: BorderMode,
358		border_value: f32,
359	) -> Result<Self> {
360		crate::image::morphology_open(self, width, height, border, border_value)
361	}
362
363	/// Dilate and then erode with the same rectangular element.
364	///
365	/// Delegates to [`crate::image::morphology_close`].
366	pub fn morphology_close(
367		&self,
368		width: u32,
369		height: u32,
370		border: BorderMode,
371		border_value: f32,
372	) -> Result<Self> {
373		crate::image::morphology_close(self, width, height, border, border_value)
374	}
375
376	/// Return dilation minus erosion.
377	///
378	/// Delegates to [`crate::image::morphology_gradient`].
379	pub fn morphology_gradient(
380		&self,
381		width: u32,
382		height: u32,
383		border: BorderMode,
384		border_value: f32,
385	) -> Result<Self> {
386		crate::image::morphology_gradient(self, width, height, border, border_value)
387	}
388
389	/// Apply a normalized Gaussian blur with replicate borders.
390	///
391	/// Delegates to [`crate::image::gaussian_blur`].
392	pub fn gaussian_blur(&self, sigma: f32, kernel_size: u32) -> Result<Self> {
393		crate::image::gaussian_blur(self, sigma, kernel_size)
394	}
395
396	/// Apply a nonnegative four-neighbor sharpening amount.
397	///
398	/// Delegates to [`crate::image::sharpen`].
399	pub fn sharpen(&self, amount: f32, border: BorderMode) -> Result<Self> {
400		crate::image::sharpen(self, amount, border)
401	}
402
403	/// Select the median of an odd square neighborhood up to 15×15.
404	///
405	/// Delegates to [`crate::image::median_blur`].
406	pub fn median_blur(&self, kernel_size: u32, border: BorderMode) -> Result<Self> {
407		crate::image::median_blur(self, kernel_size, border)
408	}
409
410	/// Apply a bilateral neighborhood filter.
411	///
412	/// Delegates to [`crate::image::bilateral_filter`].
413	pub fn bilateral_filter(
414		&self,
415		kernel_size: u32,
416		sigma_color: f32,
417		sigma_space: f32,
418		border: BorderMode,
419	) -> Result<Self> {
420		crate::image::bilateral_filter(self, kernel_size, sigma_color, sigma_space, border)
421	}
422
423	/// Apply an unsharp mask using a Gaussian detail estimate.
424	///
425	/// Delegates to [`crate::image::unsharp_mask`].
426	pub fn unsharp_mask(&self, sigma: f32, amount: f32, kernel_size: u32) -> Result<Self> {
427		crate::image::unsharp_mask(self, sigma, amount, kernel_size)
428	}
429
430	/// Return the source minus its morphological opening.
431	///
432	/// Delegates to [`crate::image::morphology_top_hat`].
433	pub fn morphology_top_hat(
434		&self,
435		width: u32,
436		height: u32,
437		border: BorderMode,
438		border_value: f32,
439	) -> Result<Self> {
440		crate::image::morphology_top_hat(self, width, height, border, border_value)
441	}
442
443	/// Return the morphological closing minus the source.
444	///
445	/// Delegates to [`crate::image::morphology_black_hat`].
446	pub fn morphology_black_hat(
447		&self,
448		width: u32,
449		height: u32,
450		border: BorderMode,
451		border_value: f32,
452	) -> Result<Self> {
453		crate::image::morphology_black_hat(self, width, height, border, border_value)
454	}
455
456	/// Threshold against the local arithmetic mean minus `c`.
457	///
458	/// Delegates to [`crate::image::adaptive_threshold_mean`].
459	pub fn adaptive_threshold_mean(
460		&self,
461		kernel_size: u32,
462		c: f32,
463		max_value: f32,
464		border: BorderMode,
465	) -> Result<Self> {
466		crate::image::adaptive_threshold_mean(self, kernel_size, c, max_value, border)
467	}
468
469	/// Threshold against a local Gaussian-weighted mean minus `c`.
470	///
471	/// Delegates to [`crate::image::adaptive_threshold_gaussian`].
472	pub fn adaptive_threshold_gaussian(
473		&self,
474		kernel_size: u32,
475		c: f32,
476		max_value: f32,
477		sigma: f32,
478		border: BorderMode,
479	) -> Result<Self> {
480		crate::image::adaptive_threshold_gaussian(self, kernel_size, c, max_value, sigma, border)
481	}
482
483	/// Apply `(pixel - mean[channel]) / std[channel]` to up to three channels.
484	///
485	/// Delegates to [`crate::image::normalize`].
486	pub fn normalize(&self, parameters: NormalizationConfig) -> Result<Self> {
487		crate::image::normalize(self, parameters)
488	}
489
490	/// Convert between three-channel RGB and BGR semantics, including identity.
491	///
492	/// Delegates to [`crate::image::convert_color`].
493	pub fn convert_color(&self, destination_format: crate::ImageFormat) -> Result<Self> {
494		crate::image::convert_color(self, destination_format)
495	}
496
497	/// Bilinearly resize and normalize in one semantic and executable operation.
498	///
499	/// Delegates to [`crate::image::resize_normalize`].
500	pub fn resize_normalize(
501		&self,
502		width: u32,
503		height: u32,
504		parameters: NormalizationConfig,
505	) -> Result<Self> {
506		crate::image::resize_normalize(self, width, height, parameters)
507	}
508
509	/// Blend a class palette over an RGB/RGBA image using an I32 label map.
510	///
511	/// Delegates to [`crate::image::segmentation_overlay`].
512	pub fn segmentation_overlay(&self, mask: &Matrix, palette: &Matrix, alpha: f32) -> Result<Self> {
513		crate::image::segmentation_overlay(self, mask, palette, alpha)
514	}
515
516	/// Accumulate a per-plane histogram over an FP32 NCHW or CHW image.
517	///
518	/// Delegates to [`crate::image::calc_hist`].
519	pub fn calc_hist(&self, bins: u32, lower: f32, upper: f32) -> Result<Matrix> {
520		crate::image::calc_hist(self, bins, lower, upper)
521	}
522
523	/// Equalize a normalized FP32 image histogram per `(batch, channel)` plane.
524	///
525	/// Delegates to [`crate::image::equalize_hist`].
526	pub fn equalize_hist(&self) -> Result<Self> {
527		crate::image::equalize_hist(self)
528	}
529
530	/// Halve an FP32 image with the `pyrDown` Gaussian-decimate contract.
531	///
532	/// Delegates to [`crate::image::pyr_down`].
533	pub fn pyr_down(&self) -> Result<Self> {
534		crate::image::pyr_down(self)
535	}
536
537	/// Double an FP32 image with the `pyrUp` interpolate-blur contract.
538	///
539	/// Delegates to [`crate::image::pyr_up`].
540	pub fn pyr_up(&self) -> Result<Self> {
541		crate::image::pyr_up(self)
542	}
543
544	/// Binary-threshold an FP32 image with a histogram-selected level.
545	///
546	/// Delegates to [`crate::image::threshold_auto`].
547	pub fn threshold_auto(&self, method: AutoThreshold, max_value: f32) -> Result<(Image, Matrix)> {
548		crate::image::threshold_auto(self, method, max_value)
549	}
550
551	/// Compute the per-plane summed-area table of an FP32 image.
552	///
553	/// Delegates to [`crate::image::integral`].
554	pub fn integral(&self) -> Result<Matrix> {
555		crate::image::integral(self)
556	}
557
558	/// Convert an FP32 image between color spaces following `cvtColor`.
559	///
560	/// Delegates to [`crate::image::cvt_color`].
561	pub fn cvt_color(&self, conversion: ColorConversion) -> Result<Self> {
562		crate::image::cvt_color(self, conversion)
563	}
564
565	/// Map a single-channel FP32 image to RGB through a colormap.
566	///
567	/// Delegates to [`crate::image::apply_color_map`].
568	pub fn apply_color_map(&self, colormap: ColorMap) -> Result<Self> {
569		crate::image::apply_color_map(self, colormap)
570	}
571
572	/// Back-project a per-plane U32 histogram onto an FP32 image.
573	///
574	/// Delegates to [`crate::image::calc_back_project`].
575	pub fn calc_back_project(&self, histogram: &Matrix, lower: f32, upper: f32) -> Result<Self> {
576		crate::image::calc_back_project(self, histogram, lower, upper)
577	}
578
579	/// Contrast-limited adaptive histogram equalization per plane.
580	///
581	/// Delegates to [`crate::image::clahe`].
582	pub fn clahe(&self, clip_limit: f32, tile_width: u32, tile_height: u32) -> Result<Self> {
583		crate::image::clahe(self, clip_limit, tile_width, tile_height)
584	}
585
586	/// Add one image to a running accumulation image elementwise,
587	///
588	/// Delegates to [`crate::image::accumulate`].
589	pub fn accumulate(&self, accumulator: &Image) -> Result<Self> {
590		crate::image::accumulate(self, accumulator)
591	}
592
593	/// Blend an image into a running average as
594	///
595	/// Delegates to [`crate::image::accumulate_weighted`].
596	pub fn accumulate_weighted(&self, accumulator: &Image, alpha: f32) -> Result<Self> {
597		crate::image::accumulate_weighted(self, accumulator, alpha)
598	}
599
600	/// Compute the ten spatial moments `m00, m10, m01, m20, m11, m02,
601	///
602	/// Delegates to [`crate::image::moments`].
603	pub fn moments(&self) -> Result<Matrix> {
604		crate::image::moments(self)
605	}
606
607	/// Peak signal-to-noise ratio per image plane in decibels,
608	///
609	/// Delegates to [`crate::image::psnr`].
610	pub fn psnr(&self, second: &Image, peak_value: f32) -> Result<Matrix> {
611		crate::image::psnr(self, second, peak_value)
612	}
613
614	/// Global structural similarity per image plane through a serial
615	///
616	/// Delegates to [`crate::image::ssim`].
617	pub fn ssim(&self, second: &Image) -> Result<Matrix> {
618		crate::image::ssim(self, second)
619	}
620
621	/// Slide a single-plane template over each image plane and write the
622	///
623	/// Delegates to [`crate::image::match_template`].
624	pub fn match_template(&self, template: &Image, method: MatchTemplate) -> Result<Matrix> {
625		crate::image::match_template(self, template, method)
626	}
627
628	/// Warp each image plane to polar coordinates about a center, following
629	///
630	/// Delegates to [`crate::image::warp_polar`].
631	#[allow(clippy::too_many_arguments)]
632	pub fn warp_polar(
633		&self,
634		center_x: f32,
635		center_y: f32,
636		max_radius: f32,
637		out_width: u32,
638		out_height: u32,
639		mode: PolarMode,
640		interpolation: InterpolationMode,
641		border: BorderMode,
642		border_value: f32,
643	) -> Result<Self> {
644		crate::image::warp_polar(
645			self,
646			center_x,
647			center_y,
648			max_radius,
649			out_width,
650			out_height,
651			mode,
652			interpolation,
653			border,
654			border_value,
655		)
656	}
657
658	/// Canny edge detection per plane: 3x3 Sobel gradient magnitude,
659	///
660	/// Delegates to [`crate::image::canny`].
661	pub fn canny(
662		&self,
663		low_threshold: f32,
664		high_threshold: f32,
665		hysteresis_passes: u32,
666	) -> Result<Self> {
667		crate::image::canny(self, low_threshold, high_threshold, hysteresis_passes)
668	}
669
670	/// Connected-component labeling per plane, following
671	///
672	/// Delegates to [`crate::image::connected_components`].
673	pub fn connected_components(
674		&self,
675		threshold: f32,
676		connectivity: Connectivity,
677		propagation_passes: u32,
678	) -> Result<Matrix> {
679		crate::image::connected_components(self, threshold, connectivity, propagation_passes)
680	}
681
682	/// Distance transform per plane, following `distanceTransform`:
683	///
684	/// Delegates to [`crate::image::distance_transform`].
685	pub fn distance_transform(
686		&self,
687		threshold: f32,
688		distance: DistanceType,
689		propagation_passes: u32,
690	) -> Result<Matrix> {
691		crate::image::distance_transform(self, threshold, distance, propagation_passes)
692	}
693
694	/// Standard Hough line transform per plane, following
695	///
696	/// Delegates to [`crate::image::hough_lines`].
697	pub fn hough_lines(
698		&self,
699		edge_threshold: f32,
700		rho_step: f32,
701		theta_step: f32,
702		threshold: u32,
703		max_lines: u32,
704	) -> Result<Matrix> {
705		crate::image::hough_lines(
706			self,
707			edge_threshold,
708			rho_step,
709			theta_step,
710			threshold,
711			max_lines,
712		)
713	}
714
715	/// Probabilistic Hough segment transform per plane, following
716	///
717	/// Delegates to [`crate::image::hough_lines_p`].
718	#[allow(clippy::too_many_arguments)]
719	pub fn hough_lines_p(
720		&self,
721		edge_threshold: f32,
722		rho_step: f32,
723		theta_step: f32,
724		threshold: u32,
725		max_lines: u32,
726		min_line_length: f32,
727		max_line_gap: u32,
728	) -> Result<Matrix> {
729		crate::image::hough_lines_p(
730			self,
731			edge_threshold,
732			rho_step,
733			theta_step,
734			threshold,
735			max_lines,
736			min_line_length,
737			max_line_gap,
738		)
739	}
740
741	/// External contour extraction per plane, following `findContours`
742	///
743	/// Delegates to [`crate::image::find_contours`].
744	pub fn find_contours(
745		&self,
746		threshold: f32,
747		connectivity: Connectivity,
748		max_contours: u32,
749		max_points: u32,
750		propagation_passes: u32,
751	) -> Result<(Matrix, Matrix)> {
752		crate::image::find_contours(
753			self,
754			threshold,
755			connectivity,
756			max_contours,
757			max_points,
758			propagation_passes,
759		)
760	}
761
762	/// Floating-range flood fill per plane, following `floodFill`:
763	///
764	/// Delegates to [`crate::image::flood_fill`].
765	#[allow(clippy::too_many_arguments)]
766	pub fn flood_fill(
767		&self,
768		seed_x: u32,
769		seed_y: u32,
770		value: f32,
771		lo_diff: f32,
772		up_diff: f32,
773		connectivity: Connectivity,
774		propagation_passes: u32,
775	) -> Result<Self> {
776		crate::image::flood_fill(
777			self,
778			seed_x,
779			seed_y,
780			value,
781			lo_diff,
782			up_diff,
783			connectivity,
784			propagation_passes,
785		)
786	}
787
788	/// Draw a straight segment over a copy of the input, following `line`:
789	///
790	/// Delegates to [`crate::image::draw_line`].
791	pub fn draw_line(
792		&self,
793		x1: f32,
794		y1: f32,
795		x2: f32,
796		y2: f32,
797		color: f32,
798		thickness: f32,
799	) -> Result<Self> {
800		crate::image::draw_line(self, x1, y1, x2, y2, color, thickness)
801	}
802
803	/// Draw a rectangle border or fill over a copy of the input, following
804	///
805	/// Delegates to [`crate::image::draw_rectangle`].
806	pub fn draw_rectangle(
807		&self,
808		x: f32,
809		y: f32,
810		width: f32,
811		height: f32,
812		color: f32,
813		thickness: f32,
814	) -> Result<Self> {
815		crate::image::draw_rectangle(self, x, y, width, height, color, thickness)
816	}
817
818	/// Draw a circle ring or disk over a copy of the input, following
819	///
820	/// Delegates to [`crate::image::draw_circle`].
821	pub fn draw_circle(
822		&self,
823		cx: f32,
824		cy: f32,
825		radius: f32,
826		color: f32,
827		thickness: f32,
828	) -> Result<Self> {
829		crate::image::draw_circle(self, cx, cy, radius, color, thickness)
830	}
831
832	/// Fill a polygon over a copy of the input, following `fillPoly`: the
833	///
834	/// Delegates to [`crate::image::fill_polygon`].
835	pub fn fill_polygon(&self, points: &Matrix, color: f32) -> Result<Self> {
836		crate::image::fill_polygon(self, points, color)
837	}
838
839	/// Per-pixel corner response over each plane: 3x3 Sobel gradients feed
840	///
841	/// Delegates to [`crate::image::corner_score`].
842	pub fn corner_score(&self, block_size: u32, k: f32, score_type: CornerScore) -> Result<Self> {
843		crate::image::corner_score(self, block_size, k, score_type)
844	}
845
846	/// FAST corner response per plane on the radius-3 circle of 16
847	///
848	/// Delegates to [`crate::image::corner_fast`].
849	pub fn corner_fast(&self, arc_length: u32) -> Result<Self> {
850		crate::image::corner_fast(self, arc_length)
851	}
852
853	/// Bounded `goodFeaturesToTrack` selection over a per-plane corner
854	///
855	/// Delegates to [`crate::image::good_features_to_track`].
856	pub fn good_features_to_track(
857		&self,
858		max_corners: u32,
859		quality: f32,
860		min_distance: f32,
861	) -> Result<(Matrix, Matrix)> {
862		crate::image::good_features_to_track(self, max_corners, quality, min_distance)
863	}
864
865	/// Bounded ORB keypoint + steered rBRIEF descriptor pipeline,
866	///
867	/// Delegates to [`crate::image::orb`].
868	pub fn orb(
869		&self,
870		max_features: u32,
871		quality: f32,
872		min_distance: f32,
873		levels: u32,
874		edge: u32,
875	) -> Result<(Matrix, Matrix, Matrix)> {
876		crate::image::orb(self, max_features, quality, min_distance, levels, edge)
877	}
878
879	/// Sparse Lucas-Kanade optical flow with image pyramids,
880	///
881	/// Delegates to [`crate::image::optical_flow_pyr_lk`].
882	pub fn optical_flow_pyr_lk(
883		&self,
884		next: &Image,
885		points: &Matrix,
886		levels: u32,
887		window: u32,
888		iterations: u32,
889		min_eigen: f32,
890	) -> Result<(Matrix, Matrix, Matrix)> {
891		crate::image::optical_flow_pyr_lk(self, next, points, levels, window, iterations, min_eigen)
892	}
893
894	/// Dense Farneback optical flow over a 2x image pyramid,
895	///
896	/// Delegates to [`crate::image::optical_flow_farneback`].
897	pub fn optical_flow_farneback(
898		&self,
899		next: &Image,
900		levels: u32,
901		window: u32,
902		iterations: u32,
903		poly_n: u32,
904		poly_sigma: f32,
905	) -> Result<Matrix> {
906		crate::image::optical_flow_farneback(self, next, levels, window, iterations, poly_n, poly_sigma)
907	}
908
909	/// Block-matching stereo disparity over the horizontal search
910	///
911	/// Delegates to [`crate::image::stereo_bm`].
912	pub fn stereo_bm(
913		&self,
914		right: &Image,
915		num_disparities: u32,
916		block_size: u32,
917		uniqueness: u32,
918	) -> Result<Matrix> {
919		crate::image::stereo_bm(self, right, num_disparities, block_size, uniqueness)
920	}
921
922	/// Non-local means denoising over a search window,
923	///
924	/// Delegates to [`crate::image::fast_nl_means_denoising`].
925	pub fn fast_nl_means_denoising(
926		&self,
927		h: f32,
928		template_window: u32,
929		search_window: u32,
930	) -> Result<Self> {
931		crate::image::fast_nl_means_denoising(self, h, template_window, search_window)
932	}
933
934	/// Pyramid mean-shift edge-preserving smoothing, following
935	///
936	/// Delegates to [`crate::image::pyr_mean_shift_filtering`].
937	pub fn pyr_mean_shift_filtering(&self, sp: f32, sr: f32, max_level: u32) -> Result<Self> {
938		crate::image::pyr_mean_shift_filtering(self, sp, sr, max_level)
939	}
940}
941
942#[allow(clippy::type_complexity)]
943const _: fn(&Image, u32, u32, InterpolationMode) -> Result<Image> = crate::image::resize;
944#[allow(clippy::type_complexity)]
945const _: fn(&Image, u32, u32, InterpolationMode) -> Result<Image> = Image::resize;
946#[allow(clippy::type_complexity)]
947const _: fn(&Image, u32, u32, u32, u32) -> Result<Image> = crate::image::crop;
948#[allow(clippy::type_complexity)]
949const _: fn(&Image, u32, u32, u32, u32) -> Result<Image> = Image::crop;
950#[allow(clippy::type_complexity)]
951const _: fn(&Image, bool, bool) -> Result<Image> = crate::image::flip;
952#[allow(clippy::type_complexity)]
953const _: fn(&Image, bool, bool) -> Result<Image> = Image::flip;
954#[allow(clippy::type_complexity)]
955const _: fn(&Image, u32) -> Result<Image> = crate::image::rotate;
956#[allow(clippy::type_complexity)]
957const _: fn(&Image, u32) -> Result<Image> = Image::rotate;
958#[allow(clippy::type_complexity)]
959const _: fn(&Image, u32, u32, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::pad;
960#[allow(clippy::type_complexity)]
961const _: fn(&Image, u32, u32, u32, u32, BorderMode, f32) -> Result<Image> = Image::pad;
962#[allow(clippy::type_complexity)]
963const _: fn(&Image, u32, u32) -> Result<Image> = crate::image::center_crop;
964#[allow(clippy::type_complexity)]
965const _: fn(&Image, u32, u32) -> Result<Image> = Image::center_crop;
966#[allow(clippy::type_complexity)]
967const _: fn(&Image, &Matrix, InterpolationMode, BorderMode, f32) -> Result<Image> =
968	crate::image::remap;
969#[allow(clippy::type_complexity)]
970const _: fn(&Image, &Matrix, InterpolationMode, BorderMode, f32) -> Result<Image> = Image::remap;
971#[allow(clippy::type_complexity)]
972const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
973	crate::image::warp_affine;
974#[allow(clippy::type_complexity)]
975const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
976	Image::warp_affine;
977#[allow(clippy::type_complexity)]
978const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
979	crate::image::warp_perspective;
980#[allow(clippy::type_complexity)]
981const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
982	Image::warp_perspective;
983#[allow(clippy::type_complexity)]
984const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::threshold_binary;
985#[allow(clippy::type_complexity)]
986const _: fn(&Image, f32, f32) -> Result<Image> = Image::threshold_binary;
987#[allow(clippy::type_complexity)]
988const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::threshold_binary_inv;
989#[allow(clippy::type_complexity)]
990const _: fn(&Image, f32, f32) -> Result<Image> = Image::threshold_binary_inv;
991#[allow(clippy::type_complexity)]
992const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_truncate;
993#[allow(clippy::type_complexity)]
994const _: fn(&Image, f32) -> Result<Image> = Image::threshold_truncate;
995#[allow(clippy::type_complexity)]
996const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_to_zero;
997#[allow(clippy::type_complexity)]
998const _: fn(&Image, f32) -> Result<Image> = Image::threshold_to_zero;
999#[allow(clippy::type_complexity)]
1000const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_to_zero_inv;
1001#[allow(clippy::type_complexity)]
1002const _: fn(&Image, f32) -> Result<Image> = Image::threshold_to_zero_inv;
1003#[allow(clippy::type_complexity)]
1004const _: fn(&Image, f32, f32, f32) -> Result<Image> = crate::image::in_range;
1005#[allow(clippy::type_complexity)]
1006const _: fn(&Image, f32, f32, f32) -> Result<Image> = Image::in_range;
1007#[allow(clippy::type_complexity)]
1008const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::clamp;
1009#[allow(clippy::type_complexity)]
1010const _: fn(&Image, f32, f32) -> Result<Image> = Image::clamp;
1011#[allow(clippy::type_complexity)]
1012const _: fn(&Image, f32) -> Result<Image> = crate::image::invert;
1013#[allow(clippy::type_complexity)]
1014const _: fn(&Image, f32) -> Result<Image> = Image::invert;
1015#[allow(clippy::type_complexity)]
1016const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::brightness_contrast;
1017#[allow(clippy::type_complexity)]
1018const _: fn(&Image, f32, f32) -> Result<Image> = Image::brightness_contrast;
1019#[allow(clippy::type_complexity)]
1020const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::gamma_contrast;
1021#[allow(clippy::type_complexity)]
1022const _: fn(&Image, f32, f32) -> Result<Image> = Image::gamma_contrast;
1023#[allow(clippy::type_complexity)]
1024const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::solarize;
1025#[allow(clippy::type_complexity)]
1026const _: fn(&Image, f32, f32) -> Result<Image> = Image::solarize;
1027#[allow(clippy::type_complexity)]
1028const _: fn(&Image, u32, f32, f32) -> Result<Image> = crate::image::posterize;
1029#[allow(clippy::type_complexity)]
1030const _: fn(&Image, u32, f32, f32) -> Result<Image> = Image::posterize;
1031#[allow(clippy::type_complexity)]
1032const _: fn(&Image) -> Result<Image> = crate::image::grayscale;
1033#[allow(clippy::type_complexity)]
1034const _: fn(&Image) -> Result<Image> = Image::grayscale;
1035#[allow(clippy::type_complexity)]
1036const _: fn(&Image, &Image, f32) -> Result<Image> = crate::image::alpha_blend;
1037#[allow(clippy::type_complexity)]
1038const _: fn(&Image, &Image, f32) -> Result<Image> = Image::alpha_blend;
1039#[allow(clippy::type_complexity)]
1040const _: fn(&Image, &Image, &Image) -> Result<Image> = crate::image::composite;
1041#[allow(clippy::type_complexity)]
1042const _: fn(&Image, &Image, &Image) -> Result<Image> = Image::composite;
1043#[allow(clippy::type_complexity)]
1044const _: fn(&Image, u32, u32, u32, u32, f32) -> Result<Image> = crate::image::erase;
1045#[allow(clippy::type_complexity)]
1046const _: fn(&Image, u32, u32, u32, u32, f32) -> Result<Image> = Image::erase;
1047#[allow(clippy::type_complexity)]
1048const _: fn(&Image, &Matrix) -> Result<Image> = crate::image::color_twist;
1049#[allow(clippy::type_complexity)]
1050const _: fn(&Image, &Matrix) -> Result<Image> = Image::color_twist;
1051#[allow(clippy::type_complexity)]
1052const _: fn(&Image, [u32; 4], ImageFormat) -> Result<Image> = crate::image::channel_reorder;
1053#[allow(clippy::type_complexity)]
1054const _: fn(&Image, [u32; 4], ImageFormat) -> Result<Image> = Image::channel_reorder;
1055#[allow(clippy::type_complexity)]
1056const _: fn(&Image, f32, f32, u64) -> Result<Image> = crate::image::gaussian_noise;
1057#[allow(clippy::type_complexity)]
1058const _: fn(&Image, f32, f32, u64) -> Result<Image> = Image::gaussian_noise;
1059#[allow(clippy::type_complexity)]
1060const _: fn(&Image, f32, f32, f32, u64) -> Result<Image> = crate::image::salt_pepper_noise;
1061#[allow(clippy::type_complexity)]
1062const _: fn(&Image, f32, f32, f32, u64) -> Result<Image> = Image::salt_pepper_noise;
1063#[allow(clippy::type_complexity)]
1064const _: fn(&Image, &Matrix, BorderMode, f32) -> Result<Image> = crate::image::convolve_2d;
1065#[allow(clippy::type_complexity)]
1066const _: fn(&Image, &Matrix, BorderMode, f32) -> Result<Image> = Image::convolve_2d;
1067#[allow(clippy::type_complexity)]
1068const _: fn(&Image, &Matrix, &Matrix, BorderMode, f32) -> Result<Image> =
1069	crate::image::separable_convolve_2d;
1070#[allow(clippy::type_complexity)]
1071const _: fn(&Image, &Matrix, &Matrix, BorderMode, f32) -> Result<Image> =
1072	Image::separable_convolve_2d;
1073#[allow(clippy::type_complexity)]
1074const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::average_blur;
1075#[allow(clippy::type_complexity)]
1076const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::average_blur;
1077#[allow(clippy::type_complexity)]
1078const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::sobel;
1079#[allow(clippy::type_complexity)]
1080const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::sobel;
1081#[allow(clippy::type_complexity)]
1082const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::scharr;
1083#[allow(clippy::type_complexity)]
1084const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::scharr;
1085#[allow(clippy::type_complexity)]
1086const _: fn(&Image, BorderMode) -> Result<Image> = crate::image::laplacian;
1087#[allow(clippy::type_complexity)]
1088const _: fn(&Image, BorderMode) -> Result<Image> = Image::laplacian;
1089#[allow(clippy::type_complexity)]
1090const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::erode;
1091#[allow(clippy::type_complexity)]
1092const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::erode;
1093#[allow(clippy::type_complexity)]
1094const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::dilate;
1095#[allow(clippy::type_complexity)]
1096const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::dilate;
1097#[allow(clippy::type_complexity)]
1098const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_open;
1099#[allow(clippy::type_complexity)]
1100const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_open;
1101#[allow(clippy::type_complexity)]
1102const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_close;
1103#[allow(clippy::type_complexity)]
1104const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_close;
1105#[allow(clippy::type_complexity)]
1106const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_gradient;
1107#[allow(clippy::type_complexity)]
1108const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_gradient;
1109#[allow(clippy::type_complexity)]
1110const _: fn(&Image, f32, u32) -> Result<Image> = crate::image::gaussian_blur;
1111#[allow(clippy::type_complexity)]
1112const _: fn(&Image, f32, u32) -> Result<Image> = Image::gaussian_blur;
1113#[allow(clippy::type_complexity)]
1114const _: fn(&Image, f32, BorderMode) -> Result<Image> = crate::image::sharpen;
1115#[allow(clippy::type_complexity)]
1116const _: fn(&Image, f32, BorderMode) -> Result<Image> = Image::sharpen;
1117#[allow(clippy::type_complexity)]
1118const _: fn(&Image, u32, BorderMode) -> Result<Image> = crate::image::median_blur;
1119#[allow(clippy::type_complexity)]
1120const _: fn(&Image, u32, BorderMode) -> Result<Image> = Image::median_blur;
1121#[allow(clippy::type_complexity)]
1122const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = crate::image::bilateral_filter;
1123#[allow(clippy::type_complexity)]
1124const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = Image::bilateral_filter;
1125#[allow(clippy::type_complexity)]
1126const _: fn(&Image, f32, f32, u32) -> Result<Image> = crate::image::unsharp_mask;
1127#[allow(clippy::type_complexity)]
1128const _: fn(&Image, f32, f32, u32) -> Result<Image> = Image::unsharp_mask;
1129#[allow(clippy::type_complexity)]
1130const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_top_hat;
1131#[allow(clippy::type_complexity)]
1132const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_top_hat;
1133#[allow(clippy::type_complexity)]
1134const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> =
1135	crate::image::morphology_black_hat;
1136#[allow(clippy::type_complexity)]
1137const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_black_hat;
1138#[allow(clippy::type_complexity)]
1139const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> =
1140	crate::image::adaptive_threshold_mean;
1141#[allow(clippy::type_complexity)]
1142const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = Image::adaptive_threshold_mean;
1143#[allow(clippy::type_complexity)]
1144const _: fn(&Image, u32, f32, f32, f32, BorderMode) -> Result<Image> =
1145	crate::image::adaptive_threshold_gaussian;
1146#[allow(clippy::type_complexity)]
1147const _: fn(&Image, u32, f32, f32, f32, BorderMode) -> Result<Image> =
1148	Image::adaptive_threshold_gaussian;
1149#[allow(clippy::type_complexity)]
1150const _: fn(&Image, NormalizationConfig) -> Result<Image> = crate::image::normalize;
1151#[allow(clippy::type_complexity)]
1152const _: fn(&Image, NormalizationConfig) -> Result<Image> = Image::normalize;
1153#[allow(clippy::type_complexity)]
1154const _: fn(&Image, crate::ImageFormat) -> Result<Image> = crate::image::convert_color;
1155#[allow(clippy::type_complexity)]
1156const _: fn(&Image, crate::ImageFormat) -> Result<Image> = Image::convert_color;
1157#[allow(clippy::type_complexity)]
1158const _: fn(&Image, u32, u32, NormalizationConfig) -> Result<Image> =
1159	crate::image::resize_normalize;
1160#[allow(clippy::type_complexity)]
1161const _: fn(&Image, u32, u32, NormalizationConfig) -> Result<Image> = Image::resize_normalize;
1162#[allow(clippy::type_complexity)]
1163const _: fn(&Image, &Matrix, &Matrix, f32) -> Result<Image> = crate::image::segmentation_overlay;
1164#[allow(clippy::type_complexity)]
1165const _: fn(&Image, &Matrix, &Matrix, f32) -> Result<Image> = Image::segmentation_overlay;
1166#[allow(clippy::type_complexity)]
1167const _: fn(&Image, u32, f32, f32) -> Result<Matrix> = crate::image::calc_hist;
1168#[allow(clippy::type_complexity)]
1169const _: fn(&Image, u32, f32, f32) -> Result<Matrix> = Image::calc_hist;
1170#[allow(clippy::type_complexity)]
1171const _: fn(&Image) -> Result<Image> = crate::image::equalize_hist;
1172#[allow(clippy::type_complexity)]
1173const _: fn(&Image) -> Result<Image> = Image::equalize_hist;
1174#[allow(clippy::type_complexity)]
1175const _: fn(&Image) -> Result<Image> = crate::image::pyr_down;
1176#[allow(clippy::type_complexity)]
1177const _: fn(&Image) -> Result<Image> = Image::pyr_down;
1178#[allow(clippy::type_complexity)]
1179const _: fn(&Image) -> Result<Image> = crate::image::pyr_up;
1180#[allow(clippy::type_complexity)]
1181const _: fn(&Image) -> Result<Image> = Image::pyr_up;
1182#[allow(clippy::type_complexity)]
1183const _: fn(&Image, AutoThreshold, f32) -> Result<(Image, Matrix)> = crate::image::threshold_auto;
1184#[allow(clippy::type_complexity)]
1185const _: fn(&Image, AutoThreshold, f32) -> Result<(Image, Matrix)> = Image::threshold_auto;
1186#[allow(clippy::type_complexity)]
1187const _: fn(&Image) -> Result<Matrix> = crate::image::integral;
1188#[allow(clippy::type_complexity)]
1189const _: fn(&Image) -> Result<Matrix> = Image::integral;
1190#[allow(clippy::type_complexity)]
1191const _: fn(&Image, ColorConversion) -> Result<Image> = crate::image::cvt_color;
1192#[allow(clippy::type_complexity)]
1193const _: fn(&Image, ColorConversion) -> Result<Image> = Image::cvt_color;
1194#[allow(clippy::type_complexity)]
1195const _: fn(&Image, ColorMap) -> Result<Image> = crate::image::apply_color_map;
1196#[allow(clippy::type_complexity)]
1197const _: fn(&Image, ColorMap) -> Result<Image> = Image::apply_color_map;
1198#[allow(clippy::type_complexity)]
1199const _: fn(&Image, &Matrix, f32, f32) -> Result<Image> = crate::image::calc_back_project;
1200#[allow(clippy::type_complexity)]
1201const _: fn(&Image, &Matrix, f32, f32) -> Result<Image> = Image::calc_back_project;
1202#[allow(clippy::type_complexity)]
1203const _: fn(&Image, f32, u32, u32) -> Result<Image> = crate::image::clahe;
1204#[allow(clippy::type_complexity)]
1205const _: fn(&Image, f32, u32, u32) -> Result<Image> = Image::clahe;
1206#[allow(clippy::type_complexity)]
1207const _: fn(&Image, &Image) -> Result<Image> = crate::image::accumulate;
1208#[allow(clippy::type_complexity)]
1209const _: fn(&Image, &Image) -> Result<Image> = Image::accumulate;
1210#[allow(clippy::type_complexity)]
1211const _: fn(&Image, &Image, f32) -> Result<Image> = crate::image::accumulate_weighted;
1212#[allow(clippy::type_complexity)]
1213const _: fn(&Image, &Image, f32) -> Result<Image> = Image::accumulate_weighted;
1214#[allow(clippy::type_complexity)]
1215const _: fn(&Image) -> Result<Matrix> = crate::image::moments;
1216#[allow(clippy::type_complexity)]
1217const _: fn(&Image) -> Result<Matrix> = Image::moments;
1218#[allow(clippy::type_complexity)]
1219const _: fn(&Image, &Image, f32) -> Result<Matrix> = crate::image::psnr;
1220#[allow(clippy::type_complexity)]
1221const _: fn(&Image, &Image, f32) -> Result<Matrix> = Image::psnr;
1222#[allow(clippy::type_complexity)]
1223const _: fn(&Image, &Image) -> Result<Matrix> = crate::image::ssim;
1224#[allow(clippy::type_complexity)]
1225const _: fn(&Image, &Image) -> Result<Matrix> = Image::ssim;
1226#[allow(clippy::type_complexity)]
1227const _: fn(&Image, &Image, MatchTemplate) -> Result<Matrix> = crate::image::match_template;
1228#[allow(clippy::type_complexity)]
1229const _: fn(&Image, &Image, MatchTemplate) -> Result<Matrix> = Image::match_template;
1230#[allow(clippy::type_complexity)]
1231const _: fn(
1232	&Image,
1233	f32,
1234	f32,
1235	f32,
1236	u32,
1237	u32,
1238	PolarMode,
1239	InterpolationMode,
1240	BorderMode,
1241	f32,
1242) -> Result<Image> = crate::image::warp_polar;
1243#[allow(clippy::type_complexity)]
1244const _: fn(
1245	&Image,
1246	f32,
1247	f32,
1248	f32,
1249	u32,
1250	u32,
1251	PolarMode,
1252	InterpolationMode,
1253	BorderMode,
1254	f32,
1255) -> Result<Image> = Image::warp_polar;
1256#[allow(clippy::type_complexity)]
1257const _: fn(&Image, f32, f32, u32) -> Result<Image> = crate::image::canny;
1258#[allow(clippy::type_complexity)]
1259const _: fn(&Image, f32, f32, u32) -> Result<Image> = Image::canny;
1260#[allow(clippy::type_complexity)]
1261const _: fn(&Image, f32, Connectivity, u32) -> Result<Matrix> = crate::image::connected_components;
1262#[allow(clippy::type_complexity)]
1263const _: fn(&Image, f32, Connectivity, u32) -> Result<Matrix> = Image::connected_components;
1264#[allow(clippy::type_complexity)]
1265const _: fn(&Image, f32, DistanceType, u32) -> Result<Matrix> = crate::image::distance_transform;
1266#[allow(clippy::type_complexity)]
1267const _: fn(&Image, f32, DistanceType, u32) -> Result<Matrix> = Image::distance_transform;
1268#[allow(clippy::type_complexity)]
1269const _: fn(&Image, f32, f32, f32, u32, u32) -> Result<Matrix> = crate::image::hough_lines;
1270#[allow(clippy::type_complexity)]
1271const _: fn(&Image, f32, f32, f32, u32, u32) -> Result<Matrix> = Image::hough_lines;
1272#[allow(clippy::type_complexity)]
1273const _: fn(&Image, f32, f32, f32, u32, u32, f32, u32) -> Result<Matrix> =
1274	crate::image::hough_lines_p;
1275#[allow(clippy::type_complexity)]
1276const _: fn(&Image, f32, f32, f32, u32, u32, f32, u32) -> Result<Matrix> = Image::hough_lines_p;
1277#[allow(clippy::type_complexity)]
1278const _: fn(&Image, f32, Connectivity, u32, u32, u32) -> Result<(Matrix, Matrix)> =
1279	crate::image::find_contours;
1280#[allow(clippy::type_complexity)]
1281const _: fn(&Image, f32, Connectivity, u32, u32, u32) -> Result<(Matrix, Matrix)> =
1282	Image::find_contours;
1283#[allow(clippy::type_complexity)]
1284const _: fn(&Image, u32, u32, f32, f32, f32, Connectivity, u32) -> Result<Image> =
1285	crate::image::flood_fill;
1286#[allow(clippy::type_complexity)]
1287const _: fn(&Image, u32, u32, f32, f32, f32, Connectivity, u32) -> Result<Image> =
1288	Image::flood_fill;
1289#[allow(clippy::type_complexity)]
1290const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = crate::image::draw_line;
1291#[allow(clippy::type_complexity)]
1292const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = Image::draw_line;
1293#[allow(clippy::type_complexity)]
1294const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = crate::image::draw_rectangle;
1295#[allow(clippy::type_complexity)]
1296const _: fn(&Image, f32, f32, f32, f32, f32, f32) -> Result<Image> = Image::draw_rectangle;
1297#[allow(clippy::type_complexity)]
1298const _: fn(&Image, f32, f32, f32, f32, f32) -> Result<Image> = crate::image::draw_circle;
1299#[allow(clippy::type_complexity)]
1300const _: fn(&Image, f32, f32, f32, f32, f32) -> Result<Image> = Image::draw_circle;
1301#[allow(clippy::type_complexity)]
1302const _: fn(&Image, &Matrix, f32) -> Result<Image> = crate::image::fill_polygon;
1303#[allow(clippy::type_complexity)]
1304const _: fn(&Image, &Matrix, f32) -> Result<Image> = Image::fill_polygon;
1305#[allow(clippy::type_complexity)]
1306const _: fn(&Image, u32, f32, CornerScore) -> Result<Image> = crate::image::corner_score;
1307#[allow(clippy::type_complexity)]
1308const _: fn(&Image, u32, f32, CornerScore) -> Result<Image> = Image::corner_score;
1309#[allow(clippy::type_complexity)]
1310const _: fn(&Image, u32) -> Result<Image> = crate::image::corner_fast;
1311#[allow(clippy::type_complexity)]
1312const _: fn(&Image, u32) -> Result<Image> = Image::corner_fast;
1313#[allow(clippy::type_complexity)]
1314const _: fn(&Image, u32, f32, f32) -> Result<(Matrix, Matrix)> =
1315	crate::image::good_features_to_track;
1316#[allow(clippy::type_complexity)]
1317const _: fn(&Image, u32, f32, f32) -> Result<(Matrix, Matrix)> = Image::good_features_to_track;
1318#[allow(clippy::type_complexity)]
1319const _: fn(&Image, u32, f32, f32, u32, u32) -> Result<(Matrix, Matrix, Matrix)> =
1320	crate::image::orb;
1321#[allow(clippy::type_complexity)]
1322const _: fn(&Image, u32, f32, f32, u32, u32) -> Result<(Matrix, Matrix, Matrix)> = Image::orb;
1323#[allow(clippy::type_complexity)]
1324const _: fn(&Image, &Image, &Matrix, u32, u32, u32, f32) -> Result<(Matrix, Matrix, Matrix)> =
1325	crate::image::optical_flow_pyr_lk;
1326#[allow(clippy::type_complexity)]
1327const _: fn(&Image, &Image, &Matrix, u32, u32, u32, f32) -> Result<(Matrix, Matrix, Matrix)> =
1328	Image::optical_flow_pyr_lk;
1329#[allow(clippy::type_complexity)]
1330const _: fn(&Image, &Image, u32, u32, u32, u32, f32) -> Result<Matrix> =
1331	crate::image::optical_flow_farneback;
1332#[allow(clippy::type_complexity)]
1333const _: fn(&Image, &Image, u32, u32, u32, u32, f32) -> Result<Matrix> =
1334	Image::optical_flow_farneback;
1335#[allow(clippy::type_complexity)]
1336const _: fn(&Image, &Image, u32, u32, u32) -> Result<Matrix> = crate::image::stereo_bm;
1337#[allow(clippy::type_complexity)]
1338const _: fn(&Image, &Image, u32, u32, u32) -> Result<Matrix> = Image::stereo_bm;
1339#[allow(clippy::type_complexity)]
1340const _: fn(&Image, f32, u32, u32) -> Result<Image> = crate::image::fast_nl_means_denoising;
1341#[allow(clippy::type_complexity)]
1342const _: fn(&Image, f32, u32, u32) -> Result<Image> = Image::fast_nl_means_denoising;
1343#[allow(clippy::type_complexity)]
1344const _: fn(&Image, f32, f32, u32) -> Result<Image> = crate::image::pyr_mean_shift_filtering;
1345#[allow(clippy::type_complexity)]
1346const _: fn(&Image, f32, f32, u32) -> Result<Image> = Image::pyr_mean_shift_filtering;