corrected grammar (done by Elena)
authorVadim Pisarevsky <no@email>
Mon, 28 Mar 2011 23:16:20 +0000 (23:16 +0000)
committerVadim Pisarevsky <no@email>
Mon, 28 Mar 2011 23:16:20 +0000 (23:16 +0000)
modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst
modules/gpu/doc/data_structures.rst
modules/gpu/doc/image_processing.rst
modules/gpu/doc/initalization_and_information.rst

index 2cf7d14..83c9737 100644 (file)
@@ -3,8 +3,6 @@ Camera Calibration and 3d Reconstruction
 
 .. highlight:: cpp
 
-
-
 .. index:: gpu::StereoBM_GPU
 
 gpu::StereoBM_GPU
@@ -40,19 +38,18 @@ 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`` :math:`>` 0). If ``avergeTexThreshold = 0`` low textureness filtering is disabled, otherwise disparity is set to 0 in each point ``(x, y)`` where for left image
+
+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
 
 .. math::
-    \sum HorizontalGradiensInWindow(x, y, winSize) < (winSize \cdot winSize) \cdot avergeTexThreshold 
+    \sum HorizontalGradiensInWindow(x, y, winSize) < (winSize \cdot winSize) \cdot avergeTexThreshold
 
 i.e. 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)
@@ -69,10 +66,10 @@ gpu::StereoBM_GPU::StereoBM_GPU
 
     :param winSize: Block size.
 
-
-
 .. index:: gpu::StereoBM_GPU::operator ()
 
+.. _gpu::StereoBM_GPU::operator ():
+
 gpu::StereoBM_GPU::operator ()
 ----------------------------------
 .. cpp:function:: void gpu::StereoBM_GPU::operator() (const GpuMat& left, const GpuMat& right, GpuMat& disparity)
@@ -81,16 +78,14 @@ gpu::StereoBM_GPU::operator ()
 
     The stereo correspondence operator. Finds the disparity for the specified rectified stereo pair.
 
-    :param left: Left image; supports only ``CV_8UC1`` type.
+    :param left: Left image; supports only  ``CV_8UC1``  type.
 
     :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 will be  ``CV_8UC1``  image with the same size as the input images.
 
     :param stream: Stream for the asynchronous version.
 
-
-
 .. index:: gpu::StereoBM_GPU::checkIfGpuCallReasonable
 
 gpu::StereoBM_GPU::checkIfGpuCallReasonable
@@ -99,8 +94,6 @@ 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.
 
-
-
 .. index:: gpu::StereoBeliefPropagation
 
 gpu::StereoBeliefPropagation
@@ -152,11 +145,11 @@ 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.
 
-**Please note:** ``StereoBeliefPropagation`` requires a lot of memory:
+**Note:** ``StereoBeliefPropagation`` requires a lot of memory:
 
 .. math::
 
-    width\_step \cdot height \cdot ndisp \cdot 4 \cdot (1 + 0.25)
+    width \_ step  \cdot height  \cdot ndisp  \cdot 4  \cdot (1 + 0.25)
 
 for message storage and
 
@@ -166,17 +159,15 @@ for message storage and
 
 for data cost storage. ``width_step`` is the number of bytes in a line including the padding.
 
-
-
 .. index:: gpu::StereoBeliefPropagation::StereoBeliefPropagation
 
 gpu::StereoBeliefPropagation::StereoBeliefPropagation
 ---------------------------------------------------------
-.. cpp:function:: gpu::StereoBeliefPropagation::StereoBeliefPropagation(int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int msg_type = CV_32F)
+.. cpp:function:: gpu::StereoBeliefPropagation::StereoBeliefPropagation( int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int msg_type = CV_32F)
 
-.. 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)
+.. 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.
+    StereoBeliefPropagation constructors.
 
     :param ndisp: Number of disparities.
 
@@ -192,69 +183,63 @@ 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. Supports  ``CV_16SC1``  and  ``CV_32FC1``.
     
-:cpp:class:`StereoBeliefPropagation` uses truncated linear model for the data cost and discontinuity term:
+``StereoBeliefPropagation`` uses truncated linear model for the data cost and discontinuity term:
 
 .. math::
 
-    DataCost = data\_weight \cdot \min(\lvert I_2-I_1 \rvert, max\_data\_term)
+    DataCost = data \_ weight  \cdot \min ( \lvert I_2-I_1  \rvert , max \_ data \_ term)
 
 .. math::
 
-    DiscTerm =  \min(disc\_single\_jump \cdot \lvert f_1-f_2 \rvert, max\_disc\_term)
+    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].
 
-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 perfomance. To avoid overflow in this case, the parameters must satisfy
+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
 
 .. math::
 
-    10 \cdot 2^{levels-1} \cdot max\_data\_term < SHRT\_MAX
-
-
+    10  \cdot 2^{levels-1}  \cdot max \_ data \_ term < SHRT \_ MAX
 
 .. index:: gpu::StereoBeliefPropagation::estimateRecommendedParams
 
 gpu::StereoBeliefPropagation::estimateRecommendedParams
 -----------------------------------------------------------
 
-.. cpp:function:: void gpu::StereoBeliefPropagation::estimateRecommendedParams(int width, int height, int& ndisp, int& iters, int& levels)
+.. 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``).
 
-
-
 .. index:: gpu::StereoBeliefPropagation::operator ()
 
 gpu::StereoBeliefPropagation::operator ()
 ---------------------------------------------
-.. cpp:function:: void gpu::StereoBeliefPropagation::operator()(const GpuMat& left, const GpuMat& right, GpuMat& disparity)
+.. cpp:function:: void gpu::StereoBeliefPropagation::operator()( const GpuMat& left, const GpuMat& right, GpuMat& disparity)
 
-.. cpp:function:: void gpu::StereoBeliefPropagation::operator()(const GpuMat& left, const GpuMat& right, GpuMat& disparity, Stream& stream)
+.. 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.
 
-    :param left: Left image; supports ``CV_8UC1``, ``CV_8UC3`` and ``CV_8UC4`` types.
+    :param left: Left image; supports  ``CV_8UC1`` , ``CV_8UC3``  and  ``CV_8UC4``  types.
 
     :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 output type will be  ``CV_16SC1`` , otherwise output type will be  ``disparity.type()`` .
 
     :param stream: Stream for the asynchronous version.
 
-.. cpp:function:: void StereoBeliefPropagation::operator()(const GpuMat& data, GpuMat& disparity)
+.. cpp:function:: void gpu::StereoBeliefPropagation::operator()( const GpuMat& data, GpuMat& disparity)
 
-.. cpp:function:: void StereoBeliefPropagation::operator()(const GpuMat& data, GpuMat& disparity, Stream& stream)
+.. cpp:function:: void gpu::StereoBeliefPropagation::operator()( const GpuMat& data, GpuMat& disparity, Stream& stream)
 
-    :param data: The user specified data cost. It must have ``msg_type`` type and :math:`\texttt{imgRows} \cdot \texttt{ndisp} \times \texttt{imgCols}` size.
+    :param data: The user specified data cost, a matrix of ``msg_type`` type and ``Size(<image columns>*ndisp, <image rows>)`` size.
 
-    :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 the matrix is empty, it will be created as ``CV_16SC1`` matrix, otherwise the type will be retained.
 
     :param stream: Stream for the asynchronous version.
 
-
-
 .. index:: gpu::StereoConstantSpaceBP
 
 gpu::StereoConstantSpaceBP
@@ -314,17 +299,15 @@ 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.
 
-
-
 .. index:: gpu::StereoConstantSpaceBP::StereoConstantSpaceBP
 
 gpu::StereoConstantSpaceBP::StereoConstantSpaceBP
 -----------------------------------------------------
 .. cpp:function:: gpu::StereoConstantSpaceBP::StereoConstantSpaceBP(int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int nr_plane = DEFAULT_NR_PLANE, int msg_type = CV_32F)
 
-.. cpp:function:: gpu::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)
+.. 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.
+    StereoConstantSpaceBP constructors.
 
     :param ndisp: Number of disparities.
 
@@ -344,27 +327,27 @@ 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. Supports  ``CV_16SC1``  and  ``CV_32FC1`` .
     
-:cpp:class:`StereoConstantSpaceBP` uses truncated linear model for the data cost and discontinuity term:
+``StereoConstantSpaceBP`` uses truncated linear model for the data cost and discontinuity term:
 
 .. math::
 
-    DataCost = data\_weight \cdot \min(\lvert I_2-I_1 \rvert, max\_data\_term)
+    DataCost = data \_ weight  \cdot \min ( \lvert I_2-I_1  \rvert , max \_ data \_ term)
 
 .. math::
 
-    DiscTerm =  \min(disc\_single\_jump \cdot \lvert f_1-f_2 \rvert, max\_disc\_term)
+    DiscTerm =  \min (disc \_ single \_ jump  \cdot \lvert f_1-f_2  \rvert , max \_ disc \_ term)
 
-For more details please see [Q. Yang, L. Wang, and N. Ahuja. A constant-space belief propagation algorithm for stereo matching. In CVPR, 2010].
+For more details please see
+qx_csbp
+.
 
-By default :cpp:class:`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 ``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
 
 .. math::
 
-    10 \cdot 2^{levels-1} \cdot max\_data\_term < SHRT\_MAX
-
-
+    10  \cdot 2^{levels-1}  \cdot max \_ data \_ term < SHRT \_ MAX
 
 .. index:: gpu::StereoConstantSpaceBP::estimateRecommendedParams
 
@@ -373,38 +356,37 @@ 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``, ``levels`` and ``nr_plane``) for specified image size (``width`` and ``height``).
-
+    Some heuristics that tries to compute parameters (ndisp, iters, levelsand nrplane) for specified image size (widthand height).
 
 .. index:: gpu::StereoConstantSpaceBP::operator ()
 
 gpu::StereoConstantSpaceBP::operator ()
 -------------------------------------------
-.. cpp:function:: void gpu::StereoConstantSpaceBP::operator()(const GpuMat& left, const GpuMat& right, GpuMat& disparity)
+.. cpp:function:: void gpu::StereoConstantSpaceBP::operator()( const GpuMat& left, const GpuMat& right, GpuMat& disparity)
 
-.. cpp:function:: void gpu::StereoConstantSpaceBP::operator()(const GpuMat& left, const GpuMat& right, GpuMat& disparity, Stream& stream)
+.. 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.
 
-    :param left: Left image; supports ``CV_8UC1``, ``CV_8UC3`` and ``CV_8UC4`` types.
+    :param left: Left image; supports  ``CV_8UC1`` , ``CV_8UC3``  and  ``CV_8UC4``  types.
 
     :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 output type will be  ``CV_16SC1`` , otherwise output type will be  ``disparity.type()`` .
 
     :param stream: Stream for the asynchronous version.
 
-
-
 .. index:: gpu::DisparityBilateralFilter
 
+.. _gpu::DisparityBilateralFilter:
+
 gpu::DisparityBilateralFilter
 -----------------------------
 .. cpp:class:: gpu::DisparityBilateralFilter
 
 The class for disparity map refinement using joint bilateral filtering. ::
 
-    class DisparityBilateralFilter
+    class CV_EXPORTS DisparityBilateralFilter
     {
     public:
         enum { DEFAULT_NDISP  = 64 };
@@ -429,15 +411,13 @@ The class for disparity map refinement using joint bilateral filtering. ::
 
 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].
 
-
-
 .. index:: gpu::DisparityBilateralFilter::DisparityBilateralFilter
 
 gpu::DisparityBilateralFilter::DisparityBilateralFilter
 -----------------------------------------------------------
-.. cpp:function:: gpu::DisparityBilateralFilter::DisparityBilateralFilter(int ndisp = DEFAULT_NDISP, int radius = DEFAULT_RADIUS, int iters = DEFAULT_ITERS)
+.. cpp:function:: gpu::DisparityBilateralFilter::DisparityBilateralFilter( int ndisp = DEFAULT_NDISP, int radius = DEFAULT_RADIUS, int iters = DEFAULT_ITERS)
 
-.. cpp:function:: gpu::DisparityBilateralFilter::DisparityBilateralFilter(int ndisp, int radius, int iters, float edge_threshold, float max_disc_threshold, float sigma_range)
+.. cpp:function:: gpu::DisparityBilateralFilter::DisparityBilateralFilter( int ndisp, int radius, int iters, float edge_threshold, float max_disc_threshold, float sigma_range)
 
     ``DisparityBilateralFilter`` constructors.
 
@@ -453,28 +433,24 @@ gpu::DisparityBilateralFilter::DisparityBilateralFilter
 
     :param sigma_range: Filter range.
 
-
-
 .. index:: gpu::DisparityBilateralFilter::operator ()
 
 gpu::DisparityBilateralFilter::operator ()
 ----------------------------------------------
-.. cpp:function:: void gpu::DisparityBilateralFilter::operator()(const GpuMat& disparity, const GpuMat& image, GpuMat& dst)
+.. cpp:function:: void gpu::DisparityBilateralFilter::operator()( const GpuMat& disparity, const GpuMat& image, GpuMat& dst)
 
-.. cpp:function:: void gpu::DisparityBilateralFilter::operator()(const GpuMat& disparity, const GpuMat& image, GpuMat& dst, Stream& stream)
+.. cpp:function:: void gpu::DisparityBilateralFilter::operator()( const GpuMat& disparity, const GpuMat& image, GpuMat& dst, Stream& stream)
 
     Refines disparity map using joint bilateral filtering.
 
-    :param disparity: Input disparity map; supports ``CV_8UC1`` and ``CV_16SC1`` types.
+    :param disparity: Input disparity map; supports  ``CV_8UC1``  and  ``CV_16SC1``  types.
 
-    :param image: Input image; supports ``CV_8UC1`` and ``CV_8UC3`` types.
+    :param image: Input image; supports  ``CV_8UC1``  and  ``CV_8UC3``  types.
 
-    :param dst: Destination disparity map; will have the same size and type as ``disparity``.
+    :param dst: Destination disparity map; will have the same size and type as  ``disparity`` .
 
     :param stream: Stream for the asynchronous version.
 
-
-
 .. index:: gpu::drawColorDisp
 
 gpu::drawColorDisp
@@ -485,17 +461,15 @@ gpu::drawColorDisp
 
     Does coloring of disparity image.
 
-    :param src_disp: Source disparity image. Supports ``CV_8UC1`` and ``CV_16SC1`` types.
+    :param src_disp: Source disparity image. Supports  ``CV_8UC1``  and  ``CV_16SC1``  types.
 
-    :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. Will have the same size as  ``src_disp``  and  ``CV_8UC4``  type in  ``BGRA``  format (alpha = 255).
 
     :param ndisp: Number of disparities.
 
     :param stream: Stream for the asynchronous version.
 
-This function converts :math:`[0..ndisp)` interval to :math:`[0..240, 1, 1]` in ``HSV`` color space, than convert ``HSV`` color space to ``RGB``.
-
-
+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.
 
 .. index:: gpu::reprojectImageTo3D
 
@@ -507,17 +481,15 @@ gpu::reprojectImageTo3D
 
     Reprojects disparity image to 3D space.
 
-    :param disp: Input disparity image; supports ``CV_8U`` and ``CV_16S`` types.
+    :param disp: Input disparity image; supports  ``CV_8U``  and  ``CV_16S``  types.
 
-    :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)``  will contain the 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 :c:func:`stereoRectify`.
+    :param Q: :math:`4 \times 4`  perspective transformation matrix that can be obtained via  :ref:`StereoRectify` .
 
     :param stream: Stream for the asynchronous version.
 
-See also: :c:func:`reprojectImageTo3D`.
-
-
+See Also: :c:func:`reprojectImageTo3D` .
 
 .. index:: gpu::solvePnPRansac
 
@@ -550,4 +522,5 @@ gpu::solvePnPRansac
     
     :param inliers: Output vector of inlier indices.   
 
-See also :c:func:`solvePnPRansac`.
+See Also :c:func:`solvePnPRansac`.
+  
\ No newline at end of file
index ef960ea..2d0818d 100644 (file)
@@ -1,17 +1,14 @@
 Data Structures
 ===============
 
-.. highlight:: cpp
+.. index:: gpu::DevMem2D\_
 
-
-
-.. index:: gpu::DevMem2D_
-
-gpu::DevMem2D\_ 
+gpu::DevMem2D\_
 ---------------
-.. cpp:class:: gpu::DevMem2D_
+.. cpp:class:: gpu::DevMem2D\_
 
-This is a simple lightweight class that encapsulate pitched memory on GPU. It is intended to pass to nvcc-compiled code, i.e. CUDA kernels. So it is used internally by OpenCV and by users writes own device code. Its members can be called both from host and from device code. ::
+This lightweight class encapsulates pitched memory on a GPU and is passed to nvcc-compiled code (CUDA kernels). Typically, it is used internally by OpenCV and by users who write device code. You can call its members from both host and device code. 
+::
 
     template <typename T> struct DevMem2D_
     {
@@ -31,7 +28,7 @@ This is a simple lightweight class that encapsulate pitched memory on GPU. It is
 
         __CV_GPU_HOST_DEVICE__ size_t elemSize() const;
 
-        /* returns pointer to the beggining of given image row */
+        /* returns pointer to the beggining of the given image row */
         __CV_GPU_HOST_DEVICE__ T* ptr(int y = 0);
         __CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const;
     };
@@ -41,29 +38,30 @@ This is a simple lightweight class that encapsulate pitched memory on GPU. It is
     typedef DevMem2D_<int> DevMem2Di;
 
 
-
-.. index:: gpu::PtrStep_
+.. index:: gpu::PtrStep\_
 
 gpu::PtrStep\_
 --------------
-.. cpp:class:: gpu::PtrStep_
+.. cpp:class:: gpu::PtrStep\_
 
-This is structure is similar to :cpp:class:`gpu::DevMem2D_` but contains only pointer and row step. Width and height fields are excluded due to performance reasons. The structure is for internal use or for users who write own device code. ::
+This structure is similar to 
+:cpp:class:`DevMem2D_` but contains only a pointer and row step. Width and height fields are excluded due to performance reasons. The structure is intended for internal use or for users who write device code. 
+::
 
     template<typename T> struct PtrStep_
     {
-        T* data;
-        size_t step;
+            T* data;
+            size_t step;
 
-        PtrStep_();
-        PtrStep_(const DevMem2D_<T>& mem);
+            PtrStep_();
+            PtrStep_(const DevMem2D_<T>& mem);
 
-        typedef T elem_type;
-        enum { elem_size = sizeof(elem_type) };
+            typedef T elem_type;
+            enum { elem_size = sizeof(elem_type) };
 
-        __CV_GPU_HOST_DEVICE__ size_t elemSize() const;
-        __CV_GPU_HOST_DEVICE__ T* ptr(int y = 0);
-        __CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const;
+            __CV_GPU_HOST_DEVICE__ size_t elemSize() const;
+            __CV_GPU_HOST_DEVICE__ T* ptr(int y = 0);
+            __CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const;
     };
 
     typedef PtrStep_<unsigned char> PtrStep;
@@ -71,27 +69,23 @@ This is structure is similar to :cpp:class:`gpu::DevMem2D_` but contains only po
     typedef PtrStep_<int> PtrStepi;
 
 
+.. index:: gpu::PtrElemStrp\_
 
-.. index:: gpu::PtrElemStep_
-
-gpu::PtrElemStep\_
+gpu::PtrElemStrp\_
 ------------------
-.. cpp:class:: gpu::PtrElemStep_
+.. cpp:class:: gpu::PtrElemStrp\_
 
-This is structure is similar to :cpp:class:`gpu::DevMem2D_` but contains only pointer and row step in elements. Width and height fields are excluded due to performance reasons. This class is can only be constructed if ``sizeof(T)`` is a multiple of 256. The structure is for internal use or for users who write own device code. ::
+This structure is similar to 
+:cpp:class:`DevMem2D_` but contains only pointer and row step in elements. Width and height fields are excluded due to performance reasons. This class can only be constructed if ``sizeof(T)`` is a multiple of 256. The structure is intended for internal use or for users who write device code. 
+::
 
     template<typename T> struct PtrElemStep_ : public PtrStep_<T>
     {
-        PtrElemStep_(const DevMem2D_<T>& mem);
-        __CV_GPU_HOST_DEVICE__ T* ptr(int y = 0);
-        __CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const;
+            PtrElemStep_(const DevMem2D_<T>& mem);
+            __CV_GPU_HOST_DEVICE__ T* ptr(int y = 0);
+            __CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const;
     };
 
-    typedef PtrElemStep_<unsigned char> PtrElemStep;
-    typedef PtrElemStep_<float> PtrElemStepf;
-    typedef PtrElemStep_<int> PtrElemStepi;
-
-
 
 .. index:: gpu::GpuMat
 
@@ -99,47 +93,58 @@ gpu::GpuMat
 -----------
 .. cpp:class:: gpu::GpuMat
 
-The base storage class for GPU memory with reference counting. Its interface is almost :c:type:`Mat` interface with some limitations, so using it won't be a problem. The limitations are no arbitrary dimensions support (only 2D), no functions that returns references to its data (because references on GPU are not valid for CPU), no expression templates technique support. Because of last limitation please take care with overloaded matrix operators - they cause memory allocations. The ``GpuMat`` class is convertible to :cpp:class:`gpu::DevMem2D_` and :cpp:class:`gpu::PtrStep_` so it can be passed to directly to kernel.
+This is a base storage class for GPU memory with reference counting. Its interface matches the
+:c:type:`Mat` interface with the following limitations:
+
+*   
+    no arbitrary dimensions support (only 2D)
+*   
+    no functions that return references to their data (because references on GPU are not valid for CPU)
+*   
+    no expression templates technique support
+    
+Beware that the latter limitation may lead to overloaded matrix operators that cause memory allocations. The ``GpuMat`` class is convertible to :cpp:class:`gpu::DevMem2D_` and :cpp:class:`gpu::PtrStep_` so it can be passed to directly to kernel.
 
-**Please note:** In contrast with :c:type:`Mat`, in most cases ``GpuMat::isContinuous() == false`` , i.e. rows are aligned to size depending on hardware. Also single row ``GpuMat`` is always a continuous matrix. ::
+**Note:**
+In contrast with :c:type:`Mat`, in most cases ``GpuMat::isContinuous() == false`` . This means that rows are aligned to size depending on the hardware. Single-row ``GpuMat`` is always a continuous matrix. ::
 
-    class GpuMat
+    class CV_EXPORTS GpuMat
     {
     public:
-        //! default constructor
-        GpuMat();
+            //! default constructor
+            GpuMat();
 
-        GpuMat(int rows, int cols, int type);
-        GpuMat(Size size, int type);
+            GpuMat(int rows, int cols, int type);
+            GpuMat(Size size, int type);
 
-        .....
+            .....
 
-        //! builds GpuMat from Mat. Perfom blocking upload to device.
-        explicit GpuMat (const Mat& m);
+            //! builds GpuMat from Mat. Blocks uploading to device.
+            explicit GpuMat (const Mat& m);
 
-        //! returns lightweight DevMem2D_ structure for passing
-        //to nvcc-compiled code. Contains size, data ptr and step.
-        template <class T> operator DevMem2D_<T>() const;
-        template <class T> operator PtrStep_<T>() const;
+            //! returns lightweight DevMem2D_ structure for passing
+            //to nvcc-compiled code. Contains size, data ptr and step.
+            template <class T> operator DevMem2D_<T>() const;
+            template <class T> operator PtrStep_<T>() const;
 
-        //! pefroms blocking upload data to GpuMat.
-        void upload(const cv::Mat& m);
-        void upload(const CudaMem& m, Stream& stream);
+            //! blocks uploading data to GpuMat.
+            void upload(const cv::Mat& m);
+            void upload(const CudaMem& m, Stream& stream);
 
-        //! downloads data from device to host memory. Blocking calls.
-        operator Mat() const;
-        void download(cv::Mat& m) const;
+            //! downloads data from device to host memory. Blocking calls.
+            operator Mat() const;
+            void download(cv::Mat& m) const;
 
-        //! download async
-        void download(CudaMem& m, Stream& stream) const;
+            //! download async
+            void download(CudaMem& m, Stream& stream) const;
     };
 
 
-**Please note:** Is it a bad practice to leave static or global ``GpuMat`` variables allocated, i.e. to rely on its destructor. That is because destruction order of such variables and CUDA context is undefined and GPU memory release function returns error if CUDA context has been destroyed before.
-
-See also: :c:type:`Mat`.
-
+**Note:**
+You are not recommended to leave static or global ``GpuMat`` variables allocated, that is to rely on its destructor. The destruction order of such variables and CUDA context is undefined. GPU memory release function returns error if the CUDA context has been destroyed before.
 
+See Also:
+:func:`Mat`
 
 .. index:: gpu::CudaMem
 
@@ -147,47 +152,50 @@ gpu::CudaMem
 ------------
 .. cpp:class:: gpu::CudaMem
 
-This is a class with reference counting that wraps special memory type allocation functions from CUDA. Its interface is also :c:type:`Mat`-like but with additional memory type parameter:
-
-* ``ALLOC_PAGE_LOCKED``     Set page locked memory type, used commonly for fast and asynchronous upload/download data from/to GPU.
-
-* ``ALLOC_ZEROCOPY``        Specifies zero copy memory allocation, i.e. with possibility to map host memory to GPU address space if supported.
-
-* ``ALLOC_WRITE_COMBINED``  Sets write combined buffer which is not cached by CPU. Such buffers are used to supply GPU with data when GPU only reads it. The advantage is better CPU cache utilization.
-
-**Please note:** Allocation size of such memory types is usually limited. For more details please see "CUDA 2.2 Pinned Memory APIs" document or "CUDA_C Programming Guide". ::
-
-    class CudaMem
+This class with reference counting wraps special memory type allocation functions from CUDA. Its interface is also
+:func:`Mat`-like but with additional memory type parameters.
+    
+*
+    ``ALLOC_PAGE_LOCKED``:  Sets a page locked memory type, used commonly for fast and asynchronous upload/download data from/to GPU.
+*
+    ``ALLOC_ZEROCOPY``:  Specifies a zero copy memory allocation that enables mapping the host memory to GPU address space, if supported.
+*
+    ``ALLOC_WRITE_COMBINED``:  Sets the write combined buffer that is not cached by CPU. Such buffers are used to supply GPU with data when GPU only reads it. The advantage is a better CPU cache utilization.
+
+**Note:**
+Allocation size of such memory types is usually limited. For more details please see "CUDA 2.2 Pinned Memory APIs" document or "CUDA_C Programming Guide".
+::
+
+    class CV_EXPORTS CudaMem
     {
     public:
-        enum  { ALLOC_PAGE_LOCKED = 1, ALLOC_ZEROCOPY = 2,
-                 ALLOC_WRITE_COMBINED = 4 };
+            enum  { ALLOC_PAGE_LOCKED = 1, ALLOC_ZEROCOPY = 2,
+                     ALLOC_WRITE_COMBINED = 4 };
 
-        CudaMem(Size size, int type, int alloc_type = ALLOC_PAGE_LOCKED);
+            CudaMem(Size size, int type, int alloc_type = ALLOC_PAGE_LOCKED);
 
-        //! creates from cv::Mat with coping data
-        explicit CudaMem(const Mat& m, int alloc_type = ALLOC_PAGE_LOCKED);
+            //! creates from cv::Mat with coping data
+            explicit CudaMem(const Mat& m, int alloc_type = ALLOC_PAGE_LOCKED);
 
-         ......
+             ......
 
-        void create(Size size, int type, int alloc_type = ALLOC_PAGE_LOCKED);
+            void create(Size size, int type, int alloc_type = ALLOC_PAGE_LOCKED);
 
-        //! returns matrix header with disabled ref. counting for CudaMem data.
-        Mat createMatHeader() const;
-        operator Mat() const;
+            //! returns matrix header with disabled ref. counting for CudaMem data.
+            Mat createMatHeader() const;
+            operator Mat() const;
 
-        //! maps host memory into device address space
-        GpuMat createGpuMatHeader() const;
-        operator GpuMat() const;
+            //! maps host memory into device address space
+            GpuMat createGpuMatHeader() const;
+            operator GpuMat() const;
 
-        //if host memory can be mapperd to gpu address space;
-        static bool canMapHostMemory();
+            //if host memory can be mapped to gpu address space;
+            static bool canMapHostMemory();
 
-        int alloc_type;
+            int alloc_type;
     };
 
 
-
 .. index:: gpu::CudaMem::createMatHeader
 
 gpu::CudaMem::createMatHeader
@@ -195,11 +203,7 @@ gpu::CudaMem::createMatHeader
 
 .. cpp:function:: Mat gpu::CudaMem::createMatHeader() const
 
-.. cpp:function:: gpu::CudaMem::operator Mat() const
-
-    Creates header without reference counting to :cpp:class:`gpu::CudaMem` data.
-
-
+    Creates a header without reference counting to :cpp:class:`gpu::CudaMem` data.
 
 .. index:: gpu::CudaMem::createGpuMatHeader
 
@@ -208,11 +212,7 @@ gpu::CudaMem::createGpuMatHeader
 
 .. cpp:function:: GpuMat gpu::CudaMem::createGpuMatHeader() const
 
-.. cpp:function:: gpu::CudaMem::operator GpuMat() const
-
-    Maps CPU memory to GPU address space and creates :cpp:class:`gpu::GpuMat` header without reference counting for it. This can be done only if memory was allocated with ``ALLOC_ZEROCOPY`` flag and if it is supported by hardware (laptops often share video and CPU memory, so address spaces can be mapped, and that eliminates extra copy).
-
-
+    Maps CPU memory to GPU address space and creates :cpp:class:`gpu::GpuMat` header without reference counting for it. This can be done only if memory was allocated with ``ALLOC_ZEROCOPY`` flag and if it is supported by the hardware (laptops often share video and CPU memory, so address spaces can be mapped, and that eliminates an extra copy).
 
 .. index:: gpu::CudaMem::canMapHostMemory
 
@@ -222,54 +222,53 @@ gpu::CudaMem::canMapHostMemory
 
     Returns true if the current hardware supports address space mapping and ``ALLOC_ZEROCOPY`` memory allocation.
 
-
-
 .. index:: gpu::Stream
 
 gpu::Stream
 -----------
 .. cpp:class:: gpu::Stream
 
-This class encapsulated queue of the asynchronous calls. Some functions have overloads with additional ``gpu::Stream`` parameter. The overloads do initialization work (allocate output buffers, upload constants, etc.), start GPU kernel and return before results are ready. A check if all operation are complete can be performed via :cpp:func:`gpu::Stream::queryIfComplete`. Asynchronous upload/download have to be performed from/to page-locked buffers, i.e. using :cpp:class:`gpu::CudaMem` or :c:type:`Mat` header that points to a region of :cpp:class:`gpu::CudaMem`.
+This class encapsulated a queue of asynchronous calls. Some functions have overloads with the additional ``gpu::Stream`` parameter. The overloads do initialization work (allocate output buffers, upload constants, and so on), start the GPU kernel, and return before results are ready. You can check whether all operation are complete via :cpp:func:`gpu::Stream::queryIfComplete`. You can asynchronously upload/download data from/to page-locked buffers, using :cpp:class:`gpu::CudaMem` or :c:type:`Mat` header that points to a region of :cpp:class:`gpu::CudaMem`.
 
-**Please note the limitation**: currently it is not guaranteed that all will work properly if one operation will be enqueued twice with different data. Some functions use constant GPU memory and next call may update the memory before previous has been finished. But calling asynchronously different operations is safe because each operation has own constant buffer. Memory copy/upload/download/set operations to buffers hold by user are also safe. ::
+**Note:**
+Currently, you may face problems if an operation is enqueued twice with different data. Some functions use the constant GPU memory, and next call may update the memory before the previous one has been finished. But calling different operations asynchronously is safe because each operation has its own constant buffer. Memory copy/upload/download/set operations to the buffers you hold are also safe. 
+::
 
-    class Stream
+    class CV_EXPORTS Stream
     {
     public:
-        Stream();
-        ~Stream();
+            Stream();
+            ~Stream();
 
-        Stream(const Stream&);
-        Stream& operator=(const Stream&);
+            Stream(const Stream&);
+            Stream& operator=(const Stream&);
 
-        bool queryIfComplete();
-        void waitForCompletion();
+            bool queryIfComplete();
+            void waitForCompletion();
 
-        //! downloads asynchronously.
-        // Warning! cv::Mat must point to page locked memory
-                 (i.e. to CudaMem data or to its subMat)
-        void enqueueDownload(const GpuMat& src, CudaMem& dst);
-        void enqueueDownload(const GpuMat& src, Mat& dst);
+            //! downloads asynchronously.
+            // Warning! cv::Mat must point to page locked memory
+                     (i.e. to CudaMem data or to its subMat)
+            void enqueueDownload(const GpuMat& src, CudaMem& dst);
+            void enqueueDownload(const GpuMat& src, Mat& dst);
 
-        //! uploads asynchronously.
-        // Warning! cv::Mat must point to page locked memory
-                 (i.e. to CudaMem data or to its ROI)
-        void enqueueUpload(const CudaMem& src, GpuMat& dst);
-        void enqueueUpload(const Mat& src, GpuMat& dst);
+            //! uploads asynchronously.
+            // Warning! cv::Mat must point to page locked memory
+                     (i.e. to CudaMem data or to its ROI)
+            void enqueueUpload(const CudaMem& src, GpuMat& dst);
+            void enqueueUpload(const Mat& src, GpuMat& dst);
 
-        void enqueueCopy(const GpuMat& src, GpuMat& dst);
+            void enqueueCopy(const GpuMat& src, GpuMat& dst);
 
-        void enqueueMemSet(const GpuMat& src, Scalar val);
-        void enqueueMemSet(const GpuMat& src, Scalar val, const GpuMat& mask);
+            void enqueueMemSet(const GpuMat& src, Scalar val);
+            void enqueueMemSet(const GpuMat& src, Scalar val, const GpuMat& mask);
 
-        // converts matrix type, ex from float to uchar depending on type
-        void enqueueConvert(const GpuMat& src, GpuMat& dst, int type,
-                double a = 1, double b = 0);
+            // converts matrix type, ex from float to uchar depending on type
+            void enqueueConvert(const GpuMat& src, GpuMat& dst, int type,
+                    double a = 1, double b = 0);
     };
 
 
-
 .. index:: gpu::Stream::queryIfComplete
 
 gpu::Stream::queryIfComplete
@@ -278,8 +277,6 @@ gpu::Stream::queryIfComplete
 
     Returns true if the current stream queue is finished, otherwise false.
 
-
-
 .. index:: gpu::Stream::waitForCompletion
 
 gpu::Stream::waitForCompletion
@@ -288,30 +285,28 @@ gpu::Stream::waitForCompletion
 
     Blocks until all operations in the stream are complete.
 
-
-
 .. index:: gpu::StreamAccessor
 
 gpu::StreamAccessor
 -------------------
 .. cpp:class:: gpu::StreamAccessor
 
-This class provides possibility to get ``cudaStream_t`` from :cpp:class:`gpu::Stream`. This class is declared in ``stream_accessor.hpp`` because that is only public header that depend on Cuda Runtime API. Including it will bring the dependency to your code. ::
+This class enables getting ``cudaStream_t`` from :cpp:class:`gpu::Stream` and is declared in ``stream_accessor.hpp`` because it is the only public header that depends on the CUDA Runtime API. Including it brings a dependency to your code. 
+::
 
     struct StreamAccessor
     {
-        static cudaStream_t getStream(const Stream& stream);
+        CV_EXPORTS static cudaStream_t getStream(const Stream& stream);
     };
 
 
-
 .. index:: gpu::createContinuous
 
 gpu::createContinuous
 -------------------------
 .. cpp:function:: void gpu::createContinuous(int rows, int cols, int type, GpuMat& m)
 
-    Creates continuous matrix in GPU memory.
+    Creates a continuous matrix in the GPU memory.
 
     :param rows: Row count.
 
@@ -319,19 +314,18 @@ gpu::createContinuous
 
     :param type: Type of the matrix.
 
-    :param m: Destination matrix. Will be only reshaped if it has proper type and area (``rows`` :math:`\times` ``cols``).
-
-Also the following wrappers are available:
-
-.. cpp:function:: GpuMat gpu::createContinuous(int rows, int cols, int type)
-
-.. cpp:function:: void gpu::createContinuous(Size size, int type, GpuMat& m)
-
-.. cpp:function:: GpuMat gpu::createContinuous(Size size, int type)
-
-Matrix is called continuous if its elements are stored continuously, i.e. wuthout gaps in the end of each row.
+    :param m: Destination matrix. This parameter changes only if it has a proper type and area (``rows x cols``).
 
+    The following wrappers are also available:
+    
+    *
+        .. cpp:function:: GpuMat gpu::createContinuous(int rows, int cols, int type)
+    *
+        .. cpp:function:: void gpu::createContinuous(Size size, int type, GpuMat& m)
+    *
+        .. cpp:function:: GpuMat gpu::createContinuous(Size size, int type)
 
+    Matrix is called continuous if its elements are stored continuously, that is wuthout gaps in the end of each row.
 
 .. index:: gpu::ensureSizeIsEnough
 
@@ -339,16 +333,21 @@ gpu::ensureSizeIsEnough
 ---------------------------
 .. cpp:function:: void gpu::ensureSizeIsEnough(int rows, int cols, int type, GpuMat& m)
 
-    Ensures that size of matrix is big enough and matrix has proper type. The function doesn't reallocate memory if the matrix has proper attributes already.
+.. cpp:function:: void gpu::ensureSizeIsEnough(Size size, int type, GpuMat& m)
+
+    Ensures that the size of a matrix is big enough and the matrix has a proper type. The function does not reallocate memory if the matrix has proper attributes already.
 
     :param rows: Minimum desired number of rows.
 
-    :param cols: Minimum desired number of cols.
+    :param cols: Minimum desired number of columns.
+    
+    :param size: rows and cols passed as a structure
 
     :param type: Desired matrix type.
 
     :param m: Destination matrix.
 
-Also the following wrapper is available:
+    The following wrapper is also available:
+
+    
 
-.. cpp:function:: void gpu::ensureSizeIsEnough(Size size, int type, GpuMat& m)
index f3af5d9..b3adc3c 100644 (file)
@@ -3,19 +3,20 @@ Image Processing
 
 .. highlight:: cpp
 
-
-
 .. index:: gpu::meanShiftFiltering
 
 gpu::meanShiftFiltering
 ---------------------------
-.. cpp:function:: void gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1))
+.. cpp:function:: void gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst,
+   int sp, int sr,
+   TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER
+   + TermCriteria::EPS, 5, 1))
 
-    Performs mean-shift filtering for each point of the source image. It maps each point of the source image into another point, and as the result we have new color and new position of each point.
+    Performs mean-shift filtering for each point of the source image. It maps each point of the source image into another point. As a result, we have a new color and new position of each point.
 
-    :param src: Source image. Only ``CV_8UC4`` images are supported for now.
+    :param src: Source image. Only  ``CV_8UC4`` images are supported for now.
 
-    :param dst: Destination image, containing color of mapped points. Will have the same size and type as ``src``.
+    :param dst: Destination image containing the color of mapped points. The size and type is the same as  ``src`` .
 
     :param sp: Spatial window radius.
 
@@ -23,21 +24,21 @@ gpu::meanShiftFiltering
 
     :param criteria: Termination criteria. See :c:type:`TermCriteria`.
 
-
-
 .. index:: gpu::meanShiftProc
 
 gpu::meanShiftProc
 ----------------------
-.. cpp:function:: void gpu::meanShiftProc(const GpuMat& src, GpuMat& dstr, GpuMat& dstsp, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1))
+.. cpp:function:: void gpu::meanShiftProc(const GpuMat& src, GpuMat& dstr, GpuMat& dstsp,
+   int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER
+   + TermCriteria::EPS, 5, 1))
 
-    Performs mean-shift procedure and stores information about processed points (i.e. their colors and positions) into two images.
+    Performs a mean-shift procedure and stores information about processed points (their colors and positions) in two images.
 
-    :param src: Source image. Only ``CV_8UC4`` images are supported for now.
+    :param src: Source image. Only  ``CV_8UC4`` images are supported for now.
 
-    :param dstr: Destination image, containing color of mapped points. Will have the same size and type as ``src``.
+    :param dstr: Destination image containing the color of mapped points. The size and type is the same as  ``src`` .
 
-    :param dstsp: Destination image, containing position of mapped points. Will have the same size as ``src`` and ``CV_16SC2`` type.
+    :param dstsp: Destination image containing the position of mapped points. The size is the same as  ``src``. The type is  ``CV_16SC2``.
 
     :param sp: Spatial window radius.
 
@@ -45,9 +46,8 @@ gpu::meanShiftProc
 
     :param criteria: Termination criteria. See :c:type:`TermCriteria`.
 
-See also: :cpp:func:`gpu::meanShiftFiltering`.
-
-
+See Also:
+:c:func:`gpu::meanShiftFiltering` .
 
 .. index:: gpu::meanShiftSegmentation
 
@@ -55,22 +55,20 @@ gpu::meanShiftSegmentation
 ------------------------------
 .. cpp:function:: void gpu::meanShiftSegmentation(const GpuMat& src, Mat& dst, int sp, int sr, int minsize, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1))
 
-    Performs mean-shift segmentation of the source image and eliminates small segments.
+    Performs a mean-shift segmentation of the source image and eleminates small segments.
 
-    :param src: Source ``CV_8UC4`` image.
+    :param src: Source image. Only  ``CV_8UC4`` images are supported for now.
 
-    :param dst: Segmented image. Will have the same size and type as ``src``.
+    :param dst: Segmented image. The size and type is the same as  ``src`` .
 
     :param sp: Spatial window radius.
 
     :param sr: Color window radius.
 
-    :param minsize: Minimum segment size. Smaller segements will be eliminated.
+    :param minsize: Minimum segment size. Smaller segements are merged.
 
     :param criteria: Termination criteria. See :c:type:`TermCriteria`.
 
-
-
 .. index:: gpu::integral
 
 gpu::integral
@@ -79,17 +77,16 @@ gpu::integral
 
 .. cpp:function:: void gpu::integral(const GpuMat& src, GpuMat& sum, GpuMat& sqsum)
 
-    Computes integral image and squared integral image.
+    Computes an integral image and a squared integral image.
 
-    :param src: Source image. Only ``CV_8UC1`` images are supported for now.
+    :param src: Source image. Only  ``CV_8UC1`` images are supported for now.
 
-    :param sum: Integral image. Will contain 32-bit unsigned integer values packed into ``CV_32SC1``.
-
-    :param sqsum: Squared integral image. Will have ``CV_32FC1`` type.
-
-See also: :c:func:`integral`.
+    :param sum: Integral image containing 32-bit unsigned integer values packed into  ``CV_32SC1`` .
 
+    :param sqsum: Squared integral image of the  ``CV_32FC1`` type.
 
+See Also:
+:c:func:`integral` .
 
 .. index:: gpu::sqrIntegral
 
@@ -97,13 +94,11 @@ gpu::sqrIntegral
 --------------------
 .. cpp:function:: void gpu::sqrIntegral(const GpuMat& src, GpuMat& sqsum)
 
-    Computes squared integral image.
-
-    :param src: Source image. Only ``CV_8UC1`` images are supported for now.
-
-    :param sqsum: Squared integral image. Will contain 64-bit unsigned integer values packed into ``CV_64FC1``.
+    Computes a squared integral image.
 
+    :param src: Source image. Only  ``CV_8UC1`` images are supported for now.
 
+    :param sqsum: Squared integral image containing 64-bit unsigned integer values packed into  ``CV_64FC1`` .
 
 .. index:: gpu::columnSum
 
@@ -111,25 +106,25 @@ gpu::columnSum
 ------------------
 .. cpp:function:: void gpu::columnSum(const GpuMat& src, GpuMat& sum)
 
-    Computes vertical (column) sum.
-
-    :param src: Source image. Only ``CV_32FC1`` images are supported for now.
-
-    :param sum: Destination image. Will have ``CV_32FC1`` type.
+    Computes a vertical (column) sum.
 
+    :param src: Source image. Only  ``CV_32FC1`` images are supported for now.
 
+    :param sum: Destination image of the  ``CV_32FC1`` type.
 
 .. index:: gpu::cornerHarris
 
 gpu::cornerHarris
 ---------------------
-.. cpp:function:: void gpu::cornerHarris(const GpuMat& src, GpuMat& dst, int blockSize, int ksize, double k, int borderType=BORDER_REFLECT101)
+.. cpp:function:: void gpu::cornerHarris(const GpuMat& src, GpuMat& dst,
+   int blockSize, int ksize, double k,
+   int borderType=BORDER_REFLECT101)
 
-    Computes Harris cornerness criteria at each image pixel.
+    Computes the Harris cornerness criteria at each image pixel.
 
-    :param src: Source image. Only ``CV_8UC1`` and ``CV_32FC1`` images are supported for now.
+    :param src: Source image. Only  ``CV_8UC1`` and  ``CV_32FC1`` images are supported for now.
 
-    :param dst: Destination image. Will have the same size and ``CV_32FC1`` type and contain cornerness values.
+    :param dst: Destination image containing cornerness values. The size is the same. The type is ``CV_32FC1`` .
 
     :param blockSize: Neighborhood size.
 
@@ -137,23 +132,24 @@ gpu::cornerHarris
 
     :param k: Harris detector free parameter.
 
-    :param borderType: Pixel extrapolation method. Only ``BORDER_REFLECT101`` and ``BORDER_REPLICATE`` are supported for now.
-
-See also: :c:func:`cornerHarris`.
-
+    :param borderType: Pixel extrapolation method. Only  ``BORDER_REFLECT101`` and  ``BORDER_REPLICATE`` are supported for now.
 
+See Also:
+:c:func:`cornerHarris` .
 
 .. index:: gpu::cornerMinEigenVal
 
 gpu::cornerMinEigenVal
 --------------------------
-.. cpp:function:: void gpu::cornerMinEigenVal(const GpuMat& src, GpuMat& dst, int blockSize, int ksize, int borderType=BORDER_REFLECT101)
+.. cpp:function:: void gpu::cornerMinEigenVal(const GpuMat& src, GpuMat& dst,
+   int blockSize, int ksize,
+   int borderType=BORDER_REFLECT101)
 
-    Computes minimum eigen value of 2x2 derivative covariation matrix at each pixel - the cornerness criteria.
+    Computes the minimum eigen value of 2x2 derivative covariation matrix at each pixel (the cornerness criteria).
 
-    :param src: Source image. Only ``CV_8UC1`` and ``CV_32FC1`` images are supported for now.
+    :param src: Source image. Only  ``CV_8UC1`` and  ``CV_32FC1`` images are supported for now.
 
-    :param dst: Destination image. Will have the same size and ``CV_32FC1`` type and contain cornerness values.
+    :param dst: Destination image containing cornerness values. The size is the same. The type is  ``CV_32FC1``.
 
     :param blockSize: Neighborhood size.
 
@@ -165,57 +161,55 @@ gpu::cornerMinEigenVal
 
 See also: :c:func:`cornerMinEigenVal`.
 
-
-
 .. index:: gpu::mulSpectrums
 
 gpu::mulSpectrums
 ---------------------
-.. cpp:function:: void gpu::mulSpectrums(const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, bool conjB=false)
+.. cpp:function:: void gpu::mulSpectrums(const GpuMat& a, const GpuMat& b,
+   GpuMat& c, int flags, bool conjB=false)
 
-    Performs per-element multiplication of two Fourier spectrums.
+    Performs per-element multiplication of two Fourier spectrums.
 
     :param a: First spectrum.
 
-    :param b: Second spectrum. Must have the same size and type as ``a``.
+    :param b: Second spectrum. The size and type is the same as  ``a`` .
 
     :param c: Destination spectrum.
 
-    :param flags: Mock paramter is kept for CPU/GPU interfaces similarity.
-
-    :param conjB: Optional flag which indicates the second spectrum must be conjugated before the multiplication.
+    :param flags: Mock parameter used for CPU/GPU interfaces similarity.
 
-Only full (i.e. not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
-
-See also: :c:func:`mulSpectrums`.
+    :param conjB: Optional flag to specify if the second spectrum needs to be conjugated before the multiplication.
 
+    Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
 
+See Also:
+:c:func:`mulSpectrums` .
 
 .. index:: gpu::mulAndScaleSpectrums
 
 gpu::mulAndScaleSpectrums
 -----------------------------
-.. cpp:function:: void gpu::mulAndScaleSpectrums(const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, float scale, bool conjB=false)
+.. cpp:function:: void gpu::mulAndScaleSpectrums(const GpuMat& a, const GpuMat& b,
+   GpuMat& c, int flags, float scale, bool conjB=false)
 
-    Performs per-element multiplication of two Fourier spectrums and scales the result.
+    Performs per-element multiplication of two Fourier spectrums and scales the result.
 
     :param a: First spectrum.
 
-    :param b: Second spectrum. Must have the same size and type as ``a``.
+    :param b: Second spectrum. The size and type is the same as  ``a`` .
 
     :param c: Destination spectrum.
 
-    :param flags: Mock paramter is kept for CPU/GPU interfaces similarity.
+    :param flags: Mock parameter used for CPU/GPU interfaces similarity.
 
     :param scale: Scale constant.
 
-    :param conjB: Optional flag which indicates the second spectrum must be conjugated before the multiplication.
-
-Only full (i.e. not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
-
-See also: :c:func:`mulSpectrums`.
+    :param conjB: Optional flag to specify if the second spectrum needs to be conjugated before the multiplication.
 
+    Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
 
+See Also:
+:c:func:`mulSpectrums` .
 
 .. index:: gpu::dft
 
@@ -223,7 +217,7 @@ gpu::dft
 ------------
 .. cpp:function:: void gpu::dft(const GpuMat& src, GpuMat& dst, Size dft_size, int flags=0)
 
-    Performs a forward or inverse discrete Fourier transform (1D or 2D) of floating point matrix. Can handle real matrices ``CV32FC1`` and complex matrices in the interleaved format ``CV32FC2``.
+    Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix. Use to handle real matrices (CV32FC1) and complex matrices in the interleaved format (CV32FC2).
 
     :param src: Source matrix (real or complex).
 
@@ -235,55 +229,62 @@ gpu::dft
 
             * **DFT_ROWS** Transform each individual row of the source matrix.
 
-            * **DFT_SCALE** Scale the result: divide it by the number of elements in the transform (it's obtained from ``dft_size``).
-
-            * **DFT_INVERSE** Inverse DFT must be perfromed for complex-complex case (real-complex and complex-real cases are respectively forward and inverse always).
+            * **DFT_SCALE** Scale the result: divide it by the number of elements in the transform (obtained from  ``dft_size`` ).
 
-            * **DFT_REAL_OUTPUT** The source matrix is the result of real-complex transform, so the destination matrix must be real.
+            * **DFT_INVERSE** Invert DFT. Use for complex-complex cases (real-complex and complex-real cases are respectively forward and inverse always).
 
-The source matrix should be continuous, otherwise reallocation and data copying will be performed. Function chooses the operation mode depending on the flags, size and channel count of the source matrix:
-
-* If the source matrix is complex and the output isn't specified as real then the destination matrix will be complex, will have ``dft_size`` size and ``CV_32FC2`` type. It will contain full result of the DFT (forward or inverse).
+            * **DFT_REAL_OUTPUT** Specify the output as real. The source matrix is the result of real-complex transform, so the destination matrix must be real.
+            
 
-* If the source matrix is complex and the output is specified as real then function assumes that its input is the result of the forward transform (see next item). The destionation matrix will have ``dft_size`` size and ``CV_32FC1`` type. It will contain result of the inverse DFT.
+    The source matrix should be continuous, otherwise reallocation and data copying is performed. The function chooses an operation mode depending on the flags, size, and channel count of the source matrix:
 
-* If the source matrix is real (i.e. its type is ``CV_32FC1``) then forward DFT will be performed. The result of the DFT will be packed into complex (``CV_32FC2``) matrix so its width will be ``dft_size.width / 2 + 1``, but if the source is a single column then height will be reduced instead of width.
+    *
+        If the source matrix is complex and the output is not specified as real, the destination matrix is complex, has the ``dft_size``    size and ``CV_32FC2``    type. The destination matrix contains a full result of the DFT (forward or inverse).
 
-See also: :c:func:`dft`.
+    *
+        If the source matrix is complex and the output is specified as real, the function assumes that its input is the result of the forward transform (see next item). The destionation matrix has the ``dft_size``    size and ``CV_32FC1``    type. It contains the result of the inverse DFT.
 
+    *
+        If the source matrix is real (its type is ``CV_32FC1``    ), forward DFT is performed. The result of the DFT is packed into complex ( ``CV_32FC2``    ) matrix. So, the width of the destination matrix is ``dft_size.width / 2 + 1``    . But if the source is a single column, the height is reduced instead of the width.
 
+See Also:
+:c:func:`dft` .
 
 .. index:: gpu::convolve
 
 gpu::convolve
 -----------------
-.. cpp:function:: void gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result, bool ccorr=false)
+.. cpp:function:: void gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
+   bool ccorr=false)
 
-.. cpp:function:: void gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result, bool ccorr, ConvolveBuf& buf)
+.. cpp:function:: void gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
+   bool ccorr, ConvolveBuf& buf)
 
     Computes convolution (or cross-correlation) of two images.
 
-    :param image: Source image. Only ``CV_32FC1`` images are supported for now.
+    :param image: Source image. Only  ``CV_32FC1`` images are supported for now.
 
-    :param templ: Template image. Must have size not greater then ``image`` size and be the same type as ``image``.
+    :param templ: Template image. The size is not greater than the  ``image`` size. The type is the same as  ``image`` .
 
-    :param result: Result image. Will have the same size and type as ``image``.
+    :param result: Result image. The size and type is the same as  ``image`` .
 
-    :param ccorr: Flags which indicates cross-correlation must be evaluated instead of convolution.
+    :param ccorr: Flags to evaluate cross-correlation instead of convolution.
 
     :param buf: Optional buffer to avoid extra memory allocations (for many calls with the same sizes).
 
-
-
 .. index:: gpu::ConvolveBuf
 
+.. _gpu::ConvolveBuf:
+
 gpu::ConvolveBuf
 ----------------
 .. cpp:class:: gpu::ConvolveBuf
 
-Memory buffer for the :cpp:func:`gpu::convolve` function. ::
+    Provides a memory buffer for the
+    :c:func:`gpu::convolve` function. 
+::
 
-    struct ConvolveBuf
+    struct CV_EXPORTS ConvolveBuf
     {
         ConvolveBuf() {}
         ConvolveBuf(Size image_size, Size templ_size)
@@ -295,82 +296,79 @@ Memory buffer for the :cpp:func:`gpu::convolve` function. ::
     };
 
 
-
 .. index:: gpu::ConvolveBuf::ConvolveBuf
 
 gpu::ConvolveBuf::ConvolveBuf
 ---------------------------------
-.. cpp:function:: gpu::ConvolveBuf::ConvolveBuf()
-
-Constructs an empty buffer which will be properly resized after first call of the convolve function.
+.. cpp:function:: ConvolveBuf::ConvolveBuf()
 
-.. cpp:function:: gpu::ConvolveBuf::ConvolveBuf(Size image_size, Size templ_size)
-
-Constructs a buffer for the convolve function with respectively arguments.
+    Constructs an empty buffer that will be properly resized after the first call of the 
+    :c:func:`convolve` function.
 
+.. cpp:function:: ConvolveBuf::ConvolveBuf(Size image_size, Size templ_size)
 
+    Constructs a buffer for the 
+    :c:func:`convolve` function with respective arguments.
 
 .. index:: gpu::matchTemplate
 
 gpu::matchTemplate
 ----------------------
-.. cpp:function:: void gpu::matchTemplate(const GpuMat& image, const GpuMat& templ, GpuMat& result, int method)
+.. cpp:function:: void gpu::matchTemplate(const GpuMat& image, const GpuMat& templ,
+   GpuMat& result, int method)
 
     Computes a proximity map for a raster template and an image where the template is searched for.
 
-    :param image: Source image. ``CV_32F`` and ``CV_8U`` depth images (1..4 channels) are supported for now.
-
-    :param templ: Template image. Must have the same size and type as ``image``.
+    :param image: Source image.  ``CV_32F`` and  ``CV_8U`` depth images (1..4 channels) are supported for now.
 
-    :param result: Map containing comparison results (``CV_32FC1``). If ``image`` is ``W`` :math:`\times` ``H`` and ``templ`` is ``w`` :math:`\times` ``h`` then ``result`` must be ``(W-w+1)`` :math:`\times` ``(H-h+1)``.
+    :param templ: Template image. The size and type is the same as  ``image`` .
 
-    :param method: Specifies the way which the template must be compared with the 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*.
 
-Following methods are supported for the ``CV_8U`` depth images for now:
+    :param method: Specifies the way to compare the template with the image.
 
- * CV_TM_SQDIFF
- * CV_TM_SQDIFF_NORMED
- * CV_TM_CCORR
- * CV_TM_CCORR_NORMED
- * CV_TM_CCOEFF
- * CV_TM_CCOEFF_NORMED
+    The following methods are supported for the ``CV_8U`` depth images for now:
 
-Following methods are supported for the ``CV_32F`` images for now:
+    * CV_TM_SQDIFF
+    * CV_TM_SQDIFF_NORMED
+    * CV_TM_CCORR
+    * CV_TM_CCORR_NORMED
+    * CV_TM_CCOEFF
+    * CV_TM_CCOEFF_NORMED
 
- * CV_TM_SQDIFF
- * CV_TM_CCORR
-
-See also: :c:func:`matchTemplate`.
+    The following methods are supported for the ``CV_32F`` images for now:
 
+    * CV_TM_SQDIFF
+    * CV_TM_CCORR
 
+See Also:
+:c:func:`matchTemplate` .
 
 .. index:: gpu::remap
 
 gpu::remap
 --------------
-.. cpp:function:: void gpu::remap(const GpuMat& src, GpuMat& dst,  const GpuMat& xmap, const GpuMat& ymap)
+.. cpp:function:: void gpu::remap(const GpuMat& src, GpuMat& dst, const GpuMat& xmap, const GpuMat& ymap)
 
     Applies a generic geometrical transformation to an image.
 
-    :param src: Source image. Only ``CV_8UC1`` and ``CV_8UC3`` source types are supported.
-
-    :param dst: Destination image. It will have the same size as ``xmap`` and the same type as ``src``.
+    :param src: Source image. Only  ``CV_8UC1`` and  ``CV_8UC3`` source types are supported.
 
-    :param xmap: X values. Only ``CV_32FC1`` type is supported.
+    :param dst: Destination image. The size is the same as  ``xmap`` . The type is the same as  ``src`` .
 
-    :param ymap: Y values. Only ``CV_32FC1`` type is supported.
+    :param xmap: X values. Only  ``CV_32FC1`` type is supported.
 
-The function transforms the source image using the specified map:
+    :param ymap: Y values. Only  ``CV_32FC1`` type is supported.
 
-.. math::
+    The function transforms the source image using the specified map:
 
-    dst(x,y) = src(xmap(x,y), ymap(x,y))
+    .. math::
 
-Values of pixels with non-integer coordinates are computed using bilinear interpolation.
-
-See also: :c:func:`remap`.
+        \texttt{dst} (x,y) =  \texttt{src} (xmap(x,y), ymap(x,y))
 
+    Values of pixels with non-integer coordinates are computed using bilinear interpolation.
 
+See Also: :c:func:`remap` .
 
 .. index:: gpu::cvtColor
 
@@ -378,25 +376,24 @@ gpu::cvtColor
 -----------------
 .. cpp:function:: void gpu::cvtColor(const GpuMat& src, GpuMat& dst, int code, int dcn = 0)
 
-.. cpp:function:: void gpu::cvtColor(const GpuMat& src, GpuMat& dst, int code, int dcn,  const Stream& stream)
+.. cpp:function:: void gpu::cvtColor(const GpuMat& src, GpuMat& dst, int code, int dcn, const Stream& stream)
 
     Converts image from one color space to another.
 
-    :param src: Source image with ``CV_8U``, ``CV_16U`` or ``CV_32F`` depth and 1, 3 or 4 channels.
+    :param src: Source image with  ``CV_8U``, ``CV_16U``, or  ``CV_32F`` depth and 1, 3, or 4 channels.
 
-    :param dst: Destination image; will have the same size and the same depth as ``src``.
+    :param dst: Destination image. The size and depth is the same as  ``src`` .
 
-    :param code: Color space conversion code. For details see :c:func:`cvtColor`. Conversion to/from Luv and Bayer color spaces doesn't supported.
+    :param code: Color space conversion code. For details, see  :func:`cvtColor` . Conversion to/from Luv and Bayer color spaces is not supported.
 
-    :param dcn: Number of channels in the destination image; if the parameter is 0, the number of the channels will be derived automatically from ``src`` and the ``code``.
+    :param dcn: Number of channels in the destination image. If the parameter is 0, the number of the channels is derived automatically from  ``src`` and the  ``code`` .
 
     :param stream: Stream for the asynchronous version.
 
-3-channel color spaces (like ``HSV``, ``XYZ``, etc) can be stored to 4-channel image for better perfomance.
-
-See also: :c:func:`cvtColor`.
-
+    3-channel color spaces (like ``HSV``,``XYZ``, and so on) can be stored to a 4-channel image for better perfomance.
 
+See Also:
+:func:`cvtColor` .
 
 .. index:: gpu::threshold
 
@@ -408,21 +405,20 @@ gpu::threshold
 
     Applies a fixed-level threshold to each array element.
 
-    :param src: Source array (single-channel, ``CV_64F`` depth isn't supported).
+    :param src: Source array (single-channel). ``CV_64F`` depth is not supported.
 
-    :param dst: Destination array; will have the same size and the same type as ``src``.
+    :param dst: Destination array. The size and type is the same as  ``src`` .
 
     :param thresh: Threshold value.
 
-    :param maxVal: Maximum value to use with ``THRESH_BINARY`` and ``THRESH_BINARY_INV`` thresholding types.
+    :param maxVal: Maximum value to use with  ``THRESH_BINARY`` and  ``THRESH_BINARY_INV`` threshold types.
 
-    :param thresholdType: Thresholding type. For details see :c:func:`threshold`. ``THRESH_OTSU`` thresholding type doesn't supported.
+    :param thresholdType: Threshold type. For details, see  :func:`threshold` . The ``THRESH_OTSU`` threshold type is not supported.
 
     :param stream: Stream for the asynchronous version.
 
-See also: :c:func:`threshold`.
-
-
+See Also:
+:func:`threshold` .
 
 .. index:: gpu::resize
 
@@ -432,35 +428,32 @@ gpu::resize
 
     Resizes an image.
 
-    :param src: Source image. Supports ``CV_8UC1`` and ``CV_8UC4`` types.
+    :param src: Source image. Supports  the ``CV_8UC1`` and  ``CV_8UC4`` types.
 
-    :param dst: Destination image. It will have size ``dsize`` (when it is non-zero) or the size computed from ``src.size()`` and ``fx`` and ``fy``. The type of ``dst`` will be the same as of ``src``.
+    :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 dsize: Destination image size. If it is zero, then it is computed as: 
+    :param dsize: Destination image size. If it is zero, it is computed as: 
 
         .. math::
-            
-            dsize = Size(round(fx*src.cols), round(fy*src.rows))
+            \texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))} 
 
-        Either ``dsize`` or both ``fx`` or ``fy`` must be non-zero.
+        Either  ``dsize`` or both  ``fx`` and  ``fy`` must be non-zero.
 
-    :param fx: Scale factor along the horizontal axis. When 0, it is computed as 
+    :param fx: Scale factor along the horizontal axis. If it is zero, it is computed as: 
 
         .. math::
-            
-            (double)dsize.width/src.cols
 
-    :param fy: Scale factor along the vertical axis. When 0, it is computed as 
+            \texttt{(double)dsize.width/src.cols} 
 
-        .. math::
-            
-            (double)dsize.height/src.rows
+    :param fy: Scale factor along the vertical axis. If it is zero, it is computed as: 
 
-    :param interpolation: Interpolation method. Supports only ``INTER_NEAREST`` and ``INTER_LINEAR``.
+        .. math::
 
-See also: :c:func:`resize`.
+            \texttt{(double)dsize.height/src.rows} 
 
+    :param interpolation: Interpolation method. Only  ``INTER_NEAREST`` and  ``INTER_LINEAR`` are supported.
 
+See Also: :func:`resize` .
 
 .. index:: gpu::warpAffine
 
@@ -470,19 +463,18 @@ gpu::warpAffine
 
     Applies an affine transformation to an image.
 
-    :param src: Source image. Supports ``CV_8U``, ``CV_16U``, ``CV_32S`` or ``CV_32F`` depth and 1, 3 or 4 channels.
+    :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; will have size ``dsize`` and the same type as ``src``.
+    :param dst: Destination image. The size is  ``dsize`` . The type is the same as  ``src`` .
 
-    :param M: :math:`2 \times 3`  transformation matrix.
+    :param M: *2x3*  transformation matrix.
 
     :param dsize: Size of the destination image.
 
-    :param flags: Combination of interpolation methods, see :c:func:`resize`, and the optional flag ``WARP_INVERSE_MAP`` that means that ``M`` is the inverse transformation(:math:`dst \rightarrow src` ). Supports only  ``INTER_NEAREST``, ``INTER_LINEAR`` and ``INTER_CUBIC`` interpolation methods.
-
-See also: :c:func:`warpAffine`.
-
+    :param flags: Combination of interpolation methods (see  :func:`resize` ) and the optional flag  ``WARP_INVERSE_MAP`` specifying that  ``M`` is the inverse transformation (``dst=>src``). Only ``INTER_NEAREST``, ``INTER_LINEAR``, and  ``INTER_CUBIC`` interpolation methods are supported.
 
+See Also:
+:func:`warpAffine` .
 
 .. index:: gpu::warpPerspective
 
@@ -492,19 +484,18 @@ gpu::warpPerspective
 
     Applies a perspective transformation to an image.
 
-    :param src: Source image. Supports ``CV_8U``, ``CV_16U``, ``CV_32S`` or ``CV_32F`` depth and 1, 3 or 4 channels.
+    :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; will have size ``dsize`` and the same type as ``src``.
+    :param dst: Destination image. The size is  ``dsize`` . The type is the same as  ``src`` .
 
-    :param M: :math:`2 \times 3` transformation matrix.
+    :param M: *3x3* transformation matrix.
 
     :param dsize: Size of the destination image.
 
-    :param flags: Combination of interpolation methods, see :c:func:`resize`, and the optional flag ``WARP_INVERSE_MAP`` that means that ``M`` is the inverse transformation (:math:`dst \rightarrow src` ). Supports only  ``INTER_NEAREST``, ``INTER_LINEAR`` and ``INTER_CUBIC`` interpolation methods.
-
-See also: :c:func:`warpPerspective`.
-
+    :param flags: Combination of interpolation methods (see  :func:`resize` ) and the optional flag  ``WARP_INVERSE_MAP`` specifying that  ``M`` is the inverse transformation (``dst => src``). Only  ``INTER_NEAREST``, ``INTER_LINEAR``, and  ``INTER_CUBIC`` interpolation methods are supported.
 
+See Also:
+:func:`warpPerspective` .
 
 .. index:: gpu::rotate
 
@@ -514,23 +505,22 @@ gpu::rotate
 
     Rotates an image around the origin (0,0) and then shifts it.
 
-    :param src: Source image. Supports ``CV_8UC1`` and ``CV_8UC4`` types.
+    :param src: Source image. Supports  ``CV_8UC1`` and  ``CV_8UC4`` types.
 
-    :param dst: Destination image; will have size ``dsize`` and the same type as ``src``.
+    :param dst: Destination image. The size is  ``dsize`` . The type is the same as  ``src`` .
 
     :param dsize: Size of the destination image.
 
     :param angle: Angle of rotation in degrees.
 
-    :param xShift: Shift along horizontal axis.
-
-    :param yShift: Shift along vertical axis.
+    :param xShift: Shift along the horizontal axis.
 
-    :param interpolation: Interpolation method. Supports only ``INTER_NEAREST``, ``INTER_LINEAR`` and ``INTER_CUBIC``.
-
-See also: :cpp:func:`gpu::warpAffine`.
+    :param yShift: Shift along the vertical axis.
 
+    :param interpolation: Interpolation method. Only  ``INTER_NEAREST``, ``INTER_LINEAR``, and  ``INTER_CUBIC`` are supported.
 
+See Also:
+:func:`gpu::warpAffine` .
 
 .. index:: gpu::copyMakeBorder
 
@@ -538,38 +528,34 @@ gpu::copyMakeBorder
 -----------------------
 .. cpp:function:: void gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom, int left, int right, const Scalar& value = Scalar())
 
-    Copies 2D array to a larger destination array and pads borders with the given constant.
+    Copies 2D array to a larger destination array and pads borders with the given constant.
 
-    :param src: Source image. Supports ``CV_8UC1``, ``CV_8UC4``, ``CV_32SC1`` and ``CV_32FC1`` types.
+    :param src: Source image. ``CV_8UC1``, ``CV_8UC4``, ``CV_32SC1``, and  ``CV_32FC1`` types are supported.
 
-    :param dst: The destination image; will have the same type as ``src`` and the size ``Size(src.cols+left+right, src.rows+top+bottom)``.
+    :param dst: Destination image. The type is the same as  ``src`` . The size is  ``Size(src.cols+left+right, src.rows+top+bottom)`` .
 
-    :param top, bottom, left, right: Specify how much pixels in each direction from the source image rectangle one needs to extrapolate, e.g. ``top=1, bottom=1, left=1, right=1`` mean that 1 pixel-wide border needs to be built.
+    :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.
 
     :param value: Border value.
 
-See also: :c:func:`copyMakeBorder`.
-
-
-
+See Also:
+:func:`copyMakeBorder`
 .. index:: gpu::rectStdDev
 
 gpu::rectStdDev
 -------------------
 .. cpp:function:: void gpu::rectStdDev(const GpuMat& src, const GpuMat& sqr, GpuMat& dst, const Rect& rect)
 
-    Computes standard deviation of integral images.
+    Computes standard deviation of integral images.
 
-    :param src: Source image. Supports only ``CV_32SC1`` type.
+    :param src: Source image. Only the ``CV_32SC1`` type is supported.
 
-    :param sqr: Squared source image. Supports only ``CV_32FC1`` type.
+    :param sqr: Squared source image. Only  the ``CV_32FC1`` type is supported.
 
-    :param dst: Destination image; will have the same type and the same size as ``src``.
+    :param dst: Destination image. The type and size is the same as  ``src`` .
 
     :param rect: Rectangular window.
 
-
-
 .. index:: gpu::evenLevels
 
 gpu::evenLevels
@@ -578,16 +564,14 @@ gpu::evenLevels
 
     Computes levels with even distribution.
 
-    :param levels: Destination array. ``levels`` will have 1 row and ``nLevels`` cols and ``CV_32SC1`` type.
+    :param levels: Destination array.  ``levels`` has 1 row, ``nLevels`` columns, and the ``CV_32SC1`` type.
 
-    :param nLevels: Number of levels being computed. ``nLevels`` must be at least 2.
+    :param nLevels: Number of computed levels.  ``nLevels`` must be at least 2.
 
     :param lowerLevel: Lower boundary value of the lowest level.
 
     :param upperLevel: Upper boundary value of the greatest level.
 
-
-
 .. index:: gpu::histEven
 
 gpu::histEven
@@ -596,19 +580,17 @@ gpu::histEven
 
 .. cpp:function:: void gpu::histEven(const GpuMat& src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4])
 
-    Calculates histogram with evenly distributed bins.
+    Calculates histogram with evenly distributed bins.
 
-    :param src: Source image. Supports ``CV_8U``, ``CV_16U`` or ``CV_16S`` depth and 1 or 4 channels. For four-channel image all channels are processed separately.
+    :param src: Source image. ``CV_8U``, ``CV_16U``, or ``CV_16S`` depth and 1 or 4 channels are supported. For a four-channel image, all channels are processed separately.
 
-    :param hist: Destination histogram. Will have one row, ``histSize`` cols and ``CV_32S`` type.
+    :param hist: Destination histogram with one row, ``histSize`` columns, and the ``CV_32S`` type.
 
-    :param histSize: Size of histogram.
-
-    :param lowerLevel: Lower boundary of lowest level bin.
-
-    :param upperLevel: Upper boundary of highest level bin.
+    :param histSize: Size of the histogram.
 
+    :param lowerLevel: Lower boundary of lowest-level bin.
 
+    :param upperLevel: Upper boundary of highest-level bin.
 
 .. index:: gpu::histRange
 
@@ -616,12 +598,13 @@ gpu::histRange
 ------------------
 .. cpp:function:: void gpu::histRange(const GpuMat& src, GpuMat& hist, const GpuMat& levels)
 
-.. cpp:function:: void gpu::histRange(const GpuMat& src, GpuMat hist[4],  const GpuMat levels[4])
+.. cpp:function:: void gpu::histRange(const GpuMat& src, GpuMat hist[4], const GpuMat levels[4])
+
+    Calculates a histogram with bins determined by the `levels` array.
 
-    Calculates histogram with bins determined by levels array.
+    :param src: Source image. ``CV_8U``, ``CV_16U``, or  ``CV_16S`` depth and 1 or 4 channels are supported. For a four-channel image, all channels are processed separately.
 
-    :param src: Source image. Supports ``CV_8U``, ``CV_16U`` or ``CV_16S`` depth and 1 or 4 channels. For four-channel image all channels are processed separately.
+    :param hist: Destination histogram with one row, ``(levels.cols-1)`` columns, and the  ``CV_32SC1`` type.
 
-    :param hist: Destination histogram. Will have one row, ``(levels.cols-1)`` cols and ``CV_32SC1`` type.
+    :param levels: Number of levels in the histogram.
 
-    :param levels: Number of levels in histogram.
index 45cb51b..6f117a5 100644 (file)
@@ -1,49 +1,42 @@
 Initalization and Information
 =============================
-
 .. highlight:: cpp
 
-
-
 .. index:: gpu::getCudaEnabledDeviceCount
 
 gpu::getCudaEnabledDeviceCount
 ----------------------------------
-.. cpp:function:: int gpu::getCudaEnabledDeviceCount()
-
-    Returns number of CUDA-enabled devices installed. It is to be used before any other GPU functions calls. If OpenCV is compiled without GPU support this function returns 0.
 
+.. cpp:function:: int getCudaEnabledDeviceCount()
 
+    Returns the number of installed CUDA-enabled devices. Use this function before any other GPU functions calls. If OpenCV is compiled without GPU support, this function returns 0.
 
 .. index:: gpu::setDevice
 
 gpu::setDevice
 ------------------
-.. cpp:function:: void gpu::setDevice(int device)
-
-    Sets device and initializes it for the current thread. Call of this function can be omitted, but in this case a default device will be initialized on fist GPU usage.
-
-    :param device: index of GPU device in system starting with 0.
+.. cpp:function:: void setDevice(int device)
 
+    Sets a device and initializes it for the current thread. If call of this function is omitted, a default device is initialized at the fist GPU usage.
 
+    :param device: System index of a GPU device starting with 0.
 
 .. index:: gpu::getDevice
 
 gpu::getDevice
 ------------------
-.. cpp:function:: int gpu::getDevice()
-
-    Returns the current device index, which was set by :cpp:func:`gpu::setDevice` or initialized by default.
-
+.. cpp:function:: int getDevice()
 
+    Returns the current device index that was set by {gpu::getDevice} or initialized by default.
 
 .. index:: gpu::GpuFeature
 
 gpu::GpuFeature
 ---------------
 .. c:type:: gpu::GpuFeature
-
-GPU compute features. ::
+    
+This class provides GPU computing features. 
+::
 
     enum GpuFeature
     {
@@ -54,16 +47,16 @@ GPU compute features. ::
     };
 
 
-
 .. index:: gpu::DeviceInfo
 
 gpu::DeviceInfo
 ---------------
 .. cpp:class:: gpu::DeviceInfo
 
-This class provides functionality for querying the specified GPU properties. ::
+This class provides functionality for querying the specified GPU properties. 
+::
 
-    class DeviceInfo
+    class CV_EXPORTS DeviceInfo
     {
     public:
         DeviceInfo();
@@ -84,20 +77,18 @@ This class provides functionality for querying the specified GPU properties. ::
     };
 
 
-
 .. index:: gpu::DeviceInfo::DeviceInfo
+.. Comment: two lines below look like a bug
 
 gpu::DeviceInfo::DeviceInfo
--------------------------------
+------------------------------- ``_``
 .. cpp:function:: gpu::DeviceInfo::DeviceInfo()
 
 .. cpp:function:: gpu::DeviceInfo::DeviceInfo(int device_id)
 
-    Constructs :cpp:class:`gpu::DeviceInfo` object for the specified device. If ``device_id`` parameter is missed it constructs object for the current device.
-
-    :param device_id: Index of the GPU device in system starting with 0.
-
+    Constructs the ``DeviceInfo`` object for the specified device. If ``device_id`` parameter is missed, it constructs an object for the current device.
 
+    :param device_id: System index of the GPU device starting with 0.
 
 .. index:: gpu::DeviceInfo::name
 
@@ -107,8 +98,6 @@ gpu::DeviceInfo::name
 
     Returns the device name.
 
-
-
 .. index:: gpu::DeviceInfo::majorVersion
 
 gpu::DeviceInfo::majorVersion
@@ -117,8 +106,6 @@ gpu::DeviceInfo::majorVersion
 
     Returns the major compute capability version.
 
-
-
 .. index:: gpu::DeviceInfo::minorVersion
 
 gpu::DeviceInfo::minorVersion
@@ -127,8 +114,6 @@ gpu::DeviceInfo::minorVersion
 
     Returns the minor compute capability version.
 
-
-
 .. index:: gpu::DeviceInfo::multiProcessorCount
 
 gpu::DeviceInfo::multiProcessorCount
@@ -137,8 +122,6 @@ gpu::DeviceInfo::multiProcessorCount
 
     Returns the number of streaming multiprocessors.
 
-
-
 .. index:: gpu::DeviceInfo::freeMemory
 
 gpu::DeviceInfo::freeMemory
@@ -147,8 +130,6 @@ gpu::DeviceInfo::freeMemory
 
     Returns the amount of free memory in bytes.
 
-
-
 .. index:: gpu::DeviceInfo::totalMemory
 
 gpu::DeviceInfo::totalMemory
@@ -157,19 +138,15 @@ gpu::DeviceInfo::totalMemory
 
     Returns the amount of total memory in bytes.
 
-
-
 .. index:: gpu::DeviceInfo::supports
 
 gpu::DeviceInfo::supports
 -----------------------------
 .. cpp:function:: bool gpu::DeviceInfo::supports(GpuFeature feature)
 
-    Returns true if the device has the given GPU feature, otherwise false.
-
-    :param feature: Feature to be checked. See :c:type:`gpu::GpuFeature`.
-
+    Provides information on GPU feature support. This function returns true if the device has the specified GPU feature, otherwise returns false.
 
+    :param feature: Feature to be checked. See  ?.
 
 .. index:: gpu::DeviceInfo::isCompatible
 
@@ -177,46 +154,45 @@ gpu::DeviceInfo::isCompatible
 ---------------------------------
 .. cpp:function:: bool gpu::DeviceInfo::isCompatible()
 
-    Returns true if the GPU module can be run on the specified device, otherwise false.
-
-
+    Checks the GPU module and device compatibility. This function returns true if the GPU module can be run on the specified device, otherwise returns false.
 
 .. index:: gpu::TargetArchs
 
+.. _gpu::TargetArchs:
+
 gpu::TargetArchs
 ----------------
 .. cpp:class:: gpu::TargetArchs
 
-This class provides functionality (as set of static methods) for checking which NVIDIA card architectures the GPU module was built for.
+This class provides a set of static methods to check what NVIDIA card architecture the GPU module was built for.
 
 The following method checks whether the module was built with the support of the given feature:
 
-.. cpp:function:: static bool gpu::TargetArchs::builtWith(GpuFeature feature) 
+.. cpp:function:: static bool gpu::TargetArchs::builtWith(GpuFeature feature)
 
-    :param feature: Feature to be checked. See :c:type:`gpu::GpuFeature`.
+    :param feature: Feature to be checked. See  ?.
 
-There are a set of methods for checking whether the module contains intermediate (PTX) or binary GPU code for the given architecture(s):
+There is a set of methods to check whether the module contains intermediate (PTX) or binary GPU code for the given architecture(s):
 
-.. cpp:function:: static bool gpu::TargetArchs::has(int major, int minor)
+    .. cpp:function:: static bool gpu::TargetArchs::has(int major, int minor)
 
-.. cpp:function:: static bool gpu::TargetArchs::hasPtx(int major, int minor)
+    .. cpp:function:: static bool gpu::TargetArchs::hasPtx(int major, int minor)
 
-.. cpp:function:: static bool gpu::TargetArchs::hasBin(int major, int minor)
+    .. cpp:function:: static bool gpu::TargetArchs::hasBin(int major, int minor)
 
-.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor)
+    .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor)
 
-.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreater(int major, int minor)
+    .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreater(int major, int minor)
 
-.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
+    .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
 
-.. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
+    .. cpp:function:: static bool gpu::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
 
-    :param major: Major compute capability version.
+        * **major** Major compute capability version.
 
-    :param minor: Minor compute capability version.
-
-According to the CUDA C Programming Guide Version 3.2: "PTX code produced for some specific compute capability can always be compiled to binary code of greater or equal compute capability".
+        * **minor** Minor compute capability version.
 
+    According to the CUDA C Programming Guide Version 3.2: "PTX code produced for some specific compute capability can always be compiled to binary code of greater or equal compute capability".
 
 
 .. index:: gpu::MultiGpuManager
@@ -296,3 +272,4 @@ gpu::MultiGpuManager::gpuOff
 .. cpp:function:: void gpu::MultiGpuManager::gpuOff()
 
     Finishes the piece of work on the current GPU.
+