Right now I’m attempting to use a pi 0 for some very lightweight vision processing and I have a camera connected to it using a ribbon cable. I am able to read frames from the camera but I want to be able to use camera server so I can easily display it on the smart dashboard
I would recommend you not use OpenCV’s VideoCapture, use cs::UsbCamera (it will work for the Pi camera too) and cs::CvSink to get the frames as OpenCV Mat’s.
Regarding cs::MjpegServer, you need to create a cs::CvSource and provide the Mat to it.
This documentation will probably help (especially the example at the very end of the page).
Your code above will also just immediately exit. You’ll need to put in a loop to continuously process frames, similar to this example:
I know I’m missing the loop, I meant it as an example. so my only option i to refactor if I want to use wpilib’s mjpeg server? or is there a way I can display my own mjpeg source on shuffleboard?