Welcome to the EyeBot
Version 7 - RPi1
A Controller For Various Hardware IO
|
Camera routines for the Raspberry Pi 2, modded for the EyeBot. More...
#include <stdlib.h>
#include <opencv/cv.h>
#include <opencv2/highgui/highgui_c.h>
#include "types.h"
Go to the source code of this file.
Macros | |
#define | CAM_SUCCESS 1 |
#define | CAM_FAILURE 0 |
Functions | |
int | CAMInit () |
int | CAMSetMode (int mode) |
Set the camera mode (e.g. format and resolution). More... | |
int | CAMGetMode () |
Retrieves the current camera mode. More... | |
int | CAMGet (BYTE *buf) |
Retrieve a camera frame into the provided buffer. More... | |
int | CAMRelease (void) |
Stops and releases all camera structures. More... | |
int | CAMGetGray (BYTE *buf) |
Grabs a gray image off the camera. More... | |
Variables | |
int | CAMSIZE |
int | CAM_INITIAL |
Camera routines for the Raspberry Pi 2, modded for the EyeBot.
#define CAM_FAILURE 0 |
Failure code
#define CAM_SUCCESS 1 |
Success code
int CAMGet | ( | BYTE * | buf | ) |
Retrieve a camera frame into the provided buffer.
[in] | buf | The buffer to copy the camera frame into. The supplied buffer must be large enough to acommodate the size of the image, as defined by the camera mode. |
Retrieves the current camera frame and copies it into the supplied buffer. CAMInit must have been called previously.
int CAMGetGray | ( | BYTE * | buf | ) |
Grabs a gray image off the camera.
the | byte stream to store the image data, data in Gray format |
int CAMGetMode | ( | void | ) |
Retrieves the current camera mode.
CAMInit must have been called previously.
int CAMRelease | ( | void | ) |
Stops and releases all camera structures.
Releases all allocated memory and stops video capture.
int CAMSetMode | ( | int | mode | ) |
Set the camera mode (e.g. format and resolution).
[in] | mode | The camera mode to be set to |
Sets the camera mode. CAMInit must have been called previously.