The Kudan markerless tracker, which tracks the content of an image stream and gives a 3D pose for each frame.
More...
#include <KudanCV.h>
The Kudan markerless tracker, which tracks the content of an image stream and gives a 3D pose for each frame.
◆ KudanArbiTracker()
KudanArbiTracker::KudanArbiTracker |
( |
| ) |
|
Default constructor that calls initialise()
◆ ~KudanArbiTracker()
KudanArbiTracker::~KudanArbiTracker |
( |
| ) |
|
Destructor which de-initialises the tracker
◆ getCameraMatrix()
Get the calibration matrix for this camera, derived from the intrinsic parameters. This is a 3x3 matrix represented as the float array within a KudanMatrix3
- Returns
- A KudanMatrix3 representing the intrinsic parameters
- Exceptions
-
◆ getCameraParameters()
Get a (reference to) the camera parameters set on the tracker.
- Returns
- A reference to a KudanCameraParameters object. Altering this will change the one stored in the tracker
◆ getOrientation()
Get the pose of the tracked coordinate frame. This is the orientation of the tracked frame, about its centre
- Returns
- a KudanQuaternion which represents a 4D quaternion (x, y, z, w)
◆ getPosition()
Get the pose of the tracked coordinate frame. This is the position of the centre of the tracked frame with respect to the camera centre
- Returns
- A KudanVector3 which represents a 3D point (x, y, z)
◆ getProjectionMatrix()
KudanMatrix4 KudanArbiTracker::getProjectionMatrix |
( |
float |
nearPlane, |
|
|
float |
farPlane |
|
) |
| |
Get the projection matrix for this camera. This is derived from the intrinsic parameters and the given clipping planes. This is a 4x4 matrix represented as the float array within a KudanMatrix.
- Parameters
-
nearPlane,farPlane | The clipping planes to be used for rendering (not part of the camera parameters). |
- Returns
- A KudanMatrix representing the intrinsic parameters plus clipping planes.
- Exceptions
-
◆ hasCameraCalibration()
bool KudanArbiTracker::hasCameraCalibration |
( |
| ) |
|
Queries if a calibration has been set
- Returns
- A boolean indicating if calibration data are available.
◆ isTracking()
bool KudanArbiTracker::isTracking |
( |
| ) |
|
Indicates whether tracking is currently happening
- Returns
- A boolean, true iff tracking is running
◆ processFrame()
bool KudanArbiTracker::processFrame |
( |
const unsigned char * |
image, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
channels, |
|
|
int |
padding, |
|
|
bool |
requireFlip |
|
) |
| |
Process a new frame. If tracking is successful, the position and orientation are updated to the new pose for this frame. This will fail (return false) if a valid license is not set, or if ArbiTrack is not available for the current platform.
- Parameters
-
image | 8bpp greyscale image data. |
width,height | size of the image data matrix |
channels | number of channels in the image (mono, colour, colour+alpha) |
padding | the number of bytes to ignore at the end of each line |
requireFlip | some devices provide the image upside down (rotation of 180 degrees). This flips the image (in both axes) before processing |
- Returns
- A boolean indicating whether tracking happened (true) or not (false)
- Exceptions
-
KudanException | is thrown if there is no calibration data or an empty image. |
◆ setApiKey()
void KudanArbiTracker::setApiKey |
( |
std::string |
apiKey | ) |
|
A valid API key needs to be set before calling processFrame.
- Parameters
-
apiKey | a valid key can only be acquired from Kudan. |
◆ setCameraParameters()
Sets the camera parameters using given camera parameters
- Parameters
-
- Exceptions
-
◆ setSensedOrientation()
void KudanArbiTracker::setSensedOrientation |
( |
KudanQuaternion |
sensedOrientation | ) |
|
Arbitrack requires that an orientation estimate be provided from some external sensor (e.g. gyroscope, IMU). Without this, Arbitrack will always return the identity rotation. This must be called BEFORE calling processFrame for a given frame Use this function to set the orientation value which will be fused with the image based tracking
- Parameters
-
sensedOrientation | An orientation represented by a quaternion |
◆ start() [1/2]
Start the tracker. The tracker is started at the given pose (specified as a 4x4 transformation matrix).
- Parameters
-
startTransform | A 4x4 matrix representing the initial pose of the tracker coordinate frame with repsect to the camera |
◆ start() [2/2]
Start the tracker. The tracker is started at the given pose (specified as position and orientation).
- Parameters
-
startPosition | Starting position in 3D of the tracker coordinate frame with respect to the camera origin |
startOrientation | Starting otientation (about its own centre) of the tracker coordinate frame |
◆ stop()
void KudanArbiTracker::stop |
( |
| ) |
|
The documentation for this class was generated from the following files: