Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Generates a pseudocolored image or pseudocolored animation from grayscale image using a rainbow colored transformation. |
last modified: December 15, 2018
USAGE: pseudocolor [-o offset] [-i increment] [-d delay] [ -r resize] [-v] infile [outfile]
-o ... offset ..... offset of rainbow colors (single frame only); PURPOSE: To generate a pseudocolored image or pseudocolored animation from grayscale image using a rainbow colored transformation. DESCRIPTION: PSEUDOCOLOR generates a rainbow colored look up table image and applies it to a grayscale image to generate either a single frame psuedocolored output image or a pseudocolored animation. Each frame of the animation uses a different incremental roll of the rainbow color look up table. For a single frame pseudocolored output, the rainbow color look up table may be rolled by a user specified amount. The animation may be viewed (displayed) automatically with or without the saved animation file. ARGUMENTS: -o offset ... OFFSET is the pixel roll amount of the rainbow color look up table to be used for a single frame output image. If an animation is to be generated by specifying an increment value other than 0, then the offset will be ignored. Values for offset may be integers between 0 and 255 for the length 256 look up table. The default=0. -i increment ... INCREMENT is the pixel roll amount of the rainbow color look up table to be used for each new frame of the animation. Increment values should be integers between -128 and 128. The sign indicates which direction to roll the look up table. The suggested value of -8 creates a 33 frame animation. The default=0 indicates that a single frame output image will be generated. -d delay ... DELAY is the time delay in msec between frames in the animation. Values are integers greater than or equal to zero. The default=10. Note that the animation will be created to loop forever. -r resize ... RESIZE allows the output animation to made larger or smaller than the input image size. The values are integers greater than 0 representing the resize percentage. The default=100 which leaves the animation the same size as the input image. outfile ... OUTFILE if provided must be in a format such as gif that supports multiframe animations. -v ... Specifies that along with the output animation, the animation is to be viewed (displayed) automatically before the script is ended. If no output animation file is provided, the animation will be created and viewed automatically even if the -v option is not specified. This parameter is ignored if the output is a single frame image. CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
Simple Pseudocolor Of Grayscale Image | ||
Original Grayscale Image |
Pseudocolored Image |
Rainbow LUT |
Pseudocolored Animation Of Grayscale Image | ||
Original Grayscale Image |
Pseudocolored Image |
Animated Rainbow LUT |
What the script does is as follows:
This is equivalent to the following IM commands for a single frame
|