Hi LF,

the reason for samples it that I would be able to understand better what
your intention is and maybe could be able to suggest alternatives. I'm not
a developer, maybe someone could explain better how hugin deals with
translation optimization, but I were never, really never able to use it
with good results. From what you say I imagine that using the GUI it is
working. I have already tested translation in PTGui and it worked as I
expected: I was able to join a displaced nadir picture in a full sphere
panorama.

Well, a possible workaround to this image set you sent is using different
lenses for different images instead of translation. This will work only if
the translation is like this: getting closer or away from subject. This way
you can avoid translation and optimize only other parameters.
Here are the optimization steps I've already used to stitch full sphere
panoramas. They ran after all the process of finding CPs on image pairs,
vertical lines and so on.

pto_var --opt y,p,r -o final.pto final.pto
autooptimiser -n -o final.pto final.pto

pto_var --opt y,p,r,v -o final.pto final.pto
autooptimiser -n -o final.pto final.pto

pto_var --opt y,p,r,v,b -o final.pto final.pto
autooptimiser -n -o final.pto final.pto

pto_var --opt y,p,r,v,a,b,c,d,e,g,t -o final.pto final.pto
autooptimiser -n -o final.pto final.pto

Bests,

Carlos E G Carvalho (Cartola)
http://cartola.org/360
http://www.panoforum.com.br/


Em qui., 28 de mai. de 2020 às 21:42, LF Martins <[email protected]>
escreveu:

> Hello, it is me again.
>
> After my previous post
> <https://groups.google.com/d/topic/hugin-ptx/t7JxXLf2erc/discussion> was
> hijacked, I made more tests and definitely optimizing using the GUI isn't
> the same as using *autooptmizer -n* in a script.
>
> To test this, I have added three images to Hugin via GUI, used it to find
> the control points, cleaned them, then configure it to Optimize Geometric
> Custom Parameters. After that I opened Optimizer tab and selected only y,
> p, r, TrX, TrY and TrZ for each image, then selected only two images: the
> first one (anchor) and second one, then saved the project as
> *test_hugin.pto*. I then run Optimize in GUI and using *autooptimizer*
> and the results are:
>
> GUI
> #-hugin  cropFactor=1
> i w640 h480 f0 v50 Ra0 Rb0 Rc0 Rd0 Re0 Eev0 Er1 Eb1 r0 p0 y0 TrX0 TrY0
> TrZ0 Tpy0 Tpp0 j0 a0 b0 c0 d0 e0 g0 t0 Va1 Vb0 Vc0 Vd0 Vx0 Vy0  Vm5 n
> "01_image.png"
> #-hugin  cropFactor=1
> i w640 h480 f0 v=0 Ra=0 Rb=0 Rc=0 Rd=0 Re=0 Eev0 Er1 Eb1 r0.57358464596854
> p-9.21762588878221 y-1.94167450388466 TrX0.00797698982600632 TrY-
> 0.222427372643953 TrZ0.718060094751586 Tpy0 Tpp0 j0 a=0 b=0 c=0 d=0 e=0 g=
> 0 t=0 Va=0 Vb=0 Vc=0 Vd=0 Vx=0 Vy=0  Vm5 n"02_image.png"
> #-hugin  cropFactor=1 disabled
> i w640 h480 f0 v=0 Ra=0 Rb=0 Rc=0 Rd=0 Re=0 Eev0 Er1 Eb1 r0 p0 y0 TrX0
> TrY0 TrZ0 Tpy0 Tpp0 j0 a=0 b=0 c=0 d=0 e=0 g=0 t=0 Va=0 Vb=0 Vc=0 Vd=0 Vx=
> 0 Vy=0  Vm5 n"03_image.png"
>
>
> autooptimizer
> #-hugin  cropFactor=1
> i w640 h480 f0 v50 Ra0 Rb0 Rc0 Rd0 Re0 Eev0 Er1 Eb1 r0 p0 y0 TrX0 TrY0
> TrZ0 Tpy0 Tpp0 j0 a0 b0 c0 d0 e0 g0 t0 Va1 Vb0 Vc0 Vd0 Vx0 Vy0  Vm5 n
> "01_image.png"
> #-hugin  cropFactor=1
> i w640 h480 f0 v=0 Ra=0 Rb=0 Rc=0 Rd=0 Re=0 Eev0 Er1 Eb1 r0.
> 112022825895375 p-11.0039359572305 y2.21797983590819 TrX-0.116826162066902
> TrY-0.277050212214271 TrZ0.72073808058671 Tpy0 Tpp0 j0 a=0 b=0 c=0 d=0 e=0
> g=0 t=0 Va=0 Vb=0 Vc=0 Vd=0 Vx=0 Vy=0  Vm5 n"02_image.png"
> #-hugin  cropFactor=1 disabled
> i w640 h480 f0 v=0 Ra=0 Rb=0 Rc=0 Rd=0 Re=0 Eev0 Er1 Eb1 r0.
> 0225130795756708 p0.213684689971728 y0.023375441332762 TrX-
> 0.000608701446789677 TrY0.00351750071573924 TrZ-0.000714185704715796 Tpy0
> Tpp0 j0 a=0 b=0 c=0 d=0 e=0 g=0 t=0 Va=0 Vb=0 Vc=0 Vd=0 Vx=0 Vy=0  Vm5 n
> "03_image.png"
>
>
>
> As it clear, the values for the second image is very different:
>
> GUI
> r0.57358464596854 p-9.21762588878221 y-1.94167450388466 TrX0.
> 00797698982600632 TrY-0.222427372643953 TrZ0.718060094751586
>
> autooptimizer
> r0.112022825895375 p-11.0039359572305 y2.21797983590819 TrX-
> 0.116826162066902 TrY-0.277050212214271 TrZ0.72073808058671
>
> and it happens even if in the project sets the optimization as only:
> # specify variables that should be optimized
> v r1
> v p1
> v y1
> v TrX1
> v TrY1
> v TrZ1
>
>
>
> It is also clear the *autooptimizer* does not respect the "disabled" tag
> for the third image. This means the GUI uses something else to do the
> optimization?
>
> Is it a known bug? If yes, is it planned to be fixed?
>
> Also, is there are way that I can use the same optimization done in GUI
> for a script? How?
>
> Side question: how do add and remove the "disable" tag in a batch script?
>
> I have added all flies (images and project files) to a shared folder in
> Google Drive
> <https://drive.google.com/drive/folders/1wjMvztZ0DyaNvwarbRbnKY8TLIHuq9rH?usp=sharing>,
> if anyone wants to check them.
>
> I do appreciate any help here. I need to do this to thousands of images,
> and Hugin is the only option I have found. And I know it works, but it is
> not working using the command line tools in a script. I simply need to
> align some images and then crop them to the same size. Using the GUI, it
> works perfectly, but I tried many combinations using a script and it didn't
> work. And I am sure there is a problem with the *autooptimizer* tool, If
> someone knows how to fix it, please let me know. Maybe this would work with
> the Perl tools instead of the simple command line tools?
>
> By the way, I am using Pop!_OS 20.04 (same as Ubuntu 20.04) and the Hugin
> version is: 2019.2.0.b690aa0334b5.
>
> Best regrads,
> LFOM
>
> --
> 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/033fc457-888f-44a8-a763-ed6933f244dd%40googlegroups.com
> <https://groups.google.com/d/msgid/hugin-ptx/033fc457-888f-44a8-a763-ed6933f244dd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CALW1f7gtauPyJQSaCYm%3DEYbb%3DCdPorCfNSS21yzGnx%3DQ77mmNg%40mail.gmail.com.

Reply via email to