void processImage(string input, FaceDetector detect) { int count; cv::Mat image; cv::Mat skinMasked; image = cv::imread(input, CV_LOAD_IMAGE_COLOR); // Read the file FaceDetector face; if(! image.data ) // Check for invalid input { cout << "Could not open or find the image" << std::endl; } else { /*Display original image*/ cout << "Here is the original image" << endl; namedWindow( "Original Image", WINDOW_NORMAL);// Create a window for display. imshow( "Original Image", image ); // Show our image inside it. waitKey(0); // Wait for a keystroke in the window /*Display thresholding image*/ skinMasked = face.skinMasking(image); cout << "Here is the skin detected image" << endl; namedWindow("Masked Skin Image", WINDOW_NORMAL); imshow("Masked Skin Image", skinMasked); waitKey(0); // Wait for a keystroke in the window /*count skin tone pixels*/ count = face.skinTonePixels(image); cout <<"Here is the count " << count << endl; } }