Visual Servoing Platform
version 3.3.0
tutorial-image-reader.cpp
1
2
#include <visp3/io/vpImageIo.h>
3
4
int
main()
5
{
6
try
{
7
vpImage<vpRGBa>
I;
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
}
vpImageIo::read
static void read(vpImage< unsigned char > &I, const std::string &filename)
Definition:
vpImageIo.cpp:243
vpImageIo::write
static void write(const vpImage< unsigned char > &I, const std::string &filename)
Definition:
vpImageIo.cpp:445
vpException::getMessage
const char * getMessage(void) const
Definition:
vpException.cpp:90
vpImage< vpRGBa >
vpException
error that can be emited by ViSP classes.
Definition:
vpException.h:72
tutorial
image
tutorial-image-reader.cpp
Generated by
1.8.18