This class implements fisheye epipolar geometry functionality.
More...
#include <FisheyeEpipolarGeometry.h>
|
| | FisheyeEpipolarGeometry ()=default |
| | Default constructor creating an invalid epipolar geometry object.
|
| |
| | FisheyeEpipolarGeometry (const SharedAnyCamera &camera0, const SharedAnyCamera &camera1, const HomogenousMatrix4 &camera0_T_camera1) |
| | Creates a new fisheye epipolar geometry object.
|
| |
| bool | isValid () const |
| | Returns whether this epipolar geometry object is valid.
|
| |
| bool | updateCameras (const SharedAnyCamera &camera0, const SharedAnyCamera &camera1, const HomogenousMatrix4 &camera0_T_camera1) |
| | Updates the cameras and transformation of this epipolar geometry object.
|
| |
| bool | epipolarLine (const Vector2 &sourcePointFisheye, Vectors2 &fisheyeEpipolarLineSegments, const CameraIdentifier sourceCameraIdentifier=CI_CAMERA0, const Scalar lineStep=Scalar(70), const size_t maxNumberLineSegments=100u) const |
| | Computes the epipolar line in the target camera corresponding to a point in the source camera.
|
| |
| bool | isOnEpipolarLine (const CameraIdentifier sourceCameraIdentifier, const Vector2 &sourcePointFisheye, const Vector2 &targetPointFisheye, const Scalar maxDistance=Scalar(2)) const |
| | Determines whether a target point lies on the epipolar line corresponding to a source point.
|
| |
| Scalar | squareDistanceToEpipolarLine (const CameraIdentifier sourceCameraIdentifier, const Vector2 &sourcePointFisheye, const Vector2 &targetPointFisheye) const |
| | Computes the squared distance from a target point to the epipolar line corresponding to a source point.
|
| |
This class implements fisheye epipolar geometry functionality.
◆ EpipolarLine
Definition of an epipolar line as a vector of 2D points.
◆ EpipolarLines
Definition of a vector holding epipolar lines.
◆ CameraIdentifier
Definition of camera identifiers.
| Enumerator |
|---|
| CI_CAMERA0 | Camera 0.
|
| CI_CAMERA1 | Camera 1.
|
◆ FisheyeEpipolarGeometry() [1/2]
| Ocean::Geometry::FisheyeEpipolarGeometry::FisheyeEpipolarGeometry |
( |
| ) |
|
|
default |
Default constructor creating an invalid epipolar geometry object.
◆ FisheyeEpipolarGeometry() [2/2]
Creates a new fisheye epipolar geometry object.
- Parameters
-
| camera0 | The first camera, must be valid |
| camera1 | The second camera, must be valid |
| camera0_T_camera1 | The transformation from camera 1 to camera 0, must be valid |
◆ epipolarLine() [1/2]
| bool Ocean::Geometry::FisheyeEpipolarGeometry::epipolarLine |
( |
const CameraIdentifier |
sourceCameraIdentifier, |
|
|
const Vector2 & |
sourcePointFisheye, |
|
|
Line2 & |
epipolarLinePinhole |
|
) |
| const |
|
protected |
Computes the epipolar line in the target camera corresponding to a point in the source camera (in pinhole space).
- Parameters
-
| sourceCameraIdentifier | The identifier of the source camera, either CI_CAMERA0 or CI_CAMERA1 |
| sourcePointFisheye | The point in the source camera (fisheye space), with range [0, sourceCamera.width())x[0, sourceCamera.height()) |
| epipolarLinePinhole | The resulting epipolar line in the target camera (pinhole space) |
- Returns
- True, if succeeded
◆ epipolarLine() [2/2]
Computes the epipolar line in the target camera corresponding to a point in the source camera.
- Parameters
-
| sourcePointFisheye | The point in the source camera, with range [0, sourceCamera.width())x[0, sourceCamera.height()) |
| fisheyeEpipolarLineSegments | The resulting epipolar line in the target camera as a sequence of connected points |
| sourceCameraIdentifier | The identifier of the source camera, either CI_CAMERA0 or CI_CAMERA1 |
| lineStep | The step size along the epipolar line, in pixels, with range (0, infinity) |
| maxNumberLineSegments | The maximum number of line segments to compute, with range [1, infinity) |
- Returns
- True, if succeeded
◆ isOnEpipolarLine()
| bool Ocean::Geometry::FisheyeEpipolarGeometry::isOnEpipolarLine |
( |
const CameraIdentifier |
sourceCameraIdentifier, |
|
|
const Vector2 & |
sourcePointFisheye, |
|
|
const Vector2 & |
targetPointFisheye, |
|
|
const Scalar |
maxDistance = Scalar(2) |
|
) |
| const |
Determines whether a target point lies on the epipolar line corresponding to a source point.
- Parameters
-
| sourceCameraIdentifier | The identifier of the source camera, either CI_CAMERA0 or CI_CAMERA1 |
| sourcePointFisheye | The point in the source camera, with range [0, sourceCamera.width())x[0, sourceCamera.height()) |
| targetPointFisheye | The point in the target camera to check, with range [0, targetCamera.width())x[0, targetCamera.height()) |
| maxDistance | The maximum allowed distance from the epipolar line, in pixels, with range [0, infinity) |
- Returns
- True, if the target point lies on the epipolar line
◆ isValid()
| bool Ocean::Geometry::FisheyeEpipolarGeometry::isValid |
( |
| ) |
const |
Returns whether this epipolar geometry object is valid.
- Returns
- True, if so
◆ reprojectPoint()
| Vector2 Ocean::Geometry::FisheyeEpipolarGeometry::reprojectPoint |
( |
const AnyCamera & |
sourceCamera, |
|
|
const AnyCamera & |
targetCamera, |
|
|
const Vector2 & |
sourcePoint |
|
) |
| const |
|
protected |
Reprojects a point from one camera to another.
- Parameters
-
| sourceCamera | The source camera, must be valid |
| targetCamera | The target camera, must be valid |
| sourcePoint | The point in the source camera |
- Returns
- The reprojected point in the target camera
◆ squareDistanceToEpipolarLine()
| Scalar Ocean::Geometry::FisheyeEpipolarGeometry::squareDistanceToEpipolarLine |
( |
const CameraIdentifier |
sourceCameraIdentifier, |
|
|
const Vector2 & |
sourcePointFisheye, |
|
|
const Vector2 & |
targetPointFisheye |
|
) |
| const |
Computes the squared distance from a target point to the epipolar line corresponding to a source point.
- Parameters
-
| sourceCameraIdentifier | The identifier of the source camera, either CI_CAMERA0 or CI_CAMERA1 |
| sourcePointFisheye | The point in the source camera, with range [0, sourceCamera.width())x[0, sourceCamera.height()) |
| targetPointFisheye | The point in the target camera, with range [0, targetCamera.width())x[0, targetCamera.height()) |
- Returns
- The squared distance from the target point to the epipolar line, in pixels^2, with range [0, infinity), or -1 if the computation fails
◆ updateCameras()
Updates the cameras and transformation of this epipolar geometry object.
- Parameters
-
| camera0 | The first camera, must be valid |
| camera1 | The second camera, must be valid |
| camera0_T_camera1 | The transformation from camera 1 to camera 0, must be valid |
- Returns
- True, if succeeded
◆ camera0_T_camera1_
The transformation from camera 1 to camera 0.
◆ camera1_E_camera0_
| SquareMatrix3 Ocean::Geometry::FisheyeEpipolarGeometry::camera1_E_camera0_ |
|
protected |
The essential matrix from camera 0 to camera 1.
◆ camera1_F_camera0_
| SquareMatrix3 Ocean::Geometry::FisheyeEpipolarGeometry::camera1_F_camera0_ |
|
protected |
The fundamental matrix from camera 0 to camera 1.
◆ fisheyeCamera0_
The first fisheye camera.
◆ fisheyeCamera1_
The second fisheye camera.
◆ pinholeCamera0_
The first pinhole camera.
◆ pinholeCamera1_
The second pinhole camera.
The documentation for this class was generated from the following file: