FR: a few improvements to masks

67 views
Skip to first unread message

clepsydrae

unread,
Sep 17, 2017, 12:12:10 AM9/17/17
to hugin and other free panoramic software
[Where is the best/least annoying place to post feature requests for Hugin?]

I use hugin to align stacks of images before I run a gmic image averaging (median function) on them. It works great, but my images sometimes have many moving components in the foreground (tree branches and so forth, blowing in the wind) and I want to align the images based on just a few small parts of the image backgrounds, so I need to constrain where control points are generated.

I can use masks to get this done, but there are a few GUI issues that make it pretty slow, so I wanted to suggest a few (hopefully simple?) changes:

1) a new mask type specifically for CP constraining. I can use "Exclude region" and "exclude region from all images of this lens" to prevent CPs from being generated, and it works great, but I can't do the opposite. Ideally this new mask would be something like "constrain CPs to this region"; multiple such regions would allow CPs in all of them, and everything outside of them would not get CPs. (If "permit" and "exclude" overlap, one could be chosen to override.)

Without this feature, the result is that I often have to make several overlapping masks to effectively block out everything except a few small areas. The ability to just circle a few features that I know are stable and tell hugin to look for CPs in those regions would be fantastic.

2) a command to remove all masks from all images. Recently I was aligning 20 images, and had to generate 7 masks for each, which was 140 masks, each requiring 2 clicks to remove. (I have to remove all masks before outputting the remapped/aligned images.)

3) the ability to select/copy/paste/delete multiple masks at once on a given image. This would make the creation of the 140 masks a lot easier to manage.

Thanks for considering! And let me know if some of this already exists and I'm just unaware.

-c

T. Modes

unread,
Sep 17, 2017, 3:52:48 AM9/17/17
to hugin and other free panoramic software


Am Sonntag, 17. September 2017 06:12:10 UTC+2 schrieb clepsydrae:
Without this feature, the result is that I often have to make several overlapping masks to effectively block out everything except a few small areas. The ability to just circle a few features that I know are stable and tell hugin to look for CPs in those regions would be fantastic.
There is the edit cp tools in the fast preview window for creating cp in selected areas. (which works without masks)

clepsydrae

unread,
Sep 19, 2017, 8:35:36 PM9/19/17
to hugin and other free panoramic software
Thank you for the reply, T. Modes -- that's a great feature to know about.

I'm not experienced in it's use, so I apologize if I'm missing something, but "Edit CP" seems to have a few problems for my use-case:

- (this is the biggest issue:) I can select a rectangle, but it applies in the same position to all the images; the value of masks is that if a tree branch blows into a chosen area, I can mask it out on an image. For a complex set of images, with branches blowing around and so forth, I need to mask each image a little differently, and this is where having a real "only consider making points here" mask would be much easier to work with compared to the exclusion masks (or the Edit CP approach)
- similarly, when the images move a lot relative to each other the rectangle isn't always overlapping the same region in each image
- I can only draw rectangles, which makes it a little difficult to work with strangely shaped areas (which is easy to do with masks)
- the fast preview window is pretty low-resolution (compared to the mask editing window) so it's hard to draw an accurate rectangle (it's hard to see references like thin tree branches that disappear in the low-res preview version of the image.)

To be more clear, the use-case is this: a picture of waterfall behind many trees. There is a steady, relatively unmoving part of the image: that of the rocks on either side of the waterfall. But there is the moving water, and the many trees that are blowing around. I go through all the images and mask everything out except the steady rocks. This works great, it just takes a really long time to do for 20 images, with lots of tree branches in various positions, etc. I have to make 6-8 masks per image and adjust many of them to fit each individual image. Then I have to individually remove every single mask when done making the CPs.

Here's an example image: http://caseyconnor.org/pub/image/scall-take2.jpg

You can see how most of that image consists of moving, dynamic stuff that has to be masked out differently in each frame, while there is still a solid, unmoving part of the image which is also in different parts of each frame depending on the branches, etc.

I understand if this is not a high priority, and maybe it's difficult to code the "only make CPs here" mask; maybe not many people use Hugin for alignment. But such a mask would be really handy in these situations!

It would really help to have a "remove all masks" button, though. :-)

Thanks for the consideration,
-c

Reply all
Reply to author
Forward
0 new messages