Nelson Image Processing Libraries

Over the years I have accumulated a lot of image processing code using an in-core image format. Much of it is usable, and is organized into accessible libraries. The best developed parts of it are the libraries libutility.a, libimage.a libgraphics.a and libfeature.a in /u/nelson/programs/lib/[SunOS | Solaris | DigitalUnix | PCLinux | PCLinux64]. What version you use depends on whether you are linking on an old SunOS machine (few if any left), a Solaris Machine (only a few special purpose machines around), an alpha machine (also defunct as of 2006) a Linux PC box (running Fedora as of 2008), or a 64bit Linux PC box (there are a few of these around, and likely we will see more of them soon). There are also some programs that use these libraries to perform some miscellaneous operations. The executables are in /u/nelson/bin/[SunOS | Solaris | DigitalUnix | PCLinux | PCLinux64], Source code is with the respective library sources, except in */bin instead of */lib.

In order to use these libraries and the image format, you have to include the .h file corresponding to the library from the list ( utility.h image_proc.h graphics.h image_feature.h curve.h segment.h) in your program, and link in the appropriate libraries, as well as the iff library /usr/vision/lib/libiff.a,

You also need a bunch of system libraries, starting with the X11 library, and libraries for various image formats. Where these are depends on the operating system For example the Xll library is in the following places for the specified operating systems. /usr/staff/lib/libX11.a (SunOS), /usr/openwin/libX11.a (Solaris), /usr/X11R6/lib/libX11.a (Fedora) If you use the routines to read pgm format files, you need the pgm libraries (/usr/lib/libnetpbm on Fedora). For tiff, you need /usr/lib/[libtiff.a libjpeg.a and libz.a]. For jpg and png you need /usr/lib/libjpeg.a and /usr/lib/libpng.a (on Fedora). Note that I have specified static libraries. There are also dynamically loaded versions of most of them, which you may get it you use the -l compiler option, depending on how your defaults are set up.

One example of doing this, for a program called find_curves (which uses everything mentioned) is the following Makefile fragment, here set up for the Fedora Linux we use on most of the department machines.

    INCDIRS = -I/usr/vision/include \\
              -I/u/nelson/programs/include \\
    ### Libraries. Order is important since functions
    ### in image.a depend on functions in utility.a
    IPPLIBS = -L/u/nelson/programs/lib/SunOS -lfeature -lgraphics \
              -limage -lutility
    MISCLIB = -L/u/nelson/programs/lib/SunOS -lmisc.a
    IFFLIB = -L/usr/vision/lib -liff
    XLIB = -L/usr/staff/lib -lX11
    PGM_LIBS = -L/usr/lib -lnetpbm
    TIFF_LIBS = -L/usr/lib -ltiff -ljpeg -lz
    PNG_LIBS = -L/usr/lib -lpng
    JPG_LIBS = -L/usr/lib -ljpeg 
            $(TIFF_LIBS) $(PNG_LIBS) $(JPG_LIBS) $(XLIB) -lm
    find_curves: find_curves.o
   	cc find_curves.o $(LIBS) -o find_curves

-lsunmath is needed on Solaris machines, since they dumped some of the old -lm functions there for some reason.

There are other libraries with routines for motion extraction, real-time tracking, and even object recognition which might be useful for some applications. They are also a little less well cooked, but feel free to poke around. There is also a library of miscellaneous routines libmisc.a (sorting, angular computations, etc). These are needed in some of the feature-finding routines.

Back to vision course main page