#include <opencv2/contrib/contrib.hpp>\r
#include <opencv2/highgui/highgui.hpp>\r
\r
+void help(char **argv)\r
+{\r
+ std::cout << "\nThis program demonstrates the contributed flesh detector CvAdaptiveSkinDetector which can be found in contrib.cpp\n"\r
+ << "Usage: " << std::endl <<\r
+ argv[0] << " fileMask firstFrame lastFrame" << std::endl << std::endl <<\r
+ "Example: " << std::endl <<\r
+ argv[0] << " C:\\VideoSequences\\sample1\\right_view\\temp_%05d.jpg 0 1000" << std::endl <<\r
+ " iterates through temp_00000.jpg to temp_01000.jpg" << std::endl << std::endl <<\r
+ "If no parameter specified, this application will try to capture from the default Webcam." << std::endl <<\r
+ "Please note: Background should not contain large surfaces with skin tone." <<\r
+ "\n\n ESC will stop\n" <<\r
+ std::endl;\r
+}\r
+\r
class ASDFrameHolder\r
{\r
private:\r
\r
if (argc < 4)\r
{\r
- std::cout << "Usage: " << std::endl <<\r
- argv[0] << " fileMask firstFrame lastFrame" << std::endl << std::endl <<\r
- "Example: " << std::endl <<\r
- argv[0] << " C:\\VideoSequences\\sample1\\right_view\\temp_%05d.jpg 0 1000" << std::endl <<\r
- " iterates through temp_00000.jpg to temp_01000.jpg" << std::endl << std::endl <<\r
- "If no parameter specified, this application will try to capture from the default Webcam." << std::endl <<\r
- "Please note: Background should not contain large surfaces with skin tone." <<\r
- std::endl;\r
-\r
+ help(argv);\r
sequencer = new ASDFrameSequencerWebCam();\r
(dynamic_cast<ASDFrameSequencerWebCam*>(sequencer))->open(-1);\r
\r
filterMask = cvCreateImage( cvSize(img->width, img->height), IPL_DEPTH_8U, 1);\r
}\r
clock = std::clock();\r
- filter.process(img, filterMask); // process the frame\r
+ filter.process(img, filterMask); // DETECT SKIN\r
clockTotal += (std::clock() - clock);\r
\r
displayBuffer(img, filterMask, 0, 255, 0);\r