Page 1 of 1

Remove black Points from Image

Posted: 2014-12-04T16:17:28-07:00
by gert
Hi,
I got some images digitized from slides. Unfortunatly there are a lot of dark points in the image, may be dust or other errors on the original. Is there any easy way, to remove these points?

Kubuntu 12.04, ImageMagick Version: 6.6.9-7

Re: Remove black Points from Image

Posted: 2014-12-04T17:19:25-07:00
by fmw42
6.6.9-7 is rather old (200 versions old). Many more options are available in newer versions of IM.

Nevertheless, it is hard to tell you how to go about without seeing your images. Perhaps you can upload one to some free hosting site such as dropbox.com and put the URL(s) here.

Re: Remove black Points from Image

Posted: 2014-12-06T17:53:37-07:00
by gert
I got the version from Kubuntu 12.04.

You can see an example at http://travel.ggf-controls.de/tmp/DIA7.jpg. The boy on the image looks very sick, but he isn't.
I also tried Fred's script 'isonoise', but after that the image wasn't sharp.

Re: Remove black Points from Image

Posted: 2014-12-06T22:19:26-07:00
by fmw42
Looks like your lens or scanner needs cleaning?

The problem is hard because the noise spots are rather large.
Try this:

Code: Select all

convert DIA7.jpg -statistic median 11x11 tmp1.png
convert DIA7.jpg -morphology bottomhat disk:5.3 tmp2.png
convert tmp2.png -threshold 5% tmp3.png
convert DIA7.jpg tmp1.png tmp3.png -compose over -composite tmp4.png
convert tmp4.png -enhance -enhance -enhance tmp5.png
convert tmp5.png -unsharp 0x0.5 DIA7_filt.png
Image

I kept the tmp files so you can see what each step is doing. You can leave off the last unsharp step if you do not like the extra sharpening at the end. You can also adjust the threshold 5% value as desired.

If you would not mind, I would like to use a part of this image for an example for a script I want to create to do this. Would that be OK? Please send me PM on this forum. If you would like, leave your name in the PM and I will give you credit for the image. Thanks

Re: Remove black Points from Image

Posted: 2014-12-08T18:18:56-07:00
by gert
Thank you for your help. Your script works quite good on all my images.
The reason of the points: The source is a rather old positive slide mounted between glasses. I think, there is something between the glasses or the chemicals have changed.