35 #ifndef VIDEO_CAPTURE_PATH
36 #define VIDEO_CAPTURE_PATH /data/video/images
39 #ifndef VIDEO_CAPTURE_JPEG_QUALITY
40 #define VIDEO_CAPTURE_JPEG_QUALITY 99
57 if (system(save_name) != 0) {
58 printf(
"[video_capture] Could not create images directory %s.\n", STRINGIFY(
VIDEO_CAPTURE_PATH));
98 if (access(save_name, F_OK) != -1) {
102 printf(
"[video_capture] Saving image to %s.\n", save_name);
105 FILE *fp = fopen(save_name,
"w");
107 printf(
"[video_capture] Could not write shot %s.\n", save_name);
uint32_t buf_size
The buffer size.
void image_free(struct image_t *img)
Free the image.
struct video_listener * cv_add_to_device(struct video_config_t *device, cv_function func)
void image_create(struct image_t *img, uint16_t width, uint16_t height, enum image_type type)
Create a new image.
void video_capture_save(struct image_t *img)
void video_capture_shoot(void)
#define VIDEO_CAPTURE_PATH
Computer vision framework for onboard processing.
void * buf
Image buffer (depending on the image_type)
#define VIDEO_CAPTURE_JPEG_QUALITY
Encode images with the use of the JPEG encoding.
struct image_t * video_capture_func(struct image_t *img)
void jpeg_encode_image(struct image_t *in, struct image_t *out, uint32_t quality_factor, bool add_dri_header)
Encode an YUV422 image.
bool video_capture_take_shot
void video_capture_init(void)
An JPEG encoded image (not per pixel encoded)