Difference between revisions of "Extract and insert rectilinear views"

From PanoTools.org Wiki
Jump to navigation Jump to search
m (Pointed to new mirror)
(40 intermediate revisions by 9 users not shown)
Line 1: Line 1:
=== Intro ===
+
== Intro ==
 
One of the most problematic points when shooting spherical panoramas is the view straight down also called the nadir view. Either the tripod is visible or there may be alignment or color mismatches if shooting handheld.  
 
One of the most problematic points when shooting spherical panoramas is the view straight down also called the nadir view. Either the tripod is visible or there may be alignment or color mismatches if shooting handheld.  
  
Unfortunately neither the nadir nor the zenith (straight above) area can be edited directly in the [[equirectangular]] image since it is very distorted. For this taske we need to extract a partial view - best in rectilinear projection.
+
Unfortunately neither the nadir nor the zenith (straight above) area can be edited directly in the [[equirectangular]] image since it is very distorted. For this task we need to extract a partial view - best in [[Rectilinear Projection]].
  
=== Possibilities ===
+
== Warning ==
 +
<b>Important!</b> For all transformations that use non-overlapping images like assembling cube faces to an [[equirectangular]] image the 'Fast transform' option should be disabled. As a default 'Fast transform' is disabled for the [[Panorama Tools Plugins]] and for [[PTEditor]]. However, it is enabled by default for some of the GUIs ([[PTGui]] f.e.)
  
There are basically three possibilities to extract partial rectilinear views:
+
Fast Transform can cause the loss of some pixels in the corners of an [[Rectilinear Projection|rectilinear]] image which will be visible as small triangular black holes in the result image. More on 'Fast Transform' on [http://www.fsoft.it/panorama/pano12.htm Fulvio Senore's page].
* PTEditor
 
* Panotools Plugins
 
* PTStitcher used directly or indirectly by script or batch file, GUI or PanoCube Plus
 
  
==== PTEditor ====
+
PTGui 5 has a new internal stitcher which causes a similar effect even if Fast Transform is switched off. <b>Don't use PTGui 5 internal stitcher to assemble cubefaces!</b> Choose "Panotools Stitcher" (PTStitcher) instead.
PTeditor is a Java application provided with the standard Panotools distribution. It should run on any OS where Java and the panotools runtime (pano12) is installed. There is a nice tutorial on [[How to use PTEditor]]. This is the most convenient way to extract and insert any arbitrary rectilinear view. The disadvantage is that it doesn't save 16 bit images.
 
  
==== Panotools plugins ====
+
== Possibilities with panotools ==
The [[Photoshop]] compatible [[Panorama Tools Plugins]] are part of the standard Panotools distribution as well. There is an upgraded version available from [http://epaperpress.com/ptplugins/index.html Thomas Niemann] that corrects some bugs and works for 16 bit.
+
There are basically three possibilities to extract partial [[Rectilinear Projection|rectilinear]] views with panorama tools:
 +
* [[PTEditor]]
 +
* [[Panorama Tools Plugins]]
 +
* [[PTStitcher]] or [[nona]] used directly or indirectly by script or batch file, GUI or [[PanoCube]] Plus
  
The plugins contain the Adjust filter, which is capable of extracting and inserting any view in almost any projection. Any data (pan/tilt angle, size of view etc.) has to be inserted manually. Yaw, roll and pitch value have to be calculated or estimated which makes the usage a bit inconvenient.  
+
=== PTEditor ===
 +
[[PTEditor]] is a [[Java]] application provided with the standard [[Panorama Tools]] distribution. It should run on any OS where Java and the panotools runtime (the [[pano12]] library) are installed. There is a nice tutorial on [[How to use PTEditor]]. This is the most convenient way to extract and insert any arbitrary [[Rectilinear Projection|rectilinear]] view. The disadvantage is that it doesn't save 16 bit images.
  
<b>(More text of an experienced plugin user needed here)</b>
+
=== Panotools plugins ===
 +
The [[Photoshop]] and [[Gimp]] compatible [[Panorama Tools Plugins]] are part of the standard Panotools distribution as well. The most recent version that corrects some bugs and works for 16 bit is available as part of the panotools download from [http://sourceforge.net/projects/panotools/ panotools sourceforge page].
  
==== PTStitcher ====
+
The plugins contain the [[Panorama Tools Plugins#Adjust|Adjust]] filter, which is capable of extracting and inserting any view in almost any projection. Any data (pan/tilt angle, size of view etc.) has to be inserted manually. Yaw, roll and pitch value have to be calculated or estimated which makes the usage a bit inconvenient.
PTStitcher supports 16 bit images and can be used to extract and insert partial views in different ways.  
+
 
 +
However, extracting and inserting [[Zenith]] or [[Nadir]] is straightforward and relatively easy. [[Helmut Dersch]] has outlined the basic workflow in [http://www.panotools.org/dersch/panorectilinear/panorectilinear.html Extracting Rectilinear Images from Panoramas]. You need to do the following:
 +
 
 +
==== Extracting ====
 +
* Load the [[Equirectangular]] image in [[Photoshop]] (or any plugins compatible image editor).
 +
* Choose 'Adjust' or 'PTAdjust' from the Filter menu.
 +
* Press the small 'Prefs' button in the upper right corner.
 +
* In the following dialog uncheck option (a) and check options (b) and (c) (see [[Panorama Tools Plugins#Preferences|plugins description for details]])
 +
* confirm with 'Ok'
 +
* check 'Extract', check 'Use Options' and press 'Set'
 +
* In the following dialog there is an upper part called 'Image:' and a lower one called 'Panorama'
 +
* In the 'Image' section:
 +
** Set HFOV 90 for a cube face (or any other Field of View to your need).
 +
** Choose 'Width' and 'Height' appr. 1/3 of the source image width in order to not degrade image because of too low resolution.
 +
** Choose 'Format: Rectilinear'
 +
** Set 'Yaw' and 'Roll' to 0.0
 +
** Set 'Pitch' to -90 for [[Nadir]] or 90 for [[Zenith]]
 +
* In the 'Panorama' section:
 +
** Set HFOV to 360 for a full sphere.
 +
** Leave 'Width' and 'Height' empty (will be read from the image)
 +
** Check 'Save to Buffer' if you want to merge the result into your pano later.
 +
** Choose Format: PSphere (which means [[Equirectangular]])
 +
** Uncheck 'Load Buffer' to avoid loading of previously saved images.
 +
* Press 'Ok' twice to perform the transformation
 +
 
 +
The result image will be loaded into a new window where you can edit it as any other image.
 +
 
 +
==== Inserting ====
 +
Once you are done with editing the image you can either insert it back to your orignal pano or load it as a masked layer.
 +
 
 +
===== Merging =====
 +
You need to have checked 'Save to Buffer' in order to be able to merge the result into your pano.
 +
* With the edited rectilinear image as foremost (active) document open Adjust or PTAdjust dialog from the  filter menu.
 +
* Choose 'Insert' and 'Use Options' and press 'Set'
 +
* in the following dialog leave anything as is or set it to the values described in the Extracting part if you changed them meanwhile with these exceptions:
 +
* In the 'Panorama' section:
 +
** Uncheck 'Save to Buffer'
 +
** Check 'Load Buffer'
 +
** check 'or paste'
 +
** Choose 'Color Correction: none'
 +
** Set 'Feather:' to a small value or 0
 +
* Press 'Ok' twice to perform the transformation ans merging.
 +
 
 +
===== Loading as layer =====
 +
Sometimes it might be usefull to load only the transformed Nadir or Zenith image in order to insert it as a new layer into a panorama.
 +
* With the edited rectilinear image as foremost (active) document open Adjust or PTAdjust dialog from the  filter menu.
 +
* If you changed any settings since extracting the image set them as described under Extracting.
 +
* Press 'Ok' to perform the transformation
 +
 
 +
The image is loaded as a document containing an [[alpha channel]] with the mask. In photoshop you can move this into a masked layer:
 +
* In the layers palette double click the layer thumbnail in order to create a layer from background.
 +
* Choose 'Load Selection' from the 'Select' menu.
 +
* Choose 'Channel: Alpha 1' as new selection and press 'Ok'
 +
* Click the 'Add vector mask' button in the bottom line of the layers palette.
 +
* Shift-Drag (pres and hold the shift key after started dragging) the layer from the layers palette to your original panorama.
 +
 
 +
=== PTStitcher ===
 +
[[PTStitcher]] supports 16 bit images and can be used to extract and insert partial views in different ways.  
 
* By directly scripting it.
 
* By directly scripting it.
* With PanoCube Plus
+
* With [[PanoCube]] Plus
 
* By one of it's GUIs ([[PTGui]], [[PTAssembler]], [[Hugin]], [[PTMac]]...)  
 
* By one of it's GUIs ([[PTGui]], [[PTAssembler]], [[Hugin]], [[PTMac]]...)  
  
===== Scripts =====
+
[[nona]] is a free alternative to [[PTStitcher]] that can be used as a drop-in replacement if [[PTStitcher]] is not available.
There are sevaral scripts or batch files available that extract 6 cube faces from an equirectangular image. One of the most convenient windows batch file is written by Eric Gerds and part of his [http://www.pinlady.net/vr/#anchor3 DOS Utilities for Panoramas]. A less convenient batch file is found on [http://www.erik-krause.de/ttt Erik Krause's ] page. PTStitcher scripts are found on [http://www.path.unimelb.edu.au/~bernardk/tutorials/360/readme/scripts.html Ben Kreunen's ] page
+
 
 +
==== Scripts ====
 +
There are several scripts or batch files available that extract 6 cube faces from an [[Equirectangular Projection]] image. One of the most convenient windows batch file is written by Eric Gerds and part of his [http://www.pinlady.net/vr/#anchor3 DOS Utilities for Panoramas]. A less convenient batch file is found on [http://www.erik-krause.de/ttt Erik Krause's ] page. [[PTStitcher]] scripts are found on [http://www.path.unimelb.edu.au/~bernardk/tutorials/360/readme/scripts.html Ben Kreunen's ] page
  
===== PanoCube Plus =====
+
==== PanoCube Plus ====
[[PanoCube Plus]] can extract six cube faces (single, batch modes) for editing and then convert it directly into QuickTime cubic movie(s). Both 8/16 bits per channel are supported - dependend from pano12 library used the cube faces are the same bit depth as the source images.  
+
[[PanoCube]] Plus can extract six cube faces (single, batch modes) for editing and then convert it directly into [[QTVR]] cubic movie(s). Both 8/16 bits per channel are supported - depending on the [[pano12]] library used the cube faces are the same bit depth as the source images.  
  
 
To activate "equirectangular to 6 cube faces" mode copy the file <code>Script.txt</code> to the folder where your source image is and set "1" as first character in this line using a text editor (notepad!):
 
To activate "equirectangular to 6 cube faces" mode copy the file <code>Script.txt</code> to the folder where your source image is and set "1" as first character in this line using a text editor (notepad!):
Line 37: Line 98:
 
<pre>1  # create tiles for editing ( 0 = NO, 1 = YES). Default NO.</pre>
 
<pre>1  # create tiles for editing ( 0 = NO, 1 = YES). Default NO.</pre>
  
in the file <code>Script.txt</code> and put it into pano's folder. Next drag and drop your single pano or folder with panos onto the program icon. The source file name and path should contain no spaces. The source image must be exactly in 2:1 format (f.e. 2000x1000 or 6000x3000 pixels). Panocube calls PTStitcher 6 times and creates 6 files in the order front, right, back, left, top, bottom and replaces the last two characters of the name with 11, 22, 33, 44, 55, 66. All files ended with 55 are represent zenith view, ended with 66 - nadir view.
+
in the file <code>Script.txt</code> and put it into pano's folder. Next drag and drop your single pano or folder with panos onto the program icon. The source file name and path should contain no spaces. The source image must be exactly in 2:1 format (f.e. 2000x1000 or 6000x3000 pixels). [[PanoCube]] calls [[PTStitcher]] 6 times and creates 6 files in the order front, right, back, left, top, bottom and replaces the last two characters of the name with 11, 22, 33, 44, 55, 66. All files ended with 55 are represent zenith view, ended with 66 - nadir view.
  
After editing drag again any one (not all!) tile or folder with tiles to get QuickTime cubic movie(s). In batch mode important to have first six letters differ in filenames, otherwice PanoCube can skips "similar" files.
+
After editing drag again any one (not all!) tile or folder with tiles to get [[QTVR]] cubic movie(s). In batch mode important to have first six letters differ in filenames, otherwice PanoCube can skips "similar" files.
  
This technique is good if the final product is a QT movie. If you need an equirectangular for PTViewer you can of course drag the .mov file on panocube plus to get it converted, but image quality suffers because of intermediate jpeg compression and decompression and another interpolation step.
+
This technique is good if the final product is a [[QTVR]] movie. If you need an equirectangular for PTViewer you can of course drag the .mov file on panocube plus to get it converted, but image quality suffers because of intermediate [[JPEG]] compression and decompression and another [[interpolation]] step.
  
===== Inserting cubefaces again =====
+
==== Inserting cubefaces again ====
 
You can assemble the cube faces again using the [[PTGui]] template from http://www.erik-krause.de/ttt or the batch file from Eric Gerds: [http://www.pinlady.net/vr/#anchor3 Dos for Panoramas].  
 
You can assemble the cube faces again using the [[PTGui]] template from http://www.erik-krause.de/ttt or the batch file from Eric Gerds: [http://www.pinlady.net/vr/#anchor3 Dos for Panoramas].  
  
 
You can even remap only one cube face to equirectangular and insert it as an additional layer into your layered photoshop document.  This has several benefits:  
 
You can even remap only one cube face to equirectangular and insert it as an additional layer into your layered photoshop document.  This has several benefits:  
* no additional interpolation for the rest of the panorama.  
+
* no additional [[interpolation]] for the rest of the panorama.  
 
* possibility to patch nadir in a relative early stage of editing thus leaving open any possibility of correcting over all colors etc.
 
* possibility to patch nadir in a relative early stage of editing thus leaving open any possibility of correcting over all colors etc.
 
* preserving as much as possible of the original image data
 
* preserving as much as possible of the original image data
  
To re-insert the patched cubeface into the original document implies that you have worked on a cube face with enough resolution, preferable the pixel width divided by 3.14
+
To re-insert the patched cubeface into the original document implies that you have worked on a cube face with enough resolution, preferable the pixel width of the original pano divided by 3.
  
You can use the batch file or [[PTGui]] template mentioned above. You simply have to set output size equal to your original panorama size and create single image TIFFs as output. Any of those TIFF files can be added to the original panorama as a masked layer using the "Tiff to masked layers" action from http://www.erik-krause.de/ttt
+
You can use the batch file or [[PTGui]] template mentioned above. You simply have to set output size equal to your original panorama size and create single image [[TIFF]]s as output. Any of those [[TIFF]] files can be added to the original panorama as a masked layer using the "Tiff to masked layers" action from http://www.erik-krause.de/ttt
  
 
To use any of the other GUIs you need to  
 
To use any of the other GUIs you need to  
 
* Add the cube face as input image
 
* Add the cube face as input image
* specify rectilinear and FoV 90� for input images
+
* specify [[Rectilinear Projection|rectilinear]] and FoV 90° for input images
 
* set all lens correction parameters to 0.0
 
* set all lens correction parameters to 0.0
 
* specify the correct yaw and pitch values for the particular image:
 
* specify the correct yaw and pitch values for the particular image:
Line 66: Line 127:
 
</pre>
 
</pre>
 
* specify the correct output size.
 
* specify the correct output size.
* specify Tiff without mask or feather (TIFF_m) as output format.
+
* specify [[TIFF]] without mask or feather (TIFF_m) as output format.
 
* don't set control points and don't optimize
 
* don't set control points and don't optimize
 
* create the panorama
 
* create the panorama
  
===== GUI =====
+
==== GUI ====
All of the GUIs should be capable of extracting an arbitrary rectilinear view from a spherical pano. Use the equirect image as input (don't forget to set the correct FoV) and specify a rectilinear image with 90� as output "panorama". Set all lens correction parameters to 0.0. Then change yaw and pitch of the input image until you get the desired view. Note that the values work the other way round than when inserting an image.
+
All of the [[GUI front-ends]] should be capable of extracting an arbitrary [[Rectilinear Projection|rectilinear]] view from a spherical pano. Use the equirect image as input (don't forget to set the correct FoV) and specify a rectilinear image with 90° as output "panorama". Set all lens correction parameters to 0.0. Then change yaw and pitch of the input image until you get the desired view. Note that the values work the other way round than when inserting an image.
  
====== PTGui ======
+
==== PTGui ====
 
[[PTGui]] offers an additional advantage: The panorama editor and numerical transform. To use it load your image as described above, open panorama editor and choose 'Numerical Transform' from the edit menu.  
 
[[PTGui]] offers an additional advantage: The panorama editor and numerical transform. To use it load your image as described above, open panorama editor and choose 'Numerical Transform' from the edit menu.  
  
To pan along the horizon f.e. in 20� steps insert 20 into the 'Yaw' field and press 'Apply' repeatedly until you get the desired view. Positive values pan right, negatives left.  
+
On the 'Panorama Settings' tab don't forget to uncheck 'Use fast transform' (for details see [[#Warning|Warning]] at top of page).
 +
 
 +
To pan along the horizon f.e. in 20° steps insert 20 into the 'Yaw' field and press 'Apply' repeatedly until you get the desired view. Positive values pan right, negatives left.  
  
Do the corresponding for 'Pitch' and 'Roll' if needed. This way you can extract any partial view. Once your are done create the "Panorama" (which is the desired partial view) using output format TIFF. Note down or save the exact values for Yaw, Roll and Pitch as shown on 'Image Parameters" tab page.
+
Do the corresponding for 'Pitch' and 'Roll' if needed. This way you can extract any partial view. Once your are done create the "Panorama" (which is the desired partial view) using output format [[TIFF]]. Note down or save the exact values for Yaw, Roll and Pitch as shown on 'Image Parameters" tab page.
  
Now edit the partial view to your need. Then add it to the project  with your original panorama and on 'Panorama settings' tab change to equirectangular and 360�x180�. Choose individual lens parameters for the new image on 'Lens settings' tab and set 'Rectilinear' and 90� on 'Image parameters' tab. The image should fit now perfectly in the original panorama.
+
Now edit the partial view to your need. Then add it to the project  with your original panorama and on 'Panorama settings' tab change to equirectangular and 360°x180°. Choose individual lens parameters for the new image on 'Lens settings' tab and set 'Rectilinear' and 90° on 'Image parameters' tab. The image should fit now perfectly in the original panorama.
  
 
In order to move the panorama back to it's original position go to panorama editor again and choose 'Numerical transform'. Now Enter the exact values for Yaw, Roll and Pitch you previously saved or noted down. The panorama should move back to it's original position now.  
 
In order to move the panorama back to it's original position go to panorama editor again and choose 'Numerical transform'. Now Enter the exact values for Yaw, Roll and Pitch you previously saved or noted down. The panorama should move back to it's original position now.  
Line 86: Line 149:
 
You can create either the complete panorama or the partial view only. Choose the size of the original panorama for output.
 
You can create either the complete panorama or the partial view only. Choose the size of the original panorama for output.
  
--[[User:Erik Krause|Erik Krause]] 18:30, 20 Mar 2005 (EST)
+
There are two templates available for conveniently extract and insert the floor cube face using this technique from [http://erik-krause.de/ttt#Bodenbild_extrahieren http://erik-krause.de/ttt]
 +
 
 +
== Other possibilities ==
 +
* The free [http://www.superrune.com/technical/software_supercubic.php Super Cubic plugin] for photoshop extracts and inserts both [[zenith]] and [[nadir]].
 +
* A video tutorial using Photoshop actions and PTGui templates can be found here: [http://www.youtube.com/watch?v=owq7kaXMTTk Nadir patching in Photoshop with actions and PTGui templates]
 +
* A two parts [http://panospace.wordpress.com/2008/03/18/edit-the-nadir/ tutorial] with [[Hugin]]  
 +
[[Category:Tutorial:Basic need]]
 +
 
 +
{{Incomplete|Talk}}

Revision as of 01:56, 22 May 2011

Intro

One of the most problematic points when shooting spherical panoramas is the view straight down also called the nadir view. Either the tripod is visible or there may be alignment or color mismatches if shooting handheld.

Unfortunately neither the nadir nor the zenith (straight above) area can be edited directly in the equirectangular image since it is very distorted. For this task we need to extract a partial view - best in Rectilinear Projection.

Warning

Important! For all transformations that use non-overlapping images like assembling cube faces to an equirectangular image the 'Fast transform' option should be disabled. As a default 'Fast transform' is disabled for the Panorama Tools Plugins and for PTEditor. However, it is enabled by default for some of the GUIs (PTGui f.e.)

Fast Transform can cause the loss of some pixels in the corners of an rectilinear image which will be visible as small triangular black holes in the result image. More on 'Fast Transform' on Fulvio Senore's page.

PTGui 5 has a new internal stitcher which causes a similar effect even if Fast Transform is switched off. Don't use PTGui 5 internal stitcher to assemble cubefaces! Choose "Panotools Stitcher" (PTStitcher) instead.

Possibilities with panotools

There are basically three possibilities to extract partial rectilinear views with panorama tools:

PTEditor

PTEditor is a Java application provided with the standard Panorama Tools distribution. It should run on any OS where Java and the panotools runtime (the pano12 library) are installed. There is a nice tutorial on How to use PTEditor. This is the most convenient way to extract and insert any arbitrary rectilinear view. The disadvantage is that it doesn't save 16 bit images.

Panotools plugins

The Photoshop and Gimp compatible Panorama Tools Plugins are part of the standard Panotools distribution as well. The most recent version that corrects some bugs and works for 16 bit is available as part of the panotools download from panotools sourceforge page.

The plugins contain the Adjust filter, which is capable of extracting and inserting any view in almost any projection. Any data (pan/tilt angle, size of view etc.) has to be inserted manually. Yaw, roll and pitch value have to be calculated or estimated which makes the usage a bit inconvenient.

However, extracting and inserting Zenith or Nadir is straightforward and relatively easy. Helmut Dersch has outlined the basic workflow in Extracting Rectilinear Images from Panoramas. You need to do the following:

Extracting

  • Load the Equirectangular image in Photoshop (or any plugins compatible image editor).
  • Choose 'Adjust' or 'PTAdjust' from the Filter menu.
  • Press the small 'Prefs' button in the upper right corner.
  • In the following dialog uncheck option (a) and check options (b) and (c) (see plugins description for details)
  • confirm with 'Ok'
  • check 'Extract', check 'Use Options' and press 'Set'
  • In the following dialog there is an upper part called 'Image:' and a lower one called 'Panorama'
  • In the 'Image' section:
    • Set HFOV 90 for a cube face (or any other Field of View to your need).
    • Choose 'Width' and 'Height' appr. 1/3 of the source image width in order to not degrade image because of too low resolution.
    • Choose 'Format: Rectilinear'
    • Set 'Yaw' and 'Roll' to 0.0
    • Set 'Pitch' to -90 for Nadir or 90 for Zenith
  • In the 'Panorama' section:
    • Set HFOV to 360 for a full sphere.
    • Leave 'Width' and 'Height' empty (will be read from the image)
    • Check 'Save to Buffer' if you want to merge the result into your pano later.
    • Choose Format: PSphere (which means Equirectangular)
    • Uncheck 'Load Buffer' to avoid loading of previously saved images.
  • Press 'Ok' twice to perform the transformation

The result image will be loaded into a new window where you can edit it as any other image.

Inserting

Once you are done with editing the image you can either insert it back to your orignal pano or load it as a masked layer.

Merging

You need to have checked 'Save to Buffer' in order to be able to merge the result into your pano.

  • With the edited rectilinear image as foremost (active) document open Adjust or PTAdjust dialog from the filter menu.
  • Choose 'Insert' and 'Use Options' and press 'Set'
  • in the following dialog leave anything as is or set it to the values described in the Extracting part if you changed them meanwhile with these exceptions:
  • In the 'Panorama' section:
    • Uncheck 'Save to Buffer'
    • Check 'Load Buffer'
    • check 'or paste'
    • Choose 'Color Correction: none'
    • Set 'Feather:' to a small value or 0
  • Press 'Ok' twice to perform the transformation ans merging.
Loading as layer

Sometimes it might be usefull to load only the transformed Nadir or Zenith image in order to insert it as a new layer into a panorama.

  • With the edited rectilinear image as foremost (active) document open Adjust or PTAdjust dialog from the filter menu.
  • If you changed any settings since extracting the image set them as described under Extracting.
  • Press 'Ok' to perform the transformation

The image is loaded as a document containing an alpha channel with the mask. In photoshop you can move this into a masked layer:

  • In the layers palette double click the layer thumbnail in order to create a layer from background.
  • Choose 'Load Selection' from the 'Select' menu.
  • Choose 'Channel: Alpha 1' as new selection and press 'Ok'
  • Click the 'Add vector mask' button in the bottom line of the layers palette.
  • Shift-Drag (pres and hold the shift key after started dragging) the layer from the layers palette to your original panorama.

PTStitcher

PTStitcher supports 16 bit images and can be used to extract and insert partial views in different ways.

nona is a free alternative to PTStitcher that can be used as a drop-in replacement if PTStitcher is not available.

Scripts

There are several scripts or batch files available that extract 6 cube faces from an Equirectangular Projection image. One of the most convenient windows batch file is written by Eric Gerds and part of his DOS Utilities for Panoramas. A less convenient batch file is found on Erik Krause's page. PTStitcher scripts are found on Ben Kreunen's page

PanoCube Plus

PanoCube Plus can extract six cube faces (single, batch modes) for editing and then convert it directly into QTVR cubic movie(s). Both 8/16 bits per channel are supported - depending on the pano12 library used the cube faces are the same bit depth as the source images.

To activate "equirectangular to 6 cube faces" mode copy the file Script.txt to the folder where your source image is and set "1" as first character in this line using a text editor (notepad!):

1  # create tiles for editing ( 0 = NO, 1 = YES). Default NO.

in the file Script.txt and put it into pano's folder. Next drag and drop your single pano or folder with panos onto the program icon. The source file name and path should contain no spaces. The source image must be exactly in 2:1 format (f.e. 2000x1000 or 6000x3000 pixels). PanoCube calls PTStitcher 6 times and creates 6 files in the order front, right, back, left, top, bottom and replaces the last two characters of the name with 11, 22, 33, 44, 55, 66. All files ended with 55 are represent zenith view, ended with 66 - nadir view.

After editing drag again any one (not all!) tile or folder with tiles to get QTVR cubic movie(s). In batch mode important to have first six letters differ in filenames, otherwice PanoCube can skips "similar" files.

This technique is good if the final product is a QTVR movie. If you need an equirectangular for PTViewer you can of course drag the .mov file on panocube plus to get it converted, but image quality suffers because of intermediate JPEG compression and decompression and another interpolation step.

Inserting cubefaces again

You can assemble the cube faces again using the PTGui template from http://www.erik-krause.de/ttt or the batch file from Eric Gerds: Dos for Panoramas.

You can even remap only one cube face to equirectangular and insert it as an additional layer into your layered photoshop document. This has several benefits:

  • no additional interpolation for the rest of the panorama.
  • possibility to patch nadir in a relative early stage of editing thus leaving open any possibility of correcting over all colors etc.
  • preserving as much as possible of the original image data

To re-insert the patched cubeface into the original document implies that you have worked on a cube face with enough resolution, preferable the pixel width of the original pano divided by 3.

You can use the batch file or PTGui template mentioned above. You simply have to set output size equal to your original panorama size and create single image TIFFs as output. Any of those TIFF files can be added to the original panorama as a masked layer using the "Tiff to masked layers" action from http://www.erik-krause.de/ttt

To use any of the other GUIs you need to

  • Add the cube face as input image
  • specify rectilinear and FoV 90° for input images
  • set all lens correction parameters to 0.0
  • specify the correct yaw and pitch values for the particular image:
 tile    front   right   back    left    top     bottom
 Yaw     0       90      180     -90     0       0
 Pitch   0       0       0       0       90      -90
  • specify the correct output size.
  • specify TIFF without mask or feather (TIFF_m) as output format.
  • don't set control points and don't optimize
  • create the panorama

GUI

All of the GUI front-ends should be capable of extracting an arbitrary rectilinear view from a spherical pano. Use the equirect image as input (don't forget to set the correct FoV) and specify a rectilinear image with 90° as output "panorama". Set all lens correction parameters to 0.0. Then change yaw and pitch of the input image until you get the desired view. Note that the values work the other way round than when inserting an image.

PTGui

PTGui offers an additional advantage: The panorama editor and numerical transform. To use it load your image as described above, open panorama editor and choose 'Numerical Transform' from the edit menu.

On the 'Panorama Settings' tab don't forget to uncheck 'Use fast transform' (for details see Warning at top of page).

To pan along the horizon f.e. in 20° steps insert 20 into the 'Yaw' field and press 'Apply' repeatedly until you get the desired view. Positive values pan right, negatives left.

Do the corresponding for 'Pitch' and 'Roll' if needed. This way you can extract any partial view. Once your are done create the "Panorama" (which is the desired partial view) using output format TIFF. Note down or save the exact values for Yaw, Roll and Pitch as shown on 'Image Parameters" tab page.

Now edit the partial view to your need. Then add it to the project with your original panorama and on 'Panorama settings' tab change to equirectangular and 360°x180°. Choose individual lens parameters for the new image on 'Lens settings' tab and set 'Rectilinear' and 90° on 'Image parameters' tab. The image should fit now perfectly in the original panorama.

In order to move the panorama back to it's original position go to panorama editor again and choose 'Numerical transform'. Now Enter the exact values for Yaw, Roll and Pitch you previously saved or noted down. The panorama should move back to it's original position now.

You can create either the complete panorama or the partial view only. Choose the size of the original panorama for output.

There are two templates available for conveniently extract and insert the floor cube face using this technique from http://erik-krause.de/ttt

Other possibilities

This article is incomplete. You can help Panotools Wiki by expanding it.

See the related Talk page for hints.
Once the article is ok feel free to remove the {{Incomplete|Talk}} template