Color Masks in Gimp

@s7habo Nice masking! I tried the foreground extraction tool before but because of my slow computer I gave up on it. Now the lion is awfully lonely :crying_cat_face:.

1 Like

There’s a little fringe, but that’s just me. I always am OCD with perfectionism. Unfortunately, that’s not going away.

@Reptorian I noticed that too and also how the selection is fuzzier than say @McCap’s method. The difference is that I don’t let this stuff get to me. What I would say is that knowing different ways of doing something can be advantageous, since one method might work for one image but not so well for another.

Curious: how would you normally tackle this problem given your perfectionism? By hand?

I tackle the fringe issue by experimenting with filters by starting to find the values of alpha is decent to work with on the start, and I manipulate that base image with long series of painting and usage of filter brush, and nondestructive filters. may or may not apply this to several different masked or on separate layersI gotten beautiful results by doing it by hand, but it is just really painful. I just often click the x if the efforts takes too long.

Is there a trick to that tool?
I tried it yesterday and it didn’t select much more than what I had selected?

Using the latest gimp AppImage from 2017-08-07 and the latest McGimp release on os x 10.11, using the Foreground Extraction tool, I can’t change the “Engine” combo box because it is grayed out. @patdavid @Carmelo_DrRaw @partha – any ideas?

@s7habo how on earth did you do that, could you record a video? I tried in 2.9.6, and like @paperdigits wrote I cannot select the engine, it’s grayed-out, and using whatever engine is active the result is and always has been garbage.

Yes, this is sometimes the problem with blurred or noisy parts of the image. The trick is first, to separate the foreground from the background as precisely as possible using brushes before applying the algorithm.
If the first result is not satisfactory, you can make further corrections with the brush by switching between foreground and background selection option of the brush.

What I don’t like about implementation in GIMP is that after the initial implementation of the algorithm after each additional stroke of the brush, the calculation is starting to run again! In this way, this already very slow process is unnecessarily stretched even longer.

In some cases helps “Feather Selection” option in brush menu.

If the foreground selection is done and there are still artifacts, I copy the selection to the new layer and make manual corrections with the help of eraser tool with low hardness and opacity switching between “erase” and “un-erase” mode of the tool.

I’m using Gimp from ppa:otto-kesselgulasch/gimp-edge and ATM I have GIMP 2.9.7.

Machine_selector

Strange, but until now, I’ve always had this option! I’ll make a video later and put it here.

1 Like

It is grayed out for me as well, I’m on @partha’s version (2.9.5 I think)

1 Like

You need to build gegl with libumfpack so that gegl:matting-levin gets build.

Edit: On Debian you need libsuitesparse-dev for that.

2 Likes

@Morgan_Hardwood Here’s the video:

Please note: I have scaled the original image for the faster calculation speed of the engine for Video and shortened the waiting times of the calculation. Original video length was about 6 min.

9 Likes

I’ll try to implement this in the appimage, and make a new package.

Thanks for the hint!

2 Likes

I know the question has been answered for getting the matting extraction (ty @houz).

For using it, I had recorded a video a few years ago that used this as part of an experimental fork of GIMP back then:

4 Likes

For me the ‘Levin-Matting’ algorithm crashes gimp. I have to try gimp 2.9.7 if there isn’t this crash.

@s7habo
Thank you for your great video!

??? I don’t know what any of that means. I am trying to change the engine, but it grayed out.

If the engine is grayed out, your version of gimp isn’t built with support for that option.

What versions are supported? I have the most recent developerer version.

Can’t change to levin-matting in 2.9 It’s grayed out

I have the exact same issue.

For anyone on Windows, samj’s portable compile works with both matting options.