libeblearntools
|
#include <camera_shmem.h>
Public Member Functions | |
camera_shmem (const char *shmem_path, int height=-1, int width=-1) | |
virtual | ~camera_shmem () |
Destructor. | |
virtual idx< Tdata > | grab () |
Return a new frame. | |
Protected Attributes | |
t_video_buffer * | buffer |
< frame counter | |
key_t | shmem_key |
int | shmem_id |
The camera_shmem class interfaces with camera images that come from a shared buffer in memory. It allows to grab images from a shared buffer in the idx format, and also to save gui outputs into video files.
ebl::camera_shmem< Tdata >::camera_shmem | ( | const char * | shmem_path, |
int | height = -1 , |
||
int | width = -1 |
||
) |
Initialize shmem camera using a shared memory descriptor. 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.
shmem_path | The path id of the shared memory. |
height | Resize input frame to this height if different than -1. |
width | Resize input frame to this width if different than -1. |