CS 385 : Team Geoclast

Figure 1 : Sigmaclast

Introduction

Our team is responsible for the detection of sigmaclasts within rock formations and mineral samples. A sigmaclast is a sigma, delta, or fish like formation within a rock sample (Figure 1). For the scope of this project, we limited our responsibilities to the isolation of sigmaclasts within an image by applying various different filters. The primary challenge with this project is that the image detection should be resistant to change of material composition. The data utilized was provided by the Geology department at Sonoma State University. To best accomodate for variance in images we pursued the following filters and concepts:

  1. Anisodiff
  2. Gabor filter bank
  3. Texton Forests
  4. Schmitt filter
  5. Opening
  6. Closing
  7. Leung-Malik filter bank
  8. Canny Edge detection
  9. Total Variation L1

We evaluated the result of any filters efficacy using both the bag of words model for feature detection and plotting our results on a ROC curve (since we are only concerned with binary classification). The anisotropic filter was usually able to achieve the best results with a ~90% recognition rate. Unfortunately, the primary method for sigmaclast detection, Texton Forests, proved to be inconclusive when given the current data, and the bag of words/sift methodology yielded similar results regardless of the filters applied to images.

Filter Approaches

Closing & Opening
Closing, the process of dilating and then eroding, is primarily utilized to reduce salt and pepper like noise within our data. Opening, the process of eroding and then dialating, is utilized to better define the sigmaclasts within an image.
%Closing, for opening swap lines 4 and 5
img = imread("data.jpg");
img = rgb2gray(img);
se = strel('disk',5);
img = imdilate(img, se);
img = imerode(img, se);
Anisodiff filter
The Anisodiff filter responds highly to low contrast edges, blurring them, and less so to high contrast edges, causing them to stand out in the image.
%Utilizes a function found at: http://www.peterkovesi.com/matlabfns/#anisodiff
img = imread("data.jpg");
img = rgb2gray(img);
img = anisodiff(img, 100, 20, 0.25, 2);
img = uint8(img);
figure(img);

Anisodiff results:

Texton Forest
The texton forest takes a series of training images with corresponding ground truth images as input. Since we are only classifying images as sigmaclast or no sigmaclast, out ground truth images only have two colors, with green denoting where the sigmaclast appears in the image.
Ground Truth Image Example:
The Texton forest then generates a new ground truth image for the test image based off of similarities found in the training set. As you can see, the texton forest appeared to primarily identify objects based off of color rather than shape.
Ground Truth Image Example:
Schmitt Filters
The Schmitt filter is a filter bank of 13 different filters that respond highly to symmetry within an image. For example, line would have a weak response whereas a 2D shape would have a strong response. The filter works to suppress lines.
%Schmitt filter code can be found at http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html
img = imread("data.jpg");
img = rgb2gray(img);
SF = makeSfilters; % generate the filters
i=13; % choose a filter from the bank
sr(:,:,i) = conv2(b,SF(:,:,i), 'valid'); % apply a rotation and filter to the image
img = uint8(sr(:,:,i)); % convert back into a uint8 for display ability.
Gabor Filters
The Gabor filter is a filter bank that responds significantly to gradients and structures with a specific direction.
img = imread("data.jpg");
img = rgb2gray(img);
gaborArray = gabor([4 8],[0 90]); % generate the number of filters and direction they are sensitive to
gaborMag = imgaborfilt(img, gaborArray); % apply the filters to the image
Canny Edge Detection
Canny edge detection is the detection of edges within an image by identifying the gradients with the maximum intensity. Undesired edges are further suppressed using hysteresis.
Canny Edge Example:

Some figures

Filter Applied Accuracy of Filter Sample true positives False positives False negatives
no filter 0.85
anisodiff 0.85
anisodiff_canny 0.825
anisodiff_tvl1 0.80
canny 0.825
closing 0.875
opening 0.875
total variation denoising 0.85
tvl1_anisodiff 0.825
Filter Applied Accuracy of Filter Sample true positives False positives False negatives

Conclusions

While 90% accuracy in the classification of images is good, further experimentation into filter banks may yield better results. Additionally, we would like to extract what features contribute to this classification. We would like to modify the labeling factors for texton forests to be dependant on shape rather than color intensity. Finally we would like to apply ground truth images to the bag of words model in order to apply a frame of reference for features.