From: Bruce Walker
On 11-05-26 6:08 PM, John Sessoms wrote:
> From: John Sessoms
>> Ok, so I had a go at seeing what I could do at restoring the image using
>> the tools Bruce linked to.
>
> Never mind. I took another look at the corrected image Bruce had
> posted and took my attempt down right away.
>
> Got to install imagemagick & see if I can figure out how to use it.
>
> The Photoshop plug-in doesn't seem to work as well as imagemagick.
John, I believe they both use the same FFT engine, the opensource
project FFTW.org, so I'd expect that they should work about the same,
given the same inputs.
What did your spectral mask look like? You may not have removed enough
points. I iterated on that image a couple of times, removing more
spectrum each time before I was satisfied that I'd suppressed enough of
the original's vertical lines.
Here's the image I got for the frequency space in Dave's (leveled and
cropped) original:
http://dl.dropbox.com/u/2254722/picture0001_spectrum.png
First thing I did was save it as a PSD file.
One of the things I got from reading the imagemagic site was that the
FFT worked better on square images, so I made a canvas size adjustment
to make the image 7.5 x 7.5 inches with the extra space filled with 50%
gray. That's the image I ran the FFT filter on.
The FFT filter plugin I downloaded for Photoshop apparently only works
in 8 bit RGB. The RGB frequency space didn't show any of the horizontal
or vertical lines; just a fuzzy dot in the middle.
The first tutorial I found for the Photoshop plugin said to look for the
lines and dots in the Red Channel. The Red channel was just a uniform
pattern of monochrome noise, with not even the center dot.
The second tutorial I found said to look in the GREEN channel and there
I found a frequency space that looks like yours. I don't think I had
those 4 dots in the quadrants, but I did have the horizontal and
vertical lines.
And here's the mask I ended up with, created in Photoshop by painting
black onto a white layer with a 10% hard brush:
http://dl.dropbox.com/u/2254722/picture0001_spectrum_mask2.png
The tutorial I followed said to paint directly on the green channel. I
selected in the area that looks most uniform and got a neutral gray
color for my brush and painted out the lines with a 0% hardness brush
I notice that you did not paint out the vertical line. The tutorial I
was following said to paint that out as well. I tried it both ways and
can't see that it makes much difference in the image other than painting
out the vertical stripe seems to create a little cross-hatching to the
gray padding.
What I end up with at this point is an image that has a heavy moire
pattern that looks like a giant, smudged fingerprint across it. It looks
a lot like where I've seen emulsions that were attacked by fungus.
You don't want to allow any hard edges in the mask as that will create
new artifacts (especially ringing near any edges), so you must either
use a soft-edged brush or apply Gaussian blur to your mask before
applying it.
When creating the mask I looked for anything in the frequency-space
image that seemed regular and symmetrical. Normally an image like that
(especially such a soft one) should have a pretty uniform and random
looking spectral distribution, so any dense white clusters or stars are
suspect. As you can see I was fairly sloppy with my hand drawing of the
mask, but it doesn't seem to matter all that much, so you can fairly
safely err on the generous side.
A quirk of the FFTFILTER script is it expects the input image and the
mask image to be the same dimensions, so I expanded the canvas of the
original image (to 2092x2092) making it square, with black bars above
and below.
http://dl.dropbox.com/u/2254722/picture0001-2092.png
When you install ImageMagick on your computer, make sure that the FFTW
library is already installed for it to find, or it won't be able to do
any FFT operations. If you get error messages when trying to run the
script, Googling on those messages will get you lots of help on the
proper configuration of this stuff.
Good luck!
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1375 / Virus Database: 1509/3662 - Release Date: 05/26/11
--
PDML Pentax-Discuss Mail List
[email protected]
http://pdml.net/mailman/listinfo/pdml_pdml.net
to UNSUBSCRIBE from the PDML, please visit the link directly above and follow
the directions.