created parameter description doc and output
authorGary Bradski <no@email>
Thu, 2 Dec 2010 23:42:46 +0000 (23:42 +0000)
committerGary Bradski <no@email>
Thu, 2 Dec 2010 23:42:46 +0000 (23:42 +0000)
samples/c/latentsvmdetect.cpp

index 8723f95..ee1dab6 100644 (file)
@@ -4,6 +4,16 @@
 \r
 using namespace cv;\r
 \r
+void help()\r
+{\r
+       printf( "This program demonstrated the use of the latentSVM detector.\n"\r
+                       "It reads in a trained object model and then uses that to detect the object in an image\n"\r
+                       "Call:\n"\r
+                       "./latentsvmdetect [<image_filename> <model_filename]\n"\r
+                       "  The defaults for image_filename and model_filename are cat.jpg and cat.xml respectively\n"\r
+                       "  Press any key to quit.\n");\r
+}\r
+\r
 const char* model_filename = "cat.xml";\r
 const char* image_filename = "cat.jpg";\r
 \r
@@ -31,9 +41,9 @@ void detect_and_draw_objects( IplImage* image, CvLatentSvmDetector* detector)
     cvReleaseMemStorage( &storage );\r
 }\r
 \r
-\r
 int main(int argc, char* argv[])\r
 {\r
+       help();\r
        if (argc > 2)\r
        {\r
                image_filename = argv[1];\r
@@ -63,4 +73,4 @@ int main(int argc, char* argv[])
     cvDestroyAllWindows();\r
     \r
        return 0;\r
-}
\ No newline at end of file
+}\r