29 #ifndef OPTICFLOW_CALCULATOR_H
30 #define OPTICFLOW_CALCULATOR_H
uint16_t fast9_min_distance
Minimum distance in pixels between corners.
uint8_t max_iterations
The maximum amount of iterations the Lucas Kanade algorithm should do.
struct opticflow_t opticflow
Opticflow calculations.
uint16_t window_size
Window size of the Lucas Kanade calculation (needs to be even)
Capture images from a V4L2 device (Video for Linux 2)
float prev_phi
Phi from the previous image frame.
Inter-thread data structures.
uint8_t threshold_vec
The threshold in x, y subpixels which the algorithm should stop.
uint8_t max_track_corners
Maximum amount of corners Lucas Kanade should track.
void opticflow_calc_init(struct opticflow_t *opticflow, uint16_t w, uint16_t h)
Initialize the opticflow calculator.
Image helper functions like resizing, color filter, converters...
bool_t got_first_img
If we got a image to work with.
struct timeval prev_timestamp
Timestamp of the previous frame, used for FPS calculation.
struct image_t prev_img_gray
Previous gray image frame.
void opticflow_calc_frame(struct opticflow_t *opticflow, struct opticflow_state_t *state, struct image_t *img, struct opticflow_result_t *result)
Run the optical flow on a new image frame.
uint8_t fast9_threshold
FAST9 corner detection threshold.
bool_t fast9_adaptive
Whether the FAST9 threshold should be adaptive.
struct image_t img_gray
Current gray image frame.
uint8_t subpixel_factor
The amount of subpixels per pixel.
float prev_theta
Theta from the previous image frame.