Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
video_thread_nps.c File Reference
#include "video_thread_nps.h"
#include "video_thread.h"
#include "cv.h"
#include "lib/vision/image.h"
#include "modules/computer_vision/lib/v4l/v4l2.h"
#include "peripherals/video_device.h"
#include <stdio.h>
+ Include dependency graph for video_thread_nps.c:

Go to the source code of this file.

Functions

void video_thread_init (void)
 Initialize the view video. More...
 
void video_thread_periodic (void)
 A dummy for now. More...
 
void video_thread_start (void)
 Starts the streaming of a all cameras. More...
 
void video_thread_stop (void)
 Stops the streaming of all cameras This could take some time, because the thread is stopped asynchronous. More...
 
bool add_video_device (struct video_config_t *device)
 Keep track of video devices added by modules. More...
 

Variables

struct video_config_t front_camera
 Video thread dummy for simulation. More...
 
struct video_config_t bottom_camera
 
struct video_config_tcameras [VIDEO_THREAD_MAX_CAMERAS] = { NULL }
 

Function Documentation

◆ add_video_device()

bool add_video_device ( struct video_config_t device)

Keep track of video devices added by modules.

Definition at line 105 of file video_thread_nps.c.

References cameras, video_config_t::dev_name, and VIDEO_THREAD_MAX_CAMERAS.

Referenced by cv_add_to_device().

+ Here is the caller graph for this function:

◆ video_thread_init()

void video_thread_init ( void  )

Initialize the view video.

Definition at line 87 of file video_thread_nps.c.

References cameras, and VIDEO_THREAD_MAX_CAMERAS.

◆ video_thread_periodic()

void video_thread_periodic ( void  )

A dummy for now.

Definition at line 90 of file video_thread_nps.c.

◆ video_thread_start()

void video_thread_start ( void  )

Starts the streaming of a all cameras.

Definition at line 95 of file video_thread_nps.c.

References cameras, start_video_thread(), and VIDEO_THREAD_MAX_CAMERAS.

+ Here is the call graph for this function:

◆ video_thread_stop()

void video_thread_stop ( void  )

Stops the streaming of all cameras This could take some time, because the thread is stopped asynchronous.

Definition at line 98 of file video_thread_nps.c.

References cameras, stop_video_thread(), and VIDEO_THREAD_MAX_CAMERAS.

+ Here is the call graph for this function:

Variable Documentation

◆ bottom_camera

struct video_config_t bottom_camera
Initial value:
= {
.output_size = { .w = 240, .h = 240 },
.sensor_size = { .w = 320, .h = 240 },
.crop = { .x = 40, .y = 0, .w = 240, .h = 240 },
.dev_name = "bottom_camera",
.subdev_name = NULL,
.format = V4L2_PIX_FMT_UYVY,
.buf_cnt = 10,
.filters = 0,
.cv_listener = NULL,
.fps = 0,
.camera_intrinsics = {
.focal_x = 350,
.focal_y = 350,
.center_x = 240 / 2,
.center_y = 240 / 2,
.Dhane_k = 1
}
}

Definition at line 63 of file video_thread_nps.c.

◆ cameras

struct video_config_t* cameras[VIDEO_THREAD_MAX_CAMERAS] = { NULL }

Definition at line 84 of file video_thread_nps.c.

Referenced by add_video_device().

◆ front_camera

struct video_config_t front_camera
Initial value:
= {
.output_size = { .w = 1280, .h = 720 },
.sensor_size = { .w = 1280, .h = 720 },
.crop = { .x = 0, .y = 0, .w = 1280, .h = 720 },
.dev_name = "front_camera",
.subdev_name = NULL,
.format = V4L2_PIX_FMT_UYVY,
.buf_cnt = 10,
.filters = 0,
.cv_listener = NULL,
.fps = 0,
.camera_intrinsics = {
.focal_x = 300,
.focal_y = 300,
.center_x = 1280 / 2,
.center_y = 720 / 2,
.Dhane_k = 1
}
}

Video thread dummy for simulation.

  • Keeps track of added devices, which can be referenced by simulation code such as in simulator/nps/fdm_gazebo.c.

Definition at line 43 of file video_thread_nps.c.