Code Monkey home page Code Monkey logo

panoramic-photo-generation's Introduction

Panoramic Photo Generation from Video

Project for ANU ENGN4528/6528 (Computer Vision), Semester 1. May 21, 2018.

See the project report here.

Besides, there are 4 mini projects in this course which can be found here.

Approach

  • Key frame selection
  • SIFT (Scale Invariant Feature Transform) Matching
  • RANSAC (Random Sample Consens)
  • Cylindrical Projection
  • Image Blending (Linear, Laplacian)
  • Image Cropping

Experiment Environment

  • Python 3.6.3
    • numpy 1.14.3
    • OpenCV 3.4.0.12
    • OpenCV-contrib 3.4.0.12

Note that OpenCV and OpenCV-contrib must be lower than (not including) 3.4.3. Because SIFT is a patented algorithm and has been excluded after 3.4.3 (see Issue: Include non-free algorithms). Installing an old version (up to 3.4.2) can solve this problem. For example, with pip:

$ pip install opencv-python==3.4.2.17
$ pip install opencv-contrib-python==3.4.2.17

Data

360video.mp4: Scenery near ANU campus, taken from a smart phone camera. Original Video

Outcome:

Panoramic Photo

Codes

  • cap_key_frames.py
  • generate_pano.py
  • stitch.py
  • append_operation.py

Usage

Run python3 cap_key_frames.py 'file' to extract key frames of the video file. Replace 'file' with the video file path. If not given, the default value is '360video.mp4'. The captured frames are stored in key_frames/. The stride parameter for accelerating the process can be adjusted in line 27.

Run python3 generate_pano.py 'num' to stitch the frames in key_frames/ successively (including cylindrical projection, blending and cropping). This will generate an image called panoramic.jpg, which is the outcome. Replace 'num' with the number of frames to be stitched. If not given, the default value is 23.

panoramic-photo-generation's People

Contributors

ybhan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.