home images audio new info sitemap gallery

SGI IMAGE TOOLS



abs - get the absolute value of an image

add - add two images together

addframe - add a border to an image

addnoise - add noise to an image

assemble - assemble an array of smaller images

blend - linearly interporlate two images

blur - low pass filter an image

cglue - create an rgb image out of 3 black and white images

colorbars - generate NTSC colorbars

convolve - convolve an input image with a kernel

crop  see subimg

cscale - scale (change) the rgb colors of an image

duotone - make a color duotone image from a black and white image

fieldmerge - merge two field images into one frame

fitimg - force an image to be a specific size.

fromalias - converts an Alias image to an Iris image

frombin - create an RGB Iris image file from a binary dump of image data

fromgif - convert a GIF image into an IRIS image

gammawarp - lighten or darken an image

gendit - perform general image dithering

greyscale - make different patterns

halftone - half-tone an image

hipass3 - high pass filter an image

hist - compute and display the histogram of an image file. see also perhist

iavg - average a set of images

iblend - blend two images using a mat

iflip - flip an image

image2vrml - convert an image file into a VRML ImageTexture and indexed

imgexp - expand the range of pixel values in an image.

imgsize - print the size of an image

imgwrap - shift pixels left one bit.

istat - print the header information of a list of image files.

izoom - magnify or shrink an image

luminance - see setlum

matte composite - see iblend

max - get the maximum of two images

min - calculate the minimum of two images

mirror - see iflip

movie - show a series of images in a sequence

mult - multiply two images

perhist - print percent histogram values for an image

quant - quantify an image

rectimg - display a color or BW image on the iris

repcolor - replace specified colors within an image

saturate - change an image's saturation

scale - see izoom

setlum - modifies the luminance on an image

sharpen - see hipass3

shear - shear an image diagonally

slide - zoom an image up for full screen display

sub - subtract two images

subimg - extract a sub-region from an image

thresh - threshold one image with another

tile - repeats an image in two dimensions

toalias - Convert an IRIS image to an Alias image

vhist - display a 3-D volume histogram of a color image

zoom - see izoom







information is also available online.  

Type man followed by the toolname gives the manualpage for that tool.

Example :   man abs followed by a return will give the following info:



abs - get the absolute value of an image

SYNOPSIS

     abs inimage outimage

DESCRIPTION

     abs generates outimage which contains the absolute value of the input

     image.  This treats input values as signed 8-bit quantities.  Input

     values of 0 map to white. 255 also maps to white.  128 maps into black.



add - add two images together

SYNOPSIS

     add inimage1 inimage2 outimage

DESCRIPTION

     add takes inimage1 and inimage2's intensities and adds them together and

     stores the result in outimage.  If the sum is greater than 255 the result

     is set to 255.



addframe - add a border to an image

SYNOPSIS

     addframe inimage outimage [width [r g b]]

DESCRIPTION

     addframe adds a constant width border to a monochrome or color image. The

     default width is 1 pixel, and the default color is black.



addnoise - add noise to an image

SYNOPSIS

     addnoise inmage outimage noiseimage mag

DESCRIPTION

     addnoise adds noise from the noise image to the input image.  The noise

     image tiles the input image.  The magnitude of the noise is scaled by a

     floating point magnitude mag.  It's range is [0.0 ... 1.0].  0.0 adds no

     noise into outimage, while 1.0 add alot of noise.  Typicaly randimg is

     used to create a noise pattern (histeq can also be used).



assemble - assemble an array of smaller images

SYNOPSIS

     assemble nx ny outimage imgfiles...

DESCRIPTION

     assemble assembles an nx by ny array of smaller images.  The catch here

     is that all images being assembled have to have the same x/y dimensions.

     The nx by ny array works like this:  nx is the number of images that are

     going to be sitting side by side in the horizontal direction, and ny is

     the number of images side by side in the vertical direction.  Order

     imgfiles so that the first image will be the one sitting in the bottom

     left-hand corner of outimage, with the second sitting either above it or

     to its right.  If fewer than nx times ny images are given on the command

     line, the last image is used repeatedly.



blend - linearly interporlate two images

SYNOPSIS

     blend inimage1 inimage2 outimage param

DESCRIPTION

     blend linearly interpolates two images.  param is a floating point number

     that controls the weighting of the two input images.  A value of 0.0 will

     use only imimage1, while a value of 1.0 will use only inimage2.  Values

     outside the range [0.0...1.0] will extrapolate instead of interpolate

     between the two images.



blur - low pass filter an image

SYNOPSIS

     blur inimage outimage [pix] or [xpix ypix]

DESCRIPTION

     blur low pass filters the input image.  This is done by izooming the

     image down and then izooming it back up with filtering.  The amount of

     blurring is controlled by pix or xpix and ypix.  A pix value of 10 will

     cause the blur to zoom the image down until it is about 10 pixels across,

     and then zoom it back up to the original size.  Large pix values end up

     making the result less blurry.



cglue - create an rgb image out of 3 black and white images

SYNOPSIS

     cglue red.bw grn.bw blu.bw outimage.rgb

DESCRIPTION

     cglue constructs an rgb image by combining three black and white (bw)

     images.  These black and white images are treated as intensity maps for

     the red, green, and blue channels of the rgb generated image.

NOTE

     This program requires that all the source images on the command line have

     the same x/y size.



colorbars - generate NTSC colorbars

SYNOPSIS

     colorbars

DESCRIPTION

     colorbars is an NTSC colorbar generator.  Using LEFTMOUSE, one can

     alternate between four different standard colorbars patterns.



convolve - convolve an input image with a kernel

SYNOPSIS

     convolve inimage outimage kernelimage [-m -d]

DESCRIPTION

     convolve convolves the input image with a kernel image.  Kernel images

     can be created with the program greyscale.  To do a convolution, the

     kernel image is stepped across the surface of the input image.  At each

     position, all the image values under the kernel are multiplied by the

     corresponding kernel values.  The sum of all these products is divided by

     the sum of all the values in the kernel.  The result is put into the

     output image.  If the -m option is given, the maximum value of all the

     multiplies is put into the output image instead of the normalized sum of

     the products.  If the -d option is given, a delta value is calculated

     wherever the kernel is greater than 128.



crop  see subimg



cscale - scale the rgb colors of an image

SYNOPSIS

     cscale inimage outimage.rgb r g b [-d]

DESCRIPTION

     cscale can be used to color balance an image by scaling the r, g, and b

     channels by different factors.  Each scale factor is an integer in the

     range 0 to 255.  A scale factor of 0 is interpreted to mean scale by 0.0,

     while a scale factor of 255 means scale by 1.0.  Each scale factor

     multiplies a color channel of the source image.  If the -d option is

     given, the input colors are divided by the given factors.



duotone - make a color duotone image from a black and white image

SYNOPSIS

     duotone inimage.bw outimage.rgb r g b

DESCRIPTION

     duotone creates a duotoned color image from a single channel image.  The

     r g b arguments specify the color that a 50 percent gray value in the

     source image should become in the duotone image.  Try experimenting with

     "doutone in.bw out.rgb 200 120 80".



fieldmerge - merge two field images into one frame

SYNOPSIS

     fieldmerge inimage0 inimage1 outimage

DESCRIPTION

     Standard NTSC Video displays 30 frames per second.  Each frame is

     composed of two fields that are interlaced.  When recording video

     animations it is sometimes good to record 60 fields per second, but to do

     this two fields must be merged together into a single frame by

     interleaving scanlines from two images. fieldmerge interleaves two images

     in this way.

NOTE

     This program requires that all the source images on the command line have

     the same x/y size.



fitimg - force an image to be a specific size.

SYNOPSIS

     fitimg inimage outimage xsize ysize

DESCRIPTION

     fitimg uniformly scales a picture to a specific size.  This is

     accomplished by scaling the image to be smaller than the specified size,

     and surrounding it by a white border as needed to make the final image

     exactly xsize by ysize pixels.  The aspect ratio of the source image is

     preserved.  This is useful for making an array of images using

     "assemble".



fromalias - converts an Alias image to an Iris image

SYNOPSIS

     fromalias aliasimage outimage.rgb

DESCRIPTION

     fromalias converts an Alias image to an IRIS image file image.

SEE ALSO

     toalias



frombin - create an RGB Iris image file from a binary dump of image data

SYNOPSIS

     frombin image.bin outimage.rgb xsize ysize [zsize]

DESCRIPTION

     frombin reads a binary dump of some image data, and creates an IRIS image

     file.  If only xsize and ysize are given, then a single channel black and

     white image is created.  The first byte of the input file becomes the

     lower left pixel in the resulting image.  If a zsize of 3 is given, a

     color image is created, by first reading all the red band, followed by

     the green and blue bands.

SEE ALSO

     tobin



fromgif - convert a GIF image into an IRIS image

SYNOPSIS

     fromgif inimage.gif outimage.rgb

DESCRIPTION

     fromgif converts a Compuserve GIF image file into an IRIS image file.

SEE ALSO

     togif



gammawarp - lighten or darken an image

SYNOPSIS

     gammawarp inimage outimage gamma

DESCRIPTION

     gammawarp lightens or darkens an image by changing the gamma. A gamma

     value that is less than 1.0 will lighten grey tones, while a gamma value

     that is greater that 1.0 will darken grey tones.

SEE ALSO

     gamcal(6D), gamma(6D)



gendit - perform general image dithering

SYNOPSIS

     gendit inimage.rgb outimage.rgb nr ng nb [-s]

DESCRIPTION

     gendit uses an ordered dither to create an image with fewer colors.  The

     argument nr selects how many levels or red to use, while ng, and nb

     select the number of green and blue levels respectively.  The minimum

     value for nr, ng, or nb is 2.  The total number of colors used will be

     nr*ng*nb.  The "-s" option is used to offset the dither patterns used for

     red, green and blue by 2 pixels.



greyscale - make different patterns

SYNOPSIS

     greyscale outimage.bw xsize ysize patternno

DESCRIPTION

     greyscale generates a variety of different patterns.  A monochrome image

     is created that is xsize by ysize pixels in size.  patternno selects what

     kind of image is created.

     Patternno                Description

     _________________________________________________

         0       ramp [0...255] in the X direction

         1       ramp [0...255] in the y direction

         2       circular ramp pattern

         3       all white image of 255

         4       horizontail stripes white and black

         5       All black except 1% of pixels are in

                 the range [128...255]

         6       black and white checker board pattern

         7       grid pattern

         8       gamma test pattern

         9       gaussian in the x direction

        10       gaussian in the y direction

        11       contrast test image

        12       all black image

        13       all white image

        14       random noise image

        15       circle

        16       rolf

        17       sinusoidal line test image

        18       Bayer threshold image for dithering



grid - generate a 10 by 10 grid

SYNOPSIS

     grid

DESCRIPTION

     grid draws a 10 by 10 grid.  This can be useful for aligning a camera to

     the display.  To exit this program, press any key on the keyboard, or

     RIGHTMOUSE.



halftone - half-tone an image

SYNOPSIS

     halftone inimage outimage freq angle [patternno]

DESCRIPTION

     halftone converts the input image into a halftoned image, using

     Hollaway's technique.  The density of the halftone screen is controlled

     by the floating point value freq.  Smaller values of "freq" make a larger

     dot pattern.  The angle of the halftone patterns is controlled by the

     argument "angle".  The integer argument "patternno" selects the halftone

     pattern.  0 is the default and creates a dot pattern.  A pattern value of

     1 will create a line screen, while 2, 3, 4, and 5 create other halftone

     patterns.



hipass3 - high pass filter an image

SYNOPSIS

     hipass3 inimage outimage mag

DESCRIPTION

     hipass3 performs a high pass filter on an image using a 3 by 3 filter

     kernel.  mag specifies how much to increase the high frequencies.  A

     value of 0.0 will not change the image.  1.0 will significantly increase

     the high frequencies in the image.



iavg - average a set of images

SYNOPSIS

     iavg outimage imgfiles . . .

DESCRIPTION

     iavg averages a set of images.  All the input images must be the same

     xsize and ysize in pixels.



iblend - blend two images using a mat

SYNOPSIS

     iblend inimage1 inimage2 outimage matimg.bw

DESCRIPTION

     iblend blends between inimage1 and inimage2 to create outimage.  Pixel

     values from the image matimg.bw are used to select how much of inimage1

     and inimage2 to use for each pixel.  The output image will be the minimun

     of the input image sizes.



iflip - flip an image

SYNOPSIS

     iflip inimage outimage [x y xy yx 90 180 or 270]

DESCRIPTION

     iflip flips an image in the following ways:  either in the x or y

     direction, with xy the upper-left and lower-right corners are flipped,

     with yx the lower-left and upper-right corners are flipped, or rotates an

     image 90, 180, or 270 degrees in a clockwise direction.



image2vrml - convert an image file into a VRML ImageTexture and indexed

     face set

SYNOPSIS

     image2vrml [ -d ] [ -h | -?  ] [ -e infofile ] [ -i inputfile ] [ -o

     outputfile ] [ inputfile ]

DESCRIPTION

     image2vrml converts a GIF, JPEG, PNG, or SGI image into VRML scene graph

     file format (an ImageTexture node and an indexed face set).



     The program opens the image file to determine the type of image (.e.g.

     GIF), the width and the height. The program generates a VRML file

     containing an ImageTexture and IndexedFaceSet.  To preserve the aspect

     ratio of the image, the indexed face set's width and height are adjusted

     appropriately. The program determines the smaller of the width and height

     of the original image and then sets the corresponding side of the indexed

     face set to one unit length. The longer side is then set to the correct

     aspect ratio, always greater than or equal to 1.0.

OPTIONS

     -d   turn on verbose messages for debugging purposes

     -e   infofile (default is stderr ) directs verbose information into a

          file

     -h|? prints out the usage message

     -i   inputfile (default is stdin )  specify the input file

     -o   outputfile (default is stdout ) specify the output file

EXAMPLES

     image2vrml infile.gif

     image2vrml -i infile.gif -o outfile.vrml

     image2vrml -d -i infile.gif -o outfile -e logfile



imgsize - print the size of an image

SYNOPSIS

     imgsize inimage [-2]

DESCRIPTION

     imgsize prints the xsize, ysize, and zsize of the named image.  If the -2

     option is given, only the xsize and ysize are printed.  This is useful in

     shell scripts that perform a sequence of image processing operations.



imgwrap - shift pixels left one bit.

SYNOPSIS

     imgwrap inimage outimage

DESCRIPTION

     imgwrap shifts image pixel values left one bit.



istat - print the header information of a list of image files.

SYNOPSIS

     /usr/sbin/istat imagefiles . . .

DESCRIPTION

     istat prints the header information of a list of image files.  x/ysize

     give the image's screen size in pixels; zsize is the number of channels

     in the image. An RGB image will typically have three channels, while a

     Monochrome image will use one channel. Min and max are the range of pixel

     intensity values in the image. Bpp describes how many bytes are stored in

     each channel of the image; either 1 byte or 2 bytes.  Type of image can

     be NORMAL, DITHERED, SCREEN, or COLORMAP. Storage refers to the way the

     data is compressed:  rle is a run-length encoded image,  verb is a

     verbatim image which means the data is not compressed in any way.

EXAMPLE

    istat *tif             shows info of all files ending with tif

    istat test*           shows info of all files beginning with the letters test



izoom - magnify or shrink an image

SYNOPSIS

      /usr/sbin/izoom inimage outimage xscale yscale [-i -b -t -q -m or -g]

                                                     [-w blurfactor]

DESCRIPTION

     izoom magnifies or shrinks an image with or without filtering.  xscale

     and yscale are floating point scale factors.  The filtering method is one

     pass, uses 2-d convolution, and is optimized by integer arithmetic and

     precomputation of filter coefficients.  Normally izoom uses a triangle

     filter kernel in both x and y directions.



     The -i (impulse) option causes izoom to do no filtering as the image is

     resized.  The -b (box) option causes izoom to use a box as the filter

     kernel.  The -t (triangle) option is the default.  The -q (quadratic)

     option indicates that a quadratic function should be used as the filter

     kernel.  The -m option uses a Mitchell kernel and the -g option uses a

     Gaussian kernel.  The -w blurfactor option specifies the width of the

     reconstruction filter.  This will effect how blurry the resulting image

     is.  If you want more blur use a larger number.  The default value is

     1.0.



     NOTE: izoom does not work on dithered images which are nothing more than

     color look-up table indices.  To perform any such image processing one

     must first use something like fromdi (in the moregltools subsystem, and

     also can be found in /usr/people/4Dgifts/iristools/imgtools/fromdi.c),

     which converts the dithered image into an RGB image.



max - get the maximum of two images

SYNOPSIS

     max inimage1 inimage2 outimage

DESCRIPTION

     max calculates the maximum of two images and puts the result in outimage.



min - calculate the minimum of two images

SYNOPSIS

     min inimage1 inimage2 outimage

DESCRIPTION

     min calculates the minimum of two images and puts the results in

     outimage.



movie - show a series of images in a sequence

SYNOPSIS

     movie images . . . [-sx]

DESCRIPTION

     movie shows a series of images as a movie.  The -sx option causes the

     movie to be surounded by a white frame.  This program requires all the

     source images on the command line have the same x/y size.



mult - multiply two images

SYNOPSIS

     mult inimage1 inimage2 outimage

DESCRIPTION

     mult multiplies two images.  The value 255 is used to represent 1.0 while

     0 represents 0.0.



hist - compute and display the histogram of an image file.

SYNOPSIS

     /usr/sbin/hist inimage

DESCRIPTION

     hist reads an image file specified by the user, then computes and

     displays the histogram of the image file.  The red hash-marks indicate

     the boundaries of the range of intensities for a given image.  The black

     line starting in the bottom left corner and going up to the top right is

     the indicator of the distribution function of the histogram.

     Pressing LEFTMOUSE will print the pixel value currently under the cursor.



perhist - print percent histogram values for an image

SYNOPSIS

     perhist inimage [minpercent maxpercent] [-3]

DESCRIPTION

     perhist analyzes the histogram of an image and prints two pixel values.

     1 percent of the pixels in the image will less than the first pixel value

     printed, while 99 percent of the pixels will be less than the second

     value printed.  These two pixel values can be used as arguments to

     "imgexp" to increase the contrast of an image with out loosing too much

     detail in the shadows or the highlights.  The default min percent and max

     percent values are 1 perecnt and 99 percent by default, but these values

     can be changed by specifying them on the command line.  The "-3" option

     causes the percent histogram values to be printed independently for each

     channel of a color image.



imgexp - expand the range of pixel values in an image.

SYNOPSIS

     /usr/sbin/imgexp inimage outimage [min max]

DESCRIPTION

     imgexp expands the range of pixel values in an image.  Pixel values less

     than or equal to min are mapped to 0, while pixel values greater than or

     equal to max are mapped to 255.  If min and max are not provided on the

     command line, then the minimum and maximum pixel values in the image are

     used.  This can be used to manipulate the contrast of images.



quant - quantify an image

SYNOPSIS

     quant inimage outimage nlevels

DESCRIPTION

     quant quantifies an image to have n levels.  The output image will only

     have nlevels different pixel values.



rectimg - display a color or BW image on the iris

SYNOPSIS

     rectimg inimage

DESCRIPTION

     rectimg displays a color or black and white image on the iris.  This

     program is a simple version intended primarily for demo use.  This will

     only work on machines that support RGB mode.



repcolor - replace specified colors within an image

SYNOPSIS

     repcolor inimage.rgb outimage.rgb ir ig ib or og ob dist

DESCRIPTION

     repcolor replaces colors in the input image that are within dist of ir ig

     ib within the color or og ob.  The arguments ir, ig, ib, or, og, and ob,

     and dist should be values in the range of 0 to 255.



saturate - change an image's saturation

SYNOPSIS

     saturate inimage.rgb outimage.rgb satval

DESCRIPTION

     saturate changes the saturation of an image.  A satval of 0.0 will make

     the image black and white (no color).  A satval of 1.0 will leave the

     image unchanged.  A satval of 2.0 will double the amount of color in an

     image.



setlum - modifies the luminance on an image

SYNOPSIS

     setlum inimage.rgb inimage.bw outimage.rgb

DESCRIPTION

     setlum modifies the luminance (brightness) of each pixel in the first

     input image (inimage.rgb) to be the same as the pixel value in

     inimage.bw.



shear - shear an image diagonally

SYNOPSIS

     shear inimage outimage slope

DESCRIPTION

     shear diagonally shears an image.  If slope is 1.0, the shear will make

     vertical lines into 45 degree diagonal lines.  If slope is 0.5 the left

     edge of the image gets transformed into a line that goes from the lower

     left-hand corner into the middle of the top edge.



slide - zoom an image up for full screen display

SYNOPSIS

     slide inimage [backno]

DESCRIPTION

     slide zoom an image up to the full screen size for display.  This is

     useful when creating slides by photographing the screen directly.  The

     option backno is used to select the color that the screen should be

     cleared to before drawing the image.  backno can be one of three values,

     0, 1, or 2.  A value of 0 will draw a black background, a value of 1

     draws a white background, and a value of 2 makes the background the same

     color as the lower lefthand pixel in the image.



sub - subtract two images

SYNOPSIS

     sub inimage1 inimage2 outimage

DESCRIPTION

     sub subtracts two images.  This caculates 128+(inimage2-inimage1).



subimg - extract a sub-region from an image

SYNOPSIS

     subimg inimage outimage x1 x2 y1 y2

DESCRIPTION

     subimg extracts a region from an image.  The region to be extracted is

     specified by x1 x2, y1 and y2.  These coordinates are relative to the

     bottom left corner of the image.  Negative values may be used to give

     coordinates from the upper right corner.  To extract an image inset 10

     pixels from a source image use coordinates 10 20 10 20.

WIDESCREEN

     subimg in.sgi out.sgi 1 720 64 513 makes an 720 x 450 image out of an 720 x 576 image



thresh - threshold one image with another

SYNOPSIS

     thresh inimage outimage threshimage

DESCRIPTION

     thresh thresholds one image with another.  The threshimage is repeated to

     tile the entire surface of the input image.  Whenever the input image is

     greater than the threshimage, the output pixel is made 255 otherwise the

     output pixel is made 0.  This can be used to halftone or dither images.



tile - repeats an image in two dimensions

SYNOPSIS

     tile inimage outimage xsize ysize

DESCRIPTION

     tile repeats an image in two dimensions.  An output image that is xsize

     by ysize pixels is created by repeating the input image.



toalias - Convert an IRIS image to an Alias image

SYNOPSIS

     toalias inimage.rgb aliasimage

DESCRIPTION

     toalias converts an IRIS image file to an Alias image format.

SEE ALSO

     fromalias(6D)



tobw

NAME

     tobw - convert a color image to black and white

SYNOPSIS

     tobw colorimage bwimage

DESCRIPTION

     tobw converts a stored color image to black and white and saves it.  The

     color file must already exist as colorimage; the black and white file

     will be named bwimage.



vhist - display a 3-D volume histogram of a color image

SYNOPSIS

     vhist inimage.rgb

DESCRIPTION

     vhist Displays the histogram of a color image using a 3 dimensional

     representation.  The rgb colors of the pixels in the image are mapped

     into x, y and z directions inside a unit cube.  This cubical

     representation can be rotated interactively.