From 05173022bb05e92a50fd14ee3f40f53c8c843fed Mon Sep 17 00:00:00 2001 From: Elena Fedotova Date: Tue, 29 Mar 2011 21:48:36 +0000 Subject: [PATCH] Purpose: updated the last section of chapter 10 --- ...mera_calibration_and_3d_reconstruction.rst | 117 +++++++++--------- .../doc/feature_detection_and_description.rst | 4 +- modules/gpu/doc/image_filtering.rst | 20 +-- modules/gpu/doc/image_processing.rst | 30 ++--- modules/gpu/doc/matrix_reductions.rst | 2 +- modules/gpu/doc/object_detection.rst | 6 +- modules/gpu/doc/per_element_operations.rst | 74 +++++------ 7 files changed, 127 insertions(+), 126 deletions(-) diff --git a/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst b/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst index 83c9737287..02c9244239 100644 --- a/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst @@ -1,4 +1,4 @@ -Camera Calibration and 3d Reconstruction +Camera Calibration and 3D Reconstruction ======================================== .. highlight:: cpp @@ -9,7 +9,8 @@ gpu::StereoBM_GPU ----------------- .. cpp:class:: gpu::StereoBM_GPU -The class for computing stereo correspondence using block matching algorithm. :: +This class computes stereo correspondence (disparity map) using the block matching algorithm. +:: class StereoBM_GPU { @@ -39,30 +40,30 @@ The class for computing stereo correspondence using block matching algorithm. :: }; -This class computes the disparity map using block matching algorithm. The class also performs pre- and post- filtering steps: sobel prefiltering (if ``PREFILTER_XSOBEL`` flag is set) and low textureness filtering (if ``averageTexThreshols > 0``). If ``avergeTexThreshold = 0``, low textureness filtering is disabled, otherwise the disparity is set to 0 in each point ``(x, y)``, where for the left image +The class also performs pre- and post-filtering steps: Sobel pre-filtering (if ``PREFILTER_XSOBEL`` flag is set) and low textureness filtering (if ``averageTexThreshols > 0``). If ``avergeTexThreshold = 0``, low textureness filtering is disabled. Otherwise, the disparity is set to 0 in each point ``(x, y)``, where for the left image .. math:: \sum HorizontalGradiensInWindow(x, y, winSize) < (winSize \cdot winSize) \cdot avergeTexThreshold -i.e. input left image is low textured. +This means that the input left image is low textured. .. index:: gpu::StereoBM_GPU::StereoBM_GPU gpu::StereoBM_GPU::StereoBM_GPU ------------------------------------_ +----------------------------------- .. cpp:function:: gpu::StereoBM_GPU::StereoBM_GPU() .. cpp:function:: gpu::StereoBM_GPU::StereoBM_GPU(int preset, int ndisparities = DEFAULT_NDISP, int winSize = DEFAULT_WINSZ) - ``StereoBM_GPU`` constructors. + Enables ``StereoBM_GPU`` constructors. :param preset: Preset: - * **BASIC_PRESET** Without preprocessing. + * **BASIC_PRESET** Basic mode without pre-processing. - * **PREFILTER_XSOBEL** Sobel prefilter. + * **PREFILTER_XSOBEL** Sobel pre-filtering mode. - :param ndisparities: Number of disparities. Must be a multiple of 8 and less or equal then 256. + :param ndisparities: Number of disparities. It must be a multiple of 8 and less or equal to 256. :param winSize: Block size. @@ -76,13 +77,13 @@ gpu::StereoBM_GPU::operator () .. cpp:function:: void gpu::StereoBM_GPU::operator() (const GpuMat& left, const GpuMat& right, GpuMat& disparity, const Stream& stream) - The stereo correspondence operator. Finds the disparity for the specified rectified stereo pair. + Enables the stereo correspondence operator that finds the disparity for the specified rectified stereo pair. - :param left: Left image; supports only ``CV_8UC1`` type. + :param left: Left image. Only ``CV_8UC1`` type is supported. :param right: Right image with the same size and the same type as the left one. - :param disparity: Output disparity map. It will be ``CV_8UC1`` image with the same size as the input images. + :param disparity: Output disparity map. It is a ``CV_8UC1`` image with the same size as the input images. :param stream: Stream for the asynchronous version. @@ -92,7 +93,7 @@ gpu::StereoBM_GPU::checkIfGpuCallReasonable ----------------------------------------------- .. cpp:function:: bool gpu::StereoBM_GPU::checkIfGpuCallReasonable() - Some heuristics that tries to estmate if the current GPU will be faster then CPU in this algorithm. It queries current active device. + Uses a heuristic method to estimate whether the current GPU is faster than the CPU in this algorithm. It queries the currently active device. .. index:: gpu::StereoBeliefPropagation @@ -100,7 +101,7 @@ gpu::StereoBeliefPropagation ---------------------------- .. cpp:class:: gpu::StereoBeliefPropagation -The class for computing stereo correspondence using belief propagation algorithm. :: +This class computes stereo correspondence using the belief propagation algorithm. :: class StereoBeliefPropagation { @@ -143,21 +144,21 @@ The class for computing stereo correspondence using belief propagation algorithm ... }; -The class implements Pedro F. Felzenszwalb algorithm [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006]. It can compute own data cost (using truncated linear model) or use user-provided data cost. +The class implements Pedro F. Felzenszwalb algorithm [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006]. It can compute own data cost (using a truncated linear model) or use a user-provided data cost. -**Note:** ``StereoBeliefPropagation`` requires a lot of memory: +**Note:** ``StereoBeliefPropagation`` requires a lot of memory for message storage: .. math:: width \_ step \cdot height \cdot ndisp \cdot 4 \cdot (1 + 0.25) -for message storage and +and for data cost storage: .. math:: width\_step \cdot height \cdot ndisp \cdot (1 + 0.25 + 0.0625 + \dotsm + \frac{1}{4^{levels}}) -for data cost storage. ``width_step`` is the number of bytes in a line including the padding. +``width_step`` is the number of bytes in a line including padding. .. index:: gpu::StereoBeliefPropagation::StereoBeliefPropagation @@ -167,7 +168,7 @@ gpu::StereoBeliefPropagation::StereoBeliefPropagation .. cpp:function:: gpu::StereoBeliefPropagation::StereoBeliefPropagation( int ndisp, int iters, int levels, float max_data_term, float data_weight, float max_disc_term, float disc_single_jump, int msg_type = CV_32F) - StereoBeliefPropagation constructors. + Enables the ``StereoBeliefPropagation`` constructors. :param ndisp: Number of disparities. @@ -183,9 +184,9 @@ gpu::StereoBeliefPropagation::StereoBeliefPropagation :param disc_single_jump: Discontinuity single jump. - :param msg_type: Type for messages. Supports ``CV_16SC1`` and ``CV_32FC1``. + :param msg_type: Type for messages. ``CV_16SC1`` and ``CV_32FC1`` types are supported. -``StereoBeliefPropagation`` uses truncated linear model for the data cost and discontinuity term: +``StereoBeliefPropagation`` uses a truncated linear model for the data cost and discontinuity terms: .. math:: @@ -195,9 +196,9 @@ gpu::StereoBeliefPropagation::StereoBeliefPropagation DiscTerm = \min (disc \_ single \_ jump \cdot \lvert f_1-f_2 \rvert , max \_ disc \_ term) -For more details please see [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006]. +For more details, see [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006]. -By default, :cpp:class:`StereoBeliefPropagation` uses floating-point arithmetics and ``CV_32FC1`` type for messages. But also it can use fixed-point arithmetics and ``CV_16SC1`` type for messages for better performance. To avoid overflow in this case, the parameters must satisfy +By default, :cpp:class:`StereoBeliefPropagation` uses floating-point arithmetics and the ``CV_32FC1`` type for messages. But it can also use fixed-point arithmetics and the ``CV_16SC1`` message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement: .. math:: @@ -210,7 +211,7 @@ gpu::StereoBeliefPropagation::estimateRecommendedParams .. cpp:function:: void gpu::StereoBeliefPropagation::estimateRecommendedParams( int width, int height, int& ndisp, int& iters, int& levels) - Some heuristics that tries to compute recommended parameters (``ndisp``, ``iters`` and ``levels``) for specified image size (``width`` and ``height``). + Uses a heuristic method to compute the recommended parameters (``ndisp``, ``iters`` and ``levels``) for the specified image size (``width`` and ``height``). .. index:: gpu::StereoBeliefPropagation::operator () @@ -220,13 +221,13 @@ gpu::StereoBeliefPropagation::operator () .. cpp:function:: void gpu::StereoBeliefPropagation::operator()( const GpuMat& left, const GpuMat& right, GpuMat& disparity, Stream& stream) - The stereo correspondence operator. Finds the disparity for the specified rectified stereo pair or data cost. + Enables the stereo correspondence operator that finds the disparity for the specified rectified stereo pair or data cost. - :param left: Left image; supports ``CV_8UC1`` , ``CV_8UC3`` and ``CV_8UC4`` types. + :param left: Left image. ``CV_8UC1`` , ``CV_8UC3`` and ``CV_8UC4`` types are supported. :param right: Right image with the same size and the same type as the left one. - :param disparity: Output disparity map. If ``disparity`` is empty output type will be ``CV_16SC1`` , otherwise output type will be ``disparity.type()`` . + :param disparity: Output disparity map. If ``disparity`` is empty, the output type is ``CV_16SC1`` . Otherwise, the output type is ``disparity.type()`` . :param stream: Stream for the asynchronous version. @@ -234,9 +235,9 @@ gpu::StereoBeliefPropagation::operator () .. cpp:function:: void gpu::StereoBeliefPropagation::operator()( const GpuMat& data, GpuMat& disparity, Stream& stream) - :param data: The user specified data cost, a matrix of ``msg_type`` type and ``Size(*ndisp, )`` size. + :param data: The user-specified data cost, a matrix of ``msg_type`` type and ``Size(*ndisp, )`` size. - :param disparity: Output disparity map. If the matrix is empty, it will be created as ``CV_16SC1`` matrix, otherwise the type will be retained. + :param disparity: Output disparity map. If the matrix is empty, it is created as the ``CV_16SC1`` matrix. Otherwise, the type is retained. :param stream: Stream for the asynchronous version. @@ -246,7 +247,7 @@ gpu::StereoConstantSpaceBP -------------------------- .. cpp:class:: gpu::StereoConstantSpaceBP -The class for computing stereo correspondence using constant space belief propagation algorithm. :: +This class computes stereo correspondence using the constant space belief propagation algorithm. :: class StereoConstantSpaceBP { @@ -297,7 +298,7 @@ The class for computing stereo correspondence using constant space belief propag }; -The class implements Q. Yang algorithm [Q. Yang, L. Wang, and N. Ahuja. A constant-space belief propagation algorithm for stereo matching. In CVPR, 2010]. ``StereoConstantSpaceBP`` supports both local minimum and global minimum data cost initialization algortihms. For more details please see the paper. By default local algorithm is used, and to enable global algorithm set ``use_local_init_data_cost`` to false. +The class implements Q. Yang algorithm [Q. Yang, L. Wang, and N. Ahuja. A constant-space belief propagation algorithm for stereo matching. In CVPR, 2010]. ``StereoConstantSpaceBP`` supports both local minimum and global minimum data cost initialization algortihms. For more details, see the paper. By default, a local algorithm is used. To enable a global algorithm, set ``use_local_init_data_cost`` to ``false``. .. index:: gpu::StereoConstantSpaceBP::StereoConstantSpaceBP @@ -307,7 +308,7 @@ gpu::StereoConstantSpaceBP::StereoConstantSpaceBP .. cpp:function:: StereoConstantSpaceBP::StereoConstantSpaceBP(int ndisp, int iters, int levels, int nr_plane, float max_data_term, float data_weight, float max_disc_term, float disc_single_jump, int min_disp_th = 0, int msg_type = CV_32F) - StereoConstantSpaceBP constructors. + Enables the StereoConstantSpaceBP constructors. :param ndisp: Number of disparities. @@ -315,7 +316,7 @@ gpu::StereoConstantSpaceBP::StereoConstantSpaceBP :param levels: Number of levels. - :param nr_plane: Number of disparity levels on the first level + :param nr_plane: Number of disparity levels on the first level. :param max_data_term: Truncation of data cost. @@ -327,9 +328,9 @@ gpu::StereoConstantSpaceBP::StereoConstantSpaceBP :param min_disp_th: Minimal disparity threshold. - :param msg_type: Type for messages. Supports ``CV_16SC1`` and ``CV_32FC1`` . + :param msg_type: Type for messages. ``CV_16SC1`` and ``CV_32FC1`` types are supported. -``StereoConstantSpaceBP`` uses truncated linear model for the data cost and discontinuity term: +``StereoConstantSpaceBP`` uses a truncated linear model for the data cost and discontinuity terms: .. math:: @@ -339,11 +340,11 @@ gpu::StereoConstantSpaceBP::StereoConstantSpaceBP DiscTerm = \min (disc \_ single \_ jump \cdot \lvert f_1-f_2 \rvert , max \_ disc \_ term) -For more details please see -qx_csbp +For more details, see +qx_csbp ?? . -By default ``StereoConstantSpaceBP`` uses floating-point arithmetics and ``CV_32FC1`` type for messages. But also it can use fixed-point arithmetics and ``CV_16SC1`` type for messages for better perfomance. To avoid overflow in this case, the parameters must satisfy +By default, ``StereoConstantSpaceBP`` uses floating-point arithmetics and the ``CV_32FC1`` type for messages. But it can also use fixed-point arithmetics and the ``CV_16SC1`` message type for better perfomance. To avoid an overflow in this case, the parameters must satisfy the following requirement: .. math:: @@ -356,7 +357,7 @@ gpu::StereoConstantSpaceBP::estimateRecommendedParams .. cpp:function:: void gpu::StereoConstantSpaceBP::estimateRecommendedParams( int width, int height, int& ndisp, int& iters, int& levels, int& nr_plane) - Some heuristics that tries to compute parameters (ndisp, iters, levelsand nrplane) for specified image size (widthand height). + Uses a heuristic method to compute parameters (ndisp, iters, levelsand nrplane) for the specified image size (widthand height). .. index:: gpu::StereoConstantSpaceBP::operator () @@ -366,13 +367,13 @@ gpu::StereoConstantSpaceBP::operator () .. cpp:function:: void gpu::StereoConstantSpaceBP::operator()( const GpuMat& left, const GpuMat& right, GpuMat& disparity, Stream& stream) - The stereo correspondence operator. Finds the disparity for the specified rectified stereo pair. + Enables the stereo correspondence operator that finds the disparity for the specified rectified stereo pair. - :param left: Left image; supports ``CV_8UC1`` , ``CV_8UC3`` and ``CV_8UC4`` types. + :param left: Left image. ``CV_8UC1`` , ``CV_8UC3`` and ``CV_8UC4`` types are supported. :param right: Right image with the same size and the same type as the left one. - :param disparity: Output disparity map. If ``disparity`` is empty output type will be ``CV_16SC1`` , otherwise output type will be ``disparity.type()`` . + :param disparity: Output disparity map. If ``disparity`` is empty, the output type is ``CV_16SC1`` . Otherwise, the output type is ``disparity.type()`` . :param stream: Stream for the asynchronous version. @@ -384,7 +385,7 @@ gpu::DisparityBilateralFilter ----------------------------- .. cpp:class:: gpu::DisparityBilateralFilter -The class for disparity map refinement using joint bilateral filtering. :: +This class refines a disparity map using joint bilateral filtering. :: class CV_EXPORTS DisparityBilateralFilter { @@ -419,7 +420,7 @@ gpu::DisparityBilateralFilter::DisparityBilateralFilter .. cpp:function:: gpu::DisparityBilateralFilter::DisparityBilateralFilter( int ndisp, int radius, int iters, float edge_threshold, float max_disc_threshold, float sigma_range) - ``DisparityBilateralFilter`` constructors. + Enables the ``DisparityBilateralFilter`` constructors. :param ndisp: Number of disparities. @@ -441,13 +442,13 @@ gpu::DisparityBilateralFilter::operator () .. cpp:function:: void gpu::DisparityBilateralFilter::operator()( const GpuMat& disparity, const GpuMat& image, GpuMat& dst, Stream& stream) - Refines disparity map using joint bilateral filtering. + Refines a disparity map using joint bilateral filtering. - :param disparity: Input disparity map; supports ``CV_8UC1`` and ``CV_16SC1`` types. + :param disparity: Input disparity map. ``CV_8UC1`` and ``CV_16SC1`` types are supported. - :param image: Input image; supports ``CV_8UC1`` and ``CV_8UC3`` types. + :param image: Input image. ``CV_8UC1`` and ``CV_8UC3`` types are supported. - :param dst: Destination disparity map; will have the same size and type as ``disparity`` . + :param dst: Destination disparity map. It has the same size and type as ``disparity`` . :param stream: Stream for the asynchronous version. @@ -459,17 +460,17 @@ gpu::drawColorDisp .. cpp:function:: void gpu::drawColorDisp(const GpuMat& src_disp, GpuMat& dst_disp, int ndisp, const Stream& stream) - Does coloring of disparity image. + Colors a disparity image. - :param src_disp: Source disparity image. Supports ``CV_8UC1`` and ``CV_16SC1`` types. + :param src_disp: Source disparity image. ``CV_8UC1`` and ``CV_16SC1`` types are supported. - :param dst_disp: Output disparity image. Will have the same size as ``src_disp`` and ``CV_8UC4`` type in ``BGRA`` format (alpha = 255). + :param dst_disp: Output disparity image. It has the same size as ``src_disp`` . The type is ``CV_8UC4`` in ``BGRA`` format (alpha = 255). :param ndisp: Number of disparities. :param stream: Stream for the asynchronous version. -This function draws a colorized disparity map by converting disparity values from ``[0..ndisp)`` interval first to ``HSV`` color space (where different disparity values correspond to different hues) and then converting the pixels to ``RGB`` for visualization. +This function draws a colored disparity map by converting disparity values from ``[0..ndisp)`` interval first to ``HSV`` color space (where different disparity values correspond to different hues) and then converting the pixels to ``RGB`` for visualization. .. index:: gpu::reprojectImageTo3D @@ -479,11 +480,11 @@ gpu::reprojectImageTo3D .. cpp:function:: void gpu::reprojectImageTo3D(const GpuMat& disp, GpuMat& xyzw, const Mat& Q, const Stream& stream) - Reprojects disparity image to 3D space. + Reprojects a disparity image to 3D space. - :param disp: Input disparity image; supports ``CV_8U`` and ``CV_16S`` types. + :param disp: Input disparity image. ``CV_8U`` and ``CV_16S`` types are supported. - :param xyzw: Output 4-channel floating-point image of the same size as ``disp`` . Each element of ``xyzw(x,y)`` will contain the 3D coordinates ``(x,y,z,1)`` of the point ``(x,y)`` , computed from the disparity map. + :param xyzw: Output 4-channel floating-point image of the same size as ``disp`` . Each element of ``xyzw(x,y)`` contains 3D coordinates ``(x,y,z,1)`` of the point ``(x,y)`` , computed from the disparity map. :param Q: :math:`4 \times 4` perspective transformation matrix that can be obtained via :ref:`StereoRectify` . @@ -498,7 +499,7 @@ gpu::solvePnPRansac .. cpp:function:: void gpu::solvePnPRansac(const Mat& object, const Mat& image, const Mat& camera_mat, const Mat& dist_coef, Mat& rvec, Mat& tvec, bool use_extrinsic_guess=false, int num_iters=100, float max_dist=8.0, int min_inlier_count=100, vector* inliers=NULL) - Finds the object pose from the 3D-2D point correspondences. + Finds the object pose from 3D-2D point correspondences. :param object: Single-row matrix of object points. @@ -512,13 +513,13 @@ gpu::solvePnPRansac :param tvec: Output 3D translation vector. - :param use_extrinsic_guess: Indicates the function must use ``rvec`` and ``tvec`` as initial transformation guess. It isn't supported for now. + :param use_extrinsic_guess: Flag to indicate that the function must use ``rvec`` and ``tvec`` as an initial transformation guess. It is not supported for now. :param num_iters: Maximum number of RANSAC iterations. :param max_dist: Euclidean distance threshold to detect whether point is inlier or not. - :param min_inlier_count: Indicates the function must stop if greater or equal number of inliers is achieved. It isn't supported for now. + :param min_inlier_count: Flag to indicate that the function must stop if greater or equal number of inliers is achieved. It is not supported for now. :param inliers: Output vector of inlier indices. diff --git a/modules/gpu/doc/feature_detection_and_description.rst b/modules/gpu/doc/feature_detection_and_description.rst index 12c9c8e031..b6aaf1fab0 100644 --- a/modules/gpu/doc/feature_detection_and_description.rst +++ b/modules/gpu/doc/feature_detection_and_description.rst @@ -308,13 +308,13 @@ gpu::BruteForceMatcher_GPU::radiusMatch :param queryDescs: Query set of descriptors. - :param trainDescs: Training set of descriptors.It is not added to train descriptors collection stored in the class object. + :param trainDescs: Training set of descriptors. It is not added to train descriptors collection stored in the class object. :param trainIdx: ``trainIdx.at(i, j)`` is the index of j-th training descriptor which is close enough to i-th query descriptor. If ``trainIdx`` is empty, it is created with the size ``queryDescs.rows x trainDescs.rows``. When the matrix is pre-allocated, it can have less than ``trainDescs.rows`` columns. Then the function will return as many matches for each query descriptors as fit into the matrix. :param nMatches: ``nMatches.at(0, i)`` contains the number of matching descriptors for the i-th query descriptor. The value can be larger than ``trainIdx.cols`` - it means that the function could not store all the matches since it did not have enough memory. - :param distance: ``distance.at(i, j)`` is the distance between the j-th match for the j-th query descriptor and the this very query descriptor. The matrix will have ``CV_32FC1`` type and the same size as ``trainIdx``. + :param distance: ``distance.at(i, j)`` Distance between the j-th match for the j-th query descriptor and this very query descriptor. The matrix has the ``CV_32FC1`` type and the same size as ``trainIdx``. :param maxDistance: Distance threshold. diff --git a/modules/gpu/doc/image_filtering.rst b/modules/gpu/doc/image_filtering.rst index f0ad4270f8..33ed783bda 100644 --- a/modules/gpu/doc/image_filtering.rst +++ b/modules/gpu/doc/image_filtering.rst @@ -203,7 +203,7 @@ gpu::createBoxFilter_GPU :param srcType: Input image type. Supports ``CV_8UC1`` and ``CV_8UC4``. - :param dstType: Output image type. Supports only the same as source type. + :param dstType: Output image type. It supports only the same as the source type. :param ksize: Kernel size. @@ -225,7 +225,7 @@ gpu::boxFilter :param dst: Output image type. The size and type is the same as ``src``. - :param ddepth: Output image depth. If -1, the output image will have the same depth as the input one. The only values allowed here are ``CV_8U`` and -1. + :param ddepth: Output image depth. If -1, the output image has the same depth as the input one. The only values allowed here are ``CV_8U`` and -1. :param ksize: Kernel size. @@ -245,7 +245,7 @@ gpu::blur :param src: Input image. ``CV_8UC1`` and ``CV_8UC4`` source types are supported. - :param dst: Output image type. The size and type is the same as ``src`` . + :param dst: Output image type with the same size and type as ``src`` . :param ksize: Kernel size. @@ -289,7 +289,7 @@ gpu::erode :param src: Source image. Only ``CV_8UC1`` and ``CV_8UC4`` types are supported. - :param dst: Destination image. The size and type is the same as ``src`` . + :param dst: Destination image with the same size and type as ``src`` . :param kernel: Structuring element used for dilation. If ``kernel=Mat()``, a 3x3 rectangular structuring element is used. @@ -311,7 +311,7 @@ gpu::dilate :param src: Source image. ``CV_8UC1`` and ``CV_8UC4`` source types are supported. - :param dst: Destination image. The size and type is the same as ``src``. + :param dst: Destination image with the same size and type as ``src``. :param kernel: Structuring element used for dilation. If ``kernel=Mat()``, a 3x3 rectangular structuring element is used. @@ -333,7 +333,7 @@ gpu::morphologyEx :param src: Source image. ``CV_8UC1`` and ``CV_8UC4`` source types are supported. - :param dst: Destination image. The size and type is the same as ``src`` + :param dst: Destination image with the same size and type as ``src`` :param op: Type of morphological operation. The following types are possible: @@ -506,7 +506,7 @@ gpu::sepFilter2D :param src: Source image. ``CV_8UC1``, ``CV_8UC4``, ``CV_16SC1``, ``CV_16SC2``, ``CV_32SC1``, ``CV_32FC1`` source types are supported. - :param dst: Destination image. The size and number of channels is the same as ``src`` . + :param dst: Destination image with the same size and number of channels as ``src`` . :param ddepth: Destination image depth. ``CV_8U``, ``CV_16S``, ``CV_32S``, and ``CV_32F`` are supported. @@ -550,7 +550,7 @@ gpu::Sobel :param src: Source image. ``CV_8UC1``, ``CV_8UC4``, ``CV_16SC1``, ``CV_16SC2``, ``CV_32SC1``, ``CV_32FC1`` source types are supported. - :param dst: Destination image. The size and number of channels is the same as source image has. + :param dst: Destination image with the same size and number of channels as source image. :param ddepth: Destination image depth. ``CV_8U``, ``CV_16S``, ``CV_32S``, and ``CV_32F`` are supported. @@ -576,7 +576,7 @@ gpu::Scharr :param src: Source image. ``CV_8UC1``, ``CV_8UC4``, ``CV_16SC1``, ``CV_16SC2``, ``CV_32SC1``, ``CV_32FC1`` source types are supported. - :param dst: Destination image. The size and number of channels is the same as ``src`` has. + :param dst: Destination image with the same size and number of channels as ``src`` has. :param ddepth: Destination image depth. ``CV_8U``, ``CV_16S``, ``CV_32S``, and ``CV_32F`` are supported. @@ -620,7 +620,7 @@ gpu::GaussianBlur :param src: Source image. ``CV_8UC1``, ``CV_8UC4``, ``CV_16SC1``, ``CV_16SC2``, ``CV_32SC1``, ``CV_32FC1`` source types are supported. - :param dst: Destination image. The size and type is the same as ``src`` has. + :param dst: Destination image with the same size and type as ``src``. :param ksize: Gaussian kernel size. ``ksize.width`` and ``ksize.height`` can differ but they both must be positive and odd. If they are zeros, they are computed from ``sigmaX`` and ``sigmaY`` . diff --git a/modules/gpu/doc/image_processing.rst b/modules/gpu/doc/image_processing.rst index b3adc3c1a1..5870d50d13 100644 --- a/modules/gpu/doc/image_processing.rst +++ b/modules/gpu/doc/image_processing.rst @@ -16,7 +16,7 @@ gpu::meanShiftFiltering :param src: Source image. Only ``CV_8UC4`` images are supported for now. - :param dst: Destination image containing the color of mapped points. The size and type is the same as ``src`` . + :param dst: Destination image containing the color of mapped points. It has the same size and type as ``src`` . :param sp: Spatial window radius. @@ -38,7 +38,7 @@ gpu::meanShiftProc :param dstr: Destination image containing the color of mapped points. The size and type is the same as ``src`` . - :param dstsp: Destination image containing the position of mapped points. The size is the same as ``src``. The type is ``CV_16SC2``. + :param dstsp: Destination image containing the position of mapped points. The size is the same as ``src`` size. The type is ``CV_16SC2``. :param sp: Spatial window radius. @@ -59,7 +59,7 @@ gpu::meanShiftSegmentation :param src: Source image. Only ``CV_8UC4`` images are supported for now. - :param dst: Segmented image. The size and type is the same as ``src`` . + :param dst: Segmented image with the same size and type as ``src`` . :param sp: Spatial window radius. @@ -172,7 +172,7 @@ gpu::mulSpectrums :param a: First spectrum. - :param b: Second spectrum. The size and type is the same as ``a`` . + :param b: Second spectrum with the same size and type as ``a`` . :param c: Destination spectrum. @@ -196,7 +196,7 @@ gpu::mulAndScaleSpectrums :param a: First spectrum. - :param b: Second spectrum. The size and type is the same as ``a`` . + :param b: Second spectrum with the same size and type as ``a`` . :param c: Destination spectrum. @@ -321,7 +321,7 @@ gpu::matchTemplate :param image: Source image. ``CV_32F`` and ``CV_8U`` depth images (1..4 channels) are supported for now. - :param templ: Template image. The size and type is the same as ``image`` . + :param templ: Template image with the size and type the same as ``image`` . :param result: Map containing comparison results ( ``CV_32FC1`` ). If ``image`` is *W x H* and ``templ`` is *w x h*, then ``result`` must be *W-w+1 x H-h+1*. @@ -354,7 +354,7 @@ gpu::remap :param src: Source image. Only ``CV_8UC1`` and ``CV_8UC3`` source types are supported. - :param dst: Destination image. The size is the same as ``xmap`` . The type is the same as ``src`` . + :param dst: Destination image with the size the same as ``xmap`` and the type the same as ``src`` . :param xmap: X values. Only ``CV_32FC1`` type is supported. @@ -382,7 +382,7 @@ gpu::cvtColor :param src: Source image with ``CV_8U``, ``CV_16U``, or ``CV_32F`` depth and 1, 3, or 4 channels. - :param dst: Destination image. The size and depth is the same as ``src`` . + :param dst: Destination image with the same size and depth as ``src`` . :param code: Color space conversion code. For details, see :func:`cvtColor` . Conversion to/from Luv and Bayer color spaces is not supported. @@ -407,7 +407,7 @@ gpu::threshold :param src: Source array (single-channel). ``CV_64F`` depth is not supported. - :param dst: Destination array. The size and type is the same as ``src`` . + :param dst: Destination array with the same size and type as ``src`` . :param thresh: Threshold value. @@ -430,7 +430,7 @@ gpu::resize :param src: Source image. Supports the ``CV_8UC1`` and ``CV_8UC4`` types. - :param dst: Destination image. The size is ``dsize`` (when it is non-zero) or the size is computed from ``src.size()``, ``fx``, and ``fy`` . The type is the same as ``src`` . + :param dst: Destination image with the same type as ``src`` . The size is ``dsize`` (when it is non-zero) or the size is computed from ``src.size()``, ``fx``, and ``fy`` . :param dsize: Destination image size. If it is zero, it is computed as: @@ -465,7 +465,7 @@ gpu::warpAffine :param src: Source image. Supports ``CV_8U``, ``CV_16U``, ``CV_32S``, or ``CV_32F`` depth and 1, 3, or 4 channels. - :param dst: Destination image. The size is ``dsize`` . The type is the same as ``src`` . + :param dst: Destination image with the same type as ``src`` . The size is ``dsize`` . :param M: *2x3* transformation matrix. @@ -486,7 +486,7 @@ gpu::warpPerspective :param src: Source image. Supports ``CV_8U``, ``CV_16U``, ``CV_32S``, or ``CV_32F`` depth and 1, 3, or 4 channels. - :param dst: Destination image. The size is ``dsize`` . The type is the same as ``src`` . + :param dst: Destination image with the same type as ``src`` . The size is ``dsize`` . :param M: *3x3* transformation matrix. @@ -507,7 +507,7 @@ gpu::rotate :param src: Source image. Supports ``CV_8UC1`` and ``CV_8UC4`` types. - :param dst: Destination image. The size is ``dsize`` . The type is the same as ``src`` . + :param dst: Destination image with the same type as ``src`` . The size is ``dsize`` . :param dsize: Size of the destination image. @@ -532,7 +532,7 @@ gpu::copyMakeBorder :param src: Source image. ``CV_8UC1``, ``CV_8UC4``, ``CV_32SC1``, and ``CV_32FC1`` types are supported. - :param dst: Destination image. The type is the same as ``src`` . The size is ``Size(src.cols+left+right, src.rows+top+bottom)`` . + :param dst: Destination image with the same type as ``src`` . The size is ``Size(src.cols+left+right, src.rows+top+bottom)`` . :param top, bottom, left, right: Number of pixels in each direction from the source image rectangle to extrapolate. For example: ``top=1, bottom=1, left=1, right=1`` mean that 1 pixel-wide border needs to be built. @@ -552,7 +552,7 @@ gpu::rectStdDev :param sqr: Squared source image. Only the ``CV_32FC1`` type is supported. - :param dst: Destination image. The type and size is the same as ``src`` . + :param dst: Destination image with the same type and size as ``src`` . :param rect: Rectangular window. diff --git a/modules/gpu/doc/matrix_reductions.rst b/modules/gpu/doc/matrix_reductions.rst index 55a46c59b7..10f80b4e76 100644 --- a/modules/gpu/doc/matrix_reductions.rst +++ b/modules/gpu/doc/matrix_reductions.rst @@ -31,7 +31,7 @@ gpu::norm :param src1: The source matrix. Any matrices except 64F are supported. - :param src2: The second source matrix (if any). The size and type is the same as ``src1``. + :param src2: The second source matrix (if any) with the same size and type as ``src1``. :param normType: Norm type. ``NORM_L1`` , ``NORM_L2`` , and ``NORM_INF`` are supported for now. diff --git a/modules/gpu/doc/object_detection.rst b/modules/gpu/doc/object_detection.rst index 52ad1424d8..0a8cb92dbb 100644 --- a/modules/gpu/doc/object_detection.rst +++ b/modules/gpu/doc/object_detection.rst @@ -9,7 +9,7 @@ gpu::HOGDescriptor ------------------ .. cpp:class:: gpu::HOGDescriptor - Histogram of Oriented Gradients [Navneet Dalal and Bill Triggs. Histogram of oriented gradients for human detection. 2005.] descriptor and detector. + Provides a histogram of Oriented Gradients [Navneet Dalal and Bill Triggs. Histogram of oriented gradients for human detection. 2005.] descriptor and detector. :: struct CV_EXPORTS HOGDescriptor @@ -61,7 +61,7 @@ gpu::HOGDescriptor } -Interfaces of all methods are kept similar to the ``CPU HOG`` descriptor and detector analogues as much as possible. + Interfaces of all methods are kept similar to the ``CPU HOG`` descriptor and detector analogues as much as possible. .. index:: gpu::HOGDescriptor::HOGDescriptor @@ -74,7 +74,7 @@ gpu::HOGDescriptor::HOGDescriptor double threshold_L2hys=0.2, bool gamma_correction=true, int nlevels=DEFAULT_NLEVELS) - Creates ``HOG`` descriptor and detector. + Creates the ``HOG`` descriptor and detector. :param win_size: Detection window size. Align to block size and block stride. diff --git a/modules/gpu/doc/per_element_operations.rst b/modules/gpu/doc/per_element_operations.rst index 5b9ee749b2..e208425464 100644 --- a/modules/gpu/doc/per_element_operations.rst +++ b/modules/gpu/doc/per_element_operations.rst @@ -13,15 +13,15 @@ gpu::add .. cpp:function:: void gpu::add(const GpuMat& src1, const Scalar& src2, GpuMat& dst) - Computes matrix-matrix or matrix-scalar sum. + Computes a matrix-matrix or matrix-scalar sum. :param src1: First source matrix. ``CV_8UC1``, ``CV_8UC4``, ``CV_32SC1`` and ``CV_32FC1`` matrices are supported for now. :param src2: Second source matrix or a scalar to be added to ``src1``. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. -See also: :c:func:`add`. +See Also: :c:func:`add`. .. index:: gpu::subtract @@ -37,9 +37,9 @@ gpu::subtract :param src2: Second source matrix or a scalar to be subtracted from ``src1``. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. -See also: :c:func:`subtract`. +See Also: :c:func:`subtract`. @@ -51,15 +51,15 @@ gpu::multiply .. cpp:function:: void gpu::multiply(const GpuMat& src1, const Scalar& src2, GpuMat& dst) - Computes matrix-matrix or matrix-scalar per-element product. + Computes a matrix-matrix or matrix-scalar per-element product. :param src1: First source matrix. ``CV_8UC1``, ``CV_8UC4``, ``CV_32SC1`` and ``CV_32FC1`` matrices are supported for now. :param src2: Second source matrix or a scalar to be multiplied by ``src1`` elements. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. -See also: :c:func:`multiply`. +See Also: :c:func:`multiply`. .. index:: gpu::divide @@ -70,17 +70,17 @@ gpu::divide .. cpp:function:: void gpu::divide(const GpuMat& src1, const Scalar& src2, GpuMat& dst) - Computes matrix-matrix or matrix-scalar sum. + Computes a matrix-matrix or matrix-scalar sum. :param src1: First source matrix. ``CV_8UC1``, ``CV_8UC4``, ``CV_32SC1`` and ``CV_32FC1`` matrices are supported for now. :param src2: Second source matrix or a scalar. The ``src1`` elements are divided by it. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. -This function in contrast to :c:func:`divide` uses round-down rounding mode. + This function, in contrast to :c:func:`divide`, uses a round-down rounding mode. -See also: :c:func:`divide`. +See Also: :c:func:`divide`. @@ -90,13 +90,13 @@ gpu::exp ------------ .. cpp:function:: void gpu::exp(const GpuMat& src, GpuMat& dst) - Computes exponent of each matrix element. + Computes an exponent of each matrix element. :param src: Source matrix. ``CV_32FC1`` matrixes are supported for now. - :param dst: Destination matrix. Will have the same size and type as ``src``. + :param dst: Destination matrix with the same size and type as ``src``. -See also: :c:func:`exp`. +See Also: :c:func:`exp`. @@ -106,13 +106,13 @@ gpu::log ------------ .. cpp:function:: void gpu::log(const GpuMat& src, GpuMat& dst) - Computes natural logarithm of absolute value of each matrix element. + Computes a natural logarithm of absolute value of each matrix element. :param src: Source matrix. ``CV_32FC1`` matrixes are supported for now. - :param dst: Destination matrix. Will have the same size and type as ``src``. + :param dst: Destination matrix with the same size and type as ``src``. -See also: :c:func:`log`. +See Also: :c:func:`log`. @@ -130,9 +130,9 @@ gpu::absdiff :param src2: Second source matrix or a scalar to be added to ``src1``. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. -See also: :c:func:`absdiff`. +See Also: :c:func:`absdiff`. .. index:: gpu::compare @@ -144,9 +144,9 @@ gpu::compare :param src1: First source matrix. ``CV_8UC4`` and ``CV_32FC1`` matrices are supported for now. - :param src2: Second source matrix. Must have the same size and type as ``a``. + :param src2: Second source matrix with the same size and type as ``a``. - :param dst: Destination matrix. Will have the same size as ``a`` and be ``CV_8UC1`` type. + :param dst: Destination matrix with the same size as ``a`` and the ``CV_8UC1`` type. :param cmpop: Flag specifying the relation between the elements to be checked: @@ -157,7 +157,7 @@ gpu::compare * **CMP_LE:** ``src1(.) <= src2(.)`` * **CMP_NE:** ``src1(.) != src2(.)`` -See also: :c:func:`compare`. +See Also: :c:func:`compare`. .. index:: gpu::bitwise_not @@ -172,7 +172,7 @@ gpu::bitwise_not :param src: Source matrix. - :param dst: Destination matrix. Will have the same size and type as ``src``. + :param dst: Destination matrix with the same size and type as ``src``. :param mask: Optional operation mask. 8-bit single channel image. @@ -192,9 +192,9 @@ gpu::bitwise_or :param src1: First source matrix. - :param src2: Second source matrix. It must have the same size and type as ``src1``. + :param src2: Second source matrix with the same size and type as ``src1``. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. :param mask: Optional operation mask. 8-bit single channel image. @@ -214,9 +214,9 @@ gpu::bitwise_and :param src1: First source matrix. - :param src2: Second source matrix. It must have the same size and type as ``src1``. + :param src2: Second source matrix with the same size and type as ``src1``. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. :param mask: Optional operation mask. 8-bit single channel image. @@ -236,9 +236,9 @@ gpu::bitwise_xor :param src1: First source matrix. - :param src2: Second source matrix. It must have the same size and type as ``src1``. + :param src2: Second source matrix with the same size and type as ``src1``. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. :param mask: Optional operation mask. 8-bit single channel image. @@ -258,17 +258,17 @@ gpu::min .. cpp:function:: void gpu::min(const GpuMat& src1, double src2, GpuMat& dst, const Stream& stream) - Computes per-element minimum of two matrices (or a matrix and a scalar). + Computes the per-element minimum of two matrices (or a matrix and a scalar). :param src1: First source matrix. - :param src2: Second source matrix or a scalar to compare compare ``src1`` elements with. + :param src2: Second source matrix or a scalar to compare ``src1`` elements with. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. :param stream: Stream for the asynchronous version. -See also: :c:func:`min`. +See Also: :c:func:`min`. @@ -284,14 +284,14 @@ gpu::max .. cpp:function:: void gpu::max(const GpuMat& src1, double src2, GpuMat& dst, const Stream& stream) - Computes per-element maximum of two matrices (or a matrix and a scalar). + Computes the per-element maximum of two matrices (or a matrix and a scalar). :param src1: First source matrix. :param src2: Second source matrix or a scalar to compare ``src1`` elements with. - :param dst: Destination matrix. Will have the same size and type as ``src1``. + :param dst: Destination matrix with the same size and type as ``src1``. :param stream: Stream for the asynchronous version. -See also: :c:func:`max`. +See Also: :c:func:`max`.