Hi everybody. It's been awhile since I posted to list (using a yahoo
address ([EMAIL PROTECTED])) but I have come a little unstuck with an adaptive
sharpening script.. I will attempt to show the history of my attempts.
Sorry if it seems a little long winded and complicated.
Some time ago, I hunted down an adaptive sharpening script which seemed
to work at the time (from here
<http://studio.imagemagick.org/pipermail/magick-users/2004-April/012633.html>)
but now I cannot get it to work at all. It went like this:
<code>
convert orig.png \( +clone -modulate 100,0 \) \( +clone -unsharp
0x1+200+0 \)
\( -clone 0 -edge 3 -colorspace GRAY -level 20%,95% -gaussian 10 -level
10%,95% \) -colorspace RGB -fx "u[0]+(((u[2]+1)/(u[1]+1))-1)*u[0]*u[3]"
output.png
</code>
I emailed the guy who created this Kornelis Sietsma and said I was
having some problems and he sent me this:
<quote>
First, contrast enhancement to enhance wide-area contrast:
convert [orig_file] -unsharp 0x100+0.2+0 [temp_file]
Then, the actual sharpen command:
<code>
convert [temp_file] \( +clone -unsharp 0x1+2+0 \) \(-clone 0 -fx
intensity -edge 3 -blur 20 -level 0%,80% \) -compose over -composite
[output_file]
</code>
This is basically a sharpen with a radius/sigma of 1, and an intensity
of 200%, overlaid on an edge mask to avoid sharpening non-edge areas.
</quote>
In regards to the second script I don't use the contrast enhancement
because all of my photos have had that done to
so this is in regard to the last part of the script.
Basically, the script works on smaller photos 70mb tiffs but throws up
errors when trying to open them when used with
larger photos (400mb-470mb). I have tried limiting the script to 8 bits
per channel to ease the processing as well as limiting the memory to 5gb
(3gb ram 2.5gb swap space). I am using a 2.6.14-2-k7-smp kernel and
using a debian & imagemagick 6.2.4
Can anyone spot an error with either of these scripts esp the last one?
I am putting the "-limit memory 5000" and "-depth 8" after the "convert
[temp_file]" command..
Many thanks in advance for any insight someone might have in relation to
this problem. Also, other forms of adaptive sharpening scripts are
appreciated.
Kind Regard, Nicholas
_______________________________________________
Magick-users mailing list
Magick-users@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users