API / SDK / External PTGui implementation

151 views
Skip to first unread message

Leonardo Azzari

unread,
Mar 25, 2024, 12:16:25 PMMar 25
to PTGui Support
Hi,
I've got the PTGui Pro license and I was wondering if it's possible from a .NET application, from Command Prompt or Windows Powershell to automate the panorama generation creation.

I just want to avoid the whole process of opening the software, selecting the images, setting Align to Grid, executing Align Images and finally Generate Panorama in .tiff.

Either in PTGui Pro 12 or 13 Beta, is it possible to automate the process and maybe just pass the images folder path and let the process execute without opening the software?

Thanks in advance!

Kristof Meirlaen (Kri-Soft)

unread,
Mar 25, 2024, 12:41:47 PMMar 25
to PTGui Support
You can probably use the command line options:

gr,
Kristof

Op maandag 25 maart 2024 om 17:16:25 UTC+1 schreef Leonardo Azzari:

Erik Krause

unread,
Mar 25, 2024, 1:01:33 PMMar 25
to pt...@googlegroups.com
Am 25.03.2024 um 17:16 schrieb Leonardo Azzari:
> I just want to avoid the whole process of opening the software, selecting
> the images, setting Align to Grid, executing Align Images and finally
> Generate Panorama in .tiff.

Another possibility (besides using the command line interface) would be
to use templates and the Batch Builder. You configure template behavior
on Project Settings tab, save as template, then choose Batch Builder
from Tools menu, which will create project files (according to your
template) and send them to the Batch Stitcher.

--
Erik Krause
http://www.erik-krause.de

PTGui Support

unread,
Mar 25, 2024, 5:40:54 PMMar 25
to pt...@googlegroups.com
And in PTGui 13 beta:


A new command line option was added for creating a new project file from
a given set of images and optionally a template:

PTGui[.exe] -createproject img1.jpg img2.jpg -output project.pts
[-template template.pts]

This creates a project file for the given source images, optionally
using a template, but does not stitch it yet. No GUI is shown. The
project can be opened in PTGui, or it can be stitched from the command
line using the -stitchnogui flag. The -createproject and -stitchnogui
flags can even be combined in a single command line, in which case the
project is created and stitched in one go:

PTGui[.exe] -createproject img1.jpg img2.jpg -output project.pts
-template template.pts -stitchnogui project.pts


But as Erik says, you might also just want to use the Batch Builder instead.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Leonardo Azzari

unread,
Mar 28, 2024, 5:30:42 AMMar 28
to PTGui Support
Thanks for all the answers.

The whole process is working pretty great with commands similar to this:
PTGui.exe -createproject D:\Temp\White\R0_C0_Red.jpg D:\Temp\White\R0_C1_Red.jpg D:\Temp\White\R0_C2_Red.jpg -output projectTest.pts -stitchnogui projectTest.pts

Considering that I need to stitch more than 100+ images, I was wondering if it's possible to just pass the folder path (D:\Temp\White in my example) as argument instead of every single image file path.

PTGui Support

unread,
Mar 28, 2024, 5:51:44 AMMar 28
to pt...@googlegroups.com
Hi Leonardo,

No I'm sorry, that's not supported. You have to pass the individual
image file names.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 28-03-2024 10:30, Leonardo Azzari wrote:
> Thanks for all the answers.
>
> The whole process is working pretty great with commands similar to this:
> *PTGui.exe -createproject D:\Temp\White\R0_C0_Red.jpg
> D:\Temp\White\R0_C1_Red.jpg **D:\Temp\White\R0_C2_Red.jpg **-output
> projectTest.pts -stitchnogui projectTest.pts*
>
> Considering that I need to stitch more than 100+ images, I was wondering
> if it's possible to just pass the folder path (D:\Temp\White in my
> example) as argument instead of every single image file path.
>
> Il giorno lunedì 25 marzo 2024 alle 22:40:54 UTC+1 PTGui Support ha scritto:
>
> And in PTGui 13 beta:
>
>
> A new command line option was added for creating a new project file
> from
> a given set of images and optionally a template:
>
> PTGui[.exe] -createproject img1.jpg img2.jpg -output project.pts
> [-template template.pts]
>
> This creates a project file for the given source images, optionally
> using a template, but does not stitch it yet. No GUI is shown. The
> project can be opened in PTGui, or it can be stitched from the command
> line using the -stitchnogui flag. The -createproject and -stitchnogui
> flags can even be combined in a single command line, in which case the
> project is created and stitched in one go:
>
> PTGui[.exe] -createproject img1.jpg img2.jpg -output project.pts
> -template template.pts -stitchnogui project.pts
>
>
> But as Erik says, you might also just want to use the Batch Builder
> instead.
>
> Kind regards,
>
> Joost Nieuwenhuijse
> www.ptgui.com <http://www.ptgui.com>
> https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com> <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/8a5f7d58-0077-43f0-af94-4b7bb405452cn%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/8a5f7d58-0077-43f0-af94-4b7bb405452cn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Harald Thingelstad

unread,
Mar 30, 2024, 12:26:59 PMMar 30
to PTGui Support
But there could be command line tools that do the job for you outside of PTgui.
I don't know windows command line too well, but at least in bash joker notation like R0_C*.jpg will send a list of all the files matching R0_C*.jpg in that folder to the program it's about to start. PTgui in this case. If it gets more complex like that you can also do a bit of programming, as languages like Python are originally developed to solve such simple but repetetive tasks.

Leonardo Azzari

unread,
Apr 3, 2024, 5:35:02 AMApr 3
to PTGui Support
Hi,
thanks anyway, it's not particularly a problem.

Back to the script command, I was wondering if the optional template to add could be useful in my situation...
I noticed that the stitching of my 12x7 images grid is failing, the control points creation is failing because one of the images is mostly black without any particular detail.
From PTGui UI I can reopen the project i generated and generate a good panorama after applying 12x7 grid and re-aligning images. 
From PTGui script command If I remove one row of images, the -stitchnogui will generate the panorama without any errors (because that black row is no longer part of the process).

Considering that it's working from the PTGui UI, can I add some extra attribute on my command to make it work?
I'm not using the template so I was wondering how should I implement it.

Thanks in advance

PTGui Support

unread,
Apr 3, 2024, 6:20:53 AMApr 3
to pt...@googlegroups.com
Hi Leonardo,

You could do Align To Grid and setup your images in a 12x7 grid. Then do
File - Save As Template. You can use that template for multiple sets of
images if they use the same grid.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 03-04-2024 11:35, Leonardo Azzari wrote:
> Hi,
> thanks anyway, it's not particularly a problem.
>
> Back to the script command, I was wondering if the optional template to
> add could be useful in my situation...
> I noticed that the stitching of my 12x7 images grid is failing, the
> control points creation is failing because one of the images is mostly
> black without any particular detail.
> From PTGui UI I can reopen the project i generated and generate a good
> panorama after applying 12x7 grid and re-aligning images.
> From PTGui script command If I remove one row of images, the
> -stitchnogui will generate the panorama without any errors (because that
> black row is no longer part of the process).
>
> Considering that it's working from the PTGui UI, can I add some extra
> attribute on my command to make it work?
> I'm not using the template so I was wondering how should I implement it.
>
> Thanks in advance
>
> Il giorno giovedì 28 marzo 2024 alle 10:51:44 UTC+1 PTGui Support ha
> scritto:
>
> Hi Leonardo,
>
> No I'm sorry, that's not supported. You have to pass the individual
> image file names.
>
> Kind regards,
>
> Joost Nieuwenhuijse
> www.ptgui.com <http://www.ptgui.com>
> > www.ptgui.com <http://www.ptgui.com> <http://www.ptgui.com
> https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com> <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com>> <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ptgui/16ae183b-4775-4e89-b633-6e425cf3d3a3n%40googlegroups.com?utm_medium=email&utm_source=footer>>>.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "PTGui Support" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to ptgui+un...@googlegroups.com
> > <mailto:ptgui+un...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ptgui/8a5f7d58-0077-43f0-af94-4b7bb405452cn%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/8a5f7d58-0077-43f0-af94-4b7bb405452cn%40googlegroups.com> <https://groups.google.com/d/msgid/ptgui/8a5f7d58-0077-43f0-af94-4b7bb405452cn%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ptgui/8a5f7d58-0077-43f0-af94-4b7bb405452cn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/a9d260e5-3553-4a49-8598-e3da5a36752en%40googlegroups.com <https://groups.google.com/d/msgid/ptgui/a9d260e5-3553-4a49-8598-e3da5a36752en%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages