diff options
author | Your Name <you@example.com> | 2021-08-17 12:38:14 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-08-17 12:38:14 -0400 |
commit | ab5e941dcaedcf2cc896eed1ea257c59780fdb59 (patch) | |
tree | 503284d6999fb92f86bbf39385e17e9b7d8bd8fa /src/playback.cc | |
parent | 2a4ca022ad37ff2452ec3addb8c760a93bb616c6 (diff) | |
download | annotator-ab5e941dcaedcf2cc896eed1ea257c59780fdb59.tar.gz annotator-ab5e941dcaedcf2cc896eed1ea257c59780fdb59.tar.bz2 annotator-ab5e941dcaedcf2cc896eed1ea257c59780fdb59.zip |
Implemented parts of mouse click event
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]); } |