This simple Python project is designed to quickly complete the stacking task by capturing the faint light emitted by fireflies. The project focuses on the image stacking function itself, avoiding the high price you pay for a computer that supports intense video processing and unnecessary professional photo post-processing tools. (Money, time and unnecessary software features. When I built this project, I spent 5$ on "professional camera software" at the Apple Store. However, to this day, I still don't understand how it works.) . The application collects key frames from the video of the light emitted by each individual firefly. Then by stacking the images, it eventually blends them into a single photo that represents the collective glow of the fireflies. Theoretically, you can also take it to any fixed-camera video footage.(There have been significant changes to the project and the instructions for use have not been updated at this time.)
- Firefly Chapture: Finding the video keyframes of the behavior of fireflies and their light emission
- Light Accumulation: Collects and accumulates the light emitted by each firefly
- Data Visualization: Provides visualizations to showcase the accumulated light over time
- Clone the repository:
git clone https://github.com/5418XR/StackVideoFirefly.git
- Navigate into the cloned repository:
cd StackVideoFirefly
- Install the necessary Python dependencies:
pip install -r requirements.txt
To use the application, run the main script with Python:
python readData.py
This will help you to extract the keyframes from the video into the folder "output_frames" (which will be created if there is no such folder). And store all the keyframes in a new folder in the format "keyframe_photoNumber.png".
python newPhoto.py
This will extract the photos you have stored in the folder "output_frames". You can adjust the range of keyframes and how many frames are extracted at a time to your liking.
Ensure that you have Python 3 installed on your machine before running the application.
Contributions, issues, and feature requests are welcome! Feel free to check issues page if you want to contribute.
This project is licensed under the terms of the MIT license. See the LICENSE file for details.
If you have any questions, please feel free to contact me. You can also raise an issue for any suggestions or improvements.