Le 08/11/2016 à 13:43, michel M a écrit :
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 ${!var} | grep Kappa; done
otbcli_ImageClassifier.bat -in alldates2014_avignon_landsat.TIF -out
classif.tif uint8 -model model.rf
error: (-5) the input sample must be 1d floating-point vector with the
same number of elements as the total number of variables used for train
Hi,
The problem is that in the for loop, you train the model.rf file for
each date. So the model is tailored for 7 bands. Next, you call
ImageClassifier with this very model (for 7 bands) on an image with all
the bands (49 then). If you want to classify an image with all dates,
you need to train model.rf with all the bands (i.e. using the $bands
variable).
Regards,
Julien
--
Julien MICHEL
CNES - DCT/SI/AP
--
--
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.