Re: need some help with custom filter in Photoshop

From: thanatos (WALKERGWM_at_bigpond.com)
Date: 02/27/05


Date: Sun, 27 Feb 2005 06:18:46 GMT

the custom filter feature is an an example of convolution kernels

what are they?

you need a bit of a course in transform theory and/or FFt's

here is a simple one

0,1,0,-1,0
0,1,0,-1,0
0,1,0,-1,0
0,1,0,-1,0

a 'laplacian' convolution kernel

just think of every single pixel in the image (and its neighbourhood) being
multiplied by this matrix... this would tend to pick out vertical features,
see?

ditto for a horizontal line feature picker

0,0,0,0,0
1,1,1,1,1
0,0,0,0,0
-1,-1,-1,-1,-1
0,0,0,0,0

you can 'add' them too (just add the entries in the corresponding matrix
positions)

you also have gaussians (take a look at photoshop online help for this very
common one)
so if you convolve your image with a gaussian kernel (looks like a tiny
aztec pyramid)
this means the FT of you image is multiplied by the FT of the little
gaussian (which is just
a big gaussian) - this just 'apodizes' the high frequency components out of
the image -
hence the image (in the image plane) is 'smoothed'

what does it mean

well, how bout this

Convolution in the frequency domain corresponds to multiplication in the
Fourier Domain

and vice versa

You KNOW this intuitively

yes YOU DO!

the 'Image' of a heavenly body is sampled (Multiplied) by the objective of
your telescope
in other words the image plane is multiplied by the transfer function of
your scopes objective

the transfer function of your scopes objective is dictated only by the size
and shape of its aperture
this is called a 'top hat' function - the transform of the top hat gives us
the 'Airy Disk' convolution of
every single element that you are very familiar with ..

simple no?

:)

anyway - thats enough to get you started - try looking up gaussian,
laplacian convolution kernels and maybe the Sobel transform!

"Blaine Waddington" <v@z.m> wrote in message
news:s8aUd.8056$Ba3.6323@newsread2.news.atl.earthlink.net...
>I keep running into these "custom" or kernal filters in Photoshop and other
> programs but, try as I might, I have been unable to find good tutorials as
> to how they work with some practical input values. I can play with
> inputting different values all night long, but I still have hardly a clue
> as
> to what's going on. Yet, I see a lot of potential here. Can anyone
> suggest
> some on-line decent tutorials with examples as to how it works? And, when
> an image is smoothed with this function, how is it different from a
> gaussian
> blur?
>
> Thanks much,
> Blaine
>
>
>
>