It is currently Thu Jul 25, 2024 5:17 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 9:04 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
Well, I think this thread is more like a feature request for David :hehe

I think that with algorithms from inpaint and edge detection in new filters to colorize, would be close to get it. It's just a guess, I have no idea about programming :oops:

Anyway, Do you know of an easy way to extract foreground/background images using G'MIC?

_________________
Image
Be patient, English is not my language.


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: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 9:08 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
ChrisF just posted a tutorial that uses G'MIC:

viewtopic.php?f=24&t=7568


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 10:02 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
Does it have to be G'MIC? I only ask because I've played with the RGGJAN fork recently just for the foreground extraction, and it worked fairly well. Might be an option?

Partha has one compiled over on his site (partha.com).

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 10:42 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
Thanks Esper (and ChrisF). I must visit more often video tutorials section :oops:

@ patdavid, yes, I know the RGGJAN/Onkel Hatti version. But you know, G'MIC is amazing and I think there are many good algorithms currently in G'MIC that could be used to design a filter to extract foreground. I will continue experimenting with G'MIC to see if with the current filters I find a good method of extraction, even when all the images have similar colors/tones and when only distinguished shapes.

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 10:45 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
Can't argue that G'MIC is amazing! :) Do tell if you come across anything worthwhile, I'd certainly be interested myself.

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 3:09 pm  (#6) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
There is:

Repair -> local similarity mask

Also based on a previous suggestion I've added a proof of concept under:

Testing -> Garagecoder -> Split Objects

It works like the recolorize filter, like this:

Create a new transparent layer, roughly pencil some things red and some green then load the filter. Set input layers to active and below. It will split them to two layers.


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 3:43 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
I knew G'MIC guys could make this be so easy and good! :yes
Thanks garagecoder!

I have used a photo here:
viewtopic.php?f=18&t=7871
Image
Pretty good, and in just two simple steps!

Are you thinking in the future to add some user controls in this filter?

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 3:53 pm  (#8) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Well yes I will do at some point... I'm secretly hoping David will tweak it (I just wanted to prove it's easily possible). There are tons of things can be done e.g. alternate edge detections and tweak controls, but I'm trying not to get distracted from something else at the moment :crash

P.S. if the original image has an alpha channel it will use it rather than leaving parts black (if you didn't already notice).


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 6:29 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
Excellent garagecoder. I just tried it and it worked pretty nicely. I do hope David or yourself add to this one in the future. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 6:40 pm  (#10) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
I'll at least add some controls for the edge detection tomorrow, but for now I must sleep :otb


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Fri Jul 12, 2013 7:25 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
:)
Image

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 12:10 pm  (#12) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
Updated to include some basic controls, fixed a bug with layers sometimes not separating properly. Cool example by the way :yup


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 12:26 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
garagecoder wrote:
Updated to include some basic controls, fixed a bug with layers sometimes not separating properly. Cool example by the way :yup


Is it possible to add another control for threshold when using swap layers?

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 12:38 pm  (#14) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
You mean an opacity threshold like there is in David's "extract objects"? I think that should be possible, yes I'll have a look. Also experimenting with an option for inpaint/repair (i.e. fill in the objects). Then I must stop and work on something else :hehe

Edit: actually I'm a little confused about the threshold... what's it's main purpose?
Second Edit: I now assume you mean for initial edge detection, I'll see what I can do.


Last edited by garagecoder on Sat Jul 13, 2013 1:34 pm, edited 2 times in total.

Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 12:43 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
garagecoder wrote:
You mean an opacity threshold like there is in David's "extract objects"? I think that should be possible, yes I'll have a look. Also experimenting with an option for inpaint/repair (i.e. fill in the objects). Then I must stop and work on something else :hehe

Yes opacity threshold. :)
Wow an inpainter.
Sounds great! Thanks garagecoder.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 12:57 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jun 02, 2013
Posts: 2075
This is awesome. Thanks for all your work on it, appreciated.

_________________
Image


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 1:44 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
again, thank you very much garagecoder!

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 2:07 pm  (#18) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
OK I've added two things: Alpha Min (Opacity threshold) and Inpaint

It might be an hour before this updates because I think the filter update runs on the hour every hour (maybe that's changed now I don't know).

Beware that the inpaint can be extremely slow!

Now I really must go and do things, I'll keep one eye on this in case of a serious bug though :)


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sat Jul 13, 2013 3:15 pm  (#19) 
Offline
GimpChat Member

Joined: Sep 24, 2012
Posts: 275
Location: Scotland
That's it available now, I'll add some controls for the inpaint in future (but not today, sorry)


Top
 Post subject: Re: Is there any G'MIC filter for foreground/background extraction?
PostPosted: Sun Jul 14, 2013 2:10 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
Thanks again. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) background and foreground: discussion of a little GIMPWork with b/w

5

No new posts Change foreground and background color

2

No new posts Change Foreground Colour

0

No new posts Gimp always "not responding" when I use the foreground select tool.

1

No new posts Attachment(s) cli345's cartoon filter as a native GEGL Filter.

10



* Login  



Powered by phpBB3 © phpBB Group