#include <PiCam.hpp>
Public Member Functions | |
| PiCam (unsigned int width, unsigned int height, std::function< void(cv::Mat)> callback) | |
| ~PiCam () | |
| void | start () |
Public Attributes | |
| int | port |
| unsigned int | width |
| Requested width for the video stream. | |
| unsigned int | height |
| Requested height for the video stream. | |
| cv::Mat | frame |
| Current frame. | |
| std::function< void(cv::Mat)> | callback |
| Callback function that processes each frame. | |
Static Public Attributes | |
| static const int | VIDEO_OUTPUT_BUFFERS_NUM = 3 |
| static const int | VIDEO_FRAME_RATE_NUM = 30 |
| static const int | VIDEO_FRAME_RATE_DEN = 1 |
A simple interface to the raspberry pi camera module.
| PiCam::PiCam | ( | unsigned int | width, |
| unsigned int | height, | ||
| std::function< void(cv::Mat)> | callback | ||
| ) |
Construct a camera object. This initializes the connection to the raspberry pi camera module. There should probably only ever be one of these at a time. Trying to construct a second instance will proabbly fail because only one camera can be connected anyway.
| PiCam::~PiCam | ( | ) |
Destructor. This should eventually clean up all the underlying MMAL objects.
| void PiCam::start | ( | ) |
Start processing. For now, this goes into a loop which never exits.
1.8.6