How kar-ton/flatstitch works
flatstitch is a Linux CLI and desktop application for stitching flatbed scans into a TIFF. Users provide scan files through the CLI or a desktop interface, choose stitching settings, and receive one or more stitched outputs. The shared pipeline loads images, extracts features, registers scan pairs with rigid transforms, computes a layout, composites tiles, and writes TIFFs. GUI options include Tk, GTK, and Qt; native frontends dispatch work through shared subprocess helpers. The graph follows the sampled pipeline and source-index references; some GUI and output details are documented rather than fully excerpted.
Main entry points: pipeline.py Stitch pipeline · i18n.py Translations · flatstitch_launcher.py GUI launcher · flatstitch_gui.py Tk interface
Components 17
User interfaces
- CLI
flatstitch/cli.py - GUI launcher
flatstitch_launcher.py - Tk interface
flatstitch_gui.py - GTK interface
flatstitch_gtk.py - Qt interface
flatstitch_qt.py - Native helpers
flatstitch_native_common.py
Stitch workflow
- Stitch pipeline
flatstitch/pipeline.py
Image processing
- Feature extraction
flatstitch/features.py - Pair registration
flatstitch/registration.py - Tile compositor
flatstitch/compositor.py - Image I/O
flatstitch/io_utils.py - Image preview
flatstitch/preview.py
Shared support
- Translations
flatstitch/i18n.py - Locale catalogs
flatstitch/locales - GUI settings
flatstitch_native_common.py
Other components
- Scan user
- Stitched TIFF
Connections 30
- Scan user → CLI: supplies scans
README.md - Scan user → GUI launcher: opens GUI
README.md - GUI launcher → Tk interface: selects fallback
flatstitch_launcher.py - GUI launcher → GTK interface: selects toolkit
flatstitch_launcher.py - GUI launcher → Qt interface: selects toolkit
flatstitch_launcher.py - Tk interface → Stitch pipeline: runs stitching
flatstitch_gui.py - GTK interface → Native helpers: dispatches work
flatstitch_gtk.py - Qt interface → Native helpers: dispatches work
flatstitch_qt.py - Native helpers → CLI: starts subprocess
flatstitch_native_common.py - CLI → Stitch pipeline: calls stitch
flatstitch/cli.py - Stitch pipeline → Image I/O: loads images
flatstitch/pipeline.py - Stitch pipeline → Feature extraction: extracts features
flatstitch/pipeline.py - Stitch pipeline → Pair registration: registers pairs
flatstitch/pipeline.py - Stitch pipeline → Tile compositor: composites tiles
flatstitch/pipeline.py - Stitch pipeline → Image I/O: writes TIFF
flatstitch/pipeline.py - Pair registration → Feature extraction: matches descriptors
flatstitch/registration.py - Image preview → Image I/O: loads source
flatstitch/preview.py - Stitch pipeline → Stitched TIFF: produces
README.md - CLI → Translations: localizes messages
flatstitch/cli.py - Feature extraction → Translations: localizes messages
flatstitch/features.py - Image I/O → Translations: localizes errors
flatstitch/io_utils.py - Stitch pipeline → Translations: localizes progress
flatstitch/pipeline.py - Translations → Locale catalogs: loads catalogs
flatstitch/i18n.py - Tk interface → Translations: uses language
flatstitch_gui.py - GTK interface → Translations: uses language
flatstitch_gtk.py - Qt interface → Translations: uses language
flatstitch_qt.py - Native helpers → GUI settings: loads settings
flatstitch_native_common.py - Tk interface → GUI settings: shares settings
README.md - GTK interface → GUI settings: shares settings
README.md - Qt interface → GUI settings: shares settings
README.md