How to show images from OpenCV on SmartDashboard

Hey everyone,

I was wondering how I would be able to show the drivers an image processed by OpenCV. Right now, I am using a Raspberry Pi as a co processor and the vision code is written in Python. I assume that I would use the cscore module to do this, but as this is my first foray into vision, I would like some help from CD.


Our white paper might be helpful: A Step by Step Run-through of FRC Vision Processing

Basically, you need to create a camera server stream with CvSource() and addServer(). You then feed the processed images to that CvSource with putFrame().

If you are using the official FRC RPi image, there are some automatic routines to get this going. Search CD; there have been dozens of threads already on this topic.

A shortcut way to do this is to use the CameraServer.putVideo() function.

I’ll try this when I get home because I can’t test it on my school laptop.

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