How do I create a 1 by 1 matrix in OpenCV?

116 Views Asked by At

The following piece of code doesn't seem to work.

T = A*(B_new.t())*(A.t()) + x_bar;

Matrix A is of dimension 1 by 2, Matrix B_new.t() is of dimension 2 by 1, x_bar is a double variable of dimension 1 by 1. The dimension of T has to be dimension 1 by 1.

cv::Matx12d A = cv::Matx12d(1,0);

cv::Matx21d B_new = F_x* A_p *F_x.t() + K_x* L_x* K_x.t();

double x_bar = 100;

After running the code, I received a message:

no operator "+" matches these operands
operand types are: cv::Matx<double, 1, 1> + double

How to make changes to the error?

0

There are 0 best solutions below