Hi Kay,

I totally understand your frustration from experience.
It seems there is a simple way to do what you want:

http://wiki.panotools.org/Panorama_scripting_in_a_nutshell#Simple_command-line_stitching

Excerpt:
....This example takes a pre-existing project called template.pto, *created
with three photos*. It uses nona <http://wiki.panotools.org/Nona> for
remapping, and enblend <http://wiki.panotools.org/Enblend> for blending the
remapped photos into a finished TIFF <http://wiki.panotools.org/TIFF> image:


 nona -o out -m TIFF_m template.pto DSC_1234.JPG DSC_1235.JPG DSC_1236.JPG
 enblend -o finished.tif out0000.tif out0001.tif out0002.tif

The first nona <http://wiki.panotools.org/Nona> command creates three
remapped TIFF <http://wiki.panotools.org/TIFF> images called out0000.tif,
out0001.tif etc... *the list of input images can be substituted with any set
of identically sized photos. *The second
enblend<http://wiki.panotools.org/Enblend>command uses these TIFF
files as input and merges them to a file called
finished.tif.....

Jan



On Sun, Nov 21, 2010 at 11:18 AM, kfj <[email protected]> wrote:

>
>
> On 21 Nov., 02:26, john doe <[email protected]> wrote:
>
> > How would i apply the .pto file to the rest of the jpgs in the
> > folder??hypotethically assuming they all have the same width, height,
> > cropping ..
>
> The easiest way is to use placehoder names lime image1.tif image2.tif
> in the pto and successively rename your images to the placeholder
> names, stich, and rename back.
> If you want separate ptos, the pto is a simple text file. So you can
> work on it with batch text processing tools. One tool to efficiently
> perform tasks like the one you need is awk, or, in it's GNU
> incarnation, gawk. It should be already there on every UNIX and Linux
> system; for Windows you'll get it as part of cygwin or minGW or even
> standalone, Mac OS I don't know, but since it runs on top of UNIX, it
> probably has it as well. If your pto, let's say it's called xx.pto, is
> of the dialect keeping the file name in i lines you'd use template
> names like 'image1.tif' and 'image2.tif' in the pto and then use an
> awk script like:
>
> /^i/ {        gsub ( /image1/ , i1 , $0 )
>              gsub ( /image2/ , i2 , $0 )
> }
>
> {             print
> }
>
> you save that as chgimg.awk
> If you call it like
>
> gawk -f chg_img.awk i1=image7 i2=image8 xx.pto > xx1.pto
>
> gawk would change image1 to image7 and image2 to image 8.
>
> If your pto is of the dialect using #-imgfile lines to give the image
> name, change the pattern in the first line of the awk file to
>
> /#-imgfile/
>
> and it will do the same.
>
> If you now call your awk script in a loop, you can generate a bunch of
> ptos doing the desired task:
>
> i=0
> imglist=($(ls *.tif))
> while [[ -a ${imglist[$i]} ]] ; do chgimg.awk i1=${imglist[$i]} i2=$
> {imglist[$i+1]} xx.pto > xx$i.pto; let i=i+2; done
>
> if you get my drift ;-) - sorry, my shell scripting is a bit rusty,
> I'm sure any UNIX wizard will do the same with half the amount of
> letters (this is using bash, the bourne again shell)
>
> ... all that said, let me add that I did a bit of research into the
> matter, since your task is such an obvious one one should think there
> is a ready-made tool for it. There probably is, and hopefully someone
> will soon post something like 'pano_xyzzle_buthle' changes image name
> in i-lines, if you call it with the --piccie parameter.... I looked at
> likely candidates among the scripts that handle pto files, but all I
> found was extremely meagre documentation. It made me really angry.
> Like there is 'hugin_stich_project'. It is a command line tool to
> stitch a hugin project. It states
>
> Verwendung: hugin_stitch_project [-h] [-o <str>] [-t <num>] [-d]
> [<project> <images>...]
>  -h, --help            show this help message
>  -o, --output=<str>    output prefix
>  -t, --threads=<num>   number of threads
>  -d, --delete          delete pto file after stitching
>
> ... and that's it. (there is a man page which says the same in
> slightly more words). So one would assume that one could maybe call it
> with a bunch of images and a pto. How's the pto to be? without i-
> lines? no joy. With i-lines? If you omit the names in the i-lines, it
> just won't work. Leave the names in the i-lines and it will ignore the
> <images> you passed. I looked at the source code of it (even...) -
> hardly a comment to be seen, totally illegible. So here was a person
> competent enough to write a piece of reasonably complex software in C+
> + consisting of 14400 characters of code (I counted). And the
> documentation is what you see above. What do the <images> in the
> command line do?
>
> Then there's a script called ptsed. It can change an image name in a
> pto file. Bit cryptic, call it like
>
> ptsed -o xx1.pto -I n/0:xxxx xx.pto
>
> And it will change the name of the first image in xx.pto to 'xxxx' and
> write the modified script to xx1.pto. The documentation was so thin I
> had to guess my way. I didn't manage to figure out how to specify that
> I want several file names changed at once.
>
> And so on. I lost patience.
>
> Personally, I use Python and so far I've set up a few scripts to help
> me wrangle with the jungle of pto dialects. But I'm not quite there
> yet to upload my scripts. If I do, I promise that the documentation
> will be better...
> until then, hope for a more helpful post then mine
>
> with clenched jaw from grinding my teeth
> Kay
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hugin and other free panoramic software" group.
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<hugin-ptx%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/hugin-ptx
>



-- 
http://www.DIY-streetview.org

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to