| 414 | // bottom row of a homogeneous mat is constant and is ignored here). |
| 415 | |
| 416 | static void Mat33TimesVec( |
| 417 | VEC& v, // io: two element vector |
| 418 | const MAT& mat) // in: three column matrix |
| 419 | { |
| 420 | CV_DbgAssert(v.rows == 1 && v.cols == 2); |
| 421 | CV_DbgAssert(mat.rows >= 2 && mat.cols == 3); |
| 422 | CV_Assert(mat.isContinuous()); |
| 423 | |
| 424 | const double* const data = Buf(mat); |
| 425 | |
| 426 | const double x = v(0, 0); |
| 427 | const double y = v(0, 1); |
| 428 | |
| 429 | v(0, 0) = data[0] * x + data[1] * y + data[2]; |
| 430 | v(0, 1) = data[3] * x + data[4] * y + data[5]; |
| 431 | } |
| 432 | |
| 433 | // Transform shape by multiplying it by a homogeneous alignment_mat. |
| 434 | // alignment_mat can be 3x2 or 2x2 (since the bottom row of a homogeneous mat |
no test coverage detected