Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
video_device.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015
3 *
4 * This file is part of Paparazzi.
5 *
6 * Paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * Paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 *
20 */
21
26#ifndef VIDEO_DEVICE_H
27#define VIDEO_DEVICE_H
28
29#include <stdbool.h>
30#include <inttypes.h>
32
33/* Different video filters */
34#define VIDEO_FILTER_DEBAYER (0x1 << 0)
35#define VIDEO_FILTER_ISP (0x1 << 1)
36
37// Main video_thread structure
39 volatile bool is_running;
40 struct v4l2_device *dev;
41};
42
43// camera intrinsics: capture lens properties that determine how world points are projected to image points
44// These properties can be obtained with a camera calibration (as done in openCV)
45// The Dhane (un)distortion parameter is normally tuned by hand, for example with the undistortion module in Paparazzi
47 float focal_x;
48 float focal_y;
49 float center_x;
50 float center_y;
51 float Dhane_k;
52};
53
71extern struct video_config_t dummy_camera;
72
73#endif
Image helper functions like resizing, color filter, converters...
Definition image.h:92
float focal_y
focal length in the y-direction in pixels
float center_x
center image coordinate in the x-direction
struct video_thread_t thread
Information about the thread this camera is running on.
char * subdev_name
path to sub device
uint8_t filters
filters to use (bitfield with VIDEO_FILTER_x)
uint32_t format
Video format.
float focal_x
focal length in the x-direction in pixels
volatile bool is_running
When the device is running.
struct camera_intrinsics_t camera_intrinsics
Intrinsics of the camera; camera calibration parameters and distortion parameter(s)
float Dhane_k
(un)distortion parameter for a fish-eye lens
uint32_t subdev_format
Subdevice video format.
int fps
Target FPS.
float center_y
center image coordinate in the y-direction
struct crop_t crop
Cropped area definition.
uint8_t buf_cnt
Amount of V4L2 video device buffers.
struct video_listener * cv_listener
The first computer vision listener in the linked list for this video device.
struct img_size_t output_size
Output image size.
char * dev_name
path to device
struct v4l2_device * dev
The V4L2 device that is used for the video stream.
struct img_size_t sensor_size
Original sensor size.
struct video_config_t dummy_camera
V4L2 device settings.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.