On Fri, 25 Sep 2009 17:19:49 +0200
Sébastien Gross <[email protected]> wrote:

| Hi Anthony
| 
| First thanks for you great tutorial on ImageMagick.
| 
| I am very interested in image toning (I used for a while a gimp tutorial
| from http://www.gimpguru.org/Tutorials/SampleToning/samples.shtml).
| 
| Using a "-clut" option is able to regenerate the correct image toning.
| That's a great news :-).
| 
| I was wondering if there is a way (I am very interested in how) to
| generate the clut image from a source and a destination ones ?
| 
| Thanks for your help.
| 
-clut and -hald-clut can be used to assign the tones of an image
But generating that tonal gradient image is as mentioned in the link
given (more specifically the sub-link) a tricky matter.

Not all the tones needed for a particular gradient may be present in an
existing image, and missing tones have to be interpolated from the
tones that are found.

This is not something that is currently available in IM, though it
should be posible to generate such a mapping from images, if the method
on exactly how a color to grayscale relation used is known.

On first step would be to use '-unique-color' to extract just the unique
individual colors from an image.  The color order would be random however
but can be sorted using any color channel.  This is posible as all
these gradients should be a monotonic (colors only brighten in intensity
never darken).

Once you have the colors sorted you need to position the colors for the
grayscale the color relates to (intensity?)  that will then leave gaps
on the gradient for the gradient values that were not present in the
source image, and these now needs to be filled using some type of
interpolation function.



  Anthony Thyssen ( System Programmer )    <[email protected]>
 -----------------------------------------------------------------------------
  You are all under arrest!   Place your manipulative members above your
  sense-organ clusters and proceed hence.   -- Keith Laumar - "Retief's War"
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/

_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to