Load an image from disk to an array.
More...
Load an image from disk to an array.
Supported formats include JPG, PNG, PPM and other formats supported by freeimage
C Interface for loading an image.
- Parameters
-
| [out] | out | will contain the image |
| [in] | filename | is name of file to be loaded |
| [in] | isColor | boolean 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.
- Examples:
- fast.cpp, and harris.cpp.
| AFAPI array af::loadImage |
( |
const char * |
filename, |
|
|
const bool |
is_color = false |
|
) |
| |
C++ Interface for loading an image.
- Parameters
-
| [in] | filename | is name of file to be loaded |
| [in] | is_color | boolean denoting if the image should be loaded as 1 channel or 3 channel |
- Returns
- image loaded as af::array()
- Examples:
- adaptive_thresholding.cpp, binary_thresholding.cpp, brain_segmentation.cpp, edge.cpp, fast.cpp, filters.cpp, harris.cpp, image_demo.cpp, image_editing.cpp, kmeans.cpp, matching.cpp, morphing.cpp, optical_flow.cpp, pyramids.cpp, and susan.cpp.
| AFAPI array af::loadimage |
( |
const char * |
filename, |
|
|
const bool |
is_color = false |
|
) |
| |
C++ Interface for loading an image.
- Parameters
-
| [in] | filename | is name of file to be loaded |
| [in] | is_color | boolean denoting if the image should be loaded as 1 channel or 3 channel |
- Returns
- image loaded as af::array()
- Deprecated:
- Use loadImage instead