Commit 81508e19 authored by Guillaume Pasero's avatar Guillaume Pasero

MRG: get bugfixes from 'release-6.0' into develop

Conflicts:
	CMakeLists.txt
parents a86bb34b b8a0214e
......@@ -192,7 +192,12 @@ Using the Python interface
~~~~~~~~~~~~~~~~~~~~~~~~~~
The applications can also be accessed from Python, through a module
named ``otbApplication``.
named ``otbApplication``. However, there are technical requirements to use it.
If you use OTB through standalone packages, you should use the supplied
environment script ``otbenv`` to properly setup variables such as
``PYTHONPATH`` and ``OTB_APPLICATION_PATH`` (on Unix systems, don't forget to
source the script). In other cases, you should set these variables depending on
your configuration.
On Unix systems, it is typically available in the ``/usr/lib/otb/python``
directory. Depending on how you installed OTB, you may need to configure the
......@@ -202,14 +207,6 @@ becomes available from Python.
On Windows, you can install the ``otb-python`` package, and the module
will be available from an OSGeo4W shell automatically.
In this module, two main classes can be manipulated :
- ``Registry``, which provides access to the list of available
applications, and can create applications
- ``Application``, the base class for all applications. This allows to
interact with an application instance created by the ``Registry``
As for the command line and GUI launchers, the path to the application
modules needs to be properly set with the ``OTB_APPLICATION_PATH``
environment variable. The standard location on Unix systems is
......@@ -218,6 +215,14 @@ available in the ``otb-bin`` OSGeo4W package, and the environment is
configured automatically so you don’t need to tweak
``OTB_APPLICATION_PATH``.
In the ``otbApplication`` module, two main classes can be manipulated :
- ``Registry``, which provides access to the list of available
applications, and can create applications
- ``Application``, the base class for all applications. This allows to
interact with an application instance created by the ``Registry``
Here is one example of how to use Python to run the ``Smoothing``
application, changing the algorithm at each iteration.
......
......@@ -359,10 +359,6 @@ SET( OTB_EXAMPLES_SRCS
${OTB_SOURCE_DIR}/Examples/Markov/MarkovClassification3Example.cxx
${OTB_SOURCE_DIR}/Examples/Markov/MarkovRestorationExample.cxx
${OTB_SOURCE_DIR}/Examples/Markov/MarkovRegularizationExample.cxx
${OTB_SOURCE_DIR}/Examples/Learning/SVMPointSetModelEstimatorExample.cxx
${OTB_SOURCE_DIR}/Examples/Learning/SVMPointSetClassificationExample.cxx
${OTB_SOURCE_DIR}/Examples/Learning/SVMImageModelEstimatorExample.cxx
${OTB_SOURCE_DIR}/Examples/Learning/SVMImageClassificationExample.cxx
${OTB_SOURCE_DIR}/Examples/Learning/SVMImageEstimatorClassificationMultiExample.cxx
${OTB_SOURCE_DIR}/Examples/Classification/SupervisedImageClassificationExample.cxx
${OTB_SOURCE_DIR}/Examples/Classification/MajorityVotingFusionOfClassificationMapsExample.cxx
......
......@@ -380,22 +380,8 @@ class which is most often selected by the whole set of SVM.
\label{ssec:LearningFromImages}
\input{TrainMachineLearningModelFromImagesExample.tex}
%\subsection{Learning With PointSets}
%\label{sec:LearningWithPointSets}
%\input{SVMPointSetModelEstimatorExample}
%\subsection{PointSet Classification}
%\label{sec:PointSetClassification}
%\input{SVMPointSetClassificationExample}
%\subsection{Learning With Images}
%\label{sec:LearningWithImages}
%\input{SVMImageModelEstimatorExample}
%\subsection{Image Classification}
%\label{sec:ImageClassification}
%\input{SVMImageClassificationExample}
%\input{SVMImageEstimatorClassificationMultiExample}
......
......@@ -163,7 +163,7 @@ If you derive this class to implement application C, you will be able to create
Like with standard applications, you have to write a \code{DoInit()} function. In this function,
you should first clean any internal application with the function \code{ClearApplications()}
(the \code{DoInit()} function is called twice in some cases). Then you can
instanciate the internal applications that you want to use (for instance A and B).
instantiate the internal applications that you want to use (for instance A and B).
The function \code{AddApplication()} will do that, based on :
\begin{itemize}
\item The application type (i.e. its official name, such as ExtractROI, BandMath, \dots)
......@@ -221,7 +221,7 @@ types. Let say you want to connect parameter \code{a.out} to parameter \code{b.i
The "Connect()" function may work in favorable cases (see previous paragraph),
but for images, you have two options :
\begin{itemize}
\item Explicitely copy the image pointer from the output image parameter in the input
\item Explicitly copy the image pointer from the output image parameter in the input
image parameter (with functions \code{SetParameterInputImage()} and
\code{GetParameterOutputImage()}). It will connect the pipelines in applications
A and B, to form an "in-memory" connexion. This has to be done between the calls
......
......@@ -146,7 +146,7 @@ public:
// {
ComputePolygonStatistics( imageList, vectorFileList, fileNames.polyStatTrainOutputs );
ComputeSamplingRate( fileNames.polyStatTrainOutputs, fileNames.rateTrainOut, rates.fmt );
SelectAndExtractTrainSamples( fileNames, imageList, vectorFileList, SamplingStrategy::CLASS );
SelectAndExtractTrainSamples( fileNames, imageList, vectorFileList, Superclass::CLASS );
// }
// else // Select training samples base on geometric sampling if no input vector is provided
// {
......@@ -224,4 +224,4 @@ private :
} // end namespace Wrapper
} // end namespace otb
OTB_APPLICATION_EXPORT( otb::Wrapper::TrainImagesClassifier )
\ No newline at end of file
OTB_APPLICATION_EXPORT( otb::Wrapper::TrainImagesClassifier )
......@@ -89,12 +89,13 @@ private:
void DoInit() ITK_OVERRIDE
{
SetName("VectorClassifier");
SetDescription("Performs a classification of the input vector data according to a model file.");
SetDescription("Performs a classification of the input vector data according to a model file."
"Features of the vector data output will contain the class labels decided by the classifier (maximal class label = 65535).");
SetDocName("Vector Classification");
SetDocAuthors("OTB-Team");
SetDocLongDescription("This application performs a vector data classification based on a model file produced by the TrainVectorClassifier application.");
SetDocLimitations("Only shapefiles are supported for now. SQLite format is not supported.");
SetDocLimitations("Shapefiles are supported. But the SQLite format is only supported in update mode.");
SetDocSeeAlso("TrainVectorClassifier");
AddDocTag(Tags::Learning);
......
......@@ -62,10 +62,10 @@ public:
protected:
enum SamplingStrategy
typedef enum
{
CLASS, GEOMETRIC
};
} SamplingStrategy;
struct SamplingRates;
class TrainFileNamesHandler;
......
......@@ -335,7 +335,7 @@ void TrainImagesBase::SelectAndExtractValidationSamples(const TrainFileNamesHand
{
SelectAndExtractSamples( imageList->GetNthElement( i ), validationVectorFileList[i],
fileNames.sampleValidOutputs[i], fileNames.polyStatValidOutputs[i],
fileNames.ratesValidOutputs[i], SamplingStrategy::CLASS );
fileNames.ratesValidOutputs[i], Self::CLASS );
}
}
......
......@@ -95,7 +95,7 @@ protected:
};
/**
* Features information class used to store informations
* Features information class used to store information
* about the field and class name/id of an input vector
*/
class FeaturesInfo
......
......@@ -75,7 +75,7 @@ void TrainVectorBase::DoInit()
// Add a new parameter to compute confusion matrix / contingency table
AddParameter( ParameterType_OutputFilename, "io.confmatout", "Output confusion matrix or contingency table" );
SetParameterDescription( "io.confmatout", "Output file containing the confusion matrix or contingency table (.csv format)."
"The contingency table is ouput when we unsupervised algorithms is used otherwise the confusion matrix is output." );
"The contingency table is output when we unsupervised algorithms is used otherwise the confusion matrix is output." );
MandatoryOff( "io.confmatout" );
......
......@@ -94,7 +94,7 @@ private:
SetName("DimensionalityReduction");
SetDescription("Perform Dimension reduction of the input image.");
SetDocName("Dimensionality reduction");
SetDocLongDescription("Performs dimensionality reduction on input image. PCA,NA-PCA,MAF,ICA methods are available. It is also possible to compute the inverse transform to reconstruct the image. It is also possible to optionnaly export the transformation matrix to a text file.");
SetDocLongDescription("Performs dimensionality reduction on input image. PCA,NA-PCA,MAF,ICA methods are available. It is also possible to compute the inverse transform to reconstruct the image. It is also possible to optionally export the transformation matrix to a text file.");
SetDocLimitations("This application does not provide the inverse transform and the transformation matrix export for the MAF.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso(
......
......@@ -65,7 +65,7 @@ private:
SetDocName("Compute Modulus And Phase");
SetDocLongDescription(
"This application computes the modulus and the phase of a "
"complex SAR image. The input shoud be a single band image with "
"complex SAR image. The input should be a single band image with "
"complex pixels."
);
SetDocLimitations("None");
......
......@@ -214,7 +214,7 @@ protected:
ScalarImageToAdvancedTexturesFilter();
/** Destructor */
~ScalarImageToAdvancedTexturesFilter() ITK_OVERRIDE;
/** Generate the output informations */
/** Generate the output information */
void GenerateOutputInformation() ITK_OVERRIDE;
/** Generate the input requested region */
void GenerateInputRequestedRegion() ITK_OVERRIDE;
......
......@@ -201,7 +201,7 @@ protected:
ScalarImageToHigherOrderTexturesFilter();
/** Destructor */
~ScalarImageToHigherOrderTexturesFilter() ITK_OVERRIDE;
/** Generate the output informations */
/** Generate the output information */
void GenerateOutputInformation() ITK_OVERRIDE;
/** Generate the input requested region */
void GenerateInputRequestedRegion() ITK_OVERRIDE;
......
......@@ -210,7 +210,7 @@ protected:
ScalarImageToTexturesFilter();
/** Destructor */
~ScalarImageToTexturesFilter() ITK_OVERRIDE;
/** Generate the output informations */
/** Generate the output information */
void GenerateOutputInformation() ITK_OVERRIDE;
/** Generate the input requested region */
void GenerateInputRequestedRegion() ITK_OVERRIDE;
......
......@@ -35,7 +35,7 @@ namespace otb
* This image function computes the local histogram of the pixels lying
* in a circular neighborhood around the given position.
*
* Pixel count can be optionnaly weighted by a gaussian kernel with
* Pixel count can be optionally weighted by a gaussian kernel with
* \f$ \sigma = 0.5 radius \f$ so that pixel far from the center position
* account less in the histogram than pixel near the center position.
* This option can be deactivated using the GaussianSmoothing flag.
......
......@@ -72,7 +72,7 @@ protected:
/** GenerateOutputInformation
* Set the number of bands of the output.
* Copy informations from the first image of the list if existing.
* Copy information from the first image of the list if existing.
**/
virtual void GenerateOutputInformation(void);
......
......@@ -71,7 +71,7 @@ namespace otb
* has been associated. This method returns a LabelSetOfSetType,
* which is a std::set<std::set<TLabel> >.
*
* The mass function can be optionnaly initialized from a given
* The mass function can be optionally initialized from a given
* universe set by building the power-set and associating a null mass
* with every elements of this power-set. This allows ensuring that
* two mass functions will share the exact same universe and
......
......@@ -38,7 +38,7 @@ namespace otb
* The main generic virtual methods specifically implemented in each classifier
* derived from the MachineLearningModel class are two learning-related methods:
* Train() and Save(), and three classification-related methods: Load(),
* DoPredict() and optionnaly DoPredictBatch().
* DoPredict() and optionally DoPredictBatch().
*
* Thus, each classifier derived from the MachineLearningModel class
* computes its corresponding model with Train() and exports it with
......
......@@ -135,7 +135,7 @@ public:
protected:
ContingencyTable()
{
SetLabels(LabelList{}, LabelList{});
SetLabels(LabelList(), LabelList());
}
~ContingencyTable() ITK_OVERRIDE {}
void PrintSelf(std::ostream& os, itk::Indent itkNotUsed(indent)) const ITK_OVERRIDE
......
......@@ -43,7 +43,7 @@ namespace otb
* Environment
* The specific absorption coefficient corresponding to brown pigment is
* provided by Frederic Baret (EMMAH, INRA Avignon, baret@avignon.inra.fr)
* and used with his autorization.
* and used with his authorization.
*/
struct DataSpec
......
......@@ -244,7 +244,7 @@ protected:
mutable SarSensor* _sarSensor;
/**
* @brief True iff the product is ground range
* @brief True if the product is ground range
*/
bool _isProductGeoreferenced ;
......
......@@ -80,8 +80,8 @@ protected:
void LinkWatchers(itk::Object * itkNotUsed(caller), const itk::EventObject & event);
/**
* Method to instanciate and register a new internal application
* \param appType Type of the application to instanciate
* Method to instantiate and register a new internal application
* \param appType Type of the application to instantiate
* \param key Identifier associated to the created application
* \param desc Description of the internal application
*/
......
......@@ -208,7 +208,7 @@ endmacro()
#
# MATCH_STRINGS - list of cmake variables that are set in INPUT_FILE.
# - eg: set(OTB_VERSION_MAJOR "5") or set(OTB_VERSION_PATCH 85)
# - It works on both qouted and non-quoted values.
# - It works on both quoted and non-quoted values.
#
# PREFIX - optional prefix string where you need to have the output stored
#
......
diff -burN opencv-2.4.13.2.orig/CMakeLists.txt opencv-2.4.13.2/CMakeLists.txt
--- opencv-2.4.13.2.orig/CMakeLists.txt 2017-04-25 14:05:11.148414719 +0200
+++ opencv-2.4.13.2/CMakeLists.txt 2017-04-25 14:06:05.944787632 +0200
@@ -290,7 +290,9 @@
if(WIN32)
if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH)
- set(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/")
+ #OTB PATCH [BEGIN]
+ set(OpenCV_INSTALL_BINARIES_PREFIX "") # "${OpenCV_ARCH}/${OpenCV_RUNTIME}/")
+ #OTB PATCH [END]
else()
message(STATUS "Can't detect runtime and/or arch")
set(OpenCV_INSTALL_BINARIES_PREFIX "")
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