#include <visp3/core/vpImage.h>
int main(int , const char ** )
{
#ifdef ENABLE_VISP_NAMESPACE
#endif
try {
{
unsigned char bitmap[4];
bitmap[0] = 0;
bitmap[1] = 1;
bitmap[2] = 2;
bitmap[3] = 3;
std::cout << "I:\n" << I << std::endl;
}
{
unsigned char bitmap[4];
bitmap[0] = 0;
bitmap[1] = 1;
bitmap[2] = 2;
bitmap[3] = 3;
std::cout << "\nI:\n" << I << std::endl;
}
{
unsigned char bitmap[4];
bitmap[0] = 0;
bitmap[1] = 1;
bitmap[2] = 2;
bitmap[3] = 3;
{
std::cout << "\nI2:\n" << I2 << std::endl;
}
{
std::cout << "I2:\n" << I2 << std::endl;
}
}
{
unsigned char bitmap[12];
for (unsigned char i = 0; i < 12; i++) {
bitmap[i] = i;
}
std::cout << "\nI:\n" << I << std::endl;
std::cout << "I:\n" << I << std::endl;
}
{
unsigned char bitmap[12];
for (unsigned char i = 0; i < 12; i++) {
bitmap[i] = i;
}
std::cout << "\nI:\n" << I << std::endl;
I.
init(bitmap, 4, 3,
true);
std::cout << "I:\n" << I << std::endl;
}
{
unsigned char *bitmap = new unsigned char[12];
{
}
delete[] bitmap;
}
{
unsigned char *bitmap = new unsigned char[12];
{
}
delete[] bitmap;
bitmap = new unsigned char[16];
I.
init(bitmap, 4, 4,
false);
delete[] bitmap;
}
{
unsigned char *bitmap = new unsigned char[12];
I.
init(bitmap, 3, 4,
false);
delete[] bitmap;
bitmap = new unsigned char[16];
I.
init(bitmap, 4, 4,
false);
delete[] bitmap;
}
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
{
unsigned char *bitmap = new unsigned char[12];
std::cout << "std::move(vpImage) failed" << std::endl;
return EXIT_FAILURE;
}
delete[] bitmap;
}
{
unsigned char *bitmap = new unsigned char[12];
std::cout << "vpImage(td::move(vpImage)) failed" << std::endl;
return EXIT_FAILURE;
}
delete[] bitmap;
}
#endif
}
catch (const std::exception &e) {
std::cerr << "Exception: " << e.what() << std::endl;
return EXIT_FAILURE;
}
std::cout << "Test succeed" << std::endl;
return EXIT_SUCCESS;
}
void destroy()
Destructor : Memory de-allocation.
void init(unsigned int height, unsigned int width)
Set the size of the image.
Type * bitmap
points toward the bitmap