This class provides functions determining the camera's pose by a set of four 3D object and 2D image points.
More...
|
static bool | calculatePointDistances (const Vector3 *objectPoints, const Vector3 *imageRays, Scalar distances[4]) |
| Calculates four distances between camera center and the four 3D object points. More...
|
|
template<typename T > |
static bool | calculateCosineSolutions (const T x1, const T x1_2, const T cos12, const T d12_2, T &x2a, T &x2b) |
| Calculates the two possible solutions for the law of cosines. More...
|
|
template<typename T > |
static T | calculateCosineResults (const T x1, const T x1_2, const T x2, const T x2_2, const T cos12, const T d12_2) |
| Returns the result of the law of cosines. More...
|
|
This class provides functions determining the camera's pose by a set of four 3D object and 2D image points.
◆ calculatePointDistances()
static bool Ocean::Geometry::P4P::calculatePointDistances |
( |
const Vector3 * |
objectPoints, |
|
|
const Vector3 * |
imageRays, |
|
|
Scalar |
distances[4] |
|
) |
| |
|
staticprotected |
Calculates four distances between camera center and the four 3D object points.
- Parameters
-
objectPoints | Four object points, must be valid |
imageRays | Three 3D rays with unit length, defined in the coordinate system of the camera, starting at the camera's center of projection (equal to the origin), hitting the image plane at image points corresponding to the 3D object points and pointing towards the object points, each ray corresponds to one 3D object point, must be valid |
distances | The four resulting distances between camera center and each of the four object points |
- Returns
- True, if succeeded
◆ pose()
Calculates the pose of a camera by a set of four image and object points.
- Parameters
-
camera | The camera profile defining the projection, must be valid |
objectPoints | Four 3D object points, defined in world, must be valid |
imagePoints | Four 2D image points, one for each 3D object point, must be valid |
world_T_camera | Resulting camera pose, with default camera pointing towards the negative z-space, with y-axis upwards |
- Returns
- True, if succeeded
The documentation for this class was generated from the following file: