blob: a32147b19ad7685c61639598231e910d81a4904d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
//
// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "CvWindowOutput.hpp"
namespace od
{
void CvWindowOutput::Init(const std::string& windowName)
{
m_windowName = windowName;
cv::namedWindow(m_windowName, cv::WINDOW_AUTOSIZE);
}
void CvWindowOutput::WriteFrame(std::shared_ptr<cv::Mat>& frame)
{
cv::cvtColor(*frame, *frame, cv::COLOR_RGB2BGR);
cv::imshow( m_windowName, *frame);
cv::waitKey(30);
}
void CvWindowOutput::Close()
{
cv::destroyWindow(m_windowName);
}
bool CvWindowOutput::IsReady() const
{
return true;
}
}// namespace od
|