# How can we apply one set of control points for stitching together a panorama to a set of different images with the same camera arrangement?

We are two high school students working on sending a high altitude balloon to 35 km altitude in order to capture panoramic video of Earth. We are exploring the option of using Hugin to stitch our frames. However, we are encountering some issues with the panorama stitching process.

We have three cameras arranged in a triangle (facing 60 degrees away from each other), horizontally. Each camera has a fisheye lens (GoPro Hero 1080), allowing it to see 165 degrees in the horizontal direction. They are fixed together, and do not move relative to each other.

Our plan thus far has been to take control points from a calibration image we capture and apply them to each set of three frames.

We have so far been experimenting with stitching together frames from two cameras. So that we get a good spread of control points over the images, we have been tilting the cameras so that the same landmark can be used for control points in different places in the image.

We have been using a landmark approximately 100m away. We have taken three sets of frames with the landmark (a tall building) in the bottom, middle and top of the frame.

With the building in the bottom, the two frames we used are at: https://i.sstatic.net/AJIk8.jpg https://i.sstatic.net/rirIV.jpg

With it in the middle, the frames we used were https://i.sstatic.net/uaPLD.jpg and https://i.sstatic.net/x165I.jpg

With it at the top, we used https://i.sstatic.net/MuARn.jpg and https://i.sstatic.net/8MGSw.jpg

We stitched each set of frames separately, then created a project file with control points from all three positions together. Using the frames with the landmark at the bottom, the control points from when the landmark was in the other positions don't match the clouds they are over (see https://i.sstatic.net/Ked2R.jpg). The result of this seems acceptable (https://i.sstatic.net/lvX4F.jpg). Using the same control points with the set of frames with the landmark in the middle, the control points match the features they are over better (https://i.sstatic.net/DfOCV.jpg) but the result is not very well stitched (imgur.com/pC30Svd - see the displacement of the van).

Could someone please explain why this is happening, or suggest a way we could apply the same control points to each of our video frames, given that the cameras are in a fixed position in relation to each other?

It seems that this is what the template feature is for.

How can I reuse a project as a template?
If you copy a .pto project to a different folder and open it with hugin, you will be prompted for the 'missing' images. You should delete any control points from this template project since they won't be relevant to the new photos.
Alternatively you can load your images as normal, then Apply template from the File menu, this will import image settings and parameters from a previous project.

http://wiki.panotools.org/Hugin_FAQ#How_can_I_reuse_a_project_as_a_template.3F

Before the template feature was available I think people would edit the .PTO file in a text editor to replace the images with new ones.

You don't actually want to apply the same control points to each set of frames, you want to apply the same positions & geometry offsets. These are optimised from the control points you generate/create.

You may find you can use the command-line tools directly more effectively than loading images in Hugin, once you've done the initial photometric & geometric optimisations for one set of images.