This struct holds the transformation from the camera optical frame to
the April tag frame. The pose refers to the position of the tag within
the camera frame.
Adds the two supplied matrices together, cell-by-cell, and returns the results
as a new matrix of the same dimensions. The supplied matrices must have
identical dimensions. It is the caller’s responsibility to call matd_destroy()
on the returned matrix.
Adds the values of ‘b’ to matrix ‘a’, cell-by-cell, and overwrites the
contents of ‘a’ with the results. The supplied matrices must have
identical dimensions.
Creates a double matrix with the given number of rows and columns (or a scalar
in the case where rows=0 and/or cols=0). All data elements will be initialized
to zero. It is the caller’s responsibility to call matd_destroy() on the
returned matrix.
Creates a double matrix with the given number of rows and columns (or a scalar
in the case where rows=0 and/or cols=0). All data elements will be initialized
using the supplied array of data, which must contain at least rowscols elements,
arranged in row-major order (i.e. index = rowncols + col). It is the caller’s
responsibility to call matd_destroy() on the returned matrix.
Creates a double matrix with the given number of rows and columns (or a scalar
in the case where rows=0 and/or cols=0). All data elements will be initialized
using the supplied array of float data, which must contain at least rowscols elements,
arranged in row-major order (i.e. index = rowncols + col). It is the caller’s
responsibility to call matd_destroy() on the returned matrix.
Calculates the cross product of supplied matrices ‘a’ and ‘b’ (i.e. a x b)
and returns it as a new matrix. Both ‘a’ and ‘b’ must be vectors of dimension
3, but can be either row or column vectors. It is the caller’s responsibility
to call matd_destroy() on the returned matrix.
Creates a square identity matrix with the given number of rows (and
therefore columns), or a scalar with value 1 in the case where dim=0.
It is the caller’s responsibility to call matd_destroy() on the
returned matrix.
Attempts to compute an inverse of the supplied matrix ‘a’ and return it as
a new matrix. This is strictly only possible if the determinant of ‘a’ is
non-zero (matd_det(a) != 0).
Multiplies the two supplied matrices together (matrix product), and returns the
results as a new matrix. The supplied matrices must have dimensions such that
columns(a) = rows(b). The returned matrix will have a row count of rows(a)
and a column count of columns(b). It is the caller’s responsibility to call
matd_destroy() on the returned matrix.
Creates a new matrix by applying a series of matrix operations, as expressed
in ‘expr’, to the supplied list of matrices. Each matrix to be operated upon
must be represented in the expression by a separate matrix placeholder, ‘M’,
and there must be one matrix supplied as an argument for each matrix
placeholder in the expression. All rules and caveats of the corresponding
matrix operations apply to the operated-on matrices. It is the caller’s
responsibility to call matd_destroy() on the returned matrix.
Prints the supplied matrix ‘m’ to standard output by applying the supplied
printf format specifier ‘fmt’ for each individual element. Each row will
be printed on a separate newline.
Prints the transpose of the supplied matrix ‘m’ to standard output by applying
the supplied printf format specifier ‘fmt’ for each individual element. Each
row will be printed on a separate newline.
Scales all cell values of matrix ‘a’ by the given scale factor ‘s’ and
returns the result as a new matrix of the same dimensions. It is the caller’s
responsibility to call matd_destroy() on the returned matrix.
Creates a copy of a subset of the supplied matrix ‘a’. The subset will include
rows ‘r0’ through ‘r1’, inclusive (‘r1’ >= ‘r0’), and columns ‘c0’ through ‘c1’,
inclusive (‘c1’ >= ‘c0’). All parameters are zero-based (i.e. matd_select(a, 0, 0, 0, 0)
will return only the first cell). Cannot be used on scalars or to extend
beyond the number of rows/columns of ‘a’. It is the caller’s responsibility to
call matd_destroy() on the returned matrix.
Subtracts matrix ‘b’ from matrix ‘a’, cell-by-cell, and returns the results
as a new matrix of the same dimensions. The supplied matrices must have
identical dimensions. It is the caller’s responsibility to call matd_destroy()
on the returned matrix.
Subtracts the values of ‘b’ from matrix ‘a’, cell-by-cell, and overwrites the
contents of ‘a’ with the results. The supplied matrices must have
identical dimensions.
Calculates the magnitude of the distance between the points represented by
matrices ‘a’ and ‘b’. Both ‘a’ and ‘b’ must be vectors and have the same
dimension (although one may be a row vector and one may be a column vector).
Calculates the dot product of two vectors. Both ‘a’ and ‘b’ must be vectors
and have the same dimension (although one may be a row vector and one may be
a column vector).
Calculates the normalization of the supplied vector ‘a’ (i.e. a unit vector
of the same dimension and orientation as ‘a’ with a magnitude of 1) and returns
it as a new vector. ‘a’ must be a vector of any dimension and must have a
non-zero magnitude. It is the caller’s responsibility to call matd_destroy()
on the returned matrix.
Calls the supplied function for every element in the array in index order.
HOWEVER values are passed to the function, not pointers to values. In the
case where the zarray stores object pointers, zarray_vmap allows you to
pass in the object’s destroy function (or free) directly. Can only be used
with zarray’s which contain pointer data. The map function should have the
following format: