36 #ifndef LINEAR_FLOW_FIT
37 #define LINEAR_FLOW_FIT
65 float *parameters_u,
float *parameters_v,
float *fit_error,
float *min_error_u,
float *min_error_v,
int *n_inliers_u,
Image helper functions like resizing, color filter, converters...
float slope_x
Slope of the surface in x-direction - given sufficient lateral motion.
float divergence
Basically, relative_velocity_z. Actual divergence of a 2D flow field is 2 * relative_velocity_z.
int n_inliers_v
Number of inliers in the vertical flow fit.
float rotation_Z
Rotation around the Z axis.
float slope_y
Slope of the surface in y-direction - given sufficient lateral motion.
float focus_of_expansion_x
Image x-coordinate of the focus of expansion (contraction)
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,...
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,...
float time_to_contact
Basically, 1 / relative_velocity_z.
float relative_velocity_x
Relative velocity in x-direction, i.e., vx / z, where z is the depth in direction of the camera's pri...
int n_inliers_u
Number of inliers in the horizontal flow fit.
float rotation_X
Rotation around the X 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 pri...
float surface_roughness
The error of the linear fit is a measure of surface roughness.
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,...
float focus_of_expansion_y
Image y-coordinate of the focus of expansion (contraction)
float relative_velocity_y
Relative velocity in y-direction, i.e., vy / z, where z is the depth in direction of the camera's pri...
float fit_error
Error of the fit (same as surface roughness)
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.
float rotation_Y
Rotation around the Y axis.