https://github.com/bagnasconicolo/roman-mosaic-fluorescence-simulator
Python tool for simulating green tesserae fluorescence in Roman mosaics
https://github.com/bagnasconicolo/roman-mosaic-fluorescence-simulator
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.4%) to scientific vocabulary
Repository
Python tool for simulating green tesserae fluorescence in Roman mosaics
Basic Info
- Host: GitHub
- Owner: bagnasconicolo
- License: mit
- Language: Python
- Default Branch: main
- Size: 29.5 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Roman Mosaic Fluorescence Simulator
A Python tool for simulating green tesserae fluorescence in Roman mosaics, with support for both static images and animated GIFs.
Features
- Tile-wise fluorescence simulation: Segments individual greenish tesserae using region-growing on HSV color space
- Classification system: Classifies tiles as bright-green (strong fluorescence), pale-green (weak), or bluish (none)
- Static rendering: Generates fluorescence images on black background and overlaid on the original mosaic
- Animated GIFs: Creates pulsing fluorescence animations with spatial flicker effects
- Debug outputs: Comprehensive visualization and analysis tools including histograms and scatter plots
Requirements
- Python 3.7+
- pillow
- numpy
- matplotlib
- pandas
Installation
Clone the repository:
bash git clone https://github.com/yourusername/roman-mosaic-fluorescence-simulator.git cd roman-mosaic-fluorescence-simulatorCreate and activate a virtual environment:
bash python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies:
bash pip install pillow numpy matplotlib pandas
Usage
Static Fluorescence Simulation
bash
python mosaic_fluorescence.py --src path/to/image.jpg --out output_directory
Animated GIF Generation
bash
python mosaic_fluorescence_gif.py --src path/to/image.jpg --out output_directory
Example
To see the simulator in action, check out the example results:
bash
python mosaic_fluorescence_gif.py --src examples/input_images/kaliumkalziumglas01w.jpg --out my_results
See the examples/ folder for sample input and complete output files.
Output Files
The simulator generates various output files:
01_candidate_mask.png- Initial greenish pixel candidates02_candidate_mask_closed.png- Cleaned candidate mask03_tiles_bbox_overlay_RED.png- Tile segmentation visualization04_tiles_class_overlay.png- Classification overlay10_fluorescence_black.png- Fluorescence on black background11_fluorescence_on_mosaic.png- Fluorescence overlaid on originalfluorescence_pulse_*.gif- Animated fluorescence (GIF version only)tiles_classification.csv- Per-tile analysis dataplot_*.png- Debug visualizations
Parameters
Key parameters can be adjusted in the script:
LONG_SIDE: Working resolution (default: 2200px)H_MIN, H_MAX: HSV hue range for greenish candidatesS_MIN, V_MIN: Minimum saturation and value thresholdsTOL_H, TOL_S, TOL_V: Region-growing tolerancesMIN_AREA, MAX_AREA: Tile size limitsTINT: Fluorescence color (~525nm green)
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Owner
- Name: Nicolò Bagnasco
- Login: bagnasconicolo
- Kind: user
- Twitter: nbagnasco
- Repositories: 1
- Profile: https://github.com/bagnasconicolo
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Dependencies
- matplotlib >=3.3.0
- numpy >=1.20.0
- pandas >=1.2.0
- pillow >=8.0.0