|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
82 int overlap_intervals(
int val_low_1,
int val_high_1,
int val_low_2,
int val_high_2);
83 int intersection_boxes(
int x_box_1[4],
int y_box_1[4],
int x_box_2[4],
int y_box_2[4]);
int y
The image y coordinate of the gate center.
int x
The image x coordinate of the gate center.
struct gate_img gates_c[MAX_GATES]
float quality
gate quality
int x_corners[4]
Array of corner x coordinates.
int overlap_intervals(int val_low_1, int val_high_1, int val_low_2, int val_high_2)
int n_sides
How many sides are orange (to prevent detecting a small gate in the corner of a big one partially out...
void draw_gate(struct image_t *im, struct gate_img gate)
Draw the gate on an image.
void draw_gate_color_polygon(struct image_t *im, struct gate_img gate, uint8_t *color)
Draw the gate on an image, using the corner points, possibly resulting in a polygon.
void draw_gate_color_square(struct image_t *im, struct gate_img gate, uint8_t *color)
Draw the gate on an image, using only the center coordinate and sizes - resulting in a square gate.
struct gate_img best_gate
int sz
Half the image size of the gate.
Paparazzi floating point algebra.
float check_inside(struct image_t *im, int x, int y, int sz, int n_samples_in)
void snake_left_and_right(struct image_t *im, int x, int y, int *x_low, int *y_low, int *x_high, int *y_high)
The actual snaking.
void check_line(struct image_t *im, struct point_t Q1, struct point_t Q2, int *n_points, int *n_colored_points)
Checks whether points on a line between two 2D-points are of a given color.
void snake_up_and_down(struct image_t *im, int x, int y, int *x_low, int *y_low, int *x_high, int *y_high)
The actual snaking.
int snake_gate_detection(struct image_t *img, int n_samples, int min_px_size, float min_gate_quality, float gate_thickness, int min_n_sides, uint8_t color_Ym, uint8_t color_YM, uint8_t color_Um, uint8_t color_UM, uint8_t color_Vm, uint8_t color_VM, struct gate_img *best_gate, struct gate_img *gates_c, int *n_gates, int exclude_top, int exclude_bottom)
Run snake gate detection on an image.
int intersection_boxes(int x_box_1[4], int y_box_1[4], int x_box_2[4], int y_box_2[4])
float intersection_over_union(int x_box_1[4], int y_box_1[4], int x_box_2[4], int y_box_2[4])
void set_gate_points(struct gate_img *gate)
Determine and set the corner locations in gate.x_corners, g.y_corners, based on the center of the gat...
float sz_left
Half the image size of the left side.
int check_color_snake_gate_detection(struct image_t *im, int x, int y)
void check_gate_outline(struct image_t *im, struct gate_img gate, float *quality, int *n_sides)
Check only the outline of the gate.
float sz_right
Half the image size of the right side.
Paparazzi generic algebra macros.
void gate_refine_corners(struct image_t *color_image, int *x_points, int *y_points, int size)
Refine the four corners of the gate, based on the color around the supposed corner locations.
void check_gate_initial(struct image_t *im, struct gate_img gate, float *quality, int *sides)
Check the outline and the center of the gate.
int y_corners[4]
Array of corner y coordinates.
void refine_single_corner(struct image_t *im, int *corner_x, int *corner_y, int size, float size_factor)
Refine a single corner, based on the color around the coordinate.