Author Topic: Fourier Transform Plug-in - get rid of "newsprint dots"  (Read 17082 times)

0 Members and 1 Guest are viewing this topic.

Offline curvemeister

Fourier Transform Plug-in - get rid of "newsprint dots"
« on: May 20, 2006, 10:29:45 PM »
Today I discovered a free plugin that does Fourier Transforms, offered free of charge at a site specializing in forensic software.  This is a Windows plugin, and will work in both Photoshop and Photoshop Elements, as well as any other program supporting Photoshop plugins.

There are a number of interesting things you can do with this plugin, but one of the coolest is the removal of halftone dots and paper patterns from your images.  If you have not used Fourier transforms this way before, believe me this is light years away from simply blurring the image to get rid of the dots.

The plugin and documentation, including an example of removing halftone dots from a thumbprint image are here:

http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/howto.htm

I will be providing my own example shortly, but I suggest that you download their thumbprint image, and walk through their example carefully.  You will be rewarded with a technique that will  be worth its weight in gold, next time you encounter a valuable image that is available only via a newspaper or magazine print, or a family portrait that is printed on textured paper.

A couple of hints about the demo.  When the diagonal banding is removed, note that this is done by removing the relatively subtle diagonal lines near the very center of the FFT pattern.  Removal of the halftone dots may be done by simply blacking out the center of each star-shaped pattern, rather than by usinig the clone tool as discussed in the howto.

Mike
« Last Edit: May 20, 2006, 11:00:09 PM by curvemeister »

Offline Frits

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #1 on: May 21, 2006, 02:49:17 AM »
Mike,

it looks nice to me!
But first , I must discover how to get Channels in P.S.E. 4.0.
The effect-plugins of hiddenpower  worked all with layers!

frits

unbecannt

  • Guest
Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #2 on: May 23, 2006, 09:45:07 AM »
looks interesting
now i may be able to find a practical use for all that fourier theory i had to learn many years ago

Offline curvemeister

Here's an example
« Reply #3 on: June 01, 2006, 03:53:44 PM »
Here is a halftoned image that I've cleaned up using the FFT plugin discussed at the beginning of this thread.  The process is as follows:

1) run the FFT plugin as discussed in the first article of this thread.
2) select the red channel in the channel palette
3) paint out all of the "stars", except the very center one.
4) select RGB in the channels palette, and run the inverse FFT plugin
5) no dots!

This is the only method of removing the dots that actually appears to reveal additional information in the image, instead of merely degrading it.  Although this is a black and white image, the same procedure works with color images with the following modification:  Duplicate the image to a new layer, and when you are done, set the mode of your "descreened" layer to luminosity to restore your color image.

Elements does not directly support editing individual channels.  See the next article in this thread for how to modify only the red channel using Elements.

Mike
« Last Edit: May 12, 2007, 03:07:17 PM by curvemeister »

Offline curvemeister

Re: Fourier Transform for Elements
« Reply #4 on: June 02, 2006, 08:25:18 PM »
Here's a way to use the FFT plugiin with Elements.  This procedure uses a Levels adjustment layer to hide the green and blue channels, and a cyan multiply brush to erase only the red channel.
 
  • dupe the image
  • add a levels adjustment layer to the duplicate, and set the output levels to zero for the green and blue channels.  The image will appear red.
  • click on the background layer, and run FFT on the new image.  You'll see the characteristic star pattern in the red channel.
  • set the foreground color to cyan RGB(0,255,255)
  • set the brush mode to multiply
  • use the brush to black out the stars other than the center star
  • run inverse FFT
  • drag the modified image from the layer palette onto your original image
  • set the mode of the new layer to Luminance
  • run gaussian blur on your original image, with the radius set to about 2.0.

« Last Edit: June 04, 2006, 03:27:21 AM by curvemeister »

Offline Frits

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #5 on: June 06, 2006, 10:37:50 AM »
Here's a way to use the FFT plug-in with Photoshop Elements ( X.0)

Readers,
for me I wrote earlier, that I could not use the FFT plug-in in Photoshop elements 4.0 ( P.S.E. 4.0)
That is right.
Perhaps my P.S.E 4.0 is a dutch version ?
I don't know.
But on the site :
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/howto.htm
there is spoken it could be used with P.S.E ( X.0)

But Mike Russell has developed a way how to use it also in P.S.E ( X.0)
But I have e-mailed with him several times  about the subject.
The end result was that I could use it on his way.
But the result was not satisfied.
So I thanked Mike for  his Support and did something else.
Suddenly I get a idea and it was a simple idea.
I have Hidden powers from Lynch ( that's special for P.S.E X.0) and I had tried  in the past several ways to a solution to try FFT.
But I tried the new idea and indeed, It succeeded.
It was also a little inspired By Mike's way to contribute to the solution.

So when you have Hidden powers from Lynch the solution to use FFT and IFFT is simple.
Yes all is simple, when you know it.

First get the demo1.jpg ( the thumb) om this page:
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/images/demo1.jpg
and load it in P.S.E ( X.0)
you see a small source or background in picture "00"
USE the FFT plug-in!
You get then what you see in picture "01"
You see the changed thumb  and thumb source and a part of the effects from Hidden Powers.
You must double click on the Red one the  RGB Sep(aration)
The result of the separation can you see in picture "02"
Then you must close all the eyes , except from the red-component.
See picture "03"
Make the foreground color in P.S.E ( X.0)  to cyan RGB(0,255,255-picture "04") in multiply mode
set the brush mode to multiply
( that I have learned from Mike: I have tried black and others ways but it must  be so)
Make the RED-Component the active layer.
Then strike over the stars on the way you see in the picture, with a brush in Cyan color.
use the brush to black out the stars other than the center star.
See picture "05".
After that set all eyes "ON"
You get picture "06".
After that you make "ONE" layer of them.
then comes the end: Click on IFFT and you have a nice thumb.

Frits
the picture are less nice by the big compressios that I must use.



« Last Edit: June 06, 2006, 10:45:36 AM by Frits »

Offline Frits

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #6 on: June 06, 2006, 10:39:19 AM »
ADDUm : 2 pictures:

frits
« Last Edit: June 06, 2006, 10:47:25 AM by Frits »

Offline Frits

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #7 on: June 07, 2006, 12:38:33 PM »
ADDUM:
I have tried the halve toned image from Mike Russell and indeed, my methode works also with the black brush.

Frits

Offline curvemeister

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #8 on: May 12, 2007, 02:49:57 PM »
Here's another example, this time using FFT to remove texture from a scanned print.

These are the before and after images, and the modified red channel.

Notice that the edges of the image retain the textured pattern.  To avoid this problem you may want to scan the white margins of the print that also contain the texture, and crop the edges after the FFT procedure.  Otherwise use the clone tool to remove any remaining texture from the image.
« Last Edit: May 12, 2007, 03:11:06 PM by curvemeister »

Offline Frits

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #9 on: May 13, 2007, 02:36:59 AM »
Mike
very interesting.
It is the veil of the bride you did vanish.
--

I have never used again FFT. So it would again difficult to do it.
It need practicing to do it.
--
I think that I go saving parts of this site in a pdf file or something.
When  I needed , I do not know how to handle.

Frits


Offline curvemeister

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #10 on: January 18, 2008, 10:53:59 AM »
Here's a link to an interesting FFT thread, this time on dgrin.com:
http://www.dgrin.com/showthread.php?t=64775

Offline Frits

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #11 on: January 18, 2008, 04:08:46 PM »
Here's a link to an interesting FFT thread, this time on dgrin.com:
http://www.dgrin.com/showthread.php?t=64775

thanks mike,

i wil look at it.
till now I am completely forgotten the sequence, but it is still on this site.

frits

Offline joann

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #12 on: June 21, 2010, 12:47:09 PM »
Mike,
What do you mean by"and run the  inverse FFT plugin"?
JoAnn Head

Offline curvemeister

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #13 on: June 21, 2010, 12:55:50 PM »
Hi JoAnn,

I meant to run the FFT plugin, with the inverse mode selected.  You can download the plugin here:
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/howto.htm

This is still the best way I've found to remove halftone dots.  Please let me know if you have any more questions.

Mike

Offline curvemeister

Re: Fourier Transform Plug-in - get rid of "newsprint dots"
« Reply #14 on: June 21, 2010, 01:02:10 PM »
Here's an article posted by Chris Nicola with additional information and links on using this excellent plugin. - Mike
I read with great interest Mike Russell's comments on how to use a free forensic Fourier Transformation tool to remove news print dots, moire patterns and other image imperfections. The good news is this method works with Photoshop Elements. There are at least three methods to use the FFT technique with PSE.
 
Notice in the examples in the link below how the halftone dots and image imperfections can be removed.
http://www.curvemeister.com/forum/index.php/topic,62.0.html
 
Here is my own example of how paper texture can be removed. (In Files section A Contest Files/FFT Comparison)
http://f1.grp.yahoofs.com/v1/kJofTIBfJyseqXGA-Jf6WmD5VXtQmZdBUqyv6zQ-wQlN-kyFHKgiwP0zrl7VI8CUc4nU9gTD1SpYfTA5VFpblpYfoQqEK-TrgIu2e_I/A__Group%20Contest/FFT%20Comparison.jpg
 
Notice in this example how the baseball netting can be removed in the picture:
http://www.dgrin.com/showthread.php?t=64775
 
More examples of FFT Filtering: (Fast Fourier Transformation)
http://rsb.info.nih.gov/ij/docs/examples/FFT/
 
An action and also a Brush for the full PS can be downloaded here:
http://www.skeller.ch/ps/fft_action.php

This is the site that provides the Free FFT filters that can be used in PSE and many other applications.
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/getit.htm
 
Here is the tutorial for use with the Full PS:
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/howto.htm
 
Another tutorial showing how the paper texture can be removed using the full PS
http://retouchpro.com/tutorials/index.php?m=show&id=185
 
 
Well, how does it work with PSE? In the future I hope to post a tutorial in the files section explaining the three methods with screenshots.
In the meantime I studied Mike Russell's method and posted some screenshots (please see below). I wish to thank Mike Russell and Greg Groess for helping me to understand this very useful technique and of course Alex Chirokov and the site http://www.4n6site.com/ for providing the FFT plug in.
 
Method 1 with PSE
Please see only the last post in this link for the final solution with screenshots:
http://www.curvemeister.com/forum/index.php/topic,3054.0.html
 
1 Download the two plug-ins FFT a iFFT from:
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/getit.htm
Unzip the zip file and then place the two files in your plug in folder.

2 Open the test image which can be downloaded from:
http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/howto.htm
It is a PNG file so convert the mode to RGB for FFT to work. (Image/Mode/RGB)

3 For the sake of the demonstration I Introduced a green tint to the test file. Right click the original background and select duplicate layer. Please see Screenshot 1

4 Go to filters and under "Fourier Transform", apply the FFT filter to the original Backgroud layer on the bottom. Note FFT does not work on a true layer so thats why it has to be applied to the original Background which has no transparency information. It will not work on the copy above it which is a true layer. Please see Screenshot 2.

5  Apply a levels adjustment to the Background layer and as Mike says select the blue channel from te drop down menu and drag the output slider on the bottom right all the way to the far left so the blue output level is set to zero. Do the same with the Green output slider. The result of the FFT image will look red. Please see Screenshot 3.

6 Click the foreground colour box and select Cyan by typing R 0, B 255, G 255. Select the brush tool and set the brush mode to multiply from the top menu and carefully paint out the stars and diagonal lines but leave the central point of light intact. Please see Screenshot 3 and also the link below for more details on the parts to paint out.

http://home.planet.nl/~ber03728/4N6site/improc/fftplugin/howto.htm

7 Click on the original background layer and apply inverse Fourier Transform iFFT. The resulting Image will look red. Later you can delete the layers adjustment. Please see  Screenshot 4 and also screensot 5 with the layers adjustment deleted.

8 The problem at this point is the image has lost its colour due to the FFT. If it was originally a black and white image we could leave it as it is. However to bring back the colour in a coloured image another step is needed. Right click the original background layer to which FFT and iFFT has been applied and right click and convert to a layer. Then move the black and white image over the copy of the original image (Green) which still has its colour. Set the blend mode to luminosiy and switch on all the eyes. The colour has now returned. As a finishing touch apply a Gaussian blur of about 2 to the lower coloured image.  (Filter/Blur/Gaussian Blur) This will not blur the resulting image because the details come from the image on top and the lower image just provides the colour when the blend mode is set to luminosity. Please see  Screenshot 6.
 
 
Method 2 with PSE If the Elements Plus plug In has been installed
Go through steps 1-4 for method 1
Instead of using step 5 click on the Icon in Elements plus that allows you to use channels and click on the red channel.
Click here to see how to do this with the latest version for PSE8
http://elementsplus.net/v2/en/color_channels.htm
Make sure "show inactive channels is unchecked."
 
Proceed with steps 6 to paint out the unwanted parts of the image using a Cyan brush set to multiply.
 
Click on the Elements plus plug in and convert back to RGB before using inverse iFFT filter
 
Finish with step 8.
 
Method 3 Using PSE and The Image Analyzer Programme:
First Google "Image Analyzer " and download the free standalone programe.
 
A- Run Image Analyser and go to file/Open to open the image
 
B- Use Operations/Transformations/Fourier Transform
 
C- Click on the eraser tool and remove all the points and starbursts of light except the central point and star.
 
D- Go to Operations/Transformations/InverseFourier Transform
 
E- File /Save as to save the image with a new file name. This image willbe black and white.
 
F- To restore the colour open the image in PSE and use point 8 in method 1
 

Although this is a very powerful technique, it requires some practice to get the hang of it and it does not miraculously clean up all types of images perfectly. Also you might notice that the free FFT plug in has some limitations. It may introduce a bit of noise which may not be too critical as we are working with problematic images to start with. It does not work too well along the edges of an image so introducing a thick grey border, running the FFT and then removing the border may help. I tried using a border with one image and it didn't make much difference in my opinion. Some professional FFT tools ($) overcome these limitations.
 
I am sure many of you will find this technique useful for cleaning up some types of images. Have fun!

Kind Regards

Chris