| 436 | // The term "in place" means that we modify the shape passed to this func. |
| 437 | |
| 438 | void TransformShapeInPlace( |
| 439 | Shape& shape, // io |
| 440 | const MAT& alignment_mat) // in |
| 441 | { |
| 442 | CV_Assert(shape.cols == 2); |
| 443 | CV_Assert(alignment_mat.cols == 3 || alignment_mat.rows == 2); |
| 444 | |
| 445 | for (int i = 0; i < shape.rows; i++) |
| 446 | if (PointUsed(shape, i)) |
| 447 | { |
| 448 | VEC row(shape.row(i)); |
| 449 | Mat33TimesVec(row, alignment_mat); |
| 450 | // if transformed point happens to be at 0,0, jitter it |
| 451 | if (!PointUsed(shape, i)) |
| 452 | shape(i, IX) = XJITTER; |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | void TransformShapeInPlace( |
| 457 | Shape& shape, // io |
no test coverage detected