|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "lib/vision/image.h"
Include dependency graph for linear_flow_fit.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | linear_flow_fit_info |
Functions | |
| bool | analyze_linear_flow_field (struct flow_t *vectors, int count, float error_threshold, int n_iterations, int n_samples, int im_width, int im_height, struct linear_flow_fit_info *info) |
| Analyze a linear flow field, retrieving information such as divergence, surface roughness, focus of expansion, etc. | |
| void | fit_linear_flow_field (struct flow_t *vectors, int count, float error_threshold, int n_iterations, int n_samples, float *parameters_u, float *parameters_v, float *fit_error, float *min_error_u, float *min_error_v, int *n_inliers_u, int *n_inliers_v) |
| Analyze a linear flow field, retrieving information such as divergence, surface roughness, focus of expansion, etc. | |
| void | extract_information_from_parameters (float *parameters_u, float *parameters_v, int im_width, int im_height, struct linear_flow_fit_info *info) |
| Extract information from the parameters that were fit to the optical flow field. | |
| bool | analyze_flow_field (struct flow_t *vectors, int count, float error_threshold, int n_iterations, int n_samples, int im_width, int im_height, float focal_length, struct linear_flow_fit_info *info) |
| Analyze a flow field, retrieving information on relative velocities and rotations, etc. | |
| struct linear_flow_fit_info |
Definition at line 40 of file linear_flow_fit.h.
| Data Fields | ||
|---|---|---|
| float | divergence | Basically, relative_velocity_z. Actual divergence of a 2D flow field is 2 * relative_velocity_z. |
| float | fit_error | Error of the fit (same as surface roughness) |
| float | focus_of_expansion_x | Image x-coordinate of the focus of expansion (contraction) |
| float | focus_of_expansion_y | Image y-coordinate of the focus of expansion (contraction) |
| int | n_inliers_u | Number of inliers in the horizontal flow fit. |
| int | n_inliers_v | Number of inliers in the vertical flow fit. |
| float | relative_velocity_x | Relative velocity in x-direction, i.e., vx / z, where z is the depth in direction of the camera's principal axis. |
| float | relative_velocity_y | Relative velocity in y-direction, i.e., vy / z, where z is the depth in direction of the camera's principal axis. |
| float | relative_velocity_z | Relative velocity in z-direction, i.e., vz / z, where z is the depth in direction of the camera's principal axis. |
| float | rotation_X | Rotation around the X axis. |
| float | rotation_Y | Rotation around the Y axis. |
| float | rotation_Z | Rotation around the Z axis. |
| float | slope_x | Slope of the surface in x-direction - given sufficient lateral motion. |
| float | slope_y | Slope of the surface in y-direction - given sufficient lateral motion. |
| float | surface_roughness | The error of the linear fit is a measure of surface roughness. |
| float | time_to_contact | Basically, 1 / relative_velocity_z. |
| bool analyze_flow_field | ( | struct flow_t * | vectors, |
| int | count, | ||
| float | error_threshold, | ||
| int | n_iterations, | ||
| int | n_samples, | ||
| int | im_width, | ||
| int | im_height, | ||
| float | focal_length, | ||
| struct linear_flow_fit_info * | info | ||
| ) |
Analyze a flow field, retrieving information on relative velocities and rotations, etc.
| [out] | outcome | If 0, there were too few vectors for a fit. If 1, the fit was successful. |
| [in] | vectors | The optical flow vectors |
| [in] | count | The number of optical flow vectors |
| [in] | error_threshold | Error used to determine inliers / outliers. |
| [in] | n_iterations | Number of RANSAC iterations. |
| [in] | n_samples | Number of samples used for a single fit (min. 5). |
| [in] | im_width | Image width in pixels |
| [in] | im_height | Image height in pixels |
| [in] | focal_length | Focal length in pixels |
| [out] | info | Contains all info extracted from the linear flow fit. |
Definition at line 399 of file linear_flow_fit.c.
References N_PAR_TR_FIT.
Referenced by calc_fast9_lukas_kanade().
Here is the caller graph for this function:| bool analyze_linear_flow_field | ( | struct flow_t * | vectors, |
| int | count, | ||
| float | error_threshold, | ||
| int | n_iterations, | ||
| int | n_samples, | ||
| int | im_width, | ||
| int | im_height, | ||
| struct linear_flow_fit_info * | info | ||
| ) |
Analyze a linear flow field, retrieving information such as divergence, surface roughness, focus of expansion, etc.
| [out] | outcome | If 0, there were too few vectors for a fit. If 1, the fit was successful. |
| [in] | vectors | The optical flow vectors |
| [in] | count | The number of optical flow vectors |
| [in] | error_threshold | Error used to determine inliers / outliers. |
| [in] | n_iterations | Number of RANSAC iterations. |
| [in] | n_samples | Number of samples used for a single fit (min. 3). |
| [in] | im_width | Image width in pixels |
| [in] | im_height | Image height in pixels |
| [out] | info | Contains all info extracted from the linear flow fit. |
Definition at line 67 of file linear_flow_fit.c.
References linear_flow_fit_info::divergence, E, extract_information_from_parameters(), linear_flow_fit_info::fit_error, fit_linear_flow_field(), foo, MIN_SAMPLES_FIT, linear_flow_fit_info::n_inliers_u, linear_flow_fit_info::n_inliers_v, n_samples, linear_flow_fit_info::relative_velocity_z, linear_flow_fit_info::surface_roughness, and linear_flow_fit_info::time_to_contact.
Referenced by calc_fast9_lukas_kanade().
Here is the call graph for this function:
Here is the caller graph for this function:| void extract_information_from_parameters | ( | float * | parameters_u, |
| float * | parameters_v, | ||
| int | im_width, | ||
| int | im_height, | ||
| struct linear_flow_fit_info * | info | ||
| ) |
Extract information from the parameters that were fit to the optical flow field.
| [in] | parameters_u* | Parameters of the horizontal flow field |
| [in] | parameters_v* | Parameters of the vertical flow field |
| [in] | im_width | Width of image in pixels |
| [in] | im_height | Height of image in pixels |
| [out] | info | Contains all info extracted from the linear flow fit |
Definition at line 321 of file linear_flow_fit.c.
References E, linear_flow_fit_info::focus_of_expansion_x, linear_flow_fit_info::focus_of_expansion_y, foo, linear_flow_fit_info::relative_velocity_x, linear_flow_fit_info::relative_velocity_y, linear_flow_fit_info::relative_velocity_z, linear_flow_fit_info::slope_x, and linear_flow_fit_info::slope_y.
Referenced by analyze_linear_flow_field().
Here is the caller graph for this function:| void fit_linear_flow_field | ( | struct flow_t * | vectors, |
| int | count, | ||
| float | error_threshold, | ||
| int | n_iterations, | ||
| int | n_samples, | ||
| float * | parameters_u, | ||
| float * | parameters_v, | ||
| float * | fit_error, | ||
| float * | min_error_u, | ||
| float * | min_error_v, | ||
| int * | n_inliers_u, | ||
| int * | n_inliers_v | ||
| ) |
Analyze a linear flow field, retrieving information such as divergence, surface roughness, focus of expansion, etc.
| [in] | vectors | The optical flow vectors |
| [in] | count | The number of optical flow vectors |
| [in] | error_threshold | Error used to determine inliers / outliers. |
| [in] | n_iterations | Number of RANSAC iterations. |
| [in] | n_samples | Number of samples used for a single fit (min. 3). |
| [out] | parameters_u* | Parameters of the horizontal flow field |
| [out] | parameters_v* | Parameters of the vertical flow field |
| [out] | fit_error* | Total error of the finally selected fit |
| [out] | min_error_u* | Error fit horizontal flow field |
| [out] | min_error_v* | Error fit vertical flow field |
| [out] | n_inliers_u* | Number of inliers in the horizontal flow fit. |
| [out] | n_inliers_v* | Number of inliers in the vertical flow fit. |
Definition at line 109 of file linear_flow_fit.c.
References A, foo, MAKE_MATRIX_PTR, MAT_MUL, MAT_SUB, MIN_SAMPLES_FIT, n_samples, p, pprz_svd_float(), and pprz_svd_solve_float().
Referenced by analyze_linear_flow_field().
Here is the call graph for this function:
Here is the caller graph for this function: