Hi,

I don't quite understand what you want to do :  train a classifier at each date using either landsat bands or (landsat bands + ndvi) ? If yes the normal process would be to compute the NDVI of each L8 image and stack it to the corresponding L8 image, so that you have a time series of (L8+ndvi) images. But you can also stack all the dates together and then use the right field names to perform training.

The band numbers to compute NDVI should correspond to the band order of your L8 images (for otbcli_RadiometricIndices, first band is band 1). It seems correct.

What are the values of variables ${bands} and ${ndvi} ?

In the stack 'alldates2014_avignon_landsat.TIF', you should compute correctly the field names to use.

Guillaume

On 02/15/2017 11:05 AM, michel M wrote:
many thanks Guillaume ,
see my code below ...
The number of the channels are good ? if yes , i don't see my error
see you
Michel

otbcli_ConcatenateImages.bat -il LAND*.TIF -out alldates2014_avignon_landsat.TIF uint16

for f in LAND*.TIF; do  otbcli_RadiometricIndices.bat -channels.blue 2 -channels.green 3 -channels.red 4 -channels.nir 5 -in "$f" -out "NDVI_$f" -list Vegetation:NDVI; done
(good number ???)

otbcli_ConcatenateImages.bat -il NDVI*.TIF  -out alldates2014_avignon_landsat_nvdi.TIF uint16
otbcli_ConcatenateImages.bat -il alldates2014_avignon_landsat.TIF alldates2014_avignon_landsat_nvdi.TIF  -out alldates2014_avignon_landsat_bandes_et_nvdi.TIF uint16


otbcli_PolygonClassStatistics.bat -in alldates2014_avignon_landsat.tif -vec training_range_rpg.shp -field "code" -out test.xml


otbcli_SampleSelection.bat -in alldates2014_avignon_landsat.tif -field code -vec training_range_rpg.shp  -out training_samples.sqlite -instats test.xml -strategy smallest

otbcli_SampleExtraction.bat -in alldates2014_avignon_landsat.tif  -vec training_samples.sqlite -outfield prefix -outfield.prefix.name band_ -field code

otbcli_SampleExtraction.bat -in alldates2014_avignon_landsat_nvdi.TIF  -vec training_samples.sqlite -outfield prefix -outfield.prefix.name ndvi_ -field code

for i in $(seq 1 7); do var=date$i; otbcli_TrainVectorClassifier.bat -io.vd training_samples.sqlite -cfield code -classifier rf -classifier.rf.max 20 -io.out model.rf -feat ${bands}  | grep Kappa; done OK 

for i in $(seq 1 7); do var=date$i; otbcli_TrainVectorClassifier.bat -io.vd training_samples.sqlite -cfield code -classifier rf -classifier.rf.max 20 -io.out model.rf -feat ${bands} ${ndvi} | grep Kappa; done -- pas de NDVI  !!!!
pas de ndvi






Le mercredi 9 novembre 2016 15:17:40 UTC+1, Guillaume Pasero a écrit :

Hi,

When you want to perform the training, the "feat" parameter should be fed with field names from training_samples.sqlite on which you want to train.

In your pipeline, you should concatenate your NDVI images into one stack ( otbcli_ConcatenateImages) then use this stack to extract the samples values (otbcli_SampleExtraction).

Regards,

Guillaume


On 11/09/2016 11:08 AM, michel M wrote:

hello ,

I have a little question I have 7 images (7 months) Landsat 8 (for a year)

i use this fonction
for f in LAND*.TIF; do  otbcli_RadiometricIndices.bat -channels.blue 2 -channels.green 3 -channels.red 4 -channels.nir 5 -in "$f" -out "NDVI_$f" -list Vegetation:NDVI; done

after i do

ndvi=`for i in $(seq 0 6); do printf "ndvi_$i "; done`

and


otbcli_TrainVectorClassifier.bat -io.vd training_samples.sqlite -cfield code -classifier rf -classifier.rf.max 20 -io.out model.rf -feat ${ndvi}

and i have

2016 Nov 09 11:04:36  :  Application.logger  (INFO) Precision of class [28] vs all: 0.0697674
2016 Nov 09 11:04:36  :  Application.logger  (INFO) Recall of class    [28] vs all: 1
2016 Nov 09 11:04:36  :  Application.logger  (INFO) F-score of class   [28] vs all: 0.130435
2016 Nov 09 11:04:36  :  Application.logger  (INFO) Global performance, Kappa index: 0

there is no vegetation very strange ????

is there the good numbers of channels ?

many thanks

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
 
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
otb-users+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Guillaume PASERO
Responsable technique
Business Unit E-SPACE & Geo Information - Département Image & Applications

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
+33 561 17 64 21 - [email protected]
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
 
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
Guillaume PASERO
Responsable technique
Business Unit ESPACE & GeoInformation - Département Payload Data & Applications

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
+33 561 17 64 21 - [email protected]

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
 
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to