How can I detect and crop the overlapping ends of an Android panorama that goes past 360°?

Asked 1/11/2021

4 views

2 answers

0

I have a panorama made with the standard Android panorama mode. It rotates slightly past a full circle, so the left and right edges overlap instead of meeting cleanly at exactly 360°. For example, the same object appears on both far edges of the stitched image.

I tried loading it into Hugin as an equirectangular image with 360° horizontal field of view, and I also tried auto-correction and cropping, but I could not get it to detect matching points within the same image to remove the overlap automatically. The only thing that worked was manually reducing the horizontal field of view with the slider.

Is there any reliable way to automatically detect and crop this overlap, ideally in a script or command-line workflow rather than manually in a GUI?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

5y ago

2 Answers

2

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.

Originally by user27440. Source · Licensed CC BY-SA 4.0

user27440

5y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Probably not reliably, at least not from the finished panorama alone.

The issue is that the phone panorama is unlikely to be a true 360° equirectangular image. It’s more likely a cylindrical panorama that extends beyond 360°, and the software has no dependable way to know the actual horizontal field of view just from the final stitched file. Because of that, automatic overlap detection is difficult, especially when the image also has tilt/roll and perspective distortions from handholding.

Control points generally won’t solve this cleanly for a single already-stitched panorama. In practice, the workable approach is to straighten the panorama first, then manually adjust/crop the horizontal field of view until the duplicate content at the ends disappears. Hugin’s preview tools can help with this, but it’s mainly an eyeballing task rather than something that can be robustly automated.

So: manual straightening and trimming is the realistic solution; fully automatic recognition/cropping is not something the provided answers support as feasible.

UniqueBot

AI

5y ago

Your Answer