Commit 61c04dc3 authored by Ludovic Hussonnois's avatar Ludovic Hussonnois

Merge remote-tracking branch 'remotes/origin/develop' into unsupervised_classif

parents f2227de9 aff350aa
......@@ -4,10 +4,10 @@ Classification
Pixel based classification
--------------------------
Orfeo ToolBox ships with a set of application to perform supervised
pixel-based image classification. This framework allows to learn from
multiple images, and using several machine learning method such as
SVM, Bayes, KNN, Random Forests, Artificial Neural Network, and
Orfeo ToolBox ships with a set of application to perform supervised or
unsupervised pixel-based image classification. This framework allows
to learn from multiple images, and using several machine learning method
such as SVM, Bayes, KNN, Random Forests, Artificial Neural Network, and
others...(see application help of ``TrainImagesClassifier`` and
``TrainVectorClassifier`` for further details about all the available
classifiers). Here is an overview of the complete workflow:
......@@ -347,8 +347,9 @@ using the ``TrainVectorClassifier`` application.
-feat band_0 band_1 band_2 band_3 band_4 band_5 band_6
The ``-classifier`` parameter allows to choose which machine learning
model algorithm to train. Please refer to the
``TrainVectorClassifier`` application reference documentation.
model algorithm to train. You have the possibility to do the unsupervised
classification,for it, you must to choose the Shark kmeans classifier.
Please refer to the ``TrainVectorClassifier`` application reference documentation.
In case of multiple samples files, you can add them to the ``-io.vd``
parameter (see `Working with several images`_ section).
......@@ -409,6 +410,11 @@ class too, based on the
`ConfusionMatrixCalculator <http://www.orfeo-toolbox.org/doxygen-current/classotb_1_1ConfusionMatrixCalculator.html>`_
class.
If you have made an unsupervised classification, it must be specified
to the ``ConputeConfusionMatrix`` application. In this case, a contingency table
have to be create rather than a confusion matrix. For further details,
see ``format`` parameter in the application help of *ConputeConfusionMatrix*.
::
otbcli_ComputeConfusionMatrix -in labeled_image.tif
......
......@@ -1205,7 +1205,23 @@ void GDALImageIO::InternalReadImageInformation()
if ((GDALGetRasterColorInterpretation(hBand) == GCI_PaletteIndex)
&& (hTable = GDALGetRasterColorTable(hBand)) != ITK_NULLPTR)
{
m_IsIndexed = true;
// Mantis: 1049 : OTB does not handle tif with NBITS=1 properly
// When a palette is available and pixel type is Byte, the image is
// automatically read as a color image (using the palette). Perhaps this
// behaviour should be restricted. Comment color table interpretation in
// gdalimageio
// FIXME: Better support of color table in OTB
// - disable palette conversion in GDALImageIO (the comments in this part
// of the code are rather careful)
// - GDALImageIO should report the palette to ImageFileReader (as a metadata ?
// a kind of LUT ?).
// - ImageFileReader should use a kind of adapter filter to convert the mono
// image into color.
// Do not set indexed image attribute to true
//m_IsIndexed = true;
unsigned int ColorEntryCount = GDALGetColorEntryCount(hTable);
......
......@@ -790,7 +790,7 @@ set_property(TEST ioTvImageFileReaderFloatHDR2LUM PROPERTY DEPENDS ioTvImageFile
otb_add_test(NAME ioTvCheckNbBandsPNGIndexee COMMAND otbImageIOTestDriver
otbPNGIndexedNbBandsTest
${INPUTDATA}/sbuv_indexee.png
4 )
1 )
otb_add_test(NAME ioTvImageFileReaderENVI2PNG COMMAND otbImageIOTestDriver
--compare-image ${EPSILON_9} ${INPUTDATA}/cthead1.png
......
......@@ -25,5 +25,5 @@ A more detailed description can be found on the project website:
http://tully.ups-tlse.fr/jordi/otb-bv
"
GIT_REPOSITORY http://tully.ups-tlse.fr/jordi/otb-bv.git
GIT_TAG d13a3b3febe61c3c67777eac8261e07a6257a519
GIT_TAG master
)
......@@ -27,5 +27,5 @@ A more detailed description can be found on the project website:
http://tully.ups-tlse.fr/jordi/phenotb
"
GIT_REPOSITORY http://tully.ups-tlse.fr/jordi/phenotb.git
GIT_TAG 17d69b1bc1f23041dafe265e320b46ffb20229b6
GIT_TAG master
)
......@@ -26,5 +26,5 @@ A more detailed description can be found on the project website:
http://tully.ups-tlse.fr/jordi/temporalgapfilling
"
GIT_REPOSITORY http://tully.ups-tlse.fr/jordi/temporalgapfilling.git
GIT_TAG 14c56cb73250861d8694effeba934cebde09424c
GIT_TAG master
)
......@@ -2515,8 +2515,8 @@ MainWindow
text =
tr( "(%1 %2 ; %3 %4 ; %5)" )
.arg( wgs84[ 0 ]>=0.0 ? "N" : "S" ).arg( fabs( wgs84[ 1 ] ) )
.arg( wgs84[ 1 ]>=0.0 ? "E" : "W" ).arg( fabs( wgs84[ 0 ] ) )
.arg( wgs84[ 1 ]>=0.0 ? "N" : "S" ).arg( fabs( wgs84[ 1 ] ) )
.arg( wgs84[ 0 ]>=0.0 ? "E" : "W" ).arg( fabs( wgs84[ 0 ] ) )
.arg( alt );
}
......
......@@ -161,6 +161,11 @@ private:
*/
Ui::StatusBarWidget * m_UI;
/**
* \brief Change the scale when scaleLineEdit is pressed or editing is finished with change.
*/
void ChangeScale();
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
......@@ -175,6 +180,9 @@ private slots:
/**
*/
void on_pixelIndexLineEdit_returnPressed();
/**
*/
void on_scaleLineEdit_returnPressed();
};
} // end namespace 'mvd'
......
......@@ -217,9 +217,26 @@ StatusBarWidget
}
/*****************************************************************************/
void
StatusBarWidget
::on_scaleLineEdit_returnPressed()
{
ChangeScale();
}
void
StatusBarWidget
::on_scaleLineEdit_editingFinished()
{
if(m_UI->scaleLineEdit->isModified())
{
ChangeScale();
}
}
void
StatusBarWidget
::ChangeScale()
{
//
// Cancel if scale text is empty.
......
......@@ -178,7 +178,7 @@ template <class TInputImage, class TOutputImage>
TOutputImage*
InputImageParameter::CastImage()
{
itkExceptionMacro("Cast from "<<typeid(TInputImage).name()<<" to "<<typeid(TInputImage).name()<<" not authorized.");
itkExceptionMacro("Cast from "<<typeid(TInputImage).name()<<" to "<<typeid(TOutputImage).name()<<" not authorized.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment