Don’t replace your old NVR! Enhance it with oZone!

We all know this story — you’ve spent a lot of time and money on your existing NVR. You’ve had a team of developers build it over many years. It’s built on all kinds of technologies — it all started with .NET, then you added Node.js somewhere to keep up with the times. It’s solid, stable, works, but its old and boring. The world has moved forward with convolution networks, social graphs and more and you are stuck with a stable behemoth that was awesome in its days but is just hanging around like a wounded lion nowadays as new startups come up with things in weeks that your developers say will take 6 months to prototype on your behemoth.
Well, that’s why we built oZone. Lets talk about how we can extend an existing NVR and add some amazing stuff oZone offers without replacing the entire darn thing. Lets take the very popular ZoneMinder NVR. Solid, stable, widely deployed and developed many years ago with a stack that is not easy to extend. People have been asking for Face Detection for a long time. There was an effort a few years ago to create a plugin framework for this NVR system — amazing effort, but incredibly complex. If it’s this complex to add a plugin, you can’t blame developers for balking.
So let’s see how we can solve this problem with oZone: “How do I add convolution based face detect” to ZoneMinder “without having to replace my working setup” and “making sure I continue to use the rest of the system?”
The last part is important — “making sure I continue to use the rest of the system” — all NVRs come with a familiar interface, a storage system, a notification/alert system et. al. You want to be able to continue using that interface and system, just “add new bling magically behind it all”.
There are two ways to address this:

One approach could be, we write an app on oZone and have it point to the camera directly. Your NVR continues to work, oZone continues to work, and each does its own thing. But this is not what you want. Plus, the devil is in the details — many cameras don’t allow simultaneous streaming. Also, you want oZone to tie into “existing NVR”, like this:

is a piece of the continent, a part of the main (~J.Donne)
How do we do this? Well, remember oZone has a concept of a “provider” that could tap in data from any source? So what if we were to be able to write a provider that taps into your NVR images, does its magic inside oZone and then somehow notify your NVR to start recording when it detects faces? Perfect.
As it turns out all NVRs have two important things:
- A running buffer of images it keeps recording irrespective of whether it detects or not. Why? Because when a detection happens, you’d want to start recording a few frames back, because by the time motion is detected and your NVR started recording, the object might have moved along and you’ll get a recording that shows nothing!
- All NVRs also have a means of triggering a recording. Why? Because there are some many smart IOT devices that they need to tie into — ‘start recording if Nest thermostat APIs detect something’ or ‘start recording if a window detector detected glass shattering’ etc.
Perfect. That’s all we really need. So back to ZoneMinder. ZoneMinder implements its running buffer using shared memory. So all we had to do was write a provider that tapped into this buffer. We then looked up on how ZoneMinder’s trigger system works and we just wrote a Trigger class for ZoneMinder in oZone.
So now, its like this:

The beauty of oZone is the “providers” are really the “glue” to ANY interface. Abstract it out, connect it to your own system and oZone starts working right away!
Obviously, we also need to tell you the code we wrote to extend ZoneMinder to add face detection.
Look at the code. Its tiny. Plus we did more! We also added the ability for a user to launch a browser and connect directly to the oZone plugin to analyze facial rectangles etc. We also added commented code to show you how to switch it to arbitrary shape detection, apply video filters et al. We did this because all it takes to add functionality in oZone is to “register a component” to the function chain and let each one do its thing. 2 lines per functionality.
And after we did this, suddenly the existing ZoneMinder interface started showing up enhanced event detection using oZone, while sticking to its familiar interface.

Here you see events that have been recorded in the NVR thanks to the oZone plugin we just wrote. Same interface. Familiar feel.
What’s more, all of this is transparent to mobile apps too!

The screenshot above shows how the ZM mobile app (zmNinja) leverages oZone to show events when faces are detected. And this is a great example of where enhanced detection helps — imagine doing blob detection inside a house with lots of objects moving all the time (TV, etc). You’d be deluged with false alarms!
SO WHY WAIT? GRAB OZONE AND GIVE NEW LIFE TO YOUR OLD NVR