33#include "ramCanvas.hpp"
36int main(
int argc,
char *argv[]) {
37 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
40 mjr::ramCanvas3c8b listOcanv[16];
44 mjr::ramCanvas3c8b::colorType aColor;
48 for(
int i=1;i<argc;i++) {
49 std::cerr <<
"LOADING: " << argv[i] << std::endl;
50 if((rRet=listOcanv[i-1].readTIFFfile(argv[i]))) {
51 fprintf(stderr,
"ERROR(%d) reading file %s\n", rRet, argv[i]);
57 std::cout <<
"No images provided on command line. Generateing test images" << std::endl;
58 listOcanv[0].resizeCanvas(512, 512);
59 listOcanv[0].drawFillRectangle( 0, 0, 105, 512,
"white");
60 listOcanv[0].drawFillRectangle(106, 0, 205, 512,
"red");
61 listOcanv[0].drawFillRectangle(206, 0, 305, 512,
"green");
62 listOcanv[0].drawFillRectangle(306, 0, 405, 512,
"blue");
63 listOcanv[0].drawFillRectangle(406, 0, 511, 512,
"black");
64 char const *colors[5] = {
"white",
"red",
"green",
"blue",
"black" };
65 for(
int i=0; i<(512/32); i++)
66 listOcanv[0].drawLine(0, i*32, 512, i*32, colors[i%5]);
67 listOcanv[0].writeTIFFfile(
"testImage1.tiff");
68 listOcanv[0].flipTranspose();
69 listOcanv[0].writeTIFFfile(
"testImage2.tiff");
96 listOcanv[0].computeConvolutionMatrixGausian(kernel, 9, 10);
99 std::cerr <<
"CONVOLUTION STARTING" << std::endl;
100 listOcanv[0].convolution(kernel, 9, 9, 1.0);
103 listOcanv[0].writeTIFFfile(
"testImage1_c.tiff");
208 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
209 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])