Skip to content

Commit

Permalink
Merge branch 'fix/camera_pickling' into features/e2e_test
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ueber2y committed Nov 29, 2024
2 parents 2cc1a45 + 9bba153 commit 411cd90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cfgs/fitnmerge/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fitting:
var2d: -1.0 # depends on the detector
ransac_th: 0.75
min_percentage_inliers: 0.9
n_jobs: 1
n_jobs: 4

##############################
# merging config
Expand Down
8 changes: 3 additions & 5 deletions limap/base/camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,12 @@ double Camera::uncertainty(double depth, double var2d) const {
Camera::Camera(py::dict dict) {
// model id
int model_id_loaded;
ASSIGN_PYDICT_ITEM(dict, model_id_loaded, int);
ASSIGN_PYDICT_ITEM_TKEY(dict, model_id, model_id_loaded, int);
model_id = static_cast<colmap::CameraModelId>(model_id_loaded);

// params
std::vector<double> params_loaded;
ASSIGN_PYDICT_ITEM(dict, params_loaded, std::vector<double>);
THROW_CHECK_EQ(params_loaded.size(), params.size());
params = params_loaded;
ASSIGN_PYDICT_ITEM(dict, params, std::vector<double>);
THROW_CHECK(VerifyParams());

// other fields
ASSIGN_PYDICT_ITEM(dict, camera_id, int);
Expand Down

0 comments on commit 411cd90

Please sign in to comment.