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