YARP
Yet Another Robot Platform
yarp::sig::file Namespace Reference

Image file operations. More...

Classes

class  soundStreamReader
 

Enumerations

enum  image_fileformat {
  FORMAT_NULL,
  FORMAT_ANY,
  FORMAT_PGM,
  FORMAT_PPM,
  FORMAT_JPG,
  FORMAT_NUMERIC,
  FORMAT_NUMERIC_COMPRESSED,
  FORMAT_PNG
}
 

Functions

bool read (ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
 
bool read (ImageOf< PixelBgr > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
 
bool read (ImageOf< PixelRgba > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
 
bool read (ImageOf< PixelMono > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
 
bool read (ImageOf< PixelFloat > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
 
bool write (const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
 
bool write (const ImageOf< PixelBgr > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
 
bool write (const ImageOf< PixelRgba > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
 
bool write (const ImageOf< PixelMono > &src, const std::string &dest, image_fileformat format=FORMAT_PGM)
 
bool write (const ImageOf< PixelFloat > &src, const std::string &dest, image_fileformat format=FORMAT_NUMERIC)
 
bool write (const Image &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
 
bool read (Sound &dest, const char *src)
 Read a sound from file. More...
 
bool write (const Sound &src, const char *dest)
 Write a sound to file. More...
 

Detailed Description

Image file operations.

Enumeration Type Documentation

◆ image_fileformat

Enumerator
FORMAT_NULL 
FORMAT_ANY 
FORMAT_PGM 
FORMAT_PPM 
FORMAT_JPG 
FORMAT_NUMERIC 
FORMAT_NUMERIC_COMPRESSED 
FORMAT_PNG 

Definition at line 25 of file ImageFile.h.

Function Documentation

◆ read() [1/6]

bool yarp::sig::file::read ( ImageOf< PixelBgr > &  dest,
const std::string &  src,
image_fileformat  format = FORMAT_ANY 
)

Definition at line 854 of file ImageFile.cpp.

◆ read() [2/6]

bool yarp::sig::file::read ( ImageOf< PixelFloat > &  dest,
const std::string &  src,
image_fileformat  format = FORMAT_ANY 
)

Definition at line 945 of file ImageFile.cpp.

◆ read() [3/6]

bool yarp::sig::file::read ( ImageOf< PixelMono > &  dest,
const std::string &  src,
image_fileformat  format = FORMAT_ANY 
)

Definition at line 919 of file ImageFile.cpp.

◆ read() [4/6]

bool yarp::sig::file::read ( ImageOf< PixelRgb > &  dest,
const std::string &  src,
image_fileformat  format = FORMAT_ANY 
)

◆ read() [5/6]

bool yarp::sig::file::read ( ImageOf< PixelRgba > &  dest,
const std::string &  src,
image_fileformat  format = FORMAT_ANY 
)

Definition at line 881 of file ImageFile.cpp.

◆ read() [6/6]

bool yarp::sig::file::read ( Sound dest,
const char *  src 
)

Read a sound from file.

Parameters
destsound to read
srcname of file (should be a WAV file)
Returns
true on success

Definition at line 229 of file SoundFile.cpp.

◆ write() [1/7]

bool yarp::sig::file::write ( const Image src,
const std::string &  dest,
image_fileformat  format = FORMAT_PPM 
)

Definition at line 1074 of file ImageFile.cpp.

◆ write() [2/7]

bool yarp::sig::file::write ( const ImageOf< PixelBgr > &  src,
const std::string &  dest,
image_fileformat  format = FORMAT_PPM 
)

Definition at line 992 of file ImageFile.cpp.

◆ write() [3/7]

bool yarp::sig::file::write ( const ImageOf< PixelFloat > &  src,
const std::string &  dest,
image_fileformat  format = FORMAT_NUMERIC 
)

Definition at line 1057 of file ImageFile.cpp.

◆ write() [4/7]

bool yarp::sig::file::write ( const ImageOf< PixelMono > &  src,
const std::string &  dest,
image_fileformat  format = FORMAT_PGM 
)

Definition at line 1040 of file ImageFile.cpp.

◆ write() [5/7]

bool yarp::sig::file::write ( const ImageOf< PixelRgb > &  src,
const std::string &  dest,
image_fileformat  format = FORMAT_PPM 
)
Examples
opencv/main.cpp.

Definition at line 971 of file ImageFile.cpp.

◆ write() [6/7]

bool yarp::sig::file::write ( const ImageOf< PixelRgba > &  src,
const std::string &  dest,
image_fileformat  format = FORMAT_PPM 
)

Definition at line 1016 of file ImageFile.cpp.

◆ write() [7/7]

bool yarp::sig::file::write ( const Sound src,
const char *  dest 
)

Write a sound to file.

Parameters
srcsound to write
destname of file (will be a WAV file)
Returns
true on success

Definition at line 273 of file SoundFile.cpp.