>
> I found this page, which describes using control points as you
> suggest.
>
> http://hugin.sourceforge.net/tutorials/perspective/en.shtml
>
> Unfortunatly I could not get it to work in PTGui.
See here: http://wiki.panotools.org/Perspective_correction
> It just casued the
> painting extend outwards like a magic carpet!
This is quite normal. You must extend the Output field of view in order
to get the corrected version. Once you see it completely in the pano
editor you can use the yellow lines to crop to the final size.
> Perhaps this sort of
> correction cannot be made at the same time as Viewpoint correction?
Depends ;-) Viewpoint correction does more or less the same but works on
input images whereas perspective correction works on output images.
Hence if you have only one input image do either one or the other but
not both. If you want to correct a whole panorama, stitch it first
uncorrected for best fit (using viewpoint correction on some images
would be no issue). Once it is ready you can do a perspective correction
using control points like described in the wiki article.
--
Erik Krause
http://www.erik-krause.de
> > Once it is ready you can do a perspective correction
> > using control points like described in the wiki article.
>
> Do you mean add vertical and horizontal control points and click on
> optimiser a second time (this is what does not seem to work for me),
This should produce the identical result like the workflow you describe
below. However, I don't know how viewpoint optimization exactly works
and whether it depends on output parameters (it should not in my
opinion). Hence it might be a good idea to disable viewpoint
optimization for the perspective correction step. This doesn't delete
the actual viewpoint correction values as you can see on Image
Parameters tab.
> or do you mean first render the panorama as a .tif, then proceed to
> correct the perspective?
This would be another way and should work as well. But it takes
additional time, disk space and another interpolation step, hence I
would try to avoid it. PTGui should be able to do anything in a single step.
> I tried it out and it did seem to make a difference, but I still did
> not end up with a rectangle.
If you perspective correct a rectangular image it never stays
rectangular (in rectilinear output projection). If it is corrected
vertical or horizontal only it is distorted to a trapezium. If corrected
diagonally it gets an irregular four-sided shape.
The correction parameters for the tight spaces example on
http://wiki.panotools.org/Perspective_correction#Camera_tilted_and_rotated
are Yaw=-23.5 Pitch=58.8 and Roll=-13. You can enter them manually in
Image Parameters tab to get the corrected version. On Panorama Settings
tab set Field of View to at least 145°x160° to see the complete shape in
Panorama Editor.
it's a giant step for software
mick
>
> I use tn points in PTGui 8.4.1...
How do you know they are working?
One problem with the PTgui lines is that you get no feedback/errors, like with the
panotools lines. So you never know if it really worked?
--
Bjørn K Nilssen - http://bknilssen.no - panoramas and 3D
yes ok guys ! what are the t1,t2,t3 etc ?
mick
> > However, I don't know how viewpoint optimization exactly works
> > and whether it depends on output parameters (it should not in my
> > opinion).
>
> Maybe this is where I have been tripping up. I noticed in John
> Houghton's tutorial, on straightening a panorama, these dread words,
> "The PTGui optimizer does not support t1,t2,tn points, so you must
> select the Panorama Tools optimizer"
Well, that was true when the tutorial was written, but is not true for
the most recent versions. PTGui now supports t1 and t2 (vertical and
horizontal) line control points. It handles them a bit different than
the panotools optimizer but the result should be the same.
> When I do this a message warns me. "Your project uses viewpoint
> correction, but this is not supported by the Panorama Tools optimizer.
> Please choose 'Optimize using PTGui' instead."
>
> > Hence it might be a good idea to disable viewpoint
> > optimization for the perspective correction step. This doesn't delete
> > the actual viewpoint correction values as you can see on Image
> > Parameters tab.
>
> I tried to disable viewpont optimization by deselecting all the
> Viewpoint boxes, but got the same message. I also tried optimizing a
> second time with PTGui tools and the Viewpoint boxes delselected, then
> tried Pano tools again, but with the same result.
That is because PTGui keeps the viewpoint correction values. If you want
to use panotools optimizer you must zero all five VP columns on Image
Parameters tab (Click column header to select all fields, type 0 and
press enter.)
> > PTGui should be able to do anything in a single step.
>
> Perhaps not yet?
Could you provide a zip with small version of your images somewhere
alongside with the project file? It would be much easier to help...
best regards
> I use tn points in PTGui 8.4.1...
Well, no wonders. You are ahead of time. Must have been version 8.2 or
8.3 when Joost will have had implemented that. ;-)
However, current version 8.1 doesn't process them...
I'm not adverse to a bit of maths but sometimes this looks like gobbledegook
somebody ( I nominate Eric :-) ) should explain all this stuff for
dumb photographers.
mick
For n>2 look here:
http://wiki.panotools.org/Straight_line_control_points
For t1 and t2:
http://wiki.panotools.org/Horizontal_control_points
http://wiki.panotools.org/Vertical_control_points
> So before I lift a finger to look for the tutorial on how
> to use PTOptimiser :-) is there a tutorial on how to use
> PTOptimiser in PTGui???
If you have panotools installed (look in Tools->Options->Panorama tools)
you simply select "Optimize using: Panorama Tools optimizer" on the
Optimizer tab. That's all.
PTGui will complain if you used viewpoint correction on some of the
loaded images before or if you have viewpoint correction checked. In
this case uncheck viewpoint correction for all images and zero all VP
values on Image Parameters tab (or start over with a new project).
I saw the option on the Optimizer tab but I thought
there must be something else to do. It just looked
too simple.
I don't have PTGui Pro so I guess I just select PTOptimizer
and go. The reason I haven't used it before is because
I didn't know PTGui didn't service tn points.
I learned something today. These mailing lists aren't all bad :-)
Ken
> For n>2 look here:
> http://wiki.panotools.org/Straight_line_control_points
gosh I never noticed new line t3 before
regards
mick
> For the purposes of this discussion I do not believe it is worth
> spending time adding points manually, although I have done so with the
> original images. The edges of the painting then do end up completely
> straight, not barrel-distorted as they appear when only automatically
> generated control points are used.
>
> http://groups.google.com/group/ptgui/web/Gareth%20Hawker%20-%20Pastel%20test%2001.zip
I must admit that I failed on these images. It seems as if PTGui isn't
able to use t1 and t2 points correctly if viewpoint correction is active
for some images. Joost, could you look into that?
However, it works perfectly if I perspective correct only one image. It
is possible to align f.e. the first image (where there are both vertical
and horizontal parts of the frame). Then fix this image and align all
others to it even using viewpoint correction.
The downside is that errors due to barrel distortion add up and the
opposite side of the frame still isn't good. Hence it would have been
interesting if you enclosed the project file where you manually set
control points on the frame. Most likely you could get a perfect result
this way if your lens was calibrated (in order to remove barrel distortion).
I guess if you can't figure how to change your signature unsubscribing
must be daunting
:-)
mick
Ooh, harsh. But hang on, I left that default sig on my iPhone too...
Perhaps this might help Rouse: "To unsubscribe from this group, send
email to ptgui-un...@googlegroups.com"
k
> I should be happy to send the project file: please let me know if you
> would still like it. The only reason I did not include it was I
> believed the addresses used for each source image were specific to my
> computer and so would be no use to anyone else. Is that correct?
No. If PTGui doesn't find the path it asks for a different folder. If
you store the project file in the same location as the images, it
doesn't even contain a path.
> I did not go on with that project far enough to get a perfect result
> - I was only getting a rough idea of what worked. Normally I use
> many more source images for a painting of this size (30 x 20 ins) so
> as to achieve a high resolution output. Then it is easier to get
> straight lines. I suspect the reason for this is that each image
> contains sharper detail so the control point generator has an easier
> task.
If you do such kind of images again, simply use a tripod and if possible
a pan-tilt panoramic head. This way you won't need viewpoint correction
which would simplify the job for PTGui and allow for a good perspective
correction.
> Calibrating the lens sounds as if it might be an intensive task which
> I might get wrong.
Not at all. Simply shoot a panorama of a detailed subject (could be a
painting) from a tripod (best with pan-tilt head) using much overlap.
Let PTGui generate much control points, optimize for lens parameters and
save them to the lens database. Lens calibration is focal length
specific, hence if you use a zoom lens do it for some often used focal
lengths.
> The problem is
> twofold: it is diffuclt to keep the central part of the painting in
> focus as the same time as the outer edge of the painting.
Shoot with a larger focal length from greater distance. All the
gigapixel images of large paintings on http://www.haltadefinizione.com/
where shot with a Clauss Rodeon panoramic head and very long lenses
(400mm in at least one case). On http://tinyurl.com/9dldxg you find a
video how the masterpieces in the Museo de Prado where shot in high
resolution.
> Also it is easier to keep the lighting
> even over all the painting, and to avoid glare, if each source image
> is lit in exactly the same way (i.e. generally speaking, flash on
> camera).
Use a stronger flash and point it to a wall behind, the ceiling above
or a large white cardboard or alike. Indirect flash gives a far better
lighting than direct flash, which almost ever causes unwanted reflections.
> Another method is to keep the camera always perpendicular to the
> painting and always the same distance. This makes stitching easy, but
> it also brings problems, especially if I am photgraphing a painting
> under glass hanging on a wall.
On-camera direct flash will totally Ruin your result due to reflections
in the glass. Use indirect flash or external studio flash units from the
side.
> I may have to revert to one of these methods if I do not get on well
> with viewpoint correction, though results so far have been
> encouraging.
Yes, and perhaps with a calibrated lens and the second method I
suggested it would work very good. Using an overall reference image was
discussed in another thread.