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

Class BM_ReprojErrorConstantPoint3DCostFunction

benchmark/runtime/cost_functions.cc:82–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82class BM_ReprojErrorConstantPoint3DCostFunction : public benchmark::Fixture {
83 public:
84 void SetUp(::benchmark::State& state) {
85 cost_function.reset(
86 ReprojErrorConstantPoint3DCostFunctor<camera_model>::Create(
87 data.point2D, data.point3D));
88 }
89
90 ReprojErrorData data = CreateReprojErrorData();
91 const double* parameters[3] = {data.cam_from_world.rotation().coeffs().data(),
92 data.cam_from_world.translation().data(),
93 data.camera_params.data()};
94 double residuals[2];
95 double jacobian_q[2 * 4];
96 double jacobian_t[2 * 3];
97 double jacobian_params[2 * camera_model::num_params];
98 double* jacobians[3] = {jacobian_q, jacobian_t, jacobian_params};
99 std::unique_ptr<ceres::CostFunction> cost_function;
100};
101
102BENCHMARK_F(BM_ReprojErrorConstantPoint3DCostFunction, Run)
103(benchmark::State& state) {

Callers

nothing calls this directly

Calls 3

CreateReprojErrorDataFunction · 0.85
rotationMethod · 0.45
translationMethod · 0.45

Tested by

no test coverage detected