Skip to content

bagavi/ceres-ba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local bundle adjustment problem for multiple camera systes

How to run?

  1. bash create_data.sh - Creates data
  2. bash run.sh - Runs data using the option set in the function get_default() from src/ceres_options.cpp. Change the options in the above function to run under different option settings
  3. The ceres const functions are defined in src/ba_reproj_error_aa.h

Note: This code is part of a larger rust codebase. The rust codebase creates bindings to this codebase and hence a few idiosynchrnoies here and there

Each problem instance has

  1. Camera system with multiple frames
  2. Fixed cameras (keyframes)
  3. Variable cameras (keyframes)
  4. Variable 3d points (landmarks)

We have two kinds of correspondences and they correspond to two cost functions

  1. Between variable 3d and variable camera -- here both the 3d point position and camera pose are variables
  2. Between variable 3d and fixed camera -- here only the 3d point position are variables

The camera system as a reference frame and each frame has atransform to the reference frame via t_fl_fx. Steps to get the reprojection error:

  1. Transform the 3d point from world frame to camera system reference frame using t_g_ifl (aka global to inertial front left)
  2. Transform the 3d point from camera system reference frame to the frame in which its keypoint was observed using t_fl_fx (aka front left to front x)
  3. Project the 3d point to the camera plane and calculate the residue w.r.t to the bearing

Code:

  1. test/create_bundle_adjustment_data.cpp - creates a simulated dataset and stores it in data/data.csv
  2. test/bundle_adjust.cpp - loads the data from data/data.csv and constructs the "right" data strcutures and runs bundle adjustment
  3. src/bundle_adjustment.cpp - Constructs Ceres::Problem from the "right" data structures
  4. src/ba_reproj_error_aa.h - Defines two cost functions for the local ba
  5. src/ceres_optoins.cpp - Used to run solver using different ceres options

Other code

  1. src/read_write.h and src/read_write.cpp - Writes the data generated by test/create_bundle_adjustment_data.cpp and load data for test/bundle_adjust.cpp
  2. c_api.h - Defines the main structs and functions for local ba

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors