List Info

Thread: Adaptive sharpening using fx command. Problem with large images.




Adaptive sharpening using fx command. Problem with large images.
user name
2006-04-19 00:38:12
Hi everybody. It's been awhile since I posted to list
(using a yahoo 
address (nikkorsw..)) 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/pip
ermail/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-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
Adaptive sharpening using fx command. Problem with large images.
user name
2006-04-19 01:33:33

independent commercial wrote:

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

The errors I am getting with both scripts are: Tiff
directory missing 
required "StripOffsets" field.
'MissingRequired'. Apart from the fact 
that the files are 310b and the originals are 400-470mb in
size I am at 
a loss here.

I am not getting alot in google other than an a couple of
similar errors 
people have had but in OSX.


Warning OT: How is this list related to the web-based
imagemagick studio 
users forum? Is it polite to send to both forums or are they
linked?

Thanks again in advance for any clues or insight anyone may
have.
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )