All Projects → ppwwyyxx → Openpano

ppwwyyxx / Openpano

Licence: mit
Automatic Panorama Stitching From Scratch

Labels

Projects that are alternatives of or similar to Openpano

DeepPanoContext
Official PyTorch code of DeepPanoContext: Panoramic 3D Scene Understanding with Holistic Scene Context Graph and Relation-based Optimization (ICCV 2021 Oral).
Stars: ✭ 44 (-96.57%)
Mutual labels:  panorama
Vue Vr
A framework for building VR applications with Vue
Stars: ✭ 348 (-72.9%)
Mutual labels:  panorama
Pano.gl
Equirectangular video/image viewer based on WebGL.
Stars: ✭ 42 (-96.73%)
Mutual labels:  panorama
panorama
photo panorama converter
Stars: ✭ 52 (-95.95%)
Mutual labels:  panorama
Pannellum
Pannellum is a lightweight, free, and open source panorama viewer for the web. Built using HTML5, CSS3, JavaScript, and WebGL, it is plug-in free. It can be deployed easily as a single file, just 21kB gzipped, and then embedded into pages as an <iframe>. A configuration utility is included to generate the required code for embedding. An API is included for more advanced integrations.
Stars: ✭ 3,286 (+155.92%)
Mutual labels:  panorama
Pano360
Pure Java library to play 360 degree panorama video / photo (VR video) on Android. Using OpenGL ES 2.0 -安卓全景视频/图片播放器
Stars: ✭ 535 (-58.33%)
Mutual labels:  panorama
stereo-panorama-viewer
View stereoscopic panoramas in your browser!
Stars: ✭ 23 (-98.21%)
Mutual labels:  panorama
React Native Streetview
React Native Google's Panorama/StreetView component for iOS and Android.
Stars: ✭ 79 (-93.85%)
Mutual labels:  panorama
Metalscope
Metal-backed 360° panorama view for iOS
Stars: ✭ 293 (-77.18%)
Mutual labels:  panorama
Eog panorama
Panorama viewer plugin for the 'Eye of Gnome' image viewer
Stars: ✭ 30 (-97.66%)
Mutual labels:  panorama
pipano-sdk-ios
A Panorama SDK for iOS
Stars: ✭ 20 (-98.44%)
Mutual labels:  panorama
Openvslam
OpenVSLAM: A Versatile Visual SLAM Framework
Stars: ✭ 2,945 (+129.36%)
Mutual labels:  panorama
Computer Vision
Computer vision exercise with Python and OpenCV.
Stars: ✭ 17 (-98.68%)
Mutual labels:  panorama
Panorama360
Projekt przejściowy do projektu Magisterskiego. Android, LibGDX, OpenCV, Camera, SurfaceView, stitching, panorama, sphere, gyroscope
Stars: ✭ 52 (-95.95%)
Mutual labels:  panorama
Pannellum React
React Component for Pannellum (open source panorama viewer for the web)
Stars: ✭ 48 (-96.26%)
Mutual labels:  panorama
google-streetview-images
Pull google streetview panoramic images along a route.
Stars: ✭ 45 (-96.5%)
Mutual labels:  panorama
Python Multiple Image Stitching
Implementation of multiple image stitching
Stars: ✭ 360 (-71.96%)
Mutual labels:  panorama
Panoramic Image Stitching Using Invariant Features
Given a number of input images, concatenate all images to produce a panoramic image using invariant features.
Stars: ✭ 81 (-93.69%)
Mutual labels:  panorama
Iv Panorama
720° panorama player
Stars: ✭ 65 (-94.94%)
Mutual labels:  panorama
Ctpanoramaview
A library that displays spherical or cylindrical panoramas with touch or motion based controls.
Stars: ✭ 951 (-25.93%)
Mutual labels:  panorama

OpenPano

cmu0

Introduction

OpenPano is a panorama stitching program written in C++ from scratch (without any vision libraries). It mainly follows the routine described in the paper Automatic Panoramic Image Stitching using Invariant Features, which is also the one used by AutoStitch.

Build Status

Compile Dependencies:

  • gcc >= 4.7 (Or VS2015)
  • Eigen
  • FLANN (already included in the repository, slightly modified)
  • CImg (optional. already included in the repository)
  • libjpeg (optional if you only work with png files)
  • cmake or make

Eigen, CImg and FLANN are header-only, to simplify the compilation on different platforms. CImg and libjpeg are only used to read and write images, so you can easily get rid of them.

On ArchLinux, install dependencies by: sudo pacman -S gcc sed cmake make libjpeg eigen

On Ubuntu, install dependencies by: sudo apt install build-essential sed cmake libjpeg-dev libeigen3-dev

Compile:

Linux / OSX / WSL (bash on windows)

$ make -C src

or

$ mkdir build && cd build && cmake .. && make

The default clang on OSX doesn't contain openmp support. You may need gcc or different clang. See #16.

Windows

  • Install cmake, VS2015
  • Set environment variable Eigen3_DIR to {YOUR_EIGEN3_DIRECTORY}/eigen3/cmake.
  • Open Visual Studio Developer Command Prompt.
  • cd path/to/OpenPano
  • cmake .
  • Open the VS2015 project and compile the project
  • copy config.cfg to the directory containing image-stitching.exe
  • The author have never used Visual Studio and this windows build process may not work for you. Feel free to submit PR to improve the build process.

Options:

Three modes are available (set/unset the options in config.cfg):

  • cylinder mode. Give better results if:

    • You are only turning left (or right) when taking the images (as is usually done), no translations or other type of rotations allowed.
    • Images are taken with the same camera, with a known FOCAL_LENGTH set in config.
    • Images are given in the left-to-right order. (I might fix this in the future)
  • camera estimation mode. No translation is the only requirement on cameras. It can usually work well as long as you don't have too few images. But it's slower because it needs to perform pairwise matches.

  • translation mode. Simply stitch images together by affine transformation. It works when camera performs pure translation and scene points are roughly at the same depth. It also requires ordered input.

Some options you may care:

  • FOCAL_LENGTH: focal length of your camera in 35mm equivalent. Only useful in cylinder mode.
  • ORDERED_INPUT: whether input images are ordered sequentially. has to be 1 in CYLINDER and TRANS mode.
  • CROP: whether to crop the final image to avoid irregular white border.

Other parameters are quality-related. The default values are generally good for images with more than 0.7 megapixels. If your images are too small and cannot produce satisfactory results, it might be better to resize your images rather than tune the parameters.

Run:

$ ./image-stitching <file1> <file2> ...

The output file is out.jpg. You can play with the example data to start with.

Before dealing with very large images (4 megapixels or more), it's better to resize them. (I might add this feature in the future)

In cylinder/translation mode, the input file names need to have the correct order.

Examples (All original data available for download):

Zijing Apartment in Tsinghua University: dorm

"Myselves": myself

Carnegie Mellon University from 38 images apple

Newell-Simon Hall in CMU (this one is hard because objects are closer): nsh

A full-view pano built from UAV images: uav

For more examples, see results.

Speed & Memory:

Tested on Intel Core i7-6700HQ, with ESTIMATE_CAMERA mode:

  • 11 ordered images of size 600x400: 3.2s.
  • 13 ordered images of size 1500x1112: 6s.
  • 38 unordered images of size 1300x867 (high vertical FOV): 51s.

Memory consumption is known to be huge with default libc allocator. Simply using a modern allocator (e.g. tcmalloc, jemalloc) can help a lot. Also, setting LAZY_READ to 1 can save memory at the cost of a minor slow down.

Peak memory in bytes (assume each input has the same w & h):

  • Without LAZY_READ option: max(finalw * finalh * 12, #photos * w * h * 12 + #photos * #matched_pairs * 96 + #keypoints * 520)
  • With LAZY_READ option: max(finalw * finalh * 16, #threads * w * h * 12, #photos * #matched_pairs * 96 + #keypoints * 520)

Algorithms

  • Features: SIFT
  • Transformation: use RANSAC to estimate a homography or affine transformation.
  • Optimization: focal estimation, bundle adjustment, and some straightening tricks.

For details, see my blog post.

Quality Guidelines

To get the best stitching quality:

  • While rotating the camera for different shots, try to keep the position of camera lens static.
  • Keep the exposure parameters unchanged.
  • Do not shoot on moving objects.
  • Objects far away will stitch better.
  • The algorithm doesn't work well with wide-angle cameras where images are distorted heavily. Camera parameters are needed to undistort the images.

TODOs

  • apply pairwise matching for translation mode as well
  • run bundle adjustment on sphere lens instead of perspective lens
  • improve feature detector and matching
  • use LAZY_READ & 1 byte image in both blender to reduce peak memory
  • clean up use of copies of ImageRef
  • faster gaussian blur kernel
  • port some hotspot (e.g. dist.cc) to neon
  • support read/write EXIF metadata to:
    • get focal length, distortion, etc
    • allow pano to be viewed on Facebook
  • python bindings
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].