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 & BOOST_SERIALIZATION_NVP(width);
77 ar & BOOST_SERIALIZATION_NVP(channels);
78 ar & BOOST_SERIALIZATION_NVP(height);
79 ar & BOOST_SERIALIZATION_NVP(quality);
100#include "image_info_impl.hpp"
Implements meta-data of images required by data::Load and data::Save for loading and saving images in...
const size_t & Channels() const
Get the image channels.
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...
const size_t & Height() const
Get the image height.
const size_t & Quality() const
Get the image quality.
size_t & Quality()
Modify the image quality.
size_t & Height()
Modify the image height.
const size_t & Width() const
Get the image width.
size_t & Width()
Modify the image width.
size_t & Channels()
Modify the image channels.
void serialize(Archive &ar, const unsigned int)
bool ImageFormatSupported(const std::string &fileName, const bool save=false)
Checks if the given image filename is supported.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.