Our team is using a Rasberry-pi for processing robot vision processing. I was able to get all the values after processing it back to the shuffleboard. But, getting the processed image back to the shuffleboard seems to be a bit challenging. Are there any examples?
See CameraServer.putVideo(). This creates a virtual camera and returns a CvSource you can put images onto. Example here: http://wpilib.screenstepslive.com/s/currentCS/m/vision/l/669166-using-the-cameraserver-on-the-roborio
1 Like
Out github has a raspberry pi example project that draws a circle on the incoming image and writes it to a different output stream using the FRC Vision as the base.
The code to see the processed image on the dash:
/**
* Example pipeline.
*/
public static class MyPipeline implements VisionPipeline {
public int val;
CvSource outputStream = CameraServer.getInstance().putVideo("Circle", 320, 240);
Mat outMat = new Mat();
@Override
public void process(Mat mat) {
mat.copyTo(outMat);
Imgproc.circle(outMat, new Point(160, 120), 15, new Scalar(0,0,255));
outputStream.putFrame(mat);
}
The link to the sample project on github: https://github.com/Lambda-Corps/2019_vision
2 Likes
Thanks for the help. I was able to get the feedback to my dashboard.
cheers