PanoVision360 is a Python-based project that facilitates the creation of 360-degree panoramas from videos. It achieves this by splitting the video into shots, enhancing the image quality using SRCNN (Super-Resolution Convolutional Neural Network), and then stitching the enhanced images together.
- Shot Extraction: The project extracts frames from a video at specified intervals.
- Image Enhancement: Optionally, the extracted frames can be enhanced using SRCNN to improve image quality.
- Panorama Stitching: Finally, the enhanced frames are stitched together to create a seamless 360-degree panorama.
Test Environment: The project was tested on an Apple MacBook M2 (MacOS), Windows (You Should change directory on source code)
- Python 3.9
- OpenCV
- TensorFlow
- Pre-train Model Weight Link
-
Clone the repository:
git clone https://github.com/WellshCorgi/SuperRes-Pano360.git cd SuperRes-Pano360
-
Install dependencies:
pip install -r requirements.txt
-
Place your video file (e.g.,
input.mp4
) in the project directory. -
Run the script
mp4_to_pic.py
to extract frames from the video and optionally enhance them:python mp4_to_pic.py -i 1 -f 60
- Use the
-i
flag with1
to enable image enhancement using SRCNN. (if you don't want to use it0
) - Adjust the frame interval using the
-f
flag as needed (default is60
).
- Use the
-
Once frames are extracted and enhanced (if selected), run the script
stitching_image_2_pano.py
to stitch the frames into a panorama:python stitching_image_2_pano.py
-
The stitched panorama will be saved as
stitched_result.jpg
in the project directory.
This project utilizes the SRCNN model for image enhancement. The SRCNN model architecture and weights are based on the work by Dong et al. [1].
[1] Dong, C., Loy, C. C., He, K., & Tang, X. (2016). Image super-resolution using deep convolutional networks. IEEE transactions on pattern analysis and machine intelligence, 38(2), 295-307.
Note: The resulting image stitched_result_rooftop.jpg
was captured with a Canon mirrorless camera in 4K resolution and stitched using SupreRes-Pano360. The copyright for the photograph belongs to the author.