It is currently Tue Aug 11, 2026 5:44 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 8:29 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Hi there,

We have added a new cool filter in the G'MIC plug-in for GIMP today, namely the Seamcarve filter that you will find in the Deformations/[b] folder.
This filter is basically similar to what the Liquid Rescale plug-in does: it implements the well known [b]Seam-carving
algorithm for image upscaling/downscaling.
More precisely, It iteratively removes or adds seams of pixels so that the less important image structures are removed/duplicated first. This way, one can upscale/downscale images along one dimension without modifying the aspect ratio of the objects located in the image.

Here is how the filter interface looks:

Attachment:
gmic_seamcarve.png
gmic_seamcarve.png [ 256.05 KiB | Viewed 5049 times ]


And some examples of use. First for image downscaling. Note how the image width is reduced without distorting the gulls.

Attachment:
gulls_all.jpg
gulls_all.jpg [ 510.53 KiB | Viewed 5049 times ]


Another example, for image upscaling this time.

Attachment:
bridge_all.jpg
bridge_all.jpg [ 376.99 KiB | Viewed 5049 times ]


Just update your filters, and you should be able to use it. Enjoy !


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 8:30 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Another example I've made for image downscaling :

Attachment:
tower_all.jpg
tower_all.jpg [ 247.23 KiB | Viewed 5049 times ]


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 8:39 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
Very cool David... looks good

_________________
Image


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 8:57 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
David,
what's wrong with my first trial?
(my intention was to keep the central part untouched while enlarging the area around)

Attachment:
before.xcf [602.17 KiB]
Downloaded 185 times


Attachment:
after.xcf [749.17 KiB]
Downloaded 177 times


input layer=all

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 9:05 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
dinasset, you probably forgot to set the "Use top layer as a priority mask" checkbox ?
I get this :

Attachment:
gmic_seamcarve2.png
gmic_seamcarve2.png [ 286.9 KiB | Viewed 5022 times ]


And when I click 'Apply', I get this :

Attachment:
gmic_seamcarve3.jpg
gmic_seamcarve3.jpg [ 86.82 KiB | Viewed 5022 times ]



David.


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 9:10 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jun 02, 2013
Posts: 2090
That's incredible, love it.

_________________
Image


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 9:15 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
you are perfectly right, David!!!
sorry...
I repeated and got your same result.
Extremely useful filter, there is a lot of situations in which there is a need to modify the ratio of an image leaving important subjects as they are.
Thanks a lot, David!!! Excellent!

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 9:24 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 27, 2011
Posts: 707
I keep getting message saying priority top layer is missing


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 9:31 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
did you set input layer=all?

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 9:35 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: May 27, 2011
Posts: 707
yes i did


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 9:43 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
it happens if you just copy my xcf file "input" (I don't know why)
click on the image layer, edit-copy, paste as new image, create your own mask on top, start gmic, input layers=all, use mask on ... and it works

post-scriptum: I understood why the simple copy of my xcf input file doesn't work: the mask layer colour is not copied correctly as TRUE GREEN (00FF00)!!!

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 12:01 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jun 01, 2014
Posts: 11
Very freaky...


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 2:37 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
skullquake wrote:
Very freaky...

probably something went wrong when I saved the .xcf on my desktop
anyhow, when using masks, it's always safe to check the real colour... pure red or pure green!

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Mon Jun 02, 2014 4:55 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: May 27, 2011
Posts: 707
dina
I am sorry,but I don't get it


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Tue Jun 03, 2014 5:18 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
pirate541 wrote:
dina
I am sorry,but I don't get it


pirate
-open any image you want (I took 1274-fun123)

Attachment:
1274_fun123.jpg
1274_fun123.jpg [ 636.91 KiB | Viewed 2820 times ]



-add a layer on top transparent
-choose as foreground color 00ff00 (pure green)
-paint with the pencil tool using foreground color over the whole cube (see xcf)

Attachment:
1274_fun123.7z [643.82 KiB]
Downloaded 107 times



-call gmic filter
-select input layers = all
-select use top layer as mask
-select output = new (just to keep your input for next experiments)
-enter width = 185%
-run the filter
I show you my result

Attachment:
after-filter.png
after-filter.png [ 678.86 KiB | Viewed 2820 times ]


try again...

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Tue Jun 03, 2014 7:52 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
David,
I used many times successfully the filter with the "green" mask (keep object)
I was not as successful with the "red" mask (remove object)
What's wrong with my test?
here input and output (parameters: all layers, top layer as mask, default 85% width)

Attachment:
Image5-resized.7z [1.24 MiB]
Downloaded 107 times


Attachment:
resulting-as.7z [1.05 MiB]
Downloaded 111 times

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Tue Jun 03, 2014 8:11 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
for those who like to see flatten input/output (without the need to unzip/load xcf)

Attachment:
Image5-resized-input.png
Image5-resized-input.png [ 1.28 MiB | Viewed 2802 times ]


Attachment:
resulting-as-.png
resulting-as-.png [ 973.63 KiB | Viewed 2802 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Tue Jun 03, 2014 11:03 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
made some additional test and -from my side- I confirm:
- with "green" mask everything goes OK
- with "red" mask it is simply ignored (checked: red is red: ff0000)

_________________
"Where am I ?"


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Tue Jun 03, 2014 2:07 pm  (#19) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Just a quick note to say I'm having a think about how the mask for keep/remove can be improved, it might take me a day or two to come up with something suitable so please be patient :yup

Also be aware the latest G'MIC 1.5.9.1 has quite a nice speed boost for this so if you're finding it slow updating might help.


Top
 Post subject: Re: New filter 'Deformations / Seamcarve'
PostPosted: Tue Jun 03, 2014 2:30 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
dinasset, I've just updated the filter, it should work better now with green/red regions on top layer.


Top
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group