13 #ifndef MLPACK_CORE_DATA_IMAGE_INFO_HPP
14 #define MLPACK_CORE_DATA_IMAGE_INFO_HPP
29 const bool save =
false);
48 const size_t height = 0,
49 const size_t channels = 3,
50 const size_t quality = 90);
53 const size_t&
Width()
const {
return width; }
55 size_t&
Width() {
return width; }
58 const size_t&
Height()
const {
return height; }
63 const size_t&
Channels()
const {
return channels; }
68 const size_t&
Quality()
const {
return quality; }
72 template<
typename Archive>
75 ar & BOOST_SERIALIZATION_NVP(width);
76 ar & BOOST_SERIALIZATION_NVP(channels);
77 ar & BOOST_SERIALIZATION_NVP(height);
78 ar & BOOST_SERIALIZATION_NVP(quality);
99 #include "image_info_impl.hpp"
const size_t & Width() const
Get the image width.
size_t & Channels()
Modify the image channels.
size_t & Width()
Modify the image width.
Implements meta-data of images required by data::Load and data::Save for loading and saving images in...
size_t & Height()
Modify the image height.
const size_t & Channels() const
Get the image channels.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void serialize(Archive &ar, const unsigned int)
ImageInfo(const size_t width=0, const size_t height=0, const size_t channels=3, const size_t quality=90)
Instantiate the ImageInfo object with the given image width, height, number of channels and quality p...
size_t & Quality()
Modify the image quality.
bool ImageFormatSupported(const std::string &fileName, const bool save=false)
Checks if the given image filename is supported.
const size_t & Quality() const
Get the image quality.
string(REGEX REPLACE".*#define MLPACK_VERSION_MINOR ([0-9]+).*""\\1"MLPACK_VERSION_MINOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* "\\1" MLPACK_VERSION_PATCH "$
const size_t & Height() const
Get the image height.