360°-3D-PANORAMA

Einführung

Beginnend mit der Version COSIMA 0.9i2 (64 Bit) unterstützt Cosima die Berechnung von Panoramabildern aus zwei Rundum-Videos entsprechend der Flat Stitching-Methode. Bei dieser Methode werden jeweils nur die mittleren senkrechten Pixelzeilen eines Videoframes verwendet.

Introduction

Starting with the COSIMA 0.9i2 (64 bit) version, Cosima supports the computation of panoramic images from two around videos according to the flat stitching method. With this method only the middle vertical pixel lines of a video frame are used.

Installation

Die Installation der Cosima Complete-Version 0.9i2 oder höher ist notwendig und hinreichend, siehe Archiv.

Installation

The installation of Cosima Complete version 0.9i2 or higher is necessary and sufficient, please see archive.

Tutorial

Im Video Tutorial Nr. 7 wird die Herstellung eines Panoramalbildes aus Rundumvideos vorgestellt, siehe Tutorials. Dort findet man auch das Material zum Tutorial.

Tutorial

Video Tutorial no.7 introduces how to make a panoramic image from omnidirectional video, see Tutorials (only German language). There you can also find the material for the tutorial.

Input-Videos

Anfang und Ende der Input-Videos sollten sich leicht überdecken; eine Überlappen von 10° hat sich bewährt, das Video sollte also idealerweise einen Bereich von 0° bis 370° abdecken. Die Videos für das Beispielbild unten hatten eine Länge von 5 Minuten. Es sind auch kürzere oder längere Videos möglich, allerdings muß bei kürzeren Laufzeiten mit Qualitätseinbußen gerechnet werden. Es empfiehlt sich, zuerst das Video zu starten und dann erst die Rotation zu beginnen. Das Video wird beendet, nachdem die Rotation bei 370° gestoppt hat.

(Als Richtlinie für die Länge des Videos soll hier die Empfehlung ausreichen, die Rotationsgeschwindigkeit so zu berechnen, dass je Frame etwa ein Pixel weitergedreht wird. Bei FullHD-Hochkant entstehen so typischerweise Bilder mit einer Auflösung von 10000x1920 Pixel. Ein Video mit 10000 Frames dauert bei 30fps etwa 5 Minuten.)

Input videos

The beginning and the end of the input videos should overlap slightly; an overlap of 10 degree has proven effective, so the video should ideally cover a range from 0 degree to 370 degree. The videos for the example image below had a length of 5 minutes. Shorter or longer videos are also possible, however, with shorter runtimes you have to expect a loss of quality. It is recommended to start the video first and only then start the rotation. The video shall end after the rotation has stopped at 370 degree.

(As a guideline for the length of the video, the recommendation here should suffice, to calculate the rotation speed in such a way that per frame about one pixel is rotated further. With FullHD upright, this typically results in images with a resolution of 10000x1920 pixels. A video with 10000 frames takes about 5 minutes at 30fps.)

Kamera

Die finale Qualität ist abhängig von der Auflösung des Videos in der Höhe. Ideal ist also ein 4k-Videogespann in Hochformat. Aber auch mit einfacheren Kameras sind schon beeindruckende Ergebnisse möglich. Das Bild von Lanzarote wurde z.B. mit folgendem einfachem Setup aufgenommen:

Camera

The final quality depends on the height resolution of the video. So, the ideal might be a 4k video camera pair in portrait format. But even with simpler cameras, impressive results are possible. The picture of Lanzarote for example was taken with the following simple setup:

Leistung

Die Software leistet folgendes:
  1. Anfang und Ende der Panoramavideos werden automatisch gefunden und überblendet, um auch bei Belichtungswechsel keine Schnittkante zu erzeugen.
  2. Bei ungleichmäßiger ruckeliger Rotation wird das Video deshaked, ungleichmäßige Drehungen werden also herausgerechnet.
  3. Die üblichen stereoskopischen geometrischen Fehler wie Größenfehler, Höhenfehler, Rotationsfehler und Vergenzfehler werden automatisch korrigiert.
  4. Das Scheinfenster wird entsprechend den Vorgaben gesetzt.
  5. Jeweils gleiche Pixelinformationen aus mehreren Frames werden zusammengerechnet, um Bildrauschen und Kompressionsartefakte zu eliminieren.
  6. Die Bearbeitungszeit eines 5 min-Videos aus der TZ10 (Hochkant 1280 Pixel) dauert etwa 5-6 Minuten CPU Zeit, bei 4k-Videos sollte etwa 1 Stunde eingeplant werden.
  7. Eine Logo-Einblendung im Panoramabild findet nicht statt.

Performance

The software performs the following:
  1. The beginning and the end of the panoramic videos are automatically found and blended not to create a cut edge even when the exposure changes.
  2. In case of uneven jerky rotation the video is deshaked, uneven rotations are thus calculated out.
  3. The usual stereoscopic geometric errors such as size errors, height errors, rotation errors and vergence errors are automatically corrected.
  4. The stereoscopic window is set according to the specifications.
  5. Equal pixel information from multiple frames are added together to eliminate image noise and compression artifacts.
  6. The processing time of a 5 min video from the TZ10 (portrait 1280 pixels) takes about 5-6 minutes of CPU time, for 4k videos allow about 1 hour.
  7. A logo overlay in the panorama image does not take place.

Bedienung

Folgende Bedienungs-Sequenz wird empfohlen:
  1. Starte den AviSynth Scriptgenerator, resette alle Parameter für Video und erzeuge die avs-Scripte mit der Option Deshake.
  2. Setze für die Hochkant-Orientierung die Cosima-Parameter RotMirInputLeft = RotMirInputRight = 1 (oder bei Bedarf je nach Kameramontage RotMirInputLeft = RotMirInputRight = 3).
  3. Setze den Parameter AviOutput = 10.
  4. Setze den Parameter AnalyseIncrement = 100.
  5. Setze die Parameter SmoothGeometryCorr = SmoothWindowCorr = 0.
  6. Setze den Parameter DeshakeMethod = 1.
  7. Setze den Parameter DeshakeZoomMax = 0.
  8. Setze den Parameter DeshakeFilter X = 0.
  9. Setze den Parameter DeshakeFilter Y = 1.
  10. Setze den Parameter DeshakeFilter Rot = 5.

Operation

. The following operation sequence is recommended:
  1. Start the AviSynth script generator, reset all parameters for video and create the avs scripts with the Deshake option.
  2. Set the Cosima parameters RedMirInputLeft = RedMirInputRight = 1 for the portrait orientation (or if needed, depending on the camera mounting, RedMirInputLeft = RedMirInputRight = 3).
  3. Set the parameter AviOutput = 10.
  4. Set the parameter AnalyseIncrement = 100.
  5. Set the parameters SmoothGeometryCorr = SmoothWindowCorr = 0.
  6. Set the parameter DeshakeMethod = 1.
  7. Set the parameter DeshakeZoomMax = 0.
  8. Set the parameter DeshakeFilter X = 0.
  9. Set the parameter DeshakeFilter Y = 1.
  10. Set the parameter DeshakeFilter Rot = 5.

Ergebnis

Als Ergebnis erhält man nach dem Cosimalauf vier unkomprimierte Bilder im Bitmapformat (die man sich bei Bedarf natürlich auch noch komprimieren kann). Die Panoramabilder werden als cl-, cr-, cs- und ca-Bilder (in einem cp-Unterverzeichnis) erzeugt. Die Auflösung der Panoramabilder hängt von der Videoauflösung und der Brennweite ab. Sie beträgt typisch für HD 6000x1280 Pixel, für FullHD 10000x1920 Pixel und für 4k 20000x3840 Pixel. Achtung, die erzeugten Bilder können sehr groß werden: ein 4k-cs-Bild mit 40000x3840 Pixel (150 Megapixel) benötigt etwa 1/2 GByte Speicherplatz. Die geometrische Bildkorrektur reduziert die Auflösung in der Bildhöhe noch um einige Pixel, wobei diese Reduktion von Bild zu Bild variiert und nicht ausgeglichen wird. Die Breite des Panoramabildes wird durch eine Analyse der Videos automatisch ermittelt.

Result

. As a result you get after the cosimal run four uncompressed images in bitmap format. (which of course can be compressed if needed). The panorama images are generated (in cp-subdirectory) as cl-, cr-, cs- and ca-images. The resolution of the panorama images depends on the video resolution and the focal length. It is typically 6000x1280 pixels for HD, 10000x1920 pixels for FullHD 20000x3840 pixels for 4k. Attention, the generated images can become very large: a 4k-cs-image with 40000x3840 pixels (150 megapixels) requires nearly 1/2 GByte of memory. The geometric image correction reduces the resolution in the image height by a few pixels, whereby this reduction varies from image to image and is not compensated. The width of the panoramic image is determined automatically by analyzing the videos.

Beispiel

"Vulkane auf Lanzarote", linke Ansicht und Anaglyphenbild, aufgenommen mit einer TZ10, Auflösung 5416x1269 Pixel. Die Bildstörungen unten Mitte sind Schatten des Stativs und wären bei etwas mehr Sorgfalt vermeidbar gewesen... Bitte die Bilder anklicken für eine Vollformatansicht.

Example

. "Volcanoes on Lanzarote", left view and anaglyph image, taken with a TZ10, resolution 5416x1269 pixels. The image imperfections at the bottom center are shadows of the tripod and would have been avoided with a little more care... Please click on the images for a full size view.



© Gerhard P. Herbig, Feb 2021,     back to cosima homepage