Nicholas Ragosta

CSCI 1430 Project 2

Goal:
To improve on the boundary detection results produced by the canny edge detection method by mapping texture distributions, and computing texture and brightness gradients to distinguish true boundaries from edges in a surface texture.

Method:

Generating a Filter Bank

  1. The first step in creating a texton representation of our input image is to record the image's response to multiple distinct filters.
  2. A bank of derivative gaussian filters of varying size and orientation were created by convolving Gaussian kernals of s different sizes with a Sobel kernal. The resulting derivative gaussian was then rotated o times, so that o orientations for each Gaussian size were created.
  3. The final filter bank contained s*o derivative gaussian filters.

The filter bank used is below. Filters have been resized for display, and a set of center surround filters has been added.

Creating a Texton Map

  1. Next the response to each filter must be obtained and stored.
  2. imfilter is run on the input image for each filter in the filter bank. Each filter response is then stored as a single layer in a 3 dimensional matrix.
  3. The 3 dimensional filter response matrix is then reshaped into a two dimensional maxtrix of size o*s by n*m, where n and m are the horizontal and vertical dimensions of the input image, and o*s is the total number of derivative gaussian filters.
  4. In this two dimensional matrix, each column contains all of the filter responses of a specific pixel in the image.
  5. This matrix is then run through kmeansML, which operates columnwise to group the filter responses into k different textons. kmeansML returns a 1 by n*m vector, each column containing the membership of a specific pixel.
  6. Finally, texton mapping is complete and the 1 by n*m vector is reshaped to the images original (m x n) dimensions.

Generating a Half Disk Masks

  1. To compute texture gradients, a bank of half disk masks must be created.
  2. Disk filters of n different radii are created and then modified so that all non-zero entries are equal to one.
  3. A right and left mask pair are formed by setting all entries on on the left half of the disk to zero for the right mask, and the right entries to zero for the left mask.
  4. These mask pairs are then rotated o times to create o different orienations for each mask pair.
  5. The final half disk mask bank contains n*o different mask pairs.

The half disk mask pairs used are below. Masks have been resized for display.

Calculating Texture and Brightness Gradient Distribution

  1. Each mask pair is applied to each bin value of the texton and brightness map.
  2. For each bin value, the texton or brithness map is first modified so that it equals one wherever the image's bin values match the current bin value, and zero everywhere else.
  3. This binary image is filtered with the left and right masks of a mask pair to create two histograms for each bin value.
  4. Chi square distances are computed for each histogram pair. For each mask pair, k (k is the number of binning schemes) chi square distance matrices are computed.
  5. The k chi square distance matrices for each mask pair are then summed together and divided by 2.
  6. Repeating steps 2-5 for each mask pair creates n*o gradient maps.

Combining Gradient Distributions and Evaluating Results

  1. To produce the final boundary detection image, all texton gradients and brightness gradients are summed together and averaged.
  2. This average is then multiplied element-wise with the results of the canny edge detection method.
  3. The results are then compared to the results produced by the sobel and canny methods and an F score is reported.

Results:

Pblite more accurately determines object boundaries than Canny or Sobel. Sobel often misses object boundaries or mislabels high contrast textures as boundaries. For example, the top left boundary of the birds head and the upper wing of the airplane appear only as faint lines when Sobel is run. Canny is more adept at determining object boundaries than Sobel, the results displayed below show that the true boundaries of the plane and bird are well mapped by Canny. However, canny also is prone to labeling non-boundary, object features as boundaries. For example, many more lines are present on the body of the plane in the Canny result than in the result produced by pblite. Pblite is better able to distinguish textures from true boundaries, this is seen especially in the reduction of cloud outlines in the airplane image.

Original Image Sobel Edge Detection Result Canny Edge Detection Result My Pb-Lite Result


Original Image Sobel Edge Detection Result Canny Edge Detection Result My Pb-Lite Result


Discussion:

By including texture and brightness gradient information, it was possible to outperform both the Sobel and Canny edge detection methods. Below are the evaluations of the results produced. The first graph was created by including the results from the Canny and Sobel methods. An increase in performance was observed by omitting the Sobel results. This is to be expected, as Sobel is the worst performing method and so by including it we are dragging down our performance. A minor increase in performace was obtained by including color gradient information.
Result Including Sobel (Fscore=.59) Excluding Sobel (Fscore=.60) Including Color Gradient (Fscore=.61)