#include "fvec4.h"
#include <assert.h>
Go to the source code of this file.
Functions | |
void | homography4_from_4pt (const fvec4 x[2], const fvec4 y[2], const fvec4 z[2], const fvec4 w[2], fvec4 cgret[9]) |
computes the 4 homographies sending [0,0] , [0,1], [1,1] and [1,0] to x,y,z and w. | |
void | homography_transform (const float a[2], const float H[3][3], float r[2]) |
void | homography4_transform (const fvec4 a[2], const fvec4 H[3][3], fvec4 r[2]) |
void | homography4_from_4corresp (const fvec4 a[2], const fvec4 b[2], const fvec4 c[2], const fvec4 d[2], const fvec4 x[2], const fvec4 y[2], const fvec4 z[2], const fvec4 w[2], fvec4 R[3][3]) |
static float | rand_range (unsigned long n) |
static fvec4 | rand_range4 (int n) |
static const float * | row (int row, const float *array, int stride) |
static fvec4 | dist2 (const fvec4 a[2], const fvec4 b[2]) |
static float | dist2 (const float a[2], const float b[2]) |
int | ransac_h4 (const float *uv1, int stride1, const float *uv2, int stride2, int n, int maxiter, float dist_threshold, int stop_support, float result[3][3], char *inliers_mask, float *inliers1, float *inliers2) |
High-speed SSE optimised RANSAC to find homographies. |
static float dist2 | ( | const float | a[2], | |
const float | b[2] | |||
) | [inline, static] |
Definition at line 197 of file homography4.cpp.
void homography4_from_4corresp | ( | const fvec4 | a[2], | |
const fvec4 | b[2], | |||
const fvec4 | c[2], | |||
const fvec4 | d[2], | |||
const fvec4 | x[2], | |||
const fvec4 | y[2], | |||
const fvec4 | z[2], | |||
const fvec4 | w[2], | |||
fvec4 | R[3][3] | |||
) |
Definition at line 124 of file homography4.cpp.
References homography4_from_4pt(), and homography4_transform().
Referenced by ransac_h4().
void homography4_from_4pt | ( | const fvec4 | x[2], | |
const fvec4 | y[2], | |||
const fvec4 | z[2], | |||
const fvec4 | w[2], | |||
fvec4 | cgret[9] | |||
) |
computes the 4 homographies sending [0,0] , [0,1], [1,1] and [1,0] to x,y,z and w.
Definition at line 42 of file homography4.cpp.
Referenced by homography4_from_4corresp().
Definition at line 95 of file homography4.cpp.
Referenced by homography4_from_4corresp(), and ransac_h4().
void homography_transform | ( | const float | a[2], | |
const float | H[3][3], | |||
float | r[2] | |||
) | [inline] |
static float rand_range | ( | unsigned long | n | ) | [inline, static] |
Definition at line 180 of file homography4.cpp.
static fvec4 rand_range4 | ( | int | n | ) | [inline, static] |
int ransac_h4 | ( | const float * | uv1, | |
int | stride1, | |||
const float * | uv2, | |||
int | stride2, | |||
int | n, | |||
int | maxiter, | |||
float | dist_threshold, | |||
int | stop_support, | |||
float | result[3][3], | |||
char * | inliers_mask, | |||
float * | inliers1, | |||
float * | inliers2 | |||
) |
High-speed SSE optimised RANSAC to find homographies.
uv1 points to a matrix of coordinates. Coordinate u and v are packed. Adding 'stride1' bytes to uv1 points to the next point. uv2 and stride2 follow the same logic. n is the number of points. maxiter is the maximum number of iterations dist_threshold is a reprojection distrance threshold used to differenciate inliers from outliers inliers_mask is either 0 or a pointer to an array of n chars set to 0xff for inliers and to 0 for outliers. inliers1 and inliers2 are optional pointers to array that will be filled with inlier correspondences.
the function return the number of correspondances supporting the returned homography.
Definition at line 199 of file homography4.cpp.
References dist2(), homography4_from_4corresp(), homography4_transform(), homography_transform(), fvec4::horizontal_max_index(), max(), min(), rand_range4(), and row().
Referenced by vobj_tracker::verify().
static const float* row | ( | int | row, | |
const float * | array, | |||
int | stride | |||
) | [inline, static] |