From ab5e941dcaedcf2cc896eed1ea257c59780fdb59 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 17 Aug 2021 12:38:14 -0400 Subject: Implemented parts of mouse click event --- src/playback.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/playback.cc') 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 #include #include @@ -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]); } -- cgit v1.2.3