Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Camera board • Efficient resolution for OpenCV Blob Detection at full field of vision

$
0
0
I am tracking 4 robots with two colored dots on them, plus an orange golf ball using a Raspberry Pi5 4GB, a Camera Module 3 (regular, not wide), and OpenCV's blob detector. It captures an array in RGB888, then converts it to HSV, then masks it for yellow, pink, blue, green, and orange, then runs the blob detector on each mask, and outputs all of the coordinates of each of the colored dots. I'm pretty new at this, so I'm feeling good that I have it working. I took it to my classroom today and set it up there with my high ceilings, and was dismayed to find that my field of view does not cover my entire robot soccer field, even though the 75° diagonal field of view should cover it easily. My math shows that my field of view is currently 51°.

A quick search shows that various resolutions can affect the field of view, and I think I'm running 640 x 480 (my rig is at school and I'm at home right now, so that may be incorrect). In the past I tried higher resolutions, but it drastically impacted my frame rates. I need about 25 fps, and I think that's about what I'm getting right now, although I don't really know how to measure that accurately. (I just ran it for 10 seconds and counted how many lines of coordinates it printed out and divided that by 10).

How would one find a resolution that combines a full field of view with the low pixel count that gives me good frame rates? I don't need to display what the camera sees except when I'm setting up the playfield. During gameplay the monitor won't display anything. Also, would an 8GB Pi 5 help with what I'm doing compared to my 4GB model?

Statistics: Posted by BrianZweerink — Thu Sep 04, 2025 1:48 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles