Lambda Twist P3P solver.
More...
#include "cubic.h"
#include "quadratic.h"
#include "eig3x3known0.h"
#include "refine_lambda.h"
#include "mat.h"
#include "vec.h"
#include <math.h>
#include <string.h>
Go to the source code of this file.
|
| #define | MIX(n, m) |
| |
|
#define | VEC3_DOT(x, y) (x[0] * y[0] + x[1] * y[1] + x[2] * y[2]) |
| |
|
#define | VEC3_SCALE(a, x) {a * x[0], a * x[1], a * x[2]} |
| |
|
#define | VEC3_SUB(x, y) {x[0] - y[0], x[1] - y[1], x[2] - y[2]} |
| |
| #define | COMPUTE_LAMBDA(tau) |
| |
|
|
static int | lambdatwist_p3p (const double *iny1, const double *iny2, const double *iny3, const double *x1, const double *x2, const double *x3, double(*R)[9], double(*t)[3]) |
| |
◆ COMPUTE_LAMBDA
| #define COMPUTE_LAMBDA |
( |
|
tau | ) |
|
Value: if ((tau) > 0.0) \
do { \
\
const double tmp = (tau) * (-2.0 * b23 + (tau)) + 1.0; \
const double l2 = sqrt(a23 /
tmp); \
\
const double l3 = (tau) * l2; \
\
const double l1 = w0 * l2 + w1 * l3; \
if (l1 > 0.0) { \
L[k][0] = l1; \
L[k][1] = l2; \
L[k][2] = l3; \
k++; \
} \
} while (0)
Definition comp_scratch.c:130
◆ MIX
Value: {n[0], m[0], n[1] * m[2] - n[2] * m[1], n[1], m[1], n[2] * m[0] - n[0] * m[2], \
n[2], m[2], n[0] * m[1] - n[1] * m[0]}