Create control points button in Photos tab

46 views
Skip to first unread message

johnfi...@gmail.com

unread,
Mar 7, 2022, 7:59:53 AM3/7/22
to hugin and other free panoramic software
As a user, I'm bothered by a few behaviors of the Create control points button in the Photos tab.  Before fixing those in my own copy and/or in the fork of hugin that I am working on, I'd like to get some opinions on:

Why it does what it currently does.
Why that might be the way other users prefer it to work.
Have I misunderstood what it currently is doing.

All this relates to the (maybe nonstandard) work flow of adding more images after you have already put effort into fixing CPs connecting existing images.

1) If you have only one image selected and the Settings is Vertical lines, then you get the expected behavior (lines within just that image).  But if the Settings is not Vertical lines, you get the surprising behavior that your selection of one image is ignored and you get more CPs connecting everything to everything.

It would be great to have a way to make it try to connect one new image to every old image, without trying to further connect any old images to each other.  That is the behavior one would expect for this point in the UI.  If there is some other good way to accomplish that, please correct my misunderstanding.  But I still think that is what would be expected here.

The lower level code called from that point in the UI is structured to make the behavior I want harder to invoke than you might expect.  But not so hard that this should be the reason not to do it.

2) I've tested behavior, not code, so maybe I misunderstood, but the setting limiting CPs connecting two images seem to apply per run of the code to add CPs, so multiple runs pile up more and more CPs.  That is counter intuitive.  I think more should not be added (by the automatic CP finder) when there are already the desired number.

3) It is happy to add exact duplicate CPs.  I think it should not do that.

Bruno Postle

unread,
Mar 7, 2022, 3:34:52 PM3/7/22
to hugin and other free panoramic software
On Mon, 7 Mar 2022, 12:59 johnfine wrote:

1) If you have only one image selected and the Settings is Vertical lines, then you get the expected behavior (lines within just that image).  But if the Settings is not Vertical lines, you get the surprising behavior that your selection of one image is ignored and you get more CPs connecting everything to everything.

I can't check right now, and I've only ever used this button to create control points for all images, but I seem to remember that you can select more than one photo and it will generate points just for that set.

Also it is worth checking to see if the equivalent button in the fast preview does something more like what you are expecting.

-- 
Bruno

John Fine

unread,
Mar 7, 2022, 3:49:57 PM3/7/22
to hugi...@googlegroups.com
On Mon, Mar 7, 2022 at 3:34 PM Bruno Postle <br...@postle.net> wrote:

I can't check right now, and I've only ever used this button to create control points for all images, but I seem to remember that you can select more than one photo and it will generate points just for that set.

Correct.  I was asking about what it does when just one photo is selected.  Selecting zero does what you would expect and selecting 2 or more does what you would expect.

I know I could select the new one and the first old one and generate for those two, then select the new one and the second old one and generate ...

Also it is worth checking to see if the equivalent button in the fast preview does something more like what you are expecting.

Thanks, I'll check that in the code, but if that did what I want (for the other tab), that would be a very strange UI.

Unless someone explains why it is the way it is, I still think it should be changed to be less surprising and more convenient, and I will do so in hugin++


Jeff Welty

unread,
Mar 7, 2022, 5:16:34 PM3/7/22
to hugin and other free panoramic software
I just looked at the code, and it confirms the behaviour you describe.  I too find it unexpected.   If what I'm seeing in the code (ImagesPanel.cpp, ImagesPanel::CPGenerate() function ) is correct, it seems a somewhat trivial fix.  

Here's what I'd like:
---
No images selected and there are no existing control points of the current type (normal, vertical lines), process all images for new control points.
No images selected and there are one or more control points of the current type -- pop a dialogue, ask the user if they want to replace all control points in all images (yes/no).  If yes, delete all existing control points of the current type (normal, vertical line)  and process all images.
One or more images selected -- process only the selected images for additional control points.

In every case, duplicate control points should be eliminated after processing.   Somewhat less trivial fix, probably worthy of a separate function.

I haven't ever used the "vertical lines" control point feature, so I don't know how that *really* should be handled.

David W. Jones

unread,
Mar 7, 2022, 11:15:19 PM3/7/22
to hugi...@googlegroups.com
Hmm, I have a modification:

No image selected, control points exist - replace all *except manually created ones*. I've had panos where cpfind/Hugin insisted on not finding control points between some images until I manually created a couple. Then it found more.

Or, don't create duplicates of existing control points. That way existing control points remain unchanged while new, possibly useful ones get created. Need some way to define "duplicate".

Not sure how to implement the functionality of either.

--
David W. Jones
gnome...@gmail.com
exploring the landscape of god
http://dancingtreefrog.com

Sent from my Android device with F/LOSS K-9 Mail.

Michael Perry

unread,
Apr 26, 2022, 10:38:21 AM4/26/22
to hugin and other free panoramic software

"I seem to remember that you can select more than one photo and it will generate points just for that set"

Yes, this is also a useful way of adding a bias to an optimisation I think - by adding in extra links for the less well correlated images, countering the success of the better matches. 

Also, sometimes, Hugin fails to find control points in large arrays. Selecting subsets of images in the photos tab is a good way to force find these control points.
Reply all
Reply to author
Forward
0 new messages