Skip to content

Instantly share code, notes, and snippets.

@pliablepixels
Created August 24, 2016 20:26
Show Gist options
  • Save pliablepixels/177b77ae77b7f2480982d5ba83663b11 to your computer and use it in GitHub Desktop.
Save pliablepixels/177b77ae77b7f2480982d5ba83663b11 to your computer and use it in GitHub Desktop.
nvrcam.face = new FaceDetector( "face-"+name ); // init face detection
nvrcam.rate = new RateLimiter( "rate-"+name,face_refresh_rate,true ); // no need to perform detection on every frame!
nvrcam.rate->registerProvider(*(nvrcam.cam) ); // rate reads frames from camera
nvrcam.face->registerProvider(*(nvrcam.rate) ); // face reads frames from rate!
nvrcam.motion = new MotionDetector( "modect-"+name );
nvrcam.motion->registerProvider(*(nvrcam.cam) ); // motion detect reads frames from camera
// now do the magic!
nvrcam.cam->start();
nrvcam.rate->start();
nvrcam.face->start();
nvrcam.motion->start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment