Commit 4ea627a8 authored by Victor Poughon's avatar Victor Poughon

DOC: add blockquote in description rst warning and fix some

parent 30778416
......@@ -448,5 +448,4 @@ if __name__ == "__main__":
template_parameter_choice_entry = open("templates/parameter_choice_entry.rst").read()
template_parameter_choice = open("templates/parameter_choice.rst").read()
GenerateRstForApplications(args.rst_dir)
......@@ -38,6 +38,9 @@ def application_documentation_warnings(app):
if not longdescription[-1] == ".":
warn("Application Long Description does not end with a period (.)")
if "\n " in longdescription:
warn("Application Long Description contains '\\n ' pattern (usually not intended)")
if " :" in longdescription:
warn("Application Long Description has a space before a colon")
......
......@@ -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);
......
......@@ -256,17 +256,18 @@ private:
SetDocName("Color Mapping");
SetDocLongDescription(
"Map a label image to a 8-bits RGB image (both ways) using different methods:\n\n"
" - **Custom**: use a custom look-up table. The look-up table is loaded "
"* **Custom**: use a custom look-up table. The look-up table is loaded "
"from a text file where each line describes an entry. The typical use of this method is to colorise a "
"classification map.\n"
" - **Continuous**: Map a range of values in a scalar input image "
"* **Continuous**: Map a range of values in a scalar input image "
"to a colored image using continuous look-up table, in order to enhance image interpretation. Several "
"look-up tables can been chosen with different color ranges.\n"
" - **Optimal**: Compute an optimal "
"* **Optimal**: Compute an optimal "
"look-up table. When processing a segmentation label image (label to color), the color difference between"
" adjacent segmented regions is maximized. When processing an unknown color image (color to label), all "
"the present colors are mapped to a continuous label list.\n"
" - **Support image**: Use a color support image to associate an average color to each region.");
"* **Support image**: Use a color support image to associate an average color to each region.");
SetDocLimitations("The segmentation optimal method does not support streaming, and thus large images. The operation color to label "
"is not implemented for the methods continuous LUT and support image LUT.\n\nColorMapping using support image is not threaded.");
......
......@@ -99,11 +99,12 @@ private:
"handled). The output image is written in the specified format (ie. "
"that corresponds to the given extension).\n"
"The conversion can include a rescale of the data range, by default it's set between the 2nd to "
"the 98th percentile. The rescale can be linear or log2. \nThe choice "
"of the output channels can be done with the extended filename, but "
"the 98th percentile. The rescale can be linear or log2. \n"
"The choice of the output channels can be done with the extended filename, but "
"less easy to handle. To do this, a 'channels' parameter allows you to "
"select the desired bands at the output. There are 3 modes, the "
"available choices are: \n"
"available choices are: \n\n"
"* **All**: keep all bands.\n"
"* **Grayscale**: to display mono image as standard color image \n"
"* **RGB**: select 3 bands in the input image (multi-bands) \n"
......
......@@ -71,22 +71,23 @@ private:
"mathematical formula is done by the muParser library.\n\n"
"The formula can be written using:\n\n"
" * numerical values ( 2.3, -5, 3.1e4, ...)\n"
" * variables containing pixel values (e.g. : ``im2b3`` is the pixel value"
"* numerical values ( 2.3, -5, 3.1e4, ...)\n"
"* variables containing pixel values (e.g. : ``im2b3`` is the pixel value"
" in 2nd image, 3rd band)\n"
" * binary operators:\n\n"
" * ``+`` addition, ``-`` subtraction, ``*`` multiplication, ``/`` division\n"
" * ``^`` raise x to the power of y\n"
" * ``<`` less than, ``>`` greater than, ``<=`` less or equal, ``>=`` greater or equal\n"
" * ``==`` equal, ``!=`` not equal\n"
"* binary operators:\n\n"
" * ``+`` addition, ``-`` subtraction, ``*`` multiplication, ``/`` division\n"
" * ``^`` raise x to the power of y\n"
" * ``<`` less than, ``>`` greater than, ``<=`` less or equal, ``>=`` greater or equal\n"
" * ``==`` equal, ``!=`` not equal\n"
#ifdef OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS
" * ``||`` logical or, ``&&`` logical and\n"
" * ``||`` logical or, ``&&`` logical and\n"
" * if-then-else operator: ``(condition ? value_true : value_false)``\n"
#else
" * ``or`` logical or, ``and`` logical and\n"
" * if-then-else operator: ``if(condition;value_true;value_false)``\n"
" * ``or`` logical or, ``and`` logical and\n"
"* if-then-else operator: ``if(condition;value_true;value_false)``\n"
#endif
" * functions : ``exp()``, ``log()``, ``sin()``, ``cos()``, ``min()``, ``max()``, ...\n\n"
"* functions : ``exp()``, ``log()``, ``sin()``, ``cos()``, ``min()``, ``max()``, ...\n\n"
"The full list of features and operators is available on the muParser website [1]."
);
......
......@@ -81,29 +81,28 @@ private:
"------------\n\n"
"The formula can be written using:\n\n"
" * numerical values ( 2.3, -5, 3.1e4, ...)\n"
" * variables containing pixel values (please, note the indexing of "
"* numerical values ( 2.3, -5, 3.1e4, ...)\n"
"* variables containing pixel values (please, note the indexing of "
"inputs from 1 to N). Examples for the first input image:\n\n"
" * ``im1`` a pixel from 1st input, made of n components (n bands)\n"
" * ``im1b2`` the 2nd component of a pixel from 1st input (band index is 1-based)\n"
" * ``im1b2N3x4`` a 3x4 pixels Neighbourhood of a pixel the 2nd "
"component of a pixel from the 1st input\n"
" * ``im1PhyX`` horizontal (X-axis) spacing of the 1st input.\n"
" * ``im1PhyY`` vertical spacing of the 1st input input.\n"
" * ``im1b2Mean`` mean of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Mini`` minimum of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Maxi`` maximum of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Sum`` sum of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Var`` variance of the 2nd component of the 1st input (global statistics)\n"
" * ``idxX`` and ``idxY`` are the indices of the current pixel (generic variables)\n"
" * binary operators:\n\n"
" * ``+`` addition, ``-`` subtraction, ``*`` multiplication, ``/`` division\n"
" * ``^`` raise x to the power of y\n"
" * ``<`` less than, ``>`` greater than, ``<=`` less or equal, ``>=`` greater or equal\n"
" * ``==`` equal, ``!=`` not equal\n"
" * logical operators: ``or``, ``and``, ``xor``\n"
" * if-then-else operator: ``(condition ? value_true : value_false)``\n"
" * functions : abs(), exp(), log(), sin(), cos(), min(), max(), ...\n\n"
" * ``im1`` a pixel from 1st input, made of n components (n bands)\n"
" * ``im1b2`` the 2nd component of a pixel from 1st input (band index is 1-based)\n"
" * ``im1b2N3x4`` a 3x4 pixels Neighbourhood of a pixel the 2nd component of a pixel from the 1st input\n"
" * ``im1PhyX`` horizontal (X-axis) spacing of the 1st input.\n"
" * ``im1PhyY`` vertical spacing of the 1st input input.\n"
" * ``im1b2Mean`` mean of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Mini`` minimum of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Maxi`` maximum of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Sum`` sum of the 2nd component of the 1st input (global statistics)\n"
" * ``im1b2Var`` variance of the 2nd component of the 1st input (global statistics)\n"
" * ``idxX`` and ``idxY`` are the indices of the current pixel (generic variables)\n"
"* binary operators:\n\n"
" * ``+`` addition, ``-`` subtraction, ``*`` multiplication, ``/`` division\n"
" * ``^`` raise x to the power of y\n"
" * ``<`` less than, ``>`` greater than, ``<=`` less or equal, ``>=`` greater or equal\n"
" * ``==`` equal, ``!=`` not equal\n"
" * logical operators: ``or``, ``and``, ``xor``\n"
"* if-then-else operator: ``(condition ? value_true : value_false)``\n"
"* functions : abs(), exp(), log(), sin(), cos(), min(), max(), ...\n\n"
"Always keep in mind that this application only addresses mathematically "
"well-defined formulas. For instance, it is not possible to add vectors of"
......
......@@ -69,11 +69,11 @@ private:
"Several different methods are used to eliminate speckle noise, based upon"
" different mathematical models of the phenomenon. The application includes four"
" methods: Lee [1], Frost [2], GammaMAP [3] and Kuan [4]. \n\n"
"We sum up below the basic principle of this four methods:\n"
" * Lee : Estimate the signal by mean square error minimization (MMSE) on a sliding window.\n"
" * Frost : Also derived from the MMSE criteria with a weighted sum of the values within the window. The weighting factors decrease with distance from the pixel of interest.\n"
" * GammaMAP : Derived under the assumption of the image follows a Gamma distribution.\n"
" * Kuan : Also derived from the MMSE criteria under the assumption of non stationary mean and variance. It is quite similar to Lee filter in form."
"We sum up below the basic principle of this four methods:\n\n"
"* Lee : Estimate the signal by mean square error minimization (MMSE) on a sliding window.\n"
"* Frost : Also derived from the MMSE criteria with a weighted sum of the values within the window. The weighting factors decrease with distance from the pixel of interest.\n"
"* GammaMAP : Derived under the assumption of the image follows a Gamma distribution.\n"
"* Kuan : Also derived from the MMSE criteria under the assumption of non stationary mean and variance. It is quite similar to Lee filter in form."
);
SetDocLimitations("The application does not handle complex image as input.");
......
......@@ -131,25 +131,28 @@ private:
" between two images.");
SetDocName("Pixel-wise Block-Matching");
SetDocLongDescription("This application allows one to performs "
SetDocLongDescription(
"This application allows one to performs "
"block-matching to estimate pixel-wise disparities for a pair of images "
"in epipolar geometry.\n\n"
"This application is part of the stereovision pipeline. It can be used "
"after having computed epipolar grids (with StereoRectificationGridGenerator)"
" and resampled each input image into epipolar geometry (with "
"GridBasedImageResampling).\n\n"
"The application searches locally for the displacement between a reference"
" image and a secondary image. The correspondence is evaluated for each "
"The application searches locally for the displacement between a reference "
"image and a secondary image. The correspondence is evaluated for each "
"pixel, based on a pair of local neighborhood windows. The displacement "
"evaluated can be 1D (along lines) or 2D. Parameters allow setting the "
"minimum and maximum disparities to search (both for horizontal and "
"vertical directions). A winner-take-all approach is used to select the "
"best match. There are different metrics implemented to evaluate the "
"match between two local windows:\n"
" * SSD : Sum of Squared Distances\n"
" * NCC : Normalized Cross-Correlation\n"
" * Lp : Lp pseudo norm\n"
"\n"
"match between two local windows:\n\n"
"* SSD : Sum of Squared Distances\n"
"* NCC : Normalized Cross-Correlation\n"
"* Lp : Lp pseudo norm\n\n"
"Once the best integer disparity is found, an optional step of sub-pixel "
"disparity estimation can be performed, with various algorithms "
"(triangular interpolation, parabollic interpolation, dichotimic search)."
......
......@@ -68,27 +68,29 @@ private:
SetDescription("Projects a disparity map into a regular elevation map.");
SetDocName("Disparity map to elevation map");
SetDocLongDescription("This application uses a disparity map computed from "
SetDocLongDescription(
"This application uses a disparity map computed from "
"a stereo image pair to produce an elevation map on the ground area "
"covered by the stereo pair.\n\n"
"This application is part of the stereo reconstruction pipeline. It can "
"be used after having computed the disparity map with BlockMatching.\n\n"
"The needed inputs are : the disparity map, the stereo pair (in original"
"The needed inputs are: the disparity map, the stereo pair (in original"
" geometry) and the epipolar deformation grids. These grids (computed by "
"StereoRectificationGridGenerator) have to contain the transform between "
"the original geometry (stereo pair) and the epipolar geometry (disparity"
" map). The algorithm for each disparity is the following :\n"
" * skip if position is discarded by the disparity mask\n"
" * compute left ray : transform the current position from epipolar "
" map). The algorithm for each disparity is the following:\n\n"
"* skip if position is discarded by the disparity mask\n"
"* compute left ray: transform the current position from epipolar "
"geometry to left sensor geometry (left rectification grid)\n"
" * compute right ray : shift the current position with current "
"* compute right ray : shift the current position with current "
"disparity and transform from epipolar geometry to right sensor (right "
"rectification grid)\n"
" * estimate best 3D intersection between left and right rays\n"
" * for the ground cell of the obtained 3D point, keep its elevation if "
"* estimate best 3D intersection between left and right rays\n"
"* for the ground cell of the obtained 3D point, keep its elevation if "
"greater than current elevation (keeps the maximum of elevations of all "
"3D points in each cell)\n"
"\n"
"3D points in each cell)\n\n"
"Minimum and maximum elevations settings are here to bound the "
"reconstructed DEM.");
SetDocLimitations("The epipolar deformation grid should be able to entirely"
......
......@@ -323,23 +323,25 @@ private:
"between one or multiple stereo pair in sensor geometry. The output is "
"projected in desired geographic or cartographic map projection (WGS84 by"
" default).\n\n"
"This application is chaining different processing steps. Some of them "
"are also performed by other applications in the stereo-reconstruction "
"framework:\n"
" * StereoRectificationGridGenerator [1] : for the generation of deformation grids\n"
" * GridBasedImageResampling [2] : resampling into epipolar geometry\n"
" * BlockMatching [3] : estimation of dense disparity maps\n\n"
"The pipeline executes the following steps on each stereo pair:\n"
" - compute the epipolar displacement grids from the stereo pair (direct and inverse)\n"
" - resample the stereo pair into epipolar geometry using BCO interpolation\n"
" - create masks for each epipolar image : remove black borders and resample"
" input masks\n"
" - compute horizontal disparities with a block matching algorithm\n"
" - refine disparities to sub-pixel precision with a dichotomy algorithm\n"
" - apply an optional median filter\n"
" - filter disparities based on the correlation score and exploration bounds\n"
" - translate disparities in sensor geometry\n"
" - convert disparity to 3D Map.\n\n"
"framework:\n\n"
"* StereoRectificationGridGenerator [1] : for the generation of deformation grids\n"
"* GridBasedImageResampling [2] : resampling into epipolar geometry\n"
"* BlockMatching [3] : estimation of dense disparity maps\n\n"
"The pipeline executes the following steps on each stereo pair:\n\n"
"* compute the epipolar displacement grids from the stereo pair (direct and inverse)\n"
"* resample the stereo pair into epipolar geometry using BCO interpolation\n"
"* create masks for each epipolar image : remove black borders and resample input masks\n"
"* compute horizontal disparities with a block matching algorithm\n"
"* refine disparities to sub-pixel precision with a dichotomy algorithm\n"
"* apply an optional median filter\n"
"* filter disparities based on the correlation score and exploration bounds\n"
"* translate disparities in sensor geometry\n"
"* convert disparity to 3D Map.\n\n"
"Then all 3D maps are fused to produce DSM. The fusion method in each "
"DEM cell can be chosen between maximum, minimum and average.");
SetDocLimitations(" ");
......
......@@ -106,17 +106,21 @@ private:
"geometry, a pair of stereo images up to the sensor model precision");
SetDocName("Stereo-rectification deformation grid generator");
SetDocLongDescription("This application generates a pair of deformation "
SetDocLongDescription(
"This application generates a pair of deformation "
"grid to stereo-rectify a pair of stereo images according to sensor "
"modelling and a mean elevation hypothesis.\n\n"
"This application is the first part of the stereo reconstruction "
"framework. The output deformation grids can be passed to the "
"GridBasedImageResampling application for actual resampling into epipolar"
" geometry.\n\n"
"There are several ways to set the elevation source:\n"
" * An arbitrary constant elevation\n"
" * A DEM directory\n"
" * Compute an average elevation from a DEM\n\n"
"There are several ways to set the elevation source:\n\n"
"* An arbitrary constant elevation\n"
"* A DEM directory\n"
"* Compute an average elevation from a DEM\n\n"
"If needed, the application can compute inverse resampling grids (from "
"epipolar to original sensor geometry). Don't forget to check the other "
"outputs from the application. For instance, the application gives the "
......
......@@ -63,10 +63,18 @@ private:
void DoInit() override
{
SetName("Rasterization");
SetDescription("Rasterize a vector dataset.");
SetDescription("Reproject and rasterize a vector dataset");
SetDocName("Rasterization");
SetDocLongDescription("This application allows reprojecting and rasterize a vector dataset. The grid of the rasterized output can be set by using a reference image, or by setting all parmeters (origin, size, spacing) by hand. In the latter case, at least the spacing (ground sampling distance) is needed (other parameters are computed automatically). The rasterized output can also be in a different projection reference system than the input dataset.\n There are two rasterize mode available in the application. The first is the binary mode: it allows rendering all pixels belonging to a geometry of the input dataset in the foreground color, while rendering the other in background color. The second one allows rendering pixels belonging to a geometry with respect to an attribute of this geometry. The field of the attribute to render can be set by the user. In the second mode, the background value is still used for unassociated pixels.");
SetDocLongDescription(
"Reproject and rasterize a vector dataset. The grid of the rasterized output can be set by using a reference image, or by "
"setting all parmeters (origin, size, spacing) by hand. In the latter case, at least the spacing (ground sampling distance) is needed (other "
"parameters are computed automatically). The rasterized output can also be in a different projection reference system than the input dataset.\n\n"
"There are two rasterize mode available in the application. The first is the binary mode: it allows rendering all pixels belonging to a geometry of the "
"input dataset in the foreground color, while rendering the other in background color. The second one allows rendering pixels belonging to a geometry "
"with respect to an attribute of this geometry. The field of the attribute to render can be set by the user. In the second mode, the background value "
"is still used for unassociated pixels.");
SetDocLimitations("None");
SetDocAuthors("OTB-Team");
SetDocSeeAlso("For now, support of input dataset with multiple layers having different projection reference system is limited.");
......
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