Madagascar2011 - 08 - OTB segmentation and classification

28
1 orfeo-toolbox.org Orfeo Toolbox Segmentation, classification Orfeo Toolbox Segmentation, classification Stéphane MAY [email protected]

description

 

Transcript of Madagascar2011 - 08 - OTB segmentation and classification

Page 1: Madagascar2011 - 08 - OTB segmentation and classification

1

orfeo-toolbox.org

Orfeo Toolbox Segmentation, classification

Orfeo Toolbox Segmentation, classification

Stéphane MAY

[email protected]

Page 2: Madagascar2011 - 08 - OTB segmentation and classification

2

orfeo-toolbox.org

Definition of segmentation

Extract the outlines of different regions in the image

Divide the image the image into regions with pixels which

have something in common

OTB – Monteverdi

Meanshift segmentation module

OTB (integration of ITK library)

Watershed segmentation

Region growing segmentation

Level set segmentation

Hybrid segmentation, etc...

Segmentation Segmentation

Page 3: Madagascar2011 - 08 - OTB segmentation and classification

3

orfeo-toolbox.org

Filtering > Meanshift clustering

Monteverdi – Mean-shiftMonteverdi – Mean-shift

Page 4: Madagascar2011 - 08 - OTB segmentation and classification

4

orfeo-toolbox.org

Menu File > Open

./theme2/extraitIm2_C/Im2_c_extrait.tif

Menu Filtering > Mean-shift clustering

Change radius : 5

Spectral radius : 15

Min region size : 15

Clusters : ON

Change values and Click on Run button

Click on Close button after selecting right set of parameters

See also :

➢ Image filtered / Image clustered

➢See OTB-Software-Guide.pdf for details

Use case 1 : segmentation with mean-shiftUse case 1 : segmentation with mean-shift

Page 5: Madagascar2011 - 08 - OTB segmentation and classification

5

orfeo-toolbox.org

otbSegmentationApplication

Orfeo toolbox - otbSegmentationApplicationOrfeo toolbox - otbSegmentationApplication

Page 6: Madagascar2011 - 08 - OTB segmentation and classification

6

orfeo-toolbox.org

otbSegmentationApplication (1/8)

Page 7: Madagascar2011 - 08 - OTB segmentation and classification

7

orfeo-toolbox.org

otbSegmentationApplication (2/8)

Page 8: Madagascar2011 - 08 - OTB segmentation and classification

8

orfeo-toolbox.org

otbSegmentationApplication (3/8)

Page 9: Madagascar2011 - 08 - OTB segmentation and classification

9

orfeo-toolbox.org

otbSegmentationApplication (4/8)

Page 10: Madagascar2011 - 08 - OTB segmentation and classification

10

orfeo-toolbox.org

otbSegmentationApplication (5/8)

Page 11: Madagascar2011 - 08 - OTB segmentation and classification

11

orfeo-toolbox.org

otbSegmentationApplication (6/8)

Page 12: Madagascar2011 - 08 - OTB segmentation and classification

12

orfeo-toolbox.org

otbSegmentationApplication (7/8)

Page 13: Madagascar2011 - 08 - OTB segmentation and classification

13

orfeo-toolbox.org

otbSegmentationApplication (8/8)

Page 14: Madagascar2011 - 08 - OTB segmentation and classification

14

orfeo-toolbox.org

Command line application : otbSegmentationApplication

Open ./theme2/extraitIm2_C/Im2_c_extrait.tif

Segment homogeneous areas

Save your results

Use case 2 : otbSegmentationApplicationUse case 2 : otbSegmentationApplication

Page 15: Madagascar2011 - 08 - OTB segmentation and classification

15

orfeo-toolbox.org

Menu Learning

SVM classification

K-Means clustering

Monteverdi – Classification modulesMonteverdi – Classification modules

Page 16: Madagascar2011 - 08 - OTB segmentation and classification

16

orfeo-toolbox.org

Menu Learning > K-means

MonteverdiMonteverdi

Page 17: Madagascar2011 - 08 - OTB segmentation and classification

17

orfeo-toolbox.org

Menu File > Open

./theme2/extraitIm2_C/Im2_c_extrait.tif

Menu Learning > k-means clustering (doc OTBSoftwareGuide.pdf)

Training 15%

Number of classes : 5

Iteration number : 100

Convergence : 0.0001

Save your results

Try with several parameters set

Visualization > Viewer > Compare results

Use case 3 : unsupervised clustering with k-meansUse case 3 : unsupervised clustering with k-means

Page 18: Madagascar2011 - 08 - OTB segmentation and classification

18

orfeo-toolbox.org

Menu Learning > SVM classification (1/3)

MonteverdiMonteverdi

Page 19: Madagascar2011 - 08 - OTB segmentation and classification

19

orfeo-toolbox.org

Menu Learning > SVM classification (2/3)

MonteverdiMonteverdi

Page 20: Madagascar2011 - 08 - OTB segmentation and classification

20

orfeo-toolbox.org

Menu Learning > SVM classification (3/3)

MonteverdiMonteverdi

Page 21: Madagascar2011 - 08 - OTB segmentation and classification

21

orfeo-toolbox.org

Menu File > Open

./theme2/IM2/extraitIm2_C/Im2_c_extrait.tif

Menu Learning > SVM Classification

Create several classes (4-5)

➢Add

➢Select polygons (right click to end a polygon)

➢Edit names

➢Change colors

Learn

Display

Use case 4 : supervised classification with SVM (1/2)Use case 4 : supervised classification with SVM (1/2)

Page 22: Madagascar2011 - 08 - OTB segmentation and classification

22

orfeo-toolbox.org

Menu Learning > SVM Classification

Deselect random validation set

Select Display validation

Select your classes 1 by 1

➢Select polygons (right click to end a polygon)

Display

Validate

File > Export selected polygons

Use case 4 : supervised classification with SVM (2/2)Use case 4 : supervised classification with SVM (2/2)

Page 23: Madagascar2011 - 08 - OTB segmentation and classification

23

orfeo-toolbox.org

Filtering

Feature Extraction (1/4)

Monteverdi – Feature extractionMonteverdi – Feature extraction

Page 24: Madagascar2011 - 08 - OTB segmentation and classification

24

orfeo-toolbox.org

Filtering

Feature Extraction (2/4)

Monteverdi – Feature extractionMonteverdi – Feature extraction

Page 25: Madagascar2011 - 08 - OTB segmentation and classification

25

orfeo-toolbox.org

Menu Filtering > Feature Extraction (3/4)

Mean, variance, Gradient, spectral angle

Original data (=> no need to concatenate channels after filtering)

Textures (energy, entropy, contrast, etc)

Morphological filters

Radiometric indexesVegetation (NDVI, ARVI, etc), Soil, Built up, Water

Edge density

Mean shift

Monteverdi – Feature extractionMonteverdi – Feature extraction

Page 26: Madagascar2011 - 08 - OTB segmentation and classification

26

orfeo-toolbox.org

Menu Filtering > Feature extraction (4/4)

Radiometric indexes

➢Vegetation

NDVI, RVI, PVI, etc

➢Soil

BI2

➢Built up

ISU

Monteverdi – Feature extractionMonteverdi – Feature extraction

Page 27: Madagascar2011 - 08 - OTB segmentation and classification

27

orfeo-toolbox.org

Menu File > Open

./theme2/IM2/extraitIm2_C/Im2_c_extrait.tif

Menu Filtering > Feature extraction

Test the following features (See OTB-Software-Guide.pdf for technical

details on algorithms)

➢Original data (=> no need to concatenate channels after filtering)

➢Spectral angle : choose one vegetation pixel

➢Variance, mean

➢NDVI

➢Meanshift filtering, etc.

Menu Learning > K-Means

Menu Learning > SVM (import polygons)

Compare your results

Use case 5 : Segment with Feature extraction Use case 5 : Segment with Feature extraction

Page 28: Madagascar2011 - 08 - OTB segmentation and classification

28

orfeo-toolbox.org

Thank you for your attention !

Monteverdi Monteverdi