|
libeblearntools
|
#include <camera_mac.h>
Public Member Functions | |
| camera_mac (const char *device, int height=-1, int width=-1, bool grayscale=false, bool mode_rgb_=true) | |
| virtual | ~camera_mac () |
| Destructor. | |
| virtual idx< Tdata > | grab () |
| Return a new frame. | |
Protected Attributes | |
| bool | started |
| < Output grayscale or not. | |
| int | nbuffers |
| void * | buffers |
| int * | sizes |
| int | fd |
| bool | mode_rgb |
The camera_mac class interfaces with the mac camera and images. It allows to grab images from mac in the idx format, and also to save gui outputs into video files.
| ebl::camera_mac< Tdata >::camera_mac | ( | const char * | device, |
| int | height = -1, |
||
| int | width = -1, |
||
| bool | grayscale = false, |
||
| bool | mode_rgb_ = true |
||
| ) |
Initialize mac camera using device to choose which camera_mac to use. height and width are optional parameters that resize the input image to those dimensions if given (different than -1). One may want to decrease the input resolution first to speed up operations, for example when computing multiple resolutions.
| device | The device string, e.g. "/dev/video". |
| height | Resize input frame to this height if different than -1. |
| width | Resize input frame to this width if different than -1. |
| grayscale | If true, output grayscale directly. |
| mode_rgb | sets the mode to RGB, if false, it sets YUV |