MCPcopy Create free account
hub / github.com/VladyslavUsenko/basalt / TEST

Function TEST

test/src/test_patch.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33};
34
35TEST(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
53TEST(Patch, PatchSe2Jac) {
54 Eigen::Vector2i offset(231, 123);

Callers

nothing calls this directly

Calls 1

test_jacobianFunction · 0.85

Tested by

no test coverage detected