2 #ifndef _STAGES_VISION_MATH_INCLUDE_
3 #define _STAGES_VISION_MATH_INCLUDE_
5 #include <Maths/maths.h>
6 #include <Maths/matrices.h>
9 * @fn Compute the matrix of uav pose in space
10 * @param float32_t theta : euler angle
11 * @param float32_t phi : euler angle
12 * @param float32_t psi : euler angle
17 euler_matrix(float32_t theta, float32_t phi, float32_t psi, matrix33_t *mat);
19 horizontal_frame_euler_matrix(float32_t theta, float32_t phi, float32_t psi, matrix33_t *mat);
21 vertical_frame_euler_matrix(float32_t theta, float32_t phi, float32_t psi, matrix33_t *mat);
23 max_euler_matrix(float32_t theta, float32_t phi, float32_t psi, matrix33_t *mat);
26 * @fn Compute the matrix of uav pose in space R_euler*Rc, in camera basis
27 * @param float32_t theta : euler angle
28 * @param float32_t phi : euler angle
29 * @param float32_t psi : euler angle
34 frame_euler_matrix(float32_t theta, float32_t phi, float32_t psi, matrix33_t *mat);
37 frame_euler_angles(vector31_t *angles, matrix33_t *R);
39 horizontal_frame_euler_angles(vector31_t *angles, matrix33_t *R);
42 * @fn Compute the matrix which projects points from frame (t-1) to frame (t) : tr(Rc)*Rot*Rc
43 * @param float32_t delta_theta : integrated gyro in theta
44 * @param float32_t delta_phi : integrated gyro in phi
45 * @param float32_t delta_psi : integrated gyro in psi
46 * @param matrix *matproj
50 integrated_gyros_matrix(float32_t delta_theta, float32_t delta_phi, float32_t delta_psi, matrix33_t *matproj);
53 * @fn compute projection of a point on a plane
54 * @param int x : first coordinate
55 * @param int y : second coordinate
56 * @param int centerx : first coordinate of the image center
57 * @param int centery : second coordinate of the image center
58 * @param matrix mat : projection matrix
59 * @param float *u : first coordinate of result
60 * @param float *v : second coordinate of result
64 proj_point(screen_point_t *point, screen_point_t *center, matrix33_t *mat, vector21_t *out);
67 proj_pointf(vector21_t *point, screen_point_t *center, matrix33_t *mat, vector21_t *out);
70 vision_direction_result(vector21_t *t, screen_point_t *v, int32_t threshold);
73 #endif // ! _STAGES_VISION_MATH_INCLUDE_