83#include "ramCanvas.hpp"
86int main(
int argc,
char *argv[]) {
87 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
88 mjr::ramCanvas3c8b dRamCanvas;
91 fprintf(stderr,
"ERROR argument required!\n");
96 if((rRet=dRamCanvas.readTIFFfile(argv[1]))) {
97 fprintf(stderr,
"ERROR(%d) reading file %s\n", rRet, argv[1]);
104 double D = 1.0000 - A - B - C;
106 double Xo = dRamCanvas.getNumPixX() / 2.0;
107 double Yo = dRamCanvas.getNumPixY() / 2.0;
108 double Sr = std::min(dRamCanvas.getNumPixX(), dRamCanvas.getNumPixY()) / 2.0;
111 std::vector<double> poly {A, B, C, D};
113 mjr::ramCanvas3c8b uRamCanvas = dRamCanvas.geomTfrmRevRPoly(poly, Sr, Xo, Yo, Sout);
115 uRamCanvas.writeTIFFfile(
"geomTfrm_LensDistortion.tiff");
117 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
118 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])