Wednesday, 25 February 2015

hugin - How to reproject and crop a 360°x180° panorama?


I'm not sure how to ask my question in generic terms, but here's what I want to do.


I have a 360°x180° panorama photo. I took the photo with an app (Google PhotoSphere). Unfortunately my app doesn't save the individual photos I took, only the auto stitched panorama, with the "center" of the photo of its choosing.


I'd like to recenter, crop, reproject, etc. the photo, just as I would as if I had stitched individual photos into a panorama with a panostitching application like Hugin.


How can I bring a full panorama photo into Hugin (or similar software) so that I can manipulate the photo to my choosing?


My goal would be to export a new panorama photo (and not necessarily a 360x180).


Currently my only option is to view the photo in panorama viewing software, and take screenshots. However, this of course limits my resolution to my monitor, and only in the projection they're presenting it in.



Answer




Using Hugin


Yes, since Google PhotoSphere panos are stored as equirectangular projections you can use Hugin to remap to other projections.




  1. Go into the View → Advanced (or Expert) mode.




  2. Click the Add Images... button to load the stitched panorama.





  3. Set the Lens type to Equirectangular and the HFOV to 360.


    This will load your 360x180 as a 360x180.




  4. Go into the GL preview window.




  5. Use the Move/Drag tab to change the viewpoint.


    Dragging horizontally changes yaw, dragging vertically changes pitch, right-dragging changes roll.





  6. Use the Projection tab to select a different projection.


    Watch your FoV setting, since not all projections play nice with 360.




  7. Use the Crop tab to set the crop.




  8. Once everything looks the way you want it to, save the Hugin project (.pto) file, and go to the Stitcher tab, select the file output format and size you want, and click the Stitch! button to create your new panorama.





Other Methods


You could also use the Flexify 2 Photoshop plugin from Flaming Pear, if the list of projections that Hugin offers is too modest for your taste. But it does cost money and it requires a Photoshop license. OTOH, the list of projections is very impressive. This is actually my go-to tool for reprojecting.


If nobody has the remapping you want to try, and if you're geeky and hands-on with math and code, you could also use the Gimp with the Mathmap plugin. There's a Flickr group dedicated to this.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...