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
Remove black Points from Image
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove black Points from Image
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.
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
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.
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove black Points from Image
Looks like your lens or scanner needs cleaning?
The problem is hard because the noise spots are rather large.
Try this:

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
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

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
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.
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.