Софтуерно изправяне на панорами с krpano

In this blog post I am going to describe how you can dynamically prealign distorted panoramas shot with Ricoh Theta panoramic solution.

What do we need?
Reading some help:
ExifToolGUI for Windows (that’s what I am using)

When you shoot with Theta, it saves in the exif some special tags which we will use with this newly available for both HTML5 and flash function of KrPano „image.prealign“.
„With the prealign setting the pano image itself can be aligned/rotated. This can be used to correct a miss-aligned pano.“

Making sure we are using the latest exiftool, when you open the panorama photo with the GUI, and under the tab ALL on the right side we will find this under Ricoh label:

2014-07-22 22_32_42-ExifToolGUI - R0010790.JPG

As you can see the panorama itself is pretty distorted:
2014-07-22 22_33_12-R0010790

The magic numbers are written after Accelerometer (87 6) and Compass (202.5).
Let’s make a panorama with krpano 1.17.4 (latest build as of today) and „MAKE PANO (NORMAL) droplet.bat“
This is the panorama xml code out of the box:


Then we add the code for compass+ an action for rotating the compass so it starts from the North. We use the negative number of what is written in the Compass tag in exif. In our case we wrote „-202.5“


Now we have a beautiful compass which shows the correct North position. Example HERE. Things still don’t look quite right though?

And now comes the real magic.


We add the prealign parameter in the image tag of the panorama as shown above. For that purpose we use the two numbers from the Accelerometer exif tag. The first becomes the last and vice versa. Again, we use the negative values of what is written in the exif tag.

And now the misaligned panorama is aligned automatically. Example HERE.

Hope you enjoyed this little hack/tutorial and find it useful.
For more stuff like this follow us on Facebook here: https://www.facebook.com/IGTeamLtd


One comment on “Софтуерно изправяне на панорами с krpano

  • Great article! By the way, it looks like exiftool 9.68 directly understands the Theta meta data and calculates pitch and roll from it:

    $ exiftool -G picture.jpg
    [MakerNotes] Maker Note Type : Rdc
    [MakerNotes] Firmware Version : 1.30
    [MakerNotes] Serial Number : (00000000)00110463
    [MakerNotes] Recording Format : JPEG
    [MakerNotes] Accelerometer : 325 -41
    [MakerNotes] Compass : 337.5
    [Composite] Aperture : 2.1
    [Composite] Image Size : 3584×1792
    [Composite] Ricoh Pitch : -41
    [Composite] Ricoh Roll : -35
    [Composite] Scale Factor To 35 mm Equivalent: 8.0
    [Composite] Shutter Speed : 1/30
    [Composite] Thumbnail Image : (Binary data 3326 bytes, use -b option to extract)
    [Composite] Circle Of Confusion : 0.004 mm
    [Composite] Field Of View : 143.1 deg
    [Composite] Focal Length : 0.8 mm (35 mm equivalent: 6.0 mm)
    [Composite] Hyperfocal Distance : 0.07 m
    [Composite] Light Value : 6.0

Вашият коментар

Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *