WPILibC++ 2025.2.1
|
A vision runner is a convenient wrapper object to make it easy to run vision pipelines from robot code. More...
#include <vision/VisionRunner.h>
Public Member Functions | |
VisionRunner (cs::VideoSource videoSource, T *pipeline, std::function< void(T &)> listener) | |
Creates a new vision runner. | |
virtual | ~VisionRunner ()=default |
Public Member Functions inherited from frc::VisionRunnerBase | |
VisionRunnerBase (cs::VideoSource videoSource) | |
Creates a new vision runner. | |
~VisionRunnerBase () | |
VisionRunnerBase (const VisionRunnerBase &)=delete | |
VisionRunnerBase & | operator= (const VisionRunnerBase &)=delete |
void | RunOnce () |
Runs the pipeline one time, giving it the next image from the video source specified in the constructor. | |
void | RunForever () |
A convenience method that calls runOnce() in an infinite loop. | |
void | Stop () |
Stop a RunForever() loop. | |
Protected Member Functions | |
void | DoProcess (cv::Mat &image) override |
Protected Member Functions inherited from frc::VisionRunnerBase |
A vision runner is a convenient wrapper object to make it easy to run vision pipelines from robot code.
The easiest way to use this is to run it in a std::thread and use the listener to take snapshots of the pipeline's outputs.
|
inline |
Creates a new vision runner.
It will take images from the
, send them to the
videoSourcepipeline
, and call the
when the pipeline has finished to alert user code when it is safe to access the pipeline's outputs.
listener
videoSource | The video source to use to supply images for the pipeline |
pipeline | The vision pipeline to run |
listener | A function to call after the pipeline has finished running |
|
virtualdefault |
|
inlineoverrideprotectedvirtual |
Implements frc::VisionRunnerBase.