4

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).

  • "but I was not able to automatically (or manually) find control points in the same image in order to recognize and correct the overlap" – Can you explain what this means in more detail? – xiota Jan 11 at 20:21
  • In my understanding, hugin uses control points to identify overlapping areas of images in order to stitch multiple photos to one panorama. I would expect the same mechanism when identifying the overlap of a complete 360+° panorama. Ideally hugin finds the same things on both sides of the panorama, marks them and identifies so the area which has to be cropped (on left or right). – MrD Jan 12 at 8:28
  • Why are you not able to manually enter control points? There should be suitable points you can use around the door frame. – xiota Jan 12 at 15:46
  • 3
    @xiota, I think all the OP has is the finished pano (I'm interpreting "standard Android panorama" as a sweep pano) , not member images. Other issue; this isn't just an equirectangular with >360º HFoV, since the ceiling and floor aren't completely covered, so the 2x1 thing isn't going to work, and loading it as an equirectangular isn't going to work. – inkista Jan 12 at 19:19
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.

  • 1
    Thank you for your interesting post. As you wrote, the panorama was taken without panohead - with the phone in my hand. I played around a bit more and updated my first post based on this. – MrD Jan 13 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.