In the meantime I've had a little think about Thomas Modes's
discomfort about the lens's field of view.  I think it may help us to
the simplest explanation of Paul Womack ("bugbear")'s problem.

I took Paul's pto file and reoptimised the lens parameters.  Instead
of the indicated hfov of 16.5 I got a value of 37.2 (with a, b and c
included in the optimisation - optimising just the hfov gave no
change).  As far as I could see from the fast preview window with the
control points shown it was a good stitch.

Of course, that was for a landscape-mode output.  When I turned to my
portrait-mode
modification and repeated the process the hfov of 16.5 was virtually
unchanged at 16.3.  Paul told us initially (19 June) that he had
originally confused the orientation of the control points.  Might he
have used a value for the hfov appropriate to a portrait-aspect lens
when working with landscape aspect images?

Roger Broadie

On 24 June 2017 at 11:33, Roger Broadie <[email protected]> wrote:
> Sorry, Paul, you are absolutely right and your pto file shows you had
> indeed chosen a rectilinear output projection.  So  the barrel
> distortion visible in your output remains to be sorted out.
>
> To view your pto file in Hugin's graphical interface I had to create a
> series of blank dummy images.  They don't contain any content, but the
> pto file does include control points that can be seen in the fast
> preview preview window, as shown in screenshot 1, attached.  I found
> it quite illuminating.  At first I thought the little fan of h lines
> visible at the top left must be a mistake, but then I realised it was
> actually consistent with the bowed shape of the lines you had added to
> emphasize the edges of the map. In fact, I don't think your h and v
> lines force all the edges to be straight, because they often don't
> exclude the possibility of bowing of the edges between the specified
> points.  If your choices have worked in the past I suspect that is
> more because the presence of neighbouring normal control points has
> kept the edges straight.
>
> I did try swapping the line types of the horizontal and vertical lines
> and found that reoptimising them turned the stitched image through 90
> degrees, to make the orientation portrait rather than landscape.  At
> the same time I did a little trimming of control points, because the
> preview showed rather a lot of red crosses, and added some more
> parameters to optimise, which, you will not be surprised to learn,
> included making X, Y and Z generally optimisable.  I've attached the
> revised pto file and resultant preview (screenshot 2).  Probably there
> are now too few control points and extra need to be added, but one
> needs the originals for that.
>
> What is interesting is that the h lines (now v lines) on the left edge
> now form a single straight line.  I should be disappointed if the
> corresponding edge is not now sorted out, though the other the others,
> especially that on the right, may need more work.  I suspect it would
> be worthwhile, if more laborious, to add conventional h and v lines
> each defined within a single edge image (i.e. with the same image in
> both frames of the control point window - 0,0, 1,1 etc).
>
> It rather looks to me as though the problem here are not due to some
> strange property of Hugin, but rather, less dramatically, difficulties
> in defining control points and managing the stitching process.
>
> Roger Broadie
>
> On 22 June 2017 at 17:26, bugbear <[email protected]> wrote:
>> Roger Broadie wrote:
>>>
>>> Hello Paul,
>>>
>>> I was a little surprised at the idea that Hugin could output a
>>> panorama defined to be rectilinear but which would show with the
>>> barrel distortion apparent in your stitch.
>>
>>
>> I attached my pto file as evidence in my defence :-)
>>
>>> So I tried converting your
>>> output from all the list of allowable output formats to rectilinear.
>>> Assuming the starting point was a fisheye seems to work well, at least
>>> as far as the side (long) edges are concerned..  There was still
>>> curvature in the top (short) edges, which I cured with a panini
>>> general projection, adjusting the top and bottom sliders.  Whether the
>>> horizontal/vertical aspect ratio is correct, I cannot say, but the
>>> writing in the tables looks unstretched in either dimension as far as
>>> one can see at the available resolution.  The pto file and output are
>>> attached.  I chose an hfov of 59 degrees, but there may be a better
>>> angle.
>>>
>>> So my question would be, whatever you may have thought, did you
>>> actually choose a rectilinear output projection?
>>
>>
>> My current pto is attached.
>>
>>>
>>> I don't find the rotation behaviour you mention surprising.  Surely,
>>> optimising will allow the horizontal and vertical lines you have
>>> defined to reassert themselves and undo your hand rotation.  The moral
>>> would appear to be, either to swap all the horizontal and vertical
>>> line-types, or, it that's too boring, to do all your optimisation
>>> first and then rotate by hand, which is probably what you did.
>>
>>
>> No - since I wanted hugin to optmise "properly" I allowed it to move
>> the "anchor" image in YPR; in conjunction with H and V CP pairs,
>> this has always (up until now) worked well to regularise
>> images of 2D rectangular objects, compensating for the camera
>> either being off-centre, or pointing off centre.
>>
>> I have successfully captured maps before using this approach
>> and am currently rather baffled as to my current failure.
>>
>>   BugBear
>>
>> --
>> A list of frequently asked questions is available at:
>> http://wiki.panotools.org/Hugin_FAQ
>> --- You received this message because you are subscribed to the Google
>> Groups "hugin and other free panoramic software" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/hugin-ptx/594BEFAF.6040907%40papermule.co.uk.
>>
>> For more options, visit https://groups.google.com/d/optout.

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/CAHQACeosbCXt1%2B6rwGbk%3Dp4MvHXj3oiQYKHcjOqht9dD9JqOiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to