2014-Vision
 All Classes Functions Variables
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
PiCam Class Reference

#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
 

Detailed Description

A simple interface to the raspberry pi camera module.

Constructor & Destructor Documentation

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.

Member Function Documentation

void PiCam::start ( )

Start processing. For now, this goes into a loop which never exits.


The documentation for this class was generated from the following files: