Contents

  • Xman
  • Dynutils
  • Hvision
  • Khoros
  • Cantata
  • Matlab
  • Mathematica
  • LaTeX
  • FrameMaker
  • Emacs
  • IPS
  • Ximage
  • GTimg
  • Xfig
  • Gnuplot
  • Portable Bitmap Utilities

  • Xman

    Xman is an on-line help utility that runs under the X environment. Select Xman from the menu when running X. You can access the various sections of the manuals by clicking on the Selections button.


    Dynutils

    The Dynamic Allocation Utilities are a set of locally written C routines. These routines are based on the Numerical Recipes memory allocation methodology. They are compatible with the Numerical Recipes subroutines (as far as we know). They allow dynamic allocation of one- and two-dimensional arrays, as well as IO and other useful functions.

    Examples of Subroutines:

    In the above, X can be any of the characters shown below in Table 2.

    b unsigned char (byte)
    f float
    s short int
    d double
    i integer
    c fcomplex (Numerical Recipes struc definition)

    Table 2: List of possible X characters

    Sample usage:
    double ;
    M = dmatrix(0,99,0,99);
    read_dmatrix("matrix.100",M,100);
    There are a number of other routines available. Man pages are available on the trace in /home/trace/doc. Libraries exist for almost all architectures (sun3, sun4, sun386 and trace) and can be found in the /lib directory on these machines. Each library can also be found in /home/trace/lib.`arch`. To incorporate these routines in your programs, you must put the following in your source:

    #include <dsp/dynutils.h>

    To compile a program that uses dynutils, follow this example, where the source is named "gcvgen.c":

    cc -o gcvgen gcvgen.o -ldyn -lm
    make sure that the -lm switch is included and follows the -ldyn switch.


    Hvision

    Hvision is a software package for image processing in particular, and signal processing in general. It consists of the following components:

    In addition to the HVision Utilities, a few special purpose routines have been written at Georgia Tech. The most useful of which are:


    Khoros

    The Khoros system integrates multiple user interface modes, code generators, instructional aids, information pro cessing, and data visualization to produce a comprehensive image/information processing research tool. This system can easily be tailored to other application domains because the tools of the system can modify themselves as well as the system. This attribute is important in a system that is designed to be extensible and portable.

    The Khoros infrastructure consists of several layers of interacting subsystems. A high-level user interface specification (UIS) combined with methods of software development, embedded in a code generation tool set, qualify as a user interface development system (UIDS). An interoperable data exchange format and algorithm library contain the application specific layer. One of the most powerful features of the system is its high-level, abstract visual language, cantata. These basic facilities have been used to build a set of applications for performing image processing research, algorithm development, and data visualization.

    There are several sources of documentation in Khoros. On-line documentation is the HELP that is provided within any of the applications with a graphical user interfaces. Unix style man documentation is available via the vman command. vman provides command searching capabilities with the -k option and printing capabilities with the -p option.

    User and application programmer documentation is available in the labs. There you will find Volume 1, Khoros User's Manual and Volume II, Khoros Programmer's Manual, documentation on the major X Window System application, the UIS and PS file formats, the viff data structure, configuration management of the system, ghostwriter, conductor, preview, composer, and the writing programs in Khoros.

    You must add ~khoros/bin to your path to run khoros. The file ~khoros/dotfiles/khoros_env needs to be added to your environment.


    Cantata

    Cantata provides a visual programming environment for the rapid prototyping of information processing programs based on the Khoros library of routines. To create a program, the user connects together iconified representations of the routines, called glyphs, into a pipeline showing the flow of data between routines.

    Interactions with the user are controlled by the cantata master form. Processing routines are grouped together on subforms which are accessed by the subform buttons located along the top of the master form. Parameters for a routine are entered on it's corresponding subform pane.

    Glyphs can be connected by selecting one glyph's output arrow and another glyph's input arrow. Lighter arrows denote optional input connections. When a connection is established, a temporary file is used to store the intermediate output results to be used by the next routine. These temporary files will be deleted at the end of a session unless specifically saved. The upper three buttons on a glyph will kill the glyph (left), return to the corresponding subform (middle), or execute the routine (right), respectively. The entire flowgraph may be executed using the master action RUN button. When glyphs are running, they are shown in reverse video. Additional language features include the use of programming control structures, an expression parser, and a hierarchy of workspaces (macros).

    For much more detailed information on cantata, see Chapter 2 of the Khoros User's Manual.


    Matlab

    MATLAB is an interactive, matrix-based system for scientific and engineering calculations. You can solve complex numerical problems without actually writing a program. MATLAB is an outgrowth of the LINPACK and EISPACK projects, and has been evolving for a number of years to the current system. The name MATLAB is an abbreviation for MATrix LABoratory. MATLAB can be accessed by typing:

    matlab

    in an xterm window on any of the workstations. More information is available in the manuals located in the labs, or from handouts available at the PPC or in MATLAB User Guide.
    PLEASE DO NOT RUN MULTIPLE JOBS.
    In order to run matlab in the background, you can use the following command:

    nohup nice +10 matlab < filename.m > /dev/null &

    Most likely you will have some type of output from your background job, therefore, include appropriate commands in your filename.m file, i.e save output_file arrays, where arrays is a matrix containing a desire result.


    Mathematica

    Mathematica, released by Wolfram Research Inc., is an environment consisting of two different programs. The kernel is:

    and it can run on about every personal computer and workstation. The Notebook program is When one runs the Notebook program, it will start the kernel in the background, send it the commands you have entered, and display the results. Mathematica can be accessed by typing:

    Xmathematica from markov

    Many campus computers run Mathematica including the Mac clusters in the library and the A. French building and the EE HP cluster in the College of Computing (rooms 310 and 312). These computers support calculus and signals and systems classes, respectively, so the PPC handouts for these classes are excellent introductions to Mathematica.
    More information is available in a brief tutorial available from Lonnie Harvel.


    LaTeX

    LaTeX is a program that allows students, faculty and staff to typeset a document. It can be used for articles, letters, reports, slides and books. It is the defacto standard for document preparation in the CSIP. It is a very powerful tool that requires a good amount of effort to master. With LaTeX you can generate tables, complex mathematical formulas, and include postscript figures. It can automatically produce a table of contents, list of figures, and list of tables. It can produce footnotes and bibliographies. It is a full function document preparation program.

    To successfully use LaTeX, you must have access to the " LaTeX User's Guide and Reference Manual" by Leslie Lamport. This book can be purchased in the Ga Tech Bookstore or can be borrowed from fellow graduate students. There is also a "LaTeX for Engineers" that can be purchased from the bookstore.

    Currently, there are two versions of LaTeX being used in the CSIP: .09 (old version) and .
    To use .09, the following commands must be included in your .cshrc file:

    setenv TEXINPUTS ".:/usr/local/lib/tex/inputs:/usr/lib/tex/macros:/usr/lib
    /tex/inputs"
    setenv XDVIFONTS "/usr/local/lib/tex/fonts/pk:/usr/local/lib/tex/fonts/localpk"
    setenv TEXFONTS "/usr/local/lib/tex/fonts/tfm:/usr/local/lib/tex/fonts/pk"
    set path=(/usr/local/bin $path)
    
    To use , the following commands must be included in your .cshrc file or can be included in any script file:
    # Script written by Joe Monaco
    setenv SWITCH `uname -m | cut -c 1-4`
    setenv TEXINPUTS .::/vol/tex/lib/oldinputs
    unsetenv XDVIFONTS
    set path=(/vol/tex/bin $path)
    if ( "${SWITCH}" == "sun4" ) then
    	set path=(/vol/tex/sun4/bin $path)
    else if ( "${SWITCH}" == "5.3" ) then
    	set path=(/vol/tex/sol/bin $path)
    else if ( "${SWITCH}" == "9000" ) then
    	set path=(/vol/tex/hp700/bin $path)
    endif
    
    For more information regarding the use of either version, refer to any of the manuals described above.

    There is a directory containing templates and style files that are frequently utilized by the CSIP. The directory is either "/usr/local/lib/tex/macros" or "/vol/tex/lib/oldinputs" depending on which version is being used. It is specified by the enviroment variable TEXINPUTS. Included in this directory are templates and style files for slides, thesis, ICASSP, and numerous other documents you will create while pursuing your degree.

    The first step in using LaTeX is creating a "tex" file. You will need to use your favorite editor (vi, emacs, etc) to create a file that has a suffix of ".tex". Once you have created your "tex" file, invoke LaTeX by executing

    latex FILENAME (with or without .tex).

    If you correctly followed the instructions in the User's Guide you should now have a file with a ".dvi" suffix. There will probably be a few other files with different suffix's and these files are covered in the User's Guide. The next step is to preview the document with xdvi (command xdvi filename). If there are problems or mistakes they should be corrected and the revised document reviewed with xdvi. This procedure should be followed until the document is in its final correct form. There is a special spell checker for latex. To invoke the spell checker type

    spelllatex FILENAME.tex

    SEE ALSO: vi, emacs, FrameMaker, Printing


    FrameMaker

    FrameMaker is a relatively new addition to the software used in the CSIP. It is a what you see is what you get desktop publisher in the tradition of the Apple Macintosh. FrameMaker can only be run on the Sun computers under the X Window System. Unlike word processors on some other computers, it should not be used to edit programs or other text files.

    FrameMaker and LaTeX are the two desktop publishing systems available and they are radically different. While LaTeX keeps you from writing documents that are laid out poorly, sometimes it lacks the flexibility to let you do what you want. You also have to shuffle back and forth between editing, processing, and looking at xdvi. In FrameMaker, the screen shows you exactly what the document will look like. You also have the flexibility to lay out the document how you wish, whether or not it is correct. However, even simple documents can sometimes be frustrating until you figure out FrameMaker. The learning curve for FrameMaker is high, and takes a great deal of effort to master. Also, FrameMaker files are not as portable in the academic community as LaTeX files. The primary publishing system used in DSP is LaTeX. If you only want to learn one system, learn LaTeX.

    A FrameMaker document is based on two basic "views" of the document. At the root, for every page of the document there is a "reference page." This page describes how the text on that page will flow. It tells what the margins are, how many columns there are, where the page number goes, and other things. Then there is a "main page" which is where you type your text. The text fits into boundaries defined by the reference page. Many or all pages can use the same reference page. So, if you change the reference page, the text on all main pages that use it will also change. This allows you to easily make changes that will affect your entire document. FrameMaker comes with a large number of templates that already have reference pages set up for things like letters, papers, newsletters, and more. If these fit your needs, you can just type your text and you won't have to think about formatting it.

    There is much more to FrameMaker, but we won't go into that here. Many graphics types can be imported into FrameMaker and if it's the right kind of Postscript, it will even appear on the screen in the document. FrameMaker files can also be transported from any kind of computer to any other as long as they both run FrameMaker. Since there is a FrameMaker for the Mac and for the PC, this allows an easy way to move work from home to school. FrameMaker also has an equation editor which makes it easy to define complicated integrals, equations, and fractions.

    To start FrameMaker, simply type maker and hit return. You probably won't get far without a book, although there is help available in the program (just hit the help button). There are several FrameMaker books available in the library which can usually be checked out from the reserve desk.


    Emacs

    Emacs is a powerful editor. Emacs is actually a Lisp based environment, that can be programmed to do just about anything. To run Emacs simply type emacs at the Unix prompt. Once inside Emacs the user can get help on available commands by typing CTRL-h. Typing CTRL-h t takes the user to the Emacs tutorial, teaching basic commands of Emacs. And CTRL-h i will start interactive help, where the user can learn everything he wants about Emacs. Some useful key-sequences in Emacs are:

    When Emacs starts running, it executes the Lisp commands in the file $HOME/.emacs, so Emacs can be customized (keyboard etc.) for each user. This customized file has lines-colored features (press F6 once in Emacs), set-up commands for LaTeX, Matlab (.m) and html files (.html). In addition, it has a direct e-mail commands and a line numbering mode.
    Emacs can work with more than one file (buffer) at once. After the files have been loaded, the user can switch between buffers by typing CTRL-x b. It is better to have one Emacs running with many files (buffers), than to have many Emacs processes running with one file each (this will slow down your computer). The good thing about Emacs is its flexibility, but its drawback is that it takes alot of memory and it may slow down other processes running on the same computer.


    IPS

    ips is a program for generating postscript figures. This program takes one or more input images and generates one postscript figure. The input files can be raw binary images or postscript files. By using command line flags, the user can set the page format (arrange images, add captions etc.). If the name of the input file ends in .ps, it is assumed to be postscript file, but a binary image file otherwise. The output file can be printed directly on a postscript printer, or included in other documents (e.g. LaTeX using the epsf macro).

    Example: Suppose we want to combine four postscript images into one figure. If the images are: lenna.256, a 256 by 256 binary image; plot.ps, a postscript file; missa, a 352 by 288 binary image; graph.ps, a raw postscript file from Mathematica (not fixed). Then the command

    ips -p2x2 -s256,256 lenna.256 plot.ps -s352,288 missa -M graph.ps -ofig.ps

    will create a postscript figure with the four figures arranged in a two by two format (-p2x2), and write the output to the file fig.ps. On-line help for ips is invoked by the -h flag (type ips -h at the Unix prompt).


    Ximage

    ximage is a 2D interactive data analysis tool that can display color images of data sets in cartesian and polar form. It can display the actual data values in a spread sheet manner and create color contour plots, shaded images, color histograms, and profile plots.

    ximage provides functions for dynamically manipulating palettes. Palette manipulation may be done by changing the component values in RGB, CMY or HSV color models. In addition, the palette may be changed by expansion, compression, rotation or transposition. The user may animate multiple raster images from disk or the X server's memory.

    As input data, ximage takes either 8-bit raster files or HDF(Hierarchical Data Format) files containing either 8-bit raster data or 32 bit floating point data. HDF is a standard data format originally developed at NCSA. As Input palettes, ximage takes in HDF palettes, and 8 bit palettes where the first 256 bytes specify the 256 entries of red, followed by 256 entries of green and then blue.

    One special point is the need to load a palette (this is a button item in the first window). For uniform gray levels from 0 to 255, use the file /database/images/gray.pal. We have complete documentation on the system (ask Lonnie, ldh).


    GTimg

    GTIMG - Georgia Tech IMaGe database file format developed by Stephen A. Martucci as of 4/28/90. Details are in the files "/database/video/README" and "/database/video/DOC".


    Xfig

    Xfig is a 2d object-oriented drawing program that runs under X. Drawings can be composed of many different kinds of elements: lines, polygons, splines, ellipses, text, as well as imported encapsulated postscript bitmaps. Once created, objects can be copied, scaled, moved, rotated, and grouped together to form composite structures. Drawings created in xfig can be exported as postscript or LaTeX commands (as well as other formats), or sent directly to a postscript printer. The program is started by typing xfig.


    Gnuplot

    Gnuplot generates 2d plots. The program has a hierarchical on-line help facility (type help at the gnuplot prompt) as well as man pages describing its features and options. Gnuplot can combine both graphs of functions (like sin x) and imported ascii data files. Gnuplot output can be directed to the screen (in X) or to disk in a wide variety of output formats: postscript, encapsulated postscript, and fig, among others. Files saved in the fig format can be imported and modified by the drawing program xfig. Gnuplot is command oriented: operations are performed by typing commands at the gnuplot prompt. While interactive in nature, gnuplot can also execute sequences of gnuplot commands stored in ascii files. This ability is helpful when fine tuning a plot or producing plots of several similar data sets. The program is started by typing gnuplot while using the X Window System.


    Portable Bitmap Utilities

    The PBM Utilities are a group of programs for converting various image formats to and from portable formats; plus some tools for manipulating the portable formats. The package is broken up into four parts (five parts if you count this one, the zeroth part). First is PBM, for bitmaps (1 bit per pixel). Then there is PGM, for grayscale images. Next is PPM, for full-color images. Last, there is PNM, which does content-independent manipulations on any of the three formats. Table 3 shows a list of some of the formats supported. This is only a sample.

    Format:
    Sun icon file reading writing
    Sun raster file reading writing
    X10 and X11 bitmap file reading writing
    MacPaint reading writing
    CMU window manager format reading writing
    MGR format reading writing
    Group 3 FAX reading writing
    X10 window dump file reading writing
    X11 window dump file reading writing
    ASCII graphics reading writing
    HP Laserjet format writing
    TIFF reading
    PostScript "image" data reading
    Raw Grayscale bytes reading
    Encapsulated PostScript writing
    color Sun raster file reading writing
    GIF reading writing
    color X11 window dump file reading writing
    color Encapsulated PostScript writing

    Table 3: List of portable bitmap utilities supported by the CSIP

    TIPS: Some notes and rules of thumb on using PBM, PGM, PPM, and PNM:

    To make a full-screen version of an image, or as close to it as you can get, compute the ratio x/y for your image and for your screen. If the ratio is higher for your image, do a ppmscale -xsize <screenwidth>; if your image's ratio is lower, do a ppmscale -ysize <screenheight>.

    Even margins: an easy way to get nice equal-sized margins on all sides of a non-full-screen image is to pnmcrop it, get the size and add 10 and pnmpaste the image into the bitmap.

    Smoothing when enlarging: if you pnmenlarge or ppmscale up by a factor of three or more, you should add a ppmsmooth step. Otherwise you can see the original pixels in the resulting image.

    Rotating: as mentioned in its manual entry, pnmflip can be used for 90 degree rotations. Ppmrotate can be used for other angles between -90 and 90. To go all the way around the circle, combine these two programs.

    When using pbmpaste's logical operations to do masking, it is important to remember that while the PBM file for mat represents black as 1 and white as 0, pbmpaste acts as if the reverse is true: black is 0 and white is 1. See the pbmmask manual entry for examples.

    Enhancing contrast in a grayscale image: do a pgmhist, and look for likely values of -bvalue and -wvalue to use with pgmnorm. If you just want to enhance the contrast, then choose values at elbows in the histogram; e.g. if value 29 represents 3 image, then set bvalue to 0 and just fiddle with wvalue; similarly, to darken the image, set wvalue to maxval and play with bvalue.

    Avoid odd-numbered widths. Displaying them causes problems on some machines.

    To turn a Usenix FaceSaver image into PBM: first do an fstopgm > /dev/null. This will tell you whether you need to use ppmscale. Then use one of the following pipelines:

    fstopgm | pnmenlarge -3 | ppmtopgm | pgmnorm | pgmtopbm fstopgm | pnmenlarge -3 | ppmscale -whatever | ppmtopgm | pgmnorm | pgmtopbm

    Enlarging by more than 3 does not look good.

    Re-halftoning with pbmreduce: Let's say you have a scanner that only produces black & white, not grayscale, and it does a terrible job of halftoning (most scanners fit this description). One way to fix the halftoning is to scan at the highest possible resolution, say 300 dpi, and then reduce by a factor of three or so using pbmreduce. Pbmreduce duplicates a lot of the functionality of pgmtopbm - you could do something like

    ppmscale | ppmtopgm | pgmtopbm,

    but pbmreduce is a lot faster and doesn't use as much memory. You can even correct the brightness of an image with pbmreduce, by using the -value flag.