My Project
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
52 
65 AFAPI array loadImageMem(const void *ptr);
66 #endif
67 
68 #if AF_API_VERSION >= 31
69 
84 AFAPI void* saveImageMem(const array& in, const imageFormat format = AF_FIF_PNG);
85 #endif
86 
87 #if AF_API_VERSION >= 31
88 
96 AFAPI void deleteImageMem(void *ptr);
97 #endif
98 
99 #if AF_API_VERSION >= 32
100 
117 AFAPI array loadImageNative(const char* filename);
118 #endif
119 
120 #if AF_API_VERSION >= 32
121 
147 AFAPI void saveImageNative(const char* filename, const array& in);
148 #endif
149 
150 #if AF_API_VERSION >= 33
151 
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
228 
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 
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
574 
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
604 
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
645 
653 AFAPI array sat(const array& in);
654 #endif
655 
656 #if AF_API_VERSION >= 31
657 
669 AFAPI array ycbcr2rgb(const array& in, const YCCStd standard=AF_YCC_601);
670 #endif
671 
672 #if AF_API_VERSION >= 31
673 
685 AFAPI array rgb2ycbcr(const array& in, const YCCStd standard=AF_YCC_601);
686 #endif
687 
688 #if AF_API_VERSION >= 34
689 
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
703 
712 AFAPI array moments(const array& in, const momentType moment=AF_MOMENT_FIRST_ORDER);
713 #endif
714 
715 #if AF_API_VERSION >= 35
716 
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
741 
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 #endif
762 
763 #ifdef __cplusplus
764 extern "C" {
765 #endif
766 
778  AFAPI af_err af_gradient(af_array *dx, af_array *dy, const af_array in);
779 
791  AFAPI af_err af_load_image(af_array *out, const char* filename, const bool isColor);
792 
803  AFAPI af_err af_save_image(const char* filename, const af_array in);
804 
805 #if AF_API_VERSION >= 31
806 
816  AFAPI af_err af_load_image_memory(af_array *out, const void* ptr);
817 #endif
818 
819 #if AF_API_VERSION >= 31
820 
832  AFAPI af_err af_save_image_memory(void** ptr, const af_array in, const af_image_format format);
833 #endif
834 
835 #if AF_API_VERSION >= 31
836 
846 #endif
847 
848 #if AF_API_VERSION >= 32
849 
867  AFAPI af_err af_load_image_native(af_array *out, const char* filename);
868 #endif
869 
870 #if AF_API_VERSION >= 32
871 
899  AFAPI af_err af_save_image_native(const char* filename, const af_array in);
900 #endif
901 
902 #if AF_API_VERSION >= 33
903 
914 #endif
915 
930  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);
931 
948  const dim_t odim0, const dim_t odim1,
949  const af_interp_type method, const bool inverse);
950 
951 #if AF_API_VERSION >= 33
952 
963  AFAPI af_err af_transform_coordinates(af_array *out, const af_array tf, const float d0, const float d1);
964 #endif
965 
979  AFAPI af_err af_rotate(af_array *out, const af_array in, const float theta,
980  const bool crop, const af_interp_type method);
996  AFAPI af_err af_translate(af_array *out, const af_array in, const float trans0, const float trans1,
997  const dim_t odim0, const dim_t odim1, const af_interp_type method);
1013  AFAPI af_err af_scale(af_array *out, const af_array in, const float scale0, const float scale1,
1014  const dim_t odim0, const dim_t odim1, const af_interp_type method);
1031  AFAPI af_err af_skew(af_array *out, const af_array in, const float skew0, const float skew1,
1032  const dim_t odim0, const dim_t odim1, const af_interp_type method,
1033  const bool inverse);
1034 
1048  AFAPI af_err af_histogram(af_array *out, const af_array in, const unsigned nbins, const double minval, const double maxval);
1049 
1063  AFAPI af_err af_dilate(af_array *out, const af_array in, const af_array mask);
1064 
1076  AFAPI af_err af_dilate3(af_array *out, const af_array in, const af_array mask);
1077 
1091  AFAPI af_err af_erode(af_array *out, const af_array in, const af_array mask);
1092 
1104  AFAPI af_err af_erode3(af_array *out, const af_array in, const af_array mask);
1105 
1119  AFAPI af_err af_bilateral(af_array *out, const af_array in, const float spatial_sigma, const float chromatic_sigma, const bool isColor);
1120 
1135  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);
1136 
1151  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);
1152 
1167  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);
1168 
1181  AFAPI af_err af_regions(af_array *out, const af_array in, const af_connectivity connectivity, const af_dtype ty);
1182 
1197  AFAPI af_err af_sobel_operator(af_array *dx, af_array *dy, const af_array img, const unsigned ker_size);
1198 
1214  AFAPI af_err af_rgb2gray(af_array* out, const af_array in, const float rPercent, const float gPercent, const float bPercent);
1215 
1231  AFAPI af_err af_gray2rgb(af_array* out, const af_array in, const float rFactor, const float gFactor, const float bFactor);
1232 
1246  AFAPI af_err af_hist_equal(af_array *out, const af_array in, const af_array hist);
1247 
1262  const int rows, const int cols,
1263  const double sigma_r, const double sigma_c);
1264 
1277  AFAPI af_err af_hsv2rgb(af_array* out, const af_array in);
1278 
1291  AFAPI af_err af_rgb2hsv(af_array* out, const af_array in);
1292 
1310  AFAPI af_err af_color_space(af_array *out, const af_array image, const af_cspace_t to, const af_cspace_t from);
1311 
1312 #if AF_API_VERSION >= 31
1313 
1340  AFAPI af_err af_unwrap(af_array *out, const af_array in, const dim_t wx, const dim_t wy,
1341  const dim_t sx, const dim_t sy, const dim_t px, const dim_t py,
1342  const bool is_column);
1343 #endif
1344 
1345 #if AF_API_VERSION >= 31
1346 
1382  const af_array in,
1383  const dim_t ox, const dim_t oy,
1384  const dim_t wx, const dim_t wy,
1385  const dim_t sx, const dim_t sy,
1386  const dim_t px, const dim_t py,
1387  const bool is_column);
1388 #endif
1389 
1390 #if AF_API_VERSION >= 31
1391 
1401  AFAPI af_err af_sat(af_array *out, const af_array in);
1402 #endif
1403 
1404 #if AF_API_VERSION >= 31
1405 
1419  AFAPI af_err af_ycbcr2rgb(af_array* out, const af_array in, const af_ycc_std standard);
1420 #endif
1421 
1422 #if AF_API_VERSION >= 31
1423 
1437  AFAPI af_err af_rgb2ycbcr(af_array* out, const af_array in, const af_ycc_std standard);
1438 #endif
1439 
1440 #if AF_API_VERSION >= 34
1441 
1452  AFAPI af_err af_moments(af_array *out, const af_array in, const af_moment_type moment);
1453 #endif
1454 
1455 #if AF_API_VERSION >= 34
1456 
1468  AFAPI af_err af_moments_all(double* out, const af_array in, const af_moment_type moment);
1469 #endif
1470 
1471 #if AF_API_VERSION >= 35
1472 
1494  AFAPI af_err af_canny(af_array* out, const af_array in,
1495  const af_canny_threshold threshold_type,
1496  const float low_threshold_ratio,
1497  const float high_threshold_ratio,
1498  const unsigned sobel_window, const bool is_fast);
1499 #endif
1500 
1501 #if AF_API_VERSION >= 36
1502 
1521  const float timestep,
1522  const float conductance,
1523  const unsigned iterations,
1524  const af_flux_function fftype,
1525  const af_diffusion_eq diffusion_kind);
1526 #endif
1527 
1528 #ifdef __cplusplus
1529 }
1530 #endif
af_canny_threshold
Definition: defines.h:459
AFAPI af_err af_is_image_io_available(bool *out)
Function to check if Image IO is available.
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.
AFAPI void saveImage(const char *filename, const array &in)
C++ Interface for saving an image.
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.
AFAPI af_err af_load_image(af_array *out, const char *filename, const bool isColor)
C Interface for loading an image.
AFAPI af_err af_dilate(af_array *out, const af_array in, const af_array mask)
C Interface for image dilation (max filter)
Gradient diffusion equation.
Definition: defines.h:482
af_flux_function
Definition: defines.h:475
af_ycc_std
Definition: defines.h:309
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.
AFAPI void moments(double *out, const array &in, const momentType moment=AF_MOMENT_FIRST_ORDER)
C++ Interface for calculating an image moment.
AFAPI af_err af_dilate3(af_array *out, const af_array in, const af_array mask)
C Interface for 3d image dilation.
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.
Definition: algorithm.h:14
AFAPI void deleteImageMem(void *ptr)
C++ Interface for deleting memory created by saveImageMem or af_save_image_memory.
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.
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.
AFAPI array ycbcr2rgb(const array &in, const YCCStd standard=AF_YCC_601)
C++ Interface for converting YCbCr to RGB.
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)
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_border_type
Definition: defines.h:248
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_canny_threshold cannyThreshold
Definition: defines.h:536
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.
AFAPI af_err af_load_image_memory(af_array *out, const void *ptr)
C Interface for loading an image from memory.
AFAPI array hsv2rgb(const array &in)
C++ Interface for converting HSV to RGB.
AFAPI af_err af_load_image_native(af_array *out, const char *filename)
C Interface for loading an image as is original type.
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.
AFAPI array histogram(const array &in, const unsigned nbins, const double minval, const double maxval)
C++ Interface for histogram.
AFAPI af_err af_erode3(af_array *out, const af_array in, const af_array mask)
C Interface for 3D image erosion.
af_ycc_std YCCStd
Definition: defines.h:512
af_diffusion_eq diffusionEq
Definition: defines.h:540
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.
AFAPI array histEqual(const array &in, const array &hist)
C++ Interface for histogram equalization.
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 unwrap()
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()
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.
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_interp_type
Definition: defines.h:224
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.
AFAPI af_err af_save_image_native(const char *filename, const af_array in)
C Interface for saving an image without modifications.
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.
AFAPI void sobel(array &dx, array &dy, const array &img, const unsigned ker_size=3)
C++ Interface for extracting sobel gradients.
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.
A multi dimensional data container.
Definition: array.h:26
AFAPI af_err af_delete_image_memory(void *ptr)
C Interface for deleting an image from memory.
af_image_format imageFormat
Definition: defines.h:515
AFAPI array inverse(const array &in, const matProp options=AF_MAT_NONE)
C++ Interface for inverting a matrix.
AFAPI array erode(const array &in, const array &mask)
C++ Interface for image erosion (min filter)
AFAPI af_err af_hsv2rgb(af_array *out, const af_array in)
C Interface for converting HSV to RGB.
AFAPI af_err af_save_image(const char *filename, const af_array in)
C Interface for saving an image.
AFAPI array transformCoordinates(const array &tf, const float d0, const float d1)
C++ Interface for transforming coordinates.
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_connectivity
Definition: defines.h:265
AFAPI array dilate3(const array &in, const array &mask)
C++ Interface for 3D image dilation.
af_err
Definition: defines.h:63
Connectivity includes neighbors, North, East, South and West of current pixel.
Definition: defines.h:269
AFAPI af_err af_rgb2hsv(af_array *out, const af_array in)
C Interface for converting RGB to HSV.
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.
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.
AFAPI void saveImageNative(const char *filename, const array &in)
C++ Interface for saving an image without modifications.
ITU-R BT.601 (formerly CCIR 601) standard.
Definition: defines.h:310
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.
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.
AFAPI void grad(array &dx, array &dy, const array &in)
C++ Interface for calculating the gradients.
Out of bound values are 0.
Definition: defines.h:252
AFAPI af_err af_hist_equal(af_array *out, const af_array in, const af_array hist)
C Interface for histogram equalization.
AFAPI af_err af_sat(af_array *out, const af_array in)
C Interface wrapper for summed area tables.
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.
AFAPI af_err af_gradient(af_array *dx, af_array *dy, const af_array in)
C Interface for calculating the gradients.
long long dim_t
Definition: defines.h:50
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.
AFAPI array rgb2hsv(const array &in)
C++ Interface for converting RGB to HSV.
AFAPI array dilate(const array &in, const array &mask)
C++ Interface for image dilation (max filter)
af_diffusion_eq
Definition: defines.h:481
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.
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.
AFAPI array rgb2ycbcr(const array &in, const YCCStd standard=AF_YCC_601)
C++ Interface for converting RGB to YCbCr.
#define AFAPI
Definition: defines.h:31
af_border_type borderType
Definition: defines.h:500
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.
AFAPI af_err af_moments(af_array *out, const af_array in, const af_moment_type moment)
C Interface for finding image moments.
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.
AFAPI array loadImageNative(const char *filename)
C++ Interface for loading an image as its original type.
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.
AFAPI bool isImageIOAvailable()
Function to check if Image IO is available.
AFAPI array loadImage(const char *filename, const bool is_color=false)
C++ Interface for loading an image.
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer.
Definition: opencl.h:327
AFAPI array bilateral(const array &in, const float spatial_sigma, const float chromatic_sigma, const bool is_color=false)
C++ Interface for bilateral filter.
Nearest Interpolation.
Definition: defines.h:225
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.
Exponential flux function.
Definition: defines.h:477
AFAPI af_err af_erode(af_array *out, const af_array in, const af_array mask)
C Interface for image erosion (min filter)
AFAPI array sat(const array &in)
C++ Interface wrapper for summed area tables.
af_cspace_t
Definition: defines.h:316
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.
FreeImage Enum for Portable Network Graphics File.
Definition: defines.h:359
void * af_array
Definition: defines.h:222
AFAPI array colorSpace(const array &image, const CSpace to, const CSpace from)
C++ Interface wrapper for colorspace conversion.
af_image_format
Definition: defines.h:354
af_moment_type
Definition: defines.h:372
af_cspace_t CSpace
Definition: defines.h:503
32-bit floating point values
Definition: defines.h:196
af_flux_function fluxFunction
Definition: defines.h:539
AFAPI af_err af_rgb2ycbcr(af_array *out, const af_array in, const af_ycc_std standard)
C Interface for converting RGB to YCbCr.
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.
AFAPI void * saveImageMem(const array &in, const imageFormat format=AF_FIF_PNG)
C++ Interface for saving an image to memory.
AFAPI array erode3(const array &in, const array &mask)
C++ Interface for 3d for image erosion.
af_dtype
Definition: defines.h:195
af_interp_type interpType
Definition: defines.h:499
af_moment_type momentType
Definition: defines.h:524
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_dtype dtype
Definition: defines.h:497
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.
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.
AFAPI array loadImageMem(const void *ptr)
C++ Interface for loading an image from memory.
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.
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.
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)
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_connectivity connectivity
Definition: defines.h:501
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.