Panorama stitching with feature matching + RANSAC homography and a collection of classic image processing exercises: enhancement, filtering, morphology, document restoration, counting, and a small puzzle solver.
This repository contains two parts:
- Panorama Stitching — build a mini mosaicing pipeline: detect & match features, estimate homography with RANSAC, warp, and composite into a panorama. We use ORB + BFMatcher + Lowe’s ratio test for robust matches after finding SIFT less reliable on our images. :contentReference[oaicite:0]{index=0}
- Classic Image Processing “Homeworks” — a set of self-contained notebooks covering: tampering detection, global & adaptive (CLAHE) histogram equalization, median & weighted median filtering, grayscale morphology for sharpening, form restoration (deskew + line repair), coin counting, and a jigsaw puzzle solver using feature matching. :contentReference[oaicite:1]{index=1}
- Feature detection/description: ORB
- Matching: BFMatcher (k-NN) + Lowe’s ratio test
- Model estimation: Homography via RANSAC
- Warping & compositing:
cv2.warpPerspective+ canvas translation - Notes: images are downscaled for speed; pipeline stitches left & right of a reference view. Future work: automatic left/right placement based on match distribution. :contentReference[oaicite:2]{index=2}
- Tampering detection: alignment (SIFT + RANSAC affine) → difference image → binary mask of edits. :contentReference[oaicite:3]{index=3}
- Enhancement: global histogram equalization vs CLAHE (clipLimit≈2.5, tileGridSize=8×8) — CLAHE reduces over-exposed artifacts. :contentReference[oaicite:4]{index=4}
- Filtering: median 3×3 vs 5×5; custom weighted median (5×5 mask) to better preserve edges. :contentReference[oaicite:5]{index=5}
- Morphology (sharpening): iterative grayscale pipeline (dilation/erosion + midpoint rule) — 10 iterations sharpen borders and text. :contentReference[oaicite:6]{index=6}
- Document restoration: Canny → Hough lines for rotation angle → morphological masks to rebuild horizontal/vertical lines → contour mask to clip overflow. :contentReference[oaicite:7]{index=7}
- Counting coins: blur → Canny → external contours for count & visualization. :contentReference[oaicite:8]{index=8}
- Puzzle solver: split reference into grid → SIFT features per cell → BF k-NN + ratio test → assign cell with most good matches → label pieces
0..N. :contentReference[oaicite:9]{index=9}
notebooks/ panorama_stitching.ipynb homework/ tampering_detection.ipynb enhancement_hist_equalization.ipynb filtering_median_weighted.ipynb morphology_sharpening.ipynb document_restoration.ipynb coin_counting_puzzle_solver.ipynb docs/ Panorama_Stitching_Report.pdf Homework_Report.pdf data/ samples/ panorama_image_1.jpg panorama_image_2.jpg
- docs/Panorama_Stitching_Report.pdf — project write-up & pseudo-code.
- docs/Homework_Report.pdf — detailed explanations & results for each classic task.
Released under the MIT License.