autopaint: automatically "paint" an image

TOP | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


autopaint allows you to automatically "paint" an rgb image
where you can alter the image size, do tiling, specify/vary
the brush stroke image/size/ direction/alpha and control color noise.
    usage: autopaint inimage.rgb outimage.rgb 
	[-m maxxsize maxysize] 	- specifies the maximum size of painting
	[-p oldpaint.rgb] 	- use this image as starting image
	[-c canvas.rgb]		- tile the canvas with this image
	[-b brush.bw]		- specify a brush stroke image
	[-n colornoisemag]	- control color noise

	[-s size:sizevar]	- set the size of brush strokes
	[-d dir:dirvar]		- set the direction of brush strokes
	[-a alpha:alphavar]	- set the alpha of brush strokes

	[-si sizeimg.bw]	- use an image to control brush size
	[-di dirimg.bw]		- use an image to control brush direction
	[-ai alphaimg.bw]	- use an imageto control brush alpha

	[-v ] 			- set verbose mode

Files of interest include:

The program "autopaint" takes as input an SGI image file and writes a painted representation of this image to an SGI image file. In its application it is used like this:


  • Specifying the size of the painted image By default, the painted image is made the same size as the input image. If you want to control the ouput image size, you can use the -m option followed by two integers maxxsize and maxysize. These numbers specify the maximum size that the painted image will be made. The output image will be made to have the same aspect ratio as the input image. If you want the output image to fit inside a video frame then the following arguments should be used:

    
    
  • Reading in a background to paint over The default background is a flat gray color, but you can provide your own image to use as the initial canvas. If this option is used, the output painting will be the same resolution as this image. This capability can be used to continuously paint on top of the previous as in:

    
    
  • Tiling an image across the canvas

    You can use the -c option to read in a small image that will be used to tile the canvas before painting begins. This image could be a scanned in picture of a paper or canvas sample. The image paper.rgb provided here is an example of this.

    autopaint frame035.rgb paint037.rgb -c paper.rgb

    If the -p option above is used, this option is ignored.

    
    
  • Selecting the shape of brush strokes.

    In the simple case rectangles will be used as the brush shape. However, you may provide a mat image that will be used to define the brush shape. An example of this is the file brush.bw. To use a custom brush with autopaint do this:

    autopaint frame035.rgb paint035.rgb -b brush.bw

    Many different effects are possible by choosing different brush shapes. One possibility is to animate the brush shape by giving autopaint a changing brush image.

    
    
    
  • Controlling color noise

    autopaint adds noise to the RGB colors of brush strokes as the painting is being created. This will create a distribution of different colors in areas of the source image that are smooth. The -n option lets you control how much noise is added to colors. The default value for color noise is 0.2. This will create a more lively painting:

    autopaint frame035.rgb paint035.rgb -n 0.4

    
    
    
  • Setting the size of brush strokes

    By default, the size of brush strokes averages 30 pixels, but has a variance of 6 pixels in size. This means that the brush size will vary randomly be tween 27 and 33. The -s option allows you to select the size of brush strokes, and also a variance value for brush sizes by using a ':' to separate two floating point values.

    autopaint frame035.rgb paint035.rgb -s 40.0:60.0

    
    
    
  • Setting the direction of brush strokes

    In a similar way, the direction of brush strokes can be selected. Dy default, the direction of brush strokes averages 50 degrees and has a variance ot 8 degrees. To make the brush direction totally random use:

    autopaint frame035.rgb paint035.rgb -d 0.0:360.0

    
    
    
  • Setting the alpha of brush strokes

    The alpha of brush strokes can also be controlled in this way. By default, the average alpha is 0.8 and the variance of alpha is 0.3. To make the brush strokes use random alpha use:

    autopaint frame035.rgb paint035.rgb -a 0.5:1.0

    
    
    
  • Using an image to control brush size

    An black and white image may be used to very the sizes of brush stokes across the painting. This is done using the -si option. This image is sampled as brush strokes are drawn. The brightness value is used to scale the brush size between 0 and the current brush size.

    autopaint frame035.rgb paint035.rgb -si circ.bw

    
    
    
  • Using an image to control brush direction

    An black and white image may be used to control the direction of brush stokes across the painting. This is done using the -di option. This image is sampled as brush strokes are drawn. The brighness value is added to the direction specified by the -d option above.

    autopaint frame035.rgb paint035.rgb -di cone.bw

    
    
  • Using an image to control brush alpha

    An black and white image may be used in a similar way to modulate the alpha of brush strokes across the canvas.

    autopaint frame035.rgb paint035.rgb -ai cone.bw

    
    
  • Controlling the quantity of brush strokes

    By default autopaint uses a size of the canvas and the size of the brush strokes to determine how many brush strokes to use in the painting. If yon want twice as many brush strokes, use the -q option like this:

    autopaint frame035.rgb paint035.rgb -q 2.0

    
    

    Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
    OR, ...
    a compressed tar image of the entire autopaint directory.

    Copyright © 1995, Silicon Graphics, Inc.