Alida-C++ 0.1
|
Class for I/O of OpenCV images via command line. More...
#include <OpenCVImageDataIO.h>
Public Member Functions | |
virtual | ~OpenCVImageDataIO () |
Default destructor. | |
virtual void * | readData (std::string, std::string) const |
Function to open an image from given filename. | |
virtual std::string | writeData (std::string format, std::string type, void *data) const |
Function to output an image to file or screen. |
Class for I/O of OpenCV images via command line.
Here we demonstrate what needs to be done to add data I/O providers for specific data types to the Alida framework.
In this case a provider for the OpenCV image data type IplImage is defined used in conjunction with the corresponding operator DemoOperatorOpenCV.
Definition at line 53 of file OpenCVImageDataIO.h.
virtual Alida::OpenCVImageDataIO::~OpenCVImageDataIO | ( | ) | [inline, virtual] |
Default destructor.
Definition at line 58 of file OpenCVImageDataIO.h.
void * OpenCVImageDataIO::readData | ( | std::string | input, |
std::string | type | ||
) | const [virtual] |
Function to open an image from given filename.
This function interprets the given input string as filename and tries to read an image from the specified location.
input | Name of file to be read. |
type | Image type requested. |
Implements Alida::ALDDataIOCmdline.
Definition at line 69 of file OpenCVImageDataIO.cc.
string OpenCVImageDataIO::writeData | ( | std::string | format, |
std::string | type, | ||
void * | data | ||
) | const [virtual] |
Function to output an image to file or screen.
This function outputs/displays a given image. If the format string just contains "-", the image is displayed on screen, otherwise the format string is interpreted as filename where to save the image. The returned string is empty in both cases.
format | Output filename. |
type | Identifier string for object type. |
data | Image to be displayed/saved. |
Implements Alida::ALDDataIOCmdline.
Definition at line 87 of file OpenCVImageDataIO.cc.