00001 #include "Component/ModelComponent.H" 00002 #include "Component/ModelManager.H" 00003 #include "Learn/SVMClassifier.H" 00004 #include "svm.h" 00005 00006 00007 int main(int argc, char **argv) 00008 { 00009 MYLOGVERB = LOG_INFO; 00010 00011 ModelManager *mgr = new ModelManager("Test Hmax with Feature Learning"); 00012 00013 00014 mgr->exportOptions(MC_RECURSE); 00015 00016 // required arguments 00017 // <c1patchesDir> <dir|list> <id> <outputfile> 00018 // 00019 // <id> is the given id for the given set of images 00020 // --in only needs to happen if we are loading the patches 00021 00022 if (mgr->parseCommandLine( 00023 (const int)argc, (const char**)argv, "<features> <svmRange> <scaledoutput>", 3,3) == false) 00024 return 1; 00025 00026 std::string features,svmRange,output; 00027 features= mgr->getExtraArg(0); 00028 svmRange = mgr->getExtraArg(1); 00029 output = mgr->getExtraArg(2); 00030 00031 00032 SVMClassifier svm; 00033 svm.readRange(svmRange); 00034 svm.rescale(features.c_str(),output.c_str()); 00035 }