• Bocce Labs
  • Posts
  • Introducing Bocce Analysis Tool (BAT)

Introducing Bocce Analysis Tool (BAT)

The best ideas are born on napkins

Howdy 👋

Digital Dave here with another issue of Bocce Labs.

Welcome to the 3 new subscribers.

Last time, I shared about three topics:

  1. BBN-Midwest’s first livestream — ABC’s Annual Women’s Tournament

  2. Wiral — A cable cam rig that seems just about perfect for bocce and at a good price too

  3. My planned trip to Waterside Club in Phoenix, NY

To get up to speed, you can read it here:

Well, Alex and I are back from Waterside. There, I came up with some immediate ideas for my software and now that it has been a couple weeks, I’ve had time for further reflection.

🙏 Huge thanks to Dino, Gabe, and everyone at Waterside for being such great hosts. I can’t wait to go back (especially for Dino’s homemade sausage and vino).

🪞 Reflections from my trip to Waterside

Alex and I dropped into Waterside Club in Phoenix, NY for less than 48 hours.

That was enough time to:

  1. Have a meeting with Dino about growing bocce in New York state and beyond

  2. Help Michael stream over 17 hours of Bocce on YouTube (Day 1 stream link & Day 2 stream link)

  3. Play in a 2v2 Unified Sports exhibition match with two Special Olympics Athletes

  4. Rig the Wiral cable cam and use it during the live stream as well as for testing computer vision algorithms

I learned a lot — far too much to share in this newsletter, but here are the highlights.


  • There’s a huge appetite from tournament players to expose the sport of bocce to a wider audience

  • Lot’s of positive livestream viewer feedback came in via comments, DMs, texts, emails, and more

  • For me, commentating on the mic can be scary, especially since it is hard for me to associate player names to faces; while we had a good roster for each team, it didn’t have a headshot next to the name (that would make things immensely easier)

  • Before hopping on the mic, it is best to designate a primary and secondary speaker / controls person

  • It takes work to get folks from Facebook/Instagram over to YouTube. A steady feed of content stating that we’re going live soon, we are live, and here’s the link is helpful.

  • I learned a bunch of technical stuff about the equipment connectivity and controls as well; I’ll be sharing that knowledge in the BBN Midwest


  • The easy setup only takes 5-10 minutes assuming you already have anchors on the wall, which we did because Dino put them up for us a month before we arrived. 🙏 Thanks Dino!!!

  • The cable didn’t sag nearly as much as I thought it would. We were on a 70 foot court (I’m not sure of the exact dimensions, but maybe Dino can share in a comment below)

  • Wiral was not distracting to players. In general when a player is rolling, they are looking down at their hand or down the court at their target. They aren’t looking up. The device is black and the ceiling is black at Waterside, so that made it even better. Had we been in an environment with a white ceiling, the device would have been more distracting.

  • We didn’t run the Wiral at max speed. At medium speed it was usually not fast enough to keep pace with a moving ball. I didn’t realize that there are three speeds until I looked closer at the remote.

  • As expected, the Wiral swings a little bit, but for me it wasn’t too noticeable on the video feed (especially since we had digital stabilization turned on)

Streaming from a phone to the computer:

  • The “OBS Camera” app for iPhone works great for using the wide angle lens of an iPhone (I used an iPhone 13-mini). Unfortunately the battery life wasn’t great with this app. Unfortunately the app was laggy (and I don’t think it was the wifi….continue reading). We abandoned this app for this reason.

  • iPhone’s built in “Continuity Cam” worked great (no lag, solid battery life that lasted about 2-3 games worth). The problem? It doesn’t allow access to the wide angle camera + lens on the iPhone. So we couldn’t see the entire width of the court while connecting this way unfortunately.

  • We could have streamed directly into Michael’s laptop running OBS (with the OBS app, not the Continuity Camera since his computer runs Windows). Instead, we streamed into my Mac laptop and used a USB HDMI input receiver into Michael’s computer from mine effectively allowing us to share my screen.

  • Streaming into my computer had the added benefit that I could operate Python and OpenCV without impacting streaming operations. If the folks in the booth wanted to share my screen with the feed, it was just a click away.

When I returned to Chicago, I purchased an Android Pixel 6 and an extended battery case (thanks for the idea, Elizabeth) for it. Hopefully that makes streaming from the Wiral rig to the computer a bit easier/better. I tested the OBS app on the Android and it worked flawlessly on my home Ubiquiti WiFi network. Having a second smartphone also has the added benefit that I’ll still have my day-to-day use iPhone in my pocket for snapping pictures and videos to amplify the event on social media.

Bocce Labs Software

Finding balls

  • I knew I’d need to update the ball radius (in pixels) in my software config.

  • What I missed was that I also needed to update the camera resolution in the config. My iPhone camera is a different resolution (higher) than my Allied Vision cameras that I use at home for this project.

  • Once I had both the camera resolution and ball radius correct, the software picked up the bocce balls quite well.

  • Unfortunately, finding the pallino was very challenging for the software. This is because the floor of Waterside is gray and the pallinos were also gray (metallic) and small. This made it all but impossible for my algorithm (Read about my Computer Vision Bocce Ball Algorithm here).

This led me to an idea — manual intervention. If a ball isn’t recognized and you still need its coordinates or a measurement, you should be able to click it and use your mouse/stylus or finger on a tablet.

Being able to click on balls has another benefit — you can train team ball color/patterns on the fly during a game. Assuming the color/patterns are disparate enough, I’m hoping that an operator could train the AI by the end of the 2nd frame (i.e., just when the game is getting interesting) or maybe even during the practice rolls.

I maintain a file called config.py with a bunch of constants and settings for the app. At home my settings are very static, but on the road, settings need to be tuned. So at Waterside, I discovered that I need to be able to change any config settings on the fly without restarting the app. This will be straightforward, but I didn’t take the time to do it on site.

🦇 Next step: Build the BAT

I’m planning out a FREE and OPEN SOURCE app called Bocce Analysis Tool (BAT).

Okay, maybe it needs a better name.

Anyways, the app will essentially be an upgrade to what I’ve already built, but with all those manual controls, measurement tools, ability to annotate, take screenshots, and more.

Think of it like what the NFL does when you watch on TV. Those annotations are called “Telestrations.”

Telestrations and manual intervention (not relying 100% on AI) will (A) Simplify and (B) Add immediate value to BBN streams.

Plus, when you click/tap on a ball that isn’t automatically recognized, a cropped photo will be taken of the ball to serve as future AI training data. This will be super helpful to have.

I’m going to work with a new Bocce Labs contributor, Gina, on this project. We’ll have more to share soon. Welcome to the team, Gina!

🦜 Comments activated!

My newsletter platform, Beehiiv, recently added a long overdue commenting feature.

So far it is working great and I’m eager to make this newsletter more interactive.

Please don’t be a stranger!

If you have a question, idea, or something to share I encourage you to leave a comment at the bottom of the article. I’ll reply to each and every comment.

Hint: if you’re reading this in your inbox, scroll to the top and press “Read Online”. When your browser opens the article, scroll to the bottom and you can leave a comment.

Thanks for reading!

A couple closing notes:

(1) I’ve partnered with @s.and.p.tees in Chicago to make Bocce Labs t-shirts. So if you want one, you have two options:

  • FREE: Use the share link above to earn one and help me grow this blog.

  • $25: Click the link below to order a shirt.

(2) Where do you play bocce? If you play bocce, I’m interested to know which club you’re associated with and how long you’ve been playing bocce. But most importantly I’m looking for writers and coders as this blog is not about me — it is about growing the sport of bocce. Consider sharing that with me here:

🥂 Cin cin!

~ Dave

Join the conversation

or to participate.