{"id":18360108,"url":"https://github.com/aliparsbin/mono-stereo-camera-calibration","last_synced_at":"2026-04-16T12:40:20.552Z","repository":{"id":250230426,"uuid":"833851309","full_name":"aliparsbin/mono-stereo-camera-calibration","owner":"aliparsbin","description":"camera calibration for mono and stereo camera","archived":false,"fork":false,"pushed_at":"2024-07-26T14:07:06.000Z","size":1751,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T04:18:17.307Z","etag":null,"topics":["computer-vision","opencv","python","robotics"],"latest_commit_sha":null,"homepage":"https://www.parsbin.info","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/aliparsbin.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}},"created_at":"2024-07-25T22:30:06.000Z","updated_at":"2024-07-26T14:13:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bec3d58-ecee-477f-b474-d536fb6ff654","html_url":"https://github.com/aliparsbin/mono-stereo-camera-calibration","commit_stats":null,"previous_names":["aliparsbin/mono-stereo-camera-calibration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aliparsbin/mono-stereo-camera-calibration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliparsbin%2Fmono-stereo-camera-calibration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliparsbin%2Fmono-stereo-camera-calibration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliparsbin%2Fmono-stereo-camera-calibration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliparsbin%2Fmono-stereo-camera-calibration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliparsbin","download_url":"https://codeload.github.com/aliparsbin/mono-stereo-camera-calibration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliparsbin%2Fmono-stereo-camera-calibration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31886776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T11:36:10.202Z","status":"ssl_error","status_checked_at":"2026-04-16T11:36:09.652Z","response_time":69,"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":["computer-vision","opencv","python","robotics"],"created_at":"2024-11-05T22:26:33.998Z","updated_at":"2026-04-16T12:40:20.533Z","avatar_url":"https://github.com/aliparsbin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camera Calibration\n\nThe aim of the camera calibration is to find the **Intrinsic and Extrinsic Parameters** for the camera to remove the *distortion* in images. \n\n## Mono Camera Calibration\n\n1. Extrinsic Parameters: corresponds to rotation and translation vectors which translate the coordinates of a 3D point to a coordinate system.\n2. Intrinsic Parameters: they include information like focal length `(fx, fy)` and optical centers `(cx, cy)`.\n   The focal length and optical centers can be used to create a camera matrix, which can be used to remove distortion due to the lenses of a specific camera.\n   The camera matrix is unique to a specific camera, so once calculated, it can be reused on other images taken by the same camera. It is expressed as a 3x3 matrix:\n\n   ![image](https://github.com/user-attachments/assets/0e16431f-eb2a-4f8a-a914-9bf92bf7c974)\n\nHow to experiment: We find some specific points of which we already know the relative positions (e.g., square corners in the chess board). \nWe know the coordinates of these points in real-world space, and we know the coordinates in the image, so we can solve for the distortion coefficients. \nFor better results, we need at least `10` test patterns.\n\nThe method `mono_camera_calibration()` is written for the mono camera calibration, which takes `images_path` and `patterns_path` and returns the camera matrix, distortion coefficients,\nrotation, translation vectors, and the projection error while saving the pattern images in the specified location.\n\n### Result\n\nInput image captured by the camera:\n\n![IMG_20210610_160728](https://github.com/user-attachments/assets/33127a83-51e3-48d0-92c8-ea5969f96e24)\n\n\nOutput image (found chessboard pattern): \n\n![pat-6](https://github.com/user-attachments/assets/f94572ea-dede-476f-a21d-aa898500ba18)\n\n\n## Stereo Camera Calibration\n\nThe stereo camera consists of two cameras placed at a distance. As we do not have a stereo camera, we used two mono cameras for this experiment.\n\nThe aim is to find the intrinsic parameters of cameras and extrinsic parameters of the stereo (rotation and translation vector of the right camera corresponding to the left camera). In the stereo camera, the left camera is our origin.\n\n![image](https://github.com/user-attachments/assets/75636dce-bcf5-4516-9e2d-7fe59109886b)\n\nThe method `stereo_camera_calibration()` is written for the mono camera calibration, which takes `image1_path` and `image2_path` and returns the fundamental matrix, including the rotation and translation vectors.\n\n![stereo-camera-image](https://github.com/user-attachments/assets/af005b55-2f33-48d2-a979-ded4c6133f74)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliparsbin%2Fmono-stereo-camera-calibration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliparsbin%2Fmono-stereo-camera-calibration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliparsbin%2Fmono-stereo-camera-calibration/lists"}