Tutorial OTB/Monteverdi Part 1

34
1 orfeo-toolbox.org Use cases with the Orfeo Toolbox framework Monteverdi Use cases with the Orfeo Toolbox framework Monteverdi

description

Tutorial on OTB/Monteverdi Part 1

Transcript of Tutorial OTB/Monteverdi Part 1

Page 1: Tutorial OTB/Monteverdi Part 1

1

orfeo-toolbox.org

Use cases with the Orfeo Toolbox framework Monteverdi

Use cases with the Orfeo Toolbox framework Monteverdi

Page 2: Tutorial OTB/Monteverdi Part 1

2

orfeo-toolbox.org

Menu File > Open

.//theme2/IM2/Im2_C_02112006_169_388/372596101/SPVIEW01

/IMAGERY.TIF

Menu Visualization > Viewer

(Alternative – right click on the module in the pipeline)

Discover the viewer functionalities

Use case 1 : open an image, and discover the viewer Use case 1 : open an image, and discover the viewer

Page 3: Tutorial OTB/Monteverdi Part 1

3

orfeo-toolbox.org

Visualization

Viewer (1/4)

Monteverdi – ViewerMonteverdi – Viewer

Page 4: Tutorial OTB/Monteverdi Part 1

4

orfeo-toolbox.org

Visualization

Viewer (2/4)

Monteverdi - ViewerMonteverdi - Viewer

Page 5: Tutorial OTB/Monteverdi Part 1

5

orfeo-toolbox.org

Visualization

Viewer (3/4)

Monteverdi - ViewerMonteverdi - Viewer

Page 6: Tutorial OTB/Monteverdi Part 1

6

orfeo-toolbox.org

Visualization

Viewer (4/4)

Monteverdi - ViewerMonteverdi - Viewer

Page 7: Tutorial OTB/Monteverdi Part 1

7

orfeo-toolbox.org

Menu File > Open

./theme2/IM2/Im2_C_02112006_169_388/372596101/SPVIEW01/

IMAGERY.TIF

Menu Visualization > Viewer (lock the pipeline !)

File > Extract ROI from dataset

Positions (x,y) = [1600,1000], sizeX=2000 (w), sizeY=1500 (h)

File > Save dataset

File > Save dataset (advanced)

Save only Channel 1 in Float type

Seel also :

Right click on pipeline module ExtractROI > Show module

Cache dataset

Use case 2 : create a pipeline, save an image Use case 2 : create a pipeline, save an image

Page 8: Tutorial OTB/Monteverdi Part 1

8

orfeo-toolbox.org

File > Extract ROI

Monteverdi - ROIMonteverdi - ROI

Page 9: Tutorial OTB/Monteverdi Part 1

9

orfeo-toolbox.org

File > Save dataset (advanced)

Choice of data type

Choice of output channels

Monteverdi – Save datasetMonteverdi – Save dataset

Page 10: Tutorial OTB/Monteverdi Part 1

10

orfeo-toolbox.org

Menu File > Open

./theme2/IM2/extraitIm2_C/Im2_c_extrait.tif

Menu Filtering > Threshold

Generic Threshold / Threshold Above / Change Lower threshold

Generic Threshold / Threshold Below / Change Upper Threshold

➢Role of outside value

➢Role of alpha (alpha blending) : alpha=0

Generic Threshold / Threshold outside / Change upper & lower th.

Binary threshold / Lower & Upper threshold / Outside & Inside

values

Use case 3 : threshold an imageUse case 3 : threshold an image

Page 11: Tutorial OTB/Monteverdi Part 1

11

orfeo-toolbox.org

Filtering

Threshold

Monteverdi - ThresholdMonteverdi - Threshold

Page 12: Tutorial OTB/Monteverdi Part 1

12

orfeo-toolbox.org

Menu File > Open

./data_tp/theme2/IM2/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_V3.0.pdf p 174

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

Page 13: Tutorial OTB/Monteverdi Part 1

13

orfeo-toolbox.org

Filtering

Meanshift clustering

Monteverdi – Mean-shiftMonteverdi – Mean-shift

Page 14: Tutorial OTB/Monteverdi Part 1

14

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_V3.0.pdf for

technical details on algorithms)

➢Edge detection : Touzi

➢Spectral angle : choose one vegetation pixel

➢Variance

➢Mean

➢Rec. gradient

➢Morphology > Morphology opening

➢Edge density > Sobel

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

Use case 5 : Feature extraction (1/2)Use case 5 : Feature extraction (1/2)

Page 15: Tutorial OTB/Monteverdi Part 1

15

orfeo-toolbox.org

Menu Filtering > Feature extraction

Test the following features (See OTB-Software-Guide_V3.0.pdf for

technical details on algorithms) :

➢Radiometric indexesVegetation

• NDVI, RVI, PVI, etc Soil

• BI2

Built up• ISU

Further work :

➢Rename output image channels

➢Save your result

➢Build Mean, variance image on a Touzi image

Use case 5 : Feature extraction (2/2)Use case 5 : Feature extraction (2/2)

Page 16: Tutorial OTB/Monteverdi Part 1

16

orfeo-toolbox.org

Filtering

Feature Extraction (1/2)

Monteverdi – Feather extractionMonteverdi – Feather extraction

Page 17: Tutorial OTB/Monteverdi Part 1

17

orfeo-toolbox.org

Filtering

Feature Extraction (2/2)

Monteverdi – Feather extractionMonteverdi – Feather extraction

Page 18: Tutorial OTB/Monteverdi Part 1

18

orfeo-toolbox.org

Solution : mean, variance over Touzi image

Reader

Feature Extraction (Reader0) > Touzi

Feature Extraction (FeatureExtraction1) > Mean, Variance

Save your result

Monteverdi – Feather extractionMonteverdi – Feather extraction

Page 19: Tutorial OTB/Monteverdi Part 1

19

orfeo-toolbox.org

Menu File > Open

./theme1/IM2/Extraits/Ext_IM2_04102008_10mC.tif

Menu Filtering > Feature extraction > NDVI

Menu File > Concatenate Image

Add Reader0 → Channel 1

Add Reader0 → Channel 2

Add FeatureExtraction1 → OutputImage

View the result

Use case 6 : concatenate your resultsUse case 6 : concatenate your results

Page 20: Tutorial OTB/Monteverdi Part 1

20

orfeo-toolbox.org

File > Concatenate images

Monteverdi – Concatenate imagesMonteverdi – Concatenate images

Page 21: Tutorial OTB/Monteverdi Part 1

21

orfeo-toolbox.org

Menu File > Open

./theme2/IM2/extraitIm2_C/Im2_c_extrait.tif

Menu Learning > SVM Classification

Create several classes (4-5)

➢Edit names

➢Change colors

➢Select polygons

Learn

Validate

Display

Further work :

Same case with concatenated NDVI channel

Use case 7 : supervised classification with SVMUse case 7 : supervised classification with SVM

Page 22: Tutorial OTB/Monteverdi Part 1

22

orfeo-toolbox.org

Menu Learning > SVM classification (1/3)

MonteverdiMonteverdi

Page 23: Tutorial OTB/Monteverdi Part 1

23

orfeo-toolbox.org

Menu Learning > SVM classification (2/3)

MonteverdiMonteverdi

Page 24: Tutorial OTB/Monteverdi Part 1

24

orfeo-toolbox.org

Menu Learning > SVM classification (3/3)

MonteverdiMonteverdi

Page 25: Tutorial OTB/Monteverdi Part 1

25

orfeo-toolbox.org

Menu File > Open

./theme2/IM2/extraitIm2_C/Im2_c_extrait.tif

Menu Learning > k-means clustering (doc OTBSoftwareGuide_V3.0.pdf p 448)

Training 15%

Number of classes : 5

Iteration number : 1

Convergence : 0.0001

Further work :

Compare with SVM supervised classification

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

Page 26: Tutorial OTB/Monteverdi Part 1

26

orfeo-toolbox.org

Menu Learning > K-means

MonteverdiMonteverdi

Page 27: Tutorial OTB/Monteverdi Part 1

27

orfeo-toolbox.org

Menu File > Open

./reunion_S5/thr1a/imagery.tif

Menu Geometry > Orthorectification

Size X : 220, Size Y : 200

(try larger size with powerful computers)

Spacing X : 10, Spacing Y : -10 (m)

Longitude : -55.4, Latitude : -21.0

UTM / Linear

(=> Module created in pipeline)

Visualization > Viewer (Orthorectifcation0) > Click on Streamed / Cache (This launches the orthorectification).

“Cached” : click on OK to view the image

Use case 9 : orthorectify an image (Spot 5 level 1A) without DEM

Use case 9 : orthorectify an image (Spot 5 level 1A) without DEM

Page 28: Tutorial OTB/Monteverdi Part 1

28

orfeo-toolbox.org

Menu Geometry > Orthorectification (1/2)

MonteverdiMonteverdi

Page 29: Tutorial OTB/Monteverdi Part 1

29

orfeo-toolbox.org

Menu Geometry > Orthorectification (2/2)

MonteverdiMonteverdi

Page 30: Tutorial OTB/Monteverdi Part 1

30

orfeo-toolbox.org

Menu File > Open

./reunion_S5/thr1a/imagery.tif

Menu Geometry > Orthorectification

Size X : 220, Size Y : 200

(try larger size with powerful computers)

Spacing X : 10, Spacing Y : -10 (m)

Longitude : -55.4, Latitude : -21.0

UTM / Linear

DEM : enter the directory where .hgt files are

Visualization > Viewer (Orthorectifcation0) > Click on Streamed / Cache (This launches the orthorectification).

“Cached” : click on OK to view the image

Use case 10 : orthorectify an image (Spot 5 level 1A) with DEM

Use case 10 : orthorectify an image (Spot 5 level 1A) with DEM

Page 31: Tutorial OTB/Monteverdi Part 1

31

orfeo-toolbox.org

Menu Geometry > Superimpose two images

Combination of geometric models of the two images (note : works with

images with geometric model)

➢ Image to be superimposed : use of the direct geometric model to

build Longitude/Latitude projection

➢Combination with the inverse model of the reference image.

➢Reprojection

Use case 11 : Superimpose XS image over THR one (1/2)Use case 11 : Superimpose XS image over THR one (1/2)

Page 32: Tutorial OTB/Monteverdi Part 1

32

orfeo-toolbox.org

Menu File > Open

./reunion_S5/thr1a/imagery.tif

Menu Geometry > Orthorectification

Size X : 220, Size Y : 200

Spacing X : 10, Spacing Y : -10 (m)

Longitude : -55.4, Latitude : -21.0

UTM / Linear

Menu Geometry > Superimpose two images

Image to reproject : J1A / XS image

Reference Image : ortho of THR1A / Panchromatic image

Choose the same DEM model

Visualization > Viewer (Reprojected Image) > Stream / Caching... / Cached

Use case 11 : Superimpose XS image over THR one (2/2)Use case 11 : Superimpose XS image over THR one (2/2)

Page 33: Tutorial OTB/Monteverdi Part 1

33

orfeo-toolbox.org

Menu Geometry > Superimpose two images

Monteverdi – Superimpose two imagesMonteverdi – Superimpose two images

Page 34: Tutorial OTB/Monteverdi Part 1

34

orfeo-toolbox.org

Thank you for your attention !

Monteverdi Monteverdi