1. The implementaion is done using the C++ binding
to ImageMagick i.e. Magick++. The Magick++ functions for reading,writing,
and displaying the images and pixel
intensities have been used here. All other functions have been written
by me.
2. The routines are totally modular, though not fully object oriented (they can be made so very easily). So they can be easily reused.
3. The implementation works for both greyscale and
colour images. It can detect the type of image automatically and perform
the neccessary fucntions accordingly.
4. The following technical optimizations have been
done during programming -
a) Since Images are generally contiguous
blocks of memory so instead of using complex address calculations, simple
pointer
increments have been
used to scan the pixel intensities.
b) While applying masks usually two
arrays are needed equal to the image size, but only one has been used and
the image
itself as served as
the other array.
c) Repeated calls to functions have
been avoided.
d) All pixel arrays have been passed
by reference.
e) Definition of very explicit destructors
prevent memory leakage problems.
Some things which have had an adverse affect on the programs speed are -
1. Very specific type casting has been done extensively to avoid errors. This has cost a lot in terms of time in some situations.
2. Using the Magick++ interface instead of the native
ImageMagick one probably slows down things a bit, but it is easier to use
and understand, and is a much neater
implementation.
3. Making the programsinteractive to a very high degree
has caused a lot of extra code to be written, which can probably be
made redundant by using better user
interfaces.
Page last updated on 28 January, 2004. | AT cse.iitd.ac.in | © Parag Chaudhuri , 2009 |