Creating stereo pairs: problems getting started

58 views
Skip to first unread message

Michael Perryman

unread,
Apr 26, 2016, 8:17:53 AM4/26/16
to hugin and other free panoramic software
I am trying to use Hugin to "align" (optimise) stereo pairs. I have followed the stereo tutorial at:
which works fine in command line mode. But it does not give me full control of the tuning options.

So I have been trying to do the alignment from the GUI, without success. I attach two screenshots showing my attempt.

fig1.png shows my "photo" panel, with my "feature matching" and "optimise" options at the bottom. I have created a "Control Point Detection" mode which I have labelled "perryman-stereo" with the arguments shown in the insets.

fig2.png shows 21 control points that I have added manually to both the left and right images. Following the tutorial, all are added as "Horizontal Lines", except for one (#11) which I have designated as "normal" (to define the stereo screen plane). The "optimiser" result is shown in the inset. It shows very large distances, standard deviations, and maximum. I understand that I can iterate (add, delete, or tune) the control points, but this has little effect on the overall result.

I suspect that I have not set up the required parameters for the GUI in the correct way (e.g. the CPD) for these stereo alignments.

Can anyone point me in the right direction?

Thanks
Michael
fig1.png
fig2.png

Vladimir Nadvornik

unread,
Apr 26, 2016, 10:22:09 AM4/26/16
to hugi...@googlegroups.com
Hi Michael,

On 04/26/2016 02:15 PM, Michael Perryman wrote:
> I am trying to use Hugin to "align" (optimise) stereo pairs. I have
> followed the stereo tutorial at:
> http://vndlinuxphoto.blogspot.co.uk/2011/01/stereo-image-alignment-in-hugin.html
> which works fine in *command line mode*. But it does not give me full
> control of the tuning options.
>

The tutorial is a bit outdated. Since then I found that it is better to
optimize camera shift (-x option) instead of image center (-i option).


> So I have been trying to do the alignment from the GUI, without success. I
> attach two screenshots showing my attempt.
>
> fig1.png shows my "photo" panel, with my "feature matching" and "optimise"
> options at the bottom. I have created a "Control Point Detection" mode
> which I have labelled "perryman-stereo" with the arguments shown in the
> insets.
>
> fig2.png shows 21 control points that I have added manually to both the
> left and right images. Following the tutorial, all are added as "Horizontal
> Lines", except for one (#11) which I have designated as "normal" (to define
> the stereo screen plane). The "optimiser" result is shown in the inset. It
> shows very large distances, standard deviations, and maximum. I understand
> that I can iterate (add, delete, or tune) the control points, but this has
> little effect on the overall result.
>
> I suspect that I have not set up the required parameters for the GUI in the
> correct way (e.g. the CPD) for these stereo alignments.

Control Point Detection setting has no effect if you created the points
manually.

>
> Can anyone point me in the right direction?
>

From the screenshot it seems that you left the optimized parameters on
the default "Positions". You should set it to "Custom parameters", go to
the optimizer tab and enable optimization of yaw, pitch, roll and X on
the second image.


Vladimir

Michael Perryman

unread,
Apr 26, 2016, 10:57:35 AM4/26/16
to hugin and other free panoramic software
Thank you for assisting, Vladimir.

Control Point Detection setting has no effect if you created the points manually.

.... if the CPD setting has no effect when creating the points manually, where do I set the arguments (e.g. -S and -x)?


From the screenshot it seems that you left the optimized parameters on
the default "Positions". You should set it to "Custom parameters", go to
the optimizer tab and enable optimization of yaw, pitch, roll and X on
the second image.
 
... I have now tried this, and it has no effect at all on the large differences and errors.   

Are the curved lines in my images (fig2) what I would expect? 

Is it correct that I have set all points to "Horizontal" except for one set as "normal"?

I'm sorry, I am still missing something!

Michael

T. Modes

unread,
Apr 26, 2016, 11:00:13 AM4/26/16
to hugin and other free panoramic software


Am Dienstag, 26. April 2016 14:17:53 UTC+2 schrieb Michael Perryman:
fig1.png shows my "photo" panel, with my "feature matching" and "optimise" options at the bottom. I have created a "Control Point Detection" mode which I have labelled "perryman-stereo" with the arguments shown in the insets.

These settings are totally wrong. Use "-p %o -P %s" or "-p %o -S %s" as command line arguments. All other switches have in this case no effect and increasing only the processing time.
The other issues have already Vladimir addressed.

Vladimir Nadvornik

unread,
Apr 26, 2016, 11:46:25 AM4/26/16
to hugi...@googlegroups.com
On 04/26/2016 04:57 PM, Michael Perryman wrote:
> Thank you for assisting, Vladimir.
>
> Control Point Detection setting has no effect if you created the points
>> manually.
>>
>
> .... if the CPD setting has no effect when creating the points manually,
> where do I set the arguments (e.g. -S and -x)?
>

You can either run align_image_stack from commandline, with the
arguments above, let it save pto file ( -p argument ) and open it in
hugin gui,

or you can call align_image_stack as control point detector from hugin
gui. In this case hugin just takes the detected control points and
ignores everything else, so you have to set the optimized parameters
manually.

>
>> From the screenshot it seems that you left the optimized parameters on
>> the default "Positions". You should set it to "Custom parameters", go to
>> the optimizer tab and enable optimization of yaw, pitch, roll and X on
>> the second image.
>
>
> ... I have now tried this, and it has no effect at all on the large
> differences and errors.
>
> Are the curved lines in my images (fig2) what I would expect?

Actually no. There should be points or short horizontal lines.

One more thing: the output projection should be rectilinear. But this
change does not make that big difference in alignment, at least on my
images.

Maybe there are some incorrect values left. In the optimizer tab, all
parameters should be zero, except for HFOV and
yaw, pitch, roll and X of the second image.


>
> Is it correct that I have set all points to "Horizontal" except for one set
> as "normal"?

Yes, this is correct.

>
> I'm sorry, I am still missing something!
>

Vladimir


Michael Perryman

unread,
Apr 26, 2016, 1:53:38 PM4/26/16
to hugin and other free panoramic software
Vladimir and Thomas,

Thank you for taking the time to respond, and so promptly. I will investigate your suggestions. 

Michael

Donald Johnston

unread,
Apr 26, 2016, 5:27:00 PM4/26/16
to Hugin Pano
Here is a previous thread on the subject:

I am currently using the following options for align_image_stack:
-p out.pto -x -i -s 4 -P -C -a AIS_

But from what Vladimir says maybe the -x and -i are interfering with each other (in the previous chain of emails he didn’t use the -i so I don’t know why I have it there).  I’ll try without it there next time.


--
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 hugin-ptx+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/086240a8-5e45-4122-a177-43dc3bba3a7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages