420 likes | 502 Views
Automated Target Recognition Using Mathematical Morphology. Prof. Robert Haralick Ilknur Icke José Hanchi Computer Science Dept. The Graduate Center of CUNY. Outline. Gray Scale Morphology Converting Images to Datasets Decision Tree Classifier Results / Conclusions. Outline.
E N D
Automated Target Recognition Using Mathematical Morphology Prof. Robert Haralick Ilknur Icke José Hanchi Computer Science Dept. The Graduate Center of CUNY
Outline • Gray Scale Morphology • Converting Images to Datasets • Decision Tree Classifier • Results / Conclusions
Outline • Gray Scale Morphology • Converting Images to Datasets • Decision Tree Classifier • Results / Conclusions
Mathematical Morphology • Given an image I EN and a structuring element S EN define the morphological operation of • Dilation and set translation as Dilation is translation invariant
Mathematical Morphology Dilation S I
Mathematical Morphology • Define the morphological operation of • Erosion Erosion is translation invariant
Mathematical Morphology If a structuring element can be decomposed as then
Basic Morphology Operators Opening Closing
Gray Scale Morphology Dilation of f by k Erosion of f by k
Gray Scale Morphology Opening of f by k Closing of f by k
w = 5 h = 5 Structuring Elements Used • We have used flat structuring elements • of size { 3,5,7,9,11,13,15,17,19,21 } • Hw = Horizontal • Vh =Vertical • Bwxh = Box … an illustration
w = 9 Dilation
w = 9 Erosion
w = 9 Opening
w = 9 Closing
9 4 5 14 21 18 12 7 8 3 … The van-Herk-Gil-Werman (HGW) Algorithm—dilationSTAGE 1 • Given the input signal stream and a flat structuring element of size = 3 • x0 , x1, x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13 ,… • center segments located at • x0 , x1,x2, x3 , x4 ,x5x6 , x7 ,x8x9 , x10 ,x11… • example: … take the first segment and find the max (i.e. dilation)…
copy max max 9 4 5 9 5 5 R1 R0 R2 The van-Herk-Gil-Werman (HGW) Algorithm—dilationSTAGE 1.a preprocess the prefixes x0 x1 x2 x3 x4 9 4 5 14 21
max 14 max copy 5 5 14 21 21 S0 S1 S2 The van-Herk-Gil-Werman (HGW) Algorithm—dilationSTAGE 1.b preprocess the suffixes x0 x1 x2 x3 x4 9 4 5 14 21
9 4 5 14 21 max max max number of max operations per window: 9 21 14 5 5 5 14 9 21 S1 R1 S0 R0 S2 R2 The van-Herk-Gil-Werman (HGW) Algorithm—dilationSTAGE 2 merging prefixes and suffixes x0 x1 x2 x3 x4 9 14 21
12 9 4 5 14 21 18 12 7 8 3 … 21 21 18 9 14 21 12 8 12 The van-Herk-Gil-Werman (HGW) Algorithm—dilation • Processing a given input signal for p=3 , segment size=5 • x0 , x1, x2, x3 , x4 , x5, x6 , x7 , x8, x9 , x10 , … …
Calculating Morphological Features in 2-D • The HGW algorithm works on 1-D input • To apply it to 2-D images apply • Horizontal Structuring Elements process the image line by line • Vertical Structuring Elements transpose the image process line by line transpose again • Box shaped Structuring Elements horizontal first, then vertical
Efficiency of Flat Structuring Elements • Given the flat structuring elements H and V • Dilation • Erosion • Opening • Closing • Since and given w = h • Dilation • Erosion • Opening • Closing
Dilation with H5 Original Image
dilation erosion opening closing Using V5 Structuring Element
dilation erosion opening closing Using B5x5 Structuring Element
Outline • Gray Scale Morphology • Converting Images to Datasets • Decision Tree Classifier • Results / Conclusions
… … (3 structural elements) x (10 sizes) x (4morphological operations) = 120 transformed images Using Morphological Operations As Features for a Pixel ground truth image I
class label {t,c}={1,0} f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 f24 Using Morphological Operations As Features for a Pixel ground truth image I Given a pixel … …
Morphological Features Data Set From an Image (x1,f1, x1,f2, x1, f3,... , x1, f119, x1,f120, t) (x2,f1, x2,f2, x2, f3,..., x2, f119, x2,f120, t) (x3,f1, x3,f2, x3, f3,..., x3, f119, x3,f120, c) ... (xN-1,f1,xN-1,f2, xN-1, f3,..., xN-1, f119, xN-1,f120, c) (xN,f1, xN,f2, xN, f3,..., xN, f119, xN,f120, t) D data set representation of I of size N = mxn Ground Truth Image I of mxn pixels
I1 D1 target dataset clutter dataset I2 D2 … … Ik Dk Ik+1 Dk+1 … … DK IK ground truth images training dataset test dataset Preparation Of Data Sets to Train and Test the Classifier Create datasets separate vectors
Outline • Gray Scale Morphology • Converting Images to Datasets • Decision Tree Classifier • Results / Conclusions
Creating a Decision Tree Classifier training dataset create decision tree decision tree parameters test dataset classify classified dataset decision tree test dataset evaluate accuracy classified dataset
true Creating a Decision Tree Classifier f2 Dtraining 0 0 3 0 1 0 1 0 0 f1 > 1 1 0 2 1 0 1 1 0 0 1 0 f2 > 2 f2 > 3 1 1 0 0 0 f1 1 4 true true class 0 class 0 class 1 f1 > 4 • threshold decision rule • max.entropy = 0.001 • max. depth = 20 true class 0 class 1
Outline • Gray Scale Morphology • Converting Images to Datasets • Decision Tree Classifier • Results / Conclusions
Decision Tree Classifier resultsfor test dataset derived fromimages of resolution = 75mm train dataset size = 292,831 vectors test dataset size = 1,783,434 vectors assigned class true class accuracy (% correct classification) = 99.046%
Decision Tree Classifier resultsfor images of resolution = 75mm • 345 images of clutter-only • 44 images with mostly target
Decision Tree Classifier resultsfor test dataset derived fromimages of resolution = 200mm train dataset size = 64,127 vectors test dataset size = 241,842 vectors assigned class true class accuracy (% correct classification) = 99.19%
Decision Tree Classifier forimages with resolution = 200mm • 689 images with mostly clutter • 34 images with mostly target