| 33 | }; |
| 34 | |
| 35 | TEST(Patch, ImageInterpolateGrad) { |
| 36 | Eigen::Vector2i offset(231, 123); |
| 37 | |
| 38 | SmoothFunction img; |
| 39 | |
| 40 | Eigen::Vector2d pd = offset.cast<double>() + Eigen::Vector2d(0.4, 0.34345); |
| 41 | |
| 42 | Eigen::Vector3d val_grad = img.interpGrad<double>(pd); |
| 43 | Eigen::Matrix<double, 1, 2> J_x = val_grad.tail<2>(); |
| 44 | |
| 45 | test_jacobian( |
| 46 | "d_res_d_x", J_x, |
| 47 | [&](const Eigen::Vector2d& x) { |
| 48 | return Eigen::Matrix<double, 1, 1>(img.interp<double>(pd + x)); |
| 49 | }, |
| 50 | Eigen::Vector2d::Zero(), 1); |
| 51 | } |
| 52 | |
| 53 | TEST(Patch, PatchSe2Jac) { |
| 54 | Eigen::Vector2i offset(231, 123); |
nothing calls this directly
no test coverage detected