How sathviktr/seam_carving works
This is a command-line seam-carving image resizer. The user supplies an image path and smaller target dimensions; the program loads the image, computes pixel energy, repeatedly finds and removes minimum-energy vertical and horizontal seams, and displays the resizing animation. The seam search uses dynamic programming. All runtime behavior is in Q1.cpp; the README documents image reading and visualization through OpenCV. The graph reflects the sampled source, with no separate saved-image output shown.
Main entry points: Q1.cpp Resize workflow
Components 11
Input and loading
- Resize workflow
Q1.cpp - OpenCV image I/O
Seam carving
- Energy gradient
Q1.cpp - Vertical seam search
Q1.cpp - Remove vertical seam
Q1.cpp - Horizontal seam search
Q1.cpp - Remove horizontal seam
Q1.cpp
Visualization
- Image display
Other components
- User
- Source image
- Display window
Connections 11
- User → Resize workflow: enters path and dimensions
- Source image → OpenCV image I/O: provides image file
- Resize workflow → OpenCV image I/O: loads image
- Resize workflow → Energy gradient: computes energy
- Energy gradient → Resize workflow: returns energy map
- Resize workflow → Vertical seam search: finds vertical seam
- Resize workflow → Remove vertical seam: removes vertical seam
- Resize workflow → Horizontal seam search: finds horizontal seam
- Resize workflow → Remove horizontal seam: removes horizontal seam
- Resize workflow → Image display: shows resizing frames
- Image display → Display window: renders frames