Loading ...
Sorry, an error occurred while loading the content.
 

Re: Merging big number of cube faces ?

Expand Messages
  • Karol Kwiatek
    Hi, Thanks Erik for your very useful links to your scripts. I am still strugling with this problem. I created files in this order: Cube1: cube1_001.jpg,
    Message 1 of 16 , Dec 1 8:57 AM
      Hi,

      Thanks Erik for your very useful links to your scripts.
      I am still strugling with this problem.
      I created files in this order:
      Cube1: cube1_001.jpg, cube1_002.jpg...cube1_020.jpg
      Cube2: cube2_001.jpg, cube2_002.jpg...cube2_020.jpg
      ..
      Cube6: cube6_001.jpg, cube6_002.jpg...cube6_020.jpg

      I tried to use your template for PTGUI (cubefaces), but PTGUI or
      PTStitcher asks me about a script file.

      How can I merge cube faces in this way:
      Pano1: cube1_001.jpg + cube2_001.jpg + ... + cube6_001.jpg
      Pano2: cube1_002.jpg + cube2_002.jpg + ... + cube6_002.jpg

      Where can I find how to create script.txt for PTStitcher?

      How can I generate such lines in automatic way (not copy, paste, change):

      Pano1: cube1_001.jpg + cube2_001.jpg + ... + cube6_001.jpg
      ..
      Pano20: cube1_020.jpg + cube2_020.jpg + ... + cube6_020.jpg ?

      I am looking forward to your reply.
      Karol




      --- In PanoToolsNG@yahoogroups.com, Erik Krause <erik.krause@...> wrote:
      >
      > Karol Kwiatek wrote:
      > > Do you know a good way to stitch them to equirectangular panoramas in
      > > a quick way?
      >
      > A couple of possibilities are mentioned on
      > http://wiki.panotools.org/Extracting_and_inserting_rectilinear_Views
      > especially in "Inserting cubefaces again"
      >
      > In your case the "Dos for Panoramas" batch file might be the best
      > choice. Or do it with the PTGui template provided from my page:
      > http://www.erik-krause.de/index.htm?./ttt/#PTGui%20files
      >
      > --
      > Erik Krause
      > http://www.erik-krause.de
      >
    • Hans Nyberg
      ... What did you use to create cubefaces with this namings.? They are not standard names used by any viewer. Standard names are for example image_f.jpg,
      Message 2 of 16 , Dec 1 9:29 AM
        --- In PanoToolsNG@yahoogroups.com, "Karol Kwiatek" <k_kwiatek@...> wrote:
        >
        > Hi,
        >
        > Thanks Erik for your very useful links to your scripts.
        > I am still strugling with this problem.
        > I created files in this order:
        > Cube1: cube1_001.jpg, cube1_002.jpg...cube1_020.jpg
        > Cube2: cube2_001.jpg, cube2_002.jpg...cube2_020.jpg
        > ..
        > Cube6: cube6_001.jpg, cube6_002.jpg...cube6_020.jpg

        What did you use to create cubefaces with this namings.?

        They are not standard names used by any viewer.

        Standard names are for example image_f.jpg, image_r.jpg, image_b.jpg etc
        or image1, image2, image3 etc
        or image-front.jpg, image-right.jpg, image-back.jpg etc.

        If you used 1 of the standards you could have used Pano2VR or CubicConverter to batch
        them.

        Hans
      • Erik Krause
        ... The template should provide enough information to run either PTStitcher or PTGui internal stitcher. You load the images, apply the template and create
        Message 3 of 16 , Dec 1 12:13 PM
          Karol Kwiatek wrote:
          > I tried to use your template for PTGUI (cubefaces), but PTGUI or
          > PTStitcher asks me about a script file.

          The template should provide enough information to run either PTStitcher
          or PTGui internal stitcher. You load the images, apply the template and
          create panorama.

          > How can I merge cube faces in this way:
          > Pano1: cube1_001.jpg + cube2_001.jpg + ... + cube6_001.jpg
          > Pano2: cube1_002.jpg + cube2_002.jpg + ... + cube6_002.jpg

          I don't fully understand. Am I right you want to assemble those
          cubefaces to equirectangular panorama?

          > Where can I find how to create script.txt for PTStitcher?

          On http://wiki.panotools.org/PTStitcher

          A basic script would be:
          --snip
          p w8000 h4000 f2 v360 u20 n"JPEG g0 q90"
          m g1 i4 f0
          o f0 y0 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
          o f0 y90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
          o f0 y-180 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
          o f0 y-90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
          o f0 y0 r0 p90 v90 a0 b0 c0 d0 e0 g0 t0
          o f0 y0 r0 p-90 v90 a0 b0 c0 d0 e0 g0 t0
          --snap
          This one will create an equirect with 8000 pixels width and 4000 pixels
          hight as a jpeg file with 90% quality. Adjust to your needs. It accepts
          cubeface files in the order front, right, back, left, top, bottom.

          Save the above lines between --snip and --snap to a file assemble.txt
          The command line to call PTStitcher then would be

          PTStitcher -o Pano1 assemble.txt cube1_001.jpg cube2_001.jpg cube....
          (with all 6 faces of course)

          You can put those line multiple times in a batch file, you can even call
          PTStitcher in a for loop on the command line. Since in your case you
          need 3-digit numbers you need to do it for the 1 and 2 digit counts
          separately

          1..9:
          --snip
          for /L %i in (1,1,9) do PTStitcher -o Pano%i assemble.txt cube1_00%i.jpg
          cube2_00%i.jpg cube3_00%i.jpg cube4_00%i.jpg cube5_00%i.jpg
          cube6_00%i.jpg
          --snap

          10..20:
          --snip
          for /L %i in (10,1,20) do PTStitcher -o Pano%i assemble.txt
          cube1_0%i.jpg cube2_0%i.jpg cube3_0%i.jpg cube4_0%i.jpg cube5_0%i.jpg
          cube6_0%i.jpg
          --snap

          Copy and paste the lines between --snip and --snap to notepad, remove
          the line wraps and paste the line to a command window in the respective
          folder.

          (There are ways to pad variables to 3 digits even in windows shell
          language, but this would require some lines in a batch file)...

          --
          Erik Krause
          http://www.erik-krause.de
        • paul womack
          ... Can I recommend perl for this (and similar)? It s even available on Windows these days. BugBear
          Message 4 of 16 , Dec 2 1:52 AM
            Erik Krause wrote:
            > You can put those line multiple times in a batch file, you can even call
            > PTStitcher in a for loop on the command line. Since in your case you
            > need 3-digit numbers you need to do it for the 1 and 2 digit counts
            > separately

            Can I recommend perl for this (and similar)?

            It's even available on Windows these days.

            BugBear
          • Karol Kwiatek
            Many thanks Erik for your help. The answer was fantastic. I only want to add two more questions: ;-) 1) I created file.bat for this line: --snip for /L %i in
            Message 5 of 16 , Dec 2 7:39 AM
              Many thanks Erik for your help.
              The answer was fantastic.
              I only want to add two more questions: ;-)

              1) I created file.bat for this line:

              --snip
              for /L %i in (801,1,803) do PTStitcher -o panorama%i script.txt
              cube1_%i.jpg cube2_%i.jpg cube3_%i.jpg cube4_%i.jpg cube5_%i.jpg
              cube6_%i.jpg
              --snap

              but it works only for 801 (not for 802 and 803). Do I need to add a
              command to make a loop?

              2) Panoramas created using cubefaces.pts template do not have visible
              line (a see a line that separates nadir and also a zenit).

              I tried to change script.txt by adding m-line:
              --snip
              p w2000 h1000 f2 v360 u20 n"JPEG g0 q90"
              m g1 i4 f0
              o f0 y0 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              o f0 y90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              o f0 y-180 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              o f0 y-90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              o f0 y0 r0 p90 v90 a0 b0 c0 d0 e0 g0 t0
              o f0 y0 r0 p-90 v90 a0 b0 c0 d0 e0 g0 t0
              m g2.2 i3 f0
              --snap

              but I didn't find the way to correct it.
              I generated a panorama from PTGUI using Sinc256 and gamma 2.2 and I
              didn't have this visible line.


              Thanks for your help!

              Karol


              --- In PanoToolsNG@yahoogroups.com, Erik Krause <erik.krause@...> wrote:
              >
              > Karol Kwiatek wrote:
              > > I tried to use your template for PTGUI (cubefaces), but PTGUI or
              > > PTStitcher asks me about a script file.
              >
              > The template should provide enough information to run either PTStitcher
              > or PTGui internal stitcher. You load the images, apply the template and
              > create panorama.
              >
              > > How can I merge cube faces in this way:
              > > Pano1: cube1_001.jpg + cube2_001.jpg + ... + cube6_001.jpg
              > > Pano2: cube1_002.jpg + cube2_002.jpg + ... + cube6_002.jpg
              >
              > I don't fully understand. Am I right you want to assemble those
              > cubefaces to equirectangular panorama?
              >
              > > Where can I find how to create script.txt for PTStitcher?
              >
              > On http://wiki.panotools.org/PTStitcher
              >
              > A basic script would be:
              > --snip
              > p w8000 h4000 f2 v360 u20 n"JPEG g0 q90"
              > m g1 i4 f0
              > o f0 y0 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              > o f0 y90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              > o f0 y-180 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              > o f0 y-90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
              > o f0 y0 r0 p90 v90 a0 b0 c0 d0 e0 g0 t0
              > o f0 y0 r0 p-90 v90 a0 b0 c0 d0 e0 g0 t0
              > --snap
              > This one will create an equirect with 8000 pixels width and 4000 pixels
              > hight as a jpeg file with 90% quality. Adjust to your needs. It accepts
              > cubeface files in the order front, right, back, left, top, bottom.
              >
              > Save the above lines between --snip and --snap to a file assemble.txt
              > The command line to call PTStitcher then would be
              >
              > PTStitcher -o Pano1 assemble.txt cube1_001.jpg cube2_001.jpg cube....
              > (with all 6 faces of course)
              >
              > You can put those line multiple times in a batch file, you can even
              call
              > PTStitcher in a for loop on the command line. Since in your case you
              > need 3-digit numbers you need to do it for the 1 and 2 digit counts
              > separately
              >
              > 1..9:
              > --snip
              > for /L %i in (1,1,9) do PTStitcher -o Pano%i assemble.txt
              cube1_00%i.jpg
              > cube2_00%i.jpg cube3_00%i.jpg cube4_00%i.jpg cube5_00%i.jpg
              > cube6_00%i.jpg
              > --snap
              >
              > 10..20:
              > --snip
              > for /L %i in (10,1,20) do PTStitcher -o Pano%i assemble.txt
              > cube1_0%i.jpg cube2_0%i.jpg cube3_0%i.jpg cube4_0%i.jpg
              cube5_0%i.jpg
              > cube6_0%i.jpg
              > --snap
              >
              > Copy and paste the lines between --snip and --snap to notepad, remove
              > the line wraps and paste the line to a command window in the respective
              > folder.
              >
              > (There are ways to pad variables to 3 digits even in windows shell
              > language, but this would require some lines in a batch file)...
              >
              > --
              > Erik Krause
              > http://www.erik-krause.de
              >
            • Karol Kwiatek
              I changed u20 to u0 in the first line of script.txt and I don t see line going through all panorama, but only very small but visible 8 black triangles in
              Message 6 of 16 , Dec 2 8:04 AM
                I changed u20 to u0 in the first line of script.txt and I don't see
                line going through all panorama, but only very small but visible 8
                black triangles in points where 3 cube faces meets.
                Any idea what is wrong in script.txt?
                Karol

                --- In PanoToolsNG@yahoogroups.com, Erik Krause <erik.krause@...> wrote:
                >
                > Karol Kwiatek wrote:
                > > I tried to use your template for PTGUI (cubefaces), but PTGUI or
                > > PTStitcher asks me about a script file.
                >
                > The template should provide enough information to run either PTStitcher
                > or PTGui internal stitcher. You load the images, apply the template and
                > create panorama.
                >
                > > How can I merge cube faces in this way:
                > > Pano1: cube1_001.jpg + cube2_001.jpg + ... + cube6_001.jpg
                > > Pano2: cube1_002.jpg + cube2_002.jpg + ... + cube6_002.jpg
                >
                > I don't fully understand. Am I right you want to assemble those
                > cubefaces to equirectangular panorama?
                >
                > > Where can I find how to create script.txt for PTStitcher?
                >
                > On http://wiki.panotools.org/PTStitcher
                >
                > A basic script would be:
                > --snip
                > p w8000 h4000 f2 v360 u20 n"JPEG g0 q90"
                > m g1 i4 f0
                > o f0 y0 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                > o f0 y90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                > o f0 y-180 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                > o f0 y-90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                > o f0 y0 r0 p90 v90 a0 b0 c0 d0 e0 g0 t0
                > o f0 y0 r0 p-90 v90 a0 b0 c0 d0 e0 g0 t0
                > --snap
                > This one will create an equirect with 8000 pixels width and 4000 pixels
                > hight as a jpeg file with 90% quality. Adjust to your needs. It accepts
                > cubeface files in the order front, right, back, left, top, bottom.
                >
                > Save the above lines between --snip and --snap to a file assemble.txt
                > The command line to call PTStitcher then would be
                >
                > PTStitcher -o Pano1 assemble.txt cube1_001.jpg cube2_001.jpg cube....
                > (with all 6 faces of course)
                >
                > You can put those line multiple times in a batch file, you can even
                call
                > PTStitcher in a for loop on the command line. Since in your case you
                > need 3-digit numbers you need to do it for the 1 and 2 digit counts
                > separately
                >
                > 1..9:
                > --snip
                > for /L %i in (1,1,9) do PTStitcher -o Pano%i assemble.txt
                cube1_00%i.jpg
                > cube2_00%i.jpg cube3_00%i.jpg cube4_00%i.jpg cube5_00%i.jpg
                > cube6_00%i.jpg
                > --snap
                >
                > 10..20:
                > --snip
                > for /L %i in (10,1,20) do PTStitcher -o Pano%i assemble.txt
                > cube1_0%i.jpg cube2_0%i.jpg cube3_0%i.jpg cube4_0%i.jpg
                cube5_0%i.jpg
                > cube6_0%i.jpg
                > --snap
                >
                > Copy and paste the lines between --snip and --snap to notepad, remove
                > the line wraps and paste the line to a command window in the respective
                > folder.
                >
                > (There are ways to pad variables to 3 digits even in windows shell
                > language, but this would require some lines in a batch file)...
                >
                > --
                > Erik Krause
                > http://www.erik-krause.de
                >
              • Jim Watters
                Turn off Fast Transform. m g1 i4 f1 Jim ... -- Jim Watters jwatters @ photocreations . ca http://photocreations.ca
                Message 7 of 16 , Dec 2 8:24 AM
                  Turn off Fast Transform.

                  m g1 i4 f1

                  Jim


                  Karol Kwiatek wrote:
                  > I changed u20 to u0 in the first line of script.txt and I don't see
                  > line going through all panorama, but only very small but visible 8
                  > black triangles in points where 3 cube faces meets.
                  > Any idea what is wrong in script.txt?
                  > Karol
                  >
                  >>
                  >>> Where can I find how to create script.txt for PTStitcher?
                  >>>
                  >> On http://wiki.panotools.org/PTStitcher
                  >>
                  >> A basic script would be:
                  >> --snip
                  >> p w8000 h4000 f2 v360 u20 n"JPEG g0 q90"
                  >> m g1 i4 f0
                  >> o f0 y0 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                  >> o f0 y90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                  >> o f0 y-180 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                  >> o f0 y-90 r0 p0 v90 a0 b0 c0 d0 e0 g0 t0
                  >> o f0 y0 r0 p90 v90 a0 b0 c0 d0 e0 g0 t0
                  >> o f0 y0 r0 p-90 v90 a0 b0 c0 d0 e0 g0 t0
                  >> --snap

                  --
                  Jim Watters

                  jwatters @ photocreations . ca
                  http://photocreations.ca
                • Erik Krause
                  ... If you use the command inside a batch file you must double the %%. They are else interpreted as parameters variables: --snip for /L %%i in (801,1,803) do
                  Message 8 of 16 , Dec 2 12:26 PM
                    Karol Kwiatek wrote:
                    > I only want to add two more questions: ;-)
                    >
                    > 1) I created file.bat for this line:
                    >
                    > --snip
                    > for /L %i in (801,1,803) do PTStitcher -o panorama%i script.txt
                    > cube1_%i.jpg cube2_%i.jpg cube3_%i.jpg cube4_%i.jpg cube5_%i.jpg
                    > cube6_%i.jpg
                    > --snap
                    >
                    > but it works only for 801 (not for 802 and 803). Do I need to add a
                    > command to make a loop?

                    If you use the command inside a batch file you must double the %%. They
                    are else interpreted as parameters variables:

                    --snip
                    for /L %%i in (801,1,803) do PTStitcher -o panorama%%i script.txt
                    cube1_%%i.jpg cube2_%%i.jpg cube3_%%i.jpg cube4_%%i.jpg cube5_%%i.jpg
                    cube6_%%i.jpg
                    --snap

                    Sorry I forgot to mention Fast Transform...

                    --
                    Erik Krause
                    http://www.erik-krause.de
                  • Peter Nyfeler
                    Hi karol ... ...sounds like fast transform enbabled....probably best regards Peter
                    Message 9 of 16 , Dec 2 12:39 PM
                      Hi karol

                      Karol Kwiatek schrieb:
                      > but only very small but visible 8
                      > black triangles in points where 3 cube faces meets.
                      > Any idea what is wrong in script.txt?
                      >
                      ...sounds like fast transform enbabled....probably


                      best regards


                      Peter
                    • Karol Kwiatek
                      Thank you Erik, Jim and Peter for your help!!! Karol
                      Message 10 of 16 , Dec 3 1:32 PM
                        Thank you Erik, Jim and Peter for your help!!!
                        Karol
                      Your message has been successfully submitted and would be delivered to recipients shortly.