cv_detect_gate
Detects gates as used in the IROS drone races, i.e., square colored gates. It does so with snake gate detection, a computationally efficient method that works onboard of the computationally constrained Parrot Bebop 1/2 drones. An initial version of this algorithm ran in the drone race 2016. The algorithm was first described in: First autonomous multi-room exploration with an insect-inspired flapping wing vehicle, May 2018, IEEE International Conference on Robotics and Automation (ICRA 2018), Brisbane, Australia by Kirk Scheper, Matej Karasek, Christophe De Wagter, Bart Remes, and Guido de Croon https://www.researchgate.net/publication/327228053_First_autonomous_multi-room_exploration_with_an_insect-inspired_flapping_wing_vehicle For the drone race, the algorithm and performance are described in more detail in: Autonomous drone race: A novel vision-based navigation and control strategy, S.Li, M.M.O.I. Ozo, C. De Wagter, G.C.H.E. de Croon. Submitted.
Name |
Value |
Description |
---|---|---|
DETECT_GATE_FPS |
0 |
The (maximum) frequency to run the calculations at. If zero, it will max out at the camera frame rate. |
DETECT_GATE_CAMERA |
bottom_camera|front_camera |
The V4L2 camera device that is used for the calculations. |
DETECT_GATE_JUST_FILTER |
FALSE|TRUE |
Just run a color filter. |
DETECT_GATE_N_SAMPLES |
10000 |
The number of samples taken in an image for snake gate detection. This number is proportional to the computatinoal effort (more = slower) and the performance (more = better). |
DETECT_GATE_MIN_PIX_SIZE |
30 |
The minimal size the sides of an initial (square) detection should have for further processing. |
DETECT_GATE_MIN_GATE_QUALITY |
0.15 |
Gate quality is checked by verifying the proportion of colored pixels on the gate outline. This is the minimal proportion of colored pixels in order to accept a gate candidate. |
DETECT_GATE_MIN_N_SIDES |
3 |
How many sides of the gate should have the minimal line quality (min = 0, max = 4). |
DETECT_GATE_GATE_THICKNESS |
0.0 |
Snaking goes up and down, and then left and right from the extreme points. If the gate is thick, it is better to start a little bit before the end point. This value is how thick the gate border is as a proportion of the total size. |
DETECT_GATE_Y_MIN |
20 |
Minimal Y of the color filter. |
DETECT_GATE_Y_MAX |
228 |
Maximal Y of the color filter. |
DETECT_GATE_U_MIN |
42 |
Minimal U of the color filter. |
DETECT_GATE_U_MAX |
121 |
Maximal U of the color filter. |
DETECT_GATE_V_MIN |
134 |
Minimal V of the color filter. |
DETECT_GATE_V_MAX |
230 |
Maximal V of the color filter. |
DETECT_GATE_EXCLUDE_PIXELS_TOP |
0 |
Band on top of the image in which we do not take snake gate samples. |
DETECT_GATE_EXCLUDE_PIXELS_BOTTOM |
0 |
Band at the bottom of the image in which we do not take snake gate samples. |
DETECT_GATE_SIMPLIFIED_PNP |
0 |
When set to 0, the full PnP will fit all corners. When set to 1, a simple camera model will be used. |
CAMERA_ROTATED_90DEG_RIGHT |
FALSE |
If the camera does not have its longest side as horizontal, then the rotated define should be enabled. |
Depends
- video_thread