"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."
"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."
"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_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)"
@@ -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.",
@@ -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."
@@ -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.",
@@ -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.",
@@ -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.",
@@ -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.",
@@ -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.",