The -fx option is reparsed for each pixel which makes it prohibitively slow for large images. It was designed to conveniently experiment with new algorithms, not for production runs. Once a new algorithm is tested with -fx, it should be converted to an ImageMagick filter for production use. Filters are invoked with the -process option. We have one example in the ImageMagick source distribution in the ImageMagick/filters folder called analyze.c. If you write a custom filter that you think others might find useful you can post it in the User forum and if it is of general usefulness we might move it to the ImageMagick distribution (if you release it under the ImageMagick license).
If the problem you are having is something other than slow processing, try ImageMagick 6.2.7-2, the latest release. If it fails as well, repost with exactly what the problem is and we will investigate further.
Large image processing problems..
The new -adaptive-sharpen option will be available tommorrow as ImageMagick 6.2.7-3 Beta here: ftp://ftp.imagemagick.org/pub/ImageMagick/beta. You will find the algorithm as AdaptiveSharpenImage() in magick/effects.c and you can invoke it like this:
- convert before.png -adaptive-sharpen 0x1 after.png
- SetImageColorspace(edge_image,HSBColorspace);
- SetImageColorspace(sharp_image,RGBColorspace);
Re: Large image processing problems..
hi, magick
would you please tell me which article described the algorithm of adaptive sharpen used in ImageMagicK.
Thanks,
donpro
would you please tell me which article described the algorithm of adaptive sharpen used in ImageMagicK.
Thanks,
donpro
Re: Large image processing problems..
Hi there,
Cheers --
-- Torsten
I second! Any information available about the implemented algorithm? (I tried to have a look at the source code, but for someone not deeply involved in ImageMagick memory management, it is virtually impossible to figure out what the AdaptiveShaprenImage function actually does to the image...)donproc wrote:hi, magick
would you please tell me which article described the algorithm of adaptive sharpen used in ImageMagicK.
Cheers --
-- Torsten
Re: Large image processing problems..
The algorithm is described as "adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges. We sharpen the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma." The algorithm creates a set of kernels with linearly increasing "sharpiness" and picks one based on the edge gradient. If its a flat area, its sharpened less intensely to preserve the original fidelity of the pixels. If its near an edge, its sharpened more intensely.