Jetson Inference
DNN Vision Library

3x3 matrix operations from mat33.h More...

Functions

template<typename T1 , typename T2 >
void mat33_cast (T1 dst[3][3], const T2 src[3][3])
 Cast a 3x3 matrix from one type to another. More...
 
template<typename T >
void mat33_copy (T dst[3][3], const T src[3][3])
 Copy src input matrix to dst output. More...
 
template<typename T >
mat33_det (const T src[3][3])
 Compute the determinant of a 3x3 matrix, returns |src| More...
 
template<typename T >
void mat33_identity (T dst[3][3])
 Initialize a 3x3 identity matrix. More...
 
template<typename T >
void mat33_inverse (T dst[3][3], const T src[3][3])
 Compute the inverse of a 3x3 matrix, dst=src^-1 It is safe to have dst and src be the same memory. More...
 
template<typename T >
void mat33_multiply (T dst[3][3], const T a[3][3], const T b[3][3])
 Multiply two 3x3 matrices, dst=a*b More...
 
template<typename T >
void mat33_print (const T src[3][3], const char *name=NULL)
 Print out a 3x3 matrix to stdout. More...
 
template<typename T >
int mat33_rank (const T src[3][3])
 Determine the rank of a 3x3 matrix. More...
 
template<typename T >
void mat33_translate (T dst[3][3], T x, T y)
 Initialize a 3x3 translation matrix. More...
 
template<typename T >
void mat33_translate (T dst[3][3], T src[3][3], T x, T y)
 Translate a 3x3 matrix by (x,y) More...
 
template<typename T >
void mat33_rotation (T dst[3][3], T degrees)
 Initialize a 3x3 rotation matrix. More...
 
template<typename T >
void mat33_rotation (T dst[3][3], T src[3][3], T degrees)
 Rotate a 3x3 matrix counter-clockwise. More...
 
template<typename T >
void mat33_rotation (T dst[3][3], T degrees, float origin_x, float origin_y)
 Initialize a 3x3 rotation matrix around an origin point. More...
 
template<typename T >
void mat33_rotation (T dst[3][3], T src[3][3], T degrees, float origin_x, float origin_y)
 Rotation a 3x3 matrix around an origin point. More...
 
template<typename T >
void mat33_scale (T dst[3][3], T sx, T sy)
 Initialize a 3x3 scaling matrix. More...
 
template<typename T >
void mat33_scale (T dst[3][3], T src[3][3], T sx, T sy)
 Scale a 3x3 matrix by (sx,sy) More...
 
template<typename T >
void mat33_shear (T dst[3][3], T sx, T sy)
 Initialize a 3x3 shear matrix. More...
 
template<typename T >
void mat33_shear (T dst[3][3], T src[3][3], T sx, T sy)
 Shear a 3x3 matrix by (sx,sy). More...
 
template<typename T >
void mat33_swap (T a[3][3], T b[3][3])
 Swap two 3x3 matrices inline, a=b and b=a More...
 
template<typename T >
mat33_trace (const T src[3][3])
 Compute the trace of a 3x3 matrix, returns tr(src) More...
 
template<typename T >
void mat33_transform (T &x_out, T &y_out, const T x_in, const T y_in, const T mat[3][3])
 Transform a 2D vector by a 3x3 matrix. More...
 
template<typename T >
void mat33_transform (T dst[2], const T src[2], const T mat[3][3])
 Transform a 2D vector by a 3x3 matrix, dst=src*mat More...
 
template<typename T >
void mat33_transform (T *dst, const T *src, const int N, const T mat[3][3])
 Transform an array of 2D vectors by a 3x3 matrix. More...
 
template<typename T >
void mat33_transpose (T dst[3][3], const T src[3][3])
 Transpose a 3x3 matrix, dst=src^T More...
 
template<typename T >
void mat33_zero (T dst[3][3])
 Set a 3x3 matrix to all zero's. More...
 

Detailed Description

3x3 matrix operations from mat33.h

Function Documentation

◆ mat33_cast()

template<typename T1 , typename T2 >
void mat33_cast ( T1  dst[3][3],
const T2  src[3][3] 
)
inline

Cast a 3x3 matrix from one type to another.

◆ mat33_copy()

template<typename T >
void mat33_copy ( dst[3][3],
const T  src[3][3] 
)
inline

Copy src input matrix to dst output.

◆ mat33_det()

template<typename T >
T mat33_det ( const T  src[3][3])
inline

Compute the determinant of a 3x3 matrix, returns |src|

◆ mat33_identity()

template<typename T >
void mat33_identity ( dst[3][3])
inline

Initialize a 3x3 identity matrix.

◆ mat33_inverse()

template<typename T >
void mat33_inverse ( dst[3][3],
const T  src[3][3] 
)
inline

Compute the inverse of a 3x3 matrix, dst=src^-1 It is safe to have dst and src be the same memory.

◆ mat33_multiply()

template<typename T >
void mat33_multiply ( dst[3][3],
const T  a[3][3],
const T  b[3][3] 
)
inline

Multiply two 3x3 matrices, dst=a*b

◆ mat33_print()

template<typename T >
void mat33_print ( const T  src[3][3],
const char *  name = NULL 
)
inline

Print out a 3x3 matrix to stdout.

◆ mat33_rank()

template<typename T >
int mat33_rank ( const T  src[3][3])
inline

Determine the rank of a 3x3 matrix.

◆ mat33_rotation() [1/4]

template<typename T >
void mat33_rotation ( dst[3][3],
degrees 
)
inline

Initialize a 3x3 rotation matrix.

◆ mat33_rotation() [2/4]

template<typename T >
void mat33_rotation ( dst[3][3],
degrees,
float  origin_x,
float  origin_y 
)
inline

Initialize a 3x3 rotation matrix around an origin point.

◆ mat33_rotation() [3/4]

template<typename T >
void mat33_rotation ( dst[3][3],
src[3][3],
degrees 
)
inline

Rotate a 3x3 matrix counter-clockwise.

◆ mat33_rotation() [4/4]

template<typename T >
void mat33_rotation ( dst[3][3],
src[3][3],
degrees,
float  origin_x,
float  origin_y 
)
inline

Rotation a 3x3 matrix around an origin point.

◆ mat33_scale() [1/2]

template<typename T >
void mat33_scale ( dst[3][3],
src[3][3],
sx,
sy 
)
inline

Scale a 3x3 matrix by (sx,sy)

◆ mat33_scale() [2/2]

template<typename T >
void mat33_scale ( dst[3][3],
sx,
sy 
)
inline

Initialize a 3x3 scaling matrix.

◆ mat33_shear() [1/2]

template<typename T >
void mat33_shear ( dst[3][3],
src[3][3],
sx,
sy 
)
inline

Shear a 3x3 matrix by (sx,sy).

◆ mat33_shear() [2/2]

template<typename T >
void mat33_shear ( dst[3][3],
sx,
sy 
)
inline

Initialize a 3x3 shear matrix.

◆ mat33_swap()

template<typename T >
void mat33_swap ( a[3][3],
b[3][3] 
)
inline

Swap two 3x3 matrices inline, a=b and b=a

◆ mat33_trace()

template<typename T >
T mat33_trace ( const T  src[3][3])
inline

Compute the trace of a 3x3 matrix, returns tr(src)

◆ mat33_transform() [1/3]

template<typename T >
void mat33_transform ( T &  x_out,
T &  y_out,
const T  x_in,
const T  y_in,
const T  mat[3][3] 
)
inline

Transform a 2D vector by a 3x3 matrix.

◆ mat33_transform() [2/3]

template<typename T >
void mat33_transform ( T *  dst,
const T *  src,
const int  N,
const T  mat[3][3] 
)
inline

Transform an array of 2D vectors by a 3x3 matrix.

◆ mat33_transform() [3/3]

template<typename T >
void mat33_transform ( dst[2],
const T  src[2],
const T  mat[3][3] 
)
inline

Transform a 2D vector by a 3x3 matrix, dst=src*mat

◆ mat33_translate() [1/2]

template<typename T >
void mat33_translate ( dst[3][3],
src[3][3],
x,
y 
)
inline

Translate a 3x3 matrix by (x,y)

◆ mat33_translate() [2/2]

template<typename T >
void mat33_translate ( dst[3][3],
x,
y 
)
inline

Initialize a 3x3 translation matrix.

◆ mat33_transpose()

template<typename T >
void mat33_transpose ( dst[3][3],
const T  src[3][3] 
)
inline

Transpose a 3x3 matrix, dst=src^T

◆ mat33_zero()

template<typename T >
void mat33_zero ( dst[3][3])
inline

Set a 3x3 matrix to all zero's.