Lens NPP Calibration

For each camera/lens combination you will be using to capture PanoMoments, you’ll need to create a calibration template file that contains the necessary information to convert from Fisheye projection to Equirectangular projection. This file includes the following information:

  • FOV
  • Crop
  • A/B/C correction coefficients
  • Horizontal/Vertical Shift
  • Horizontal/Vertical Shear

Once you have created this template file, it’s only a few quick easy clicks to batch convert a set of images. There’s really only one adjustment you may need to make every time you convert a set of images. Small knocks/bumps and focus changes can move the image circle on the sensor by a few pixels, and this can be enough to throw off the cropping (this also does technically change other image parameters slightly but you'll never notice it). But that’s it, once you have the template file built, it’s very easy to convert from Fisheye to Equirectangular.

PTGui

  1. Capture a 360 panorama with 12 - 24 images with the camera/lens located on the No Parallax Point. See here for ways to determine where your lens’ NPP is located. Static scenes with the majority of subjects at far distances are ideal for calibration panoramas.
  2. Hit Load images… and select all photos taken during the calibration panorama in Step 1.
  3. Leave Lens Type set to Auto and enter in your lens Focal length and Crop Factor (sensor size will calculate automatically). Now the Lens type selected above should be set correctly. If not, uncheck Auto and manually select the correct lens type. Hit Okay. Don’t worry if PTGui calculates a Hor. Field of View number that doesn’t seem quite right. This will be resolved later.

ptgui1

  1. If you used a circular Fisheye lens, go to the Crop tab and resize the crop circle to align perfectly with the edges of the image data.

ptgui2

  1. Select the Project Assistant tab and Hit Align images…
  2. After a few moments the Panorama Editor should appear with a preview of your panorama. If not, go to the “Tools” dropdown and select the Panorama Editor entry. Don’t worry if there are misalignments.

ptgui3

  1. Go to the “Tools” dropdown and select the Control Point Table. Sort the table by the Distance column in descending order. Hold shift and select all control points that have an error greater than 10. Hit the Delete or Backspace key to remove these selected control points.

ptgui4

  1. Back on the main PTGui window select Advanced on the top right. This will add more tabs to the main window.
  2. Select the Optimizer tab and change the Minimize Lens Distortion setting to “Heavy + lens shift” and then hit the Advanced button on the Optimizer tab and enable "Link roll" and "Link pitch". Now hit the Run Optimizer button. The optimizer results window will pop up showing your average control point distance. Hit OK.

ptgui5 ptgui6

  1. Go back to the Control Point table and again delete all control points with distances greater than 10.
  2. Re-run the optimizer.
  3. Check the Panorama Editor for visual alignment. If everything appears good and the optimizer is reporting good results, move onto step 13. If not, repeat steps 10-12 until good results are achieved.
  4. Select the Panorama Settings tab on the main PTGui window and ensure that the projection is set to Equirectangular (for spherical panoramas). Change the Field of View to be 180 x 180 degrees.
  5. Under the “Project” dropdown menu select the “Align to Grid” entry. The following step will align each image at the exact same location. Remember, PanoMoments are aligned on playback. Ensure the following settings:
    • Apply to: all images - Checked
    • Center horizontally - Checked
    • Center vertically - Checked
    • Spaced by - 0 degrees
    • Roll angle - Unchecked and Set to 0 degrees
    • Adjust panorama field of view and projection to fit the panorama - Unchecked

ptgui7

  1. Select the Create Panorama tab on the main PTGui window
    • Hit “Set optimum size” button
    • Change File Format to your prefered format. We recommend TIFF (8 Bits, Packbits, No Alpha Channel).
    • Change Layers to “Individual layers only”
  2. Go to the “File” dropdown and select “Save as Template” and name this file something easy to remember.
  3. You’re done! Now the PTGui steps to convert to equirectangular are:
    • Load your images
    • Select your template
    • Verify the crop circle is correct and adjust if necessary
    • Select an output directory and hit the “Create Panorama” button

Hugin [In Progress]

  1. Capture a 360 panorama with 12 - 24 images with the camera/lens located on the No Parallax Point. See here for ways to determine where your lens’ NPP is located.
  2. Load all images taken during the calibration panorama in Step 1.
  3. Select the correct Lens Type and enter the HFOV, Focal length, and the Focal length multiplier. If you don’t know the HFOV you can just enter in the lens Focal length and Focal length multiplier, and Hugin will calculate the HFOV for you. Don’t worry if it calculates a number that doesn’t seem quite right. This will be resolved later.
  4. If you used a circular Fisheye lens, select “Advanced” from the Interface dropdown menu and go to the Masks/Crop tab. Select the top image and hit Ctrl+A to select all images. Resize the crop circle to align with the edges of the image data.
  5. Click the "GL Preview" button and then hit Align. This will create control points and align the photos.
  6. On the Control Point tab, verify that the vertical control points are correctly calculated. These are shown when the left/right images are the same (eg. image 0 and image 0). Sometimes Hugin gets the vertical controls points wrong with circular fisheye images. If that happens, just delete the bad ones and recreate several by hand for each photo.
  7. On the Photos tab, set Geometric = "Everything without translation" and then hit "Calculate"
  8. Verify that the panorama looks correct by going back to the GL Preview.
  9. If the alignment is off, go to the Control Points tab and remove any control points with a high error. Also consider adding additional vertical control points.
  10. Once you're satisfied with the alignment, select all of the photos in the Photos tab and right click, and select "Reset->Reset positions". Then go to the Stitcher tab and set the field of view to be 180x180 and hit "Calculate optimal size".
  11. Save the project.
  12. You’re done! Now the Hugin steps to convert to equirectangular are:
    • Load your images
    • Select your template
    • Verify the crop circle is correct and adjust if necessary
    • On the Stitcher tab select "No exposure correction, low dynamic range" and then hit the ”Stitch" button