13 #ifndef MLPACK_CORE_DATA_IMAGE_INFO_HPP 14 #define MLPACK_CORE_DATA_IMAGE_INFO_HPP 30 const bool save =
false);
49 const size_t height = 0,
50 const size_t channels = 3,
51 const size_t quality = 90);
54 const size_t&
Width()
const {
return width; }
56 size_t&
Width() {
return width; }
59 const size_t&
Height()
const {
return height; }
64 const size_t&
Channels()
const {
return channels; }
69 const size_t&
Quality()
const {
return quality; }
73 template<
typename Archive>
76 ar(CEREAL_NVP(width));
77 ar(CEREAL_NVP(channels));
78 ar(CEREAL_NVP(height));
79 ar(CEREAL_NVP(quality));
100 #include "image_info_impl.hpp" void serialize(Archive &ar, const uint32_t)
size_t & Channels()
Modify the image channels.
Linear algebra utility functions, generally performed on matrices or vectors.
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.
The core includes that mlpack expects; standard C++ includes and Armadillo.
const size_t & Width() const
Get the image width.
const size_t & Height() const
Get the image height.
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.
const size_t & Quality() const
Get the image quality.
const size_t & Channels() const
Get the image channels.
bool ImageFormatSupported(const std::string &fileName, const bool save=false)
Checks if the given image filename is supported.