Skip to content

Instantly share code, notes, and snippets.

@sagi-z
Created March 23, 2017 14:04
Show Gist options
  • Save sagi-z/ae404f4321a93089a7646fb56f50c3c1 to your computer and use it in GitHub Desktop.
Save sagi-z/ae404f4321a93089a7646fb56f50c3c1 to your computer and use it in GitHub Desktop.
#include <thread>
#include <tbb/concurrent_queue.h>
#include <tbb/pipeline.h>
volatile bool done = false; // volatile is enough here. We don't need a mutex for this simple flag.
struct ProcessingChainData
{
Mat img;
vector<Rect> faces, faces2;
Mat gray, smallImg;
};
void detectAndDrawTBB( VideoCapture &capture,
tbb::concurrent_bounded_queue<ProcessingChainData *> &guiQueue,
CascadeClassifier& cascade,
CascadeClassifier& nestedCascade,
double scale, bool tryflip );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment