Options
All
  • Public
  • Public/Protected
  • All
Menu

If you need a more flexible type, use Mat . The elements of the matrix M are accessible using the M(i,j) notation. Most of the common matrix operations (see also MatrixExpressions ) are available. To do an operation on Matx that is not implemented, you can easily convert the matrix to Mat and backwards:

Matx33f m(1, 2, 3,
          4, 5, 6,
          7, 8, 9);
cout << sum(Mat(m*m.t())) << endl;

Except of the plain constructor which takes a list of elements, Matx can be initialized from a C-array:

float values[] = { 1, 2, 3};
Matx31f m(values);

In case if C++11 features are available, std::initializer_list can be also used to initialize Matx:

Matx31f m = { 1, 2, 3};

Source: opencv2/core/matx.hpp.

Hierarchy

  • Matx

Index

Constructors

constructor

Properties

val

val: _Tp

Methods

col

ddot

diag

div

dot

get_minor

inv

  • inv(method?: int, p_is_ok?: any): Matx

mul

reshape

row

solve

t

Static all

Static diag

Static eye

Static ones

Static randn

Static randu

Static zeros

Generated using TypeDoc