{"id":26239698,"url":"https://github.com/ccomkhj/charuco_stereo_calibrator","last_synced_at":"2026-04-21T08:04:30.553Z","repository":{"id":264868917,"uuid":"892190683","full_name":"ccomkhj/Charuco_Stereo_Calibrator","owner":"ccomkhj","description":"Charuco Camera Calibrator for Stereo vision and raspberry pi camera","archived":false,"fork":false,"pushed_at":"2025-04-17T14:14:48.000Z","size":168,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T16:00:09.743Z","etag":null,"topics":["calibration","calibration-toolbox","charuco","computer-vision","depth","stereo-vision"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccomkhj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-21T16:59:19.000Z","updated_at":"2025-11-27T21:04:14.000Z","dependencies_parsed_at":"2024-11-30T10:29:19.943Z","dependency_job_id":"b66e5616-643d-4e41-8907-d3747170afce","html_url":"https://github.com/ccomkhj/Charuco_Stereo_Calibrator","commit_stats":null,"previous_names":["ccomkhj/stereo_calibrator","ccomkhj/charuco_stereo_calibrator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ccomkhj/Charuco_Stereo_Calibrator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccomkhj%2FCharuco_Stereo_Calibrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccomkhj%2FCharuco_Stereo_Calibrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccomkhj%2FCharuco_Stereo_Calibrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccomkhj%2FCharuco_Stereo_Calibrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccomkhj","download_url":"https://codeload.github.com/ccomkhj/Charuco_Stereo_Calibrator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccomkhj%2FCharuco_Stereo_Calibrator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32082782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["calibration","calibration-toolbox","charuco","computer-vision","depth","stereo-vision"],"created_at":"2025-03-13T07:16:56.834Z","updated_at":"2026-04-21T08:04:30.523Z","avatar_url":"https://github.com/ccomkhj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThe `CharucoStereoCalibrator`, `StereoCalibrator` and `Rectifier` are Python tools for stereo camera calibration and rectification. They compute intrinsic and stereo parameters, rectify stereo images, and visualize epipolar geometry, essential for 3D vision tasks like depth estimation and 3D reconstruction.\n\n---\n\n## Features\n\n#### StereoCalibrator\n- Automatic detection of chessboard corners in stereo images.\n- Computes intrinsic parameters (camera matrix, distortion coefficients).\n- Computes stereo parameters (rotation, translation, rectification, projection, and Q matrix).\n- Saves calibration data to `stereoMap.xml`.\n- Visualizes calibration errors and highlights outliers.\n\n#### CharucoStereoCalibrator\n- Support same feature with `StereoCalibrator` but using Charucoboard.\n\n#### CharucoCalibrator\n- One camera calibrator using Charucoboard.\n- Feel free to use `generate_charuco.py` to generate your own Charucoboard. It's designed for A4 printing.\n\n#### Rectifier\n- Loads stereo calibration data from `stereoMap.xml`.\n- Rectifies stereo image pairs for horizontal alignment.\n- Computes the **Fundamental Matrix (F)**.\n- Visualizes epipolar geometry with epilines and matched points.\n- Saves rectified images and visualization outputs.\n\n---\n\n## Quick Start\n\n#### 0. Installation\n\n```\nconda create -n csc python=3.12 -y\nconda activate csc\npip install -e .\n```\n\n`CharucoCalibrator` is sensitive to opencv version, because there's big update since `4.6`\n\n#### 1. **Calibration**\n```python\nfrom csc.charuco_stereo_calibrator import CharucoStereoCalibrator\nimport glob\n\n# Specify image paths\nimages_left = glob.glob(\"input/charuco/left/*.jpg\")\nimages_right = glob.glob(\"input/charuco/right/*.jpg\")\n\n# Specify number of column, row of checkerboard\nchessboard_size = (11, 8) \n\n# Specify image sizes\nframe_size_h = 1296 \nframe_size_w = 2304 \n\n# [Optional] if you don't know camera spec, then algorithm figure this out.\nf_in_mm = 4.74 # or None\npixel_size_mm = 1.4e-3 # or None\ndebug = False # or False\n\nstereo_calibrator = CharucoStereoCalibrator(\n    chessboard_size=chessboard_size,\n    frame_size_h=frame_size_h,\n    frame_size_w=frame_size_w,\n    f_in_mm=f_in_mm,\n    pixel_size_mm=pixel_size_mm,\n    debug=debug,\n)\n\n# Specify samples to show epipolar geometry qualitatively to evaluate calibration\nleft_show = \"demo/samples/left_sample.jpg\"\nright_show = \"demo/samples/right_sample.jpg\"\n\nstereo_calibrator.perform_calibration(images_left, images_right)\nstereo_calibrator.save_rectified_images(images_left, images_right)\nstereo_calibrator.visualize_epipolar(left_show, right_show, save=debug)\nstereo_calibrator.print_results()\nstereo_calibrator.measure_outlier()\n```\n\n**Note:** To explore additional examples, please refer to the `__main__` section within each function.\n\n---\n\n## Outputs\n- **Calibration Data**: `stereoMap.xml` (camera matrices, rectification maps, etc.).\n- **Rectified Images**: Horizontally aligned stereo pairs.\n- **Epipolar Visualizations**: Saved epipolar images highlighting epilines and point matches.\n\n---\n\n## Key Methods\n- `StereoCalibrator.perform_calibration()` - Calibrate cameras.\n- `Rectifier.rectify_image()` - Rectify stereo image pairs.\n- `Rectifier.visualize_epipolar()` - Draw epilines and visualize epipolar geometry.\n\n---\n\n## Notes\n- Ensure chessboard size matches the setup (`chessboard_size`).\n- Use `visualize_epipolar()` to verify and debug calibration.\n- Unlike Checker board, Charuco board is strict for the order of `col`, `row`\n  - Checker board considers the number of conjunctions.\n  - Charuco board considers the number of rows and columns of blocks.\n\n---\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccomkhj%2Fcharuco_stereo_calibrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccomkhj%2Fcharuco_stereo_calibrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccomkhj%2Fcharuco_stereo_calibrator/lists"}