Commit 8a52161d authored by Manuel Günther's avatar Manuel Günther

Fixed possible issues with '.. note::' directives.

parent a924ffaf
......@@ -19,7 +19,7 @@ bob::extension::FunctionDoc s_scale = bob::extension::FunctionDoc(
"1. Given a source image and a scale factor, the scaled image is returned in the size :py:func:`bob.ip.base.scaled_output_shape`\n\n"
"2. Given source and destination image, the source image is scaled such that it fits into the destination image.\n\n"
"3. Same as 2., but additionally boolean masks will be read and filled with according values.\n\n"
".. note:: For 2. and 3., scale factors are computed for both directions independently. "
".. note::\n\n For 2. and 3., scale factors are computed for both directions independently. "
"Factually, this means that the image **might be** stretched in either direction, i.e., the aspect ratio is **not** identical for the horizontal and vertical direction. "
"Even for 1. this might apply, e.g., when ``src.shape * scaling_factor`` does not result in integral values."
)
......@@ -198,7 +198,7 @@ bob::extension::FunctionDoc s_rotate = bob::extension::FunctionDoc(
"1. Given a source image and a rotation angle, the rotated image is returned in the size :py:func:`bob.ip.base.rotated_output_shape`\n\n"
"2. Given source and destination image and the rotation angle, the source image is rotated and filled into the destination image.\n\n"
"3. Same as 2., but additionally boolean masks will be read and filled with according values.\n\n"
".. note:: Since the implementation uses a different interpolation style than before, results might *slightly* differ."
".. note::\n\n Since the implementation uses a different interpolation style than before, results might *slightly* differ."
)
.add_prototype("src, rotation_angle", "dst")
.add_prototype("src, dst, rotation_angle")
......@@ -415,7 +415,7 @@ bob::extension::FunctionDoc s_extrapolateMask = bob::extension::FunctionDoc(
"3. A normal distributed random value with mean 1 and standard deviation ``random_sigma`` is added to the pixel value\n"
"4. The pixel value is set to the image at the current position\n\n"
"Any action considering a random number will use the given ``rng`` to create random numbers.\n\n"
".. note:: For the second variant, images of type ``float`` are preferred."
".. note::\n\n For the second variant, images of type ``float`` are preferred."
)
.add_prototype("mask, img")
.add_prototype("mask, img, random_sigma, [neighbors], [rng]")
......
......@@ -415,7 +415,7 @@ bob::extension::FunctionDoc s_integral = bob::extension::FunctionDoc(
"It is the responsibility of the user to select an appropriate type for the numpy array ``dst`` (and ``sqr``), which will contain the integral image. "
"By default, ``src`` and ``dst`` should have the same size. "
"When the ``sqr`` matrix is given as well, it will be filled with the squared integral image (useful to compute variances of pixels).\n\n"
".. note:: The ``sqr`` image is expected to have the same data type as the ``dst`` image.\n\n"
".. note::\n\n The ``sqr`` image is expected to have the same data type as the ``dst`` image.\n\n"
"If ``add_zero_border`` is set to ``True``, ``dst`` (and ``sqr``) should be one pixel larger than ``src`` in each dimension. "
"In this case, an extra zero pixel will be added at the beginning of each row and column."
......@@ -641,7 +641,7 @@ bob::extension::FunctionDoc s_lbphs = bob::extension::FunctionDoc(
"Now, the LBP's are extracted first, and then the image is split into blocks.\n\n"
"This function computes the LBP features for the whole image, using the given :py:class:`bob.ip.base.LBP` instance. "
"Afterwards, the resulting image is split into several blocks with the given block size and overlap, and local LBH histograms are extracted from each region.\n\n"
".. note:: To get the required output shape, you can use :py:func:`lbphs_output_shape` function."
".. note::\n\n To get the required output shape, you can use :py:func:`lbphs_output_shape` function."
)
.add_prototype("input, lbp, block_size, [block_overlap], [output]", "output")
.add_parameter("input", "array_like (2D)", "The source image to compute the LBPHS for")
......
......@@ -30,7 +30,7 @@ static auto DCTFeatures_doc = bob::extension::ClassDoc(
)
.add_prototype("coefficients, block_size, [block_overlap], [normalize_block], [normalize_dct], [square_pattern]", "")
.add_prototype("dct_features", "")
.add_parameter("coefficients", "int", "The number of DCT coefficients;\n\n.. note:: the real number of DCT coefficient returned by the extractor is ``coefficients-1`` when the block normalization is enabled by setting ``normalize_block=True`` (as the first coefficient is always 0 in this case)")
.add_parameter("coefficients", "int", "The number of DCT coefficients;\n\n.. note::\n\n the real number of DCT coefficient returned by the extractor is ``coefficients-1`` when the block normalization is enabled by setting ``normalize_block=True`` (as the first coefficient is always 0 in this case)")
.add_parameter("block_size", "(int, int)", "The size of the blocks, in which the image is decomposed")
.add_parameter("block_overlap", "(int, int)", "[default: ``(0, 0)``] The overlap of the blocks")
.add_parameter("normalize_block", "bool", "[default: ``False``] Normalize each block to zero mean and unit variance before extracting DCT coefficients? In this case, the first coefficient will always be zero and hence will not be returned")
......@@ -115,7 +115,7 @@ static auto coefficients = bob::extension::VariableDoc(
"coefficients",
"int",
"The number of DCT coefficients, with read and write access",
".. note:: The real number of DCT coefficient returned by the extractor is ``coefficients-1`` when the block normalization is enabled (as the first coefficient is always 0 in this case)"
".. note::\n\n The real number of DCT coefficient returned by the extractor is ``coefficients-1`` when the block normalization is enabled (as the first coefficient is always 0 in this case)"
);
PyObject* PyBobIpBaseDCTFeatures_getCoefficients(PyBobIpBaseDCTFeaturesObject* self, void*){
TRY
......@@ -160,7 +160,7 @@ static auto blockOverlap = bob::extension::VariableDoc(
"block_overlap",
"(int, int)",
"The block overlap in both vertical and horizontal direction of the Multi-Block-DCTFeatures extractor, with read and write access",
".. note:: The ``block_overlap`` must be smaller than the :py:attr:`block_size`."
".. note::\n\n The ``block_overlap`` must be smaller than the :py:attr:`block_size`."
);
PyObject* PyBobIpBaseDCTFeatures_getBlockOverlap(PyBobIpBaseDCTFeaturesObject* self, void*){
TRY
......@@ -184,7 +184,7 @@ static auto normalizeBlock = bob::extension::VariableDoc(
"normalize_block",
"bool",
"Normalize each block to zero mean and unit variance before extracting DCT coefficients (read and write access)",
".. note:: In case ``normalize_block`` is set to ``True`` the first coefficient will always be zero and, hence, will not be returned."
".. note::\n\n In case ``normalize_block`` is set to ``True`` the first coefficient will always be zero and, hence, will not be returned."
);
PyObject* PyBobIpBaseDCTFeatures_getNormalizeBlock(PyBobIpBaseDCTFeaturesObject* self, void*){
TRY
......@@ -229,7 +229,7 @@ static auto squarePattern = bob::extension::VariableDoc(
"square_pattern",
"bool",
"Tells whether a zigzag pattern or a square pattern is used for the DCT extraction (read and write access)?",
".. note:: For a square pattern, the number of DCT coefficients must be a square integer."
".. note::\n\n For a square pattern, the number of DCT coefficients must be a square integer."
);
PyObject* PyBobIpBaseDCTFeatures_getSquarePattern(PyBobIpBaseDCTFeaturesObject* self, void*){
TRY
......@@ -395,7 +395,7 @@ static auto extract = bob::extension::FunctionDoc(
"The destination array, if given, should be a 2D or 3D array of type float64 and allocated with the correct dimensions (see :py:func:`output_shape`). "
"If the destination array is not given (first version), it is generated in the required size. "
"The blocks can be split into either a 2D array of shape ``(block_index, coefficients)`` by setting ``flat=True``, or into a 3D array of shape ``(block_index_y, block_index_x, coefficients)`` with ``flat=False``.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("input, [flat]", "output")
......
......@@ -334,10 +334,10 @@ static auto extract = bob::extension::FunctionDoc(
"This function extracts the facial image based on the eye locations (or the location of other fixed point, see note below). "
"The geometric normalization is applied such that the eyes are placed to **fixed positions** in the normalized image. "
"The image is cropped at the same time, so that no unnecessary operations are executed.\n\n"
".. note:: Instead of the eyes, any two fixed positions can be used to normalize the face. "
".. note::\n\n Instead of the eyes, any two fixed positions can be used to normalize the face. "
"This can simply be achieved by selecting two other nodes in the constructor (see :py:class:`FaceEyesNorm`) and in this function. "
"Just make sure that 'right' and 'left' refer to the same landmarks in both functions.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("input, right_eye, left_eye", "output")
......
......@@ -23,7 +23,7 @@ static auto Gaussian_doc = bob::extension::ClassDoc(
"Constructs a new Gaussian filter",
"The Gaussian kernel is generated in both directions independently, using the given standard deviation and the given radius, where the size of the kernels is actually ``2*radius+1``. "
"When the radius is not given or negative, it will be automatically computed ad ``3*sigma``.\n\n"
".. note:: Since the Gaussian smoothing is done by convolution, a larger radius will lead to longer execution time.",
".. note::\n\n Since the Gaussian smoothing is done by convolution, a larger radius will lead to longer execution time.",
true
)
.add_prototype("sigma, [radius], [border]","")
......@@ -109,7 +109,7 @@ static auto sigma = bob::extension::VariableDoc(
"sigma",
"(float, float)",
"The standard deviation of the Gaussian along the y- and x-axes; with read and write access",
".. note:: The :py:attr:`radius` of the kernel is **not** reset by setting the ``sigma`` value."
".. note::\n\n The :py:attr:`radius` of the kernel is **not** reset by setting the ``sigma`` value."
);
PyObject* PyBobIpBaseGaussian_getSigma(PyBobIpBaseGaussianObject* self, void*){
TRY
......@@ -242,7 +242,7 @@ static auto filter = bob::extension::FunctionDoc(
"filter",
"Smooths an image (2D/grayscale or 3D/color)",
"If given, the dst array should have the expected type (numpy.float64) and the same size as the src array.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, [dst]", "dst")
......
......@@ -796,7 +796,7 @@ static auto process = bob::extension::FunctionDoc(
"process",
"Computes a Gaussian Pyramid for an input 2D image",
"If given, the results are put in the output ``dst``, which output should already be allocated and of the correct size (using the :py:func:`allocate_output` method).\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, [dst]", "dst")
......
......@@ -237,7 +237,7 @@ static auto process = bob::extension::FunctionDoc(
"process",
"This function geometrically normalizes an image or a position in the image",
"The function rotates and scales the given image, or a position in image coordinates, such that the result is **visually** rotated and scaled with the :py:attr:`rotation_angle` and :py:attr:`scaling_factor`.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("input, output, center")
......
......@@ -453,7 +453,7 @@ static auto symmetric = bob::extension::VariableDoc(
"symmetric",
"bool",
"Tells whether a zigzag pattern or a square pattern is used for the DCT extraction (read and write access)?",
".. note:: For a square pattern, the number of DCT coefficients must be a square integer."
".. note::\n\n For a square pattern, the number of DCT coefficients must be a square integer."
);
PyObject* PyBobIpBaseGLCM_getSymmetric(PyBobIpBaseGLCMObject* self, void*){
TRY
......@@ -486,7 +486,7 @@ static auto normalized = bob::extension::VariableDoc(
"normalized",
"bool",
"Tells whether a zigzag pattern or a square pattern is used for the DCT extraction (read and write access)?",
".. note:: For a square pattern, the number of DCT coefficients must be a square integer."
".. note::\n\n For a square pattern, the number of DCT coefficients must be a square integer."
);
PyObject* PyBobIpBaseGLCM_getNormalized(PyBobIpBaseGLCMObject* self, void*){
TRY
......@@ -618,7 +618,7 @@ static auto extract = bob::extension::FunctionDoc(
"extract",
"Extracts the GLCM matrix from the given input image",
"If given, the output array should have the expected type (numpy.float64) and the size as defined by :py:func:`output_shape` .\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("input, [output]", "output")
......
......@@ -657,7 +657,7 @@ static auto extract = bob::extension::FunctionDoc(
"Extract the HOG descriptors",
"This extracts HOG descriptors from the input image. "
"The output is 3D, the first two dimensions being the y- and x- indices of the block, and the last one the index of the bin (among the concatenated cell histograms for this block).\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("input, [output]", "output")
......
......@@ -64,7 +64,7 @@ static auto LBP_doc = bob::extension::ClassDoc(
"Finally, the border handling of the image can be selected. "
"With the ``'shrink'`` option, no LBP code is computed for the border pixels and the resulting image is :math:`2\\times` ``radius`` or :math:`3\\times` ``block_size`` :math:`-1` pixels smaller in both directions, see :py:func:`lbp_shape`. "
"The ``'wrap'`` option will wrap around the border and no truncation is performed.\n\n"
".. note:: To compute MB-LBP features, it is possible to compute an integral image before to speed up the calculation.",
".. note::\n\n To compute MB-LBP features, it is possible to compute an integral image before to speed up the calculation.",
true
)
.add_prototype("neighbors, [radius], [circular], [to_average], [add_average_bit], [uniform], [rotation_invariant], [elbp_type], [border_handling]", "")
......@@ -320,7 +320,7 @@ static auto blockOverlap = bob::extension::VariableDoc(
"block_overlap",
"(int, int)",
"The block overlap in both vertical and horizontal direction of the Multi-Block-LBP extractor, with read and write access",
".. note:: The ``block_overlap`` must be smaller than the :py:attr:`block_size`. "
".. note::\n\n The ``block_overlap`` must be smaller than the :py:attr:`block_size`. "
"To set both the block size and the block overlap at the same time, use the :py:func:`set_block_size_and_overlap` function."
);
PyObject* PyBobIpBaseLBP_getBlockOverlap(PyBobIpBaseLBPObject* self, void*){
......@@ -345,7 +345,7 @@ static auto points = bob::extension::VariableDoc(
"points",
"int",
"The number of neighbors (usually 4, 8 or 16), with read and write access",
".. note:: The ``block_overlap`` must be smaller than the :py:attr:`block_size`. "
".. note::\n\n The ``block_overlap`` must be smaller than the :py:attr:`block_size`. "
"To set both the block size and the block overlap at the same time, use the :py:func:`set_block_size_and_overlap` function."
);
PyObject* PyBobIpBaseLBP_getPoints(PyBobIpBaseLBPObject* self, void*){
......@@ -580,7 +580,7 @@ static auto offset = bob::extension::VariableDoc(
"offset",
"(int, int)",
"The offset in the image, where the first LBP code can be extracted (read access only)",
".. note:: When extracting LBP features from an image with a specific ``shape``, positions might be in range ``[offset, shape - offset[`` only. "
".. note::\n\n When extracting LBP features from an image with a specific ``shape``, positions might be in range ``[offset, shape - offset[`` only. "
"Otherwise, an exception will be raised."
);
PyObject* PyBobIpBaseLBP_getOffset(PyBobIpBaseLBPObject* self, void*){
......@@ -819,7 +819,7 @@ static auto extract = bob::extension::FunctionDoc(
"When MB-LBP features will be extracted, an integral image will be computed to speed up the calculation. "
"The integral image calculation can be done **before** this function is called, and the integral image can be passed to this function directly. "
"In this case, please set the ``is_integral_image`` parameter to ``True``.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("input, [is_integral_image]", "output")
......
......@@ -254,7 +254,7 @@ static auto process = bob::extension::FunctionDoc(
"Applies the Self Quotient Image algorithm to an image (2D/grayscale or color 3D/color) of type uint8, uint16 or double",
".. todo:: Check if this documentation is correct (seems to be copied from :py:class:`bob.ip.base.SelfQuotientImage`\n\n"
"If given, the ``dst`` array should have the type float and the same size as the ``src`` array.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, [dst]", "dst")
......
......@@ -255,7 +255,7 @@ static auto process = bob::extension::FunctionDoc(
"process",
"Applies the Self Quotient Image algorithm to an image (2D/grayscale or 3D/color) of type uint8, uint16 or double",
"If given, the ``dst`` array should have the type float and the same size as the ``src`` array.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, [dst]", "dst")
......
......@@ -617,7 +617,7 @@ static auto computeDescriptor = bob::extension::FunctionDoc(
"compute_descriptor",
"Computes SIFT descriptor for a 2D/grayscale image, at the given keypoints",
"If given, the results are put in the output ``dst``, which output should be of type float and allocated in the shape :py:func:`output_shape` method).\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, keypoints, [dst]", "dst")
......
......@@ -322,7 +322,7 @@ static auto process = bob::extension::FunctionDoc(
"The input array is a 2D array/grayscale image. "
"The destination array, if given, should be a 2D array of type float64 and allocated in the same size as the input. "
"If the destination array is not given, it is generated in the required size.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("input, [output]", "output")
......
......@@ -332,7 +332,7 @@ static auto extract = bob::extension::FunctionDoc(
"It returns a list of descriptors, one for each keypoint and orientation. "
"The first four values are the x, y, sigma and orientation of the values. "
"The 128 remaining values define the descriptor.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, [keypoints]", "dst")
......@@ -666,7 +666,7 @@ static auto extract_ = bob::extension::FunctionDoc(
"Computes the dense SIFT features from an input image, using the VLFeat library",
"If given, the results are put in the output ``dst``, which should be of type float and allocated in the shape :py:func:`output_shape` method.\n\n"
".. todo:: Describe the output of the :py:func:`VLDSIFT.extract` method in more detail.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, [dst]", "dst")
......
......@@ -108,7 +108,7 @@ static auto sigma = bob::extension::VariableDoc(
"sigma",
"(float, float)",
"The standard deviation of the weighted Gaussian along the y- and x-axes; with read and write access",
".. note:: The :py:attr:`radius` of the kernel is **not** reset by setting the ``sigma`` value."
".. note::\n\n The :py:attr:`radius` of the kernel is **not** reset by setting the ``sigma`` value."
);
PyObject* PyBobIpBaseWeightedGaussian_getSigma(PyBobIpBaseWeightedGaussianObject* self, void*){
TRY
......@@ -205,7 +205,7 @@ static auto filter = bob::extension::FunctionDoc(
"filter",
"Smooths an image (2D/grayscale or 3D/color)",
"If given, the dst array should have the expected type (numpy.float64) and the same size as the src array.\n\n"
".. note:: The :py:func:`__call__` function is an alias for this method.",
".. note::\n\n The :py:func:`__call__` function is an alias for this method.",
true
)
.add_prototype("src, [dst]", "dst")
......
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