68 std::unique_ptr<cv::Mat> m_image;
70 std::atomic_bool m_enabled;
96 std::function<
void(T&)> listener)
99 m_listener(listener) {}
105 m_pipeline->Process(image);
106 m_listener(*m_pipeline);
111 std::function<void(T&)> m_listener;
A source for user code to accept video frames as OpenCV images.
Definition cscore_cv.h:86
A source for video that provides a sequence of frames.
Definition cscore_oo.h:253
Non-template base class for VisionRunner.
Definition VisionRunner.h:19
void RunOnce()
Runs the pipeline one time, giving it the next image from the video source specified in the construct...
virtual void DoProcess(cv::Mat &image)=0
VisionRunnerBase & operator=(const VisionRunnerBase &)=delete
void Stop()
Stop a RunForever() loop.
VisionRunnerBase(const VisionRunnerBase &)=delete
void RunForever()
A convenience method that calls runOnce() in an infinite loop.
VisionRunnerBase(cs::VideoSource videoSource)
Creates a new vision runner.
A vision runner is a convenient wrapper object to make it easy to run vision pipelines from robot cod...
Definition VisionRunner.h:81
VisionRunner(cs::VideoSource videoSource, T *pipeline, std::function< void(T &)> listener)
Creates a new vision runner.
Definition VisionRunner.h:95
void DoProcess(cv::Mat &image) override
Definition VisionRunner.h:104
virtual ~VisionRunner()=default