Autopano Video - Tutorials - Stitching with user templates
Until now, to use templates in AVP you had to browse every time to find the .pano file that matched your footage. In AVP 2.6 we introduced a new feature: user templates. Here are two cases when this might come in handy.
Case 1: underwater shooting with Abyss
In our first case, we have used an Abyss rig to shoot some underwater footage. Because these kinds of shots usually have a lot of similarities between images and because of the diffraction created when shooting underwater reduces overlapping areas, the automatic stitcher in AVP has a hard time coping with them. Here is the result you get when trying to do an automatic stitch as “GoPro Hero 3+/4”.
To solve this, we found a moment in the day when we used the Abyss in the exact same configuration (position of the cameras in the rig, resolution and framerate, in this case 1440/60) but when it was out of the water and we had more information in the panorama to create a good stitch. In Autopano Giga, we then saved the stitched pano as “template-1440.pano”. Back into AVP, we opened the preferences and went to the “edition” tab. There you will find the “data location” setting and you can open the correct folder by clicking on the icon.
Go to: “User/Presets/Panoramas” and copy your .pano file in it. Restart AVP.
You will now find it as a stitching option in the dropdown menu next to “open another .pano” in the stitching tab of AVP. In our example, we used our “template-1440.pano” file to stitch together the underwater footage. With this method, the cameras are now all in the appropriate position and you can get a better idea of how the final video will look.
You will notice that there are still some stitching issues in this case. This is normal because a .pano includes some parallax solving that was specific to the situation that helped us create the template (for more information on this, please see this tutorial). You will therefore still need to work on control points and use the different tools provided in the software to improve the stitching. But this should already speed up your workflow when coming back from a complex shoot using a lot of complex cases. In this case, we would recommend creating .pano files that fit each of the different modes you used during your shoot.
Case 2: Stitching a dual lens camera that creates a single file
We have had a lot of requests for support of some dual lens consumer 360° cameras that create a single file containing both images. This is a tricky situation as you can’t stitch from a single file but there are ways to work around it.
The first step in that case will be to duplicate the original file created by the camera.
You can then drag and drop these two files in AVP. At that point, if you try to stitch them together, even if you created a calibration preset or base your stitch on a vaguely similar lens (like a preset made for a GoPro with a modified lens like the Entaniya 220), you won’t get a proper 360 video as the double image will confuse the software.
You therefore need to work a little bit before getting good results with this. Ideally, you will want to create a calibration for your camera to make sure you get the best results possible out of it. See at the bottom for an example of the one we used in this case. But once you know the FOV, K1, K2 and K3 values for your dual lenses camera, you can use them to stitch the footage. The final step in this situation, will be to open the image properties in Autopano Giga by clicking on the icon below.
Then go to the “circular crop” tab and select one part of the image for one of the two video files and the other for the second video file.
You can then go into the Control point editor, select the two images by clicking on them while holding Shift or Command (control on a PC) and start adding control points on the overlapping areas. At this point work on your images adding control points and optimizing until you’re happy with the result.
Once you have a stitch you are satisfied with, select all the control points and delete them, but do not optimize! The goal here is to create a template as blank as possible so you have more flexibility in the future use of your template. Save the file with a name that is specific to the settings and framerate of the sequence. In our example, the output file is a 5K equirectangular video at 30 fps. We then added this in the user panorama folder of AVP (like we did with the abyss example). You will want to create one blank template per mode on your dual lenses camera so you are ready to work with any type of footage you might capture.
The ideal workflow afterward will be to copy the contents of your SD card in a folder, select everything, then copy and paste them in the same folder. You can then drag and drop each pair of identical videos in AVP and use your templates (see in the exemple for download below, using our “stitch as backtoback-5K-30fps” template) to stitch them together. To fine stitch the sequences, you then just need to click on “Edit” and work in APG to add control points and adjust for the different parallax situations.