TransWikia.com

Crop overlap in existing panorama

Photography Asked by MrD on February 25, 2021

I have multiple partial spherical panorama pictures taken using the standard Android panorama function. The problem is that the panorama does not stop at 360 degrees, but is overlapping at the left/right border.
So it contains not just only 360 degrees, but more – let’s say 365 degrees. Like this image here:
enter image description here
As you can see, the fire extinguisher is visible on both sides of the panorama.

I tried to autocorrect the images and crop right or left with hugin, but without success. I can import the image using the equirectangular type and 360 degrees horizontal field of view, but I was not able to automatically (or manually) find control points in the same image in order to recognize and correct the overlap. The only way was to manually limit the horizontal angle of view using the slider on the bottom.

Is there a way to (ideally automatically without GUI) recognize and crop the overlap?

Update 1:

@inkista: thank you very much for your post. Based on this post, I tried the following (with Python/OpenCV):

  • split the image into two parts
  • find keypoints (limited to the border of the image)
  • flip the image positions (so that the 2 images of the fire-extinguisher are side-by-side)
  • try to "combine" the images to a single panorama

The search for matching keypoints was somehow successful:
enter image description here
enter image description here

But when applying the perspective transformation, the image is nice but unfortunately the transformation is applied to the whole right sub-image:
enter image description here
As inkista wrote, this part will be tricky again because of all the distortions (since we were turning around with the phone in my hand).

One Answer

I don't think there's any computational way of doing this. The main problem is that whatever computational software you have isn't going to know your true HFoV (how far you rotated), and you can't use the aspect ratio, since it's not a true equirectangular mapping, and you're missing VFoV (i.e., you haven't covered the entire ceiling or the entire floor) for an equirectangular.

While you can load it as an equirectangular, what you've most likely got is something like a 380-ishº cylindrical.

Control points aren't really going to help you other than to straighten stuff out, and you can probably eyeball/drag it faster in the GL preview of Hugin. You do have some tilt and roll issues as well (given the not-straight horizon).

Only advice I can offer is to straighten out everything so your doorframe verticals are vertical using the Drag/Move tab in Hugin GL preview and dragging vertically to adjust pitch, right-dragging to adjust roll, and horizontal dragging to adjust yaw. Then adjust the yaw, so the edges of the image are in the center of the image, and then doing a crop so the two edges (hopefully) meet.

…and I just tried doing this, and it looks like you shot free hand, while turning around with your phone in your hand?, and so you've also got parallax/drift errors that won't let the two sides come together seamlessly…

hand-corrected pano

If you had individual member images that were stitched together, you could realign the individual skewed bits to the pano, but since you only have the whole pano, and stuff is already stitched together, I'm not sure there's any way (let alone an easy way) to adjust for that additional roll/tilt on that one side of the pano to get it to square back with the other side. I mean, maybe you could use Skew in Photoshop or something. But I think you're always going to see the seam.

360s indoors shot without a panohead are usually problematic due to parallax.

Answered by inkista on February 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP