1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include <iostream>
- #include "CImg.h"
- using namespace cimg_library;
- #include "pagenormalizer.h"
- using namespace std;
- // Should be compiled with (in Linux)
- // g++ -o hello_word.exe hello_world.cpp -O2 -L/usr/X11R6/lib -lm -lpthread -lX11
- int getBrightness(const CImg<unsigned int>& image,unsigned int x,unsigned int y);
- int main(int argc, char *argv[])
- {
- std::string file_i( cimg_option("-i","./input_example.jpg","Input image") );
-
- std::string file_white_ref( cimg_option("-wref","./ref_white.jpg","White ref image") );
- std::string file_black_ref( cimg_option("-bref","./ref_black.jpg","Black ref image") );
-
- std::string file_settings( cimg_option("-s","./settings.txt","Settings file") );
-
- std::string file_o( cimg_option("-o","./output.jpg","Output file") );
-
- const bool quiet = cimg_option("-q",false,0); // This is a hidden option
- const int rotate = cimg_option("-r",0,0);
- printf("Rot: %d\n ",rotate);
-
- PageNormalizer pn = PageNormalizer(file_i, file_o, file_white_ref, file_black_ref, file_settings, quiet, rotate);
- return 0;
- }
|