From e4ec24000b7ed45490eaa988c94546f480114933 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 17 Aug 2021 16:29:44 -0400 Subject: Finished rectangle annotation code --- src/playback.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/playback.cc') diff --git a/src/playback.cc b/src/playback.cc index bbc2649..700567a 100644 --- a/src/playback.cc +++ b/src/playback.cc @@ -33,12 +33,12 @@ namespace frontend { } void playback::display(const std::string& windowName, const backend::rect &r) const { - cv::Mat curr(data->images[data->frameNum]); + cv::Mat curr = data->images[data->frameNum].clone(); 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]); + cv::imshow(windowName, curr); } bool playback::seekFrame(std::size_t frameNum) { -- cgit v1.2.3