Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
SIMBasicCam.h
Go to the documentation of this file.
1
10
11#ifndef SIMBASICCAM_H
12#define SIMBASICCAM_H
13
16
18#include <opencv2/opencv.hpp>
19
21
22
33{
34 public:
36 // Declare public methods and member variables.
38 SIMBasicCam(const std::string szCameraPath,
39 const int nPropResolutionX,
40 const int nPropResolutionY,
41 const int nPropFramesPerSecond,
42 const PIXEL_FORMATS ePropPixelFormat,
43 const double dPropHorizontalFOV,
44 const double dPropVerticalFOV,
45 const bool bEnableRecordingFlag,
46 const int nNumFrameRetrievalThreads = 10);
48 std::future<bool> RequestFrameCopy(cv::Mat& cvFrame) override;
49
51 // Getters.
53
54 bool GetCameraIsOpen() override;
55 std::string GetCameraLocation() const override;
56
57 private:
59 // Declare private member variables.
61 // Basic Camera specific.
62
63 cv::VideoCapture m_cvCamera;
64
65 // Mats for storing frames.
66
67 cv::Mat m_cvFrame;
68
70 // Declare private methods.
72 void ThreadedContinuousCode() override;
73 void PooledLinearCode() override;
74};
75#endif
This interface defines the base functions needed to multi-thread a class in Autonomy_Software....
Defines and implements the BasicCamera interface class.
BasicCamera(const std::string szCameraPath, const int nPropResolutionX, const int nPropResolutionY, const int nPropFramesPerSecond, const PIXEL_FORMATS ePropPixelFormat, const double dPropHorizontalFOV, const double dPropVerticalFOV, const bool bEnableRecordingFlag, const int nNumFrameRetrievalThreads)
Construct a new Basic Camera object.
Definition BasicCamera.hpp:43
bool GetCameraIsOpen() override
Accessor for the camera open status.
Definition SIMBasicCam.cpp:208
void ThreadedContinuousCode() override
The code inside this private method runs in a separate thread, but still has access to this*....
Definition SIMBasicCam.cpp:99
void PooledLinearCode() override
This method holds the code that is ran in the thread pool started by the ThreadedLinearCode() method....
Definition SIMBasicCam.cpp:142
std::string GetCameraLocation() const override
Accessor for the cameras path or video index.
Definition SIMBasicCam.cpp:222
std::future< bool > RequestFrameCopy(cv::Mat &cvFrame) override
Puts a frame pointer into a queue so a copy of a frame from the camera can be written to it....
Definition SIMBasicCam.cpp:183
SIMBasicCam(const std::string szCameraPath, const int nPropResolutionX, const int nPropResolutionY, const int nPropFramesPerSecond, const PIXEL_FORMATS ePropPixelFormat, const double dPropHorizontalFOV, const double dPropVerticalFOV, const bool bEnableRecordingFlag, const int nNumFrameRetrievalThreads=10)
Construct a new SIM Cam:: SIM Cam object.
Definition SIMBasicCam.cpp:32
~SIMBasicCam()
Destroy the SIM Cam:: SIM Cam object.
Definition SIMBasicCam.cpp:77