-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linear optical flow fit #1332
Linear optical flow fit #1332
Conversation
*/ | ||
|
||
/* | ||
* @file paparazzi/sw/ext/ardrone2_vision/cv/opticflow/optic_flow_gdc.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check that doxygen paths like this are correct....
could you please try to conform to the paparazzi coding style (i.e. use two spaces for indent)... |
* @param[out] focus_of_expansion_y* Image y-coordinate of the focus of expansion (contraction). | ||
*/ | ||
|
||
void extract_information_from_parameters(float* parameters_u, float* parameters_v, int im_width, int im_height, float *relative_velocity_x, float *relative_velocity_y, float *relative_velocity_z, float *slope_x, float *slope_y, float *focus_of_expansion_x, float *focus_of_expansion_y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to pass "in" parameters as pointers?
Seems to me that it would make sense to put quite a few of the variables in a struct instead of passing over 20 arguments.... |
#define FIT 1 | ||
|
||
/** | ||
* Analyze a linear flow field, retrieving information such as divergence, surface roughness, focus of expansion, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really a lot of arguments, but nicely documented :-)
Incorporated all comments. |
Thx, looks much nicer now :-) |
A function is added that estimates a linear flow fit, which provides information on relative velocities (including divergence / time-to-contact), surface slope, and surface roughness. The relative velocities can be used for velocity control and landing, while the surface slope and roughness can be used for selecting a suitable landing site.