reducing noise

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

reducing noise

Post by GreenKoopa »

I have a scan of a 60-year-old photo. At 29 megapixel, it is as much noise as image. Any advice on what filter might clean this up?

http://i53.tinypic.com/x2qm42.png

after "-median 1 -gaussian-blur 2x0.5"
http://i55.tinypic.com/2iqeki0.png

Before this I:
touched up the photo by hand to repair damage
converted to color profile grayscale gamma 2.2
used screen to lighten where the flash didn't reach
used darken to remove flash glare
used levels to increase the contrast

After I:
crop, convert to sRGB, save as jpeg

EDIT: My apologies, image host changed. I guess I need advice on hosting too.
Last edited by GreenKoopa on 2010-12-08T15:32:38-07:00, edited 1 time in total.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: reducing noise

Post by Bonzo »

Links do not work - end up on an irritating error/advert page that you have difficaulty going back.
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: reducing noise

Post by GreenKoopa »

Again, apology for the irritating error/advert page. The host has been changed and only a sample piece of the image is given.

I don't know in what way it could help address the noise, but the original scan was in RGB.
Image

With some final tweaking, this project is soon to be an ImageMagick success!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: reducing noise

Post by fmw42 »

You could try -despeckle or some other denoising filter. You could try a larger median value and then some sharpening afterwards. You might try some of my denoising scripts. But your noise looks like film grain and the image was scanned at a very high resolution so that the noise is rather bigger than just 1 pixel in size, which makes it harder to deal with.
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: reducing noise

Post by GreenKoopa »

fmw42 wrote:You could try -despeckle or some other denoising filter.
Is there a list of denoising filters?
fmw42 wrote:You could try a larger median value and then some sharpening afterwards.
A good idea I hadn't thought of.
fmw42 wrote:your noise looks like film grain
And paper texture. My consolation is that I already have the image so much better than it started.
fmw42 wrote:the image was scanned at a very high resolution
The scans were made at 600 dpi. The prints will be enlarged various amounts reducing the density to 200-500 dpi.

An example from a dark region. I would gladly share the entire image if I had a way to host a 56MB file.
Image

Until now I felt comfortable using ImageMagick, cornering two bugs, and helping other users (or at least trying). Photography and printing, on the other hand, are outside my skill set. Maybe most other users too.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: reducing noise

Post by fmw42 »

there are 3 or four noise-like filters in IM: median, blur, gaussian-blur, adaptive-blur, selective blur, despeckle and enhance. But as far a I know, there is no specific list of them. My scripts have some other specialized noise filters that you could try.

My guess would be to try some larger median and then follow that by some moderate shapening or unsharp masking or possible blurring.

You might also experiment with some grayscale morphology. That may help also, but I have not tried that. Such as open or close.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: reducing noise

Post by anthony »

Low light photography is also a minor hobby of mine.

The problem is as you say the noise.

One method I know of fixing this (to an extent) is to have the camera on a tripod, which is really a must for low light photography anyway. and take 3 or more pictures in succession.

If you average them together a lot of the noise will be eliminated.

Other techniques are shown in my bookmarks (online) at
http://www.ict.griffith.edu.au/~anthony ... ml#Digital Photo Handling
Note that the spaces are part of the entered URL!!!!

Especially look at Zero Noise Photography and Dark Field and current noise
Which take about eliminating this low level noise completely!

However they concentrate on taking extra photos (one with a lenscap on) at the time you are taking the photo. It does not really help with an existing photo that is on its own.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

Re: reducing noise

Post by GreenKoopa »

fmw42 wrote:My guess would be to try some larger median and then follow that by some moderate shapening or unsharp masking or possible blurring.
Sadly a sharpening step anywhere only amplified the problem in some areas. It was a good suggestion so I'll try it on the other photos.
anthony wrote:Low light photography is also a minor hobby of mine.
Browsing you bookmarks, everything is a hobby of yours, maybe just not yet.
anthony wrote:If you average them together a lot of the noise will be eliminated.
I suppose integrated over time, low light eventually becomes much light.
anthony wrote:However they concentrate on taking extra photos (one with a lenscap on) at the time you are taking the photo. It does not really help with an existing photo that is on its own.
Sadly everyone in my photo is dead so re-shooting isn't an option. Some scanners do support multi-sampling.

Image

Thank both of you (fmw42 & anthony) for all the help over the last month. Not only do I have this Christmas present nearly complete, I have one more tool in my belt. And while I still haven't tried Linux, you two did shame me into finding portable Perl for Windows.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: reducing noise

Post by anthony »

Multi-sampling on the scanner will help remove digital noise from the scanner.

Median filter will also help but must be applied before sharpening.
Unsharp and adaptive-sharpen can also help.

But I have little experience with sharpening in a practical sense. What works and what doesn't. That is why I have not written up any examples on using them.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply