The DipTools Library Specification


  1. The Header file
    1. The API header files are given here. You are supposed to include this header file in your source and follow this API. Implement the API exactly as given. In case you feel there are inconsistencies in the API report the same immediately.
    2. If you have trouble figuring out the comments in the API, here is a doxygen generated documentation of the same.
    3. Put all your source in a file. If you do not want to put everything in one source file, use the given header file as a wrapper over your headers.
    4. Make sure that you conform to the most current version of this API. Last API Revision done on : 22 Aug, 11:03 am
  2. The Library -
    1. Use ar to generate a libdiptools.a library. Here is one way to do it -
      ar -r -ps libdiptools.a $(OBJS)

      where $(OBJS) is a collection of all your *.o files. Read the ar man page to understand that command.
    2. Another option is to use ld with the -shared option to make shared libraries. Read the ld man page to figure out how to do this.

Image Access Issues

  1. You will write your own code to access (i.e. read/write) PGM (grayscale) images. The PGM format is explained in detail here. You may use the ascii/raw variant.
  2. You will NOT use Horatio, ImageMagick or Gandalf or any other library for the same purpose.
  3. Make sure that the images you write are viewable in xv or gimp.

The Frontend

  1. Use Ncurses to develop simple frontend application for your library.
  2. The frontend should allow the user to load images and access all the functions in the API.
  3. A Ncurses How-To may be found here.

C++ References

  1. C++ Annotations (Locally Mirrored)
  2. Thinking In C++ - Vol 1 (Locally Mirrored)
  3. Thinking In C++ - Vol 2 (Locally Mirrored)

Do's and Dont's

  1. Do not mangle the API in any way. It will be tested with a test application and if the application does not run marks will be deducted.
  2. You must use Makefiles for compilation. Compilation errors will be penalized heavily.


  1. Make a html report of the results of various functions you implement illustrating their effects on various images.

CS783 : Digital Image Processing Course , Semester I : 2003-2004,
Department of Computer Science and Engineering, IIT Delhi.