Wednesday, February 18, 2009

Liquid Rescale gimp plugin

Liquid rescale is "content-aware resizing". You can make your picture wider or narrower with cutting unnecessary picture element and resampling filling elements, so they keep looking good. This posting is just an example of practical use of the effect. All the mathematical grounding and much more samples can be found on official site of corresponding GIMP plugin

Original picture
Here you can see original picture, with three men walking out of sea. It was taken on the Black Sea coast. We want to remove central man, as his photo is fragmental and has no sense here. It is easily done with Clone Stamp - we just need to fill place taken by the man by water elements taken nearby. Doing so would consume lots of time, if we want picture look realistic. And, I think, there are not that much people who like spending hours stamping the picture. Also, I tried doing this with stamp - and failed :).
There is another solution. We can make this task faster, much faster with Liquid resize. By its nature, LQR cuts off those parts of picture which are considered less valuable. More explanation on how LQR calculates value of a pixel path, can be found here (Russian :) ).

Practical view
Now we are going to enhance this picture with just single effect applied. I already have LQR plug-in installed. If you wish to install it for your Gimp, go here.
Now, we start Liquid rescale plug-in from Layers menu, and create two layers. First layer will hold object masks to be saved during resizing, another one - to be deleted.
I have painted in red in deletion layer, and in green in preservation, in order to see future picture composition easily.
Now, starting the resize...
It takes some time - calculations are not that lightweight.
Also, before running plug-in you can decide to store all the path being cut in separate layer so you could see which pixels are cut.



Resulting image
And this is the image after effect application. Just after single action, without sitting for hours and clone-stamping picture. Et voila.
Better examples can be found on the official plugin example page (even with video).

Here is my useage pattern - if you have some photo with elements that you don't like, and the picture itself is not that valuable to spend a day or two on enhancing it, you can use LQR for quick fixes.

2 comments:

Anonymous said...

Надо было убрать одно тело из кадра, как всегда это оказался Анкин :)

Valery said...

^ lol