4

I am working a panoramic stitching project and I am trying to implement M. Brown and D. Lowe's Automatic Panoramic Image Stitching using Invariant Features by tweaking and adapting it to my needs. I understand the OpenCV stitching method in stitcher class is based on this.

I am stuck at the gain compensation and multi-band blending part. While I understand the theory behind it fairly well, I am shaky on the implementation.

OpenCV has classes for both, ExposureCompensator and MultibandBlender but I am struggling to put them to use in code.

Has anyone sucessfully used any of these classes ? Are there any good examples ?

While I was googling, I came across

  1. Balancing contrast and brightness between stitched images

This tries to explain roughly how to use ExposureCompesator but does not explain what the inputs are. Specifically, the inputs for feed method are vector<Point> corners and Vector<Mat> masks.

a) What are these corners ? Are these the top left corners of the individual images in the final panorama ? or something else ?

b) What are the masks ? How should I create them ?

  1. How to use Multi-band Blender in opencv

This tries to explain how to use the blender class but again misses the input definitions. What are the corners and masks ?

This is my stitched panorama, I am trying to compensate the exposure differences and blend it. enter image description here

Community
  • 1
  • 1
anna.sarp
  • 187
  • 2
  • 14

1 Answers1

0

Have a look into the official tutorial under the section Stitching detailed (python opencv >4.0.1). There you have a detailed implementation within both C++ and Python where also compensation and blending is included!

Lukas Weber
  • 455
  • 6
  • 13