cv_opticflow
Compute optical flow. Made for Linux video Devices. Computes x and y velocity using optical flow and distance to ground (using sonar). Cannot define CAMERA2 without first defining CAMERA.
OPTICFLOW_ |
||
---|---|---|
Name |
Value |
Description |
AGL_ID |
ABI_BROADCAST |
ABI receive id for ABI message (sonar measurement) (default: ABI_BROADCAST) |
SEND_ABI_ID |
1 |
ABI sender id for opticflow messages (default: 1) |
CAMERA |
bottom_camera|front_camera |
The V4L2 camera device that is used for the calculations |
DEROTATION_CORRECTION_FACTOR_X |
1.0 |
Correction factor for derotation (in x direction), estimated from a fit between the gyro’s rates and the resulting flow (caused by the camera not being exactly in the middle (Defaults are from an ARDrone 2) |
DEROTATION_CORRECTION_FACTOR_Y |
1.0 |
Correction factor for derotation (in y direction), estimated from a fit between the gyro’s rates and the resulting flow (caused by the camera not being exactly in the middle (Defaults are from an ARDrone 2) |
METHOD |
0 |
Method used to calculate optical flow |
WINDOW_SIZE |
10 |
Window size used for block matching (pixels) |
SEARCH_DISTANCE |
10 |
Maximum search distance for blockmatching (pixels) |
SUBPIXEL_FACTOR |
10 |
Amount of subpixels per pixel, used for more precise (subpixel) calculations of the flow |
RESOLUTION_FACTOR |
1000 |
The resolution factor needed to calculate the divergence without floats |
DEROTATION |
1 |
Derotation either turned on or off (depended on gyroscope measurements) |
MEDIAN_FILTER |
0 |
A median filter on the resulting velocities to be turned on or off (last 5 measurements) |
FEATURE_MANAGEMENT |
1 |
Whether to keep already tracked corners in memory for the next frame or re-detect new ones every time |
FPS |
0 |
The (maximum) frequency to run the calculations at. If zero, it will max out at the camera frame rate |
TRACK_BACK |
TRUE |
Whether flow vectors are tracked back to the previous image and only kept if they end up close to the original point. |
SHOW_FLOW |
TRUE |
Whether to draw the flow vectors in the image. |
MAX_TRACK_CORNERS |
25 |
The maximum amount of corners the Lucas Kanade algorithm is tracking between two frames |
MAX_ITERATIONS |
10 |
Maximum number of iterations the Lucas Kanade algorithm should take |
THRESHOLD_VEC |
2 |
Threshold in subpixels when the iterations of Lucas Kanade should stop |
CORNER_METHOD |
1 |
Method used to look for corners, exhaustive FAST (0) or ACT-FAST (1). |
FAST9_ADAPTIVE |
TRUE |
Whether we should use and adapative FAST9 crner detection threshold |
FAST9_THRESHOLD |
20 |
FAST9 default threshold |
FAST9_MIN_DISTANCE |
10 |
The amount of pixels between corners that should be detected |
FAST9_PADDING |
20 |
The outer border in which no corners will be searched |
FAST9_REGION_DETECT |
1 |
Whether to detect fast9 corners in regions of interest or the whole image (only works with feature management) |
FAST9_NUM_REGIONS |
9 |
The number of regions of interest to split the image into |
ACTFAST_LONG_STEP |
10 |
Step size to take when there is no texture |
ACTFAST_SHORT_STEP |
2 |
Step size to take when there is an edge to be followed |
ACTFAST_MIN_GRADIENT |
10 |
Threshold that decides when there is sufficient texture for edge following |
ACTFAST_GRADIENT_METHOD |
1 |
Whether to use a simple (0) or Sobel (1) filter |
CAMERA2 |
bottom_camera|front_camera |
The V4L2 camera device that is used for the calculations |
DEROTATION_CORRECTION_FACTOR_X_CAMERA2 |
1.0 |
Correction factor for derotation (in x direction), estimated from a fit between the gyro’s rates and the resulting flow (caused by the camera not being exactly in the middle (Defaults are from an ARDrone 2) |
DEROTATION_CORRECTION_FACTOR_Y_CAMERA2 |
1.0 |
Correction factor for derotation (in y direction), estimated from a fit between the gyro’s rates and the resulting flow (caused by the camera not being exactly in the middle (Defaults are from an ARDrone 2) |
METHOD_CAMERA2 |
0 |
Method used to calculate optical flow |
WINDOW_SIZE_CAMERA2 |
10 |
Window size used for block matching (pixels) |
SEARCH_DISTANCE_CAMERA2 |
10 |
Maximum search distance for blockmatching (pixels) |
SUBPIXEL_FACTOR_CAMERA2 |
10 |
Amount of subpixels per pixel, used for more precise (subpixel) calculations of the flow |
RESOLUTION_FACTOR_CAMERA2 |
1000 |
The resolution factor needed to calculate the divergence without floats |
DEROTATION_CAMERA2 |
1 |
Derotation either turned on or off (depended on gyroscope measurements) |
MEDIAN_FILTER_CAMERA2 |
0 |
A median filter on the resulting velocities to be turned on or off (last 5 measurements) |
FEATURE_MANAGEMENT_CAMERA2 |
1 |
Whether to keep already tracked corners in memory for the next frame or re-detect new ones every time |
FPS_CAMERA2 |
0 |
The (maximum) frequency to run the calculations at. If zero, it will max out at the camera frame rate |
TRACK_BACK_CAMERA2 |
TRUE |
Whether flow vectors are tracked back to the previous image and only kept if they end up close to the original point. |
SHOW_FLOW_CAMERA2 |
TRUE |
Whether to draw the flow vectors in the image. |
MAX_TRACK_CORNERS_CAMERA2 |
25 |
The maximum amount of corners the Lucas Kanade algorithm is tracking between two frames |
MAX_ITERATIONS_CAMERA2 |
10 |
Maximum number of iterations the Lucas Kanade algorithm should take |
THRESHOLD_VEC_CAMERA2 |
2 |
Threshold in subpixels when the iterations of Lucas Kanade should stop |
CORNER_METHOD_CAMERA2 |
1 |
Method used to look for corners, exhaustive FAST (0) or ACT-FAST (1). |
FAST9_ADAPTIVE_CAMERA2 |
TRUE |
Whether we should use and adapative FAST9 crner detection threshold |
FAST9_THRESHOLD_CAMERA2 |
20 |
FAST9 default threshold |
FAST9_MIN_DISTANCE_CAMERA2 |
10 |
The amount of pixels between corners that should be detected |
FAST9_PADDING_CAMERA2 |
20 |
The outer border in which no corners will be searched |
FAST9_REGION_DETECT_CAMERA2 |
1 |
Whether to detect fast9 corners in regions of interest or the whole image (only works with feature management) |
FAST9_NUM_REGIONS_CAMERA2 |
9 |
The number of regions of interest to split the image into |
ACTFAST_LONG_STEP_CAMERA2 |
10 |
Step size to take when there is no texture |
ACTFAST_SHORT_STEP_CAMERA2 |
2 |
Step size to take when there is an edge to be followed |
ACTFAST_MIN_GRADIENT_CAMERA2 |
10 |
Threshold that decides when there is sufficient texture for edge following |
ACTFAST_GRADIENT_METHOD_CAMERA2 |
1 |
Whether to use a simple (0) or Sobel (1) filter |
Depends
- video_thread
- agl_dist
- pose_history
Provides
- velocity