[Rearranged for clarity]
Original post:
On Monday, 25 March 2024 at 8:55:19 -0700, Venkat wrote:
>
> We are trying to use the hugin assistant in code to stitch a panoramic
> image. We were wondering is there command line parameter to force the order
> of images. Currently the assistant figures out by trying different
> combination in some cases its taking around a minute or two for a set of 11
> or 12 images. Since we know the order to be stitched wonder is there a way
> to force the assistant to use the designated order as opposed to trying all
> the permutations. Any pointers would be really appreciated.
Current messages:
On Monday, 25 March 2024 at 23:48:02 -0700, Venkatramani Sankarlingam wrote:
> On Mon, Mar 25, 2024 at 4:09 PM Greg 'groggy' Lehey <
groo...@gmail.com>
> wrote:
>
>> On Monday, 25 March 2024 at 11:19:52 -0700, Venkat wrote:
>>>
>>> Cool thanks for the note. I will see if we could tweak the
>>> assistant to handle cpfind --prealigned. If you have the
>>> information handy, it would be helpful as well.
>>
>> Again, I may be misunderstanding, but I'm not sure that --prealigned
>> would help here. From the --help (for some reason this isn't
>> mentioned in the man page):
>>
>> --prealigned Match only overlapping images,
>> requires a rough aligned panorama
>>
>> I haven't used it, but it seems that this is a second step, and I
>> think you're looking for the first.
>
> Thanks for the additional clarification. We are doing the following steps
> 1. pto_gen -o output.pto *.jpg --sort
OK, this is clearly not what you want. You're selecting your files
sorted by name (*.jpg), when in fact you want to specify your own
order.
> 2. hugin_executor --assistant output.pto
> 3. hugin_executor --stitching --prefix=prefix output.pto
>
> And the images are numerically numbered starting from 0. And #2 and #3 can
> be potentially combined into one step. The above approach ends up trying
> all permutations.We also tried to provide the individual images during #1
> and ended up with the same result.
You don't say how you "provide the individual images". If you specify
the names in the order you want, you're half way there. But you're
using the undocumented --sort option, which imposes the same sort
order. What happens if you do something like this?
pto_gen -o output.pto 4.jpg 6.jpg 8.jpg 1.jpg 2.jpg 3.jpg 7.jpg 9.jpg 5.jpg 10.jpg 11.jpg
That's an example of out-of-order processing; substitute your own.
And note the lack of the --sort option.
I'd be interested, though, in why your processing takes so long. Is
this a very slow machine, or are the images very large?
On Tuesday, 26 March 2024 at 9:30:13 -0700, Thomas Modes wrote:
>
> When the assistant checks all image pairs there is a wrong setting
> in the preferences. Goto the menu File>Preferences, on tab control
> points detectors select reset to default.
Wouldn't it be a good idea to check what the current setting is first?
But I can't find how to do that in the GUI, and I can't find a "reset
to default" button, just "Load Defaults". This is Hugin
2023.0.0.d88dc56ded0e. But the information is all in the ~/.hugin
file. Here an example entry that probably matches what Thomas is
saying:
Description=Hugin's CPFind
Program=cpfind
Arguments=--multirow -o %o %s
ProgramMatcher=
ArgumentsMatcher=
Option=1
POLA warning: this has changed at some point relatively recently. In
my ~/.hugin I have:
Description=Hugin's CPFind
Program=cpfind
Arguments=-o %o %s
ProgramMatcher=
ArgumentsMatcher=
Option=1
[AutoPano/AutoPano_1]
Type=1
Description=Cpfind (multirow/stacked)
Program=cpfind
Arguments=-o %o --multirow %s
ProgramMatcher=
ArgumentsMatcher=
ProgramStack=align_image_stack
ArgumentsStack=-f %v -v -p %o %i
That corresponds to two entries on the GUI preferences screen, Hugin's
CPFind and Cpfind (multirow/stacked). So the old Hugin's CPFind no
longer exists, and has been replaced by the contents of Cpfind
(multirow/stacked). Others might also be interested in this change.
It's not clear, though, that this is what you want. --multirow only
makes sense when you have, well, multiple rows. If your images are
all in the same plane, --linearmatch is probably what you're looking
for. I don't know how to set it from the GUI, but you can edit the
.cpfind file. Be sure to keep a backup in case something goes wrong.
> Then check the default control point setting, it should be cpfind
> and it should contain the --multirow switch in the settings.
Thomas: OK, where do I check this? How do I change it?