CreateMicroEdgeCorrectionTable.cpp
Go to the documentation of this file.
00001 #include "EdgeDetection/AdaptiveRasterizer.h"
00002 #include "EdgeDetection/MicroEdgeDetector.h"
00003 #include "EdgeDetection/MicroEdgeMap.h"
00004 #include "EdgeDetection/MicroEdgeCorrectionTable.h"
00005 
00006 #include <iostream>
00007 #include <fstream>
00008 #include <cmath>
00009 
00010 using namespace std;
00011 using namespace EdgeDetection;
00012 
00013 int main(int argc, char** argv)
00014 {
00015         cout << "Creating Rasterizer (coarse)..." << endl;
00016         Rasterizer* rasterizerCoarse = new AdaptiveRasterizer(0.0001);
00017         cout << "Creating Rasterizer (fine)..." << endl;
00018         Rasterizer* rasterizerFine = new AdaptiveRasterizer(0.00000001);
00019         cout << "Creating MicroEdgeDetector..." << endl;
00020         MicroEdgeDetector* microEdgeDetector = new MicroEdgeDetector(rasterizerFine, 5);
00021         cout << "Creating MicroEdgeMap..." << endl;
00022         MicroEdgeMap* microEdgeMap = new MicroEdgeMap(rasterizerCoarse, microEdgeDetector, Rectangle(-0.6, +0.6, -M_PI, +M_PI), 1000, 1000);
00023         cout << "Creating MicroEdgeCorrectionTable..." << endl;
00024         MicroEdgeCorrectionTable* microEdgeCorrectionTable = new MicroEdgeCorrectionTable(microEdgeMap, Rectangle(-0.6, +0.6, -M_PI, +M_PI), 50, 50);
00025         cout << endl;
00026 
00027         cout << "Saving MicroEdgeCorrectionTable..." << endl;
00028         istream* microEdgeCorrectionTableData = MicroEdgeCorrectionTable::Serialize(microEdgeCorrectionTable);
00029         ofstream microEdgeCorrectionTableFile("MicroEdgeCorrectionTable.bin", ofstream::out | ofstream::binary);
00030         microEdgeCorrectionTableFile << microEdgeCorrectionTableData->rdbuf();
00031         microEdgeCorrectionTableFile.close();
00032         delete microEdgeCorrectionTableData;
00033 
00034         delete rasterizerCoarse;
00035         delete rasterizerFine;
00036         delete microEdgeDetector;
00037         delete microEdgeMap;
00038         delete microEdgeCorrectionTable;
00039 
00040         return 0;
00041 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


aruco_pose
Author(s): Julian Brunner
autogenerated on Thu May 23 2013 12:15:46