{"id":32495109,"url":"https://github.com/rishishanthan/rgb-channel-alignment","last_synced_at":"2026-05-15T01:09:34.465Z","repository":{"id":317877890,"uuid":"1069190670","full_name":"rishishanthan/rgb-channel-alignment","owner":"rishishanthan","description":"A Python project for reconstructing RGB images from grayscale plates with stacked channels using ORB feature matching and homography alignment. ","archived":false,"fork":false,"pushed_at":"2025-10-03T15:04:49.000Z","size":359,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T17:25:50.227Z","etag":null,"topics":["channel-registration","color-reconstruction","computer-vision","feature-matching","homography","image-alignment","image-processing","opencv","orb","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/rishishanthan.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-03T14:41:03.000Z","updated_at":"2025-10-03T15:06:41.000Z","dependencies_parsed_at":"2025-10-08T20:33:28.401Z","dependency_job_id":null,"html_url":"https://github.com/rishishanthan/rgb-channel-alignment","commit_stats":null,"previous_names":["rishishanthan/rgb-channel-alignment"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rishishanthan/rgb-channel-alignment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Frgb-channel-alignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Frgb-channel-alignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Frgb-channel-alignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Frgb-channel-alignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishishanthan","download_url":"https://codeload.github.com/rishishanthan/rgb-channel-alignment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishishanthan%2Frgb-channel-alignment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33049601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["channel-registration","color-reconstruction","computer-vision","feature-matching","homography","image-alignment","image-processing","opencv","orb","python"],"created_at":"2025-10-27T13:01:15.265Z","updated_at":"2026-05-15T01:09:34.453Z","avatar_url":"https://github.com/rishishanthan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RGB Channel Alignment\n\nThis project reconstructs full-color RGB images from grayscale photographs where the Red, Green, and Blue channels are stacked vertically.  \nThe implementation uses **ORB (Oriented FAST and Rotated BRIEF)** feature matching and **homography transformation** in OpenCV to align channels and correct misalignments, producing high-quality reconstructed images.\n\n---\n\n## 🎯 Objectives\n- Split grayscale input (with 3 stacked channels) into individual **B**, **G**, and **R** channels.\n- Use **feature-based alignment (ORB + Homography with RANSAC)** to correct channel misalignments.\n- Warp and reconstruct aligned channels into a single RGB image.\n- Save and visualize the reconstructed image.\n\n---\n\n## 🛠️ Implementation Details\n\n### 1. **Splitting Channels**\nEach raw input consists of three stacked grayscale images:\n- Top third → Blue channel\n- Middle third → Green channel\n- Bottom third → Red channel\n\n### 1. **Splitting Channels**\nEach raw input consists of three stacked grayscale images:\n- Top third → Blue channel\n- Middle third → Green channel\n- Bottom third → Red channel\n\n### 2. Channel Alignment\n- ORB (Oriented FAST and Rotated BRIEF) is used to detect and describe keypoints in each channel.\n- BFMatcher with Hamming distance finds correspondences between feature descriptors.\n- A homography is estimated with RANSAC to robustly align channels.\n\n### 3. Reconstruction\n- Red and Blue are aligned relative to Green (chosen as reference).\n- Channels are stacked to form an RGB image.\n\n### 4. Command-Line Interface\n- The program accepts --input (raw stacked image) and --output (path to save aligned result).\n- It now automatically handles directories or missing extensions.\n\n### 5. Final Script Usage\nRun the script as:\npython3 untitled.py \\\n  --input /tests/test_image_1.jpg \\\n  --output /results/test_1_aligned.jpg\n  \n## ✅ Elample Result\n#### Input - stacked grayscale plates\n![Input (stacked grayscale plates)](/tests/test_image_1.jpg)\n\n#### Output - aligned RGB image \n\n![Output (aligned RGB image)](/results/test_1_aligned.jpg)\n\n## ⚙️ Dependencies\n- Python 3.x\n- OpenCV ≥ 4.5.4\n- NumPy\n- Matplotlib\n### Install with:\n    pip install opencv-python numpy matplotlib\n\n## 🔑 Key Takeaways\n- This project demonstrates how early color photography relied on careful channel alignment.\n- ORB + Homography with RANSAC gives robust alignment even with perspective distortions.\n- Results show good alignment, though extreme motion blur or damaged plates may need advanced techniques (e.g., pyramid search, cross-correlation).\n\n## 📌 Future Improvements\n- Implement pyramid alignment (multi-scale search).\n- Add automatic cropping to remove misaligned borders.\n- Explore mutual information alignment for robustness.\n\n## 📖 References\n- S. Prokudin-Gorskii Photo Collection, Library of Congress\n- OpenCV ORB and Homography Documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishishanthan%2Frgb-channel-alignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishishanthan%2Frgb-channel-alignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishishanthan%2Frgb-channel-alignment/lists"}