Image Segmentation and Evaluation

Susan Fisher
Comp254 - Project 4
Spring 2000

 

Introduction

Statistical Pattern Recognition is a valuable tool in making sense of high-dimensional feature spaces. In this project, the task was to distinguish between horizontal and vertical ovals of varying size. Orientation is not an easy feature to classify. In particular, non-linear features such as folding

A seventy-two dimensional feature space was constructed of linear and non-linear features of the original images. Principle component analysis was applied to determine the most valuable features for use in classification. The methodology is explained in detail, followed by the results.

 

Methodology: Part 1:

Six oval images, three horizontal and three vertical, were generated as training data. The images were created with values of 0.05 for the background, and 0.95 for the oval itself. Each image was then scaled to [-1.0,1.0] to ease later computation, and to allow folding of the dataset.

 

Then, each image was blurred with a gaussian filter of scale=2. The resulting images were analyzed to determine the bounds of the effect of the blur. Any pixels with a value > 0 were selected to be used in the pattern matrix. The visualization of the selected pixels is demonstrated in the next six images.

 

 

 

Part II:

In part two, each image was blurred by six different gaussians through order 2 at six different scales. The resulting images were assimilated into a 36 dimension feature space.

The following gaussian filters were used to blur the images. These figures correspond to a gaussian(0,0), (0,1), (1,0), (1,1), (2,0), and (0,2) respectively. (ie. (m,n) is the mth derivative in x and the nth derivative in y of the gaussian). These particular images are gaussians of scale = 16; however the scales of 2,4,8,32, and 64 were also used.

 

 

Part III: The Feature Space

The first thirty-six features of the feature space is organized in a manner described by the following table. Index "1" of the feature space, for example, is the image blurred with a gaussian(0,0), with a scale of 2.

 

Using a similar method as above, another thirty-six dimensions were generated for each image by using taking gradient magnitude of each blurred image.

  

The gradient magnitude gives information pertaining to the curvature of its surface plot. The following image is one example of the gradient magnitude of an image.

  

 

The last thirty-six features were created by taking the square of each blurred image in features one through thirty-six.

Results

In my statistical analysis I determined the value of the hotelling trace to be 2.0708

>> trace(HOTELLING)

ans =

2.0708

This value was determined by using matlab's "cov" function to find the two covariance matrices for scatter within (multiplied by the number of patterns of course), and finding scatter between by hand. I also tried out matlab's PCA capabilities and made the following plots. The plots represent using the largest eigenvector, the two largest eigenvectors and finally the three largest eigenvectors.

We can see that the result of 2.0708 closely reflects our findings through the projection of the data onto the first principal component. While there is a distinction among the two groups, clearly there is much overlap. Lower Hotelling trace values indicate poor levels of separation between classes.

The remaining plots are unecessary but were generated to satisfy my curiousity.

 

Plot of projection of data onto first principal component

 

 

Plot of projections of data onto first two principal components - Notice the spiral shape at the lower left corner of the plot

 

 

Plot of projections of data onto first three principle components

 

The two features that produced the largest eigenvalues were numbers 65 and 69. Careful attention had to be paid to finding these indices as some features are removed during a "purge" step eliminating duplicate columns.

These features represent the gradient magnitude of each image blurred by a gaussian (2,0) with s=32, and a gaussian (0,1) with s=64.

Just for fun I plotted the values for each of these features... The red color group indicates the vertical ovals. ( I thought this image was beautiful - if you connect the blue dots, it's very flower-like!)

 

 

Conclusions

The features that were selected as principal components were both gradient magnitudes. The Gradient magnitude is invariant to orientation, intensity, and edge polarity. Thus since we are dealing with an orientation classfication problem, no feature in the given feature space sufficiently separates the two classes. We can see the difference in the two classes in the first plot. However, there are many points which would be nearly impossible to classify (consider looking at the plot with no color). Since the two gradient magnitudes were measured at different scales, we can say that they incorporate some second-derivative information. Other non-linearities would have to be explored to obtain a better classification.

Several other features were also explored, akin to the Poster by Coggins. I tried squaring blurred images, taking differences between scales, and more. None of these produced "spectacular" results. Orientation cannot be classified by linear operators, but it also requires more complex non-linear operators than were tested in this project.

In conclusion, both linear and nonlinear transformations have specific tasks for which they succeed and others for which they will fail. Recognizing that non-linear features may need to be added for difficult classification problems is a vital element in statistical pattern recognition.

 

References

J. M. Coggins, "Non-linear Feature Space Transformations", Digest of IEE Symposium on Applied Statistical Pattern Recognition, Birmingham, U.K. April 20, 1999.

Poster: "Nonlinear Feature Space Transformations" supplement to the paper