|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
32 #ifndef OPTICFLOW_CALCULATOR_H
33 #define OPTICFLOW_CALCULATOR_H
86 #define FAST9_MAX_CORNERS 512
98 float *measurement_noise,
float process_noise,
bool reinitialize_kalman);
bool opticflow_calc_frame(struct opticflow_t *opticflow, struct image_t *img, struct opticflow_result_t *result)
Run the optical flow on a new image frame.
bool feature_management
Decides whether to keep track corners in memory for the next frame instead of re-detecting every time...
struct point_t * fast9_ret_corners
Corners.
uint8_t max_iterations
The maximum amount of iterations the Lucas Kanade algorithm should do.
Inter-thread data structures.
uint8_t fast9_num_regions
The number of regions of interest the image is split into.
float derotation_correction_factor_y
Correction factor for derotation in Y axis, determined from a fit from the gyros and flow rotation....
uint16_t fast9_rsize
Amount of corners allocated.
uint16_t fast9_min_distance
Minimum distance in pixels between corners.
struct image_t img_gray
Current gray image frame.
uint16_t max_track_corners
Maximum amount of corners Lucas Kanade should track.
uint16_t window_size
Window size for the blockmatching algorithm (general value for all methods)
bool derotation
Derotation switched on or off (depended on the quality of the gyroscope measurement)
struct image_t prev_img_gray
Previous gray image frame.
uint16_t fast9_padding
Padding used in FAST9 detector.
float actfast_short_step
Step size to take when there is an edge to be followed.
float derotation_correction_factor_x
Correction factor for derotation in x axis, determined from a fit from the gyros and flow rotation....
uint8_t corner_method
Method to use for determining where the corners are.
bool fast9_region_detect
Decides whether to detect fast9 corners in specific regions of interest or the whole image (only for ...
int actfast_gradient_method
Whether to use a simple or Sobel filter.
uint8_t pyramid_level
Number of pyramid levels used in Lucas Kanade algorithm (0 == no pyramids used)
uint16_t subpixel_factor
The amount of subpixels per pixel.
void kalman_filter_opticflow_velocity(float *velocity_x, float *velocity_y, float *acceleration_measurement, float fps, float *measurement_noise, float process_noise, bool reinitialize_kalman)
bool got_first_img
If we got a image to work with.
bool median_filter
Decides to use a median filter on the velocity.
bool fast9_adaptive
Whether the FAST9 threshold should be adaptive.
void opticflow_calc_init(struct opticflow_t opticflow[])
Initialize the opticflow calculator.
uint8_t fast9_threshold
FAST9 corner detection threshold.
float actfast_long_step
Step size to take when there is no texture.
bool track_back
Whether to track flow vectors back to the previous image, in order to check if the back-tracked flow ...
bool calc_fast9_lukas_kanade(struct opticflow_t *opticflow, struct image_t *img, struct opticflow_result_t *result)
Run the optical flow with fast9 and lukaskanade on a new image frame.
bool just_switched_method
Boolean to check if methods has been switched (for reinitialization)
int actfast_min_gradient
Threshold that decides when there is sufficient texture for edge following.
uint16_t resolution_factor
The resolution in EdgeFlow to determine the Divergence.
bool calc_edgeflow_tot(struct opticflow_t *opticflow, struct image_t *img, struct opticflow_result_t *result)
Run the optical flow with EDGEFLOW on a new image frame.
struct opticflow_t opticflow[ACTIVE_CAMERAS]
Opticflow calculations.
uint8_t method
Method to use to calculate the optical flow.
uint8_t threshold_vec
The threshold in x, y subpixels which the algorithm should stop.
bool show_flow
Whether to draw the flow vectors on the image. Watch out! This changes the image as will be received ...
const struct video_config_t * camera
uint16_t search_distance
Search distance for blockmatching alg.