29#include "../../opticflow/opticflow_calculator.h"
30#include "generated/airframe.h"
35#define MAX_AGENTS FAST9_MAX_CORNERS
36#ifdef OPTICFLOW_CAMERA2
37#define FAST9_MAX_CAMERAS 2
39#define FAST9_MAX_CAMERAS 1
98 px = ((
float)(
rand() % 10000) + 1) / 10000.0f;
99 py = ((
float)(
rand() % 10000) + 1) / 10000.0f;
135 int gradient = (
abs(dx) +
abs(dy)) / 2;
168 if (
agents[camera_id][a].active) {
179 if (!
agents[camera_id][a].active) {
struct agent_t agents[FAST9_MAX_CAMERAS][MAX_AGENTS]
#define FAST9_MAX_CAMERAS
void act_fast(struct image_t *img, uint8_t fast_threshold, uint16_t *num_corners, struct point_t **ret_corners, uint16_t n_agents, uint16_t n_time_steps, float long_step, float short_step, int min_gradient, int gradient_method, int camera_id)
Do an ACT-FAST corner detection.
Finds corners in an image by actively scanning the image.
int fast9_detect_pixel(struct image_t *img, uint8_t threshold, uint16_t x, uint16_t y)
Do a FAST9 corner detection for a single pixel.
void image_gradient_pixel(struct image_t *img, struct point_t *loc, int method, int *dx, int *dy)
Get the gradient at a pixel location.
Image helper functions like resizing, color filter, converters...
uint32_t x
The x coordinate of the point.
uint32_t y
The y coordinate of the point.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.