Feature Proposal: Incremental Adjustment [edit: included since v0.6.0]
Forum » General / Feature requests » Feature Proposal: Incremental Adjustment [edit: included since v0.6.0]
Started by: Anonymous (65.60.213.x)
On: 1222165314|%e %b %Y, %H:%M %Z|agohover
Number of posts: 5
rss icon RSS: New posts
Summary:
A proposal to allow for liquid rescaling incrementally instead of all at once.
Feature Proposal: Incremental Adjustment
Anonymous (65.60.213.x) 1222165314|%e %b %Y, %H:%M %Z|agohover

I know this would be very computationally expensive, but in some cases, it would be nice to be able to incrementally scale an image by one (or more, making it configurable would be great) seam at a time. That is, it would compute the best seam for removal (or inflation), adjust the image, and then recompute the best seam again, over and over until the desired number of pixels have been removed (or added).

This feature would especially make a difference when expanding an image. Currently the recommendation for large expansions that have a preserved area is to manually perform incremental rescales. Having this solution available would greatly simplify such operations.

A future direction this could go in is for feature removal. The user would no longer have to do anything except to determine which feature to remove. Using an incremental method, the idea would be to first calculate both the horizontal and vertical seams that would be removed, then to compare the "cost" of removing the horizontal seam to that of the vertical seam (this might need to be scaled based on aspect ratio, testing would have to be done. Also I'm definitely glossing over some details, but I hope my intention is clear). Whichever seam has a lower "cost" would be the one removed, and the next iteration would repeat this process until the discard area is removed completely. (Of course, for efficiency reasons, it should again be possible to remove more than one seam per iteration, where the given number of seams would determine the number of either horizontal or vertical seams to remove — not a combination of both.) Since the discard area has a high negative value, each iteration would remove a maximal number of discard pixels, so I would expect the entire process to converge quickly.

In any case, I don't expect the initial request to require much new development since it's mainly the same functionality in a loop. The "future direction" also doesn't seem like much of a change, since I presume that the only new code would be that which compares a given horizontal seam(s) to a given vertical seam(s) and determines which is better to remove. The biggest changes would likely be in the interface code.

I think this is worthwhile as long as it does not add too much code complexity; I would expect it to result in higher-quality images while also lightening the workload on the user (manually iterating for large expansions, taking time to determine the number and orientation of pixels to remove while discarding parts of an image, etc.).

I'm interested to hear what you think: bmintern A+ gmail D0+ com

unfold Feature Proposal: Incremental Adjustment by Anonymous (65.60.213.x), 1222165314|%e %b %Y, %H:%M %Z|agohover
Re: Feature Proposal: Incremental Adjustment
Anonymous (65.60.213.x) 1222165872|%e %b %Y, %H:%M %Z|agohover

Oh, and I totally forgot to say it…. I love the plugin! When I first saw the YouTube video presenting this idea, I was amazed by it. It's really cool to be able to use this power without having to jump on the Photoshop bandwagon (I'm pretty sure Adobe hired the creators to implement it for them).

Re: Feature Proposal: Incremental Adjustment
UnNeuroneUnNeurone 1222229504|%e %b %Y, %H:%M %Z|agohover

Thank you for sharing your ideas, I'm open to any suggestion which might improve the plugin.
If I got it right, there are 2 distinct feature proposals here:

  1. Incremental enlarging: this is planned for a future release (not the next one, which will be out soon, but the following one will probably have it). Doing it one pixel at at a time would yield very bad results; therefore, an additional option will be required, to set the enlarging percentage at which more than one step would be performed. The main issue here is to find a sensible default value. This would be useless when reducing the size, however, since in practice this is what already happens (i.e. reducing by 25 pixels + another 25 pixels is the same as reducing by 50 pixels in a single run, while this is not true when enlarging)
  2. Alternate shrinking (horizontal/vertical), possibly in an optimal way: this was already proposed in the paper by the algorithm's authors, but it has some drawbacks (you can find more information in that paper) and raises some issues with the current implementation of the carving engine (which of course are related to the drawbacks I mentioned before). However, a dedicated interface could in fact be a good idea, I have to think about how this could be implemented. It will require some work, however, so it won't be included anywhere soon (unless someone wants to help with the code, of course).
unfold Re: Feature Proposal: Incremental Adjustment by UnNeuroneUnNeurone, 1222229504|%e %b %Y, %H:%M %Z|agohover
Re: Feature Proposal: Incremental Adjustment
Anonymous (65.60.213.x) 1222833748|%e %b %Y, %H:%M %Z|agohover

Yes, that basically covers it. Also, sorry for putting my initial post in the "Bug Report" forum, I was following the model that I've seen in other open source projects where users submit feature requests as "bugs" with a very low priority. It was only after posting that I noticed the General forum that had Feature Requests right there.

I wasn't aware that incremental shrinking is identical to non-incremental. I didn't know that after removing a seam of pixels, the newly-neighboring pixels are used in calculating the next seam, although I suppose it would be hard to come up with any other sensible method. I will take your word that a one-pixel-wide seam increment would be a bad idea for enlarging, because surely you have better insight into the workings of the algorithm than I do.

As for the second point, I find it interesting that it was considered by the algorithm's authors. I didn't intend it as an imminently-necessary feature, only as an interesting continuation of the thought process involved in the first idea (incremental adjustments). I certainly wouldn't expect it to appear gimp-lqr-plugin anytime soon.

Thanks for considering my ideas! :)

Re: Feature Proposal: Incremental Adjustment
UnNeuroneUnNeurone 1234746172|%e %b %Y, %H:%M %Z|agohover

These features are now included in the plugin.
Incremental enlargement can be set with the "enlargment step" option in the advanced tab.
The new interactive mode can be used for finer control and/or alternating the rescaling directions manually.

unfold Re: Feature Proposal: Incremental Adjustment by UnNeuroneUnNeurone, 1234746172|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License