Commit 664de77c authored by Victor Poughon's avatar Victor Poughon

Merge branch 'xmas_cookbook' into 'develop'

Christmas CookBook

Closes #1771

See merge request orfeotoolbox/otb!316
parents d2d2d5a7 afc804e0
......@@ -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 ...]
......
......@@ -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:
......@@ -84,44 +84,55 @@ example based on the OrthoRectification application:
::
$ otbcli_OrthoRectification
ERROR: Waiting for at least one parameter...
====================== HELP CONTEXT ======================
NAME: OrthoRectification
DESCRIPTION: This application allows to ortho-rectify optical images from supported sensors.
EXAMPLE OF USE:
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
Use -help param1 [... paramN] to see detailed documentation of those parameters.
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
......
.. _{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}
......@@ -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. "
"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 "
"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. "
"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." );
"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\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\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\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
......
......@@ -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)
{
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitKNNParams()
{
AddChoice("classifier.knn", "KNN classifier");
SetParameterDescription("classifier.knn", "This group of parameters allows setting KNN classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/k_nearest_neighbors.html}.");
SetParameterDescription("classifier.knn", "http://docs.opencv.org/modules/ml/doc/k_nearest_neighbors.html");
//K parameter
AddParameter(ParameterType_Int, "classifier.knn.k", "Number of Neighbors");
......
......@@ -35,10 +35,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
::InitNeuralNetworkParams()
{
AddChoice("classifier.ann", "Artificial Neural Network classifier");
SetParameterDescription("classifier.ann",
"This group of parameters allows setting Artificial Neural Network "
"classifier parameters. See complete documentation here "
"\\url{http://docs.opencv.org/modules/ml/doc/neural_networks.html}.");
SetParameterDescription("classifier.ann", "http://docs.opencv.org/modules/ml/doc/neural_networks.html");
//TrainMethod
AddParameter(ParameterType_Choice, "classifier.ann.t", "Train Method Type");
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitNormalBayesParams()
{
AddChoice("classifier.bayes", "Normal Bayes classifier");
SetParameterDescription("classifier.bayes", "Use a Normal Bayes Classifier. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/normal_bayes_classifier.html}.");
SetParameterDescription("classifier.bayes", "http://docs.opencv.org/modules/ml/doc/normal_bayes_classifier.html");
}
......
......@@ -34,9 +34,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
::InitRandomForestsParams()
{
AddChoice("classifier.rf", "Random forests classifier");
SetParameterDescription("classifier.rf",
"This group of parameters allows setting Random Forests classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/random_trees.html}.");
SetParameterDescription("classifier.rf", "http://docs.opencv.org/modules/ml/doc/random_trees.html");
//MaxDepth
AddParameter(ParameterType_Int, "classifier.rf.max", "Maximum depth of the tree");
SetParameterInt("classifier.rf.max",5);
......
......@@ -34,8 +34,7 @@ namespace Wrapper
::InitSVMParams()
{
AddChoice("classifier.svm", "SVM classifier (OpenCV)");
SetParameterDescription("classifier.svm", "This group of parameters allows setting SVM classifier parameters. "
"See complete documentation here \\url{http://docs.opencv.org/modules/ml/doc/support_vector_machines.html}.");
SetParameterDescription("classifier.svm", "http://docs.opencv.org/modules/ml/doc/support_vector_machines.html");
AddParameter(ParameterType_Choice, "classifier.svm.m", "SVM Model Type");
SetParameterDescription("classifier.svm.m", "Type of SVM formulation.");
if (this->m_RegressionFlag)
......
......@@ -31,10 +31,7 @@ template<class TInputValue, class TOutputValue>
void LearningApplicationBase<TInputValue, TOutputValue>::InitSharkKMeansParams()
{
AddChoice( "classifier.sharkkm", "Shark kmeans classifier" );
SetParameterDescription( "classifier.sharkkm",
"This group of parameters allows setting Shark kMeans classifier parameters. "
"See complete documentation here "
"\\url{http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kmeans.html}.\n " );
SetParameterDescription("classifier.sharkkm", "http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kmeans.html ");
//MaxNumberOfIterations
AddParameter( ParameterType_Int, "classifier.sharkkm.maxiter",
"Maximum number of iteration for the kmeans algorithm." );
......
......@@ -38,8 +38,7 @@ LearningApplicationBase<TInputValue,TOutputValue>
AddChoice("classifier.sharkrf", "Shark Random forests classifier");
SetParameterDescription("classifier.sharkrf",
"This group of parameters allows setting Shark Random Forests classifier parameters. "
"See complete documentation here \\url{http://image.diku.dk/shark/doxygen_pages/html/classshark_1_1_r_f_trainer.html}.\n It is noteworthy that training is parallel.");
"http://image.diku.dk/shark/doxygen_pages/html/classshark_1_1_r_f_trainer.html.\n It is noteworthy that training is parallel.");
//MaxNumberOfTrees
AddParameter(ParameterType_Int, "classifier.sharkrf.nbtrees",
"Maximum number of trees in the forest");
......
......@@ -108,7 +108,7 @@ private:
AddParameter(ParameterType_OutputImage, "out", "Output Image");
SetParameterDescription("out", "output image. Components are ordered by decreasing eigenvalues.");
MandatoryOff("out");
AddParameter(ParameterType_Group, "rescale", "Rescale Output.");
AddParameter(ParameterType_Group, "rescale", "Rescale Output");
MandatoryOff("rescale");
// AddChoice("rescale.no","No rescale");
......@@ -132,10 +132,10 @@ private:
SetParameterDescription("method.pca", "Principal Component Analysis.");
AddChoice("method.napca", "NA-PCA");
SetParameterDescription("method.napca", "Noise Adjusted Principal Component Analysis.");
AddParameter(ParameterType_Int, "method.napca.radiusx", "Set the x radius of the sliding window.");
AddParameter(ParameterType_Int, "method.napca.radiusx", "Set the x radius of the sliding window");
SetMinimumParameterIntValue("method.napca.radiusx", 1);
SetDefaultParameterInt("method.napca.radiusx", 1);
AddParameter(ParameterType_Int, "method.napca.radiusy", "Set the y radius of the sliding window.");
AddParameter(ParameterType_Int, "method.napca.radiusy", "Set the y radius of the sliding window");
SetMinimumParameterIntValue("method.napca.radiusy", 1);
SetDefaultParameterInt("method.napca.radiusy", 1);
......@@ -143,7 +143,7 @@ private:
SetParameterDescription("method.maf", "Maximum Autocorrelation Factor.");
AddChoice("method.ica", "ICA");
SetParameterDescription("method.ica", "Independent Component Analysis.");
AddParameter(ParameterType_Int, "method.ica.iter", "number of iterations ");
AddParameter(ParameterType_Int, "method.ica.iter", "number of iterations");
SetMinimumParameterIntValue("method.ica.iter", 1);
SetDefaultParameterInt("method.ica.iter", 20);
MandatoryOff("method.ica.iter");
......@@ -158,14 +158,14 @@ private: