Sunday, 22 October 2017

Exporting and Processing High Dynamic Range (HDR) MiSphere Photos with Ubuntu




Introduction

Capturing 360 degree photos with the MiSphere 360 is very easy to do - the camera is just point-and-shoot, and the software on your mobile phone does all the rest.  However, if you wish to do some more clever things, such as generate high dynamic range images, the software is lacking.

This note shows how to take bracketted photos with the camera, and merge them together into a single image and convert to a rectilinear photograph.

Take three photos using the Exposure Compensation set to +0, +1.5 and -1.5

MiSphere Camera Exposure Compensation Settings
The following images are examples taken out of a window such that the inside is dark and outside is too bright.  These images will be used for the example in this post.
Three Bracketted Images
Transfer these to a PC.

Use Luminance HDR to generate a HDR image.


Load the three images into Luminance HDR.

The exposure compensation should be automatically detected, but if not, assign the +1.5 to the brightest, and -1.5 to the darkest of the three images.

Luminance HDR Load Images
Select next, and use the default profile to continue.
You will then be presented with the Luminance HDR main window.
Some important things to note here:
  • There are several different Tonemap operators you can select.
  • The Result size by default is tiny (256 x 128 in this example).
Start by selecting a result size of 6912 x 3456 (the same as the input image size).
Then, pick an image on the right that you think may be close to what you want.

I've preferred:
  • Drago
  • Manituk 08

Play around with the sliders, and click on Tonemap to update

When you've got something you like, hit Save As, and your image will be saved as a jpg.  Pick 100% (i.e. no compression) when you save.

Luminance HDR Drago Output

Use Hugin to convert the fisheye images to a rectilinear one

You may think that at this point, you can run the Mi Sphere Camera Windows program under Wine (it does work, by the way).  Unfortunately, it refuses to process images that have been tampered with since they left the camera.

For this, you can make use of a project file.  There are several available - I used the one available from: http://ez-team.com/xiaomi.html.

Copy the pto file into a directory, and open it with Hugin.  It will prompt you for the file, so navigate to the jpg/tif file that was output from Luminance HDR.

Hugin Panorama Stitching
I choose the advanced option, and then select Advanced Mode, and then, in the panorama preview, you can centre the image, and level the horizon.
Then, in the Panorama Stitcher, you can Calculate the Optimal size, and stitch - this will give you a rectilinear output image.

Example High Dynamic Range Output Image

The next steps

Once you have your image, you will probably want to share it.

No comments:

Post a comment