View Full Version : Using the FFT filter to remove photgraphic paper texture One problem that can come up from time to time is the need to retouch a photograph that has a heavy paper texture. On such a photograph the use of the day-to-day retouching techniques can be very difficult, as the texture gets just too mixed up in with the underlying image.
[details (http://www.retouchpro.com/tutorials/?m=show&id=185)]
This is not meant to be THE definitive tutorial on FFT. I intend to be altering this tutorial as time goes by and new ideas arise.
Comments are most welcome, and when pertinent will be incorporated into the tutorial.
Rô Gary Richardson 06-23-2005, 11:50 AM Thanks for a well written and informative tutorial. I'm sure I'm not the only one who's not totally at home with the FFT filter, and this gives a good grounding in how to use it.
Sorry, I forgot. Yes, the pictures are showing fine. Flora 06-23-2005, 12:25 PM Thanks for a great Tutorial, Rô!!!
...and YES ... all your pictures are perfectly visible in Italy as well!!! :wink: 1) If you increase the canvas size, filling with gray, by at least 100 pixels on both dimensions before doing the FFT (and doing a new crop afterwards) you can solve the "ringing at the edges" of your image. The provides some padding and cuts in half the amplitude of the step from the top to the bottom. It would be even better to fill that in with the Average of the image, but 128 gray is sufficient.
2) I must really strongly urge using a black brush with solid black in the middle of it instead of gray and especially instead of cloning. Otherwise a small amount of the pattern will remain.
3) The radius 2-3 Gaussian Blur makes me nervous. You're potentially killing a lot of real stuff.
Now, that being said, it is a GREAT TUTORIAL. Very clear and concise and usable without scaring people. Flora 06-23-2005, 01:32 PM Hi jcr6,
1) If you increase the canvas size, filling with gray, by at least 100 pixels on both dimensions before doing the FFT (and doing a new crop afterwards) you can solve the "ringing at the edges" of your image. The provides some padding and cuts in half the amplitude of the step from the top to the bottom. It would be even better to fill that in with the Average of the image, but 128 gray is sufficient.You are my HERO!!!! :bigthmb: :bigthmb: :bigthmb: The "ringing at the edges" was something I had given up on .... I think I tried every single variation, but If I wanted the blasted texture minimized I always ended up with "ringing at the edges"
2) I must really strongly urge using a black brush with solid black in the middle of it instead of gray and especially instead of cloning. Otherwise a small amount of the pattern will remain.
3) The radius 2-3 Gaussian Blur makes me nervous. You're potentially killing a lot of real stuff.Same as before .... (I'm very lazy...) Gary Richardson 06-23-2005, 02:05 PM Great tips JCR6, as Flora says, ringing was a problem I did'nt have an answer to.
Thanks. Caitlin 06-23-2005, 04:10 PM Thanks Ro! Great job - thanks for responding to the constant nagging! *lol*
Do you think it would be worth amending the introduction to say it can also be used for newspaper print, and any other righly regular pattern? I know my confusion early on with FFT is knowing WHEN I could use it. Chris,
Thanks for the great tip. I have included it (with due credit ;) ) in the tutorial.
As to the Gaussian Blur step, I have now changed it to Noise>Median (thank you Flora). It wasn't too clear, and maybe still isn't, but the "blur" is applied only to the colours, not to the luminosity that we just fixed. With the Median filter the possible problem should be even less.
Caitlin,
Well remembered! I'll fit that in somewhere.
Rô Cameraken 06-23-2005, 06:29 PM Thanks byRo for a very clear tutorial, the pictures are fine.
Jcr6 has made some excellent points again
One thing that I have learned is that as every picture is different so is every FFT.
There is a posting in the Help requested Forum at the moment called “Can this picture be saves”. If you look at the FFT of this there are no stars only lines. What I did was select the central star with a large feather then invert the selection and Gaussian blur all the line out.
The results are OK. So I suppose once you know how to do things correctly then you can bend the rules as far as you want.
Thanks for the credit byRo (that seems to be your only spelling mistake)
Ken ....So I suppose once you know how to do things correctly then you can bend the rules as far as you want.
:wink: Yep! I've even tried FFT art! Didn't get too far though.
....Thanks for the credit byRo (that seems to be your only spelling mistake)Ooops. Think I did a portuguese version. Fixed now. :bigthmb:
Rô fat0n3s 06-24-2005, 01:14 PM Great tutorial ByRo!
Can FFT be used to remove noise as well, or just repeated texture? We call that "repeated texture" of yours Pattern Noise.
You can implement a blur function, which is good at removing Random Noise with an FFT (including some filters that are much more interesting than a Gaussian Blur). That is pretty much the limit, however. There is no equivalent to a Median filter or the new Smart Blur in PSCS2.
So the answer is "Yes, but..."
...but they're not very useful except in specific cases. SteveD 06-25-2005, 09:31 PM Hello -- I am somewhat a pretty novice user of Photoshop CS2 and am interested in the FFT tutorial.
I am having difficulty, however at step 6, the Inverse Fourier Transform. I took particulat note of step 6. When I do the inverse FFT I do not get a grey scale image, I get something like the FFT but colored, no image at all.
I must be missing something. Please help.
SteveD Hi Steve, welcome to RetouchPRO :bigthmb: :bigthmb:
When you said step 6 inverse FFT, I think you meant step 7. Step 6 is just a reminder to turn the channels back on
If you are getting something coloured after the inverse FFT, then I say that you probably did the FFT again and not the IFFT. When things go wrong in the IFFT, you usually get a semi-transparent grey mess.
Try doing the FFT and then the IFFT immediately after, see if that works.
One thing that isn't (wasn't) in the tutorial is that before doing the IFFT the image must again be just one background layer.
Rô Cameraken 06-26-2005, 02:18 PM I think I know what Steve is doing
6) Select all channels again
- On the channels palette turn back on the green and blue channel (easy to forget this bit);
- If necessary, flatten the layers (<Alt><L><F>);
It is not enough to simply have the “eye” on the RGB channel as in picture 1
You must have the RGB channel Highlighted as in picture 2
Ken SteveD 06-26-2005, 02:24 PM Ro,
Thank you for responding so quickly.
I did as you suggested doing an FFT and then immediately doing the IFFT, It worked just fine.
I then decided to again go step by step thru the tutorial -- This time it all worked great; just as your tutorial indicated.
I have no idea what I was doing wrong before.
Thank you so much
SteveD SteveD 06-27-2005, 12:28 PM Cameraken
Thank you for your post.
I believe you are correct, I think I just turned on the eye.
Thank you all so much.
SteveD nebgranny 06-29-2005, 03:46 PM Well there is a lot of interest in this tutorial , I am trying it as well. I am stuck on step 5, :bawling: the spots will not change, wonder what I am doing wrong. I am new to using photoshop but you just click on brush and make sure black is selected and then brush over the marks with it right? NEB Neb, let's try a few things....
- Are you seeing something like the image in step 4 - a grey noisy background with a few white stars?
- Did you leave on ONLY the Red channel in the Channel Palette?
- Is the opacity of the brush high (not 0, at least)?
- Do you have a selection active?
- Is the blending of the brush set to normal?
- If this doesn't help, then you could open another (Non-FFT) image and see if you can paint on that. Then, at least, you'll know if the problem is in the brush or the image.
Any luck now?
Rô nebgranny 06-29-2005, 04:34 PM Looking good now, had to set opacity up and mode to normal, everything else ok. Going on to next step now. Thanks Ro Neb :rainbow: Cameraken 07-01-2005, 06:30 PM Looks like your Tutorial is spreading
http://photoshoptechniques.com/main/defaulth.php
Ken Looks like your Tutorial is spreadingSorry, Ken, I normally don't like correcting other people's english, but the "y" shouldn't be there....
:happy: :happy: Looks like our Tutorial is spreading :happy: :happy:
Thanks to stroker it seems. :bigthmb:
Rô hi
this looks like a great trick - I want to try it.
have followed your instructions on down;oading the fft and winrar, tried to extract relevant files to filters folder, but nothing is showing up in my filters drop down list.
photoshop help says it might be in imports or exports, but I don't see it there either. Do I need to restart?
I am working on photoshop 7 on pc. Is that a problem?
thanks for your time.
karin berwin 07-13-2005, 09:43 AM Close PhotoShop!
Quote:
Copy files *.8bf from bin folder to "Plugins" folder. Such as :
"C:\Program Files\Adobe\Photoshop 7.0\Plug-Ins".
Open PhotoShop.
It's now in Filter>Fourier Transform. There is a new version of this magical FFT Filter online.
Any changes in the tutorial neccesary or recommendation for the new filter ?
mfG. scsi There is a new version of this magical FFT Filter online.
Hi, scsi,
If by "new version" you mean the April 2005 verison of the Alex Chirakov filter, then this is the one used in the tutorial.
The "old" version coded the FFT information into Hue / Saturation / Brightness and needed the RGB->HSB filter before and after the star painting.
If, however there is another "new version" please post us a link.
All the best,
Rô Hi Ro,
thank you for the info. I just want to get certain that I didn't something wrong. I used this filter the very first time two days ago along with yor real great tutorial. It seems that I did everything ok, but I had to duplicate the luminance layer twice to get a stronger effect. After that i had to go with some tweaking with curves due to the misti look of the final image. But now it looks ok for me...
mfG. scsi Thanks for the tutorial, and making me aware that this existed!!
I've spent hours getting texture out.
Flora may not remember but we corresponded on it's removal 3+ yrs. ago.
:-( I run on Mac so can't play with this.
You reference commercial products. What are they? deadants 08-17-2005, 09:59 PM I'm using a mac as well and have googled all over looking for a plugin. So far no luck.
I have borrowed my brothers PC laptop and installed the filters, I tried the FFT RGB and imeadiatly did the IFFT RGB but the image came out transparent. Any suggestions? deadants 08-18-2005, 12:53 AM OK, something weird going on. I tried it on a photo taken from a newspaper that was scanned in RGB mode and it worked flawlessly. I have been working on another photo that was scanned in greyscale, which I changed in Photoshop to RGB mode and after I finished painting the stars turned the channels on and doing the IFFT RGB the photo is transparent.
The file I’m working on that is giving me greif is here. http://www.rootschat.com/forum/index.php?action=dlattach;topic=81659.0;id=7099;image Flora 08-18-2005, 12:55 AM I'm using a mac as well and have googled all over looking for a plugin. So far no luck.
I have borrowed my brothers PC laptop and installed the filters, I tried the FFT RGB and imeadiatly did the IFFT RGB but the image came out transparent. Any suggestions?
Hi deadants,
what I think happened is that you run FFT on a Layer instead of a flattend image ... deadants 08-18-2005, 01:02 AM No I definatly had only one Layer. I even did step 1, duplicate the image. It's a strage one :dizzy: IFFT is real choosy and doesn't respond to anything but the most basic of images. Besides not allowing layers, you also cannot have any masking or alpha channels and your (one) layer must be "Background" (Flatten the layer <alt><L><F>).
If this doesn't help, another tip is to keep checking the IFFT from time to time instead of waiting till the end. If it's OK then just undo (<ctrl><z>) and continue fixing the FFT image.
Hope this helps,
Rô Cameraken 08-18-2005, 12:10 PM Hi Wils and deadants
There IS a mac version.
It’s called ImageJ
Image J is part of The Image Processing Toolkit
Available Here for Free
http://rsb.info.nih.gov/ij/download.html
ImageJ runs on Linux, Mac OS 9, Mac OS X and Windows
The Docs are here
http://rsb.info.nih.gov/ij/docs/
And the bit about FFT is here
http://rsb.info.nih.gov/ij/docs/menus/process.html#fft
It is Not a plugin but a complete program. You will need Java Installed.
Deadants
I have also had a similar problem with the image going transparent. I found it was because I went too close to the cross and the centre star. Do as Byro suggests and keep going back to check your results and saving them.
Ken deadants 08-18-2005, 07:00 PM Hi Guys,
I did all of the suggested steps but it just kept going transparent, so what I did was create a new background layer and filled with black, then placed the transparent layer over it. That seems to have solved the problem.
I have tried imajeJ but It works a bit differently I found after much trial and error that you have to completely erase the centre star. I wonder if someone else with a Mac could confirm what I'm doing. You can see the attached image has on the left the original halftone image, the centre is the FFT and the right is the IFFT. I know it doesn't look to good but if I erase the outer stars and leave the centre star untouched the image turns black. Cameraken 08-18-2005, 07:37 PM Hi deadants
I have ImageJ installed and I can probably help but this is probably not the correct thread to do this in.
You can start a new thread in the help section or We can continue in the thread that started this tutorial Here
http://www.retouchpro.com/forums/showthread.php?t=10660
Ken deadants 08-18-2005, 07:44 PM OK Ken, New thread coming up. june` 10-09-2005, 02:42 PM I am scanning fine art pictures and have tried this tut. I am still picking up the canvas texture from the picture I have scanned. Is there any way to remedy this?
Thanks,
June Cameraken 10-09-2005, 06:40 PM Hi June. Welcome to RetouchPro.
FFT works on a uniform pattern of texture. If you are working on canvas originals then the canvas may be stretched and then the pattern is no longer uniform
If this is the case then you could try splitting your picture into sections and using FFT on each section.
If your fine art pictures are not on canvas then post your results and we will try to help.
Ken june` 10-10-2005, 08:30 AM i am trying to use this filter. At step two, the entire image goes black?
Any help will be appreciated.
Thanks, Cameraken 10-10-2005, 01:57 PM Hi June.
2) Flatten all Layers
You may not need this but, for precaution, flatten all the layers...<alt><L>, <F>. This is because FFT doesn’t understand layers, masks, alpha channels etc. The image must be just one “Background” layer and nothing else;
Byro included this step to make sure you only have one layer as FFT will not work on Layers. This should not make your image black
Try using the mouse instead of the shortcut. Layer > Flatten Image.
If Flatten Image is greyed out then skip this step and move to step3
Ken june` 10-10-2005, 08:00 PM I checked that. Tell me, is there a limitation on the size of the file the filter will work on?
Thanks again,
June Cameraken 10-12-2005, 01:14 PM There is nothing in the code to limit file size. However I suspect that FFT could be memory intensive so file size will be limited by your computers memory and disk space.
This will not affect the quality of the results. It will just slow down the conversion.
Ken ebbtide 10-17-2005, 12:56 PM Hi,
WOW what a great time saver, thanks Ro. One question. 99% of my work has been on gray images so I'm not familiar with a lot of the color operations. In trying an RGB and getting to your Step 8 (Put the colours back in) you state "Slide, with ......". My question is Slide what? Where does this luminosity layer come from? Its not listed in the channels or layer list.
Thanks for bearing with my ignorance, ebbtide Glad you found this useful.
The FFT process works only on the luminosity (greyscale) of the image.
So, what we want to do in this step is to mix the colour information of the original with our "clean" luminosity.
This could be done by copying (<ctrl><C>) the new luminosity image and pasting (<ctrl><V>) on top of the original.
The "slide" method is just a short-cut. Details......
- You need to have the "luminosity" image active, but also have visible some part of the original image.
- On the layers palette, select the layer of the "luminosity" image.
- You can now drag this layer from the layers palette onto the visible part of the original image.
- Now you have a new luminosity (greyscale) layer on top of the old colour information.
Only it will be in the wrong place! Which is why you'll remember to press <Shift> while dragging, which aligns the layer correctly.
Yeah, I know - the short-cut looks longer than the original. On paper, yes. In practice, no.
Rô Panpan 10-17-2005, 03:26 PM 2) Flatten all Layers
You may not need this but, for precaution, flatten all the layers...<alt><L>, <F>. This is because FFT doesn’t understand layers, masks, alpha channels etc. The image must be just one “Background” layer and nothing else;This is not correct. Just put a black layer behind the fft layer.
Pierre ebbtide 10-17-2005, 06:08 PM Ro, I followed your additional instruction and got two gray scale images but all was OK once I realized that the color didn't return until the luminosity blending was selected, then everything was ok.
Because the FFT is a symmetric math function made of cosines you only need to paint out the stars on either the left side to the vertical axis or from the right side of the image. Saving a little painting time if you have a lot of unwanted frequencies in your image. Thanks for the instant help Ro ! Because the FFT is a symmetric math function made of cosines you only need to paint out the stars on either the left side to the vertical axis or from the right side of the image.....
Are you sure about that?
I can understand the logic, but it seems strange that 50% (or maybe 75%) of the information is just waste.
Also, if I paint just one side how is the IFFT function going to know which side it should consider, original or painted?
It would be nice if it was true, but I think it's unlikely.
Rô Cameraken 10-18-2005, 05:14 AM Pierre
I went to http://www.pages.drexel.edu/~avc25/archive.htm#FFT to try to find some more information. But is sadly lacking and does not say if a picture can be on layers.
However I did do some tests.
When you run FFT on a layer then the texture from only that layer is removed and the image comes back transparent (hence the black layer required) but this gives darker results than working from a flattened picture.
I can’t understand why you would want to work on a layer as texture removal should be the first step in the workflow
My Quote was not my words but an extract of step 2 in the tutorial and I think it is a sensible precaution and should be left as it is.
Ebbtide
I also tried your method and still had texture in the picture
Ken ebbtide 10-18-2005, 04:06 PM Yea, I shot too fast on saying you could only do half the symmetric star pattern. I scanned a newspaper picture and did my grand experiment. Painting out half worked as well as painting all. But on retrospect I guess it was because it was such a bad image I couldn't see the difference. On trying a high quality image with interference in it, you do definitely need to paint out all stars. Sorry for the fire drill guys. Here's what I've found about the FFT:
Each quadrant is a stretched copy with a 90*x degree rotation about the center of the image. If you don't believe me, run the FFT on a square image with even-numbered dimensions and then duplicate one quadrant into the remaining three with the difference blending mode. You'll get perfect black.
Here's what I've done to improve the process:
1. Copy the noisy document to a new document & flatten.
2. Increase canvas size by 400px on X & Y with 50% gray background color.
3. Run the FFT RGB filter.
4. Copy the Red channel to a new layer.
5. Make a new layer.
6. Knock out the white stars with a black star brush (http://www.osysi.net/files/fft/fft_brush.zip) on the top part of the image.
7. Duplicate the layer with the black stars.
8. Make a new temp layer and just dump whatever color into it.
9. Link the duplicate and the dump layers.
10. Rotate the dump layer 180 deg.
11. unlink & delete the dump layer.
12. link the two star layers & the copied red channel & CTRL-E to merge linked.
13. Copy all. Hide the layer. paste into the red channel with the background selected. Delete that extra layer or just flatten.
14. Run the IFFT filter.
15. Copy & paste some of the "striping" that's in the grey area, (usually it's vertical) stretch it over the whole canvas, and invert & set to hard light 50%. I'm not sure why it shows up in the first place.
16. Crop off the extra 400px & slap the grey image onto the original. Run median on the color part. Woo. Done. :bigthmb:
Now then, what I havn't been able to figure out when enough is enough. At what point do i say "This star is too small. if I knock it out with black then I'll just get a big cloudy mess." I have a feeling that I should be using grey to knock out stars sometimes instead of black -- like when they get really close to the center. Sometimes it seems like being quick and dirty about knocking out stars is better than being maticulous.
[For example (http://www.osysi.net/files/fft/fft_omg.png)], This picture turned out fine, but sometimes I get cloudy mess all over the place.
[MINI FFT TUTORIAL (http://www.osysi.net/files/fft/tutorial.png)] Hi there, Bmud. Welcome to RetouchPRO :bigthmb:
Thank you for a very interesting post.
- As I see it each quadrant would be a mirrored copy, and not a rotated copy. Other than that, yes agreed :happy: .
- Are you sure you posted the right brush? I had imagined something star-shaped (which would be a great idea) but what came out was an "alphabet" brush. :confused:
- In your "example" picture, I think you've painted out way too many stars. If you are trying to eliminate paper texture, then only the larger stars of the central diamond need painting. If you follow the repetitive pattern of these stars you'll find a few other less obvious stars that may still produce unwanted texture (see attachment). The other small stars may be due to some element of the actual image, or the effect of the 400 pixel border that you added - and should be left alone;
- The striping trick is quite neat, I'll have to try that out. As to why it happens - my theory would be that when we replaced the stars with black holes we threw away some information that would be needed at the edges;
- I too have the feeling that some sort of an average grey would be better than just pure black. When I defended this I got shot down by the theorists, but I haven't given up yet.
- As to when is enough. The important stars, due to the paper texture form a regular pattern around the centre. These are the only one's you need to paint - but be sure to get them all. If you are getting close to centre, then you're probably knocking out something important from the image and not unwanted paper texture.
Hope to hear more from you,
Rô I fixed the FFT Brush download. Thanks for the tip. I'm probably going to save a bunch of time now.
The behavior seems to vary, but no doubt the images are completely identical when the top is rotated 180 degrees and brought to the bottom. Fun (1) things to do with the FFT.....
- Do a big radial blur from the centre - makes an "arty" halo effect;
- Double the size (centre and crop) of the Red channel. As I remember (can't check now) you get 4, quarter-sized, almost identical versions.
Rô
(1) Some people, like me, have a wierd definition of "fun" Caitlin 11-23-2005, 01:54 PM - In your "example" picture, I think you've painted out way too many stars. If you are trying to eliminate paper texture, then only the larger stars of the central diamond need painting. If you follow the repetitive pattern of these stars you'll find a few other less obvious stars that may still produce unwanted texture (see attachment). The other small stars may be due to some element of the actual image, or the effect of the 400 pixel border that you added - and should be left alone;
RôOh! I was unaware of this, I've been painting out everything but the central large star. It's not what you have in the tut though? ..... It's not what you have in the tut though? :blush: :blush: Oops, you're quite right. I'll have to fix that.
Rô Basically, if you increase your canvas by 400px, then any star that's 400px away from the edge (or less) can be ignored. That alone has saved me a bunch of time.
I like the Radial Zoom effect! That'll come in handy the next time I need to make something dirty-looking :D
Check this out, a moire nightmare... I've tried FFT on this, but the dot pattern is really big compared to the whole image (I think)
www.osysi.net/files/fft/fft_nightmare.png Panpan 11-25-2005, 12:55 PM There were certainly a lot of stars in the fft!
For color, I blurred the a and b channels in LAB mode. After the fft, I ran eat Image, corrected and sharpened, then ran Neat Image again. I thought I would get rid of the remaining pattern by running the fft again, but there were no stars left to blacken :sad: .
Pierre Bmud, you're sure bringing up some interesting points here.....
1) Moire - For me, at least, moire patterns are caused by the interference of two high frequencies resulting in a new perceived low frequency. The "dot Pattern" on the picture you posted probably has another name (which I don't remember now).
2) Texture x Colour - For the images we've been considering in the tutorial the superimposed pattern was due to physical texture ridges of the paper on which the photograph was printed. In your image the pattern is not superimposed, rather each colour has a patterned disposition.
What this means is that when we do the FFT process it is not enough just to consider the luminosity, you should process each channel separately (see attachment)
3) I downloaded your FFT brush again, and got an alphabet again - maybe I'm doing something wrong. Anyway, based on (what I believe was) your idea, I made my own (see zip attachment). Actually it makes star painting easier because you can line just up the horizontal and vertical line and hit the star right on.
Rô bart_hickman 11-27-2005, 03:10 AM I took what Pierre did and ran the jpeg artifact remover in PSPX. That's the (1st attachment). Followed that with the PSP NR tool (2nd attachment)
Bart bart_hickman 11-27-2005, 03:35 AM BTW, your remaining pattern is manifesting itself as stars along the center axis. The attachement shows the red channel with the contrast enhanced and black marks showing where they were. I'd try smaller dots for actually removing the stars to minimize information loss--I used big dots just to illustrate. The pattern may look different on a full resolution image (I'll check it out tomorrow)--this reduced size image has probably created aliasing.
Bart garazon 11-27-2005, 05:31 PM Great tutorial Rô! Thanks, I have a few scans I'd just about given up on but now I've got the perfect tool to get them done. I've been playing for the last few days with this thing and it's amazing how much info is stored in just the cental part of the red and green channels. Been toying with manipulating parts of the green channel and was able to increase the contrast/clarity in some images also! (but only very slightly so far, if I get it down to something useful, I'll post back)
Also wanted to share a couple of brushes for PSP 8,9 or X users who might want them so they're attached here.
Thanks again for the tut. Glad I found RetouchPro 1. Sorry about the confusion surrounding the fft brush (http://www.osysi.net/files/fft/fft_brush.zip). I fixed the file. (finally)
2. Thanks for all the attempts to figure out the circle pattern. We've been using FFT in the way that you suggested in the tutorial for all images where a 150dpi was acceptable because they were full pages. It still worked after a small median filter. In the case of the image I posted on page 4, the image was so small to begin with, well, you get the idea.
3. Now I'm curious how well the FFT would do at de-interlacing. Probably poor. It most certainly did NOT work when I tried to get some blockiness out of bloating an image to 150%. Just a huge grid of stars. :scared: Cameraken 11-28-2005, 07:16 PM Great Discussion Here, Thanks Rô, BMud and Bart.
It’s not surprising that there is a lot of confusion with this filter.
When you go to
http://www.pages.drexel.edu/~avc25/archive.htm#FFT
There are two filters available for download.
2D Fast Fourier Transform plugin for Adobe
There are two versions
The top one
Download new version of FFT/IFFT Photoshop plugin - 235Kb (April 2005)
This is the HSL version
The bottom one
Download RGB version of FFT/IFFT Photoshop plugin - 156Kb (April 2005) (Red and Green channels are used instead of Hue and Light to store complex phase and amplitude information)
This is the RGB version which Rô’s tutorial is written for.
All the discussion in the forum regarding FFT prior to mid 2005 relates to the HSL version. Discussion after mid 2005 relates to the RGB version
Very often we have tried to make the distinction by calling the new version FFT-RGB
Ken bart_hickman 11-30-2005, 06:05 PM I'm using PSP which doesn't have the RGB channel palette mode found in PS, so I have to use a script that breaks the FFT into it's RGB components in a manner that mimicks the PS channel palette. I was wondering how other PSP users are doing it.
Bart garazon 12-01-2005, 03:53 AM Hi Bart
Using PSP9 here, and the only way I've found to do it is to split the FFt image into RGB channels, then when done editing, recombine the channels, run IFFT on it, copy and paste as new layer over the original. Setting blend mode to Luminance. Btw, I use Luminance (legacy) mode rather than plain Luminance, looks a bit better to me. It's a couple of extra steps more than what PS appears to use , but not a major thing. I can't see any other way to do it. If you know of something else, please pass it on. :thumbsup:
Unrelated to PSP: In regards to using FFT, I was reading up on it's applications somewhere (might have been the Aragon Systems site, I'll have to look it up), I noticed all the examples they and other places used of any application to image manipulation were done on square images, and specfically where the dimensions are multiples of 32 (32, 64, 128, 256.......) and having tried it on a couple of images I can see a slight difference when the FFT technique is applied to a square image. Every little bit helps! I didn't recall seeing this discussed previously, so apologies if it has been. ........square images, and specfically where the dimensions are multiples of 32 (32, 64, 128, 256.......) ........ I didn't recall seeing this discussed previously, so apologies if it has been.
No need to aplogize! Yes, we did discuss the subject. You might find the "golfball thread" (http://www.retouchpro.com/forums/showthread.php?t=10660) very interesting.
There, thanks to some great input form Chris (of Reindeergraphics), we went into a few more details of FFT.
The FFT plug-in that we're using here (Alex Chirakov) is easy to use and free. However there is a price - it is less than perfect.
A perfect FFT tool, such as supplied by Reindeergraphics, will work on square, multiples of 2 and the conversion process will not introduce any new noise.
With the Chirakov version there is some noise, BUT seeing as we're usually working with less than pristine images the new noise has un-noticable effects.
Rô garazon 12-02-2005, 06:00 AM Thanks Rô
I read the thread with great interest, and it answered a lot of questions I had. Also followed chris' link to optipix and downloaded the free custom filter, looks intriguing also. This will all prove to be invaluable when it comes to cleaning up a lot of scans I have made where a paper texture needs to be remove. Results have been remarkable so far
Thanks again!
Chester Using the FFT process has become (even :eek: ) easier!!
Our friend, Stefan has put together an action for the FFT process (7.0 and CS2 tested) which can be found together with the "how to do.." at his site here (http://www.skeller.ch/ps/fft_action.php).
Now with Stefan's action and Bmud's star brush we've got ourselves a pretty good toolkit for removing paper texture from scanned photos.
Rô Greetings once again. I've been noticing every once in a while that images I run the FFT on have completely black red channels. This was a mystery to me until today.
Apparently the plugin doesn't like images over a certain size. I've been trying to pinpoint the behavior as to reverse engineer some sizing rules or to make a proper bug report, but FFT i so slow while I'm at work that I'm having no luck even with a binary method. Just losing lots of time on the clock. :D It might also be a RAM problem.
Somewhere around the thus far, i've gotten..
bigger than 2662x2991
smaller than 2862x3191
I'm guessing that this means that 1024*3 = 3072 is the magic number. I'll do some more tests at home with my dual core and 2gb of RAM and see if I get similar results. I've got a 512 stick here. Guess what. Let's say you're like me and you just scanned a 1x2 inch image at 1200dpi and the moire/patterns are ridiculous. After the FFTRGB filter there are too many stars to count, and the significant patterns are difficult to pick up. Good news. There's a handy guide right under your nose to finding the right stars, the "Key Stars" as I call 'em.
Look at your green channel at 50% zoom.
We've been talking a lot about the red channel but not much about the green one. Turns out that dropping a black star where you see a "cup lid straw hole" is right where you need to be. Use you imagination and discretion to figure out if you need to repeat those stars out further by eyeballing the distance to the main star's center or cardinal axis depending on the behavior of your pattern.
Just stay away from putting black on either axis of the main star without being really accurate with your clicking -- it's what creates that crazy black smoke.
By the way, if you're using my star brush make sure that the Flow is set to 100%. I think I have it saved in the preset as 50% which will mess things up. I'd appreciate if someone let me know if it's OK straight out of the cereal box. Cameraken 12-19-2005, 12:46 PM Hi Bmud.
I could be wrong here but I don’t think you can save the brush opacity or Flow. When I load your FFT brush the opacity stays as it was previously set. I think this happens with all brushes so I don’t think you can save the Opacity/Flow.
Some interesting ideas there could you post an example of a "cup lid straw hole"
By the way, have you seen this thread?
http://www.retouchpro.com/forums/showthread.php?t=9975&highlight=Removing+stripes+ugly
There are only 2 stars but they are on the axis. I guess that’s what you mean by Black Smoke.
Ken This post is just to let you know that I've recieved everyone's comments about my posts being hard to follow. I'm spell checking and revising and attaching screenshots riiiiight nooow. :bigthmb: bart_hickman 12-23-2005, 06:09 PM This might have been mentioned before, but in the interest of completeness, I thought I would mention that making sure the texture aligns perfectly in the horizontal/vertical directions will simplify the spur pattern and thus improve the final result. That means if you have texture pattern that is somehow at an angle with respect to the photo, it will ease the job if you either rotate the photo in the scanner or rotate it in Paintshop/Photoshop prior to doing the Fourier transform.
I've occasionally seen texture that was slightly non-linear. In that case, see if you can warp the photo to make the pattern as linear as possible prior to the FFT. Then remove the spurs. Then undo the warping on the cleaned photo. If the warping is too severe, then the trick of scanning twice at 0 and 180 degrees might be to only option.
Bart I've searched for a while for something that would remove the moire (or halftone dot) pattern that is found in magazine prints. I think this has a lot of potential. One complaint that I have is that it's not able to handle a 600 dpi scanned image (at least not a full page). Another is the added "noise" that comes with it. I've been considering buying one of the commercial versions, but can anyone tell me if it can handle larger images?
I think a giant leap forward would be if it were automated. Sure, there's a script, but that is only part of it. I'd like to apply filter and process complete. I wouldn't hesitate to pay for a commercial version if this were the case.
Nice site, and thanks for the help. :) bart_hickman 12-27-2005, 07:35 PM Seems like just using the median filter (bare minimum needed to soften the pattern), followed by a good NR tool (Neat Image, Paintshop Pro, etc...) seems to work pretty well for that. Sometimes those magazine patterns are very irregular--the FFT will have a ton of harmonics and thus be time-consuming.
Bart I found today that FFT really is just fine the original way we were doing it with the FFT and median filter. I split a 600dpi image up today and did the CMYK channels seperately only to find that it comes out more harsh and messes up the colors -- so I had to use a median layer to correct color anyway.
Maybe the trick to getting color halftone removal to look better is redesigning a brush with a linear gradient to help with the circles of different sizes.
I agree though. this i all very fascinating, but I'm about fed up with the work involved. A full blown pattern removal filter would be nice.
If this discussion got any more technical we'd have enough to figure it out ourselves :P Seems like just using the median filter (bare minimum needed to soften the pattern), followed by a good NR tool (Neat Image, Paintshop Pro, etc...) seems to work pretty well for that. Sometimes those magazine patterns are very irregular--the FFT will have a ton of harmonics and thus be time-consuming.
Bart
I've been doing the median filter/noise reduction for a while and it's pretty good. As well as scanning at 600 dpi and reducing to 300 dpi. but I'm always on the look out for something better. :) More recently, with pictures that are big enough, I've just been running the despeckle filter to kill halftone patterns. :o: not a big fan of despeckle myself, but the new noise reduction filter in psp X has a lot of potential. A friend of mine swears by it to remove the regular pattern without harming the detail. I can't match the results yet unfortunately, but I'm still playing around with it.
Anyway, didn't mean to get this subject off topic. I'm still interested in an automated fft filter such as this. I set up a script is psp that uses the poster filter (set to 4) and then the threshold filter (set to 152) to seperate the brighter stars from the darker background. cut out the center, then color it gray, overlay it to a copy of the fft image and use ifft. the results work and are pretty quick, but it could be very much improved. I left out a lot of details, but it was just something I was toying with. bart_hickman 01-04-2006, 08:29 PM Here's a handy script I use to split the active layer into RGB components so I can edit them directly. For the FFT, you can paint on the red layer. When you're done, just merge the group and you're ready for the IFFT. The colors are put into groups so it's very easy to quickly add a curve to the red channel to make the stars more vivid while you erase them. Just delete or turn off the added layers prior to merging the RGB group.
In PSPX, it can run in the restricted folder. It won't run in PSP9 or earlier yet--I have that on my to-do list.
http://home.comcast.net/~zumbari/Scripts/SplitLayerRGBtoGroupRGB.PspScript
Bart I just recently found the magic of the new Reduce Noise filter circa Photoshop CS2. I havn't run FFT in quite a while. :blush: bart_hickman 01-23-2006, 11:43 PM Hi Klassy,
Is there a chance you used the wrong FFT? There are two FFT plugins--you want to use the RGB FFT. Which image did you do the FFT on? Can you post the result of the FFT?
Bart bart_hickman 01-24-2006, 04:28 PM Your attached image is too small for me to see the texture. Could you post either a larger size or a link to the original?
Bart bart_hickman 01-24-2006, 10:56 PM The FFT technique works on pattern noise. Pattern noise is concentrated at a few discrete frequencies so when you do a Fourier transform on the image, the pattern noise shows up as a star pattern--the stars are the frequency-domain representation of the noise. (The technical term for noise like this is spurious noise and the stars are called spurs.)
In the image you attached, it looks like a combination of aliasing (due to image size reduction) and jpeg compression has caused the pattern noise to be converted into essentially random noise and thus no longer removable with the FFT.
If you have textured photos, you want to be sure to scan at a high enough resolution to not just capture the image details, but capture the details of the texture as well.
Bart videosean 01-28-2006, 01:05 PM Apparently the plugin doesn't like images over a certain size. I've been trying to pinpoint the behavior as to reverse engineer some sizing rules or to make a proper bug report, but FFT i so slow while I'm at work that I'm having no luck even with a binary method. Just losing lots of time on the clock. :D It might also be a RAM problem.
Somewhere around the thus far, i've gotten..
bigger than 2662x2991
smaller than 2862x3191
I'm guessing that this means that 1024*3 = 3072 is the magic number. I'll do some more tests at home with my dual core and 2gb of RAM and see if I get similar results. I've got a 512 stick here.
Your post is getting close to what my problem has been I think. I have a scanned image that is 2878x3996 and I get a Red channel that is nothing but black (flat, 0 grey value) after running FFT-RGB and a Green channel with alot of noise and a cross pattern but no stars and the Blue channel is a flat 128 grey value.
I resized my image so that it was 2253 x 3072 (using your 3072 as the largest dimension - I had also added a 50% grey border before downsizing as per other user tips in this thread) and got the results I was expecting... stars and whatnot :) For a free filter I guess this is acceptable. The texture I'm trying to remove is a fairly typical mid to late 1970's matte paper surface from a portrait studio. The color in the image is completely faded/shifted to red/orange and there isn't any kind of watermark on the back of the print nor a studio's name on the front.
edit - because I'm lazy, I used the magic wand to select all the stars for fixing.
1. Magic wand tolerance = 8, uncheck contiguous, click in the middle of a star to select the brightest point.
2. Use the lasso tool, deselect all the areas you don't wish to correct - the large cross, for example, I deselected as well as a few small points that didn't look like stars.
3. Select -> modify -> expand by 5 pixels
4. Image -> Adjust -> Brightness/Contrast, I just reduced the contrast all the way down and the made a slight adjustment to the brightness so it looked like it matched.
This image has been a personal project that I've left sitting on my HD (it's been maybe 2 years since I scanned this image LOL) waiting for the day I found a good way to kill the paper's texture. Thanks RetouchPro and Alex :bigthmb: sattva 02-20-2006, 01:55 PM I've searched for a while for something that would remove the moire (or halftone dot) pattern that is found in magazine prints. ... I'd like to apply filter and process complete. I wouldn't hesitate to pay for a commercial version if this were the case.
Taco,
There are a special Descreen filter to eliminate the halftone dots (the screen) and prevent the moire pattern:
http://www.descreen.net/eng/soft/descreen/descreen.htm
This plug-in employs the FFT.
Attachments:
1) The original image.
2) The same image after screen removing. You may see the prominent halftone moire pattern.
3) The same image after screen removing and moire reducing. chiko321 10-04-2007, 02:46 AM I had come across another technique to remove the texture if you are having trouble getting software to work. It is quite simple. If you think of the texture that you see as a result of shadows and highlights on what is basically glossy paper, all you need to do is 1 of 2 things. Get a scanner that has dual bulbs, that is to say, one before and after the scanning head. If you can't find a scanner with dual bulbs, you can also do a neat trick by scanning the photo upright and then scanning the photo again (precisely 180 degrees) and scanning the "shadows and highlights" in reverse. Once the 2nd scan is rotated upright and aligned to the first scan at 50% transparency, pretty much all of the texture can be eliminated. This works best if your scanner head does not have any problems with variable skewing, otherwise you'll be "fudging" and stretching different zones of the photo to blend well with the first scan. In the meantime i'll definitely be looking into this other app as time allows! It could be a great timesaver! Especially if you know how to create actions or JSX scripts for CS3! oppor2nity 10-08-2007, 12:59 AM First of all, thanks for posting this tutorial, as it seemed to be the solution to my current problem, and most likely will be. Alas, right now I cannot make this work.
No matter how I try, I can't achieve the final result as shown in the tutorial.
I'm starting out with an RGB8 scan which is yellow-ish as has a heavy embossed dot pattern all over the image. I have also tried desaturating this first, but that hasn't changed anything.
I copy, apply FFT, select the red channel only, see the stars and paint them out. I apply IFFT and end up with an image in which the pattern seems to be not gone, but more like cancelled out. The problem is, it resembles a negative. I drag that over the original and change the blending mode to Luminosity, but no colour can be seen through the greyish layer.
Where am I going wrong?
Cheers,
/Ulf chillin 10-08-2007, 01:58 AM You could use ImageJ instead. It requires less steps. oppor2nity 10-08-2007, 06:53 AM Thanks, but now I'm even more confused.
Would you please be able to tell me how you produced the great result you posted? I'm usually proficient with similar things and don't give up easily, but with ImageJ I have no idea where to start.
I can only find references to before-and-after comparisons, no clues as how to actually perform the actions.
I tried based on my experience with the FFt in Photoshop, but all I ended up with was one window with the original image, and after applying FFT one window with the little stars. I was unable to make the brush work, so drew squares and filled them - with black as I can't find how to change the fill colour.
When the main stars are covered, I invert the FFT and this results in a window all filled with black. I could copy and paste this into the original image window, but this only gave me another window filled with black.
And how did you figure out how to perform this procedure?
Cheers,
/Ulf chillin 10-08-2007, 07:42 AM In imageJ:
1. Open file
2. Go to Process>FFT>FFT Options
3. Check Complex Fourier Transform
4. Click OK
5. Next: Process>FFT>FFT
6. Cover the stars with the brush tool
7. Process>FFT>inverse FFT
8. Save
Done
Following byRos method (http://retouchpro.com/tutorials/?m=show&id=185) you will get the same results. oppor2nity 10-08-2007, 07:41 PM Thanks, I tried it again while waiting for a reply and for some reason, even though I did exactly the same as before, I got a completely different result; albeit a so-so one. Then ImageJ stopped working as it couldn't "Create the Java Virtual Machine". I uninstalled and re-installed to no avail. Uninstalled all Java components, reinstalled Java, then ImageJ. Works fine now. Tried your workflow (the "Complex" checkbox did it) and got a sequence of good results, by creating an inverse FFT, then painting some more, then creating another inverse FFT, etc.
Thanks for all your help.
/Ulf Michele_Verona 10-10-2007, 01:06 AM Very nice forum, I'm an italian reader and your english is simple and easily understanded from me :-)
Regards,
Michele spasquini 02-26-2008, 02:39 AM I wrote an italian version of this tutorial, but using the patch tool, instead of a grey brush, on the whit dots, and I think that the result is better. Try it.
http://www.psdrevolution.it/forum/index.php?showtopic=31545
I added also a link back to here, as credits. JenRS 04-15-2008, 09:33 AM I was so excited to see this tutorial and find out after years of frustration that there is a solution to that awful texture problem on some photographs.
I was all set to download the filter and give it a try.....except that link does not work anymore, the page does not exist. :o(
Can you please post an updated link to the file? Thank you!
Jennie I've been looking around for an alternative.
The best I've found so far is from Kamlex.
(not sure, but it seems that it has the same size limit of 3000 pixels)
Just do a search on the Web "Kamlex FFT" :bigthmb:
Rô JenRS 04-15-2008, 11:04 AM Thanks for the quick reply and the info. I downloaded it from www.kamlex.com and am looking forward to trying it out!!!
Thanks again!
Jennie 0lBaldy 04-15-2008, 11:59 AM ????
Are the FFTs found at:
http://www.skeller.ch/ps/fft_action.php
or
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/getit.htm
any different than the one at:
www.kamlex.com
???? ...any different?
The two links you posted lead to copies of the Alex Chirokov plug-in.
Thanks. :bigthmb:
I just reasoned that it would be better to point to an active (equivalent) filter-maker than to one who has "retired" his page.
I can't testify as to what's inside the filters.
They seem to work equally (haven't compared them yet. The Kamlex filter needs the .NET framework and I didn't have it here at home).
Rô secretagents 05-27-2008, 08:50 PM Hi guys, did this in the Gimp as follows :
Applied FFT filter on the image (no layers), used the blur brush on the white dots and then applied the Inverse FFT filter. Not bad and rather straightforward isnt'it ? Joe Townsend 06-17-2008, 05:36 PM Please tell us which FFT flter you use. Kamlex or another?
I'm editing my original post to add more info and questions.
I have found that none of the links for the Alex Chirokov plug-in work. I have instilled the Kamlex FFT plug in and their RGB>HSL plug in. I have tried to view the Kamlex video using Win Med Player 9*. Video does not run well, no audio, poor color and contrast. Stepped through video frame by frame to come up with this step by step procedure:
1. Duplicate image in Photoshop: Image> Duplicte
2. Filter> Fourier Transform>FFT
3. Select green Channel only
4. Paint over 4 points around center star with black, size 10 (I used 20), normal, 100% flow
5. Select RGB, all channels
6. Filter> Fourier Transform> IFFT
7. Filter>Color space>RGB to HSL
8. Select Blue Channel only
9. Select All
10. Edit copy
11. Select original image
12. Filter>Color space>RGB to HSL
13. Select Blue Channel
14. Edit>Paste
15. Select RGB Channels
16. Filter>Color space>HSL to RGB
17. Deselect
Result is an improvement but not complete success. Applied Neat Image with little improvement. Images attached are parts of the 8x10 photo of historic aircraft. First shows heavy pattern from paper texture; 2nd shows improvement, with pattern gone around edges, but still in center. Would like to avoid using Gaussian Blur.
Suggestions? Did I get the procedure correctly off the video? I see nothing on a Luminosity layer as in the tutorial.
*Using Photoshop CS3, running on an Intel PC with Win XPP, SP2. .NET2 SP 1 installed. jhumur 06-20-2008, 12:40 AM Hi, many of my stars have prominent flares in the horizontal and vertical axes. Should I paint over the flares? Darkhorse 06-20-2008, 03:49 PM Joe,
This type of paper texture is realllllllyy hard to eliminate with retouching. I'll bet you'll have better luck playing with lighting the original and copying with camera. Is that possible, or do you have this only as a file (.jpg or whatever)?
-DCW lurch 06-20-2008, 04:18 PM I've found that fft processing (at least with ImageJ) does very little to improve this diagonal waffle texture. I've had success with Topaz de-noise/equalizer - but it's not free. 0lBaldy 06-20-2008, 04:22 PM Joe I used the free "Image Analyzer" (found here) (http://meesoft.logicnet.dk/)
The steps were:
1. load image
2. filters>frequency domain filter
3. color all the bright star looking thingys except for the middle top (preview every once in a while)
4. OK
5. save
There are still work to be done but there is a big difference | |