{"id":17222951,"url":"https://github.com/cheind/image-stitch","last_synced_at":"2025-06-25T13:33:16.022Z","repository":{"id":227492617,"uuid":"770834810","full_name":"cheind/image-stitch","owner":"cheind","description":"Image stitching of planar targets based on analytical homographies","archived":false,"fork":false,"pushed_at":"2024-10-15T03:34:29.000Z","size":45508,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T22:23:19.731Z","etag":null,"topics":["analytical","computer-vision","homographies","image-stitching","math","python"],"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/cheind.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}},"created_at":"2024-03-12T08:45:52.000Z","updated_at":"2025-03-27T14:20:14.000Z","dependencies_parsed_at":"2024-03-13T16:41:03.406Z","dependency_job_id":null,"html_url":"https://github.com/cheind/image-stitch","commit_stats":null,"previous_names":["cheind/image-stitch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cheind/image-stitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fimage-stitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fimage-stitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fimage-stitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fimage-stitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheind","download_url":"https://codeload.github.com/cheind/image-stitch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheind%2Fimage-stitch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261883155,"owners_count":23224442,"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":["analytical","computer-vision","homographies","image-stitching","math","python"],"created_at":"2024-10-15T04:06:48.799Z","updated_at":"2025-06-25T13:33:15.980Z","avatar_url":"https://github.com/cheind.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Planar Image Stitching\n\nThis repository demonstrates stitching multiple images of a **planar target**. We analytically derive homographies by assuming the camera poses with respect to the target are known. Hence neihter feature matching nor  Linear Transforms (DLTs) are required to estimate the homographies. The following image shows four views stitched in the green reference camera frame. \n\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003cimg src=\"etc/stitch-cam2.png\" /\u003e\n\u003c/p\u003e\n\nIn the following image the same scene is stitched in a virtual camera whose image plane aligns with the ground plane, having a pixel resolution of 500px per meter, which is suited well for taking direct metric measurements.\n\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003cimg src=\"etc/stitch-pi-500.png\" /\u003e\n\u003c/p\u003e\n\nBoth images exhibit ghosting artefacts causved by blending moving objects and warping objects that violate the in-target-plane assumption. \n\n## Theory\n\nSee [PlanarImageStitching.md](PlanarImageStitching.md) for background information on the stitching process.\n\n## Applications\n\nThe ghosting effect has intriguing applications in search-and-rescue scenarios. In particular, [OutOfFocusAnalysis.md](OutOfFocusAnalysis.md) explores techniques for reconstructing objects that are significantly obscured by out-of-focus elements, providing valuable insights for improving visibility in challenging environments. This allows us to go images of mostly foliage (left) to reconstructed hidden duck (right).\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"etc/oof_ducky.jpg\" width=\"40%\" /\u003e \n\u003cimg src=\"etc/oof-color-20241013-082612.png\" width=\"41%\" /\u003e\n\u003c/p\u003e\n\n\n\n## Usage\n\nThe code provided is for demonstration purposes only. It is limited to a scenario in which a moving camera observes a ground floor. The extrinsics are computed from knowing the fisheye intrinsics/distortions and the calibration pattern configuration.\n\n### Stitching\n\n```shell\n# Stitch in camera 3 view (index starting at zero)\npython stitch.py basepath=data/ plane.idx=2\n```\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003cimg src=\"etc/stitch-cam2.png\" /\u003e\n\u003c/p\u003e\n\n\n```shell\n# Stitch in plane pi using px/m of 500\npython stitch.py basepath=data/ plane.idx=-1 plane.px_per_m=500 plane.extent=\"[-3, 5, -1, 2]\"\n```\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003cimg src=\"etc/stitch-pi-500.png\" /\u003e\n\u003c/p\u003e\n\n```shell\n# Stitch in plane pi using px/m of 10\npython stitch.py basepath=data/ plane.idx=-1 plane.px_per_m=10 plane.extent=\"[-3, 5, -1, 2]\"\n```\n\u003cp align=\"center\" width=\"100%\"\u003e\n\u003cimg src=\"etc/stitch-pi-10.png\" /\u003e\n\u003c/p\u003e\n\n### Out-of-Focus (Ducky Rescue)\n\nFirst, stitch in a plane parallel to ground but lifted by 0.03m. We turn on saving of raw values which provides us the necessary information for performing\nout-of-focus analysis.\n\n```shell\n# Stitch and save intermediate results\npython stitch.py basepath=data/oof plane.idx=-1 plane.extent=\"[-0.5,1,0,1.5]\" plane.z=0.03 save_raw=true\n``` \n\n```shell\n# Perform out-of-focus analysis\npython oof.py rawpath=tmp/stitch-20241013-044050.npz \npython oof.py rawpath=tmp/stitch-20241013-044050.npz weight_filter=baseline\npython oof.py rawpath=tmp/stitch-20241013-044050.npz weight_filter=color   \npython oof.py rawpath=tmp/stitch-20241013-044050.npz weight_filter=outlier\npython oof.py rawpath=tmp/stitch-20241013-044050.npz weight_filter=color color.T=10 integrate.min_weight=0.2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheind%2Fimage-stitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheind%2Fimage-stitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheind%2Fimage-stitch/lists"}