Load an image from disk to an array. More...

Functions

AFAPI array loadimage (const char *filename, const bool is_color=false)
 C++ Interface for loading an image. More...
 
AFAPI array loadImage (const char *filename, const bool is_color=false)
 C++ Interface for loading an image. More...
 
AFAPI af_err af_load_image (af_array *out, const char *filename, const bool isColor)
 C Interface for loading an image. More...
 

Detailed Description

Load an image from disk to an array.

Supported formats include JPG, PNG, PPM and other formats supported by freeimage

Function Documentation

AFAPI af_err af_load_image ( af_array out,
const char *  filename,
const bool  isColor 
)

C Interface for loading an image.

Parameters
[out]outwill contain the image
[in]filenameis name of file to be loaded
[in]isColorboolean denoting if the image should be loaded as 1 channel or 3 channel
Returns
AF_SUCCESS if the color transformation is successful, otherwise an appropriate error code is returned.
AFAPI array af::loadImage ( const char *  filename,
const bool  is_color = false 
)

C++ Interface for loading an image.

Parameters
[in]filenameis name of file to be loaded
[in]is_colorboolean denoting if the image should be loaded as 1 channel or 3 channel
Returns
image loaded as af::array()
Examples:
brain_segmentation.cpp, edge.cpp, harris.cpp, image_demo.cpp, kmeans.cpp, morphing.cpp, optical_flow.cpp, and pyramids.cpp.
AFAPI array af::loadimage ( const char *  filename,
const bool  is_color = false 
)

C++ Interface for loading an image.

Parameters
[in]filenameis name of file to be loaded
[in]is_colorboolean denoting if the image should be loaded as 1 channel or 3 channel
Returns
image loaded as af::array()
Deprecated:
Use loadImage instead