 Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty Paparazzi is a free software Unmanned Aircraft System.
size_divergence.h File Reference

Calculate divergence from flow vectors by looking at line sizes beteween the points. More...

`#include "lib/vision/image.h"` Include dependency graph for size_divergence.h: This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions

float get_size_divergence (struct flow_t *vectors, int count, int n_samples)
Get divergence from optical flow vectors based on line sizes between corners. More...

float get_mean (float *numbers, int n_elements)
Get the sample mean of a vector of floats. More...

## Detailed Description

Calculate divergence from flow vectors by looking at line sizes beteween the points.

Uses optical flow vectors as determined with a corner tracker and Lucas Kanade to estimate divergence.

Definition in file size_divergence.h.

## Function Documentation

 float get_mean ( float * numbers, int n_elements )

Get the sample mean of a vector of floats.

Parameters
 [in] numbers Vector of numbers [in] n_elements Number of elements
Returns
mean

Definition at line 136 of file size_divergence.c.

Referenced by get_size_divergence(). Here is the caller graph for this function:

 float get_size_divergence ( struct flow_t * vectors, int count, int n_samples )

Get divergence from optical flow vectors based on line sizes between corners.

Parameters
 [in] vectors The optical flow vectors [in] count The number of optical flow vectors [in] n_samples The number of line segments that will be taken into account. 0 means all line segments will be considered.
Returns
divergence

Definition at line 44 of file size_divergence.c.

References flow_t::flow_x, flow_t::flow_y, get_mean(), NO_DIV, flow_t::pos, point_t::x, and point_t::y. Here is the call graph for this function: Here is the caller graph for this function: