|
PanoWeave
|
PanoWeave is a C++ library with optional Python bindings for stitching multiple images into an equirectangular panorama, using Basalt camera calibration data. The library utilizes the OpenCV T-API for end-to-end GPU-accelerated processing, with optional CUDA support.
The stitching process requires geometric and extrinsic parameters of the camera system, as well as current depth information. While depth maps improve the quality of blended regions, they can be set to a uniform value for simpler use cases. When calibration data is available, PanoWeave can also correct photometric distortions such as lens vignetting and sensor response, and normalizes exposure across all input images for consistent brightness in the final panorama.
PanoWeave requires the following tools and libraries:
To use PanoWeave in your own project, simply add it as a git submodule and include it as a CMake subdirectory.
PanoWeave includes two minimal examples: one for interactive video stitching and another for benchmarking performance. Both are available in C++ and Python.
First, build the project:
To run the C++ example:
To run the Python example, first set the PYTHONPATH:
PanoWeave offers CMake options to adjust the build to your needs.
To set options during configuration, use:
Alternatively, set options in your CMakeLists.txt before adding the subdirectory. This allows you to change defaults or FORCE specific settings:
Available options (default values in parentheses):
PanoWeave offers documentation for both C++ and Python APIs. C++ documentation is generated with Doxygen, while Python stubs are created for IDE support.
You can generate HTML documentation by building the PanoWeaveDocs CMake target. This target is created automatically if Doxygen is available during configuration and can be built on demand.
If Doxygen was not found during configuration:
During a CMake build with enabled Python bindings the stubs are generated by default, as long as pybind11-stubgen is available. The generated .pyi gets parsed by IDEs and similar to provide highlighting and descriptions.
To generate Python stubs (if not already present):