Project Description

This project is based on the paper Intelligent Scissors for Image Composition, by Eric Mortensen and William Barrett, published in the proceedings of SIGGRAPH 1995. The way it works is that the user first clicks on a "seed point" which can be any pixel in the image. The program then computes a path from the seed point to the mouse cursor that hugs the contours of the image as closely as possible. This path, called the "live wire", is computed by converting the image into a graph where the pixels correspond to nodes. Each node is connected by links to its 8 immediate neighbors. Note that we use the term "link" instead of "edge" of a graph to avoid confusion with edges in the image. Each link has a cost relating to the derivative of the image across that link. The path is computed by finding the minimum cost path in the graph, from the seed point to the mouse position. The path will tend to follow edges in the image instead of crossing them, since the latter is more expensive. The path is represented as a sequence of links in the graph.

The Artifact

After implementing "iscissors", we may use it to select the target rigion, make a mask and finally composite another image via photoshop.

The left-hand images below are the orginal images, and the right-hand images are the corresponding composite production.

Original image: avatar Mask of avatar Composite image: avatar with background

Some other examples:

Original image: lena Composite image: lena with mirror

Original image Composite game

The Mask

Below are the mask images of avatar "example 1" and lena "example 2".

Mask of avatar Mask of lena

People

  • Lianghao LI,
    HK University of Science and Technology, Dept. CSE

  • Haiyan YANG,
    HK University of Science and Technology, Dept. ECE

    Download Testing Images

    lena.bmp avatar.jpg

    Useful Links:

  • COMP 5421 course website
  • Original paper: Intelligent Scissors for Image Composition