// test_colortable.cc // robert - Programme du robot APBteam // Copyright (C) 2005 Olivier Gaillard #include #include #include #include "segmLearn.hh" #include "segmTable.hh" #include "colorTable.hh" #include "oconfig.hh" #include "imgInterface.hh" int main(int argc, char **argv) { ///////////////////////////////////////////////////////////////////////////////////////// // Usage if (argc < 2) { std::cout << "Usage : test_colortable " << std::endl; return 1; } ///////////////////////////////////////////////////////////////////////////////////////// /// Initialisation des classes OConfig *oconfig_; try { oconfig_ = new OConfig; } catch (std::string &e) { std::cerr << e << std::endl; return 1; } ImgInterface img; img.loadRaw (argv[1], Image::rgb, oconfig_->width, oconfig_->height); ColorTable tab; SegmTable segm (tab); ///////////////////////////////////////////////////////////////////////////////////////// // Création de l'image segmentée segm.segmImg (&img); img.doImg (); img.writeRaw ("../runtime/shots/segm.rgb", img.getTabOut ()); delete oconfig_; return 0; }