{"id":18008982,"url":"https://github.com/koide3/sparse_dynamic_calibration","last_synced_at":"2025-07-20T09:12:39.159Z","repository":{"id":110286406,"uuid":"173358016","full_name":"koide3/sparse_dynamic_calibration","owner":"koide3","description":"Sparse and dynamic camera network calibration with visual odometry","archived":false,"fork":false,"pushed_at":"2020-07-01T09:03:26.000Z","size":192,"stargazers_count":29,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-07T15:54:33.571Z","etag":null,"topics":["camera-calibration","camera-networks","graph-optimization","openptrack","visual-odometry"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koide3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-03-01T19:37:27.000Z","updated_at":"2024-09-06T07:09:27.000Z","dependencies_parsed_at":"2023-06-18T12:24:14.363Z","dependency_job_id":null,"html_url":"https://github.com/koide3/sparse_dynamic_calibration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/koide3/sparse_dynamic_calibration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fsparse_dynamic_calibration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fsparse_dynamic_calibration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fsparse_dynamic_calibration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fsparse_dynamic_calibration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koide3","download_url":"https://codeload.github.com/koide3/sparse_dynamic_calibration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fsparse_dynamic_calibration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266094082,"owners_count":23875570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camera-calibration","camera-networks","graph-optimization","openptrack","visual-odometry"],"created_at":"2024-10-30T02:08:27.380Z","updated_at":"2025-07-20T09:12:39.136Z","avatar_url":"https://github.com/koide3.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## sparse\\_dynamic\\_calibration\n\nThis is a ROS package to calibrate a camera network consisting of not only static overlapping cameras but also dynamic and non-overlapping cameras. It bridges separated camera views using a dynamic support camera with visual odometry, and estimates all the static and dynamic camera poses based on pose graph optimization. It has an optional depth image-based refinement step for RGB-D cameras.\n\nThe calibration method itself is designed for general camera networks. But, it also provides some scripts to incorporate with [OpenPTrack](https://github.com/OpenPTrack/open_ptrack_v2), an RGB-D camera network-based human-machine interaction framework.\n\nThis package has been tested on ROS melodic on Ubuntu 18.04\n\n![](figs/system.jpg)\n\n[video](https://drive.google.com/open?id=1DCjfVUMr8ZSkOYbvwpIQUm4A_jY4PIMi)\n\n## Installation\n\n### Apriltag\n\n```bash\ngit clone https://github.com/AprilRobotics/apriltags.git\ncd apriltags \u0026\u0026 sudo make install\n```\n\n### Visual odometry\n\nIn this work, we use [Direct Sparse Odometry](https://github.com/JakobEngel/dso) to obtain the camera motion. However, you can replace it with any visual odometry algortihm. Only the requirement is that it publishes the estimated odometry to \"*/vodom (geometry\\_msgs::PoseStamped)*\" topic.\n\n#### DSO\n\n```bash\n# (Recommended) Install Pangolin (https://github.com/stevenlovegrove/Pangolin)\n\ngit clone https://github.com/koide3/dso.git\nmkdir dso/build \u0026\u0026 cd dso/build\ncmake ..\nmake -j4\n\necho \"export DSO_PATH=/path/to/dso\" \u003e\u003e ~/.bashrc\nsoruce ~/.bashrc\n\n\ncd catkin_ws/src\ngit clone https://github.com/koide3/dso_ros.git\ncd dso_ros \u0026\u0026 git checkout catkin\ncd ../.. \u0026\u0026 catkin_make\n```\n\n### sparse_dynamic_calibration\n\n```bash\ncd catkin_ws/src\ngit clone https://github.com/koide3/sparse_dynamic_calibration.git\ncd .. \u0026\u0026 catkin_make\n```\n\n## Usage\n\n### Tag placement\n\nPrint out [apriltag 36h11 family](https://robot2016.mit.edu/sites/default/files/documents/project_apriltag36h11.pdf), and place the in the environment so that each camera can see at least one tag.\n\n### Detecting tags from static cameras\n\nEdit \"*data/tags.yaml*\" to specify the tag size.\n\n```yaml\n%YAML:1.0\ndefault_tag_size: 0.160\n```\n\nThen, launch \"*generate\\_tag\\_camera\\_network\\_conf.launch*\" to detect tags from the static cameras. It automatically detects cameras by findind topics which match with a regex pattern (e.g., \"(/kinect.*)/rgb/image\"), and then extracts image data from topics of the detected cameras (/rgb/camera\\_info, /rgb/image, /depth\\_ir/points). You can change the pattern and topic names by editing the launch file.\n\n```bash\nroslaunch sparse_dynamic_calibration generate_tag_camera_network_conf.launch\n```\n\n### Recording dynamic camera image stream\n\nRecord an image stream and visual odometry data using a dynamic camera.\n\n```bash\n# in case you use a pointgrey camera\nroslaunch sparse_dynamic_calibration camera.launch\n\n#otherwise, use any other camera node like usb_cam\n```\n\n```bash\nroslaunch dso_ros dso.launch\n```\n\nAlthough the calibration method itself is an online method, we recommend to run the calibration on a rosbag for testing.\n\n```bash\nrosbag record -O test.bag -e \"/camera/(camera_info|image_raw/compressed)\" /vodom /points\n```\n\n### Running calibration\n\n```bash\nrosparam set use_sim_time true\nroslaunch sparse_dynamic_calibration calibration.launch\n```\n\n```bash\nroscd sparse_dynamic_calibration/config\nrviz -d rviz.rviz\n```\n\n```bash\nrosrun image_transport republish compressed in:=/camera/image_raw raw out:=/camera/image_raw\n```\n\n```bash\nrosbag play --clock test.bag\n```\n\nAfter finishing to play the rosbag, save the estimate poses:\n\n```bash\nrostopic pub /sparse_dynamic_calibration/save std_msgs/Empty\n```\n\nYou should be able to see the calibrated camera poses in *\"data/tag\\_camera\\_poses.yaml\"*.\n\n\n### Depth image-based refinement (optional)\n\n```bash\nrosparam set use_sim_time false\nroslaunch sparse_dynamic_calibration refinement.launch\n```\n\nRefined camera poses will be saved to \"*data/tag\\_camera\\_poses\\_refined.yaml*\". The accumulated point clouds before/after the refinement will be saved to /tmp/(original|refined).pcd\n\n### Copying estimated posed to OpenPTrack (optional)\n\nAfter calibrating the camera network, copy the estimated camera poses with:\n```bash\nrosrun sparse_dynamic_calibration copy_to_openptrack.py\n```\n\nThis script reads the estimated camera poses in \"*data/tag\\_camera\\_poses.yaml*\" and writes them into \"opt\\_calibration/launch/opt\\_calibration\\_results.launch\" and \"opt\\_calibration/conf/camera\\_poses.yaml\". Then, distribute the calibration result to each PC:\n\n```bash\n# On master PC\nroslaunch opt_calibration detection_initializer.launch\n```\n\n```bash\n# On each distributed PC\nroslaunch opt_calibration listener.launch\n```\n\n## Example\n\n~~[Static camera imageset](https://github.com)~~  \n~~[Dynamic camera rosbag](https://github.com)~~  \n(will be available soon)\n\n### Detecting tags\n\n```bash\ntar xzvf sparse_dynamic_example.tar.gz\ncp -R sparse_dynamic_example/data catkin_ws/src/sparse_dynamic_calibration/\n\nroslaunch sparse_dynamic_calibration generate_tag_camera_network_conf.launch read_from_file:=true\n```\n\n### Running calibration\n\n```bash\nrosparam set use_sim_time true\nrosrun image_transport republish compressed in:=/camera/image_raw raw out:=/camera/image_raw\n```\n\n```bash\nroscd sparse_dynamic_calibration/config\nrviz -d rviz.rviz\n```\n\n```bash\nroslaunch sparse_dynamic_calibration calibration.launch\n```\n\n```bash\nrosbag play --clock real_30.bag\n```\n\n```bash\nrostopic pub /sparse_dynamic_calibration_node/save std_msgs/Empty\n```\n\n### Refinement\n\n```bash\nrosparam set use_sim_time false\nroscd sparse_dynamic_calibration/config\nrviz -d rviz.rviz\n```\n\n```bash\nroslaunch sparse_dynamic_calibration refinement.launch\n```\n\n\n## Related work\nKenji Koide and Emanuele Menegatti, Non-overlapping RGB-D Camera Network Calibration with Monocular Visual Odometry, IROS2020.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoide3%2Fsparse_dynamic_calibration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoide3%2Fsparse_dynamic_calibration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoide3%2Fsparse_dynamic_calibration/lists"}