Add boundary warp feature

Bug #1839479 reported by Mihai Sorin Dobrescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Triaged
Wishlist
Unassigned

Bug Description

There are panoramas like nature landscapes that need to take more from the projection.

In those cases, some or more pixels could be taken from the projection outside the crop with more or less distortion, but without becoming unnatural.

For such cases, a distortion/morph/reshaping could be made similar to GIMP cage processing or Adobe's Camera RAW boundary warp tool.

The goal would be either calculate some approximate polygon around the projection and generate a transformation in a range 0% - 100% that would reshape the projection to a rectangle, leaving the user to adjust the amount according to his taste, either let the user adjust himself the projection similarly to GIMP's cage tool, either make both options available in Hugin's tradition, depending on the chosen mode, simple or advanced/expert.

After studying GIMP cage, but important for the panorama distortion process,
there should be two cage point moving modes: one as it is now in GIMP, individual moving of points, one new to GIMP, I call that elastic mode,
when moving a node should adjust other nodes in relation to that node movement, like proportionally reduce all the segments between all the defined points, in order to stretch the image naturally and keeping a general image proportion, on its entire surface.

In order to better explain the reason for this request, I provide here my limited experience I've had with GIMP trying to reshape panoramas I've made with the cage tool. I put emphasis on "my experience".

In short, I have stitched 9 images in Hugin, that generated an 148MB TIFF of about 8600 x 2600 px.
I've opened GIMP and made a cage of 14 points, then started adjust it.
On my i7 920 with 24GB RAM system, took about 15 mins to calculate the initial cage definition, then about 1-3 mins to move points. It is a painful process and sometimes the cage disappears for some reason (bug?), sometimes I need to come back to the process, in which case I have to redefine the cage again and again, which is totally unproductive, as the cage can't be persisted even using GIMP native format, xcf. Also, working with the full image is a consuming process, so I think Hugin should work with a smaller sample, as the panorama preview seems to use.

description: updated
tmodes (tmodes)
Changed in hugin:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Mihai Sorin Dobrescu (msdobrescu-gmail) wrote :

Hello, after discussing with Hugins users and maintainers, I've tried GIMP's cage feature.
It comes to strange results. See the "cage strange results" attachment. It's like it adds the cage deformation on top of the original image, mixing the pixels, so it makes things hard to correct.

Revision history for this message
Mihai Sorin Dobrescu (msdobrescu-gmail) wrote :

That being said, I think what is needed is to stretch the image to become rectangular. Is that possible? See the "stretch the result" attachment for my idea.
I think Hugin should not depend on other tools in this regard, as it should be its own feature.

Revision history for this message
Mihai Sorin Dobrescu (msdobrescu-gmail) wrote :
Revision history for this message
Mihai Sorin Dobrescu (msdobrescu-gmail) wrote :

How the users of Hugin solve this problem? How do they get a rectangular image out of Hugin's output? Of course, I don't discuss here a simple crop. This feature seems not trivial to implement, right?

Revision history for this message
Mihai Sorin Dobrescu (msdobrescu-gmail) wrote :

Another resource here: https://arxiv.org/pdf/1810.11220.pdf.

Revision history for this message
Mihai Sorin Dobrescu (msdobrescu-gmail) wrote :

A demo of how it works in Adobe Camera Raw/Photoshop here: https://www.youtube.com/watch?v=-7CDgJVHy5A

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.