Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of...

21
1 Automated Classification of Hyperspectral Images using Spatial-Spectral Features Shivani Dhok Ankit Bhurane Ashwin Kothari Department of Electronics and Communication Engineering Indian Institute of Information Technology, Nagpur (IIITN) Authors: Indian Institute of Information Technology, Nagpur (IIITN) C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Transcript of Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of...

Page 1: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

1

Automated Classification of Hyperspectral Images using Spatial-Spectral Features

Shivani Dhok Ankit Bhurane Ashwin Kothari

Department of Electronics and Communication EngineeringIndian Institute of Information Technology, Nagpur (IIITN)

Authors:

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 2: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

Contents:• Hyperspectral Images

• Applications of HSI

• Aim of this work

• Workflow

• Results

• Conclusions

• MATLAB functionalities used

• How MATLAB helped in completion of this work

2Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

[a] https://www.google.com/url?sa=i&source=images&cd=&ved=2ahUKEwjGgbWg6-

3fAhUH448KHXjfB_YQjRx6BAgBEAU&url=http%3A%2F%2Fgip.cs.technion.ac.il%2Flast -projects.html&psig=AOvVaw3aH3Ewzd0C88E-

01Gf_Qrh&ust=1547574627158077

Hyperspectral Image [a]

Page 3: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

Hyperspectral Images• Human eyes see the visible spectrum.

• What if we can think beyond Visible range?

• Hyperspectral imaging, collects and processes information from across the electromagnetic spectrum.

• Contiguous spectral bands.

• Obtain Spectrum of each pixel.

3Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

[b] Electromagnetic Spectrum And Visible Light is a piece of digital artwork by Peter Hermes Furian which was uploaded on March 15th, 2015.

https://pixels.com/featured/electromagnetic-spectrum-and-visible-light-peter-hermes-furian.html

[c] https://media.wired.com/photos/5932433f44db296121d69f91/master/w_749,c_limit/hs-3.jpg0

[d] https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT48z3wzOMfnn1ajievaY3Z5lyCA8T2rGTaIcgPGr6cR2gR5ST0

Visible Spectrum [b]

Single band, Multispectral and Hyperspectral images [c] Multispectral and Hyperspectral images [d]

Page 4: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

Applications of HSI

• Mining and Geology: Identification of minerals and ores.

• Agriculture: Monitoring the development and health of crops.

• Eye care: Diagnosis of retinopathy and macular edema before damage of eyes.

• More applications for HSI are in the fields of: food processing, mineralogy, surveillance, astronomy, chemical imaging, environment….

4Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 5: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

Aim of this work:• To develop an automated algorithm for classification of HSI.

• To increase the classification accuracy of the classification by extracting orthogonal features.

5Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

[e] Extended Random Walker-Based Classification of Hyperspectral Images - Scientific Figure on ResearchGate. Available from:

https://www.researchgate.net/figure/Salinas-data-set-a-Three-band-color-composite-b-Reference-data-c-Color-code_fig4_264564095

[accessed 13 Jan, 2019]

Salinas Data set [e]

Page 6: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

6

Workflow of the method:

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Data Set Resolution Number of Labelled Classes

Salinas-A 86 × 83 × 204 6

Salinas 512 × 217 × 204 16

Botswana 1476 × 256 × 145 14

• Three publicly available datasets were considered: Salinas-A, Salinas and Botswana[9].

Data Set [f]

[f]

https://www.google.com/url?sa=i&source=images&cd=&ved=2ahUKEwinyr3x9e3fAhXBMY8KHTd9A5EQjRx6BAgBEAQ&url=https

%3A%2F%2Farxiv.org%2Fpdf%2F1511.02916&psig=AOvVaw1aHepHK7Xzu_IblRHGZ6zZ&ust=1547575193229150

Page 7: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

7

Feature Mathematical Equation MATLAB Function used

Linear Predictive Coefficients

Coefficients of following predictor equation:

𝐼𝑝𝑛 = −𝐴 2 𝐼’

𝑝𝑛 − 1 − 𝐴 3 𝐼’

𝑝𝑛 − 2 − ⋯− 𝐴 𝑁 + 1 𝐼’

𝑝(𝑛 − 𝑁)

LPC=lpc(D,9);

Wavelet Coefficients [1-4]

Approximate and detailed coefficients obtained after successive decomposition of signal using LPF and HPF.

[c,l]=wavedec(D,3,'db2');

approx=appcoef(c,l,'db2');

[cd1,cd2,cd3]=detcoef(c,l,[1,2,3])

Workflow of the method:Feature Extraction stage:

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 8: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

8

Workflow of the method:Feature Extraction stage:

Feature Mathematical Equation MATLAB Function used

Average energy

𝐸𝑎𝑣𝑔 =

σ 𝑛=1𝑁𝑏

𝐼𝑝 𝑛

max 𝐼𝑝

2

𝑁𝑏

E=sum(D.^2)/length(D));

Fractal Dimension[5] 𝐿 𝑘 =

1

𝑘

𝑖=1

𝑁𝑏

𝐼𝑝 𝑚 + 𝑖𝑘 − 𝐼𝑝 𝑚 + 𝑖 − 1 𝑘𝑁𝑏 − 1

𝑁𝑏 −𝑚𝑘

. 𝑘

FD is the slope of the plot of 𝑙𝑜𝑔(𝐿 𝑘 ) against 𝑙𝑜𝑔(𝑘).

A user defined MATLAB function used in which following inbuilt functions are used:

xl = log10((1:64));

yl = log10(yy(1:64));

p1 = polyfit(xl(index(indexl1:indexl2)),

yl(index(indexl1:indexl2)), 1);

fd = abs(p1(1));

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 9: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

9

Feature Mathematical Equation MATLAB Function used

Entropy[6]𝐸 = −

𝑛=1

𝑁𝑏𝐼𝑝′ (𝑛)

σ𝑛=1𝑁𝑏 𝐼𝑝

′ (𝑛)log2

𝐼𝑝′ (𝑛)

σ𝑛=1𝑁𝑏 𝐼𝑝

′ (𝑛)

Ent=entropy(D./sum(D)));

Rényi Entropy[7] 𝑅𝐸 𝐼𝑝 = −𝑙𝑜𝑔

𝑛=1

𝑁𝑏

𝐼𝑝 𝑛2

RE=-log(sum(abs(D))^2);

Mean

𝜇 =

σ𝑛=1𝑁𝑏

𝐼𝑝′ (𝑛)

σ𝑛=1𝑁𝑏 𝐼𝑝

′ (𝑛)

𝑁𝑏

Mean=mean(D);

Workflow of the method:Feature Extraction stage:

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 10: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

10

Feature Mathematical Equation MATLAB Function used

Standard Deviation

𝜎 =

σ𝑛=1𝑁𝑏 {𝜇 −

𝐼𝑝′ (𝑛)

σ𝑛=1𝑁𝑏 𝐼𝑝

′ (𝑛)}2

𝑁𝑏

Std_dev=std(D);

Kraskov Entropy[8] Ĥ 𝐼𝑝 = −𝜓 𝑘 + 𝜓 𝑁 𝑏 + 𝑙𝑜𝑔 𝑐𝑑 +

𝑑

𝑁𝑏

𝑖=1

𝑁𝑏

𝑙𝑜𝑔 𝜖 𝑖

where, 𝜓(𝑥𝑖) = 𝛤 𝑥 −1𝑑𝛤(𝑥)/𝑑𝑥, 𝜓(𝑥) is the digamma function, 𝑐𝑑 is

the volume of d-dimensional unit ball, for euclidean norm, 𝑐𝑑=

𝜋d/2

𝛤 1+𝑑

22𝑑 ,

𝜖(𝑖) is twice the distance of xi to its kth neighbor.

A user defined MATLAB function used in which following inbuilt functions are used:[~, distEpsilon] = knnsearch(X, X, 'K', k+1,

'distance', distance);

distEpsilon(:, 1) = []; % remove self-

distance (all zeros)

Cd = pi^(nVariables/2)/gamma(1nVariables/2);

H = psi(nSamples) - psi(k) + log(Cd) +

(nVariables / nSamples) *

sum(log(distEpsilon(:)));

Workflow of the method:Feature Extraction stage:

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 11: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

11

Workflow of the method:Classification stage:

Selecting the input and validation method

Selecting Classification Learner App

Selecting the desired classification machine

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 12: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

12

Workflow of the method:Classification stage:

Classification results in confusion

matrix

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 13: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

13

Workflow of the method:Performance Evaluation stage:

Overall Accuracy

Average Accuracy

Kappa Coefficient

The confusion matrix obtained is used for calculating performance parameters.

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 14: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

14

Results for Salinas-A Data set:

Sr. No. CLASS (SAMPLES)ACCURACY

QUADRATIC SVM

1 Brocoli_green_weeds_1 99.74

2 Corn_senesced_green_weeds 99.40

3 Lettuce_romaine_4wk 99.51

4 Lettuce_romaine_5wk 99.93

5 Lettuce_romaine_6wk 99.26

6 Lettuce_romaine_7wk 99.37

OVERALL ACCURACY 99.70

AVERAGE ACCURACY 99.54

PREDICTION SPEED (obs/sec) 32000.00

TRAINING TIME (sec) 5.87

LPC 96.90

ɸ+LPC 97.80

ɸ+LPC+σ 99.00

ɸ+LPC+σ+µ 99.00

ɸ+LPC+σ+µ+Eavg 98.90

ɸ+LPC+σ+µ+Eavg+FD 99.40

ɸ+LPC+σ+µ+Eavg+FD+E 99.50

ɸ+LPC+σ+µ+Eavg+FD+E+RE 99.60

ɸ+LPC+σ+µ+Eavg+FD+E+RE+Ĥ 99.60

Class-wise and overall performance for Salinas-A

Cumulative performance of the Features

Pictorial representation of cumulative performance of the Features

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 15: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

15

Results for Salinas Data set:

Sr. No. CLASS ACCURACY

QUADRATIC SVM

1 Brocoli_green_weeds_1 99.61

2 Brocoli_green_weeds_2 99.84

3 Fallow 98.79

4 Fallow_rough_plow 99.35

0 Fallow_smooth 99.03

6 Stubble 99.92

7 Celery 99.86

8 Grapes_smooth 87.34

9 Soil_Vinyard_develop 99.82

10 Corn_senesced_green_weeds 94.99

11 Lettuce_romaine_4wk 98.31

12 Lettuce_romaine_5wk 99.95

13 Lettuce_romaine_6wk 99.24

14 Lettuce_romaine_7wk 97.94

15 Vinyard_untrained 67.31

16 Vinyard_vertical_trellis 99

OVERALL ACCURACY 92.4

AVERAGE ACCURACY 98.15769231TRAINING TIME (sec) 8034.8

PREDICTION SPEED (obs/sec) 6200

LPC 85.90

ɸ+LPC 88.80

ɸ+LPC+σ 90.20

ɸ+LPC+σ+µ 90.30

ɸ+LPC+σ+µ+Eavg 90.40

ɸ+LPC+σ+µ+Eavg+FD 91.00

ɸ+LPC+σ+µ+Eavg+FD+E 91.10

ɸ+LPC+σ+µ+Eavg+FD+E+RE 92.30

ɸ+LPC+σ+µ+Eavg+FD+E+RE+Ĥ 92.40

Class-wise and overall performance for Salinas

Cumulative performance of the Features

Pictorial representation of cumulative performance of the Features

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 16: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

16

Results for Botswana Data set:Sr. No. CLASS

ACCURACY

QUADRATIC SVM

1 Water 99.26

2 Hippo grass 88.12

3 Floodplain grasses 1 91.63

4 Floodplain grasses 2 90.70

0 Reeds 1 81.40

6 Riparian 75.46

7 Firescar 2 96.53

8 Island Interior 94.09

9 Acacia Woodlands 85.03

10 Acacia Shrublands 85.48

11 Acacia Grasslands 92.46

12 Short Mopane 92.27

13 Mixed Mopane 90.30

14 Exposed Soils 95.79

OVERALL ACCURACY 89.50

AVERAGE ACCURACY 89.89428571TRAINING TIME (sec) 11.212

PREDICTION SPEED (obs/sec) 5000

LPC 48.60

ɸ+LPC 72.00

ɸ+LPC+σ 81.40

ɸ+LPC+σ+µ 81.30

ɸ+LPC+σ+µ+Eavg 84.90

ɸ+LPC+σ+µ+Eavg+FD 86.60

ɸ+LPC+σ+µ+Eavg+FD+E 86.50

ɸ+LPC+σ+µ+Eavg+FD+E+RE 89.30

ɸ+LPC+σ+µ+Eavg+FD+E+RE+Ĥ 89.50

Class-wise and overall performance for Botswana

Cumulative performance of the Features

Pictorial representation of cumulative performance of the Features

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 17: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

17

• The proposed method can be used for classification of HSI.

• The method provides an outstanding accuracy in classification.

• The method, for the first time uses LPC as a feature which shows a great predominance in classification of accuracy.

• In this process, data preparation and feature extraction plays a vital role.

• The synergistic effect of the features is observed, which allows a significant increases in accuracy.

Conclusions:

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

The Presented work has been accepted at the 6th International Conference on Signal Processing and Integrated Networks (SPIN 2019)

( http://www.amity.edu/spin2019/ )

Page 18: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

18

MATLAB Functions used:

• Basic Math Tool Operations(Basic mathematical and statistical inbuilt functions like sum(), mean(), entropy(), log(), log10(), max(), std(), length(), abs(), lpc(), polyfit(), etc.)

• Signal Processing Tool Box(Wavelet decomposition: [c,l]=wavedec(D(k,1:145),3,'db2');

approx=appcoef(c,l,'db2');

[cd1,cd2,cd3]=detcoef(c,l,[1,2,3]);)

• Machine Learning Tool Box(Classification Learner)

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 19: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

19

How MATLAB helped in this work

• Most of the features used had inbuilt functions in MATLAB.

• The features which didn’t have MATLAB functions were easily computed using some other inbuilt functions.

• The classification learner in the Machine Learning toolbox have inbuilt previously modelled classification machines.

• Availability of modelled classification machines, reduced the time required for modelling. Only training time was required.

• MATLAB helped in reducing the computation time.

• It made implementation of the algorithm easy.

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 20: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

20

References:

[1] L. Jackson, Digital Filters and Signal Processing. Bibliyografya Ve Indeks, Springer US, 1996.[2] S. G. Mallat, “A theory for multiresolution signal decomposition: The wavelet representation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 11, pp. 674–693, July 1989.[3] I. Daubechies, Ten Lectures on Wavelets. Society for Industrial and Applied Mathematics, 1992.[4] Y. Meyer, Wavelets and Operators, vol. 1 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1993.[5] T. Higuchi, “Approach to an irregular time series on the basis of the fractal theory,” Physica D: Nonlinear Phenomena, vol. 31, no. 2, pp. 277 – 283, 1988.[6] R. Gonzalez, R. Woods, and S. Eddins, Digital Image Processing Using MATLAB. Pearson Education, 2004.[7] A. R´enyi, “On measures of entropy and information,” in Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Contributions to the Theory of Statistics, (Berkeley, Calif.), pp. 547–561, University of California Press, 1961.[8] A. Kraskov, H. St¨ogbauer, and P. Grassberger, “Estimating mutual information,” Phys. Rev. E, vol. 69, p. 066138, Jun 2004. [9] C. I. G. (GIC), “Hyperspectral remote sensing scenes.” http://www.ehu. eus/ccwintco/index.php/Hyperspectral Remote Sensing Scenes.

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006

Page 21: Automated Classification of Hyperspectral Images using ...€¦ · Automated Classification of Hyperspectral Images using Spatial-Spectral Features ... food processing, mineralogy,

21

Thank You!

Indian Institute of Information Technology, Nagpur (IIITN)C/o Regional Telecom Training Centre (RTTC), Seminary Hills, Nagpur - 440006