Guided Selection (Foreground Extraction) Progress Thread

Hi Krita Artists,

I am currently working on the process of making guided selection tool into Krita. Now, before I mention the details of doing so and what is guided selection, there are things that I have done for Krita, and these are the things that I have done:

  • Several Blending Modes including ones that are my own invention which is Modulo series (You won’t see this set of modes in other software except G’MIC, and that’s my contribution there too)
  • Added Gaussian High Pass Filter (This needs more work after guided selection)
  • Added Symmetric Difference Selection Mode

What is guided selection? Guided selection is the process of extracting foreground with guided filtering made by Kaiming He. The main core of guided selection is the box filtering or mean filtering. The purpose of creating guided selection is to bring foreground extraction tool into Krita.

Why am I bringing this tool into Krita as Krita is marketed as a painting software? Such tool enables a wider range of art possibility by combining photographs and painting in one (usually to create ethereal artworks that can lead to greater quality than hand-painted work). For example, ElenaDudina combines foreground extraction, photomanipulation tools, and painting all in one frequently to create such works. I want to bring that option for Krita. As a side effect, it also enables more people to switch to Krita if they’re not sastified with other FOSS raster graphic application options.

Progress on Guided Selection

  • Create Box Convolution Code - Done
  • Create Guided Selection Icon - Done (It’ll be a tree surrounded by selection ants)
  • Create the Guided Selection Widget - Done
  • Create the Guided Selection Processing Code - TODO
  • Finalize Code - TODO
  • Release code publicly - TODO

Thanks for working on this. I am looking forward to this and will help testing it. :+1:

1 Like

This sounds super promising! Excited to see this, thank you for making this!:grin:

great idea ! Cant wait to test it !

1 Like

As Magnetic Tool already has the base for widget, I have finished the widget. Now, for the most difficult part of making the tool. This part will take months as I lack c++ skills.

This idea somewhat looks similar to the object selection tool in Photoshop, am I correct?

Yes. That’s the idea. The purpose is to give a new use case to Krita which would be matte painting, and making it viable to use photographs to create beautiful artworks.

1 Like

Hmm, I am working on a new filter for better edge detection, would love take a look at the code if it is available publicly, :upside_down_face:


Sorry for bumping this thread, but I decided to work on this again. Thanks to @tiar, I was able to get the interface to work.

Up next is to do the algorithm.

1 Like

Now, I actually managed to get a start on the algorithm. See this commit here -

What this does is to box blur a copy of the original image internally.