HowTo? have "Automatic (use EXIF data ...)" used in fisheye template?

267 views
Skip to first unread message

l_d_allan

unread,
Oct 27, 2012, 7:03:37 AM10/27/12
to pt...@googlegroups.com
9.1.4 Pro
On the first tab of Advanced mode (Project Assistant), is there a way to have the checkbox:
o Automatic (use EXIF data from camera, if available)
be checked when a template is used?
It seems to always be unchecked, regardless of its state when I use "Save as template".
I looked in the .pts file for the templates, and there are a number of values that involve EXIF, but not seem to help to have this option checked.
My experience with panos involving a fisheye lens is that a project from the Batch Builder often starts with a better avg/max CP distance with this option checked. Now, I use "Delete all CP's", change the EXIF checkboxfrom "off" to  "on", then use the button for:
2. Align images ..
Also, one of the values in the .pts template file seems odd:
#-useexif0
Is there meant to be a space before the zero (or 1)?

Joost Nieuwenhuijse - PTGui Support

unread,
Oct 28, 2012, 9:09:56 AM10/28/12
to pt...@googlegroups.com
Hi Lynn,

On Oct 27, 2012, at 1:03 PM, l_d_allan <ldas...@gmail.com> wrote:

> 9.1.4 Pro
> On the first tab of Advanced mode (Project Assistant), is there a way to have the checkbox:
> o Automatic (use EXIF data from camera, if available)
> be checked when a template is used?

Have you tried in the Project Settings to disable the checkbox 'Lens Settings' in the 'When this project is applied as a template' section? This way your project will retain the lens data as set up from the EXIF.

> My experience with panos involving a fisheye lens is that a project from the Batch Builder often starts with a better avg/max CP distance with this option checked.

It would just set your lens data to 8mm. Setting this manually (or through a template) would have exactly the same result.

> Also, one of the values in the .pts template file seems odd:
> #-useexif0
> Is there meant to be a space before the zero (or 1)?

Yes this is a known issue but it will not be changed, to retain compatibility with previous versions.

Joost

l_d_allan

unread,
Oct 29, 2012, 9:54:16 AM10/29/12
to pt...@googlegroups.com


Have you tried in the Project Settings to disable the checkbox 'Lens Settings' in the 'When this project is applied as a template' section? This way your project will retain the lens data as set up from the EXIF.

 
Thanks for your assistance on this.
 
I hadn't previously, but did disable the checkbox. That seemed to make the stitch worse. Previously, the avg/max CP distance errors might have been ~ 4/20, and ~ 1.5/5 with Automatic. It jumped to ~ 20/50.
 
The checkbox on the first tab for "Project Assistant" for "Automatic (use EXIF ...)" was still unchecked. Oddly, the software thought the lens was rectilinear rather than fisheye, even though the Options were set for it to be fisheye under 13mm for full-frame.
 
 

PTGui Support

unread,
Oct 29, 2012, 9:58:08 AM10/29/12
to pt...@googlegroups.com
Hi Lynn,

I'd be happy to take a look if you could create a zip file with the
project, templates and images and provide instructions for me to
reproduce the problem.

Joost
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui" group.
> To post to this group, send email to pt...@googlegroups.com
> To unsubscribe from this group, send email to
> ptgui+un...@googlegroups.com
> Please do not add attachments to your posts; instead upload your files
> at a file sharing site (for example http://ge.tt/ ) and include a link
> in your message.
> For more options, visit this group at http://groups.google.com/group/ptgui

l_d_allan

unread,
Oct 29, 2012, 12:04:01 PM10/29/12
to pt...@googlegroups.com
Thanks for your gracious offer of assitance. I'll be out of town for several days, and then very busy for a few days (at least) after that. So it will be at least several days. 

l_d_allan

unread,
Nov 2, 2012, 10:23:47 AM11/2/12
to pt...@googlegroups.com
Here's a link to a zipped project with 3 images with the Samyang 8mm fisheye on a Canon 5dm2 full-frame DSLR.
I've also included several templates, and projects built with various combinations.
 
"Workflow":
* ExifToolGui used to put f-stop and focal length into EXIF (Samyang is fully manual with no digital connection, so there is no lens related EXIF)
* 3 images at 60 degrees for ~210 degree FOV pano (oddly, "Panorama Settings" tab shows 360 degrees)
* Panosaurus 2.0 panohead
* Used ACR on .dng's in top-level directory to generate .jpg's as input to PtGui 9.1.4
* Template made with check-marks for Automatic-EXIF. The default "cropping circle" was small, which was adjusted in the template.
* Batch-builder used to submit multiple pano projects to Batch-stitcher (just one project in this case)
* When project from batch-builder opened, PtGui thinks it is a rectilinear lens for some reason, and avg/max CP distance errors are excessive. It also has reverted to the small "cropping circle".
* If "Load Images ..." is used for the three images and template applied, works fine. The "Auto EXIF" is checked, the enlarged "cropping circle" is used from the template, and the avg/max CP distance is much better.
 
 Am I doing something wrong, leaving out a step, or have an option incorrect?

l_d_allan

unread,
Nov 10, 2012, 10:55:36 AM11/10/12
to pt...@googlegroups.com

I'd be happy to take a look if you could create a zip file with the
project, templates and images and provide instructions for me to
reproduce the problem.

Have you had a chance to look at the project? Any update on what is going wrong? Error on my part? 

John Houghton

unread,
Nov 10, 2012, 2:32:41 PM11/10/12
to PTGui Support
I had a look and it seems to me that the problem is that the option
for the batch builder to use the EXIF data of the first image gets
unchecked when the template project is saved. In no circumstances was
I able to get PTGui to preserve that check mark when saving the file.
Consequently, when the template is applied, if the lens parameters are
not to be copied in then the correct lens type cannot be selected.

I have to say, though, that the template should work best if the lens
parameters (and crop) are copied in from the template and the exif
data ignored anyway.

John

PTGui Support

unread,
Nov 12, 2012, 6:46:03 AM11/12/12
to pt...@googlegroups.com
On 10-11-2012 20:32, John Houghton wrote:
>> Have you had a chance to look at the project? Any update on what is going
>> wrong? Error on my part?
>
> I had a look and it seems to me that the problem is that the option
> for the batch builder to use the EXIF data of the first image gets
> unchecked when the template project is saved. In no circumstances was
> I able to get PTGui to preserve that check mark when saving the file.

I can confirm that this is a bug, will be fixed in the next update.

Joost

l_d_allan

unread,
Nov 12, 2012, 10:13:36 AM11/12/12
to pt...@googlegroups.com
Thanks for looking into this.
 
A related problem seems to be that when the Batch-Builder is involved, an image with 8mm fish-eye lens (full frame or crop camera) is treated as rectilinear rather than fish-eye. It doesn't seem to use the Preferences to figure out that fish-eye is involved. I've had panos made with the 8mm that are treated as 3.5mm rectilinear. Odd.

PTGui Support

unread,
Nov 12, 2012, 10:49:20 AM11/12/12
to pt...@googlegroups.com
Hi Lynn,

I think that's because your template is set to rectilinear (and EXIF is
ignored by the batch builder due to this bug). Please try again after
the next version is released.

And I think you're using an over complicated workflow. Why not instead
create and use a template with the correct lens settings? There's no
point in manually editing EXIF data and then forcing PTGui to read it,
if you can also enter the desired lens settings directly in PTGui.

Joost

l_d_allan

unread,
Nov 13, 2012, 12:42:23 PM11/13/12
to pt...@googlegroups.com
I'm fuzzy on what I'm doing wrong.
 
I don't see any line within the .pts file that indicates whether the pano is to be fisheye or rectilinear. There is a line for:
#-rectifisheye_compression 1
but that doesn't seem to be the line that would make a difference.
 
Is there a "missing default line" in a .pts that normally indicates "rectilinear", but has to be provided to indicate "fisheye"?
 
I created the template by having a project built "from scratch" from "Load Images ...", but I'm still having problems. From that I made two templates, one with rectinlinear, and one with fisheye, but the resulting .pts files didn't seem to have a relevant difference.
 
 

John Houghton

unread,
Nov 13, 2012, 1:32:32 PM11/13/12
to PTGui Support
On Nov 13, 5:42 pm, l_d_allan <ldasig...@gmail.com> wrote:
> I created the template by having a project built "from scratch" from "Load
> Images ...", but I'm still having problems. From that I made two templates,
> one with rectinlinear, and one with fisheye, but the resulting .pts files
> didn't seem to have a relevant difference.

You really don't have to concern yourself with how parameters are
represented in the .pts file. The parameter values are most clearly
displayed by simply opening the project file in PTGui and displaying
the relevant tab - e.g. the Lens Settings tab. However, if you check
the dummy image global parameter list in the .pts file, you should
find an f0 (rectilinear) or f2 (fisheye).

John

l_d_allan

unread,
Nov 14, 2012, 12:45:57 PM11/14/12
to pt...@googlegroups.com
Something I've wondered ... when using the Samyang 8mm to make a 360 degree pano, the lens seems to be treated as about 10.5mm focal length rather than 8mm. Would it be preferred to use the 10.5mm focal length when using ExifTool to enter EXIF info in the .dng files?
 
When making templates, I believe my normal practice is to:
* load images for a well-made 360 degree pano (avg/max CP distance errors start about 1.0 / 1.5)
* get the parameters correct for all the advanced tabs (depending on rect. vs fisheye, HDR vs nonHDR, etc)
* for fisheye, get the cropping circle correct
* manually delete outlier CP's to get avg/max to about 0.5/1.0
* ? the values in the "Lens Settings" tab will have actual focal length and HFOV rather than theoretical focal length and HFOV from EXIF?
* ? perhaps uncheck "Auto EXIF ..." in "Project Assistant" tab?
* Save as templage
* ? Can (should?) values for images be deleted from template .pts file?
 
Are there flaws in the above work-flow to make templates?
 

John Houghton

unread,
Nov 14, 2012, 1:19:53 PM11/14/12
to PTGui Support
On Nov 14, 5:45 pm, l_d_allan <ldasig...@gmail.com> wrote:
> * ? the values in the "Lens Settings" tab will have actual focal length and
> HFOV rather than theoretical focal length and HFOV from EXIF?

Yes

> * ? perhaps uncheck "Auto EXIF ..." in "Project Assistant" tab?

It's the settings in the Project Settings tab that need to be got
right - i.e. in the Template Behaviour section.

> * Save as templage
> * ? Can (should?) values for images be deleted from template .pts file?

Image parameters should not be deleted, but your workflow needs to be
consistent from panorama to panorama so that y,p,r values are
replicated.

John

Erik Krause

unread,
Nov 14, 2012, 2:17:10 PM11/14/12
to pt...@googlegroups.com
Am 14.11.2012 18:45, schrieb l_d_allan:
> Something I've wondered ... when using the Samyang 8mm to make a 360
> degree pano, the lens seems to be treated as about 10.5mm focal length
> rather than 8mm.

The very same Samyang lens is sold under different brands and *different
focal length*! The reason is, that it has a very unique projection and
focal length isn't really defined for that projection:
http://michel.thoby.free.fr/SAMYANG/Early%20test%20report.html

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

l_d_allan

unread,
Nov 17, 2012, 6:13:52 PM11/17/12
to pt...@googlegroups.com

On Saturday, November 10, 2012 12:32:46 PM UTC-7, John Houghton wrote:
I have to say, though, that the template should work best if the lens
parameters (and crop) are copied in from the template and the exif
data ignored anyway.
 
It does seem like, in general, the EXIF data should be ignored by ptgui, so you would want that check-box to be clear (not checked). Joost has mentioned that an upcoming upgrade will address this, so having "Auto Exif" will be "noticed" rather than ignored.
 
But perhaps that won't really improve my templates, as it seems like the "Auto Exif" should be clear?
 
I seem to be going backwards on getting templates to work with the "Batch Builder". I end up having to almost do everything over again after the Batch-Builder does its job. (clear CP's, redo cropping circle, etc) Mea culpa ... poor templates on my part no doubt.
 
I'd appreciate seeing attachments that had templates for fisheye lenses that worked well with Batch-Builder. Thanks. 

John Houghton

unread,
Nov 18, 2012, 2:26:57 PM11/18/12
to PTGui Support
On Nov 17, 11:13 pm, l_d_allan <ldasig...@gmail.com> wrote:
> I'd appreciate seeing attachments that had templates for fisheye lenses
> that worked well with Batch-Builder. Thanks.

Here's a template file + set of 5 images (Sigma 8mm APS-C: 4 around +
Z).

http://ge.tt/3skHkrR/v/0 (5MB)

The template file was created from a stitch of a different set of
images shot earlier the same day in a different building. The output
panorama from a batch run just now was fine.

John



l_d_allan

unread,
Nov 18, 2012, 10:25:10 PM11/18/12
to pt...@googlegroups.com
John,
 
Thanks for the template. Works well with the Batch-Builder. (Whew)
 
Note: I hadn't scrolled down to the bottom of the "Project Settings" and missed observing the last two groups of settings for "Batch Builder Behavior" and "Miscellaneous"
 
I did wonder about several things:
* In the "Lens Settings" tab, it showed a crop-factor of 1 for your 20d crop camera. Is that expected, or "doesn't matter"?
 
* In the "Optimizer" tab, the template had "Minimize lens distortion: No". Do you find that preferred over "Heavy + lens shift"? Is that because your template supplies appropriate values for "Lens corrections parameters", such as from a Lens database?

John Houghton

unread,
Nov 19, 2012, 3:50:27 AM11/19/12
to PTGui Support
On Nov 19, 3:25 am, l_d_allan <ldasig...@gmail.com> wrote:
> * In the "Lens Settings" tab, it showed a crop-factor of 1 for your 20d
> crop camera. Is that expected, or "doesn't matter"?

It is irrelevant. All that PTGui is interested in is the horizontal
field of view. The focal length and crop factor may be used by PTGui
to estimate the hfov initially, but note that the cropping circle also
directly affects the field of view. In this case, the effective hfov
value of 180.5 degrees is known from the template stitch and is what
will be used initially.

> * In the "Optimizer" tab, the template had "Minimize lens distortion: No".
> Do you find that preferred over "Heavy + lens shift"? Is that because your
> template supplies appropriate values for "Lens corrections parameters",
> such as from a Lens database?

If you switch into advanced mode via the button on the Optimizer tab,
you have access to each individual parameter that can be optimized.
The lens parameters a,b,c characterize the distortion of the lens -
i.e. how the behaviour of the lens departs from the ideal model of a
fisheye lens. The distortion is always the same (for the same
physical lens settings of zoom and focus), so once the a,b,c values
have been accurately established in a previous stitch, there is no
need to ask the optimizer to determine their values over and over
again. Hand the known values over to the optimizer in the template
and uncheck their optimize parameter boxes so that they will not be
changed.

What of the remaining lens parameters: hfov and the horizontal &
vertical shift parameters d,e? Although the hfov is theoretically a
fixed known value, it can and should be optimized for a 360 panorama
as a fine tuning exercise to make the fit of the images around the
stitching sphere as good as possible. This will take into account
minor imperfections in the control point placements. The shift
parameters can vary from shoot to shoot owing to tolerances in the
mount of the lens onto the camera body, so they too should be
optimized. (DSLR images do not suffer from shear distortion, so there
is no need to optimize those parameters).

Many people like to optimize all the parameters regardless. By doing
so, good results are usually obtained, with minor alignment issues due
to parallax and subject movement effectively "corrected" or hidden.
But the success of this will be highly dependent on the control point
generation. With few points poorly distributed, lens parameters are
free to take up bizarre values that result in nasty visual
distortions, albeit with the optimizer reporting an apparently "good"
result. The alignment is only good in the sense that the images align
well in the (possibly few) places where there are control points.
Elsewhere, there may well be obvious stitching errors. This cannot
happen when the lens parameters are fixed, and the number and
distribution of control points is far less critical. It's up to you
to decide which approach is best for you.

John

l_d_allan

unread,
Nov 19, 2012, 7:50:45 AM11/19/12
to pt...@googlegroups.com
Thanks for the explanation. I've been using ptgui for some time now, but I am fuzzy on the meanings of the a,b,c, etc. values. I never used PanoTools back in "the bad old days" before ptgui. My impression is that during that era (command line?), you needed to have a fuller idea of what was going on "under the covers". Kind of like using a fully manual SLR back in the 70's?
 
If I understand your reply, it seems like your template supplies the a,b,c values and perhaps even the CP's. Does your template bypass the  "2: Align images" step (if in fact the template supplies the CP's)?
 
IIRC, you mentioned that the CP's shouldn't be removed from a template, which seems to suggest the CP's from the template would be "re-used". Or not?
 
If so, would a template for a 360 degree hfov pano work for a smaller pano, like a 270 degree hfov? What if the overlap weren't the same?

PTGui Support

unread,
Nov 19, 2012, 12:34:46 PM11/19/12
to pt...@googlegroups.com
Hi Lynn,

A template does not copy the control points, since the control points
are specific to the images: the corner of a building in one panorama
will almost certainly not be at the same location in another panorama.
So it makes no sense to copy the control points.

Please see 2.13 and 2.14:
http://www.ptgui.com/support.html#2_13

Even with correct a,b,c parameters, generating control points would
still be needed if the image positions (yaw, pitch, roll) are not
exactly reproduced. And this is usually the case.

Even if there are such variations, using a template can be useful to set
the correct crop area and lens settings. Even a template for a different
number of source images would do this fine. Just don't expect the
template to replace the process of generating control points.

Joost

John Houghton

unread,
Nov 19, 2012, 1:09:21 PM11/19/12
to PTGui Support
On Nov 19, 12:50 pm, l_d_allan <ldasig...@gmail.com> wrote:

> If I understand your reply, it seems like your template supplies the a,b,c
> values and perhaps even the CP's. Does your template bypass the  "2: Align
> images" step (if in fact the template supplies the CP's)?

If you look at the Project Settings tab of the template project file,
you will see that the Batch Stitcher actions specified are "Do Align
Images" and "Create the panorama". The Align Images behaviour options
selected are simply "Generate Control Points" and "Optimize project".
The Optimizer tab shows what is and isn't optimized. The lens
parameters a,b,c are not selected for optimization so they will not be
changed.

John

l_d_allan

unread,
Nov 19, 2012, 5:41:51 PM11/19/12
to pt...@googlegroups.com
I did notice that the Project Settings  had "Do Align Images" and Create Pano". I think what made me wonder was that the template retained the CP's, and I think I recall you mentioning not to delete them. 

John Houghton

unread,
Nov 19, 2012, 6:27:06 PM11/19/12
to PTGui Support
As Joost points out, the control points are never copied over when the
template is applied, so they are not needed and can be deleted. OTOH,
it doesn't do any harm to leave them in the template, as you may want
to improve/amend the template sometime in the future, assigning
additional points and or images + further optimization.

John

l_d_allan

unread,
Nov 19, 2012, 9:40:54 PM11/19/12
to pt...@googlegroups.com

On Monday, November 19, 2012 1:50:32 AM UTC-7, John Houghton wrote:

The lens parameters a,b,c characterize the distortion of the lens -
i.e. how the behaviour of the lens departs from the ideal model of a

fisheye (?? or rectilinear??) lens.  The distortion is always the same (for the same

physical lens settings of zoom and focus), so once the a,b,c values
have been accurately established in a previous stitch, there is no
need to ask the optimizer to determine their values over and over
again.  Hand the known values over to the optimizer in the template
and uncheck their optimize parameter boxes so that they will not be
changed.

Very helpful and informative. Thanks for your patient explanation.
 
Can I infer that you would have a template for each prime lens, or at least the wider ones you use for panos? And perhaps a template for the extremes of some of your zooms?  For example, a template for 17mm and perhaps 40mm of a 17-40mm wide angle zoom?
 

John Houghton

unread,
Nov 20, 2012, 2:10:27 AM11/20/12
to PTGui Support
On Nov 20, 2:40 am, l_d_allan <ldasig...@gmail.com> wrote:
> Can I infer that you would have a template for each prime lens, or at least
> the wider ones you use for panos? And perhaps a template for the extremes
> of some of your zooms?  For example, a template for 17mm and perhaps 40mm
> of a 17-40mm wide angle zoom?

Yes and no. I'm not a pro shooting large numbers of panoramas and
seldom have any need of the batch facilities. However, I routinely
use existing project files as templates to assist my normal manual
workflow, but I don't have a collection of formally designated
"templates", lodged as such in the PTGui templates folder.

John

Roger D Williams

unread,
Nov 20, 2012, 3:53:17 AM11/20/12
to pt...@googlegroups.com
I hesitate to add anything, but would just like to mention the ability to store lens parameters. Am I right to assume that the values of a, b and c are stored along with the name of the lens? I found optimization and accuracy were improved in subsequent stitches when I added my (then) favorite Sigma 8mm fisheye to the lens database.

Roger W

Sent from my iPad

PTGui Support

unread,
Nov 20, 2012, 3:59:59 AM11/20/12
to pt...@googlegroups.com
Hi Roger,

No that would be a concidence. The lens database is there just for your
own use when you need it.

Also, it's a legacy feature: these days you can create templates in
PTGui which apply only the lens and/or crop settings, see Template
Behaviour in the Project Settings of PTGui Pro. This is more flexible
than the lens database.

Joost

Roger D Williams

unread,
Nov 20, 2012, 4:05:51 AM11/20/12
to pt...@googlegroups.com
Aha! Thanks for the rapid feedback, Joost. I will have to get into templates... For some reason I never have until now.

Roger W

Sent from my iPad

Erik Krause

unread,
Nov 20, 2012, 11:40:27 AM11/20/12
to pt...@googlegroups.com
Am 20.11.2012 09:59, schrieb PTGui Support:

> Also, it's a legacy feature: these days you can create templates in
> PTGui which apply only the lens and/or crop settings, see Template
> Behaviour in the Project Settings of PTGui Pro. This is more flexible
> than the lens database.

Please don't drop it, it's still useful in special cases. The
possibility to apply lens correction values on Image Parameters tab (if
using individual lens parameters) can't be mimicked with templates.
Reply all
Reply to author
Forward
0 new messages