diff options
Diffstat (limited to 'src/playback.cc')
-rw-r--r-- | src/playback.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/playback.cc b/src/playback.cc index 8839528..bbc2649 100644 --- a/src/playback.cc +++ b/src/playback.cc @@ -1,4 +1,5 @@ #include "playback.h" +#include "labeller.h" #include <opencv2/opencv.hpp> #include <vector> #include <stdexcept> @@ -31,7 +32,12 @@ namespace frontend { cap.release(); } - void playback::display(const std::string& windowName) const { + void playback::display(const std::string& windowName, const backend::rect &r) const { + cv::Mat curr(data->images[data->frameNum]); + if(r.nonzero()) { + // Update with the rectangle + cv::rectangle(curr, cv::Point(r.x1, r.y1), cv::Point(r.x2, r.y2), cv::Scalar(255, 0, 0), 2, cv::LINE_8); + } cv::imshow(windowName, data->images[data->frameNum]); } |