Shelly and Roy 3:15pm, 5 June 2009
I have been playing with the Grain Extract and Grain Merge modes, and there's a lot of usefulness there. I don't think most people are aware of just how useful they can be. Let's start with my favorite:

Separating Luminance from Color
It is often prudent to work on luminance and color channels separately (for example, to sharpen only the luminance, or to apply more noise reduction to the color than to the luminance). This is often done by decomposing to Lab. With Grain Extract and Grain Merge, you have the next-best-thing to having a Lab editing mode without the decompose/recompose cycle.

Here's all you do:
Layers->New From Visible to get a copy of your current state
Colors->Desaturate using Luminosity gives you your Luminance layer
Set the mode to Grain Extract, and you will see the color layer
Layers->New From Visible to put the color into its own layer
Set your Luminance layer back to Normal mode
Set your Color layer to Grain Merge mode

What you see now should look just like it looked when you started, but now it is a combination of the two separate layers. Sharpen your Luminance layer (or do something drastic like C2G on it) and you'll see your results immediately. Denoise your color, and there it is. Actually, you may want to put your Color layer back into Normal mode so you can see the results of your denoising on the layer itself. Or you may just be interested in the results on the composite image. Your choice.

Duplicate your Color layer, and you've just doubled your saturation. Then you can fine-tune it with the Opacity slider.

If you adjust saturation or color balance on your color layer, you may notice some brightness changes in the composite image. That's ok, it's easy enough to
Make the Color layer luminance-neutral again
Set the Color layer to Normal mode
Duplicate layer
Desaturate the upper layer (using Luminosity)
Set the upper layer to Grain extract
Merge down

Ta-da! You've removed all the luminance out of your color again. Set the mode back to Grain Merge.

This same trick can be used to
Make a luminance-neutral color filter
Want to add a warm, amber glow to your image? Or any color of filter, for that matter?
Create a new layer
Fill it with the color of your choice. Or paint in it. Whatever.
Duplicate the layer
Desaturate the upper layer (using Luminosity)
Set the upper layer to Grain Extract
Merge down
Set the layer mode to Grain Merge

Now you've got a custom filter that affects only the color. (Well, up to a point. When an extreme amount is applied, Grain Merge is going to be running up against walls, since it won't be able to push pixels lower than zero or higher than 255.)

I should point out that if you prefer Lightness or Average, or some Channel Mixer way of separating your brightness from your color, you can use that instead of Luminosity.

Smart sharpening
This gets more into the experimental realm, but is interesting. Say you want to emphasize fine details, but not the grain of the image. You don't want to eliminate the grain from your final image, but you don't want to increase it.

Turn off your color layer. You need your Luminance to be the top visible layer.
Duplicate your Luminance layer.
Denoise the copy to eliminate the graininess, but preserve other details. I'll call this Copy 1.
Duplicate the copy and set the mode to Grain Extract. This is Copy 2.
Filters->Enhance->Despeckle (I like this better than Gaussian blur)
Adaptive OFF, Recursive ON, Radius 2 (or whatever you choose), Black level -1, White level 256
Now you should see some details embossed on your flat gray image.
Layers->New From Visible. This is your
Delete Copy 1 and Copy 2.
Set your new layer to Overlay mode, or try Grain Merge or Hard Light, but they'll probably be too extreme. For more effect, duplicate the layer again.

Whatever features are in Copy 1 that are not in Copy 2 are going to be what wind up being emphasized. So denoising Copy 1 kept grain from being emphasized; the Radius of blur on Copy 2 controlled how much detail came through in your emphasis layer.

As I said, this is more in the experimental realm, which means you can play with it and may find some settings that you like. I will probably stick with Unsharp Mask for my sharpening needs (though i will usually apply them to the Luminance layer).
wgoss 9 years ago
Nice write up.....I like the easy Lab Layer creation....
jeffegg2 PRO 9 years ago
some examples would be nice.
RemcoBoerma 9 years ago
great experiments you've done there! keep it up, there are bound to be more beauties like what you have found already!
Janne. 9 years ago
Very cool tricks. I've only used Grain extract/merge modes to get rid of deviantArt watermarks, it's quite easy that way, no cloning required.
dannyt. 9 years ago
Very cool! Loved it.
admin
Adrian Midgley PRO 9 years ago
why is is called "grain"?
peaceful airport [deleted] 9 years ago
Shelly and Roy...you are a genius! thanks!
Shelly and Roy Posted 9 years ago. Edited by Shelly and Roy (member) 9 years ago
Maintaining Saturation
If you have separated your image into a Luminance layer and a Grain Merge layer of color, and you radically change the brightness of your Luminance layer, you will find that the color looks a bit thin. See figure 2 compared to figure 4 below.

Gimp Grain Extract Example

A nice solution I've found is to take the original image and put it above the Grain Merge color layer, and set its mode to Saturation.

You might ask, why not just apply the curve to the original image before separating? That would work fine in this case, but you couldn't do it for something like C2G that doesn't preserve color.

nb Adrian Midgley according to the docs, "Grain extract mode is supposed to extract the “film grain” from a layer to produce a new layer that is pure grain, but it can also be useful for giving images an embossed appearance."
Groups Beta