KudanCV
KudanMatrix3 Class Reference

#include <KudanCV.h>

Public Member Functions

 KudanMatrix3 ()
 
 KudanMatrix3 (KudanQuaternion &q)
 
float & operator() (int row, int col)
 
KudanVector3 multiply (KudanVector3 vector)
 
KudanVector3 operator* (KudanVector3 vector)
 
std::string toString ()
 

Public Attributes

float data [9]
 Raw data, stored vectorised in column major order.
 

Detailed Description

Represents an intrinsic camera calibration matrix (i.e. 3x3). Data are stored as an array of floating point type in column major order 0 3 6 1 4 7 2 4 8

Constructor & Destructor Documentation

◆ KudanMatrix3() [1/2]

KudanMatrix3::KudanMatrix3 ( )

Default constructor, sets all elements to 0

◆ KudanMatrix3() [2/2]

KudanMatrix3::KudanMatrix3 ( KudanQuaternion q)

Constructor to make a rotation matrix from a quaternion

Parameters
qThe input quaternion

Member Function Documentation

◆ multiply()

KudanVector3 KudanMatrix3::multiply ( KudanVector3  vector)

Multiply a vector by this matrix M (vector on the right)

Parameters
vectorA 3x1 vector V
Returns
A new 3x1 vector, the result of M*V

◆ operator()()

float & KudanMatrix3::operator() ( int  row,
int  col 
)

Access operator for the elements. This abstracts away details of the storage. It can be used to get and set values because it returns a reference

Parameters
row,colThe coordinates of the data element to retrieve
Returns
A reference to the respective element

◆ operator*()

KudanVector3 KudanMatrix3::operator* ( KudanVector3  vector)

Overloaded multiplication operator - calls the matrix-vector multiply function

Parameters
vectorA 3x1 vector V
Returns
A new 3x1 vector, the result of M*V

◆ toString()

std::string KudanMatrix3::toString ( )

Returns a representation of this as a string (three lines with line breaks)

Returns
A string representation of this matrix

The documentation for this class was generated from the following files: