13 #ifndef MLPACK_CORE_DATA_LOAD_IMAGE_HPP 14 #define MLPACK_CORE_DATA_LOAD_IMAGE_HPP 22 #define STB_IMAGE_STATIC 23 #define STB_IMAGE_IMPLEMENTATION 24 #include <stb_image.h> 45 bool Load(
const std::string& filename,
46 arma::Mat<eT>& matrix,
48 const bool fatal =
false);
60 bool Load(
const std::vector<std::string>& files,
61 arma::Mat<eT>& matrix,
63 const bool fatal =
false);
66 inline bool LoadImage(
const std::string& filename,
67 arma::Mat<unsigned char>& matrix,
69 const bool fatal =
false);
75 #include "load_image_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
bool LoadImage(const std::string &filename, arma::Mat< unsigned char > &matrix, ImageInfo &info, const bool fatal=false)
bool Load(const std::string &filename, arma::Mat< eT > &matrix, const bool fatal=false, const bool transpose=true, const FileType inputLoadType=FileType::AutoDetect)
Loads a matrix from file, guessing the filetype from the extension.
constexpr auto data(Container const &container) noexcept -> decltype(container.data())