Skip to content

Commit

Permalink
v1.3
Browse files Browse the repository at this point in the history
Added support for latlong to cubic, cubemap3x2, horizontal cross, and
vertical cross panoramic conversions.
  • Loading branch information
AndrewHazelden committed May 6, 2015
1 parent 7ee45fc commit c3efb1a
Show file tree
Hide file tree
Showing 66 changed files with 1,410 additions and 309 deletions.
601 changes: 325 additions & 276 deletions readme.html → Dome2rect readme.html

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions angular2cyl.bat
Original file line number Diff line number Diff line change
@@ -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%
42 changes: 42 additions & 0 deletions angular2latlong.bat
Original file line number Diff line number Diff line change
@@ -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%
Binary file modified docs/images/dome2rect_in_action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions dome2rect.bat
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
REM C:\dome2rect\review.bat %output%
Binary file added input/angular360.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added input/latlong_sequence.1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions latlong2cubemap3x2.bat
Original file line number Diff line number Diff line change
@@ -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%
75 changes: 75 additions & 0 deletions latlong2cubic.bat
Original file line number Diff line number Diff line change
@@ -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%
6 changes: 3 additions & 3 deletions latlong2cyl.bat
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
REM C:\dome2rect\review.bat %output%
6 changes: 3 additions & 3 deletions latlong2dome.bat
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
REM C:\dome2rect\review.bat %output%
Loading

0 comments on commit c3efb1a

Please sign in to comment.