Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cv.c File Reference

Computer vision framework for onboard processing. More...

#include <stdlib.h>
#include <stdio.h>
#include "cv.h"
#include "rt_priority.h"
+ Include dependency graph for cv.c:

Go to the source code of this file.

Functions

void cv_attach_listener (struct video_config_t *device, struct video_listener *new_listener)
 
void cv_async_function (struct cv_async *async, struct image_t *img)
 
void * cv_async_thread (void *args)
 
static uint32_t timeval_diff (struct timeval *A, struct timeval *B)
 
struct video_listenercv_add_to_device (struct video_config_t *device, cv_function func)
 
struct video_listenercv_add_to_device_async (struct video_config_t *device, cv_function func, int nice_level)
 
void cv_run_device (struct video_config_t *device, struct image_t *img)
 

Detailed Description

Computer vision framework for onboard processing.

Definition in file cv.c.

Function Documentation

struct video_listener* cv_add_to_device_async ( struct video_config_t device,
cv_function  func,
int  nice_level 
)

Definition at line 80 of file cv.c.

References video_listener::async, image_t::buf_size, cv_add_to_device(), cv_async_thread(), cv_async::img_available, cv_async::img_copy, cv_async::img_mutex, listener, cv_async::thread_id, and cv_async::thread_priority.

Referenced by viewvideo_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cv_async_function ( struct cv_async async,
struct image_t img 
)

Definition at line 102 of file cv.c.

References image_t::buf_size, image_t::h, image_copy(), image_create(), cv_async::img_available, cv_async::img_copy, cv_async::img_mutex, cv_async::img_processed, image_t::type, and image_t::w.

Referenced by cv_run_device().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void * cv_async_thread ( void *  args)

Definition at line 123 of file cv.c.

References video_listener::async, video_listener::func, cv_async::img_available, cv_async::img_copy, cv_async::img_mutex, cv_async::img_processed, listener, set_nice_level(), cv_async::thread_priority, and cv_async::thread_running.

Referenced by cv_add_to_device_async().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cv_attach_listener ( struct video_config_t device,
struct video_listener new_listener 
)
void cv_run_device ( struct video_config_t device,
struct image_t img 
)

Definition at line 155 of file cv.c.

References video_listener::active, video_listener::async, cv_async_function(), video_config_t::cv_listener, video_listener::func, listener, video_listener::maximum_fps, video_listener::next, timeval_diff(), image_t::ts, and video_listener::ts.

Referenced by video_thread_function().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t timeval_diff ( struct timeval *  A,
struct timeval *  B 
)
inlinestatic

Definition at line 40 of file cv.c.

Referenced by cv_run_device().

+ Here is the caller graph for this function: