Is there a way to remove this kind of halftone speckles from images with convert ?
I tried with -despeckle but that did not work as the speckles are way too big.
The distribution of the dots is rather uniform so I was thinking of changing the parameters of despecle, but there are none ...
Removal of halftone
-
- Posts: 21
- Joined: 2006-02-22T09:22:30-07:00
Re: Removal of halftone
I have been trying around and from an other pice of the forum i took this :
And it gives a reasonable OCR'able picture. (that was also something we wanted to do) but it wrecks havoc on other parts of the image.
I also tried :
the first combination is a bit faster than the second.
Code: Select all
convert in.png -blur 0x2 -threshold 50% out.png
I also tried :
Code: Select all
convert in.png -median 2 out.png
the first combination is a bit faster than the second.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Removal of halftone
The technique you are talking about is called descreening.
The best solution however involved converting images to and from a Fast Fourier Transform, whch allows you to isolate the regular pattern in the image, (frequency) and remove it, thus removing that specific halftone.
A good artical on this is a PDF document by Gernot Hoffmann
http://www.fho-emden.de/~hoffmann/fft31052003.pdf
However FFT transformations has as yet not been implemented in ImageMagick.
It is a shame as the same transform also provides ways of finding very large scale
sub-image matching. For example find the cross hairs.
The best solution however involved converting images to and from a Fast Fourier Transform, whch allows you to isolate the regular pattern in the image, (frequency) and remove it, thus removing that specific halftone.
A good artical on this is a PDF document by Gernot Hoffmann
http://www.fho-emden.de/~hoffmann/fft31052003.pdf
However FFT transformations has as yet not been implemented in ImageMagick.
It is a shame as the same transform also provides ways of finding very large scale
sub-image matching. For example find the cross hairs.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Removal of halftone
Would the "inpainting" feature of this program do what you want?
http://www.greyc.ensicaen.fr/%7Edtschum ... ation.html
I haven't figured out how to use it and there doesn't seem to be much documentation.
Pete
http://www.greyc.ensicaen.fr/%7Edtschum ... ation.html
I haven't figured out how to use it and there doesn't seem to be much documentation.
Pete
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Removal of halftone
The algorithm descption appears to be act little like an -adaptive-blur in may situations, though as I have not studied the adaptive algorithms for demostartions in IM examples I could say just how simular they are.
Some of the examples on the link page however is very impressive, such as the cartoon and desert examples, The latter brings up details that was previously swamped by the noise that was in the image.
Others like removing JPEG blocks definatally appear more like an adaptive-blur.
I would like to see more of this algorithm, as it is a definate canadate to reverse engineer into ImageMagick.
Some of the examples on the link page however is very impressive, such as the cartoon and desert examples, The latter brings up details that was previously swamped by the noise that was in the image.
Others like removing JPEG blocks definatally appear more like an adaptive-blur.
I would like to see more of this algorithm, as it is a definate canadate to reverse engineer into ImageMagick.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/