First off, it’s been a while since my last post. I’ve been busy and that’s a bit of an understatement. Let’s dive in to the latest in the world of OutKastz.com.
Recently, PTZOptics, the makers of my favorite PTZ cameras, had published a simple API for their wonderful cameras. It’s a very simple start to robotics and entry level api controls. Basically, hit the url and the camera will do what you ask of it. The goal of this api release was to get kids interested in robotics, programming, and even dabble in livestreaming.
For anyone who knows me, I like all of those things. I tinker with small diy electronics like the particle photon, program everything usually via visual basic or php, and I’m more than familiar with livestreaming thanks to PalmettoTigers.com. So naturally I checked out their fancy new API. It was initially offered up in nodejs and python with more languages promised soon. Neat, I guess… I’m obviously more familiar with .net and php so I did my part! I went through each and every option in the api and created a fully featured app in vb.net, php, and even for the particle photon! They are all available on my recently created github account. The particle photon is more of a IFTTT bridge which means it’ll allow you to control the cameras through any of the services offered on IFTTT. I envisioned being able to tell my google assistant to point all my cameras to preset 1 or similar.
I reached out to Paul from PTZOptics, and let him know about my newly published code and told him about our broadcast clubs and how we were all very excited to use their cameras and the new apis in our upcoming football season. It was quite obvious that he was just as excited. He even invited me to join the PTZOptics crew on stage at NABShow 2019 in Las Vegas to talk shop.
The visual basic app even inspired me to fork my own project and add even more features. I decided I should customize the app for our football program at PalmettoTigers.com. Since I had full control of each camera in the app, I decided to mix in a visual element to the presets by adding a football field to my app. This version is still in testing so I haven’t published it just yet. Let’s talk about how it works.
There is a grid of transparent buttons on the field and each button corresponds to a camera preset. This works similarly to the official PTZOptics application where you can add a panoramic image and overlay preset buttons.
Before each game (unless the cameras are in the exact same place each time) for each camera you would have to set presets for each section on the grid. Not a deal breaker, but something that would have to be done for it to work properly. Right now it’s a total of 36 presets per camera but I may need to make it do more/less pending how well it works. At this point, the preset grid will work as expected. Clicking anywhere on the field will point the cameras to the desired location.
This is where it gets fun! I’ve added a bit of code to help the cameras automatically keep up with the football game. Let me explain. Our graphics package at Palmetto High (Graphic Outfitters ScoreHD) outputs a real time XML file with the scoreboard data. This XML file contains the “Ball On” yard line and based on that number, the app will automatically go to that preset on the field. So when the scoreboard updates the ball on number, the cameras will automatically follow. It also allows for manual input of the yard line. This can easily be expanded on and a bit more universal for integration, but it’s just a proof of concept until we get everything out for football season.
I’ve also added multi-camera control to the vb.net app. Because of this, it has the ability to automatically point all (or just a selected few) of the cameras to the right place at the right time.
There are some shortcomings though, none of the cameras will follow the actual play without manual intervention, but it does make it simple for pre-snap shots as they will always be where they are needed or at least very close.
In a perfect world we would have 3 ptz 30x cameras covering the action from our stands on both 25 yard lines as well as the 50 yard line. We would then want an additional 2 ptz 20x cameras from the goal posts for a total of 5 ptz cameras. This would provide optimal coverage, pre-snap, without having to have a single camera person!
I’m sure my time working on the PTZOptics cameras is just beginning. I’ll hopefully be posting more about it in the near future!