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
BasicCam.h
Go to the documentation of this file.
1
11#ifndef BASICCAM_H
12#define BASICCAM_H
13
14#include "../../interfaces/AutonomyThread.hpp"
15#include "../../interfaces/BasicCamera.hpp"
16
18#include <opencv2/opencv.hpp>
19
21
22
32class BasicCam : public BasicCamera
33{
34 public:
36 // Declare public methods and member variables.
38
39 BasicCam(const std::string szCameraPath,
40 const int nPropResolutionX,
41 const int nPropResolutionY,
42 const int nPropFramesPerSecond,
43 const PIXEL_FORMATS ePropPixelFormat,
44 const double dPropHorizontalFOV,
45 const double dPropVerticalFOV,
46 const bool bEnableRecordingFlag,
47 const int nNumFrameRetrievalThreads = 10);
48 BasicCam(const int nCameraIndex,
49 const int nPropResolutionX,
50 const int nPropResolutionY,
51 const int nPropFramesPerSecond,
52 const PIXEL_FORMATS ePropPixelFormat,
53 const double dPropHorizontalFOV,
54 const double dPropVerticalFOV,
55 const bool bEnableRecordingFlag,
56 const int nNumFrameRetrievalThreads = 10);
57 ~BasicCam();
58 std::future<bool> RequestFrameCopy(cv::Mat& cvFrame) override;
59
61 // Getters.
63
64 bool GetCameraIsOpen() override;
65 std::string GetCameraLocation() const override;
66
67 private:
69 // Declare private member variables.
71 // Basic Camera specific.
72 cv::VideoCapture m_cvCamera;
73
74 // Mats for storing frames.
75 cv::Mat m_cvFrame;
76
78 // Declare private methods.
80 void ThreadedContinuousCode() override;
81 void PooledLinearCode() override;
82};
83#endif
This class implements and interfaces with the most common USB cameras and features....
Definition BasicCam.h:33
void PooledLinearCode() override
This method holds the code that is ran in the thread pool started by the ThreadedLinearCode() method....
Definition BasicCam.cpp:282
~BasicCam()
Destroy the Basic Cam:: Basic Cam object.
Definition BasicCam.cpp:143
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 BasicCam.cpp:319
bool GetCameraIsOpen() override
Accessor for the camera open status.
Definition BasicCam.cpp:344
void ThreadedContinuousCode() override
The code inside this private method runs in a separate thread, but still has access to this*....
Definition BasicCam.cpp:177
std::string GetCameraLocation() const override
Accessor for the cameras path or video index.
Definition BasicCam.cpp:358
This class serves as a middle inheritor between the Camera interface and the BasicCam class....
Definition BasicCamera.hpp:28