Image Processing in C#: Part 13 - Colour Filters
Implementing a colour filter is a rather simple affair. All a colour filter will do is specify the percentage of red, green and blue to leave in the image. So, for example, if you would like to see only the green component, then you keep the green component of each pixel unchanged, and set the blue and red components to 0.
You can create interesting filters by playing with the ratios too. So for example to get a brownish filter, you can set the red percentage multiplier to 1, green to 0.6 and blue to 0. Then multiply each component by the respective values. In this example, the red value will be unchanged, and blue will be removed entirely. The green component, however, will be set to 60% of the original value.
The full source used in the series is available from https://github.com/sjmeunier/image-processor.
Originally posted on my old blog, Smoky Cogs, on 19 Nov 2009