Skip to content

Instantly share code, notes, and snippets.

@pliablepixels
Created December 24, 2016 00:56
Show Gist options
  • Save pliablepixels/3cd5a8c21f9970e8b199009b568f9e5c to your computer and use it in GitHub Desktop.
Save pliablepixels/3cd5a8c21f9970e8b199009b568f9e5c to your computer and use it in GitHub Desktop.
// trigger motion if 1% of the frame is covered with motion
Options mOptions;
mOptions.add( "zone_default_alarmPercent_min", 1);
MotionDetector *motion = new MotionDetector(idString,mOptions);
motion->registerProvider(*limiter);
app.addThread(motion);
// Connect input of ShapeDetection to output of motion detection
ShapeDetector *detector = new ShapeDetector( idString,"person.svm",ShapeDetector::OZ_SHAPE_MARKUP_OUTLINE );
detector->registerProvider( *motion, FeedLink(FEED_QUEUED, alarmFramesOnly) );
app.addThread( detector );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment