124 for (c = -1; c <= 1; c += 2) {
143 for (c = -1; c <= 1; c += 2) {
202 for (c = -
D; c <=
D; c++) {
204 for (r = -W; r <= W; r++) {
226 for (i = 1; i < n; i++) {
308 for (i = 1; i <
img->w - 1; i++) {
342 for (i = 1; i < size + 1; i ++) {
uint32_t getMinimum(uint32_t *a, uint32_t n)
Calculate minimum of an array.
uint32_t getAmountPeaks(int32_t *edgehist, int32_t thres, int32_t size)
getAmountPeaks, calculates the amount of peaks in a edge histogram
void calculate_edge_displacement(int32_t *edge_histogram, int32_t *edge_histogram_prev, int32_t *displacement, uint16_t size, uint8_t window, uint8_t disp_range, int32_t der_shift)
Calculate_displacement calculates the displacement between two histograms.
void draw_edgeflow_img(struct image_t *img, struct edge_flow_t edgeflow, int32_t *edge_hist_x_prev, int32_t *edge_hist_x)
Draws edgehistogram, displacement and linefit directly on the image for debugging (only for edgeflow ...
void calculate_edge_histogram(struct image_t *img, int32_t edge_histogram[], char direction, uint16_t edge_threshold)
Calculate a edge/gradient histogram for each dimension of the image.
void line_fit(int32_t *displacement, int32_t *divergence, int32_t *flow, uint32_t size, uint32_t border, uint16_t RES)
Fits a linear model to an array with pixel displacements with least squares.
void calc_previous_frame_nr(struct opticflow_result_t *result, struct opticflow_t *opticflow, uint8_t current_frame_nr, uint8_t *previous_frame_offset, uint8_t *previous_frame_nr)
Calc_previous_frame_nr; adaptive Time Horizon.
calculate optical flow with EdgeFlow
void image_draw_line(struct image_t *img, struct point_t *from, struct point_t *to)
Draw a pink line on the image.
uint32_t y
The y coordinate of the point.
@ IMAGE_GRAYSCALE
Grayscale image with only the Y part (uint8 per pixel)
@ IMAGE_YUV422
UYVY format (uint16 per pixel)
int16_t flow_x
Flow in x direction from the camera (in subpixels) with X positive to the right.
int16_t flow_y
Flow in y direction from the camera (in subpixels) with Y positive to the bottom.
uint16_t search_distance
Search distance for blockmatching alg.
struct opticflow_t opticflow[ACTIVE_CAMERAS]
Opticflow calculations.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.