Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
act_fast.h File Reference

Finds corners in an image by actively scanning the image. More...

#include "std.h"
#include "lib/vision/image.h"
+ Include dependency graph for act_fast.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  agent_t
 

Functions

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)
 Do an ACT-FAST corner detection. More...
 

Detailed Description

Finds corners in an image by actively scanning the image.

This method is inspired by the work in: de Croon, G.C.H.E., and Nolfi, S. (2013, May). Act-corner: Active corner finding for optic flow determination. In Robotics and Automation (ICRA), 2013 IEEE International Conference on (pp. 4679-4684). IEEE.

The main idea of this particular implementation, called ACT-FAST, is that actively scanning the image allows to:

  1. Skip uniform areas in the image. If these areas are contiguous, many non-corners will never be evaluated.
  2. Follow edges. Typically, following an edge will bring an agent to a corner. These two simple rules lead to a significant lower number of corner evaluations, while still detecting a reasonable number of corners. Moreover, since the agents scanning the image start on a grid, corners will be quite well-distributed over the image. Each step of the agent starts by classifying the agent location as a corner or not with FAST.

For bigger images (e.g., 640 x 640), the computational advantage of ACT-FAST over the normal, exhaustive application of FAST becomes significant (in the order of a factor > 10).

The code here is part of the following publication: de Croon, G.C.H.E. "ACT-FAST: efficiently finding corners by actively exploring images.", in submission.

Definition in file act_fast.h.


Data Structure Documentation

struct agent_t

Definition at line 28 of file act_fast.h.

Data Fields
int active
float preferred_dir_x
float preferred_dir_y
float x
float y

Function Documentation

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 
)

Do an ACT-FAST corner detection.

Parameters
[in]*imgThe image to do the corner detection on
[in]thresholdThe threshold which we use for FAST9
[in]*num_cornersreference to the amount of corners found, set by this function
[in]**ret_cornerspointer to the array which contains the corners that were detected.
[in]n_agentsThe number of agents that will scan the image for corners
[in]n_time_stepsThe maximum number of time steps allowed for scanning
[in]long_stepWhen there is not enough texture, the agent will take a long step to a next point of this length in pixels
[in]short_stepWhen there is texture, the agent will follow the edge with this short step in pixels
[in]min_gradientThe minimum gradient, in order to determine when to take a long or short step
[in]gradient_method0 = simple {-1, 0, 1}, 1 = Sobel {-1,0,1,-2,0,2,-1,0,1}

Definition at line 48 of file act_fast.c.

References agent_t::active, agents, fast9_detect_pixel(), image_t::h, image_gradient_pixel(), MAX_AGENTS, n_agents, n_time_steps, agent_t::preferred_dir_x, agent_t::preferred_dir_y, image_t::w, agent_t::x, point_t::x, agent_t::y, and point_t::y.

Referenced by calc_fast9_lukas_kanade().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: