Figure 1 : Sigmaclast
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:
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.
%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);
%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);
%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.
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
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 |
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.