pythonopencvimage-stitchingopencv-stitching

How to use SphericalWarper from OpenCV in python?


While trying to stitch images I wanted to do spherical warping. All google searches and LLMs were sure that there is a function and class called cv2.detail.SphericalWarper which is not existing. I tried multiple python versions and the latest versions I tried were python 3.11 and opencv-contrib-python 4.12.0.88

cv2.detail.SphericalWarper() Tried this function but it gives error AttributeError: module 'cv2.detail' has no attribute 'SphericalWarper'


Solution

  • You need to use PyRotationWarper with type 'spherical'. It will be mapped to SphericalWarper