tiny_dnn  1.0.0
A header only, dependency-free deep learning framework in C++11
Public Types | Public Member Functions | List of all members
tiny_dnn::image< T > Class Template Reference

Simple image utility class. More...

#include <image.h>

Public Types

typedef T intensity_t
 
typedef std::vector< intensity_t >::iterator iterator
 
typedef std::vector< intensity_t >::const_iterator const_iterator
 

Public Member Functions

 image (const T *data, size_t width, size_t height, image_type type)
 create image from raw pointer
 
 image (const shape3d &size, image_type type)
 create WxHxD image filled with 0
 
template<typename U >
 image (const image< U > &rhs)
 
 image (const std::string &filename, image_type type)
 create image from file supported file format: JPEG/PNG/TGA/BMP/PSD/GIF/HDR/PIC/PNM (see detail at the comments in thrid_party/stb/stb_image.h)
 
void save (const std::string &path) const
 
void write (const std::string &path) const
 
void resize (size_t width, size_t height)
 
void fill (intensity_t value)
 
intensity_t & at (size_t x, size_t y, size_t z=0)
 
const intensity_t & at (size_t x, size_t y, size_t z=0) const
 
bool empty () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
intensity_t & operator[] (std::size_t idx)
 
const intensity_t & operator[] (std::size_t idx) const
 
size_t width () const
 
size_t height () const
 
size_t depth () const
 
image_type type () const
 
shape3d shape () const
 
const std::vector< intensity_t > & data () const
 
vec_t to_vec () const
 
template<typename U >
std::vector< U > to_rgb () const
 
template<typename Iter >
void from_rgb (Iter begin, Iter end)
 

Detailed Description

template<typename T = unsigned char>
class tiny_dnn::image< T >

Simple image utility class.


The documentation for this class was generated from the following file: