MCPcopy Create free account
hub / github.com/colmap/colmap / BM_ReprojErrorCostFunction

Class BM_ReprojErrorCostFunction

benchmark/runtime/cost_functions.cc:30–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30class BM_ReprojErrorCostFunction : public benchmark::Fixture {
31 public:
32 void SetUp(::benchmark::State& state) {
33 cost_function.reset(
34 ReprojErrorCostFunctor<camera_model>::Create(data.point2D));
35 }
36
37 ReprojErrorData data = CreateReprojErrorData();
38 const double* parameters[4] = {data.cam_from_world.rotation().coeffs().data(),
39 data.cam_from_world.translation().data(),
40 data.point3D.data(),
41 data.camera_params.data()};
42 double residuals[2];
43 double jacobian_q[2 * 4];
44 double jacobian_t[2 * 3];
45 double jacobian_p[2 * 3];
46 double jacobian_params[2 * camera_model::num_params];
47 double* jacobians[4] = {jacobian_q, jacobian_t, jacobian_p, jacobian_params};
48 std::unique_ptr<ceres::CostFunction> cost_function;
49};
50
51BENCHMARK_F(BM_ReprojErrorCostFunction, Run)(benchmark::State& state) {
52 for (auto _ : state) {

Callers

nothing calls this directly

Calls 3

CreateReprojErrorDataFunction · 0.85
rotationMethod · 0.45
translationMethod · 0.45

Tested by

no test coverage detected