-
1. Re: How does high pass filter determine frequency
JJMack Sep 28, 2014 9:04 AM (in response to kcroy2011)Do not know if this will help you does little for me From Photoshop Help | Filter effects reference
also How To Enhance Texture and Detail with Intelligent High Pass Sharpening » Vibrant Shot Photography
High Pass
Retains edge details in the specified radius where sharp color transitions occur and suppresses the rest of the image. (A radius of 0.1 pixel keeps only edge pixels.) The filter removes low-frequency detail from an image and has an effect opposite to that of the Gaussian Blur filter.
It is helpful to apply the High Pass filter to a continuous-tone image before using the Threshold command or converting the image to Bitmap mode. The filter is useful for extracting line art and large black-and-white areas from scanned images.
-
2. Re: How does high pass filter determine frequency
kcroy2011 Sep 28, 2014 6:08 PM (in response to JJMack)Thanks for your reply. I'm getting familiar with the technique, and the video was a helpful way to remove the "fringe" when frequency filtering.
However, what I am looking for is more depth into how PS determines "frequency". I suspect it uses some form of edge detection, but would be curious to know if there was actually a frequency being referred to. Lightwaves do have frequency, but separating that way would be more of a warm/cold filter than a sharpness/blur filter.
-
3. Re: How does high pass filter determine frequency
G.Hoffmann Sep 29, 2014 12:58 AM (in response to kcroy2011)Some further explanations:
Audio signals:
frequency = cycles per second
This is the frequency in the time domain.
An arbitrary signal can be represented by a bundle of harmonic signals (sine, cosine)
plus a DC-part (direct current, non periodical component).
A typical high-pass filter for audio signals:
The cut-off frequency fc is found at the transition between increasing gain
(low frequency) and fixed gain 1.0 (high frequency).
frequency gain (attenuation)
0.01 fc 0.01
0.10 fc 0.1
1.00 fc 0.707
10.0 fc 1.0
100 fc 1.0A typical high-pass filter for digital images:
frequency = cycles per unit length or (better) cycles per pixel
This is the frequency in the spatial domain.
The highest frequency is 0.5 cycles per pixel (alternating black and white pixels)
An arbitray row in a digital image can be represented by a bundle of harmonic signals
plus a DC-part.
Each channel R,G,B is filtered individually, one after the other.
Frequency and gain are as above.A high-pass filter applies an attenuation <<1 to low frequency signal components
and removes the DC-component entirely. This would result in a black background.
Therefore the background is shifted to R=G=B=128 (8bit per channel) or
R=G=B=0.5 (normalized).Sharp edges contain stronger high frequency components. These are retained.
http://en.wikipedia.org/wiki/High-pass_filter
In this doc we find a simple implementation:
y[0] := x[0]
for i from 1 to n
y[i] := a * y[i-1] + a * (x[i] - x[i-1])
return yx[i] are values R (or G or B) in a row at column i in the original image
y[i] are values R (or G or B) in the same row at column i after filtering.
Factor (a) contains indirectly the cut-off frequency.
This example does not yet apply the shift to R=G=B=128.The implementation can be different (non-recursive filter instead of recursive, as above,
higher order instead of first order, using a filter kernel 3*3 or 5*5 pixels instead of working
in each row independently).I'm not trying to explain how Photoshop works! There are so many alternatives.
Best regards --Gernot Hoffmann
-
4. Re: How does high pass filter determine frequency
kcroy2011 Sep 30, 2014 3:33 AM (in response to G.Hoffmann)Thanks! This is exactly what I was looking for. I need to digest this a bit. In a similar vein, I found this article very helpful in walking through the maths on the blending modes.
http://photoblogstop.com/photoshop/photoshop-blend-modes-explained
-
5. Re: How does high pass filter determine frequency
G.Hoffmann Sep 30, 2014 9:06 AM (in response to kcroy2011)You're welcome, thanks for the feedback!
In order to illustrate the application in Photoshop I've prepared a simple test image:
pure red, green and blue bars in sRGB on a black background:
Then I've applied Filter High Pass / 10 pixels:
Going from left to right in the red region, we can see this behaviour:
Generally gray background R=G=B=128.
Before the transition black/red we have a negative pulse with cyan, the complement of red.
The peak amplitude is 128. After the transition we have a a positive pulse with peak red=128.
Both pulses are washed-out with respect to the background (cyan to the left, red to the right).
This is a perfectly symmetrical behaviour for a 'non-recursive high-pass filter'.
Complement of red is cyan (R=0, G=255, B=255),
complement of green is magenta (R=255, G=0, B=255),
complement of blue is yellow (R=255, G=255, B=0),
but the actual peak values are half the full range, means 127 or 128.
As we can see, the filtering happens in both dimensions.
More about my basic ideas of filtering:
http://docs-hoffmann.de/gauss25092001.pdf
Best regards --Gernot Hoffmann
-
6. Re: How does high pass filter determine frequency
Chris Cox Sep 30, 2014 5:02 PM (in response to G.Hoffmann)For more research oriented information on the topic, search on "difference of gaussian"
-
7. Re: How does high pass filter determine frequency
kcroy2011 Sep 30, 2014 8:52 PM (in response to Chris Cox)Wow, thanks Gernot! That is great!
Chris - I will do that!
Really - thanks everyone - this is by far the most productive responses I have ever received on the Adobe forums.






