Shape Detection, Arbitrary Filters, Oh My!

oZoneDev
oZoneDev
Sep 8, 2016 · 2 min read

We’ve been making some really cool updates to ozone. Remember, one of our key missions is to enable innovation for CCTV/IP camera systems and to be able to do that, we need to provide you with powerful components wrapped in a layer of “easy to use” interfaces.

Well, last week, we added arbitrary shape detection to oZone (via dlib). Using the new ShapeDetect class, creating your own ShapeDetector is as simple as:

ShapeDetector peopleDetector( “people.svm”, ShapeDetector::OZ_SHAPE_MARKUP_OUTLINE, peopleLimiter ); app.addThread( &peopleDetector );

What is important here is you can supply arbitrary training models that you can fine tune for your detection needs. Training is really simple. We are currently creating our own training for overhead CCTV cameras.

Real time shape detection is a very important step forward. It now allows us to train models to detect anything we want to focus on.

The awesome part is you can run MotionDetection, FaceDetection and ShapeDetection all at the same time with oZone! To prove it, here is a video from youtube we ran all our detection classes together on. (Watch this in theatre mode to see the detection points easily). As you might note, motion detect (standard algorithm in budget cameras & NVR systems) is way too falsey. FaceDetection barely works as faces are not really completely identifiable in this fast moving video, while ShapeDetect, trained with a quick people detection approach works reasonably well! The important part is you can keep re-training and creating new models for your special situations and all you need to do is pass that file to oZone!

Checkout this video (courtesy ring.com/youtube — I lost the link). Note how well shapedetector generally works when this guy gets into the house!

Or this video:

Arbitrary Filters too

While we are at it, we’ve also added arbitrary AV filter support too. There will be a dedicated blog post about this later, but Filters are incredibly powerful tools, made easier with oZone’s component architecture.

Here is an example to convert a live feed (or recorded feed) to black and while while on the fly

VideoFilter peopleFilter( “hue=s=0, scale=iw/2:-1”, people ); 
VideoFilter peopleFilter( “people-filter”, “scale=iw/2:-1” );
peopleFilter.registerProvider( people );
app.addThread( &peopleFilter );

oZone Security

Enabling Innovation in Video Applications

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store