Visual Servoing Platform version 3.6.0
Loading...
Searching...
No Matches
tutorial-image-reader.cpp
1
2#include <visp3/io/vpImageIo.h>
3
4int main()
5{
6 try {
8 vpImageIo::read(I, "monkey.jpeg");
9 vpImageIo::write(I, "monkey.png");
10 } catch (const vpException &e) {
11 std::cout << e.getMessage() << std::endl;
12 } catch (...) {
13 std::cout << "Unsupported image format" << std::endl;
14 }
15}
error that can be emitted by ViSP classes.
Definition vpException.h:59
const char * getMessage() const
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:135