Visual Servoing Platform  version 3.4.0
tutorial-undistort.cpp
#include <visp3/core/vpImageTools.h>
#include <visp3/core/vpXmlParserCamera.h>
#include <visp3/io/vpImageIo.h>
int main()
{
try {
vpImageIo::read(I, "chessboard.jpg");
if (p.parse(cam, "camera.xml", "Camera", projModel, I.getWidth(), I.getHeight()) !=
std::cout << "Cannot found parameters for camera named \"Camera\"" << std::endl;
}
#if 0
cam.initPersProjWithDistortion(582.7, 580.6, 326.6, 215.0, -0.3372, 0.4021);
#endif
std::cout << cam << std::endl;
vpImageIo::write(Iud, "chessboard-undistort.jpg");
} catch (const vpException &e) {
std::cout << "Catch an exception: " << e << std::endl;
}
return 0;
}