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=4c3af0f4b2504702bcaaa32134afcbd07ca92d06660d4847a5eeb5a0691dde61
4use crate::image::{BorderMode, ImageFormat, InterpolationMode, NormalizationConfig};
5use crate::{Image, Matrix, Result};
6
7impl Image {
8	/// Resize an FP32 channel-first image while preserving its layout and format.
9	///
10	/// Delegates to [`crate::image::resize`].
11	pub fn resize(
12		&self,
13		target_width: u32,
14		target_height: u32,
15		interpolation: InterpolationMode,
16	) -> Result<Self> {
17		crate::image::resize(self, target_width, target_height, interpolation)
18	}
19
20	/// Extract a region, clipping its right and bottom edges to the source extent.
21	///
22	/// Delegates to [`crate::image::crop`].
23	pub fn crop(&self, x: u32, y: u32, width: u32, height: u32) -> Result<Self> {
24		crate::image::crop(self, x, y, width, height)
25	}
26
27	/// Flip an image horizontally, vertically, or along both axes.
28	///
29	/// Delegates to [`crate::image::flip`].
30	pub fn flip(&self, horizontal: bool, vertical: bool) -> Result<Self> {
31		crate::image::flip(self, horizontal, vertical)
32	}
33
34	/// Rotate clockwise by a multiple of 90 degrees.
35	///
36	/// Delegates to [`crate::image::rotate`].
37	pub fn rotate(&self, degrees: u32) -> Result<Self> {
38		crate::image::rotate(self, degrees)
39	}
40
41	/// Add asymmetric padding with an explicit border policy.
42	///
43	/// Delegates to [`crate::image::pad`].
44	pub fn pad(
45		&self,
46		left: u32,
47		right: u32,
48		top: u32,
49		bottom: u32,
50		border: BorderMode,
51		border_value: f32,
52	) -> Result<Self> {
53		crate::image::pad(self, left, right, top, bottom, border, border_value)
54	}
55
56	/// Extract a centered region with the requested exact extent.
57	///
58	/// Delegates to [`crate::image::center_crop`].
59	pub fn center_crop(&self, width: u32, height: u32) -> Result<Self> {
60		crate::image::center_crop(self, width, height)
61	}
62
63	/// Resample an image from an FP32 absolute-coordinate map shaped
64	///
65	/// Delegates to [`crate::image::remap`].
66	pub fn remap(
67		&self,
68		map: &Matrix,
69		interpolation: InterpolationMode,
70		border: BorderMode,
71		border_value: f32,
72	) -> Result<Self> {
73		crate::image::remap(self, map, interpolation, border, border_value)
74	}
75
76	/// Apply an inverse FP32 2x3 affine transform to an image.
77	///
78	/// Delegates to [`crate::image::warp_affine`].
79	pub fn warp_affine(
80		&self,
81		transform: &Matrix,
82		width: u32,
83		height: u32,
84		interpolation: InterpolationMode,
85		border: BorderMode,
86		border_value: f32,
87	) -> Result<Self> {
88		crate::image::warp_affine(
89			self,
90			transform,
91			width,
92			height,
93			interpolation,
94			border,
95			border_value,
96		)
97	}
98
99	/// Apply an inverse FP32 3x3 perspective transform to an image.
100	///
101	/// Delegates to [`crate::image::warp_perspective`].
102	pub fn warp_perspective(
103		&self,
104		transform: &Matrix,
105		width: u32,
106		height: u32,
107		interpolation: InterpolationMode,
108		border: BorderMode,
109		border_value: f32,
110	) -> Result<Self> {
111		crate::image::warp_perspective(
112			self,
113			transform,
114			width,
115			height,
116			interpolation,
117			border,
118			border_value,
119		)
120	}
121
122	/// Replace values above `threshold` with `max_value` and all others with zero.
123	///
124	/// Delegates to [`crate::image::threshold_binary`].
125	pub fn threshold_binary(&self, threshold: f32, max_value: f32) -> Result<Self> {
126		crate::image::threshold_binary(self, threshold, max_value)
127	}
128
129	/// Replace values at or below `threshold` with `max_value` and all others with zero.
130	///
131	/// Delegates to [`crate::image::threshold_binary_inv`].
132	pub fn threshold_binary_inv(&self, threshold: f32, max_value: f32) -> Result<Self> {
133		crate::image::threshold_binary_inv(self, threshold, max_value)
134	}
135
136	/// Truncate values above `threshold`.
137	///
138	/// Delegates to [`crate::image::threshold_truncate`].
139	pub fn threshold_truncate(&self, threshold: f32) -> Result<Self> {
140		crate::image::threshold_truncate(self, threshold)
141	}
142
143	/// Replace values at or below `threshold` with zero.
144	///
145	/// Delegates to [`crate::image::threshold_to_zero`].
146	pub fn threshold_to_zero(&self, threshold: f32) -> Result<Self> {
147		crate::image::threshold_to_zero(self, threshold)
148	}
149
150	/// Replace values above `threshold` with zero.
151	///
152	/// Delegates to [`crate::image::threshold_to_zero_inv`].
153	pub fn threshold_to_zero_inv(&self, threshold: f32) -> Result<Self> {
154		crate::image::threshold_to_zero_inv(self, threshold)
155	}
156
157	/// Produce `true_value` for values inside the inclusive interval and zero outside it.
158	///
159	/// Delegates to [`crate::image::in_range`].
160	pub fn in_range(&self, low: f32, high: f32, true_value: f32) -> Result<Self> {
161		crate::image::in_range(self, low, high, true_value)
162	}
163
164	/// Clamp every pixel to the inclusive interval.
165	///
166	/// Delegates to [`crate::image::clamp`].
167	pub fn clamp(&self, low: f32, high: f32) -> Result<Self> {
168		crate::image::clamp(self, low, high)
169	}
170
171	/// Invert every value around `max_value`.
172	///
173	/// Delegates to [`crate::image::invert`].
174	pub fn invert(&self, max_value: f32) -> Result<Self> {
175		crate::image::invert(self, max_value)
176	}
177
178	/// Apply `value * contrast + brightness`.
179	///
180	/// Delegates to [`crate::image::brightness_contrast`].
181	pub fn brightness_contrast(&self, brightness: f32, contrast: f32) -> Result<Self> {
182		crate::image::brightness_contrast(self, brightness, contrast)
183	}
184
185	/// Apply `max(value, 0)^gamma * gain`.
186	///
187	/// Delegates to [`crate::image::gamma_contrast`].
188	pub fn gamma_contrast(&self, gamma: f32, gain: f32) -> Result<Self> {
189		crate::image::gamma_contrast(self, gamma, gain)
190	}
191
192	/// Invert values at or above `threshold` around `max_value`.
193	///
194	/// Delegates to [`crate::image::solarize`].
195	pub fn solarize(&self, threshold: f32, max_value: f32) -> Result<Self> {
196		crate::image::solarize(self, threshold, max_value)
197	}
198
199	/// Quantize `[low, high]` to `levels` evenly spaced values using round-half-up.
200	///
201	/// Delegates to [`crate::image::posterize`].
202	pub fn posterize(&self, levels: u32, low: f32, high: f32) -> Result<Self> {
203		crate::image::posterize(self, levels, low, high)
204	}
205
206	/// Convert an RGB or RGBA image to Rec.709 grayscale.
207	///
208	/// Delegates to [`crate::image::grayscale`].
209	pub fn grayscale(&self) -> Result<Self> {
210		crate::image::grayscale(self)
211	}
212
213	/// Blend two equal semantic images using `left * (1-alpha) + right * alpha`.
214	///
215	/// Delegates to [`crate::image::alpha_blend`].
216	pub fn alpha_blend(&self, right: &Image, alpha: f32) -> Result<Self> {
217		crate::image::alpha_blend(self, right, alpha)
218	}
219
220	/// Composite two equal images with a clamped Gray or per-channel mask.
221	///
222	/// Delegates to [`crate::image::composite`].
223	pub fn composite(&self, right: &Image, mask: &Image) -> Result<Self> {
224		crate::image::composite(self, right, mask)
225	}
226
227	/// Fill the intersection of a rectangle and the image with one finite value.
228	///
229	/// Delegates to [`crate::image::erase`].
230	pub fn erase(&self, x: u32, y: u32, width: u32, height: u32, value: f32) -> Result<Self> {
231		crate::image::erase(self, x, y, width, height, value)
232	}
233
234	/// Apply one shared FP32 `[3, 4]` affine color transform to RGB channels.
235	///
236	/// Delegates to [`crate::image::color_twist`].
237	pub fn color_twist(&self, transform: &Matrix) -> Result<Self> {
238		crate::image::color_twist(self, transform)
239	}
240
241	/// Reorder one to four channels and explicitly assign the resulting format.
242	///
243	/// Delegates to [`crate::image::channel_reorder`].
244	pub fn channel_reorder(&self, order: [u32; 4], output_format: ImageFormat) -> Result<Self> {
245		crate::image::channel_reorder(self, order, output_format)
246	}
247
248	/// Add explicit-seed Philox Gaussian noise to every pixel.
249	///
250	/// Delegates to [`crate::image::gaussian_noise`].
251	pub fn gaussian_noise(&self, mean: f32, stddev: f32, seed: u64) -> Result<Self> {
252		crate::image::gaussian_noise(self, mean, stddev, seed)
253	}
254
255	/// Replace a seeded fraction of pixels with salt or pepper values.
256	///
257	/// Delegates to [`crate::image::salt_pepper_noise`].
258	pub fn salt_pepper_noise(
259		&self,
260		probability: f32,
261		salt_value: f32,
262		pepper_value: f32,
263		seed: u64,
264	) -> Result<Self> {
265		crate::image::salt_pepper_noise(self, probability, salt_value, pepper_value, seed)
266	}
267
268	/// Apply same-shape 2D cross-correlation with an odd FP32 kernel up to 31×31.
269	///
270	/// Delegates to [`crate::image::convolve_2d`].
271	pub fn convolve_2d(
272		&self,
273		kernel: &Matrix,
274		border: BorderMode,
275		border_value: f32,
276	) -> Result<Self> {
277		crate::image::convolve_2d(self, kernel, border, border_value)
278	}
279
280	/// Apply horizontal and vertical odd FP32 vector kernels up to length 31.
281	///
282	/// Delegates to [`crate::image::separable_convolve_2d`].
283	pub fn separable_convolve_2d(
284		&self,
285		kernel_x: &Matrix,
286		kernel_y: &Matrix,
287		border: BorderMode,
288		border_value: f32,
289	) -> Result<Self> {
290		crate::image::separable_convolve_2d(self, kernel_x, kernel_y, border, border_value)
291	}
292
293	/// Average an odd rectangular neighborhood up to 31×31.
294	///
295	/// Delegates to [`crate::image::average_blur`].
296	pub fn average_blur(&self, width: u32, height: u32, border: BorderMode) -> Result<Self> {
297		crate::image::average_blur(self, width, height, border)
298	}
299
300	/// Compute one first-order Sobel derivative.
301	///
302	/// Delegates to [`crate::image::sobel`].
303	pub fn sobel(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self> {
304		crate::image::sobel(self, dx, dy, border)
305	}
306
307	/// Compute one first-order Scharr derivative.
308	///
309	/// Delegates to [`crate::image::scharr`].
310	pub fn scharr(&self, dx: u32, dy: u32, border: BorderMode) -> Result<Self> {
311		crate::image::scharr(self, dx, dy, border)
312	}
313
314	/// Apply the four-neighbor discrete Laplacian.
315	///
316	/// Delegates to [`crate::image::laplacian`].
317	pub fn laplacian(&self, border: BorderMode) -> Result<Self> {
318		crate::image::laplacian(self, border)
319	}
320
321	/// Erode with an odd rectangular structuring element up to 31×31.
322	///
323	/// Delegates to [`crate::image::erode`].
324	pub fn erode(
325		&self,
326		width: u32,
327		height: u32,
328		border: BorderMode,
329		border_value: f32,
330	) -> Result<Self> {
331		crate::image::erode(self, width, height, border, border_value)
332	}
333
334	/// Dilate with an odd rectangular structuring element up to 31×31.
335	///
336	/// Delegates to [`crate::image::dilate`].
337	pub fn dilate(
338		&self,
339		width: u32,
340		height: u32,
341		border: BorderMode,
342		border_value: f32,
343	) -> Result<Self> {
344		crate::image::dilate(self, width, height, border, border_value)
345	}
346
347	/// Erode and then dilate with the same rectangular element.
348	///
349	/// Delegates to [`crate::image::morphology_open`].
350	pub fn morphology_open(
351		&self,
352		width: u32,
353		height: u32,
354		border: BorderMode,
355		border_value: f32,
356	) -> Result<Self> {
357		crate::image::morphology_open(self, width, height, border, border_value)
358	}
359
360	/// Dilate and then erode with the same rectangular element.
361	///
362	/// Delegates to [`crate::image::morphology_close`].
363	pub fn morphology_close(
364		&self,
365		width: u32,
366		height: u32,
367		border: BorderMode,
368		border_value: f32,
369	) -> Result<Self> {
370		crate::image::morphology_close(self, width, height, border, border_value)
371	}
372
373	/// Return dilation minus erosion.
374	///
375	/// Delegates to [`crate::image::morphology_gradient`].
376	pub fn morphology_gradient(
377		&self,
378		width: u32,
379		height: u32,
380		border: BorderMode,
381		border_value: f32,
382	) -> Result<Self> {
383		crate::image::morphology_gradient(self, width, height, border, border_value)
384	}
385
386	/// Apply a normalized Gaussian blur with replicate borders.
387	///
388	/// Delegates to [`crate::image::gaussian_blur`].
389	pub fn gaussian_blur(&self, sigma: f32, kernel_size: u32) -> Result<Self> {
390		crate::image::gaussian_blur(self, sigma, kernel_size)
391	}
392
393	/// Apply a nonnegative four-neighbor sharpening amount.
394	///
395	/// Delegates to [`crate::image::sharpen`].
396	pub fn sharpen(&self, amount: f32, border: BorderMode) -> Result<Self> {
397		crate::image::sharpen(self, amount, border)
398	}
399
400	/// Select the median of an odd square neighborhood up to 15×15.
401	///
402	/// Delegates to [`crate::image::median_blur`].
403	pub fn median_blur(&self, kernel_size: u32, border: BorderMode) -> Result<Self> {
404		crate::image::median_blur(self, kernel_size, border)
405	}
406
407	/// Apply a bilateral neighborhood filter.
408	///
409	/// Delegates to [`crate::image::bilateral_filter`].
410	pub fn bilateral_filter(
411		&self,
412		kernel_size: u32,
413		sigma_color: f32,
414		sigma_space: f32,
415		border: BorderMode,
416	) -> Result<Self> {
417		crate::image::bilateral_filter(self, kernel_size, sigma_color, sigma_space, border)
418	}
419
420	/// Apply an unsharp mask using a Gaussian detail estimate.
421	///
422	/// Delegates to [`crate::image::unsharp_mask`].
423	pub fn unsharp_mask(&self, sigma: f32, amount: f32, kernel_size: u32) -> Result<Self> {
424		crate::image::unsharp_mask(self, sigma, amount, kernel_size)
425	}
426
427	/// Return the source minus its morphological opening.
428	///
429	/// Delegates to [`crate::image::morphology_top_hat`].
430	pub fn morphology_top_hat(
431		&self,
432		width: u32,
433		height: u32,
434		border: BorderMode,
435		border_value: f32,
436	) -> Result<Self> {
437		crate::image::morphology_top_hat(self, width, height, border, border_value)
438	}
439
440	/// Return the morphological closing minus the source.
441	///
442	/// Delegates to [`crate::image::morphology_black_hat`].
443	pub fn morphology_black_hat(
444		&self,
445		width: u32,
446		height: u32,
447		border: BorderMode,
448		border_value: f32,
449	) -> Result<Self> {
450		crate::image::morphology_black_hat(self, width, height, border, border_value)
451	}
452
453	/// Threshold against the local arithmetic mean minus `c`.
454	///
455	/// Delegates to [`crate::image::adaptive_threshold_mean`].
456	pub fn adaptive_threshold_mean(
457		&self,
458		kernel_size: u32,
459		c: f32,
460		max_value: f32,
461		border: BorderMode,
462	) -> Result<Self> {
463		crate::image::adaptive_threshold_mean(self, kernel_size, c, max_value, border)
464	}
465
466	/// Threshold against a local Gaussian-weighted mean minus `c`.
467	///
468	/// Delegates to [`crate::image::adaptive_threshold_gaussian`].
469	pub fn adaptive_threshold_gaussian(
470		&self,
471		kernel_size: u32,
472		c: f32,
473		max_value: f32,
474		sigma: f32,
475		border: BorderMode,
476	) -> Result<Self> {
477		crate::image::adaptive_threshold_gaussian(self, kernel_size, c, max_value, sigma, border)
478	}
479
480	/// Apply `(pixel - mean[channel]) / std[channel]` to up to three channels.
481	///
482	/// Delegates to [`crate::image::normalize`].
483	pub fn normalize(&self, parameters: NormalizationConfig) -> Result<Self> {
484		crate::image::normalize(self, parameters)
485	}
486
487	/// Convert between three-channel RGB and BGR semantics, including identity.
488	///
489	/// Delegates to [`crate::image::convert_color`].
490	pub fn convert_color(&self, destination_format: crate::ImageFormat) -> Result<Self> {
491		crate::image::convert_color(self, destination_format)
492	}
493
494	/// Bilinearly resize and normalize in one semantic and executable operation.
495	///
496	/// Delegates to [`crate::image::resize_normalize`].
497	pub fn resize_normalize(
498		&self,
499		width: u32,
500		height: u32,
501		parameters: NormalizationConfig,
502	) -> Result<Self> {
503		crate::image::resize_normalize(self, width, height, parameters)
504	}
505
506	/// Blend a class palette over an RGB/RGBA image using an I32 label map.
507	///
508	/// Delegates to [`crate::image::segmentation_overlay`].
509	pub fn segmentation_overlay(&self, mask: &Matrix, palette: &Matrix, alpha: f32) -> Result<Self> {
510		crate::image::segmentation_overlay(self, mask, palette, alpha)
511	}
512
513	/// Accumulate a per-plane histogram over an FP32 NCHW or CHW image.
514	///
515	/// Delegates to [`crate::image::calc_hist`].
516	pub fn calc_hist(&self, bins: u32, lower: f32, upper: f32) -> Result<Matrix> {
517		crate::image::calc_hist(self, bins, lower, upper)
518	}
519
520	/// Equalize a normalized FP32 image histogram per `(batch, channel)` plane.
521	///
522	/// Delegates to [`crate::image::equalize_hist`].
523	pub fn equalize_hist(&self) -> Result<Self> {
524		crate::image::equalize_hist(self)
525	}
526}
527
528const _: fn(&Image, u32, u32, InterpolationMode) -> Result<Image> = crate::image::resize;
529const _: fn(&Image, u32, u32, InterpolationMode) -> Result<Image> = Image::resize;
530const _: fn(&Image, u32, u32, u32, u32) -> Result<Image> = crate::image::crop;
531const _: fn(&Image, u32, u32, u32, u32) -> Result<Image> = Image::crop;
532const _: fn(&Image, bool, bool) -> Result<Image> = crate::image::flip;
533const _: fn(&Image, bool, bool) -> Result<Image> = Image::flip;
534const _: fn(&Image, u32) -> Result<Image> = crate::image::rotate;
535const _: fn(&Image, u32) -> Result<Image> = Image::rotate;
536const _: fn(&Image, u32, u32, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::pad;
537const _: fn(&Image, u32, u32, u32, u32, BorderMode, f32) -> Result<Image> = Image::pad;
538const _: fn(&Image, u32, u32) -> Result<Image> = crate::image::center_crop;
539const _: fn(&Image, u32, u32) -> Result<Image> = Image::center_crop;
540const _: fn(&Image, &Matrix, InterpolationMode, BorderMode, f32) -> Result<Image> =
541	crate::image::remap;
542const _: fn(&Image, &Matrix, InterpolationMode, BorderMode, f32) -> Result<Image> = Image::remap;
543const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
544	crate::image::warp_affine;
545const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
546	Image::warp_affine;
547const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
548	crate::image::warp_perspective;
549const _: fn(&Image, &Matrix, u32, u32, InterpolationMode, BorderMode, f32) -> Result<Image> =
550	Image::warp_perspective;
551const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::threshold_binary;
552const _: fn(&Image, f32, f32) -> Result<Image> = Image::threshold_binary;
553const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::threshold_binary_inv;
554const _: fn(&Image, f32, f32) -> Result<Image> = Image::threshold_binary_inv;
555const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_truncate;
556const _: fn(&Image, f32) -> Result<Image> = Image::threshold_truncate;
557const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_to_zero;
558const _: fn(&Image, f32) -> Result<Image> = Image::threshold_to_zero;
559const _: fn(&Image, f32) -> Result<Image> = crate::image::threshold_to_zero_inv;
560const _: fn(&Image, f32) -> Result<Image> = Image::threshold_to_zero_inv;
561const _: fn(&Image, f32, f32, f32) -> Result<Image> = crate::image::in_range;
562const _: fn(&Image, f32, f32, f32) -> Result<Image> = Image::in_range;
563const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::clamp;
564const _: fn(&Image, f32, f32) -> Result<Image> = Image::clamp;
565const _: fn(&Image, f32) -> Result<Image> = crate::image::invert;
566const _: fn(&Image, f32) -> Result<Image> = Image::invert;
567const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::brightness_contrast;
568const _: fn(&Image, f32, f32) -> Result<Image> = Image::brightness_contrast;
569const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::gamma_contrast;
570const _: fn(&Image, f32, f32) -> Result<Image> = Image::gamma_contrast;
571const _: fn(&Image, f32, f32) -> Result<Image> = crate::image::solarize;
572const _: fn(&Image, f32, f32) -> Result<Image> = Image::solarize;
573const _: fn(&Image, u32, f32, f32) -> Result<Image> = crate::image::posterize;
574const _: fn(&Image, u32, f32, f32) -> Result<Image> = Image::posterize;
575const _: fn(&Image) -> Result<Image> = crate::image::grayscale;
576const _: fn(&Image) -> Result<Image> = Image::grayscale;
577const _: fn(&Image, &Image, f32) -> Result<Image> = crate::image::alpha_blend;
578const _: fn(&Image, &Image, f32) -> Result<Image> = Image::alpha_blend;
579const _: fn(&Image, &Image, &Image) -> Result<Image> = crate::image::composite;
580const _: fn(&Image, &Image, &Image) -> Result<Image> = Image::composite;
581const _: fn(&Image, u32, u32, u32, u32, f32) -> Result<Image> = crate::image::erase;
582const _: fn(&Image, u32, u32, u32, u32, f32) -> Result<Image> = Image::erase;
583const _: fn(&Image, &Matrix) -> Result<Image> = crate::image::color_twist;
584const _: fn(&Image, &Matrix) -> Result<Image> = Image::color_twist;
585const _: fn(&Image, [u32; 4], ImageFormat) -> Result<Image> = crate::image::channel_reorder;
586const _: fn(&Image, [u32; 4], ImageFormat) -> Result<Image> = Image::channel_reorder;
587const _: fn(&Image, f32, f32, u64) -> Result<Image> = crate::image::gaussian_noise;
588const _: fn(&Image, f32, f32, u64) -> Result<Image> = Image::gaussian_noise;
589const _: fn(&Image, f32, f32, f32, u64) -> Result<Image> = crate::image::salt_pepper_noise;
590const _: fn(&Image, f32, f32, f32, u64) -> Result<Image> = Image::salt_pepper_noise;
591const _: fn(&Image, &Matrix, BorderMode, f32) -> Result<Image> = crate::image::convolve_2d;
592const _: fn(&Image, &Matrix, BorderMode, f32) -> Result<Image> = Image::convolve_2d;
593const _: fn(&Image, &Matrix, &Matrix, BorderMode, f32) -> Result<Image> =
594	crate::image::separable_convolve_2d;
595const _: fn(&Image, &Matrix, &Matrix, BorderMode, f32) -> Result<Image> =
596	Image::separable_convolve_2d;
597const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::average_blur;
598const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::average_blur;
599const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::sobel;
600const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::sobel;
601const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = crate::image::scharr;
602const _: fn(&Image, u32, u32, BorderMode) -> Result<Image> = Image::scharr;
603const _: fn(&Image, BorderMode) -> Result<Image> = crate::image::laplacian;
604const _: fn(&Image, BorderMode) -> Result<Image> = Image::laplacian;
605const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::erode;
606const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::erode;
607const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::dilate;
608const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::dilate;
609const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_open;
610const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_open;
611const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_close;
612const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_close;
613const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_gradient;
614const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_gradient;
615const _: fn(&Image, f32, u32) -> Result<Image> = crate::image::gaussian_blur;
616const _: fn(&Image, f32, u32) -> Result<Image> = Image::gaussian_blur;
617const _: fn(&Image, f32, BorderMode) -> Result<Image> = crate::image::sharpen;
618const _: fn(&Image, f32, BorderMode) -> Result<Image> = Image::sharpen;
619const _: fn(&Image, u32, BorderMode) -> Result<Image> = crate::image::median_blur;
620const _: fn(&Image, u32, BorderMode) -> Result<Image> = Image::median_blur;
621const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = crate::image::bilateral_filter;
622const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = Image::bilateral_filter;
623const _: fn(&Image, f32, f32, u32) -> Result<Image> = crate::image::unsharp_mask;
624const _: fn(&Image, f32, f32, u32) -> Result<Image> = Image::unsharp_mask;
625const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = crate::image::morphology_top_hat;
626const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_top_hat;
627const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> =
628	crate::image::morphology_black_hat;
629const _: fn(&Image, u32, u32, BorderMode, f32) -> Result<Image> = Image::morphology_black_hat;
630const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> =
631	crate::image::adaptive_threshold_mean;
632const _: fn(&Image, u32, f32, f32, BorderMode) -> Result<Image> = Image::adaptive_threshold_mean;
633const _: fn(&Image, u32, f32, f32, f32, BorderMode) -> Result<Image> =
634	crate::image::adaptive_threshold_gaussian;
635const _: fn(&Image, u32, f32, f32, f32, BorderMode) -> Result<Image> =
636	Image::adaptive_threshold_gaussian;
637const _: fn(&Image, NormalizationConfig) -> Result<Image> = crate::image::normalize;
638const _: fn(&Image, NormalizationConfig) -> Result<Image> = Image::normalize;
639const _: fn(&Image, crate::ImageFormat) -> Result<Image> = crate::image::convert_color;
640const _: fn(&Image, crate::ImageFormat) -> Result<Image> = Image::convert_color;
641const _: fn(&Image, u32, u32, NormalizationConfig) -> Result<Image> =
642	crate::image::resize_normalize;
643const _: fn(&Image, u32, u32, NormalizationConfig) -> Result<Image> = Image::resize_normalize;
644const _: fn(&Image, &Matrix, &Matrix, f32) -> Result<Image> = crate::image::segmentation_overlay;
645const _: fn(&Image, &Matrix, &Matrix, f32) -> Result<Image> = Image::segmentation_overlay;
646const _: fn(&Image, u32, f32, f32) -> Result<Matrix> = crate::image::calc_hist;
647const _: fn(&Image, u32, f32, f32) -> Result<Matrix> = Image::calc_hist;
648const _: fn(&Image) -> Result<Image> = crate::image::equalize_hist;
649const _: fn(&Image) -> Result<Image> = Image::equalize_hist;