Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

guidoAI
Copy link
Contributor

@guidoAI guidoAI commented Sep 4, 2015

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.

*/

/*
* @file paparazzi/sw/ext/ardrone2_vision/cv/opticflow/optic_flow_gdc.c
Copy link
Member

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....

@flixr
Copy link
Member

flixr commented Sep 4, 2015

could you please try to conform to the paparazzi coding style (i.e. use two spaces for indent)...
you can e.g. run it through ./fix_code_style.sh file

* @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)
Copy link
Member

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?

@flixr
Copy link
Member

flixr commented Sep 4, 2015

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.
Copy link
Member

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 :-)

@guidoAI
Copy link
Contributor Author

guidoAI commented Sep 7, 2015

Incorporated all comments.

@flixr
Copy link
Member

flixr commented Sep 7, 2015

Thx, looks much nicer now :-)
Of course you can more succinctly write info->foo instead of (*info).foo, but it looks good to merge to me...

@flixr flixr closed this in c0aac29 Sep 7, 2015
@flixr flixr added the Module label Nov 22, 2015
@flixr flixr added this to the v5.8 milestone Nov 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants