35 #include <visp3/core/vpImage.h>
44 #ifdef ENABLE_VISP_NAMESPACE
47 unsigned int size = 16;
52 for (
unsigned int i = 0, cpt = 0; i < size; i++) {
53 for (
unsigned int j = 0; j < size; j++, cpt++) {
54 I_int[i][j] = (int)cpt;
55 I_uchar[i][j] = (
unsigned char)cpt;
56 I_char[i][j] = (char)cpt;
65 for (
unsigned int i = 0, cpt = 0; i < size; i++) {
66 for (
unsigned int j = 0; j < size; j++, cpt++) {
67 I_float[i][j] = (float)sqrt((
double)cpt);
68 I_double[i][j] = sqrt((
double)cpt);
69 I_rgba[i][j] =
vpRGBa((
unsigned char)cpt);
73 std::cout <<
"I_int:\n" << I_int << std::endl;
74 std::cout <<
"\nI_uchar:\n" << I_uchar << std::endl;
75 std::cout <<
"\nI_char:\n" << I_char << std::endl;
76 std::cout <<
"\nI_float:\n" << I_float << std::endl;
77 std::cout <<
"\nI_double:\n" << I_double << std::endl;
78 std::cout <<
"\nI_rgba:\n" << I_rgba << std::endl;
Definition of the vpImage class member functions.