同步操作将从 Javens/OpenPano 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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.
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
$ 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.
Eigen3_DIR
to {YOUR_EIGEN3_DIRECTORY}/eigen3/cmake
.cd path/to/OpenPano
cmake .
config.cfg
to the directory containing image-stitching.exe
Three modes are available (set/unset the options in config.cfg
):
cylinder mode. Give better results if:
FOCAL_LENGTH
set in config.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:
1
in CYLINDER and TRANS mode.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.
$ ./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.
Zijing Apartment in Tsinghua University:
"Myselves":
Carnegie Mellon University from 38 images
Newell-Simon Hall in CMU (this one is hard because objects are closer):
A full-view pano built from UAV images:
For more examples, see results.
Tested on Intel Core i7-6700HQ, with ESTIMATE_CAMERA
mode:
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):
LAZY_READ
option: max(finalw * finalh * 12, #photos * w * h * 12 + #photos * #matched_pairs * 96 + #keypoints * 520)LAZY_READ
option: max(finalw * finalh * 16, #threads * w * h * 12, #photos * #matched_pairs * 96 + #keypoints * 520)For details, see my blog post.
To get the best stitching quality:
ImageRef
dist.cc
) to neon此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。