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 channel-by-channel scatter diagram between two images |
last modified: December 15, 2018
USAGE: scatter [-s scale] [-m] infile1 infile2 outfile
-s ..... scale .... subsampling scale size for input images in both dimensions; PURPOSE: To generate a channel-by-channel scatter diagram between two images. DESCRIPTION: SCATTER generates a channel-by-channel scatter diagram between two images. The 8-bit channel graylevel values at each corresponding pixel in the two images are used as the x and y coordinates to plot white points on a 256x256 black background image. The process is slow and is proportional to the size of the input images. Therefore the two images will be scaled down to the desired size in order to keep the processing to a reasonable time, but have an adequate uniform sampling of the data. The resulting graph image may be mirrored vertically so that the x,y origin is at the bottom left, if desired, rather than the default top left. ARGUMENTS: -s scale ... SCALE is the resulting subsampled scale size of the two input images. The two images will be scaled to the desired size in pixels maximum on each side, if the images are larger than this size. The default is 50. Thus for a square image equal to or larger than 50, 50x50=2500 points will be plotted. -m ... Indicates to mirror the resulting scatter diagram vertically, so that the x,y origin is at the bottom left rather than the top left. The two input images must be the same size. If both images are grayscale, only the one channel will be processed. NOTE: This process is slow and takes about 2 minutes to generate with the default sample size of 50 on my Mac Mini 1.4 GHz G4. 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. |
Image vs Low Saturation Version Of Same Image |
|||
Image 1 |
Image 2 |
Scatter Diagram |
Scatter Diagram |
Image vs Same Image |
||
Image 1 |
Image 2 |
Scatter Diagram |
Image vs Same Image Shifted By 1 Pixel |
||
Image 1 |
Image 2 |
Scatter Diagram |
Image vs Same Image Shifted By 2 Pixels |
||
Image 1 |
Image 2 |
Scatter Diagram |
What the script does is as follows:
This is equivalent to the following IM commands.
|