You are here

High Pass Filter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
high-pass.scm6.15 KB

A general purpose high-pass filter plugin. It shows up as Filters->Generic->High Pass Filter. You can select a blur radius that sets the size of detail to be passed by the filter, as well as an option to keep the source layer or replace it.

EDIT: Updated to use grain extract rather than the previous method, This looses less histogram data and is closer to the Photoshop version...

It actually implements 5 different high pass modes:

  1. Colour - I think this is the same as photoshop's high pass filter effect.
  2. Preserve DC - like colour, but adds the average image colour back in.
  3. Greyscale - this desaturates the layer before high pass filtering.
  4. Greyscale, Apply Chroma - as above, but blends it in with the source layer colours
  5. Redrobes - (named after the technique described by Redrobes)

They are all straightforward, using a basic "duplicate, blur, grain extract, merge down" process, with a few small details added for each, except the Redrobes mode. The steps he described were:

Get an image 1.
Blur it quite a lot 2.
Blur it until its a constant colour 3.
Use Image arithmetic to generate 2 - 3 => 4
Use Image arithmetic to generate 3 - 2 => 5
Take 1 and subtract 4 and add 5 => 6

While this is supposed to be the same as a basic filter with preserve DC offset, it seems to give slightly different results, so I left it in :)

For more details and sample images, see my blog post:
http://www.silent9.com/blog/archives/152-High-Pass-Filter-Plugin.html

Code License: 
GIMP Version: 
Scripting Engine: 

Comments

A general purpose high-pass filter plugin. It shows up as Filters->Generic->High Pass Filter. You can select a blur radius that sets the size of detail to be passed by the filter, a contrast adjustment, as well as an option to keep the source layer or replace it.

duplicate, blur, set layer blend mode to grain extract, merge down.
This looks more (to me at least) like photoshop's high-pass. It's more defined then the other one.

Thanks - I've updated the script to use this method. While the overall histogram result was very similar, the method I was using created some combing in the histogram which the grain extract method avoids.

-Rob A>

when i click on the filter, there is no download!
it just send me to a page with info about it.. no actual plug in!
pls help!
thx!

RIGHT click on the link and chose "Save link as..." ..
Save as "All Files" no as txt

Updated to fix a bug that was introduced by a bug fix in gimp 2.6.9

Cool Rob. It's going to be a pain for a few times. Just wish the Registry would put updates in front of previous entries, but I'm sure others will eventually see this as soon as they run into the bug too. :)

I'm not using Gimp often, but knowing that they added extra features in editing photos, this will be a good help. I like my photos edited with greyscale, and with this High pass filter, it would add more effects on the photo. I should try this one!

Thanks!
sLewis -

Absolutely perfect
Many thanks RobA for this useful Script.

To use for sharpening:-

Download RobA’s script file :-
high-pass.scm
To install in GIMP:-
Copy this file (Ctrl C after highlighting)
In XP ~ Navigate to C:\Documents and Settings\"Your User Name”\.gimp-2.6\scripts
Insert the file high-pass.scm into scripts folder (Ctrl V)
To sharpen an image :-
Open it in GIMP.
Carry out all colour changes and other manipulations first then Sharpen just before saving/printing.
Make sure “Layers,Channels,Paths,Undo...”palette is showing (If not goto Windows/Recently Closed Docs and click on “Layers,Channels,Paths,Undo...” to open it again)
Goto Filter/Generic and click on “High Pass” (or "Overlay" for a more subtle sharpening)
In “Script-Fu: High Pass Filter” screen set:-
Filter Radius to 10
Contrast Adjust to 0
Mode to Colour
Tick Keep Original Layer
Then click OK
Image will turn Grey with a slight tinge of colour
Then on Layers Palette:-
Select Mode "Hard Light"
Image will return to full colour but sharper
Use Opacity Slider to get amount of Sharpening required.
Save or Print or etc.

I followed your directions and it worked perfect, until I got to the hard light part. I could not find it under layers palette or any other place. Help please!

Pages

Subscribe to Comments for "High Pass Filter"