ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
tutorial-image-converter.cpp
1
2
#include <visp/vpImageIo.h>
3
#include <visp/vpImageConvert.h>
4
5
int
main()
6
{
7
#if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100)
8
cv::Mat A;
9
A = cv::imread(
"lena.bmp"
, CV_LOAD_IMAGE_GRAYSCALE);
10
11
vpImage<unsigned char>
I;
12
vpImageConvert::convert
(A, I);
13
14
# ifdef VISP_HAVE_LIBPNG
15
vpImageIo::write
(I,
"lena.png"
);
// Gray
16
# endif
17
#endif
18
}
vpImageIo::write
static void write(const vpImage< unsigned char > &I, const char *filename)
Definition:
vpImageIo.cpp:442
vpImageConvert::convert
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
Definition:
vpImageConvert.cpp:68
vpImage< unsigned char >
tutorial
image
tutorial-image-converter.cpp
Generated on Sat Apr 26 2014 19:33:48 for ViSP by
1.8.6