A Python application that matches film photos with scene photos using ORB (Oriented FAST and Rotated BRIEF) feature detection and matching.
Beta 1: to verify the feasibility of scene matching via ORB
- Command Line Interface: Process photos directly from the terminal
- Web Interface: User-friendly browser-based interface
- ORB Feature Detection: Advanced image matching using OpenCV
- Flexible Input: Support for various image formats
scene-sync/
├── app/
│ ├── __init__.py
│ ├── core/
│ │ ├── __init__.py
│ │ ├── matcher.py # ORB matching logic
│ │ ├── utils.py # Utility functions
│ │ └── verifier.py # For test verification
│ ├── cli/
│ │ ├── __init__.py
│ │ └── commands.py # CLI commands
│ └── web/
│ ├── __init__.py
│ ├── routes.py # Flask routes
│ ├── templates/ # HTML templates
│ └── static/ # CSS, JS, images
├── film-photos/ # Input folder for film photos
├── scene-info/ # Input folder for scene photos
├── output/ # Output folder for results
├── truth/ # Truth folder for true pair datasheet storage
├── requirements.txt
├── main.py # Main application entry point
└── README.md
-
Install Python Dependencies:
pip install -r requirements.txt
-
Create Required Directories:
mkdir -p film-photos scene-info output
-
Add Your Photos:
- Place film photos in
film-photos/(organized in subfolders) - Place scene photos in
scene-info/(organized in subfolders)
- Place film photos in
# Match photos from specific folders
python main.py match --film-folder film-photos/folder1 --scene-folder scene-info/folder2
# List available folders
python main.py list-folders
# Run with custom output directory
python main.py match --film-folder film-photos/folder1 --scene-folder scene-info/folder2 --output output/results.csv# Start the web server
python main.py web
# Then open http://localhost:5001 in your browser- Image Formats: JPEG, PNG, BMP, TIFF
- Folder Structure: Each folder should contain only image files
- File Names: Must be unique within each folder
- Image Quality: Higher resolution images work better for matching
The app generates a CSV file with columns:
film_photo: Name of the film photo filescene_photo: Name of the matched scene photo fileconfidence_score: Matching confidence (0-1)
You can adjust matching parameters in app/core/matcher.py:
MAX_FEATURES: Maximum number of features to detectGOOD_MATCH_PERCENT: Threshold for good matchesMIN_MATCHES: Minimum matches required for a valid match