Jump to: navigation, search

Autopano Video - Stitching



The videos must have been synchronized before stitching. Please refer to the synchronization page.

Introduction

In the context of 360° video, a stitching includes: lens calibration and rig geometry but also parallax compensation and unsynchronization/rolling shutter compensation.

  • Lens calibration: f, k1, k2, k3 are specific to a camera model, offsets are specific to a camera instance
  • Rig geometry: specific to a rig but not perfectly consistent from an instance to another and from a shooting to another.
  • Parallax compensation: scene and camera orientation specific. i.e. instant specific.
  • Unsynchronization and rolling shutter compensation: camera motion specific. i.e. instant specific.


The last two points are specific to 360° video stitching and make the choice of the instant for stitching very important.

Settings stitch@2x.png Stitching options window:

Stitching options




Optimizer configuration

Autopano Video Pro- -Stitch-As.png

Stitch as

  • GoPro Hero 3+/4 (default): this is the recommanded option. Choose the preset corresponding to your cameras. See the below Camera Presets chapter for more information.
  • Template panorama (template stitching): no computation will be done, the given .pano will be used to place the cameras. The panorama used as a template must contain the same number of videos as the current running project. Some templates are available on this tutorial: Template Stitching of standard GoPro Rig. Because the geometry is not perfectly consistent from an instance of rig to another and from a shooting to another, this is not the recommanded option.
  • Lens model : This mode allows to stitch videos depending on custom settings to define:
Stitch as...

focal (35 equiv)
Shows the focal length equivalent to a 35mm lens.


Lens type
Defines the type of lens used: Standard or Fisheye.





Frames to use

In Autopano Video, the stitching of input videos is performed by the Autopano stitching engine on extracted frames. You can choose between two options:

Autopano Video Pro- -StitchAt.png

Stitch at

  • "Current position": only one frame per source video will be extracted and used for stitching. This is the fastest option but not the recommended one if the cameras are not static. The frames used are the ones of the timeline current time.
    • Number of position to use: lets you increase the number of frames to use

The best moment for stitching is:

    • No motion of the cameras: when the cameras are not moving, you suffer no more of residual desynchronization, rolling shutter and motion blur.
    • No close object: if you stitch videos coming from a camera rig, nodal points of the cameras cannot be perfectly superimposed. Then, the stitching will compensate the parallax in a way that is too specific to the current surrounding 3D scene. The less you have close objects the less the stitching will be instant-specific.
    • Visual information: the current time must not suffer of a lack of visual content due to blue sky, uniform color walls...
  • "Current selection": this is the recommended option. The stitcher will use several frames to compute an optimal stitch. The number of frames to use per video can be modified. If the motions have been previously computed, they will be used to choose moments with less motion.





Camera Presets

The camera presets let you configure the stitching optimizer with advanced options. The presets let you define the lens type (fisheye or standard), initial focal and distorsion values, enable or disable their estimation, and choose their scopes.

Presets location

The presets are defined by XML files.
Their locations are:

  • Windows: Open File explorer, go to Users, user_name, AppData (hidden folder), Local, Kolor, Autopano Video ProXX, Kolor, Presets, Cameras
  • OSX: Open the Finder, hold Alt key, open Go menu, select Library, Application support, Kolor, /AutopanoVideo<version>/Kolor/Presets/Cameras/
  • You can also find this folder from Autopano Video > Edit > Settings > Data Folder and clicking on the folder icon.


The Kolor directory contains the presets defined by Kolor. They can't be modified as they are re-written at each launch of Autopano Video.
The User directory contains your personal presets. This directory is empty at Autopano Video installation. If a preset file with the same name as a Kolor preset is added here, it will be used instead of the default Kolor one.


Presets specification

  • The name attribute of the camera tag is the one appearing in Autopano Video presets list.
  • The type attribute of the lens tag can be "fisheye" or "standard"
  • The optimize attribute of the focal, disto and offset tags can be "yes" or "no": it tells if the parameter must be estimated or forced at specified value
  • The scope attribute of the focal, disto and offset tags can be "pano" or "image"
  • The value attribute is a real number picked from a nodal point calibration result with Autopano: http://www.kolor.com/wiki-en/action/view/Autopano_-_Panorama_Editor_-_Layers_Editor


As an example, here is the XML preset file for generic GoPro cameras rigs:

<camera name="GoPro">
    <parameters>
        <lens type="fisheye"/>
        <focal value="16.56" optimize="yes" scope="pano"/>
        <disto optimize="yes" scope="pano" level="2">
            <k1 value="0.087"/>
            <k2 value="0.029"/>
            <k3 value="-0.022"/>
        </disto>
        <offset optimize="yes" scope="image"/>
    </parameters>
</camera>

Use case: the back-to-back example

In the case of 2 back-to-back cameras, the overlap is not sufficient for estimating correct lens distorsion values.

ScreenAPG CtrlsPoints.png

Using the generic "Stitch As GoPro" preset, the stitching seems good at first sight, but Autopano has converged to very high distortion values:

ScreenAPG stitchAsGoPro res.png
Result obtained without specifying the lens calibration to the optimizer


Using a preset with a proper calibration for this lens, the result is much better:

ScreenAPG stitchAsPreset res.png
Result obtained when specifying the proper lens calibration to the optimizer





RMS curve

Computing the RMS

Autopano Video Pro- -StitchingOptions - RMS.png

As seen in introduction, the optimal stitching is time-dependant. The RMS curve allows to validate and fix the sticthing where necessary. To compute the RMS, select a range with the current selection interval and hit the "RMS" button of the "Stitching" track.
A high RMS value (above the second stroke) means that you are likely to see parallax artifacts at video boundaries.

RMScurve.png

Fixing the stitching

If the stithing is modified after RMS has been computed, the RMS curve will be obselete and, thus, drawed in lighter grey. Hit the "RMS" button to update it. An update is much faster than a first computation.

  1. Find a high RMS zone you want to fix
    RMScurve0.png

  2. Insert two transitions
    RMSavant1.png

  3. Compute a new stitch using the current selection
    RMSavant2.png

  4. Update the RMS curve
    RMSapres.png



BACK TO: Documentation / Autopano Video Documentation