Topic: FFT/iFFT Sharpening (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30196" title="Pages that link to Topic: FFT/iFFT Sharpening (Page 1 of 1)" rel="nofollow" >Topic: FFT/iFFT Sharpening <span class="small">(Page 1 of 1)</span>\

 
warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 04-14-2008 11:17

FFT/iFFT by Alex Chirokov

http://www.alexchirokov.narod.ru/archive.htm


Sometimes I read something that I find to be silly. I let it go. Then I read the same thing in several different places. It starts to get on my nerves. Eventually I reach the breaking point and can't take it anymore. I have reached that point again. I'm going to try to be nice, but I might get a bit off kilter.

I understand Fourier Transforms. It took me awhile, but I finally had that epiphany some time ago. Aha! It all makes sense!

However, I don't completely understand implementation. That is, I can't do my own FFT/iFFT filter yet. So, my understanding isn't quite as complete as I would like. As such, I might be doing some fumbling around.

Also, I don't quite understand Alex's implementation. Works in RGB using luminosity, but HSL has been mentioned a few times surrounding his filters. I don't know.

When I use them, they only seem to play nice on Background. If I use them on a regular layer, transparency can become an issue. So, after running iFFT on a layer, I follow-up with Opacity Pump. Another option is to copy and merge down a bunch of times. Or just keep things on Background.

Fourier breaks things down into frequencies. When you do this in 2d, some coolness is to be had. Sharpening? You bet.Medium frequencies? Sure. Stuff like that. As a matter of fact, I imagine Equalizer of KPT uses FFT/iFFT. Also, I wouldn't be surprised if Photoshop uses FFT/iFFT under the hood for Gauss et al (which would explain their speed, which rivals recursive Gauss).

I currently don't have access to wiki, so I'm stuck once again doing things text only. Beer with me, please.

Let's run through a simple FFT/iFFT technique.

Grab some random photograph. For this, I recommend cropping it to square dimensions. Not necessary, but makes making masks easier. Go ahead and drag out some Guides to the edges and to the center of your random photograph.

Run FFT on it.

You should now be looking at a mess in the R and G channels. Sure is pretty, ain't it?

Now, the very center of the image is the DC. I can't remember what that is short for, but it is rather important. The very center pixels hold the over-all brightness of the image. It's interesting to play with, but I recommend leaving it un-tweaked for now.

Ready for a mask? Cool.

Start a new channel (Alpha1) in the Channels palette for a mask. Grab Gradient tool using Radial. Hit D for default black and white in the colour slots. Drag it out in the Alpha1 so black is in the center and white is around the edges.

In 2d Fourier space, the frequencies are big in the middle and get smaller as you get further away from the center. They get small awfully fast. So, let's tweak the mask a little bit.

In Alpha1, hit Levels and move the Gamma slider so that black will be a pin-point and there is lots more white.

We now have an image in Fourier space and a mask. And hopefully the mask will leave DC alone (for our purposes here).

Back to Layers palette. Load the mask as a selection and start a Curves Adjustment Layer. In the Curves Ad-Layer, put an anchor at 128 and move it up to 140 or so. Not much wiggle is needed 'cause it is very easy to blow things out using this technique.

Now use your favorite method to copy merged and paste. Maybe even merge down if ye got the yarble for it.

Now iFFT the result. Maybe fix the transparency if that is an issue for you as it is for me.

What did we just do? We sharpened the luminosity using FFT/iFFT.

To do so, we used a very specific mask and tweak. Simple variations can yield other effects. Some of them are rather artistic when you get into putting the result back in using different blending modes. If you subdue some frequencies, you can get a watercolour effect. And, like mentioned earlier, you can target various frequencies for tweakage (high frequencies for sharpening, medium and larger frequencies for dreamy effects, and such). If you want, you can even do a funky motion blur type effect.

Why my knickers are in a bunch is in that last paragraph.

Ugh.

Meh.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 04-14-2008 11:50

http://cns-alumni.bu.edu/~slehar/fourier/fourier.html

http://www.cs.unm.edu/~brayer/vision/fourier.html

http://bigwww.epfl.ch/demo/basisfft/index.html

Be sure to play with applet in the last one (Start Demo).

(Edited by warjournal on 04-14-2008 11:51)

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana
Insane since: Aug 2000

posted posted 04-15-2008 17:41

Cool stuff, wj

.



-- not necessarily stoned... just beautiful.

kiss
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jul 2008

posted posted 07-07-2008 11:39

nice



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu