Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
tutorial-image-reader.cpp
#include <visp3/core/vpConfig.h>
#include <visp3/io/vpImageIo.h>
int main()
{
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
try {
vpImageIo::read(I, "monkey.jpeg");
vpImageIo::write(I, "monkey.png");
}
catch (const vpException &e) {
std::cout << e.getMessage() << std::endl;
}
catch (...) {
std::cout << "Unsupported image format" << std::endl;
}
}
error that can be emitted by ViSP classes.
Definition vpException.h:60
static void read(vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)
static void write(const vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)
Definition of the vpImage class member functions.
Definition vpImage.h:131