PhotonVision for Ball Detecion

What settings are you using in photon vision for ball detection?

2 Likes

Here’s a screenshot where I was able to get it working with the input settings visible. I can get the threshold and contour stuff later (in school currently).
Also, using bright, white LEDs or a flashlight improved detection quite a bit.

3 Likes

My team’s pipelines aren’t great, but in my experience so far the red one is harder to tune for as the hue borders the 0 and 360 areas. Limelight released an update that allowed hue inversion, but photonvision hasn’t yet.

2 Likes

It really depends on your lighting environment, so there’s no “correct” answer (pro tip: show up to events early so you have more time to tune your pipelines!), but one of the biggest things I’ve found while making pipelines is making sure that in contour filtering, most but not all of the blue rectangle will be full (hopefully your thresholding will give you a consistent image) and the w:h ratio will be close to 1:1, but leave a little wiggle room in case your thresholded (thresheld?) ball is more of a gibbous than a perfect circle.

I’ve also found that balls tend to have a slightly lighter saturation and value than that of a robot bumper, so if you are picking up bumpers or other red things, try messing with those. Just try to keep value ranges as close as you can, but still keep a little bit of room for error.

The aforementioned tips are as generalized as possible, but just try out everything and if you get stuck. I don’t want to be that guy but seriously, looking for your answers in the docs is actually extremely helpful. However, one tip that’s not in the docs is while tuning your thesholding values, turn all contour filtering values to 0. That way you won’t have a bunch of boxes blocking your view while you are trying to tune the perfect pipeline.

Good luck this year!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.