diff --git a/readme.html b/Dome2rect readme.html similarity index 80% rename from readme.html rename to Dome2rect readme.html index f306f26..4021b15 100644 --- a/readme.html +++ b/Dome2rect readme.html @@ -1,283 +1,303 @@ - - + + readme -

Dome2rect v1.1 - Jan 1, 2014

+

Dome2rect v1.3 - 2015-05-06

by Andrew Hazelden

Overview

Dome2rect is a command line script that uses the open source Panotool library + MPRemap application to automate the process of converting image sequences between multiple panoramic formats. I created this script because I wanted to make it simpler to convert a fulldome movie trailer into a "flat screen" rectilinear format for posting on sites like YouTube.

-

Note: Windows 7 is required to use the tools.

+

Note: Windows 7 or higher is required to use the tools.

+

Changes in Version 1.3

+

New in Dome2rect version 1.3 is support for latlong to cubic, horizontal cross, vertical cross, and cubemap3x2 conversions.

Download

The dome2rect program is an open source program that is a free download. A sample fulldome image sequence is included.

You can download the latest version from the dome2rect page:
@@ -313,21 +333,34 @@

Converting 1080p HD Media to Fulldome

This image was re-projected into a domemaster fisheye format.

When the rect2dome output image is viewed in a fulldome simulator it looks like this: This is the 1080p to dome conversion in a fulldome simulator.

-

Note: The Domemaster Stereo shader tool "Dome Viewer" was used to preview the rect to dome conversion.

+

Note: The Domemaster Stereo shader tool "Dome Viewer" was used to preview the rect to dome conversion.


Batch Script Notes

The tool is an early alpha release and will be improved over time. Right now the only image format enabled for input/output is .jpg files and a UNIX .pnm image format. In the future all the common image/video formats could be supported since the FFMPEG library is used for format conversions.

I created the following example .bat scripts to show what is possible:

+

angular2cyl.bat
+Converts a an angular fisheye image to a cylindrical image.

+

angular2latlong.bat
+Converts an angular fisheye image to a latitude/longitude (equirectangular) image.

dome2rect.bat
-Converts a fisheye image to a rectilinear image.

-

rect2dome.bat -Converts a rectilinear image to a fisheye image

+Converts a 180 degree domemaster format angular fisheye image to a rectilinear image format.

+

latlong2cubemap3x2.bat
+Converts a latitude/longitude image to a cubic format that has a single image output with a Cubemap 3x2 arrangement with 3 cubic faces on the top row, and 3 cubic faces on the bottom row.

+

The Cubemap 3x2 format was popularized by Garden Gnome Software's Pano2VR Panoramic tools.

+

latlong2cubic.bat
+Converts a latitude/longitude image to a set of 6 cubic face images.

latlong2cyl.bat Converts a latitude/longitude image to a cylindrical image.

latlong2dome.bat
Converts a latitude/longitude (equirectangular) image to a fulldome image.

+

latlong2horizontalcross.bat
+Converts a latitude/longitude image to a cubic format that has a single image output with a horizontal cross arrangement.

latlong2rect.bat
Converts a latitude/longitude (equirectangular) image to a rectilinear image.

+

latlong2verticalcross.bat
+Converts a latitude/longitude image to a cubic format that has a single image output with a vertical cross arrangement.

+

rect2dome.bat
+Converts a rectilinear image to a fisheye image

review.bat
Simple playback program to view the image output. This tool uses ffmpeg's playback tool.

PT Conversion Scripts

@@ -341,8 +374,20 @@

PT Conversion Scripts

o f3 v180 r-10 y0 p55 m i2 +

This example panotools conversion script takes an angular fisheye image and converts it to a 2160x1080 cylindrical image output. The image is pitched 90 degrees.

+
# Defish image to a cylindrical 1080p format:
+p f1 w2160 h1080 v360
+o f3 v360 r0 y0 p90 b0
+m i2
+
+

This example panotools conversion script takes an angular fisheye image and converts it to a 2048x1024 latitude longitude (equirectangular) image output. The image is pitched 90 degrees.

+
# Defish image to a latlong 1024p format:
+p f2 w2048 h1024 v360
+o f3 v360 r0 y0 p90 b0
+m i2
+

This example panotools conversion script takes a latitude longitude (equirectangular) image and converts it to a 1920x1080p rectilinear image output.

-
# Defish latlong image to a 1080p HD format:
+
# latlong image to a 1080p HD format:
 p f0 w1920 h1080 v90  
 o f4 v360 r0 y0 p0  
 m i2  
@@ -360,6 +405,8 @@ 

PT Conversion Scripts

C0,960,420,960 = Crop Dimensions left,right,top,bottom f0 = projection mode 0 = rectilinear f1 = projection mode 1 = cylindrical +f2 = projection mode 2 = equirectagular/latlong +f3 = projection mode 3 = fullframe fisheye w1920 = destination width 1920 px h1080 = destination height 1080 px @@ -368,7 +415,9 @@

PT Conversion Scripts

'o' = Source Image Attributes 'o' Attributes: +f0 = projection mode 0 = rectilinear f3 = projection mode 3 = equidistant fisheye +f4 = projection mode 4 = equirectagular/latlong f5 = projection mode 5 = circular fisheye f10 = projection mode 10 = equisolid fisheye @@ -389,8 +438,8 @@

PT Conversion Scripts

Changing Input & Output File Names

To change the name of the input and output files you can edit the .bat scripts using a plain text editor. All image sequences start on frame number 0 (eg. 0.jpg)

To convert a single frame image enter the exact image name. (eg. image.jpg)

-

To convert an unpadded image sequence use the value %%d.jpg (eg. 9.jpg )

-

To convert an a 4 digit padded image sequence use the value %%.4d.jpg (eg: 0009.jpg)

+

To convert an unpadded image sequence use the value %%d.jpg (eg. 9.jpg )

+

To convert an a 4 digit padded image sequence use the value %%.4d.jpg (eg: 0009.jpg)

If you want the dome2rect script to process a single frame for testing change the following code:

@set ptscript=dome2rect
diff --git a/angular2cyl.bat b/angular2cyl.bat new file mode 100644 index 0000000..6f21d23 --- /dev/null +++ b/angular2cyl.bat @@ -0,0 +1,41 @@ +@ECHO OFF +@title angular2cyl v1.3 - immersive transformations + +echo angular2cyl v1.3 - May 6, 2015 +echo script by Andrew Hazelden +echo ---------------------------------------------------------------------- +echo angular2cyl converts an angular fisheye image sequence into the cylinder +echo format using the moving panorama program by Helmut Dersch and FFMPEG. +echo ---------------------------------------------------------------------- +echo Check out the PTStitcher wiki for the script syntax: +echo http://wiki.panotools.org/PTStitcher + +rem Note: mpremap accepts piped .pnm image streams + +REM All image sequences start on frame number 0 (eg. 0.jpg) + +REM Use the exact image name for a single frame (eg. image.0009.jpg) +REM Use %%d.jpg for an unpadded image sequence (eg: 9.jpg) +REM Use %%.4d.jpg for a padded image sequence (eg: 0009.jpg) + +REM Process a single frame for testing: +@set ptscript=angular2cyl +@set input=input\angular360.jpg +REM @set input=input\zosma.0001.jpg +@set output=output\sequence.%%d.jpg + +REM Process a 4 digit padded image sequence: +REM @set ptscript=angular2cyl +REM @set input=input\zosma.0001.jpg +REM @set input=input\zosma.%%.4d.jpg +REM @set output=output\sequence.%%d.jpg + +REM Move to the base dome2rect folder +cd C:\dome2rect\ + +REM Run the remapping program +bin\mpremap.exe -f scripts\%ptscript% -o %output% %input% + +REM echo Loading frames into viewer... +PAUSE +REM C:\dome2rect\review.bat %output% diff --git a/angular2latlong.bat b/angular2latlong.bat new file mode 100644 index 0000000..8d7b735 --- /dev/null +++ b/angular2latlong.bat @@ -0,0 +1,42 @@ +@ECHO OFF +@title angular2latlong v1.3 - immersive transformations + +echo angular2latlong v1.3 - May 6, 2015 +echo script by Andrew Hazelden +echo ---------------------------------------------------------------------- +echo angular2latlong converts a 360 degree angu;ar fisheye image sequence +echo into the latlong format using the moving panorama program by +echo Helmut Dersch and FFMPEG. +echo ---------------------------------------------------------------------- +echo Check out the PTStitcher wiki for the script syntax: +echo http://wiki.panotools.org/PTStitcher + +rem Note: mpremap accepts piped .pnm image streams + +REM All image sequences start on frame number 0 (eg. 0.jpg) + +REM Use the exact image name for a single frame (eg. image.0009.jpg) +REM Use %%d.jpg for an unpadded image sequence (eg: 9.jpg) +REM Use %%.4d.jpg for a padded image sequence (eg: 0009.jpg) + +REM Process a single frame for testing: +REM @set ptscript=angular2latlong +REM @set input=input\angular360.jpg +REM @set input=input\zosma.0001.jpg +REM @set output=output\sequence.%%d.jpg + +REM Process a 4 digit padded image sequence: +@set ptscript=angular2latlong +REM @set input=input\zosma.0001.jpg +@set input=input\zosma.%%.4d.jpg +@set output=output\sequence.%%d.jpg + +REM Move to the base dome2rect folder +cd C:\dome2rect\ + +REM Run the remapping program +bin\mpremap.exe -f scripts\%ptscript% -o %output% %input% + +REM echo Loading frames into viewer... +PAUSE +REM C:\dome2rect\review.bat %output% diff --git a/docs/images/dome2rect_in_action.png b/docs/images/dome2rect_in_action.png index 7738cd3..bb18cf7 100644 Binary files a/docs/images/dome2rect_in_action.png and b/docs/images/dome2rect_in_action.png differ diff --git a/dome2rect.bat b/dome2rect.bat index c87c6ed..bc9b6c8 100644 --- a/dome2rect.bat +++ b/dome2rect.bat @@ -1,7 +1,7 @@ @ECHO OFF -@title dome2rect v1.1 - immersive transformations +@title dome2rect v1.3 - immersive transformations -echo dome2rect v1.1 - Jan 1, 2014 +echo dome2rect v1.3 - May 6, 2015 echo script by Andrew Hazelden echo ---------------------------------------------------------------------- echo dome2rect converts a fisheye image sequence into the rectilinear format @@ -36,4 +36,4 @@ bin\mpremap.exe -f scripts\%ptscript% -o %output% %input% REM echo Loading frames into viewer... PAUSE -REM C:\dome2rect\review.bat \ No newline at end of file +REM C:\dome2rect\review.bat %output% diff --git a/input/angular360.jpg b/input/angular360.jpg new file mode 100644 index 0000000..70d3e8f Binary files /dev/null and b/input/angular360.jpg differ diff --git a/input/latlong_sequence.1.jpg b/input/latlong_sequence.1.jpg new file mode 100644 index 0000000..96b43c0 Binary files /dev/null and b/input/latlong_sequence.1.jpg differ diff --git a/latlong2cubemap3x2.bat b/latlong2cubemap3x2.bat new file mode 100644 index 0000000..5b15647 --- /dev/null +++ b/latlong2cubemap3x2.bat @@ -0,0 +1,99 @@ +@ECHO OFF +@title latlong2cubemap3x2 v1.3 - immersive transformations + +echo latlong2cubemap3x2 v1.3 - May 6, 2015 +echo script by Andrew Hazelden +echo ---------------------------------------------------------------------- +echo latlong2cubemap3x2 converts a latlong formatted image sequence +echo into a 3x2 cubemap format using the moving panorama program by +echo Helmut Dersch and Imagemagick. +echo ---------------------------------------------------------------------- +echo Check out the PTStitcher wiki for the script syntax: +echo http://wiki.panotools.org/PTStitcher + +REM Note: mpremap accepts piped .pnm image streams + +REM Image sequences are processed with unpadded sequence frame extensions. + +REM Cubemap3x2 Merging Start/End Sequence Frame Range: +REM @set start_frame=1 +REM @set end_frame=30 +@set start_frame=1 +@set end_frame=1 + +@set step_by_frames=1 + +REM Process a 4 digit padded image sequence: +@set ptscript_back=latlong2cubemap_back +@set ptscript_bottom=latlong2cubemap_bottom +@set ptscript_front=latlong2cubemap_front +@set ptscript_left=latlong2cubemap_left +@set ptscript_right=latlong2cubemap_right +@set ptscript_top=latlong2cubemap_top + +REM Input image filename prefix +@set input=input\latlong_sequence + +REM Output image extension: +@set output_ext=jpg + +REM Output image - 6 extracted cubemap faces: +@set output_back=output\cubemap_back +@set output_bottom=output\cubemap_bottom +@set output_front=output\cubemap_front +@set output_left=output\cubemap_left +@set output_right=output\cubemap_right +@set output_top=output\cubemap_top + +REM Output image - final stitched 3x2 cubemap +@set output_cube3x2=output\cubemap3x2 + +REM Move to the base dome2rect folder +cd C:\dome2rect\ + +echo. + +FOR /L %%G IN (%start_frame%, %step_by_frames%, %end_frame%) DO ( + + REM Checking if the source image exists + if exist %input%.%%G.%output_ext% ( + + echo. + echo Processing Frame %%G + echo. + + echo Back View + bin\mpremap.exe -f scripts\%ptscript_back% -o %output_back%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Bottom View + bin\mpremap.exe -f scripts\%ptscript_bottom% -o %output_bottom%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Front View + bin\mpremap.exe -f scripts\%ptscript_front% -o %output_front%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo left View + bin\mpremap.exe -f scripts\%ptscript_left% -o %output_left%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Right View + bin\mpremap.exe -f scripts\%ptscript_right% -o %output_right%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Top View + bin\mpremap.exe -f scripts\%ptscript_top% -o %output_top%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Merging Cubic Images + REM Build the 6 cubic faces into a cubemap3x2 layout + REM Note: The ^ carets are for escaping the closing parentheses in the Imagemagick commands since they are happening inside the batch script's do loop + bin\imagemagick\imconvert.exe ( %output_front%.%%G.%output_ext% %output_right%.%%G.%output_ext% %output_back%.%%G.%output_ext% +append ^) ( %output_left%.%%G.%output_ext% %output_top%.%%G.%output_ext% %output_bottom%.%%G.%output_ext% +append ^) -background black -append %output_cube3x2%.%%G.%output_ext% + echo Saving Image: %output_cube3x2%.%%G.%output_ext% + ) else ( + echo Warning: %input%.%%G.%output_ext% image was not found. + ) +) + +echo. +echo Sequence Processing Complete +echo. + +REM echo Loading frames into viewer... +PAUSE +REM C:\dome2rect\review.bat %output_cube3x2%.%%d.%output_ext% diff --git a/latlong2cubic.bat b/latlong2cubic.bat new file mode 100644 index 0000000..450a251 --- /dev/null +++ b/latlong2cubic.bat @@ -0,0 +1,75 @@ +@ECHO OFF +@title latlong2cubic v1.3 - immersive transformations + +echo latlong2cubic v1.3 - May 6, 2015 +echo script by Andrew Hazelden +echo ---------------------------------------------------------------------- +echo latlong2cubic converts a latlong formatted image sequence +echo into the cubic faces format using the moving panorama program by +echo Helmut Dersch and FFMPEG. +echo ---------------------------------------------------------------------- +echo Check out the PTStitcher wiki for the script syntax: +echo http://wiki.panotools.org/PTStitcher + +REM Note: mpremap accepts piped .pnm image streams + +REM All image sequences start on frame number 0 (eg. 0.jpg) + +REM Use the exact image name for a single frame (eg. image.0009.jpg) +REM Use %%d.jpg for an unpadded image sequence (eg: 9.jpg) +REM Use %%.4d.jpg for a padded image sequence (eg: 0009.jpg) + +REM Process a 4 digit padded image sequence: +@set ptscript_back=latlong2cubemap_back +@set ptscript_bottom=latlong2cubemap_bottom +@set ptscript_front=latlong2cubemap_front +@set ptscript_left=latlong2cubemap_left +@set ptscript_right=latlong2cubemap_right +@set ptscript_top=latlong2cubemap_top + +REM Still images +@set input=input\latlong.jpg + +@set output_back=output\cubemap_back.jpg +@set output_bottom=output\cubemap_bottom.jpg +@set output_front=output\cubemap_front.jpg +@set output_left=output\cubemap_left.jpg +@set output_right=output\cubemap_right.jpg +@set output_top=output\cubemap_top.jpg + +REM Moving images +REM @set input=input\latlong.%%.4d.jpg +REM @set input=input\latlong_sequence.%%.1d.jpg + +REM @set output_back=output\cubemap_back.%%.4d.jpg +REM @set output_bottom=output\cubemap_bottom.%%.4d.jpg +REM @set output_front=output\cubemap_front.%%.4d.jpg +REM @set output_left=output\cubemap_left.%%.4d.jpg +REM @set output_right=output\cubemap_right.%%.4d.jpg +REM @set output_top=output\cubemap_top.%%.4d.jpg + +REM Move to the base dome2rect folder +cd C:\dome2rect\ + +REM Run the remapping program +echo Back View +bin\mpremap.exe -f scripts\%ptscript_back% -o %output_back% %input% + +echo Bottom View +bin\mpremap.exe -f scripts\%ptscript_bottom% -o %output_bottom% %input% + +echo Front View +bin\mpremap.exe -f scripts\%ptscript_front% -o %output_front% %input% + +echo left View +bin\mpremap.exe -f scripts\%ptscript_left% -o %output_left% %input% + +echo Right View +bin\mpremap.exe -f scripts\%ptscript_right% -o %output_right% %input% + +echo Top View +bin\mpremap.exe -f scripts\%ptscript_top% -o %output_top% %input% + +REM echo Loading frames into viewer... +PAUSE +REM C:\dome2rect\review.bat %output_front% diff --git a/latlong2cyl.bat b/latlong2cyl.bat index b124b66..30c6618 100644 --- a/latlong2cyl.bat +++ b/latlong2cyl.bat @@ -1,7 +1,7 @@ @ECHO OFF -@title latlong2cyl v1.1 - immersive transformations +@title latlong2cyl v1.3 - immersive transformations -echo latlong2rect v1.1 - Jan 1, 2014 +echo latlong2rect v1.3 - May 6, 2015 echo script by Andrew Hazelden echo ---------------------------------------------------------------------- echo latlong2cyl converts a latitude/longitude image sequence into a cylindrical @@ -36,4 +36,4 @@ bin\mpremap.exe -f scripts\%ptscript% -o %output% %input% REM echo Loading frames into viewer... PAUSE -REM C:\dome2rect\review.bat \ No newline at end of file +REM C:\dome2rect\review.bat %output% diff --git a/latlong2dome.bat b/latlong2dome.bat index 92f23ae..4d01201 100644 --- a/latlong2dome.bat +++ b/latlong2dome.bat @@ -1,7 +1,7 @@ @ECHO OFF -@title latlong2dome v1.1 - immersive transformations +@title latlong2dome v1.3 - immersive transformations -echo latlong2dome v1.1 - Jan 1, 2014 +echo latlong2dome v1.3 - May 6, 2015 echo script by Andrew Hazelden echo ---------------------------------------------------------------------- echo latlong2dome converts a latitude/longitude image sequence into dome @@ -37,4 +37,4 @@ bin\mpremap.exe -f scripts\%ptscript% -o %output% %input% REM echo Loading frames into viewer... PAUSE -REM C:\dome2rect\review.bat \ No newline at end of file +REM C:\dome2rect\review.bat %output% diff --git a/latlong2horizontalcross.bat b/latlong2horizontalcross.bat new file mode 100644 index 0000000..067cc82 --- /dev/null +++ b/latlong2horizontalcross.bat @@ -0,0 +1,102 @@ +@ECHO OFF +@title latlong2horizontalcross v1.3 - immersive transformations + +echo latlong2horizontalcross v1.3 - May 6, 2015 +echo script by Andrew Hazelden +echo ---------------------------------------------------------------------- +echo latlong2horizontalcross converts a latlong formatted image sequence +echo into a cubic horizontal cross format using the moving panorama program by +echo Helmut Dersch and Imagemagick. +echo ---------------------------------------------------------------------- +echo Check out the PTStitcher wiki for the script syntax: +echo http://wiki.panotools.org/PTStitcher + +REM Note: mpremap accepts piped .pnm image streams + +REM Image sequences are processed with unpadded sequence frame extensions. + +REM Horizontal Cross Merging Start/End Sequence Frame Range: +REM @set start_frame=1 +REM @set end_frame=30 +@set start_frame=1 +@set end_frame=1 + +@set step_by_frames=1 + +REM Process a 4 digit padded image sequence: +@set ptscript_back=latlong2cubemap_back +@set ptscript_bottom=latlong2cubemap_bottom +@set ptscript_front=latlong2cubemap_front +@set ptscript_left=latlong2cubemap_left +@set ptscript_right=latlong2cubemap_right +@set ptscript_top=latlong2cubemap_top + +REM Input image filename prefix +@set input=input\latlong_sequence + +REM Output image extension: +@set output_ext=jpg + +REM Output image - 6 extracted cubemap faces: +@set output_back=output\cubemap_back +@set output_bottom=output\cubemap_bottom +@set output_front=output\cubemap_front +@set output_left=output\cubemap_left +@set output_right=output\cubemap_right +@set output_top=output\cubemap_top + +REM This is the cubemap extracted face resolution and is defined in each of the PT Stitcher scripts on the "p" line +@set cubemap_image_width_px=1024 + +REM Output image - final stitched horizontal cross +@set output_cube_horizontal=output\horizontalcross + +REM Move to the base dome2rect folder +cd C:\dome2rect\ + +echo. + +FOR /L %%G IN (%start_frame%, %step_by_frames%, %end_frame%) DO ( + + REM Checking if the source image exists + if exist %input%.%%G.%output_ext% ( + + echo. + echo Processing Frame %%G + echo. + + echo Back View + bin\mpremap.exe -f scripts\%ptscript_back% -o %output_back%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Bottom View + bin\mpremap.exe -f scripts\%ptscript_bottom% -o %output_bottom%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Front View + bin\mpremap.exe -f scripts\%ptscript_front% -o %output_front%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo left View + bin\mpremap.exe -f scripts\%ptscript_left% -o %output_left%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Right View + bin\mpremap.exe -f scripts\%ptscript_right% -o %output_right%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Top View + bin\mpremap.exe -f scripts\%ptscript_top% -o %output_top%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Merging Cubic Images + REM Build the 6 cubic faces into a horizontal cross layout + REM Note: The ^ carets are for escaping the closing parentheses in the Imagemagick commands since they are happening inside the batch script's do loop + bin\imagemagick\imconvert.exe ( -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black %output_top%.%%G.%output_ext% -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black +append ^) ( %output_left%.%%G.%output_ext% %output_front%.%%G.%output_ext% %output_right%.%%G.%output_ext% %output_back%.%%G.%output_ext% +append ^) ( -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black %output_bottom%.%%G.%output_ext% -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black +append ^) -background black -append %output_cube_horizontal%.%%G.%output_ext% + echo Saving Image: %output_cube_horizontal%.%%G.%output_ext% + ) else ( + echo Warning: %input%.%%G.%output_ext% image was not found. + ) +) + +echo. +echo Sequence Processing Complete +echo. + +REM echo Loading frames into viewer... +PAUSE +REM C:\dome2rect\review.bat %output_cube_horizontal%.%%d.%output_ext% diff --git a/latlong2rect.bat b/latlong2rect.bat index 3e44709..3999e0d 100644 --- a/latlong2rect.bat +++ b/latlong2rect.bat @@ -1,7 +1,7 @@ @ECHO OFF -@title latlong2rect v1.1 - immersive transformations +@title latlong2rect v1.3 - immersive transformations -echo latlong2rect v1.1 - Jan 1, 2014 +echo latlong2rect v1.3 - May 6, 2015 echo script by Andrew Hazelden echo ---------------------------------------------------------------------- echo latlong2rect converts a latitude/longitude image sequence into rectilinear @@ -36,4 +36,4 @@ bin\mpremap.exe -f scripts\%ptscript% -o %output% %input% REM echo Loading frames into viewer... PAUSE -REM C:\dome2rect\review.bat \ No newline at end of file +REM C:\dome2rect\review.bat %output% diff --git a/latlong2verticalcross.bat b/latlong2verticalcross.bat new file mode 100644 index 0000000..557d0a0 --- /dev/null +++ b/latlong2verticalcross.bat @@ -0,0 +1,102 @@ +@ECHO OFF +@title latlong2verticalcross v1.3 - immersive transformations + +echo latlong2verticalcross v1.3 - May 6, 2015 +echo script by Andrew Hazelden +echo ---------------------------------------------------------------------- +echo latlong2verticalcross converts a latlong formatted image sequence +echo into a cubic vertical cross format using the moving panorama program by +echo Helmut Dersch and Imagemagick. +echo ---------------------------------------------------------------------- +echo Check out the PTStitcher wiki for the script syntax: +echo http://wiki.panotools.org/PTStitcher + +REM Note: mpremap accepts piped .pnm image streams + +REM Image sequences are processed with unpadded sequence frame extensions. + +REM Vertical Cross Merging Start/End Sequence Frame Range: +REM @set start_frame=1 +REM @set end_frame=30 +@set start_frame=1 +@set end_frame=1 + +@set step_by_frames=1 + +REM Process a 4 digit padded image sequence: +@set ptscript_back=latlong2cubemap_back +@set ptscript_bottom=latlong2cubemap_bottom +@set ptscript_front=latlong2cubemap_front +@set ptscript_left=latlong2cubemap_left +@set ptscript_right=latlong2cubemap_right +@set ptscript_top=latlong2cubemap_top + +REM Input image filename prefix +@set input=input\latlong_sequence + +REM Output image extension: +@set output_ext=jpg + +REM Output image - 6 extracted cubemap faces: +@set output_back=output\cubemap_back +@set output_bottom=output\cubemap_bottom +@set output_front=output\cubemap_front +@set output_left=output\cubemap_left +@set output_right=output\cubemap_right +@set output_top=output\cubemap_top + +REM This is the cubemap extracted face resolution and is defined in each of the PT Stitcher scripts on the "p" line +@set cubemap_image_width_px=1024 + +REM Output image - final stitched vertical cross +@set output_cube_vertical=output\verticalcross + +REM Move to the base dome2rect folder +cd C:\dome2rect\ + +echo. + +FOR /L %%G IN (%start_frame%, %step_by_frames%, %end_frame%) DO ( + + REM Checking if the source image exists + if exist %input%.%%G.%output_ext% ( + + echo. + echo Processing Frame %%G + echo. + + echo Back View + bin\mpremap.exe -f scripts\%ptscript_back% -o %output_back%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Bottom View + bin\mpremap.exe -f scripts\%ptscript_bottom% -o %output_bottom%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Front View + bin\mpremap.exe -f scripts\%ptscript_front% -o %output_front%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo left View + bin\mpremap.exe -f scripts\%ptscript_left% -o %output_left%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Right View + bin\mpremap.exe -f scripts\%ptscript_right% -o %output_right%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Top View + bin\mpremap.exe -f scripts\%ptscript_top% -o %output_top%.%%G.%output_ext% %input%.%%G.%output_ext% + + echo Merging Cubic Images + REM Build the 6 cubic faces into a vertical cross layout + REM Note: The ^ carets are for escaping the closing parentheses in the Imagemagick commands since they are happening inside the batch script's do loop + bin\imagemagick\imconvert.exe ( -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black %output_top%.%%G.%output_ext% -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black +append ^) ( %output_left%.%%G.%output_ext% %output_front%.%%G.%output_ext% %output_right%.%%G.%output_ext% +append ^) ( -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black %output_bottom%.%%G.%output_ext% -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black +append ^) ( -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black ( %output_back%.%%G.%output_ext% -rotate 180 ^) -size %cubemap_image_width_px%x%cubemap_image_width_px% xc:black +append ^) -background black -append %output_cube_vertical%.%%G.%output_ext% + echo Saving Image: %output_cube_vertical%.%%G.%output_ext% + ) else ( + echo Warning: %input%.%%G.%output_ext% image was not found. + ) +) + +echo. +echo Sequence Processing Complete +echo. + +REM echo Loading frames into viewer... +PAUSE +REM C:\dome2rect\review.bat %output_cube_vertical%.%%d.%output_ext% diff --git a/output/rect2dome.0000.jpg b/output/rect2dome.0000.jpg deleted file mode 100644 index 464e366..0000000 Binary files a/output/rect2dome.0000.jpg and /dev/null differ diff --git a/output/rect2dome.0001.jpg b/output/rect2dome.0001.jpg deleted file mode 100644 index 1891edb..0000000 Binary files a/output/rect2dome.0001.jpg and /dev/null differ diff --git a/output/rect2dome.0002.jpg b/output/rect2dome.0002.jpg deleted file mode 100644 index 3d3338c..0000000 Binary files a/output/rect2dome.0002.jpg and /dev/null differ diff --git a/output/rect2dome.0003.jpg b/output/rect2dome.0003.jpg deleted file mode 100644 index e3257f3..0000000 Binary files a/output/rect2dome.0003.jpg and /dev/null differ diff --git a/output/rect2dome.0004.jpg b/output/rect2dome.0004.jpg deleted file mode 100644 index 81a004b..0000000 Binary files a/output/rect2dome.0004.jpg and /dev/null differ diff --git a/output/rect2dome.0005.jpg b/output/rect2dome.0005.jpg deleted file mode 100644 index e12a426..0000000 Binary files a/output/rect2dome.0005.jpg and /dev/null differ diff --git a/output/rect2dome.0006.jpg b/output/rect2dome.0006.jpg deleted file mode 100644 index dbbc9d0..0000000 Binary files a/output/rect2dome.0006.jpg and /dev/null differ diff --git a/output/rect2dome.0007.jpg b/output/rect2dome.0007.jpg deleted file mode 100644 index 1ba9a00..0000000 Binary files a/output/rect2dome.0007.jpg and /dev/null differ diff --git a/output/rect2dome.0008.jpg b/output/rect2dome.0008.jpg deleted file mode 100644 index ba29962..0000000 Binary files a/output/rect2dome.0008.jpg and /dev/null differ diff --git a/output/rect2dome.0009.jpg b/output/rect2dome.0009.jpg deleted file mode 100644 index 9360d93..0000000 Binary files a/output/rect2dome.0009.jpg and /dev/null differ diff --git a/output/rect2dome.0010.jpg b/output/rect2dome.0010.jpg deleted file mode 100644 index 38325db..0000000 Binary files a/output/rect2dome.0010.jpg and /dev/null differ diff --git a/output/rect2dome.0011.jpg b/output/rect2dome.0011.jpg deleted file mode 100644 index 2768e5a..0000000 Binary files a/output/rect2dome.0011.jpg and /dev/null differ diff --git a/output/rect2dome.0012.jpg b/output/rect2dome.0012.jpg deleted file mode 100644 index 318574e..0000000 Binary files a/output/rect2dome.0012.jpg and /dev/null differ diff --git a/output/rect2dome.0013.jpg b/output/rect2dome.0013.jpg deleted file mode 100644 index fb21586..0000000 Binary files a/output/rect2dome.0013.jpg and /dev/null differ diff --git a/output/rect2dome.0014.jpg b/output/rect2dome.0014.jpg deleted file mode 100644 index f65b9a5..0000000 Binary files a/output/rect2dome.0014.jpg and /dev/null differ diff --git a/output/rect2dome.0015.jpg b/output/rect2dome.0015.jpg deleted file mode 100644 index d665aee..0000000 Binary files a/output/rect2dome.0015.jpg and /dev/null differ diff --git a/output/rect2dome.0016.jpg b/output/rect2dome.0016.jpg deleted file mode 100644 index 27efc4e..0000000 Binary files a/output/rect2dome.0016.jpg and /dev/null differ diff --git a/output/rect2dome.0017.jpg b/output/rect2dome.0017.jpg deleted file mode 100644 index 68aa22f..0000000 Binary files a/output/rect2dome.0017.jpg and /dev/null differ diff --git a/output/rect2dome.0018.jpg b/output/rect2dome.0018.jpg deleted file mode 100644 index 4206f43..0000000 Binary files a/output/rect2dome.0018.jpg and /dev/null differ diff --git a/output/rect2dome.0019.jpg b/output/rect2dome.0019.jpg deleted file mode 100644 index 47738d1..0000000 Binary files a/output/rect2dome.0019.jpg and /dev/null differ diff --git a/output/rect2dome.0020.jpg b/output/rect2dome.0020.jpg deleted file mode 100644 index 2fed9fa..0000000 Binary files a/output/rect2dome.0020.jpg and /dev/null differ diff --git a/output/rect2dome.0021.jpg b/output/rect2dome.0021.jpg deleted file mode 100644 index 4ae517d..0000000 Binary files a/output/rect2dome.0021.jpg and /dev/null differ diff --git a/output/rect2dome.0022.jpg b/output/rect2dome.0022.jpg deleted file mode 100644 index f0dd06d..0000000 Binary files a/output/rect2dome.0022.jpg and /dev/null differ diff --git a/output/rect2dome.0023.jpg b/output/rect2dome.0023.jpg deleted file mode 100644 index d08798b..0000000 Binary files a/output/rect2dome.0023.jpg and /dev/null differ diff --git a/output/rect2dome.0024.jpg b/output/rect2dome.0024.jpg deleted file mode 100644 index caad8ba..0000000 Binary files a/output/rect2dome.0024.jpg and /dev/null differ diff --git a/output/rect2dome.0025.jpg b/output/rect2dome.0025.jpg deleted file mode 100644 index 0e6730d..0000000 Binary files a/output/rect2dome.0025.jpg and /dev/null differ diff --git a/output/rect2dome.0026.jpg b/output/rect2dome.0026.jpg deleted file mode 100644 index 055e469..0000000 Binary files a/output/rect2dome.0026.jpg and /dev/null differ diff --git a/output/rect2dome.0027.jpg b/output/rect2dome.0027.jpg deleted file mode 100644 index b0ca9c7..0000000 Binary files a/output/rect2dome.0027.jpg and /dev/null differ diff --git a/output/rect2dome.0028.jpg b/output/rect2dome.0028.jpg deleted file mode 100644 index 5f7b922..0000000 Binary files a/output/rect2dome.0028.jpg and /dev/null differ diff --git a/output/rect2dome.0029.jpg b/output/rect2dome.0029.jpg deleted file mode 100644 index 338aafd..0000000 Binary files a/output/rect2dome.0029.jpg and /dev/null differ diff --git a/output/rect2dome.0030.jpg b/output/rect2dome.0030.jpg deleted file mode 100644 index a2527ea..0000000 Binary files a/output/rect2dome.0030.jpg and /dev/null differ diff --git a/output/rect2dome.0031.jpg b/output/rect2dome.0031.jpg deleted file mode 100644 index 0861e29..0000000 Binary files a/output/rect2dome.0031.jpg and /dev/null differ diff --git a/output/rect2dome.0032.jpg b/output/rect2dome.0032.jpg deleted file mode 100644 index 42d2368..0000000 Binary files a/output/rect2dome.0032.jpg and /dev/null differ diff --git a/output/rect2dome.0033.jpg b/output/rect2dome.0033.jpg deleted file mode 100644 index 2d16eb4..0000000 Binary files a/output/rect2dome.0033.jpg and /dev/null differ diff --git a/output/rect2dome.0034.jpg b/output/rect2dome.0034.jpg deleted file mode 100644 index 1826ddc..0000000 Binary files a/output/rect2dome.0034.jpg and /dev/null differ diff --git a/output/rect2dome.0035.jpg b/output/rect2dome.0035.jpg deleted file mode 100644 index 7620566..0000000 Binary files a/output/rect2dome.0035.jpg and /dev/null differ diff --git a/readme.md b/readme.md index 1b746fc..7ff6a76 100644 --- a/readme.md +++ b/readme.md @@ -1,10 +1,13 @@ -# Dome2rect v1.1 - Jan 1, 2014 # +# Dome2rect v1.3 - 2015-05-06 # by Andrew Hazelden ## Overview ## Dome2rect is a command line script that uses the open source Panotool library + MPRemap application to automate the process of converting image sequences between multiple panoramic formats. I created this script because I wanted to make it simpler to convert a fulldome movie trailer into a "flat screen" rectilinear format for posting on sites like YouTube. -**Note:** Windows 7 is required to use the tools. +**Note:** Windows 7 or higher is required to use the tools. + +### Changes in Version 1.3 ### +New in Dome2rect version 1.3 is support for latlong to cubic, horizontal cross, vertical cross, and cubemap3x2 conversions. ## Download ## @@ -51,7 +54,6 @@ The final output image resolution and the image positioning is controlled by edi A sample rectilinear to domemaster image sequence conversion, named **rect2dome.0000.jpg** to **rect2dome.0035.jpg**, is included in the `C:\dome2rect\output` folder. - **rect2dome.bat Input Image**: ![This image is the output from running a rectillinear to dome conversion.](docs/images/zosma_rect.jpg) This is the input image for the rectilinear to dome conversion. @@ -63,7 +65,7 @@ This image was re-projected into a domemaster fisheye format. When the rect2dome output image is viewed in a fulldome simulator it looks like this: ![This is the 1080p to dome conversion in a fulldome simulator.](docs/images/dome2rect-in-domeviewer.png) -**Note:** The [Domemaster Stereo shader tool "Dome Viewer"](https://code.google.com/p/domemaster-stereo-shader/wiki/DomeViewer "Dome Viewer") was used to preview the rect to dome conversion. +**Note:** The [Domemaster Stereo shader tool "Dome Viewer"](https://github.com/zicher3d-org/domemaster-stereo-shader/wiki/DomeViewer) was used to preview the rect to dome conversion. * * * @@ -72,11 +74,22 @@ The tool is an early alpha release and will be improved over time. Right now th I created the following example .bat scripts to show what is possible: +**angular2cyl.bat** +Converts a an angular fisheye image to a cylindrical image. + +**angular2latlong.bat** +Converts an angular fisheye image to a latitude/longitude (equirectangular) image. + **dome2rect.bat** -Converts a fisheye image to a rectilinear image. +Converts a 180 degree domemaster format angular fisheye image to a rectilinear image format. -**rect2dome.bat** -Converts a rectilinear image to a fisheye image +**latlong2cubemap3x2.bat** +Converts a latitude/longitude image to a cubic format that has a single image output with a Cubemap 3x2 arrangement with 3 cubic faces on the top row, and 3 cubic faces on the bottom row. + +The Cubemap 3x2 format was popularized by [Garden Gnome Software's Pano2VR](http://ggnome.com/pano2vr) Panoramic tools. + +**latlong2cubic.bat** +Converts a latitude/longitude image to a set of 6 cubic face images. **latlong2cyl.bat** Converts a latitude/longitude image to a cylindrical image. @@ -84,9 +97,18 @@ Converts a latitude/longitude image to a cylindrical image. **latlong2dome.bat** Converts a latitude/longitude (equirectangular) image to a fulldome image. +**latlong2horizontalcross.bat** +Converts a latitude/longitude image to a cubic format that has a single image output with a horizontal cross arrangement. + **latlong2rect.bat** Converts a latitude/longitude (equirectangular) image to a rectilinear image. +**latlong2verticalcross.bat** +Converts a latitude/longitude image to a cubic format that has a single image output with a vertical cross arrangement. + +**rect2dome.bat** +Converts a rectilinear image to a fisheye image + **review.bat** Simple playback program to view the image output. This tool uses ffmpeg's playback tool. @@ -106,9 +128,26 @@ o f3 v180 r-10 y0 p55 m i2

+This example panotools conversion script takes an angular fisheye image and converts it to a 2160x1080 cylindrical image output. The image is pitched 90 degrees. + +
# Defish image to a cylindrical 1080p format:
+p f1 w2160 h1080 v360
+o f3 v360 r0 y0 p90 b0
+m i2
+
+ + +This example panotools conversion script takes an angular fisheye image and converts it to a 2048x1024 latitude longitude (equirectangular) image output. The image is pitched 90 degrees. + +
# Defish image to a latlong 1024p format:
+p f2 w2048 h1024 v360
+o f3 v360 r0 y0 p90 b0
+m i2
+
+ This example panotools conversion script takes a latitude longitude (equirectangular) image and converts it to a 1920x1080p rectilinear image output. -
# Defish latlong image to a 1080p HD format:
+
# latlong image to a 1080p HD format:
 p f0 w1920 h1080 v90  
 o f4 v360 r0 y0 p0  
 m i2  
@@ -130,6 +169,8 @@ Here is a quick summary of the PT Stitcher syntax:
 C0,960,420,960 = Crop Dimensions left,right,top,bottom
 f0 = projection mode  0 = rectilinear
 f1 = projection mode  1 = cylindrical
+f2 = projection mode  2 = equirectagular/latlong
+f3 = projection mode  3 = fullframe fisheye
 
 w1920 = destination width 1920 px
 h1080 = destination height 1080 px
@@ -138,7 +179,9 @@ v90 = horizontal field of view = 90 degrees
 'o' = Source Image Attributes
 
 'o' Attributes:
+f0 = projection mode 0 = rectilinear
 f3 = projection mode 3 = equidistant fisheye
+f4 = projection mode 4 = equirectagular/latlong
 f5 = projection mode 5 = circular fisheye
 f10 = projection mode 10 = equisolid fisheye
 
@@ -165,9 +208,9 @@ To change the name of the input and output files you can edit the .bat scripts u
 
 To convert a single frame image enter the exact image name. (eg. image.jpg) 
  
-To convert an unpadded image sequence use the value %%d.jpg (eg. 9.jpg )
+To convert an unpadded image sequence use the value %%d.jpg (eg. 9.jpg )  
 
-To convert an a 4 digit padded image sequence use the value %%.4d.jpg  (eg: 0009.jpg)  
+To convert an a 4 digit padded image sequence use the value %%.4d.jpg (eg: 0009.jpg)  
 
 If you want the dome2rect script to process a single frame for testing change the following code:  
 
diff --git a/rect2dome.bat b/rect2dome.bat
index e6a506e..6c38047 100644
--- a/rect2dome.bat
+++ b/rect2dome.bat
@@ -1,7 +1,7 @@
 @ECHO OFF
-@title rect2dome v1.1 - immersive transformations
+@title rect2dome v1.3 - immersive transformations
 
-echo rect2dome v1.1 - Jan 1, 2014
+echo rect2dome v1.3 - May 6, 2015
 echo script by Andrew Hazelden
 echo ----------------------------------------------------------------------
 echo dome2rect converts a rectilinear image sequence into the fisheye format
@@ -36,4 +36,4 @@ bin\mpremap.exe -f scripts\%ptscript% -o %output% %input%
 
 echo Loading frames into viewer...
 REM PAUSE
-REM C:\dome2rect\review.bat
\ No newline at end of file
+REM C:\dome2rect\review.bat %output%
diff --git a/review.bat b/review.bat
index c7c5f0e..a33a43a 100644
--- a/review.bat
+++ b/review.bat
@@ -1,5 +1,7 @@
 @ECHO OFF
-echo review v1.1 - Dec 11, 2013
+@title Review v1.3 - immersive transformations
+
+echo Review v1.3 - May 6, 2015
 echo ---------------------------------
 echo Show the converted imagery generated by dome2rect
 echo using the ffmpeg player utility
@@ -9,6 +11,8 @@ REM Sequences start on frame number 0 (ie. 0.jpg)
 REM Use %%d.jpg for an unpadded image sequence named 9.jpg
 REM Use %%.4d.jpg for a padded image sequence named 0009.jpg
 
-C:\dome2rect\bin\ffplay.exe -window_title "dome2rect viewer - Press ESC to quit" -loop -1 C:\dome2rect\output\sequence.%%d.jpg
+REM C:\dome2rect\bin\ffplay.exe -window_title "dome2rect viewer - Press ESC to quit" -loop -1 C:\dome2rect\output\sequence.%%d.jpg
+
+C:\dome2rect\bin\ffplay.exe -window_title "dome2rect viewer - Press ESC to quit" -loop -1 C:\dome2rect\output\%VAR1%
 
-PAUSE
\ No newline at end of file
+PAUSE
diff --git a/scripts/angular2cyl b/scripts/angular2cyl
new file mode 100644
index 0000000..727e01b
--- /dev/null
+++ b/scripts/angular2cyl
@@ -0,0 +1,54 @@
+# Convert a fisheye frame to a latlong image
+# Output resolution: 2048x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Defish image to a cylindrical 1080p format:
+p f1 w2160 h1080 v360
+o f3 v360 r0 y0 p90 b0
+m i2
+
+# Defish image to a cylindrical 1920x960px format:
+#p f1 w1920 h960 v360
+#o f3 v360 r0 y0 p90 b0
+#m i2
diff --git a/scripts/angular2latlong b/scripts/angular2latlong
new file mode 100644
index 0000000..da46a21
--- /dev/null
+++ b/scripts/angular2latlong
@@ -0,0 +1,60 @@
+# Convert an angular fisheye frame to a latlong image
+# Output resolution: 2048x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Defish image to a 2048p latlong format
+#p f2 w4096 h2048 v360
+#o f3 v360 r0 y0 p90 b0
+#m i2
+
+# Defish image to a 1536p latlong format
+#p f2 w3072 h1536 v360
+#o f3 v360 r0 y0 p90 b0
+#m i2
+
+# Defish image to a 1024p latlong format
+p f2 w2048 h1024 v360
+o f3 v360 r0 y0 p90 b0
+m i2
diff --git a/scripts/dome2rect b/scripts/dome2rect
index e044d6e..151053b 100644
--- a/scripts/dome2rect
+++ b/scripts/dome2rect
@@ -12,6 +12,8 @@
 # C0,960,420,960 = Crop Dimensions left,right,top,bottom
 # f0 = projection mode  0 = rectilinear
 # f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
 
 # w1920 = destination width 1920 px
 # h1080 = destination height 1080 px
@@ -21,10 +23,13 @@
 # 'o' = Source Image Attributes
 #
 # 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
 # f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
 # f5 = projection mode 5 = circular fisheye
 # f10 = projection mode 10 = equisolid fisheye
 
+
 # r-10 = roll the image -10 degrees (left)
 # y22 = yaw the image 22 degrees
 # p45 = pitch the image 45 degrees
diff --git a/scripts/latlong2cubemap_back b/scripts/latlong2cubemap_back
new file mode 100644
index 0000000..65ee2a2
--- /dev/null
+++ b/scripts/latlong2cubemap_back
@@ -0,0 +1,69 @@
+# Convert a latlong image to the cubic back format
+# Output resolution: 1024x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Back View
+
+# latlong image to a 1024p cubic format
+p f0 w1024 h1024 v90
+o f4 v360 r180 y0 p180 b0
+
+# latlong image to a 1536p cubic format
+#p f2 w1536 h1536 v90
+#o f4 v360 r180 y0 p180 b0
+
+# latlong image to a 2048p cubic format
+#p f2 w2048 h2048 v90
+#o f4 v360 r180 y0 p180 b0
+
+# latlong image to a 3072p cubic format
+#p f2 w3072 h3072 v90
+#o f4 v360 r180 y0 p180 b0
+
+# latlong image to a 4096p cubic format
+#p f2 w4096 h4096 v90
+#o f4 v360 r180 y0 p180 b0
+
+m i2
diff --git a/scripts/latlong2cubemap_bottom b/scripts/latlong2cubemap_bottom
new file mode 100644
index 0000000..ccfeb81
--- /dev/null
+++ b/scripts/latlong2cubemap_bottom
@@ -0,0 +1,69 @@
+# Convert a latlong image to the cubic bottom format
+# Output resolution: 1024x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Bottom View
+
+# latlong image to a 1024p cubic format
+p f0 w1024 h1024 v90
+o f4 v360 r0 y0 p90 b0
+
+# latlong image to a 1536p cubic format
+#p f2 w1536 h1536 v90
+#o f4 v360 r0 y0 p90 b0
+
+# latlong image to a 2048p cubic format
+#p f2 w2048 h2048 v90
+#o f4 v360 r0 y0 p90 b0
+
+# latlong image to a 3072p cubic format
+#p f2 w3072 h3072 v90
+#o f4 v360 r0 y0 p90 b0
+
+# latlong image to a 4096p cubic format
+#p f2 w4096 h4096 v90
+#o f4 v360 r0 y0 p90 b0
+
+m i2
diff --git a/scripts/latlong2cubemap_front b/scripts/latlong2cubemap_front
new file mode 100644
index 0000000..2e5d5d7
--- /dev/null
+++ b/scripts/latlong2cubemap_front
@@ -0,0 +1,69 @@
+# Convert a latlong image to the cubic front format
+# Output resolution: 1024x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Front View
+
+# latlong image to a 1024p cubic format
+p f0 w1024 h1024 v90
+o f4 v360 r0 y0 p0 b0
+
+# latlong image to a 1536p cubic format
+#p f2 w1536 h1536 v90
+#o f4 v360 r0 y0 p0 b0
+
+# latlong image to a 2048p cubic format
+#p f2 w2048 h2048 v90
+#o f4 v360 r0 y0 p0 b0
+
+# latlong image to a 3072p cubic format
+#p f2 w3072 h3072 v90
+#o f4 v360 r0 y0 p0 b0
+
+# latlong image to a 4096p cubic format
+#p f2 w4096 h4096 v90
+#o f4 v360 r0 y0 p0 b0
+
+m i2
diff --git a/scripts/latlong2cubemap_left b/scripts/latlong2cubemap_left
new file mode 100644
index 0000000..e505ab0
--- /dev/null
+++ b/scripts/latlong2cubemap_left
@@ -0,0 +1,69 @@
+# Convert a latlong image to the cubic left format
+# Output resolution: 1024x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Left View
+
+# latlong image to a 1024p cubic format
+p f0 w1024 h1024 v90
+o f4 v360 r0 y90 p0 b0
+
+# latlong image to a 1536p cubic format
+#p f2 w1536 h1536 v90
+#o f4 v360 r0 y90 p0 b0
+
+# latlong image to a 2048p cubic format
+#p f2 w2048 h2048 v90
+#o f4 v360 r0 y90 p0 b0
+
+# latlong image to a 3072p cubic format
+#p f2 w3072 h3072 v90
+#o f4 v360 r0 y90 p0 b0
+
+# latlong image to a 4096p cubic format
+#p f2 w4096 h4096 v90
+#o f4 v360 r0 y90 p0 b0
+
+m i2
diff --git a/scripts/latlong2cubemap_right b/scripts/latlong2cubemap_right
new file mode 100644
index 0000000..dad2877
--- /dev/null
+++ b/scripts/latlong2cubemap_right
@@ -0,0 +1,69 @@
+# Convert a latlong image to the cubic right format
+# Output resolution: 1024x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Right View
+
+# latlong image to a 1024p cubic format
+p f0 w1024 h1024 v90
+o f4 v360 r0 y-90 p0 b0
+
+# latlong image to a 1536p cubic format
+#p f2 w1536 h1536 v90
+#o f4 v360 r0 y-90 p0 b0
+
+# latlong image to a 2048p cubic format
+#p f2 w2048 h2048 v90
+#o f4 v360 r0 y-90 p0 b0
+
+# latlong image to a 3072p cubic format
+#p f2 w3072 h3072 v90
+#o f4 v360 r0 y-90 p0 b0
+
+# latlong image to a 4096p cubic format
+#p f2 w4096 h4096 v90
+#o f4 v360 r0 y-90 p0 b0
+
+m i2
diff --git a/scripts/latlong2cubemap_top b/scripts/latlong2cubemap_top
new file mode 100644
index 0000000..8ba3e56
--- /dev/null
+++ b/scripts/latlong2cubemap_top
@@ -0,0 +1,69 @@
+# Convert a latlong image to the cubic top format
+# Output resolution: 1024x1024 px
+
+# This script is written the the PTStitcher language
+# For more syntax information check out the PTStitcher Wiki page:
+# http://wiki.panotools.org/PTStitcher
+
+#####################
+# 'p' = Destination Image Attributes
+#
+# 'p' Attributes:
+# C0,960,420,960 = Crop Dimensions left,right,top,bottom
+# f0 = projection mode  0 = rectilinear
+# f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
+
+# w1920 = destination width 1920 px
+# h1080 = destination height 1080 px
+# v180 = horizontal field of view = 180 degrees
+
+#####################
+# 'o' = Source Image Attributes
+#
+# 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
+# f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
+# f5 = projection mode 5 = circular fisheye
+# f10 = projection mode 10 = equisolid fisheye
+
+
+# r-10 = roll the image -10 degrees (left)
+# y22 = yaw the image 22 degrees
+# p45 = pitch the image 45 degrees
+
+# b0.1 or b0.5 = barrel distort correct = useful ranges from -1.0 to 1.0
+#####################
+# Image Interpolation and Anti-Aliasing
+# 'm' = Anti-Aliasing Attributes
+#
+# m i2 = smooth spline36 interpolation of the converted imagery
+#
+#####################
+# You can pick one of the following examples:
+
+# Top View
+
+# latlong image to a 1024p cubic format
+p f0 w1024 h1024 v90
+o f4 v360 r0 y0 p-90 b0
+
+# latlong image to a 1536p cubic format
+#p f2 w1536 h1536 v90
+#o f4 v360 r0 y0 p-90 b0
+
+# latlong image to a 2048p cubic format
+#p f2 w2048 h2048 v90
+#o f4 v360 r0 y0 p-90 b0
+
+# latlong image to a 3072p cubic format
+#p f2 w3072 h3072 v90
+#o f4 v360 r0 y0 p-90 b0
+
+# latlong image to a 4096p cubic format
+#p f2 w4096 h4096 v90
+#o f4 v360 r0 y0 p-90 b0
+
+m i2
diff --git a/scripts/latlong2cyl b/scripts/latlong2cyl
index 88ad162..c930e1c 100644
--- a/scripts/latlong2cyl
+++ b/scripts/latlong2cyl
@@ -13,6 +13,8 @@
 # C0,960,420,960 = Crop Dimensions left,right,top,bottom
 # f0 = projection mode  0 = rectilinear
 # f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
 
 # w1920 = destination width 1920 px
 # h1080 = destination height 1080 px
@@ -22,12 +24,12 @@
 # 'o' = Source Image Attributes
 #
 # 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
 # f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
 # f5 = projection mode 5 = circular fisheye
 # f10 = projection mode 10 = equisolid fisheye
 
-# f4 = projection mode 4 = equirectagular
-
 # r-10 = roll the image -10 degrees (left)
 # y22 = yaw the image 22 degrees
 # p45 = pitch the image 45 degrees
diff --git a/scripts/latlong2dome b/scripts/latlong2dome
index 91b093d..03f8820 100644
--- a/scripts/latlong2dome
+++ b/scripts/latlong2dome
@@ -12,7 +12,7 @@
 # C0,960,420,960 = Crop Dimensions left,right,top,bottom
 # f0 = projection mode  0 = rectilinear
 # f1 = projection mode  1 = cylindrical
-# f2 = projection mode  2 = equirectagular /latlong
+# f2 = projection mode  2 = equirectagular/latlong
 # f3 = projection mode  3 = fullframe fisheye
 
 # w1920 = destination width 1920 px
@@ -23,11 +23,13 @@
 # 'o' = Source Image Attributes
 #
 # 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
 # f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
 # f5 = projection mode 5 = circular fisheye
-# f4 = projection mode 4 = equirectagular /latlong
 # f10 = projection mode 10 = equisolid fisheye
 
+
 # r-10 = roll the image -10 degrees (left)
 # y22 = yaw the image 22 degrees
 # p45 = pitch the image 45 degrees
diff --git a/scripts/latlong2rect b/scripts/latlong2rect
index 34d478d..fca892e 100644
--- a/scripts/latlong2rect
+++ b/scripts/latlong2rect
@@ -12,6 +12,8 @@
 # C0,960,420,960 = Crop Dimensions left,right,top,bottom
 # f0 = projection mode  0 = rectilinear
 # f1 = projection mode  1 = cylindrical
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
 
 # w1920 = destination width 1920 px
 # h1080 = destination height 1080 px
@@ -21,11 +23,12 @@
 # 'o' = Source Image Attributes
 #
 # 'o' Attributes:
+# f0 = projection mode 0 = rectilinear
 # f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
 # f5 = projection mode 5 = circular fisheye
 # f10 = projection mode 10 = equisolid fisheye
 
-# f4 = projection mode 4 = equirectagular
 
 # r-10 = roll the image -10 degrees (left)
 # y22 = yaw the image 22 degrees
diff --git a/scripts/rect2dome b/scripts/rect2dome
index 6f0d2e8..068fbe2 100644
--- a/scripts/rect2dome
+++ b/scripts/rect2dome
@@ -13,6 +13,8 @@
 # f0 = projection mode  0 = rectilinear
 # f1 = projection mode  1 = cylindrical
 # f3 = projection mode  3 = fullframe fisheye
+# f2 = projection mode  2 = equirectagular/latlong
+# f3 = projection mode  3 = fullframe fisheye
 
 # w1920 = destination width 1920 px
 # h1080 = destination height 1080 px
@@ -24,9 +26,11 @@
 # 'o' Attributes:
 # f0 = projection mode 0 = rectilinear
 # f3 = projection mode 3 = equidistant fisheye
+# f4 = projection mode 4 = equirectagular
 # f5 = projection mode 5 = circular fisheye
 # f10 = projection mode 10 = equisolid fisheye
 
+
 # r-10 = roll the image -10 degrees (left)
 # y22 = yaw the image 22 degrees
 # p45 = pitch the image 45 degrees