Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... ·...

49
Crop Classification Classification

Transcript of Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... ·...

Page 1: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Crop Classification

Classification

Page 2: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Classification

•  Key remote sensing processing technique

•  Placing pixels into thematic categories that correspond to land cover types –  e.g. forest, crops, water, urban, etc.

•  Basis for classification are the spectral signatures of landcover types

Page 3: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic
Page 4: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Landsat TM Bands

Page 5: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Spectral Resolution of Landsat TM

TM Band: 1 2 3 4 5

These bands provide a coarse summary of spectral signatures.

(NIR) (MIR)

Page 6: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Feature Space (2 bands)

Red BV’s

NIR BV’s

0

0 255

255

v

Page 7: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Feature Space

Pixels in the same classes cluster

water

soil

agri

forest

Red BV’s

Infrared BV’s

0

0 255

255

Page 8: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Classification

•  Two essential types of classification – Unsupervised

•  Unsupervised by humans

•  Computer algorithm-based

– Supervised •  Supervised by human(s)

•  Human-trained

•  Algorithms also used

Page 9: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Unsupervised Classification •  Classes are created based on the

locations in feature space of the pixel data

Red BV’s

Infrared BV’s

0

0 255

255

v

Page 10: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Computer Algorithm Finds Clusters

Red BV’s

Infrared BV’s

0

0 255

255

v

Unsupervised Classification

Page 11: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Unsupervised Classification

•  Attribution phase – performed by human

water

Soil

agri

forest

Red BV’s

Infrared BV’s

0

0 255

255

Page 12: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Problems with Unsupervised Classification

Red BV’s

Infrared BV’s

0

0 255

255

v

The computer may consider these 2 clusters (forest and agri) as one cluster The computer may consider

this cluster to be 2 clusters

Page 13: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Supervised Classfication •  We “train” the computer program using

ground truth data

Coniferous trees Deciduous trees

Page 14: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Supervised Classification

Red BV’s

Infrared BV’s

0

0 255

255

v

Sample pixels

Other pixels

Page 15: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Problems with Supervised Classification

Red BV’s

Infrared BV’s

0

0 255

255

v forest

agri

water

Soil

What’s this?

v

Page 16: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

The Result: A Classified Image

Page 17: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Classification scheme (important for both supervised and unsupervised classifications)

•  Classification scheme: the set of classes used to classify an image –  Classes chosen to be appropriate for use of data –  Sufficient number of classes chosen

•  Don’t want pixels that don’t resemble any samples (how would we classify these?)

–  Good to use or adapt standard classification schemes •  Helpful to compare your analysis with other analyses •  Standard hierarchical schemes exist, and you can choose

the level of detail appropriate for your goals –  Common classification systems used in Europe:

»  CORINE (Coordination of Information on the Environment) »  LCCS (Land Cover Classification System)

Page 18: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Key advantages of supervised classification (relative to unsupervised)

•  Images using supervised classification are more easily comparable to other images (of different dates or neighboring regions).

•  Class definitions are based on data about training samples of known landcover type. –  Potential for higher accuracy

•  Avoids the difficult attribution stage of unsupervised classification.

Page 19: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Key disadvantages of supervised classification (relative to unsupervised)

•  Supervised classification assigns pixels to one of the user-defined classes. Some pixels may represent a landcover type that doesn’t fit one of those classes.

•  One class may have a highly variable signature (possibly bimodal or ‘multimodal’) –  this can hinder the classification process.

•  Getting good, representative training data is important but may not be possible.

•  Process is substantially slower & more expensive than unsupervised.

Page 20: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Break for statistics brief

Page 21: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Concept of Variance

DN value DN value

Low variance High variance

1,000

2,000

3,000

4,000

5,000

3,000

6,000

9,000

12,000

15,000

# of pixels

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

Page 22: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

A Distribution

DN value

frequency

0

5000

10,000

15,000

20,000

0 255

Page 23: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Another Distribution

DN value

0

5000

10,000

15,000

20,000

0 255

Does this distribution have more or less variance than the one on the previous slide?

Page 24: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Variance – covariance

Band #1

Band #2

Band #1

Band #2

In addition to variances for each band, a covariance is calculated which measures how one band tends to vary with the other band.

Positive covariance Negative covariance

Page 25: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Band #1

Band #2

Bivariate distribution Another look

Zero covariance

Page 26: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Distances

Band #1

Band #2

Band #1

Band #2

Distances can be calculated in terms of variances and covariances for each class.

Mean (center) of class Mean (center) of class

The concentric ellipses are densities of points. The more “rings” out from the center a point is, the farther away it is from the center in terms of the variance-covariance of that class.

In terms of variance-covariance, for which class is the green dot near to the mean of that class?

Class 1 (e.g. forest) Class 2 (e.g. urban)

Page 27: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Back to remote sensing: ISODATA method of

Unsupervised Classification

The most commonly used unsupervised method.

Page 28: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

ISODATA Algorithm

Red BV’s

Infrared BV’s

0

0 255

255

v

Assume these are the data of a satellite image to be classified.

Here we only use 2 bands of data, but the process can be generalized for any number of bands.

Page 29: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

ISODATA Algorithm

Red BV’s

Infrared BV’s

0

0 255

255

v

Step 1: ISODATA algorithm creates arbitrary classes to “seed” the process

Class 3 Class 1

Class 5

Class 4

Class 2

Class 6

Class 7

Page 30: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

ISODATA Algorithm

Red BV’s

Infrared BV’s

0

0 255

255

v

Step 2: ISODATA algorithm calculates the mean, variance, and covariance of the data within each class.

Class 3 Class 1

Class 5

Class 4

Class 2

Class 6

Class 7

Class 1 mean

Class 2 mean

Class 3 mean

Class 4 mean

Class 5 mean

Class 6 mean

Class 7 mean

Page 31: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

ISODATA Algorithm

Red BV’s

Infrared BV’s

0

0 255

255

v

Step 3: ISODATA algorithm finds the nearest class mean to each pixel (in terms of variance-covariance distance).

Class 3 Class 1

Class 5

Class 4

Class 2

Class 6

Class 7

Class 1 mean

Class 2 mean

Class 3 mean

Class 4 mean

Class 5 mean

Class 6 mean

Class 7 mean

Pixel in question

Page 32: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

ISODATA Algorithm

Red BV’s

Infrared BV’s

0

0 255

255

v

Step 4: ISODATA algorithm reallocates each pixel to its new class, based on which class mean it’s nearest to.

Class 3 Class 1

Class 5

Class 4

Class 2

Class 6

Class 7

Class 1 mean

Class 2 mean

Class 3 mean

Class 4 mean

Class 5 mean

Class 6 mean

Class 7 mean

Closest to Class 2!

Page 33: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

ISODATA Algorithm

Red BV’s

Infrared BV’s

0

0 255

255

v

Step 5: ISODATA algorithm re-draws the class boundaries to accommodate the new class assignments.

Class 3 Class 1

Class 5

Class 4 Class 2

Class 6

Class 7

Class 1 mean

Class 2 mean

Class 3 mean

Class 4 mean

Class 5 mean

Class 6 mean

Class 7 mean

Page 34: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

ISODATA Algorithm

Red BV’s

Infrared BV’s

0

0 255

255

v

Go back to Step 2: ISODATA algorithm calculates the mean, variance, and covariance of the data within each new class.

Class 3 Class 1

Class 5

Class 4 Class 2

Class 6

Class 7

Class 1 mean

Class 2 mean

Class 3 mean

Class 4 mean

Class 5 mean

Class 6 mean

Class 7 mean

Page 35: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

This iterative process continues until either:

1. A predefined number of iterations finish, or

2.  the proportion of pixels that change classes between iterations becomes less than a predefined threshold.

ISODATA Algorithm

Page 36: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Result of unsupervised classification

•  A map with each pixel assigned to a particular (numbered) class.

•  Next step: attribution – A particular landcover category is determined

and assigned to each numbered class.

– Usually done by the analyst.

Page 37: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Final Result: A Classified Image

Page 38: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Supervised classification

•  Parallelepiped method

•  Maximum likelihood method

Page 39: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Parellepiped Method

Red BV’s

Infrared BV’s

0

0 255

255

Sample pixels are plotted in spectral space using a subset of bands (in this case, 2 bands, so the plot is 2-dimensional).

Field sample pixels

Forest sample pixels

Water sample pixels

Urban sample pixels

Page 40: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Parellepiped Method

Red BV’s

Infrared BV’s

0

0 255

255

Boxes (parallelepipeds) are drawn around the sample pixles of each class.

Field sample pixels

Forest sample pixels

Water sample pixels

Urban sample pixels

Page 41: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

v

Parellepiped Method

Red BV’s

Infrared BV’s

0

0 255

255

Then the full dataset is plotted in this spectral space with the parallelepipeds (all pixels – not just sample pixels).

Field sample pixels

Forest sample pixels

Water sample pixels

Urban sample pixels

Page 42: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

v

Parellepiped Method

Red BV’s

Infrared BV’s

0

0 255

255

All of the image pixels that fall within each parallelepiped are classified as the same class as the sample pixels within that parallelepiped.

Field sample pixels

Forest sample pixels

Water sample pixels

Urban sample pixels

Note: parallelepipeds can be “drawn” in more than 3 dimensions to incorporate as many bands of data as desired.

Page 43: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Parallelepiped Method

•  One of the first methods developed for supervised classification

•  Intuitive •  Leaves some pixels unclassified •  Other methods are more accurate •  A variation on this method is still often used:

–  Instead of the computer algorithm drawing the parallelepipeds, an analyst can draw them

–  Shapes can be of any kind (not confined to parallelepipeds)

–  This can be a good, highly accurate method to classify some or all of an image

Page 44: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Maximum Likelihood Method

Red BV’s

Infrared BV’s

0

0 255

255

Sample pixels are plotted in spectral space using all bands. Here only 2 bands are shown.

Field sample pixels

Forest sample pixels

Water sample pixels

Urban sample pixels

Page 45: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Maximum Likelihood Method

Red BV’s

Infrared BV’s

0

0 255

255

Class means, variances, and covariances are calculated.

Field sample pixels

Forest sample pixels

Water sample pixels

Urban sample pixels

Page 46: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

v

Maximum Likelihood Method

Red BV’s

Infrared BV’s

0

0 255

255

Then each (non-sample) pixel is assigned to the class for which its BV’s are most likely, assuming the distribution of pixels in each class is multivariate normal.

Field sample pixels

Forest sample pixels

Water sample pixels

Urban sample pixels

Pixels that fall below a certain threshold (in terms of likelihood for any class) are sometimes left unclassified, as shown.

Page 47: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Maximum Likelihood •  How is “most likely” determined?

•  Consider the problem in the one band case.

DN values in a particular band (i.e., NIR) 0 255

Distribution of sample pixels in forest class

Distribution of sample pixels in ag/field class

Probability (Probability that a randomly chosen forest pixel has the given DN value)

Page 48: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

Consider curves in terms of probability

•  The height of the curve at each point shows the relative probability that a random pixel in the forest class has that DN value.

•  Area under curve equals 1, since all forest pixels fall somewhere under this curve

DN values in a particular band (i.e., NIR) 0 255

Probability (Probability that a randomly chosen forest pixel has the given DN value)

Distribution of sample pixels in forest class According to the sample

data, forest pixels are more likely to be have this DN value than this DN value

Page 49: Classification - LCLUC Programlcluc.umd.edu/sites/default/files/lcluc_documents/... · Classification • Key remote sensing processing technique • Placing pixels into thematic

How is “most likely” determined?

•  Pixels with a particular DN value are assigned to the class for which the likelihood (probability) is the highest.

•  Therefore, the black vertical line represents the cutoff point for class membership.

DN values in a particular band (i.e., NIR) 0 255

frequency (# of pixels with each DN value)

Distribution of sample pixels in forest class

Distribution of sample pixels in ag/field class

Highest probability = highest Maximum Likelihood

This is generally done with multiple bands (in multiple dimensions).