Commit d6a9b0d3 authored by Victor Poughon's avatar Victor Poughon

Merge branch 'develop' into use_Functor_Filter_in_AppImageUtils

parents 49964234 a0fa5e29
......@@ -5,4 +5,4 @@
export PYTHONPATH=@PYTHONPATH_COOKBOOK@:$PYTHONPATH
export OTB_APPLICATION_PATH=@CMAKE_BINARY_DIR@/lib/otb/applications
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py -o "$1"
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py "$1"
......@@ -120,6 +120,8 @@ set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES.The OTB CookBook is licensed
configure_file(${RST_SOURCE_DIR}/conf.py.in ${SPHINX_CONF_DIR}/conf.py @ONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/_static DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(generate_otbapps_rst
COMMAND ${SH_INTERP} ${CMAKE_CURRENT_BINARY_DIR}/RunApplicationsRstGenerator.sh
${RST_BINARY_DIR}
......@@ -142,7 +144,6 @@ add_custom_target(CookBookHTML
-b html
${RST_BINARY_DIR}
${HTML_DIR}
-W
-v
-c ${SPHINX_CONF_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......@@ -163,7 +164,6 @@ add_custom_target(CookBookArchive
-b latex
${RST_BINARY_DIR}
${LATEX_DIR}
-W
-v
-c ${SPHINX_CONF_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......
import sys
import re
def parameter_warnings(app_warn, app, key):
def warn(message):
app_warn("Parameter '{}' ".format(key) + message)
name = app.GetParameterName(key)
description = app.GetParameterDescription(key)
if name[-1] == " ":
warn("name ends with a space")
if ":" in name:
warn("name contains a special character (:)")
if "." in name:
warn("name contains a special character (.)")
# disabled because there are so many for now
#if description == "":
#warn("missing description")
# disabled because there are so many for now
#if len(description) > 0 and description[-1] != ".":
#warn("description does not end with a period")
if len(description) > 0 and " :" in description:
warn("description has a space before a colon")
def application_documentation_warnings(app):
"Emit warnings about application documentation"
def warn(message):
print("OTB Documentation Warning ({}): {}".format(app.GetName(), message), file=sys.stderr)
description = app.GetDescription()
longdescription = app.GetDocLongDescription()
# disable because there are so many for now
#if not longdescription[-1] == ".":
#warn("Application Long Description does not end with a period (.)")
if re.search("\\n [a-zA-Z]", longdescription):
warn("Application Long Description contains '\\n ' pattern (usually not intended)")
if " :" in longdescription:
warn("Application Long Description has a space before a colon")
if app.GetNumberOfExamples() == 0:
warn("Application has no examples")
keys = app.GetParametersKeys()
for key in app.GetParametersKeys():
parameter_warnings(warn, app, key)
if "ram" in keys and not keys[-3] == "ram":
warn("'ram' parameter is not third from last")
if "inxml" in keys and not keys[-2] == "inxml":
warn("'inxml' parameter is not second from last parameter")
if "outxml" in keys and not keys[-1] == "outxml":
warn("'outxml' is not last parameter")
.wy-nav-content {
max-width: 800px;
}
/* Reduce the effect of the p bottom margin before lists
* Very useful for choice parameters in app doc for example
*/
p + ul {
margin-top: -18px;
}
......@@ -334,6 +334,8 @@ The available syntax for boolean options are:
- OFF, Off, off, false, False, 0 are available for setting a ’false’
boolean value
-----------------------------------------------
::
&nodata=(double) value / [int:double, int:double ...]
......@@ -394,10 +396,10 @@ Some examples are provided below:
::
$ otbcli_Convert -in OTB-Data/Examples/QB_1_ortho.tif -out "/tmp/example1.tif?&gdal:co:TILED=YES&gdal:co:COMPRESS=DEFLATE"
$ otbcli_DynamicConvert -in OTB-Data/Examples/QB_1_ortho.tif -out "/tmp/example1.tif?&gdal:co:TILED=YES&gdal:co:COMPRESS=DEFLATE"
- Process only first band from a file
::
$ otbcli_Convert -in "OTB-Data/Examples/QB_1_ortho.tif?&bands=1" -out /tmp/example2.tif
$ otbcli_DynamicConvert -in "OTB-Data/Examples/QB_1_ortho.tif?&bands=1" -out /tmp/example2.tif
......@@ -24,7 +24,7 @@ Windows
.. include:: Installation_Windows.rst
Linux
------------
-----
.. include:: Installation_Linux.rst
......
A brief tour of OTB Applications
================================
OTB ships with more than 90 ready to use applications for remote sensing tasks.
OTB ships with more than 100 ready to use applications for remote sensing tasks.
They usually expose existing processing functions from the underlying C++
library, or integrate them into high level pipelines. OTB applications allow the user
to:
......@@ -33,9 +33,9 @@ The complete list of applications is described in the Chapter :ref:`apprefdoc`.
All standard applications share the same implementation and automatically expose
generated interfaces.
However they are accessed in a slightly different way: the command-line interface is prefixed by ``otbcli_``, while the Qt interface is prefixed by
``otbgui_``. For cwinstance, calling ``otbcli_Convert`` will launch the
command-line interface of the Convert application, while
``otbgui_Convert`` will launch the GUI.
``otbgui_``. For instance, calling ``otbcli_DynamicConvert`` will launch the
command-line interface of the DynamicConvert application, while
``otbgui_DynamicConvert`` will launch the GUI.
Command-line launcher
---------------------
......@@ -84,44 +84,55 @@ example based on the OrthoRectification application:
::
$ otbcli_OrthoRectification
ERROR: Waiting for at least one parameter.
This is the Ortho-rectification (OrthoRectification) application, version 6.7.0
This application allows ortho-rectifying optical and radar images from supported sensors.
Complete documentation: https://www.orfeo-toolbox.org/CookBook/Applications/app_OrthoRectification.html or -help
Parameters:
-io <group> Input and output data
MISSING -io.in <string> Input Image (mandatory)
MISSING -io.out <string> [pixel] Output Image [pixel=uint8/uint16/int16/uint32/int32/float/double/cint16/cint32/cfloat/cdouble] (default value is float) (mandatory)
-map <string> Map Projection [utm/lambert2/lambert93/wgs/epsg] (mandatory, default value is utm)
-map.utm.zone <int32> Zone number (mandatory, default value is 31)
-map.utm.northhem <boolean> Northern Hemisphere (mandatory, default value is false)
-map.epsg.code <int32> EPSG Code (mandatory, default value is 4326)
-outputs <group> Output Image Grid
-outputs.mode <string> Parameters estimation modes [auto/autosize/autospacing/outputroi/orthofit] (mandatory, default value is auto)
MISSING -outputs.ulx <float> Upper Left X (mandatory)
MISSING -outputs.uly <float> Upper Left Y (mandatory)
MISSING -outputs.sizex <int32> Size X (mandatory)
MISSING -outputs.sizey <int32> Size Y (mandatory)
MISSING -outputs.spacingx <float> Pixel Size X (mandatory)
MISSING -outputs.spacingy <float> Pixel Size Y (mandatory)
-outputs.lrx <float> Lower right X (optional, off by default)
-outputs.lry <float> Lower right Y (optional, off by default)
-outputs.ortho <string> Model ortho-image (optional, off by default)
-outputs.isotropic <boolean> Force isotropic spacing by default (mandatory, default value is true)
-outputs.default <float> Default pixel value (optional, off by default, default value is 0)
-elev <group> Elevation management
-elev.dem <string> DEM directory (optional, off by default)
-elev.geoid <string> Geoid File (optional, off by default)
-elev.default <float> Default elevation (mandatory, default value is 0)
-interpolator <string> Interpolation [bco/nn/linear] (mandatory, default value is bco)
-interpolator.bco.radius <int32> Radius for bicubic interpolation (mandatory, default value is 2)
-opt <group> Speed optimization parameters
-opt.rpc <int32> RPC modeling (points per axis) (optional, off by default, default value is 10)
-opt.ram <int32> Available RAM (MB) (optional, off by default, default value is 128)
-opt.gridspacing <float> Resampling grid spacing (optional, off by default, default value is 4)
-inxml <string> Load parameters from XML (optional, off by default)
-progress <boolean> Report progress
-help <string list> Display long help (empty list), or help for given parameters keys
ERROR: Waiting for at least one parameter...
====================== HELP CONTEXT ======================
NAME: OrthoRectification
DESCRIPTION: This application allows to ortho-rectify optical images from supported sensors.
Use -help param1 [... paramN] to see detailed documentation of those parameters.
EXAMPLE OF USE:
Examples:
otbcli_OrthoRectification -io.in QB_TOULOUSE_MUL_Extract_500_500.tif -io.out QB_Toulouse_ortho.tif
DOCUMENTATION: http://www.orfeo-toolbox.org/Applications/OrthoRectification.html
======================= PARAMETERS =======================
-progress <boolean> Report progress
MISSING -io.in <string> Input Image
MISSING -io.out <string> [pixel] Output Image [pixel=uint8/int8/uint16/int16/uint32/int32/float/double]
-map <string> Output Map Projection [utm/lambert2/lambert93/transmercator/wgs/epsg]
MISSING -map.utm.zone <int32> Zone number
-map.utm.northhem <boolean> Northern Hemisphere
-map.transmercator.falseeasting <float> False easting
-map.transmercator.falsenorthing <float> False northing
-map.transmercator.scale <float> Scale factor
-map.epsg.code <int32> EPSG Code
-outputs.mode <string> Parameters estimation modes [auto/autosize/autospacing]
MISSING -outputs.ulx <float> Upper Left X
MISSING -outputs.uly <float> Upper Left Y
MISSING -outputs.sizex <int32> Size X
MISSING -outputs.sizey <int32> Size Y
MISSING -outputs.spacingx <float> Pixel Size X
MISSING -outputs.spacingy <float> Pixel Size Y
-outputs.isotropic <boolean> Force isotropic spacing by default
-elev.dem <string> DEM directory
-elev.geoid <string> Geoid File
-elev.default <float> Average Elevation
-interpolator <string> Interpolation [nn/linear/bco]
-interpolator.bco.radius <int32> Radius for bicubic interpolation
-opt.rpc <int32> RPC modeling (points per axis)
-opt.ram <int32> Available memory for processing (in MB)
-opt.gridspacing <float> Resampling grid spacing
For a detailed description of the application behaviour and parameters,
please check the application reference documentation presented
......@@ -169,12 +180,10 @@ In this interface, every optional parameter has a check box that you
have to tick if you want to set a value and use this parameter. The
mandatory parameters cannot be unchecked.
The interface of the application is shown here as an example.
The interface of the application is shown here as an example:
.. figure:: Art/QtImages/rescale_param.png
.. figure:: Art/QtImages/rescale_logs.png
.. figure:: Art/QtImages/rescale_progress.png
.. figure:: Art/QtImages/rescale_documentation.png
:align: center
Python interface
----------------
......
......@@ -21,6 +21,11 @@ import sphinx_rtd_theme
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# Customize read the docs theme a bit with a custom css
# taken from https://stackoverflow.com/a/43186995/5815110
def setup(app):
app.add_stylesheet("css/otb_theme.css")
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
......@@ -75,7 +80,7 @@ release = '@OTB_VERSION@'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['@RST_BUILD_DIR@']
exclude_patterns = ['@RST_BUILD_DIR@', 'templates/*.rst']
#exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
......@@ -167,6 +172,16 @@ html_static_path = ['_static']
# If true, the index is split into individual pages for each letter.
#html_split_index = False
html_context = {
'display_gitlab': True,
'gitlab_host': "gitlab.orfeo-toolbox.org",
'gitlab_user': 'orfeotoolbox',
'gitlab_repo': 'OTB',
'gitlab_version': 'develop',
'conf_py_path': '/Documentation/Cookbook/rst/',
#'source_url_prefix': "https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/tree/develop/Documentation/Cookbook/rst/",
}
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = True
......
......@@ -375,41 +375,3 @@ that relate to geometry, projections, and also calibration.
Future developments will probably offer a more adapted structure to import and
export images between OTB and the Python world.
Setting of EmptyParameter
^^^^^^^^^^^^^^^^^^^^^^^^^
Most of the parameters are set using functions ``SetParameterXXX()``, except for
one type of parameter: the ``EmptyParameter``. This class was the first
implementation of a boolean. It is now **deprecated**, you should use ``BoolParameter``
instead.
Let's take an example with the application ``ReadImageInfo`` when it was still
using an ``EmptyParameter`` for parameter ``keywordlist``:
.. code-block:: python
import otbApplication as otb
app = otb.Registry.CreateApplication("ReadImageInfo")
If you want the get the state of parameter ``keywordlist``, a boolean, use:
.. code-block:: python
app.IsParameterEnabled("keywordlist")
To set this parameter ON/OFF, use the functions:
.. code-block:: python
app.EnableParameter("keywordlist")
app.DisableParameter("keywordlist")
Don't try to use other functions to set the state of a boolean. For instance,
try the following commands:
.. code-block:: python
app.SetParameterInt("keywordlist", 0)
app.IsParameterEnabled("keywordlist")
You will get a state ``True`` even if you asked the opposite.
.. _{label}:
{heading}
{description}
Description
-----------
{longdescription}
Parameters
----------
.. contents:: :local:
.. |br| raw:: html
<br />
.. |em| raw:: html
&emsp;
{parameters}
Examples
--------
From the command-line:
.. code-block:: bash
{examples_cli}
From Python:
{examples_python}
{limitations}
{see_also}
**{name}** :code:`-{key} {value}` {flags}|br|
{description}
**{name}** :code:`-{key} {value}` {flags}|br|
{description}
{choices}
......@@ -39,7 +39,7 @@ Open the \code{CMakeLists.txt} file and write in the few lines:
\begin{cmakecode}
PROJECT(Tutorials)
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.1.0)
FIND_PACKAGE(OTB)
IF(OTB_FOUND)
......@@ -102,7 +102,7 @@ Follow the following steps:
\begin{cmakecode}
project(MyFirstProcessing)
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.1.0)
find_package(OTB REQUIRED)
include(${OTB_USE_FILE})
......
......@@ -153,7 +153,7 @@ private:
AddParameter(ParameterType_OutputImage, "out", "Output Image");
AddParameter(ParameterType_Empty, "param1", "Example of boolean parameter");
AddParameter(ParameterType_Bool, "param1", "Example of boolean parameter");
MandatoryOff("param1");
AddParameter(ParameterType_Int, "param2", "Example of integer parameter");
......
......@@ -60,14 +60,21 @@ private:
void DoInit() override
{
SetName("ClassificationMapRegularization");
SetDescription("Filters the input labeled image using Majority Voting in a ball shaped neighbordhood.");
SetDescription("Filters the input labeled image using Majority Voting in a ball shaped neighbordhood");
SetDocName("Classification Map Regularization");
SetDocLongDescription("This application filters the input labeled image (with a maximal class label = 65535) using Majority Voting in a ball shaped neighbordhood. Majority Voting takes the more representative value of all the pixels identified by the ball shaped structuring element and then sets the center pixel to this majority label value.\n\
-NoData is the label of the NOT classified pixels in the input image. These input pixels keep their NoData label in the output image.\n\
-Pixels with more than 1 majority class are marked as Undecided if the parameter 'ip.suvbool == true', or keep their Original labels otherwise.");
SetDocLongDescription(
"This application filters the input labeled image (with a maximal class label = 65535) using Majority Voting in a ball shaped neighbordhood."
"Majority Voting takes the more representative value of all the pixels identified by the ball shaped structuring element and then sets the center pixel to this majority label value.\n\n"
"* NoData is the label of the NOT classified pixels in the input image. These input pixels keep their NoData label in the output image.\n\n"
"* Pixels with more than 1 majority class are marked as Undecided if the parameter 'ip.suvbool == true', or keep their Original labels otherwise.");
SetDocLimitations("The input image must be a single band labeled image (with a maximal class label = 65535). The structuring element radius must have a minimum value equal to 1 pixel. Please note that the Undecided value must be different from existing labels in the input labeled image.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("Documentation of the ClassificationMapRegularization application.");
SetDocSeeAlso("");
AddDocTag(Tags::Learning);
AddDocTag(Tags::Analysis);
......
......@@ -82,7 +82,7 @@ private:
SetDescription("This application computes the chosen descriptors for each studied polyline contained in the input VectorData.");
SetDocName("Compute Polyline Feature From Image");
SetDocLongDescription("The first step in the classifier fusion based validation is to compute the chosen descriptors for each studied polyline. ");
SetDocLongDescription("The first step in the classifier fusion based validation is to compute the chosen descriptors for each studied polyline.");
SetDocLimitations("Since it does not rely on streaming process, take care of the size of input image before launching application.");
SetDocAuthors("OTB-Team");
SetDocSeeAlso(" ");
......
......@@ -136,7 +136,7 @@ private:
SetParameterDescription("method.dempstershafer","Fusion of classification maps by the Dempster Shafer combination method for each output pixel.");
AddParameter(ParameterType_InputFilenameList, "method.dempstershafer.cmfl", "Confusion Matrices");
SetParameterDescription("method.dempstershafer.cmfl", "A list of confusion matrix files (*.CSV format) to define the masses of belief and the class labels. Each file should be formatted the following way: "
SetParameterDescription("method.dempstershafer.cmfl", "A list of confusion matrix files (.csv format) to define the masses of belief and the class labels. Each file should be formatted the following way: "
"the first line, beginning with a '#' symbol, should be a list of the class labels present in the corresponding input classification image, organized in the same order as the confusion matrix rows/columns.");
AddParameter(ParameterType_Choice, "method.dempstershafer.mob", "Mass of belief measurement");
......
......@@ -116,17 +116,16 @@ private:
SetDefaultOutputPixelType( "out", ImagePixelType_uint8);
AddParameter(ParameterType_OutputImage, "confmap", "Confidence map");
SetParameterDescription( "confmap", "Confidence map of the produced classification. The confidence index depends on the model : \n"
" - LibSVM : difference between the two highest probabilities (needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
" - OpenCV\n"
" * Boost : sum of votes\n"
" * DecisionTree : (not supported)\n"
" * GradientBoostedTree : (not supported)\n"
" * KNearestNeighbors : number of neighbors with the same label\n"
" * NeuralNetwork : difference between the two highest responses\n"
" * NormalBayes : (not supported)\n"
" * RandomForest : Confidence (proportion of votes for the majority class). Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
" * SVM : distance to margin (only works for 2-class models)\n");
SetParameterDescription( "confmap", "Confidence map of the produced classification. The confidence index depends on the model: \n\n"
"* LibSVM: difference between the two highest probabilities (needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
"* Boost: sum of votes\n"
"* DecisionTree: (not supported)\n"
"* GradientBoostedTree: (not supported)\n"
"* KNearestNeighbors: number of neighbors with the same label\n"
"* NeuralNetwork: difference between the two highest responses\n"
"* NormalBayes: (not supported)\n"
"* RandomForest: Confidence (proportion of votes for the majority class). Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
"* SVM: distance to margin (only works for 2-class models)\n");
SetDefaultOutputPixelType( "confmap", ImagePixelType_double);
MandatoryOff("confmap");
......
......@@ -43,18 +43,27 @@ public:
// Documentation
SetDocName( "Train a classifier from multiple images" );
SetDocLongDescription(
"This application performs a classifier training from multiple pairs of input images and training vector data. "
"Train a classifier from multiple pairs of images and training vector data. "
"Samples are composed of pixel values in each band optionally centered and reduced using an XML statistics file produced by "
"the ComputeImagesStatistics application.\n The training vector data must contain polygons with a positive integer field "
"representing the class label. The name of this field can be set using the \"Class label field\" parameter. Training and validation "
"sample lists are built such that each class is equally represented in both lists. One parameter allows controlling the ratio "
"the ComputeImagesStatistics application.\n\n"
"The training vector data must contain polygons with a positive integer field "
"representing the class label. The name of this field can be set using the *Class label field* parameter.\n\n"
"Training and validation sample lists are built such that each class is equally represented in both lists. One parameter allows controlling the ratio "
"between the number of samples in training and validation sets. Two parameters allow managing the size of the training and "
"validation sets per class and per image.\n Several classifier parameters can be set depending on the chosen classifier. In the "
"validation process, the confusion matrix is organized the following way: rows = reference labels, columns = produced labels. "
"validation sets per class and per image.\n\n"
"In the validation process, the confusion matrix is organized the following way:\n\n"
"* Rows: reference labels,\n"
"* Columns: produced labels.\n\n"
"In the header of the optional confusion matrix output file, the validation (reference) and predicted (produced) class labels"
" are ordered according to the rows/columns of the confusion matrix.\n This application is based on LibSVM, OpenCV Machine Learning "
"(2.3.1 and later), and Shark ML. The output of this application is a text model file, whose format corresponds to the "
"ML model type chosen. There is no image nor vector data output." );
" are ordered according to the rows/columns of the confusion matrix.\n\n"
"This application is based on LibSVM, OpenCV Machine Learning, and Shark ML. "
"The output of this application is a text model file, whose format corresponds to the "
"ML model type chosen. There is no image nor vector data output.");
SetDocLimitations( "None" );
SetDocAuthors( "OTB-Team" );
SetDocSeeAlso( "OpenCV documentation for machine learning http://docs.opencv.org/modules/ml/doc/ml.html " );
......
......@@ -110,15 +110,17 @@ void DoInit() override
"This application trains a classifier from multiple input images or a csv "
"file, in order to perform regression. Predictors are composed of pixel "
"values in each band optionally centered and reduced using an XML "
"statistics file produced by the ComputeImagesStatistics application.\n "
"statistics file produced by the ComputeImagesStatistics application.\n\n"
"The output value for each predictor is assumed to be the last band "
"(or the last column for CSV files). Training and validation predictor "
"lists are built such that their size is inferior to maximum bounds given "
"by the user, and the proportion corresponds to the balance parameter. "
"Several classifier parameters can be set depending on the chosen "
"classifier. In the validation process, the mean square error is computed "
"between the ground truth and the estimated model.\n"
" This application is based on LibSVM and on OpenCV Machine Learning "
"between the ground truth and the estimated model.\n\n"
"This application is based on LibSVM and on OpenCV Machine Learning "
"classifiers, and is compatible with OpenCV 2.3.1 and later.");
SetDocLimitations("None");
SetDocAuthors("OTB-Team");
......
......@@ -67,7 +67,7 @@ protected:
"Learning (2.3.1 and later), and Shark ML The output of this application "
"is a text model file, whose format corresponds to the ML model type "
"chosen. There is no image nor vector data output.");
SetDocLimitations( " " );
SetDocLimitations("");
SetDocAuthors( "OTB Team" );
SetDocSeeAlso( " " );
......
......@@ -131,20 +131,16 @@ private:
"Put the same field names as the TrainVectorClassifier application.");
AddParameter(ParameterType_Bool, "confmap", "Confidence map");
SetParameterDescription( "confmap", "Confidence map of the produced classification. "
"The confidence index depends on the model : \n"
" - LibSVM : difference between the two highest probabilities "
"(needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
" - OpenCV\n"
" * Boost : sum of votes\n"
" * DecisionTree : (not supported)\n"
" * GradientBoostedTree : (not supported)\n"
" * KNearestNeighbors : number of neighbors with the same label\n"
" * NeuralNetwork : difference between the two highest responses\n"
" * NormalBayes : (not supported)\n"
" * RandomForest : Confidence (proportion of votes for the majority class). "
"Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
" * SVM : distance to margin (only works for 2-class models).\n");
SetParameterDescription( "confmap", "Confidence map of the produced classification. The confidence index depends on the model: \n\n"
"* LibSVM: difference between the two highest probabilities (needs a model with probability estimates, so that classes probabilities can be computed for each sample)\n"
"* Boost: sum of votes\n"
"* DecisionTree: (not supported)\n"
"* GradientBoostedTree: (not supported)\n"
"* KNearestNeighbors: number of neighbors with the same label\n"
"* NeuralNetwork: difference between the two highest responses\n"
"* NormalBayes: (not supported)\n"
"* RandomForest: Confidence (proportion of votes for the majority class). Margin (normalized difference of the votes of the 2 majority classes) is not available for now.\n"
"* SVM: distance to margin (only works for 2-class models)\n");
AddParameter(ParameterType_OutputFilename, "out", "Output vector data file containing class labels");
SetParameterDescription("out","Output vector data file storing sample values (OGR format)."
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitBoostParams()
{
AddChoice("classifier.boost", "Boost classifier");
SetParameterDescription("classifier.boost", "This group of parameters allows setting Boost classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/boosting.html}.");
SetParameterDescription("classifier.boost", "http://docs.opencv.org/modules/ml/doc/boosting.html");
//BoostType
AddParameter(ParameterType_Choice, "classifier.boost.t", "Boost Type");
AddChoice("classifier.boost.t.discrete", "Discrete AdaBoost");
......
......@@ -35,8 +35,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
{
AddChoice("classifier.dt", "Decision Tree classifier");
SetParameterDescription("classifier.dt",
"This group of parameters allows setting Decision Tree classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/decision_trees.html}.");
"http://docs.opencv.org/modules/ml/doc/decision_trees.html");
//MaxDepth
AddParameter(ParameterType_Int, "classifier.dt.max", "Maximum depth of the tree");
#ifdef OTB_OPENCV_3
......@@ -65,7 +64,6 @@ LearningApplicationBase<TInputValue,TOutputValue>
"regression accuracy parameter, then the node will not be split further.");
//UseSurrogates : don't need to be exposed !
//AddParameter(ParameterType_Empty, "classifier.dt.sur", "Surrogate splits will be built");
//SetParameterDescription("classifier.dt.sur","These splits allow working with missing data and compute variable importance correctly.");
//MaxCategories
......
......@@ -38,8 +38,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
AddChoice("classifier.gbt", "Gradient Boosted Tree classifier");
SetParameterDescription(
"classifier.gbt",
"This group of parameters allows setting Gradient Boosted Tree classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/gradient_boosted_trees.html}.");
"http://docs.opencv.org/modules/ml/doc/gradient_boosted_trees.html");
if (m_RegressionFlag)
{
......@@ -79,9 +78,6 @@ LearningApplicationBase<TInputValue,TOutputValue>
"possible depth of the tree. The actual depth may be smaller if the other termination criteria are met, and/or "
"if the tree is pruned.");
//UseSurrogates : don't need to be exposed !
//AddParameter(ParameterType_Empty, "classifier.gbt.sur", "Surrogate splits will be built");
//SetParameterDescription("classifier.gbt.sur","These splits allow working with missing data and compute variable importance correctly.");