Custom opencv vision

Wondering how to use custom python opencv code with raspberry pi. Basically, photonvision without photonvision, and with custom opencv code. Also, needs to work with the PlayStation eye camera.

Well, you capture frames, then process them with openCV, then export the results somehow (NetworkTables? Raw UDP packets?).

If you want something like PhotonVision, then… why not use PhotonVision?

1 Like

I think what you are looking for is WPILIBPI Vision with WPILibPi — FIRST Robotics Competition documentation

It gives you a place you can upload a python script to your pipeline then you can post any relevant information to the network tables.

1 Like

Do you have an example on how to do that?

The documentation linked above has some examples. Specifically to the things I mentioned the links within the documentation are.
Here is an example custom python script using network tables

Here is where you upload your scripts

The documentation will provide much better information than me.

Did you look at the linked documentation for WPILibPi? Everything you need to know is in there.

The WPILibPi image is pre-built and will automatically run a Python vision processing script for you. You can use a tool like GRIP to write the CV script, or you can substitute your own. WPILibPi runs a web server that makes it very easy to upload a new Python script.

I recommend at least skimming through the entire tutorial linked above, but the details specific to your question are answered on this page:

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