{"id":13438435,"url":"https://github.com/libing64/camera_model","last_synced_at":"2025-03-20T06:30:26.337Z","repository":{"id":148917853,"uuid":"285957339","full_name":"libing64/camera_model","owner":"libing64","description":"相机内参标定和双目标定, 支持多种相机模型和多种标定板，","archived":false,"fork":false,"pushed_at":"2021-09-25T13:02:09.000Z","size":16763,"stargazers_count":118,"open_issues_count":2,"forks_count":32,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-28T00:23:02.618Z","etag":null,"topics":["camera-calibration","charuco","chessboard","intrinsic-calibration","pinhole-camera","stereo-calibration"],"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/libing64.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,"roadmap":null,"authors":null}},"created_at":"2020-08-08T02:22:57.000Z","updated_at":"2024-10-14T01:24:31.000Z","dependencies_parsed_at":"2023-07-25T06:45:59.306Z","dependency_job_id":null,"html_url":"https://github.com/libing64/camera_model","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libing64%2Fcamera_model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libing64%2Fcamera_model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libing64%2Fcamera_model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libing64%2Fcamera_model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libing64","download_url":"https://codeload.github.com/libing64/camera_model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244564784,"owners_count":20473129,"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","charuco","chessboard","intrinsic-calibration","pinhole-camera","stereo-calibration"],"created_at":"2024-07-31T03:01:05.517Z","updated_at":"2025-03-20T06:30:21.322Z","avatar_url":"https://github.com/libing64.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# camera_model\n\n相机内参标定和双目标定\n\n支持多种相机模型:\n* pinhole model\n* kannala-brandt model\n* mei model\n* scaramuzza model\n\n支持多种标定板\n* chessboard\n* circles grid\n* asymmetric circles grid\n* aruco makers\n* charuco makrers\n\n## 编译 \u0026 安装\n依赖项\n* OpenCV (with opencv_contrib)\n* Ceres Solver\n* boost\n\n```\ncd camera_model\nmkdir build\ncd build\ncmake ..\nmake\nsudo make install\n```\n\n## 调用\n编译安装之后， camera_model会作为共享库被安装在系统目录, 使用时无需添加源码，只添加依赖关系即可\n```\ncmake_minimum_required(VERSION 3.0)\nproject(camera_model_example)\n\nadd_executable(example example.cc)\ntarget_link_libraries(example camera_model)\n```\n\n# 参考 \u0026 感谢\npart of [camodocal](https://github.com/hengli/camodocal)\n\n感谢原作者 [Lionel Heng](https://github.com/hengli)\n\n感谢 [YZF](https://github.com/dvorak0) 整理camera_model\n\n感谢 [Tianbo](https://github.com/groundmelon) 添加Scaramuzza模型实现\n\n# 用法\n## 相机内参标定 intrinsic_calib\n\nUse [intrinsic_calib.cc](https://github.com/libing64/camera_model/blob/master/src/intrinsic_calib.cc) to calibrate your camera.\n\n\n## 双目标定 stereo_calib\n\nUse [stereo_calib.cc](https://github.com/libing64/camera_model/blob/master/src/stereo_calib.cc) to calibrate your camera.\n\n## Undistortion:\n\nSee [Camera.h](https://github.com/libing64/camera_model/blob/master/include/camera_model/camera_models/Camera.h) for general interface: \n\n - liftProjective: Lift points from the image plane to the projective space.\n - spaceToPlane: Projects 3D points to the image plane (Pi function)\n\n# 案例\n# 相机内参标定 intrinsic calib\n\n## mei model\n```\n./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model mei --camera-name fisheye_mei -v\n```\n\n## pinhole model\n```\n./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model pinhole --camera-name fisheye_pinhole -v\n```\n\n## kannala-brandt\n```\n./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model kannala-brandt --camera-name fisheye_kannala-brandt -v\n```\n## scaramuzza\n\n```\n./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model scaramuzza --camera-name fisheye_scaramuzza -v --view-results\n```\n\n## asymmetric cirlces grid\n```\n./intrinsic_calib -w 4 -h 11 -i ../data/asymmetric_circles_grid -p asymmetric_circles_grid -e jpg --pattern asymmetric_circles_grid --camera-model pinhole --camera-name webcam -v --view-results\n```\n\n注意，这里一定要4x11, 设置为11x4就不行\n\n## circles grid\n```\n./intrinsic_calib -w 9 -h 6 -i ../data/circles_grid -p circles_grid -e jpg --pattern circles_grid --camera-model pinhole --camera-name circles_grid_cam -v --view-results\n```\n\n## charuco marker\n```\n./intrinsic_calib -w 4 -h 6 -s 0.04 --marker-size 0.024 -i ../data/charuco -p charuco -e jpg --pattern charuco --dp ../data/pattern/detector_params.yml -d 10 --camera-model pinhole --camera-name charuco_cam -v --view-results\n```\n\n```\n./intrinsic_calib -w 4 -h 6 -s 0.04 --marker-size 0.024 -i ../data/charuco -p charuco -e jpg --pattern charuco --dp ../data/pattern/detector_params.yml -d 10 --camera-model kannala-brandt --camera-name charuco_cam -v --view-results\n```\n\n\n## stereo calibration\n```\n./stereo_calib -i ../data/stereo_images/ -e jpg --prefix-l left --prefix-r right --camera-model mei -v --view-results\n```\n\n## stereo calibration circles (virtual test with mono image)\n```\n./stereo_calib -i ../data/circles_grid --pattern circles_grid -e jpg --prefix-l circles_grid --prefix-r circles_grid --camera-model mei -v --view-results\n```\n\n# TODO\n- [ ] add aruco marker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibing64%2Fcamera_model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibing64%2Fcamera_model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibing64%2Fcamera_model/lists"}