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. |
Creates a cartoon-like appearance to an image. |
last modified: December 15, 2018
USAGE: cartoon [-p pattern] [-n numlevels] [-m method] [-e edgeamount] [-b brightness] [-s saturation] infile outfile
-p ... pattern ...... segmentation pattern (shape); 0<=integer<=100; PURPOSE: To create a cartoon-like appearance to an image. DESCRIPTION: CARTOON creates a cartoon-like appearance to an image. The image is smoothed and then multiplied by a grayscale version of the image with the desired number of levels to produce the segmented appearance. The pattern parameter changes the shape of the segmentation for the given number of levels. Edges are then superimposed onto the image. ARGUMENTS: -p pattern ... PATTERN is the pattern or shape of the segmentation. Values are between 0 and 100. The default=70. -n numlevels ... NUMLEVELS is the desired number of segmentation levels. Values are integers>=2. The default=6. -m method ... edge METHOD. Choices are 1, 2, 3 or 4. The default=1. -e edgeamount ... EDGEAMOUNT is the amount of edges to overlay on the cartoon. Values are floats>=0. The default=4. -b brightness ... BRIGHTNESS of the cartoon. Values are integer>=0. The default=100 (no change). -s saturation ... SATURATION of the cartoon. Values are integer>=0. The default=150. 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 1 -- Variation In Pattern |
||
Original |
||
Arguments: -p 60 -e 4 -n 6 |
Arguments: -p 70 -e 4 -n 6 |
Arguments: |
Image 1 -- Variation In Number Of Levels |
||
Original |
||
Arguments: -p 70 -e 4 -n 4 |
Arguments: -p 70 -e 4 -n 5 |
Arguments: |
Image 1 -- Variation In Edge Amount |
||
Original |
||
Arguments: -p 70 -e 3 -n 6 |
Arguments: -p 70 -e 4 -n 6 |
Arguments: |
Image 1 -- Method 1 vs Method 2 |
|
Original |
|
Arguments: -p 70 -e 4 -n 6 -m 1 |
Arguments: -p 70 -e 4 -n 6 -m 2 |
Image 2 |
|
Original |
Arguments: |
Image 3 |
||
Original |
Arguments: -p 80 -n 6 -e 3 -b 120 |
|
Image 4 |
||
Original |
Arguments: -p 70 -n 6 -e 4 |
|
What the script does is as follows:
This is equivalent to the following IM commands
|