Basant Kumar Dwivedi and Anup Gangwar
(2000RCS004 & 2000RCS005)
Department of Computer Science and Engineering, IIT Delhi


  • The tool was developed using ImageMagick-5.2.2. It has been tested on a number of images and seems to work fine. You can find the README file for the tooL here.

Our work at a glance


Introduction :
The exercise required to implement algorithms for lines and circle detection using Hough transform, image segmentation using region growing and interactive image morphing. We also implemented a tool in Java to detect point locations in an image, this was needed for segmentation and to establish feature (points and lines) correspondence during morphing.


Implementation Details :


Interactive Image Morphing :

  • Steps for point based morphing :
    1. Establish the correspondance of the points manually.
    2. Do Delauany triangulation.
    3. For each intermediate image:
      1. Get the intermediate triangles using interpolation.
      2. For each point in the intermediate image:
        1. locate corresponding point in the source and target images using Barycentric co-ordinates.
        2. Deterimine the pixel value using linear interpolation.

  • Steps for line based morphing :
    1. Establish the correspondance of the lines manually.
    2. Apply morphing based on line features as described in [1].


Automatic Image Morphing :

  1. Get the lines using Hough Transform.
  2. Divide the whole image into sectors of square shaped of size nxn. Here n is some power of 2.
  3. Choose the best line in each sector in both source and target image sectors. A number of schemes can be used to select the best lines in each sector. Our scheme is based on selecting the lines of maximum length in each sector. Other schemes could be correlation, dot product etc. Here if a line spans across more than one sector, then the line is broken into the line segments and then considerd as a separate line for different sectors.
  4. Apply morphing based on line features as described in [1].


Hough Transform :
The implementation of Hough trasform was needed for automatic feature detection in image morphing. This required to make considerations for bad and good lines. The problem with normal Hough transform line detection is that if a number of broken lines are collinear then the corresponding accumulator cell will contain a very high value. Due to this, in automatic feature detection we started getting a number of bad or unwanted lines. These lines led to poor feature correspondance and finally poor quality of the automatically morphed image. In order to overcome this, we decided to reject the bad lines (lines with length less than distance threshold). The impementation also contains the required hooks to generate data for gnuplot's splot command. We have used the Laplacian operator for calculating gradient of an image.


Region Growing :
The region growing algorithm uses a simple 8-connectivity check for growing the region. This allows it to grow inside regions which have very narrow openings.

 
  References



[1] Thaddeus Beier and Shaven Neely, "Feature Based Image Metamorphosis", Computer Graphics, 26(2):35-42, 1992.

 
 
 


Last Updated November 19, 2001 Basant Kumar Dwivedi & AnupGangwar