aboutsummaryrefslogtreecommitdiff
path: root/src/playback.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/playback.cc')
-rw-r--r--src/playback.cc4
1 files changed, 2 insertions, 2 deletions
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) {