[magick-users] Despeckling images
Wolfgang Hugemann
Auto at Hugemann.de
Sun Jan 21 06:15:03 CST 2007
Hello,
I would like to come back on the subject already discussed on December
23th in another context. I often encounter a similar problem, as
illustrated by a 170 kB JPG at http://www.hugemann.de/ImageMagick/skid.jpg:
I have to enhance the contrast between the tyre skid mark and the road
surface. The problem is that the asphalt surface is quite speckled if
you rise the contrast and that weak skid marks give only a weak
contrast. I would like to enhance that contrast in order to make the
weak, curved skid mark in the right middle of that photograph more
strikingly to the spectator.
First question:
Does anyone know of a filter that can possibly perform that job, i.e.
analyze the overall texture of that photograph and reduce it by some
algorithm?
Second question:
I had the idea of using the fx operator to replace each pixel by the
darkest of its neighbors, making use of the min function. I thought that
it would take an arbitrary count of arguments, i.e. min(x1, x2, x3
,x4...xn). Instead it takes only two - min(x,y).
Why that? This seems to be an unnecessary limitation to me. Any ideas?
A proposal for the future:
I would appreciate if I could supply kind of a program file instead of
just one command to the fx operator (or a more generalized equivalent),
like I do when doing video processing with AVIsynth (www.avisynth.org).
This would clearly distinguish this functionality from that of Adobe's
filter factory (that also only knows a binary min function!)
Greetings from Germany
Wolfgang Hugemann
Kelly Jones schrieb:
> Spammers are starting to put "speckles" in their images to defeat
> OCR-scanning plugins such as FuzzyOCR.
>
> I thought ImageMagick's -despeckle option would help, but it doesn't
> seem to, not even when applied multiple times, not even in conjunction
> with -monochrome.
>
> I want a filter that does this for each pixel X:
>
> 1) if any of X's 8 neighbor pixels is the same color, turn X black
> 2) otherwise, turn X white
>
> Can some combination of options to convert do this?
>
> I realize that:
>
> 1. This will only work w/ indexed-color images (eg, GIFs) and not JPEGs,
> etc.
> 2. Spammers will soon work around this, so this is just a short-term
> bandage.
> 3. I could write something in libgd to do this (blech!)
>
More information about the Magick-users
mailing list