Friday, March 15, 2013

Updated Krita ColorToAlpha filter

Hey! We've just updated our Color to Alpha filter, so it can now be easily used for removing background from scanned sketches! Our algorithm differs from the one used in Gimp: we use CIE deltaE [0] function to calculate the difference between the image and the base color, so it is more flexible and configurable. You can choose to what extent you want to remove the background by changing threshold value.


(original painting by David Revoy)

The filter's algorithm is actually quite simple:

1) Firstly, we calculate the difference between the image pixel and the base color and decrease the pixel's opacity according this difference. The less the difference, the more opacity is decreased. As I already said we use deltaE function to calculate this difference.

2) Secondly, we apply an inverse "composite over" to every pixel. Due to that step, if we put a layer filled with a base color below the filtered image, we will get original image!




[0] - http://en.wikipedia.org/wiki/Color_difference


3 comments:

  1. This is really awesome! The more nice things like this get added to Krita, the more comfortable it gets to use, it's just too awesome!

    I use this sort of function in Photoshop by taking a few steps with channels, this seems to me to be more intuitive if I understand it correctly.

    I can still remember the times when I first downloaded Krita and thought: "Nah, not for me." and now it's one of my favourite programs, save a few blips. If you consider that it's up there with programs that cost a fair amount of money it's quite a big achievement!

    Thanks for all the hard work!

    ReplyDelete
    Replies
    1. Thank you for the comment! I'm happy you like it =)

      There are new changes for that filter are coming soon! [1] I just need to get a review for that...


      [1] - http://dimula73.blogspot.com/2013/03/new-user-interface-for-krita-color-to.html

      Delete
  2. wow.. just perfect.. thank you for your hard work! Krita is for me the best program for digital paint and creation!

    ReplyDelete

Followers