37 #if JPEG_WITH_EXIF_HEADER
41 #ifndef VIDEO_CAPTURE_PATH
42 #define VIDEO_CAPTURE_PATH /data/video/images
45 #ifndef VIDEO_CAPTURE_JPEG_QUALITY
46 #define VIDEO_CAPTURE_JPEG_QUALITY 99
49 #ifndef VIDEO_CAPTURE_FPS
50 #define VIDEO_CAPTURE_FPS 0
68 if (system(save_name) != 0) {
69 printf(
"[video_capture] Could not create images directory %s.\n", STRINGIFY(
VIDEO_CAPTURE_PATH));
109 if (access(save_name, F_OK) != -1) {
113 printf(
"[video_capture] Saving image to %s.\n", save_name);
120 #if JPEG_WITH_EXIF_HEADER
124 FILE *fp = fopen(save_name,
"w");
126 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.
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)
struct video_listener * cv_add_to_device(struct video_config_t *device, cv_function func, uint16_t fps)
int write_exif_jpeg(char *filename, const unsigned char *image_jpg, const unsigned int image_jpg_len, const unsigned int image_jpg_x, const unsigned int image_jpg_y)
#define VIDEO_CAPTURE_PATH
Computer vision framework for onboard processing.
void * buf
Image buffer (depending on the image_type)
#define VIDEO_CAPTURE_JPEG_QUALITY
#define VIDEO_CAPTURE_FPS
Default FPS (zero means run at camera fps)
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
Write JPEG images containing EXIF headers with GPS coordinates.
void video_capture_init(void)
An JPEG encoded image (not per pixel encoded)