51 #if AF_API_VERSION >= 31 68 #if AF_API_VERSION >= 31 87 #if AF_API_VERSION >= 31 99 #if AF_API_VERSION >= 32 120 #if AF_API_VERSION >= 32 150 #if AF_API_VERSION >= 33 227 #if AF_API_VERSION >= 33 298 AFAPI array bilateral(
const array &in,
const float spatial_sigma,
const float chromatic_sigma,
const bool is_color=
false);
340 AFAPI array meanShift(
const array& in,
const float spatial_sigma,
const float chromatic_sigma,
const unsigned iter,
const bool is_color=
false);
488 AFAPI array rgb2gray(
const array& in,
const float rPercent=0.2126f,
const float gPercent=0.7152f,
const float bPercent=0.0722f);
503 AFAPI array gray2rgb(
const array& in,
const float rFactor=1.0,
const float gFactor=1.0,
const float bFactor=1.0);
573 #if AF_API_VERSION >= 31 591 const bool is_column =
true);
594 #if AF_API_VERSION >= 31 617 const bool is_column =
true);
620 #if AF_API_VERSION >= 31 632 #if AF_API_VERSION >= 31 648 #if AF_API_VERSION >= 31 664 #if AF_API_VERSION >= 34 678 #if AF_API_VERSION >= 34 736 #if AF_API_VERSION >= 31 750 #if AF_API_VERSION >= 31 766 #if AF_API_VERSION >= 31 779 #if AF_API_VERSION >= 32 801 #if AF_API_VERSION >= 32 833 #if AF_API_VERSION >= 33 882 #if AF_API_VERSION >= 33 1193 const int rows,
const int cols,
1194 const double sigma_r,
const double sigma_c);
1243 #if AF_API_VERSION >= 31 1263 const bool is_column);
1266 #if AF_API_VERSION >= 31 1294 const bool is_column);
1297 #if AF_API_VERSION >= 31 1311 #if AF_API_VERSION >= 31 1329 #if AF_API_VERSION >= 31 1347 #if AF_API_VERSION >= 34 1362 #if AF_API_VERSION >= 34 AFAPI af_err af_is_image_io_available(bool *out)
Function to check if Image IO is available.
AFAPI void saveImage(const char *filename, const array &in)
C++ Interface for saving an image.
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)
af_ycc_std
Definition: defines.h:304
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_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 wrapper for unwrap.
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 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:476
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 wrapper for 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 wrapper for wrap.
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 af_err af_delete_image_memory(void *ptr)
C Interface for deleting an image from memory.
af_image_format imageFormat
Definition: defines.h:479
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.
af_connectivity
Definition: defines.h:260
AFAPI array dilate3(const array &in, const array &mask)
C++ Interface for 3D image dilation.
af_err
Definition: defines.h:63
Definition: defines.h:372
Connectivity includes neighbors, North, East, South and West of current pixel.
Definition: defines.h:264
AFAPI af_err af_rgb2hsv(af_array *out, const af_array in)
C Interface for converting RGB to HSV.
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:305
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 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 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)
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:464
AFAPI af_err af_moments(af_array *out, const af_array in, const af_moment_type moment)
C Interface for finding image moments.
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.
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:311
FreeImage Enum for Portable Network Graphics File.
Definition: defines.h:354
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:349
af_moment_type
Definition: defines.h:367
af_cspace_t CSpace
Definition: defines.h:467
32-bit floating point values
Definition: defines.h:196
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:463
af_moment_type momentType
Definition: defines.h:488
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:461
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 wrapper for unwrap.
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:465