1 | initial version |
Yes, the Raspberry Pi is much slower than a desktop computer. So you'll need to optimize the code as much as possible.
Note that the Zero is by far the weakest Raspberry Pi; I would rather choose another model with better performances (like the Pi 4).
I would develop the software on the desktop computer, it's much faster. Then, if you take out the UI part (imshow, etc.) you can run it without the X server. You can recompile and run this on the Pi in headless mode (without attached screen). Anyway, you won't use a screen in the final product.
For testing, I would use a verbose output to see (over SSH) if everything works without a graphical display. Something like:
Opening camera...OK
Beginning capture...
Frame 1 captured. Frame1 processed in 100ms.
--> Red LED detected. Red LED OFF.
--> Blue LED detected. Blue LED ON.
Frame2....