A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

image.h
Go to the documentation of this file.
1/*******************************************************
2 * Copyright (c) 2014, ArrayFire
3 * All rights reserved.
4 *
5 * This file is distributed under 3-clause BSD license.
6 * The complete license agreement can be obtained at:
7 * http://arrayfire.com/licenses/BSD-3-Clause
8 ********************************************************/
9
10#pragma once
11#include <af/defines.h>
12#include <af/features.h>
13
14#ifdef __cplusplus
15 namespace af
16{
17 class array;
18
28 AFAPI void grad(array& dx, array& dy, const array& in);
29
39 AFAPI array loadImage(const char* filename, const bool is_color=false);
40
49 AFAPI void saveImage(const char* filename, const array& in);
50
51#if AF_API_VERSION >= 31
65 AFAPI array loadImageMem(const void *ptr);
66#endif
67
68#if AF_API_VERSION >= 31
84 AFAPI void* saveImageMem(const array& in, const imageFormat format = AF_FIF_PNG);
85#endif
86
87#if AF_API_VERSION >= 31
96 AFAPI void deleteImageMem(void *ptr);
97#endif
98
99#if AF_API_VERSION >= 32
117 AFAPI array loadImageNative(const char* filename);
118#endif
119
120#if AF_API_VERSION >= 32
147 AFAPI void saveImageNative(const char* filename, const array& in);
148#endif
149
150#if AF_API_VERSION >= 33
157 AFAPI bool isImageIOAvailable();
158#endif
159
171 AFAPI array resize(const array& in, const dim_t odim0, const dim_t odim1, const interpType method=AF_INTERP_NEAREST);
172
184 AFAPI array resize(const float scale0, const float scale1, const array& in, const interpType method=AF_INTERP_NEAREST);
185
196 AFAPI array resize(const float scale, const array& in, const interpType method=AF_INTERP_NEAREST);
197
209 AFAPI array rotate(const array& in, const float theta, const bool crop=true, const interpType method=AF_INTERP_NEAREST);
210
224 AFAPI array transform(const array& in, const array& transform, const dim_t odim0 = 0, const dim_t odim1 = 0,
225 const interpType method=AF_INTERP_NEAREST, const bool inverse=true);
226
227#if AF_API_VERSION >= 33
238 AFAPI array transformCoordinates(const array& tf, const float d0, const float d1);
239#endif
240
254 AFAPI array translate(const array& in, const float trans0, const float trans1, const dim_t odim0 = 0, const dim_t odim1 = 0, const interpType method=AF_INTERP_NEAREST);
255
269 AFAPI array scale(const array& in, const float scale0, const float scale1, const dim_t odim0 = 0, const dim_t odim1 = 0, const interpType method=AF_INTERP_NEAREST);
270
285 AFAPI array skew(const array& in, const float skew0, const float skew1, const dim_t odim0 = 0, const dim_t odim1 = 0, const bool inverse=true, const interpType method=AF_INTERP_NEAREST);
286
298 AFAPI array bilateral(const array &in, const float spatial_sigma, const float chromatic_sigma, const bool is_color=false);
299
313 AFAPI array histogram(const array &in, const unsigned nbins, const double minval, const double maxval);
314
326 AFAPI array histogram(const array &in, const unsigned nbins);
327
340 AFAPI array meanShift(const array& in, const float spatial_sigma, const float chromatic_sigma, const unsigned iter, const bool is_color=false);
341
354 AFAPI array minfilt(const array& in, const dim_t wind_length = 3, const dim_t wind_width = 3, const borderType edge_pad = AF_PAD_ZERO);
355
368 AFAPI array maxfilt(const array& in, const dim_t wind_length = 3, const dim_t wind_width = 3, const borderType edge_pad = AF_PAD_ZERO);
369
381 AFAPI array dilate(const array& in, const array& mask);
382
392 AFAPI array dilate3(const array& in, const array& mask);
393
405 AFAPI array erode(const array& in, const array& mask);
406
416 AFAPI array erode3(const array& in, const array& mask);
417
445 AFAPI array regions(const array& in, const af::connectivity connectivity=AF_CONNECTIVITY_4, const dtype type=f32);
446
459 AFAPI void sobel(array &dx, array &dy, const array &img, const unsigned ker_size=3);
460
473 AFAPI array sobel(const array &img, const unsigned ker_size=3, const bool isFast=false);
474
488 AFAPI array rgb2gray(const array& in, const float rPercent=0.2126f, const float gPercent=0.7152f, const float bPercent=0.0722f);
489
503 AFAPI array gray2rgb(const array& in, const float rFactor=1.0, const float gFactor=1.0, const float bFactor=1.0);
504
518 AFAPI array histEqual(const array& in, const array& hist);
519
531 AFAPI array gaussianKernel(const int rows, const int cols, const double sig_r = 0, const double sig_c = 0);
532
543 AFAPI array hsv2rgb(const array& in);
544
555 AFAPI array rgb2hsv(const array& in);
556
571 AFAPI array colorSpace(const array& image, const CSpace to, const CSpace from);
572
573#if AF_API_VERSION >= 31
598 AFAPI array unwrap(const array& in, const dim_t wx, const dim_t wy,
599 const dim_t sx, const dim_t sy, const dim_t px=0, const dim_t py=0,
600 const bool is_column = true);
601#endif
602
603#if AF_API_VERSION >= 31
636 AFAPI array wrap(const array& in,
637 const dim_t ox, const dim_t oy,
638 const dim_t wx, const dim_t wy,
639 const dim_t sx, const dim_t sy,
640 const dim_t px = 0, const dim_t py = 0,
641 const bool is_column = true);
642#endif
643
644#if AF_API_VERSION >= 31
653 AFAPI array sat(const array& in);
654#endif
655
656#if AF_API_VERSION >= 31
669 AFAPI array ycbcr2rgb(const array& in, const YCCStd standard=AF_YCC_601);
670#endif
671
672#if AF_API_VERSION >= 31
685 AFAPI array rgb2ycbcr(const array& in, const YCCStd standard=AF_YCC_601);
686#endif
687
688#if AF_API_VERSION >= 34
699 AFAPI void moments(double* out, const array& in, const momentType moment=AF_MOMENT_FIRST_ORDER);
700#endif
701
702#if AF_API_VERSION >= 34
712 AFAPI array moments(const array& in, const momentType moment=AF_MOMENT_FIRST_ORDER);
713#endif
714
715#if AF_API_VERSION >= 35
735 AFAPI array canny(const array& in, const cannyThreshold thresholdType,
736 const float lowThresholdRatio, const float highThresholdRatio,
737 const unsigned sobelWindow = 3, const bool isFast = false);
738#endif
739
740#if AF_API_VERSION >= 36
755 AFAPI array anisotropicDiffusion(const af::array& in, const float timestep,
756 const float conductance, const unsigned iterations,
757 const fluxFunction fftype=AF_FLUX_EXPONENTIAL,
758 const diffusionEq diffusionKind=AF_DIFFUSION_GRAD);
759#endif
760
761#if AF_API_VERSION >= 37
780 AFAPI array iterativeDeconv(const array& in, const array& ker,
781 const unsigned iterations, const float relaxFactor,
782 const iterativeDeconvAlgo algo);
783
798 AFAPI array inverseDeconv(const array& in, const array& psf,
799 const float gamma, const inverseDeconvAlgo algo);
800
820 AFAPI array confidenceCC(const array &in, const array &seeds,
821 const unsigned radius,
822 const unsigned multiplier, const int iter,
823 const double segmentedValue);
824
843 AFAPI array confidenceCC(const array &in, const array &seedx,
844 const array &seedy, const unsigned radius,
845 const unsigned multiplier, const int iter,
846 const double segmentedValue);
847
867 AFAPI array confidenceCC(const array &in, const size_t num_seeds,
868 const unsigned *seedx, const unsigned *seedy,
869 const unsigned radius, const unsigned multiplier,
870 const int iter, const double segmentedValue);
871
872#endif
873}
874#endif
875
876#ifdef __cplusplus
877 extern "C" {
878#endif
879
891 AFAPI af_err af_gradient(af_array *dx, af_array *dy, const af_array in);
892
904 AFAPI af_err af_load_image(af_array *out, const char* filename, const bool isColor);
905
916 AFAPI af_err af_save_image(const char* filename, const af_array in);
917
918#if AF_API_VERSION >= 31
929 AFAPI af_err af_load_image_memory(af_array *out, const void* ptr);
930#endif
931
932#if AF_API_VERSION >= 31
945 AFAPI af_err af_save_image_memory(void** ptr, const af_array in, const af_image_format format);
946#endif
947
948#if AF_API_VERSION >= 31
958 AFAPI af_err af_delete_image_memory(void* ptr);
959#endif
960
961#if AF_API_VERSION >= 32
980 AFAPI af_err af_load_image_native(af_array *out, const char* filename);
981#endif
982
983#if AF_API_VERSION >= 32
1012 AFAPI af_err af_save_image_native(const char* filename, const af_array in);
1013#endif
1014
1015#if AF_API_VERSION >= 33
1026 AFAPI af_err af_is_image_io_available(bool *out);
1027#endif
1028
1043 AFAPI af_err af_resize(af_array *out, const af_array in, const dim_t odim0, const dim_t odim1, const af_interp_type method);
1044
1061 AFAPI af_err af_transform(af_array *out, const af_array in, const af_array transform,
1062 const dim_t odim0, const dim_t odim1,
1063 const af_interp_type method, const bool inverse);
1064
1065#if AF_API_VERSION >= 37
1089 AFAPI af_err af_transform_v2(af_array *out, const af_array in, const af_array transform,
1090 const dim_t odim0, const dim_t odim1,
1091 const af_interp_type method, const bool inverse);
1092#endif
1093
1094#if AF_API_VERSION >= 33
1106 AFAPI af_err af_transform_coordinates(af_array *out, const af_array tf, const float d0, const float d1);
1107#endif
1108
1122 AFAPI af_err af_rotate(af_array *out, const af_array in, const float theta,
1123 const bool crop, const af_interp_type method);
1139 AFAPI af_err af_translate(af_array *out, const af_array in, const float trans0, const float trans1,
1140 const dim_t odim0, const dim_t odim1, const af_interp_type method);
1156 AFAPI af_err af_scale(af_array *out, const af_array in, const float scale0, const float scale1,
1157 const dim_t odim0, const dim_t odim1, const af_interp_type method);
1174 AFAPI af_err af_skew(af_array *out, const af_array in, const float skew0, const float skew1,
1175 const dim_t odim0, const dim_t odim1, const af_interp_type method,
1176 const bool inverse);
1177
1191 AFAPI af_err af_histogram(af_array *out, const af_array in, const unsigned nbins, const double minval, const double maxval);
1192
1206 AFAPI af_err af_dilate(af_array *out, const af_array in, const af_array mask);
1207
1219 AFAPI af_err af_dilate3(af_array *out, const af_array in, const af_array mask);
1220
1234 AFAPI af_err af_erode(af_array *out, const af_array in, const af_array mask);
1235
1247 AFAPI af_err af_erode3(af_array *out, const af_array in, const af_array mask);
1248
1262 AFAPI af_err af_bilateral(af_array *out, const af_array in, const float spatial_sigma, const float chromatic_sigma, const bool isColor);
1263
1278 AFAPI af_err af_mean_shift(af_array *out, const af_array in, const float spatial_sigma, const float chromatic_sigma, const unsigned iter, const bool is_color);
1279
1294 AFAPI af_err af_minfilt(af_array *out, const af_array in, const dim_t wind_length, const dim_t wind_width, const af_border_type edge_pad);
1295
1310 AFAPI af_err af_maxfilt(af_array *out, const af_array in, const dim_t wind_length, const dim_t wind_width, const af_border_type edge_pad);
1311
1324 AFAPI af_err af_regions(af_array *out, const af_array in, const af_connectivity connectivity, const af_dtype ty);
1325
1340 AFAPI af_err af_sobel_operator(af_array *dx, af_array *dy, const af_array img, const unsigned ker_size);
1341
1357 AFAPI af_err af_rgb2gray(af_array* out, const af_array in, const float rPercent, const float gPercent, const float bPercent);
1358
1374 AFAPI af_err af_gray2rgb(af_array* out, const af_array in, const float rFactor, const float gFactor, const float bFactor);
1375
1389 AFAPI af_err af_hist_equal(af_array *out, const af_array in, const af_array hist);
1390
1404 AFAPI af_err af_gaussian_kernel(af_array *out,
1405 const int rows, const int cols,
1406 const double sigma_r, const double sigma_c);
1407
1420 AFAPI af_err af_hsv2rgb(af_array* out, const af_array in);
1421
1434 AFAPI af_err af_rgb2hsv(af_array* out, const af_array in);
1435
1453 AFAPI af_err af_color_space(af_array *out, const af_array image, const af_cspace_t to, const af_cspace_t from);
1454
1455#if AF_API_VERSION >= 31
1483 AFAPI af_err af_unwrap(af_array *out, const af_array in, const dim_t wx, const dim_t wy,
1484 const dim_t sx, const dim_t sy, const dim_t px, const dim_t py,
1485 const bool is_column);
1486#endif
1487
1488#if AF_API_VERSION >= 31
1524 AFAPI af_err af_wrap(af_array *out,
1525 const af_array in,
1526 const dim_t ox, const dim_t oy,
1527 const dim_t wx, const dim_t wy,
1528 const dim_t sx, const dim_t sy,
1529 const dim_t px, const dim_t py,
1530 const bool is_column);
1531#endif
1532
1533#if AF_API_VERSION >= 37
1570 AFAPI af_err af_wrap_v2(af_array *out,
1571 const af_array in,
1572 const dim_t ox, const dim_t oy,
1573 const dim_t wx, const dim_t wy,
1574 const dim_t sx, const dim_t sy,
1575 const dim_t px, const dim_t py,
1576 const bool is_column);
1577#endif
1578
1579#if AF_API_VERSION >= 31
1590 AFAPI af_err af_sat(af_array *out, const af_array in);
1591#endif
1592
1593#if AF_API_VERSION >= 31
1608 AFAPI af_err af_ycbcr2rgb(af_array* out, const af_array in, const af_ycc_std standard);
1609#endif
1610
1611#if AF_API_VERSION >= 31
1626 AFAPI af_err af_rgb2ycbcr(af_array* out, const af_array in, const af_ycc_std standard);
1627#endif
1628
1629#if AF_API_VERSION >= 34
1641 AFAPI af_err af_moments(af_array *out, const af_array in, const af_moment_type moment);
1642#endif
1643
1644#if AF_API_VERSION >= 34
1657 AFAPI af_err af_moments_all(double* out, const af_array in, const af_moment_type moment);
1658#endif
1659
1660#if AF_API_VERSION >= 35
1683 AFAPI af_err af_canny(af_array* out, const af_array in,
1684 const af_canny_threshold threshold_type,
1685 const float low_threshold_ratio,
1686 const float high_threshold_ratio,
1687 const unsigned sobel_window, const bool is_fast);
1688#endif
1689
1690#if AF_API_VERSION >= 36
1709 AFAPI af_err af_anisotropic_diffusion(af_array* out, const af_array in,
1710 const float timestep,
1711 const float conductance,
1712 const unsigned iterations,
1713 const af_flux_function fftype,
1714 const af_diffusion_eq diffusion_kind);
1715#endif
1716
1717#if AF_API_VERSION >= 37
1738 AFAPI af_err af_iterative_deconv(af_array* out,
1739 const af_array in, const af_array ker,
1740 const unsigned iterations,
1741 const float relax_factor,
1742 const af_iterative_deconv_algo algo);
1743
1761 AFAPI af_err af_inverse_deconv(af_array* out, const af_array in,
1762 const af_array psf, const float gamma,
1763 const af_inverse_deconv_algo algo);
1764
1785 AFAPI af_err af_confidence_cc(af_array *out, const af_array in,
1786 const af_array seedx, const af_array seedy,
1787 const unsigned radius,
1788 const unsigned multiplier, const int iter,
1789 const double segmented_value);
1790
1791#endif
1792
1793#ifdef __cplusplus
1794}
1795#endif
af::array
A multi dimensional data container.
Definition array.h:37
defines.h
af_dtype
af_dtype
Definition defines.h:210
f32
@ f32
32-bit floating point values
Definition defines.h:211
af_canny_threshold
af_canny_threshold
Definition defines.h:483
af_iterative_deconv_algo
af_iterative_deconv_algo
Definition defines.h:528
af_inverse_deconv_algo
af_inverse_deconv_algo
Definition defines.h:534
af_border_type
af_border_type
Definition defines.h:266
AF_PAD_ZERO
@ AF_PAD_ZERO
Out of bound values are 0.
Definition defines.h:270
af_image_format
af_image_format
Definition defines.h:377
AF_FIF_PNG
@ AF_FIF_PNG
FreeImage Enum for Portable Network Graphics File.
Definition defines.h:382
dim_t
long long dim_t
Definition defines.h:56
af_err
af_err
Definition defines.h:71
af_array
void * af_array
Definition defines.h:240
af_ycc_std
af_ycc_std
Definition defines.h:332
AF_YCC_601
@ AF_YCC_601
ITU-R BT.601 (formerly CCIR 601) standard.
Definition defines.h:333
AFAPI
#define AFAPI
Definition defines.h:38
af_interp_type
af_interp_type
Definition defines.h:242
AF_INTERP_NEAREST
@ AF_INTERP_NEAREST
Nearest Interpolation.
Definition defines.h:243
af_diffusion_eq
af_diffusion_eq
Definition defines.h:505
AF_DIFFUSION_GRAD
@ AF_DIFFUSION_GRAD
Gradient diffusion equation.
Definition defines.h:506
af_moment_type
af_moment_type
Definition defines.h:395
AF_MOMENT_FIRST_ORDER
@ AF_MOMENT_FIRST_ORDER
Definition defines.h:400
af_cspace_t
af_cspace_t
Definition defines.h:339
af_flux_function
af_flux_function
Definition defines.h:499
AF_FLUX_EXPONENTIAL
@ AF_FLUX_EXPONENTIAL
Exponential flux function.
Definition defines.h:501
af_connectivity
af_connectivity
Definition defines.h:288
AF_CONNECTIVITY_4
@ AF_CONNECTIVITY_4
Connectivity includes neighbors, North, East, South and West of current pixel.
Definition defines.h:292
features.h
af::grad
AFAPI void grad(array &dx, array &dy, const array &in)
C++ Interface for calculating the gradients.
af_gradient
AFAPI af_err af_gradient(af_array *dx, af_array *dy, const af_array in)
C Interface for calculating the gradients.
af::anisotropicDiffusion
AFAPI array anisotropicDiffusion(const af::array &in, const float timestep, const float conductance, const unsigned iterations, const fluxFunction fftype=AF_FLUX_EXPONENTIAL, const diffusionEq diffusionKind=AF_DIFFUSION_GRAD)
C++ Interface for gradient anisotropic(non-linear diffusion) smoothing.
af_anisotropic_diffusion
AFAPI af_err af_anisotropic_diffusion(af_array *out, const af_array in, const float timestep, const float conductance, const unsigned iterations, const af_flux_function fftype, const af_diffusion_eq diffusion_kind)
C Interface for anisotropic diffusion.
af_bilateral
AFAPI af_err af_bilateral(af_array *out, const af_array in, const float spatial_sigma, const float chromatic_sigma, const bool isColor)
C Interface for bilateral filter.
af::bilateral
AFAPI array bilateral(const array &in, const float spatial_sigma, const float chromatic_sigma, const bool is_color=false)
C++ Interface for bilateral filter.
af_canny
AFAPI af_err af_canny(af_array *out, const af_array in, const af_canny_threshold threshold_type, const float low_threshold_ratio, const float high_threshold_ratio, const unsigned sobel_window, const bool is_fast)
C Interface for canny edge detector.
af::canny
AFAPI array canny(const array &in, const cannyThreshold thresholdType, const float lowThresholdRatio, const float highThresholdRatio, const unsigned sobelWindow=3, const bool isFast=false)
C++ Interface for canny edge detector.
af_color_space
AFAPI af_err af_color_space(af_array *out, const af_array image, const af_cspace_t to, const af_cspace_t from)
C Interface wrapper for color space conversion.
af::colorSpace
AFAPI array colorSpace(const array &image, const CSpace to, const CSpace from)
C++ Interface wrapper for colorspace conversion.
af::confidenceCC
AFAPI array confidenceCC(const array &in, const array &seeds, const unsigned radius, const unsigned multiplier, const int iter, const double segmentedValue)
C++ Interface for confidence connected components.
af_confidence_cc
AFAPI af_err af_confidence_cc(af_array *out, const af_array in, const af_array seedx, const af_array seedy, const unsigned radius, const unsigned multiplier, const int iter, const double segmented_value)
C Interface for confidence connected components.
af::dilate3
AFAPI array dilate3(const array &in, const array &mask)
C++ Interface for 3D image dilation.
af_dilate3
AFAPI af_err af_dilate3(af_array *out, const af_array in, const af_array mask)
C Interface for 3d image dilation.
af::dilate
AFAPI array dilate(const array &in, const array &mask)
C++ Interface for image dilation (max filter)
af_dilate
AFAPI af_err af_dilate(af_array *out, const af_array in, const af_array mask)
C Interface for image dilation (max filter)
af::erode3
AFAPI array erode3(const array &in, const array &mask)
C++ Interface for 3d for image erosion.
af_erode3
AFAPI af_err af_erode3(af_array *out, const af_array in, const af_array mask)
C Interface for 3D image erosion.
af_erode
AFAPI af_err af_erode(af_array *out, const af_array in, const af_array mask)
C Interface for image erosion (min filter)
af::erode
AFAPI array erode(const array &in, const array &mask)
C++ Interface for image erosion (min filter)
af_gaussian_kernel
AFAPI af_err af_gaussian_kernel(af_array *out, const int rows, const int cols, const double sigma_r, const double sigma_c)
C Interface generating gaussian kernels.
af::gaussianKernel
AFAPI array gaussianKernel(const int rows, const int cols, const double sig_r=0, const double sig_c=0)
C++ Interface for generating gausian kernels.
af_gray2rgb
AFAPI af_err af_gray2rgb(af_array *out, const af_array in, const float rFactor, const float gFactor, const float bFactor)
C Interface for converting gray to RGB.
af::gray2rgb
AFAPI array gray2rgb(const array &in, const float rFactor=1.0, const float gFactor=1.0, const float bFactor=1.0)
C++ Interface for gray to RGB conversion.
af_hist_equal
AFAPI af_err af_hist_equal(af_array *out, const af_array in, const af_array hist)
C Interface for histogram equalization.
af::histEqual
AFAPI array histEqual(const array &in, const array &hist)
C++ Interface for histogram equalization.
af_histogram
AFAPI af_err af_histogram(af_array *out, const af_array in, const unsigned nbins, const double minval, const double maxval)
C Interface for histogram.
af::histogram
AFAPI array histogram(const array &in, const unsigned nbins, const double minval, const double maxval)
C++ Interface for histogram.
af_hsv2rgb
AFAPI af_err af_hsv2rgb(af_array *out, const af_array in)
C Interface for converting HSV to RGB.
af::hsv2rgb
AFAPI array hsv2rgb(const array &in)
C++ Interface for converting HSV to RGB.
af_inverse_deconv
AFAPI af_err af_inverse_deconv(af_array *out, const af_array in, const af_array psf, const float gamma, const af_inverse_deconv_algo algo)
C Interface for Tikhonov deconvolution algorithm.
af::inverseDeconv
AFAPI array inverseDeconv(const array &in, const array &psf, const float gamma, const inverseDeconvAlgo algo)
C++ Interface for Tikhonov deconvolution algorithm.
af::iterativeDeconv
AFAPI array iterativeDeconv(const array &in, const array &ker, const unsigned iterations, const float relaxFactor, const iterativeDeconvAlgo algo)
C++ Interface for Iterative deconvolution algorithm.
af_iterative_deconv
AFAPI af_err af_iterative_deconv(af_array *out, const af_array in, const af_array ker, const unsigned iterations, const float relax_factor, const af_iterative_deconv_algo algo)
C Interface for Iterative deconvolution algorithm.
af::maxfilt
AFAPI array maxfilt(const array &in, const dim_t wind_length=3, const dim_t wind_width=3, const borderType edge_pad=AF_PAD_ZERO)
C++ Interface for maximum filter.
af_maxfilt
AFAPI af_err af_maxfilt(af_array *out, const af_array in, const dim_t wind_length, const dim_t wind_width, const af_border_type edge_pad)
C Interface for maximum filter.
af_mean_shift
AFAPI af_err af_mean_shift(af_array *out, const af_array in, const float spatial_sigma, const float chromatic_sigma, const unsigned iter, const bool is_color)
C Interface for mean shift.
af::meanShift
AFAPI array meanShift(const array &in, const float spatial_sigma, const float chromatic_sigma, const unsigned iter, const bool is_color=false)
C++ Interface for mean shift.
af_minfilt
AFAPI af_err af_minfilt(af_array *out, const af_array in, const dim_t wind_length, const dim_t wind_width, const af_border_type edge_pad)
C Interface for minimum filter.
af::minfilt
AFAPI array minfilt(const array &in, const dim_t wind_length=3, const dim_t wind_width=3, const borderType edge_pad=AF_PAD_ZERO)
C++ Interface for minimum filter.
af_moments
AFAPI af_err af_moments(af_array *out, const af_array in, const af_moment_type moment)
C Interface for finding image moments.
af_moments_all
AFAPI af_err af_moments_all(double *out, const af_array in, const af_moment_type moment)
C Interface for calculating image moment(s) of a single image.
af::moments
AFAPI void moments(double *out, const array &in, const momentType moment=AF_MOMENT_FIRST_ORDER)
C++ Interface for calculating an image moment.
af_regions
AFAPI af_err af_regions(af_array *out, const af_array in, const af_connectivity connectivity, const af_dtype ty)
C Interface for regions in an image.
af::regions
AFAPI array regions(const array &in, const af::connectivity connectivity=AF_CONNECTIVITY_4, const dtype type=f32)
C++ Interface for getting regions in an image.
af_rgb2gray
AFAPI af_err af_rgb2gray(af_array *out, const af_array in, const float rPercent, const float gPercent, const float bPercent)
C Interface for converting RGB to gray.
af::rgb2gray
AFAPI array rgb2gray(const array &in, const float rPercent=0.2126f, const float gPercent=0.7152f, const float bPercent=0.0722f)
C++ Interface for RGB to gray conversion.
af_rgb2hsv
AFAPI af_err af_rgb2hsv(af_array *out, const af_array in)
C Interface for converting RGB to HSV.
af::rgb2hsv
AFAPI array rgb2hsv(const array &in)
C++ Interface for converting RGB to HSV.
af::rgb2ycbcr
AFAPI array rgb2ycbcr(const array &in, const YCCStd standard=AF_YCC_601)
C++ Interface for converting RGB to YCbCr.
af_rgb2ycbcr
AFAPI af_err af_rgb2ycbcr(af_array *out, const af_array in, const af_ycc_std standard)
C Interface for converting RGB to YCbCr.
af::sat
AFAPI array sat(const array &in)
C++ Interface wrapper for summed area tables.
af_sat
AFAPI af_err af_sat(af_array *out, const af_array in)
C Interface wrapper for summed area tables.
af_sobel_operator
AFAPI af_err af_sobel_operator(af_array *dx, af_array *dy, const af_array img, const unsigned ker_size)
C Interface for getting sobel gradients.
af::sobel
AFAPI void sobel(array &dx, array &dy, const array &img, const unsigned ker_size=3)
C++ Interface for extracting sobel gradients.
af_unwrap
AFAPI af_err af_unwrap(af_array *out, const af_array in, const dim_t wx, const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px, const dim_t py, const bool is_column)
C Interface for rearranging windowed sections of an input into columns (or rows)
af::unwrap
AFAPI array unwrap(const array &in, const dim_t wx, const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px=0, const dim_t py=0, const bool is_column=true)
C++ Interface for rearranging windowed sections of an input into columns (or rows)
af::wrap
AFAPI array wrap(const array &in, const dim_t ox, const dim_t oy, const dim_t wx, const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px=0, const dim_t py=0, const bool is_column=true)
C++ Interface for performing the opposite of unwrap.
af_wrap
AFAPI af_err af_wrap(af_array *out, const af_array in, const dim_t ox, const dim_t oy, const dim_t wx, const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px, const dim_t py, const bool is_column)
C Interface for performing the opposite of af::unwrap()
af_wrap_v2
AFAPI af_err af_wrap_v2(af_array *out, const af_array in, const dim_t ox, const dim_t oy, const dim_t wx, const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px, const dim_t py, const bool is_column)
C Interface for the version of af_wrap that accepts a preallocated output array.
af::ycbcr2rgb
AFAPI array ycbcr2rgb(const array &in, const YCCStd standard=AF_YCC_601)
C++ Interface for converting YCbCr to RGB.
af_ycbcr2rgb
AFAPI af_err af_ycbcr2rgb(af_array *out, const af_array in, const af_ycc_std standard)
C Interface for converting YCbCr to RGB.
af_is_image_io_available
AFAPI af_err af_is_image_io_available(bool *out)
Function to check if Image IO is available.
af::isImageIOAvailable
AFAPI bool isImageIOAvailable()
Function to check if Image IO is available.
af::loadImage
AFAPI array loadImage(const char *filename, const bool is_color=false)
C++ Interface for loading an image.
af::loadImageNative
AFAPI array loadImageNative(const char *filename)
C++ Interface for loading an image as its original type.
af_load_image
AFAPI af_err af_load_image(af_array *out, const char *filename, const bool isColor)
C Interface for loading an image.
af_load_image_native
AFAPI af_err af_load_image_native(af_array *out, const char *filename)
C Interface for loading an image as is original type.
af_save_image
AFAPI af_err af_save_image(const char *filename, const af_array in)
C Interface for saving an image.
af::saveImageNative
AFAPI void saveImageNative(const char *filename, const array &in)
C++ Interface for saving an image without modifications.
af::saveImage
AFAPI void saveImage(const char *filename, const array &in)
C++ Interface for saving an image.
af_save_image_native
AFAPI af_err af_save_image_native(const char *filename, const af_array in)
C Interface for saving an image without modifications.
af::deleteImageMem
AFAPI void deleteImageMem(void *ptr)
C++ Interface for deleting memory created by saveImageMem or af_save_image_memory.
af_delete_image_memory
AFAPI af_err af_delete_image_memory(void *ptr)
C Interface for deleting an image from memory.
af::loadImageMem
AFAPI array loadImageMem(const void *ptr)
C++ Interface for loading an image from memory.
af_load_image_memory
AFAPI af_err af_load_image_memory(af_array *out, const void *ptr)
C Interface for loading an image from memory.
af::saveImageMem
AFAPI void * saveImageMem(const array &in, const imageFormat format=AF_FIF_PNG)
C++ Interface for saving an image to memory.
af_save_image_memory
AFAPI af_err af_save_image_memory(void **ptr, const af_array in, const af_image_format format)
C Interface for saving an image to memory using FreeImage.
af::inverse
AFAPI array inverse(const array &in, const matProp options=AF_MAT_NONE)
C++ Interface to invert a matrix.
af_transform_coordinates
AFAPI af_err af_transform_coordinates(af_array *out, const af_array tf, const float d0, const float d1)
C Interface for transforming an image C++ Interface for transforming coordinates.
af::transformCoordinates
AFAPI array transformCoordinates(const array &tf, const float d0, const float d1)
C++ Interface for transforming coordinates.
af_resize
AFAPI af_err af_resize(af_array *out, const af_array in, const dim_t odim0, const dim_t odim1, const af_interp_type method)
C Interface for resizing an image to specified dimensions.
af::resize
AFAPI array resize(const array &in, const dim_t odim0, const dim_t odim1, const interpType method=AF_INTERP_NEAREST)
C++ Interface for resizing an image to specified dimensions.
af::rotate
AFAPI array rotate(const array &in, const float theta, const bool crop=true, const interpType method=AF_INTERP_NEAREST)
C++ Interface for rotating an image.
af_rotate
AFAPI af_err af_rotate(af_array *out, const af_array in, const float theta, const bool crop, const af_interp_type method)
C Interface for rotating an image.
af::scale
AFAPI array scale(const array &in, const float scale0, const float scale1, const dim_t odim0=0, const dim_t odim1=0, const interpType method=AF_INTERP_NEAREST)
C++ Interface for scaling an image.
af_scale
AFAPI af_err af_scale(af_array *out, const af_array in, const float scale0, const float scale1, const dim_t odim0, const dim_t odim1, const af_interp_type method)
C Interface for scaling an image.
af_skew
AFAPI af_err af_skew(af_array *out, const af_array in, const float skew0, const float skew1, const dim_t odim0, const dim_t odim1, const af_interp_type method, const bool inverse)
C Interface for skewing an image.
af::skew
AFAPI array skew(const array &in, const float skew0, const float skew1, const dim_t odim0=0, const dim_t odim1=0, const bool inverse=true, const interpType method=AF_INTERP_NEAREST)
C++ Interface for skewing an image.
af_transform
AFAPI af_err af_transform(af_array *out, const af_array in, const af_array transform, const dim_t odim0, const dim_t odim1, const af_interp_type method, const bool inverse)
C Interface for transforming an image.
af::transform
AFAPI array transform(const array &in, const array &transform, const dim_t odim0=0, const dim_t odim1=0, const interpType method=AF_INTERP_NEAREST, const bool inverse=true)
C++ Interface for transforming an image.
af_transform_v2
AFAPI af_err af_transform_v2(af_array *out, const af_array in, const af_array transform, const dim_t odim0, const dim_t odim1, const af_interp_type method, const bool inverse)
C Interface for the version of af_transform that accepts a preallocated output array.
af::translate
AFAPI array translate(const array &in, const float trans0, const float trans1, const dim_t odim0=0, const dim_t odim1=0, const interpType method=AF_INTERP_NEAREST)
C++ Interface for translating an image.
af_translate
AFAPI af_err af_translate(af_array *out, const af_array in, const float trans0, const float trans1, const dim_t odim0, const dim_t odim1, const af_interp_type method)
C Interface for translate an image.
af
Definition algorithm.h:15