Files
allwpilib/cscore/src/main/native/cpp/CvSourceImpl.h

42 lines
1.2 KiB
C
Raw Normal View History

2016-10-24 20:27:00 -07:00
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
2016-10-24 20:27:00 -07:00
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
2017-08-25 17:48:06 -07:00
#ifndef CSCORE_CVSOURCEIMPL_H_
#define CSCORE_CVSOURCEIMPL_H_
2016-10-24 20:27:00 -07:00
#include <atomic>
#include <functional>
2017-08-25 17:48:06 -07:00
#include <memory>
#include <string>
2016-10-24 20:27:00 -07:00
#include <vector>
#include <opencv2/core/core.hpp>
#include <wpi/ArrayRef.h>
#include <wpi/Twine.h>
#include "ConfigurableSourceImpl.h"
2016-10-24 20:27:00 -07:00
#include "SourceImpl.h"
namespace cs {
class CvSourceImpl : public ConfigurableSourceImpl {
2016-10-24 20:27:00 -07:00
public:
CvSourceImpl(const wpi::Twine& name, wpi::Logger& logger, Notifier& notifier,
Telemetry& telemetry, const VideoMode& mode);
2016-10-24 20:27:00 -07:00
~CvSourceImpl() override;
// OpenCV-specific functions
void PutFrame(cv::Mat& image);
private:
std::atomic_bool m_connected{true};
};
} // namespace cs
2017-08-25 17:48:06 -07:00
#endif // CSCORE_CVSOURCEIMPL_H_