Purpose: 2nd review cycle.
authorElena Fedotova <no@email>
Sat, 18 Jun 2011 20:19:03 +0000 (20:19 +0000)
committerElena Fedotova <no@email>
Sat, 18 Jun 2011 20:19:03 +0000 (20:19 +0000)
modules/gpu/doc/data_structures.rst
modules/gpu/doc/image_processing.rst
modules/gpu/doc/initalization_and_information.rst
modules/gpu/doc/introduction.rst
modules/gpu/doc/matrix_reductions.rst
modules/gpu/doc/operations_on_matrices.rst
modules/gpu/doc/per_element_operations.rst

index 30f981e..d944287 100644 (file)
@@ -9,7 +9,7 @@ gpu::DevMem2D\_
 ---------------
 .. ocv:class:: gpu::DevMem2D\_
 
-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. ::
+Lightweight class encapsulating pitched memory on a GPU and 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_
     {
@@ -46,8 +46,8 @@ gpu::PtrStep\_
 --------------
 .. ocv:class:: gpu::PtrStep\_
 
-This structure is similar to 
-:ocv: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. 
+Structure similar to 
+:ocv:class:`DevMem2D_` but containing 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_
@@ -77,8 +77,8 @@ gpu::PtrElemStrp\_
 ------------------
 .. ocv:class:: gpu::PtrElemStrp\_
 
-This structure is similar to 
-:ocv: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. 
+Structure similar to 
+:ocv:class:`DevMem2D_` but containing only a pointer and a 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>
@@ -95,7 +95,7 @@ gpu::GpuMat
 -----------
 .. ocv:class:: gpu::GpuMat
 
-This is a base storage class for GPU memory with reference counting. Its interface matches the
+Base storage class for GPU memory with reference counting. Its interface matches the
 :c:type:`Mat` interface with the following limitations:
 
 *   
@@ -105,11 +105,10 @@ This is a base storage class for GPU memory with reference counting. Its interfa
 *   
     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 :ocv:class:`gpu::DevMem2D_` and :ocv:class:`gpu::PtrStep_` so it can be passed directly to kernel.
+Beware that the latter limitation may lead to overloaded matrix operators that cause memory allocations. The ``GpuMat`` class is convertible to :ocv:class:`gpu::DevMem2D_` and :ocv:class:`gpu::PtrStep_` so it can be passed directly to the kernel.
 
-**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. ::
+.. note:: In contrast with :ocv:class:`Mat`, in most cases ``GpuMat::isContinuous() == false`` . This means that rows are aligned to a size depending on the hardware. Single-row ``GpuMat`` is always a continuous matrix. 
+::
 
     class CV_EXPORTS GpuMat
     {
@@ -143,12 +142,12 @@ In contrast with :c:type:`Mat`, in most cases ``GpuMat::isContinuous() == false`
     };
 
 
-**Note:**
+.. 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.
+       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:
-:ocv:func:`Mat`
+.. seealso:: 
+:ocv:class:`Mat`
 
 .. index:: gpu::CudaMem
 
@@ -156,19 +155,19 @@ gpu::CudaMem
 ------------
 .. ocv:class:: gpu::CudaMem
 
-This class with reference counting wraps special memory type allocation functions from CUDA. Its interface is also
+Class with reference counting wrapping special memory type allocation functions from CUDA. Its interface is also
 :ocv:func:`Mat`-like but with additional memory type parameters.
     
 *
-    ``ALLOC_PAGE_LOCKED``:  Sets a page locked memory type, used commonly for fast and asynchronous uploading/downloading data from/to GPU.
+    ``ALLOC_PAGE_LOCKED``  sets a page locked memory type used commonly for fast and asynchronous uploading/downloading 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_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.
+    ``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:**
+.. note:: 
 
-Allocation size of such memory types is usually limited. For more details, see "CUDA 2.2 Pinned Memory APIs" document or "CUDA C Programming Guide".
+       Allocation size of such memory types is usually limited. For more details, see *CUDA 2.2 Pinned Memory APIs* document or *CUDA C Programming Guide*.
 ::
 
     class CV_EXPORTS CudaMem
@@ -217,7 +216,7 @@ gpu::CudaMem::createGpuMatHeader
 
 .. ocv:function:: GpuMat gpu::CudaMem::createGpuMatHeader() const
 
-    Maps CPU memory to GPU address space and creates the :ocv:class:`gpu::GpuMat` header without reference counting for it. This can be done only if memory was allocated with the ``ALLOC_ZEROCOPY`` flag and if it is supported by the hardware (laptops often share video and CPU memory, so address spaces can be mapped, which eliminates an extra copy).
+    Maps CPU memory to GPU address space and creates the :ocv:class:`gpu::GpuMat` header without reference counting for it. This can be done only if memory was allocated with the ``ALLOC_ZEROCOPY`` flag and if it is supported by the hardware. Laptops often share video and CPU memory, so address spaces can be mapped, which eliminates an extra copy.
 
 .. index:: gpu::CudaMem::canMapHostMemory
 
@@ -233,11 +232,11 @@ gpu::Stream
 -----------
 .. ocv:class:: gpu::Stream
 
-This class encapsulates 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 operations are complete via :ocv:func:`gpu::Stream::queryIfComplete`. You can asynchronously upload/download data from/to page-locked buffers, using the :ocv:class:`gpu::CudaMem` or :c:type:`Mat` header that points to a region of :ocv:class:`gpu::CudaMem`.
-
-**Note:**
+This class encapsulates 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 operations are complete via :ocv:func:`gpu::Stream::queryIfComplete`. You can asynchronously upload/download data from/to page-locked buffers, using the :ocv:class:`gpu::CudaMem` or :ocv:class:`Mat` header that points to a region of :ocv:class:`gpu::CudaMem`.
 
-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. 
+.. 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 CV_EXPORTS Stream
@@ -297,7 +296,7 @@ gpu::StreamAccessor
 -------------------
 .. ocv:class:: gpu::StreamAccessor
 
-This class enables getting ``cudaStream_t`` from :ocv: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. 
+Class that enables getting ``cudaStream_t`` from :ocv: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
@@ -331,7 +330,7 @@ gpu::createContinuous
     
                * .. ocv:function:: GpuMat gpu::createContinuous(Size size, int type)
 
-    Matrix is called continuous if its elements are stored continuously, that is without gaps in the end of each row.
+    Matrix is called continuous if its elements are stored continuously, that is, without gaps at the end of each row.
 
 .. index:: gpu::ensureSizeIsEnough
 
index 0d407ea..1ddc8f5 100644 (file)
@@ -41,7 +41,7 @@ gpu::meanShiftProc
 
     :param criteria: Termination criteria. See :ocv:class:`TermCriteria`.
 
-See Also:
+.. seealso::
 :ocv:func:`gpu::meanShiftFiltering` 
 
 .. index:: gpu::meanShiftSegmentation
@@ -80,7 +80,7 @@ gpu::integral
 
     :param sqsum: Squared integral image of the  ``CV_32FC1`` type.
 
-See Also:
+.. seealso::
 :ocv:func:`integral` 
 
 .. index:: gpu::sqrIntegral
@@ -127,7 +127,7 @@ gpu::cornerHarris
 
     :param borderType: Pixel extrapolation method. Only  ``BORDER_REFLECT101`` and  ``BORDER_REPLICATE`` are supported for now.
 
-See Also:
+.. seealso::
 :ocv:func:`cornerHarris` 
 
 .. index:: gpu::cornerMinEigenVal
@@ -136,7 +136,7 @@ gpu::cornerMinEigenVal
 --------------------------
 .. ocv:function:: void gpu::cornerMinEigenVal(const GpuMat& src, GpuMat& dst, int blockSize, int ksize, int borderType=BORDER_REFLECT101)
 
-    Computes the 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.
 
@@ -150,7 +150,7 @@ gpu::cornerMinEigenVal
 
     :param borderType: Pixel extrapolation method. Only ``BORDER_REFLECT101`` and ``BORDER_REPLICATE`` are supported for now.
 
-See also: :ocv:func:`cornerMinEigenVal`
+.. seealso:: :ocv:func:`cornerMinEigenVal`
 
 .. index:: gpu::mulSpectrums
 
@@ -172,7 +172,7 @@ gpu::mulSpectrums
 
     Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
 
-See Also:
+.. seealso::
 :ocv:func:`mulSpectrums` 
 
 .. index:: gpu::mulAndScaleSpectrums
@@ -197,7 +197,7 @@ gpu::mulAndScaleSpectrums
 
     Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format are supported for now.
 
-See Also:
+.. seealso::
 :ocv:func:`mulSpectrums` 
 
 .. index:: gpu::dft
@@ -216,13 +216,13 @@ gpu::dft
 
     :param flags: Optional flags:
 
-            * **DFT_ROWS** Transform each individual row of the source matrix.
+            * **DFT_ROWS** transforms each individual row of the source matrix.
 
-            * **DFT_SCALE** Scale the result: divide it by the number of elements in the transform (obtained from  ``dft_size`` ).
+            * **DFT_SCALE** scales the result: divide it by the number of elements in the transform (obtained from  ``dft_size`` ).
 
-            * **DFT_INVERSE** Invert DFT. Use for complex-complex cases (real-complex and complex-real cases are always forward and inverse, respectively).
+            * **DFT_INVERSE** inverts DFT. Use for complex-complex cases (real-complex and complex-real cases are always forward and inverse, respectively).
 
-            * **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.
+            * **DFT_REAL_OUTPUT** specifies the output as real. The source matrix is the result of real-complex transform, so the destination matrix must be real.
             
 
     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:
@@ -231,12 +231,12 @@ gpu::dft
         If the source matrix is complex and the output is not specified as real, the destination matrix is complex and has the ``dft_size``    size and ``CV_32FC2``    type. The destination matrix contains a full result of the DFT (forward or inverse).
 
     *
-        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 complex and the output is specified as real, the function assumes that its input is the result of the forward transform (see the 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:
+.. seealso::
 :ocv:func:`dft` 
 
 .. index:: gpu::convolve
@@ -261,14 +261,11 @@ gpu::convolve
 
 .. index:: gpu::ConvolveBuf
 
-.. _gpu::ConvolveBuf:
-
 gpu::ConvolveBuf
 ----------------
 .. ocv:class:: gpu::ConvolveBuf
 
-This class provides a memory buffer for the
-    :ocv:func:`gpu::convolve` function. 
+Class providing a memory buffer for the :ocv:func:`gpu::convolve` function. 
 ::
 
     struct CV_EXPORTS ConvolveBuf
@@ -327,7 +324,7 @@ gpu::matchTemplate
     * ``CV_TM_SQDIFF``
     * ``CV_TM_CCORR``
 
-See Also:
+.. seealso::
 :ocv:func:`matchTemplate` 
 
 .. index:: gpu::remap
@@ -346,15 +343,16 @@ gpu::remap
 
     :param ymap: Y values. Only  ``CV_32FC1`` type is supported.
 
-    The function transforms the source image using the specified map:
+The function transforms the source image using the specified map:
 
 .. math::
 
     \texttt{dst} (x,y) =  \texttt{src} (xmap(x,y), ymap(x,y))
 
-    Values of pixels with non-integer coordinates are computed using bilinear the interpolation.
+Values of pixels with non-integer coordinates are computed using the bilinear interpolation.
 
-See Also: :ocv:func:`remap` 
+.. seealso:: 
+:ocv:func:`remap` 
 
 .. index:: gpu::cvtColor
 
@@ -376,9 +374,9 @@ gpu::cvtColor
 
     :param stream: Stream for the asynchronous version.
 
-    3-channel color spaces (like ``HSV``, ``XYZ``, and so on) can be stored in a 4-channel image for better perfomance.
+3-channel color spaces (like ``HSV``, ``XYZ``, and so on) can be stored in a 4-channel image for better perfomance.
 
-See Also:
+.. seealso::
 :ocv:func:`cvtColor` 
 
 .. index:: gpu::threshold
@@ -403,7 +401,7 @@ gpu::threshold
 
     :param stream: Stream for the asynchronous version.
 
-See Also:
+.. seealso::
 :ocv:func:`threshold` 
 
 .. index:: gpu::resize
@@ -439,7 +437,7 @@ gpu::resize
 
     :param interpolation: Interpolation method. Only  ``INTER_NEAREST`` and  ``INTER_LINEAR`` are supported.
 
-See Also: :ocv:func:`resize` 
+.. seealso:: :ocv:func:`resize` 
 
 .. index:: gpu::warpAffine
 
@@ -459,7 +457,7 @@ gpu::warpAffine
 
     :param flags: Combination of interpolation methods (see  :ocv:func:`resize`) and the optional flag  ``WARP_INVERSE_MAP`` specifying that  ``M`` is an inverse transformation (``dst=>src``). Only ``INTER_NEAREST``, ``INTER_LINEAR``, and  ``INTER_CUBIC`` interpolation methods are supported.
 
-See Also:
+.. seealso::
 :ocv:func:`warpAffine` 
 
 .. index:: gpu::warpPerspective
@@ -470,7 +468,7 @@ 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. ``CV_8U``, ``CV_16U``, ``CV_32S``, or  ``CV_32F`` depth and 1, 3, or 4 channels are supported.
 
     :param dst: Destination image with the same type as  ``src`` . The size is  ``dsize`` . 
 
@@ -480,7 +478,7 @@ gpu::warpPerspective
 
     :param flags: Combination of interpolation methods (see  :ocv: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:
+.. seealso::
 :ocv:func:`warpPerspective` 
 
 .. index:: gpu::rotate
@@ -505,7 +503,7 @@ gpu::rotate
 
     :param interpolation: Interpolation method. Only  ``INTER_NEAREST``, ``INTER_LINEAR``, and  ``INTER_CUBIC`` are supported.
 
-See Also:
+.. seealso::
 :ocv:func:`gpu::warpAffine` 
 
 .. index:: gpu::copyMakeBorder
@@ -524,7 +522,7 @@ gpu::copyMakeBorder
 
     :param value: Border value.
 
-See Also:
+.. seealso::
 :ocv:func:`copyMakeBorder`
 
 .. index:: gpu::rectStdDev
@@ -587,7 +585,7 @@ gpu::histRange
 
 .. ocv: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 a histogram with bins determined by the ``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.
 
index 0abf0f6..cc1e0dc 100644 (file)
@@ -27,7 +27,7 @@ gpu::getDevice
 ------------------
 .. ocv:function:: int getDevice()
 
-    Returns the current device index that was set by ``{gpu::getDevice}`` or initialized by default.
+    Returns the current device index set by ``{gpu::getDevice}`` or initialized by default.
 
 .. index:: gpu::GpuFeature
 
@@ -35,7 +35,7 @@ gpu::GpuFeature
 ---------------
 .. ocv:class:: gpu::GpuFeature
     
-This class provides GPU computing features. 
+Class providing GPU computing features. 
 ::
 
     enum GpuFeature
@@ -53,7 +53,7 @@ gpu::DeviceInfo
 ---------------
 .. ocv:class:: gpu::DeviceInfo
 
-This class provides functionality for querying the specified GPU properties. 
+Class providing functionality for querying the specified GPU properties. 
 ::
 
     class CV_EXPORTS DeviceInfo
@@ -158,13 +158,11 @@ gpu::DeviceInfo::isCompatible
 
 .. index:: gpu::TargetArchs
 
-.. _gpu::TargetArchs:
-
 gpu::TargetArchs
 ----------------
 .. ocv:class:: gpu::TargetArchs
 
-This class provides a set of static methods to check what NVIDIA* card architecture the GPU module was built for.
+Class providing 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:
 
index 3179b40..775326d 100644 (file)
@@ -6,7 +6,7 @@ GPU Module Introduction
 General Information
 -------------------
 
-The OpenCV GPU module is a set of classes and functions to utilize GPU computational capabilities. It is implemented using NVIDIA* CUDA* Runtime API and supports only NVIDIA GPUs. The OpenCV GPU module includes utility functions, low-level vision primitives, and high-level algorithms. The utility functions and low-level primitives provide a powerful infrastructure for developing fast vision algorithms taking advantage of GPU whereas the high-level functionality includes some state-of-the-art algorithms (such as stereo correspondence, face and people detectors, and others), ready to be used by the application developers.
+The OpenCV GPU module is a set of classes and functions to utilize GPU computational capabilities. It is implemented using NVIDIA* CUDA* Runtime API and supports only NVIDIA GPUs. The OpenCV GPU module includes utility functions, low-level vision primitives, and high-level algorithms. The utility functions and low-level primitives provide a powerful infrastructure for developing fast vision algorithms taking advantage of GPU whereas the high-level functionality includes some state-of-the-art algorithms (such as stereo correspondence, face and people detectors, and others) ready to be used by the application developers.
 
 The GPU module is designed as a host-level API. This means that if you have pre-compiled OpenCV GPU binaries, you are not required to have the CUDA Toolkit installed or write any extra code to make use of the GPU.
 
@@ -14,7 +14,7 @@ The GPU module depends on the CUDA Toolkit and NVIDIA Performance Primitives lib
 
 The OpenCV GPU module is designed for ease of use and does not require any knowledge of CUDA. Though, such a knowledge will certainly be useful to handle non-trivial cases or achieve the highest performance. It is helpful to understand the cost of various operations, what the GPU does, what the preferred data formats are, and so on. The GPU module is an effective instrument for quick implementation of GPU-accelerated computer vision algorithms. However, if your algorithm involves many simple operations, then, for the best possible performance, you may still need to write your own kernels to avoid extra write and read operations on the intermediate results.
 
-To enable CUDA support, configure OpenCV using ``CMake`` with ``WITH_CUDA=ON`` . When the flag is set and if CUDA is installed, the full-featured OpenCV GPU module is built. Otherwise, the module is still built, but at runtime all functions from the module throw
+To enable CUDA support, configure OpenCV using ``CMake`` with ``WITH_CUDA=ON`` . When the flag is set and if CUDA is installed, the full-featured OpenCV GPU module is built. Otherwise, the module is still built but at runtime all functions from the module throw
 :ocv:func:`Exception` with ``CV_GpuNotSupported`` error code, except for
 :ocv:func:`gpu::getCudaEnabledDeviceCount()`. The latter function returns zero GPU count in this case. Building OpenCV without CUDA support does not perform device code compilation, so it does not require the CUDA Toolkit installed. Therefore, using the
 :ocv:func:`gpu::getCudaEnabledDeviceCount()` function, you can implement a high-level algorithm that will detect GPU presence at runtime and choose an appropriate implementation (CPU or GPU) accordingly.
@@ -44,19 +44,17 @@ You can always determine at runtime whether the OpenCV GPU-built binaries (or PT
 Threading and Multi-threading
 ------------------------------
 
-The OpenCV GPU module follows the CUDA Runtime API conventions regarding the multi-threaded programming. This means that for the first API call a CUDA context is created implicitly, attached to the current CPU thread and then is used as the thread's "current" context. All further operations, such as a memory allocation, GPU code compilation, are associated with the context and the thread. Because any other thread is not attached to the context, memory (and other resources) allocated in the first thread cannot be accessed by the other thread. Instead, for this other thread CUDA creates another context associated with it. In short, by default, different threads do not share resources.
-
-But you can remove this limitation by using the CUDA Driver API (version 3.1 or later). You can retrieve context reference for one thread, attach it to another thread, and make it "current" for that thread. As a result, the threads can share memory and other resources. It is also possible to create a context explicitly before calling any GPU code and attach it to all the threads you want to share the resources with.
+The OpenCV GPU module follows the CUDA Runtime API conventions regarding the multi-threaded programming. This means that for the first API call a CUDA context is created implicitly, attached to the current CPU thread and then is used as the "current" context of the thread. All further operations, such as a memory allocation, GPU code compilation, are associated with the context and the thread. Since any other thread is not attached to the context, memory (and other resources) allocated in the first thread cannot be accessed by another thread. Instead, for this other thread CUDA creates another context associated with it. In short, by default, different threads do not share resources. But you can remove this limitation by using the CUDA Driver API (version 3.1 or later). You can retrieve context reference for one thread, attach it to another thread, and make it "current" for that thread. As a result, the threads can share memory and other resources. It is also possible to create a context explicitly before calling any GPU code and attach it to all the threads you want to share the resources with.
 
 It is also possible to create the context explicitly using the CUDA Driver API, attach, and set the "current" context for all necessary threads. The CUDA Runtime API (and OpenCV functions, respectively) picks it up.
 
 Utilizing Multiple GPUs
 ---------
 
-In the current version, each of the OpenCV GPU algorithms can use only a single GPU. So, to utilize multiple GPUs, you have to manually distribute the work between GPUs. Here are the two ways of utilizing multiple GPUs:
+In the current version, each of the OpenCV GPU algorithms can use only a single GPU. So, to utilize multiple GPUs, you have to manually distribute the work between GPUs. Consider the following ways of utilizing multiple GPUs:
 
 *
-    If you use only synchronous functions, create several CPU threads (one per each GPU) and from within each thread create a CUDA context for the corresponding GPU using
+    If you use only synchronous functions, create several CPU threads (one per each GPU). From within each thread, create a CUDA context for the corresponding GPU using
     :ocv:func:`gpu::setDevice()`     or Driver API. Each of the threads will use the associated GPU.
 
 *
index 92ac4d7..9909235 100644 (file)
@@ -7,7 +7,7 @@ Matrix Reductions
 
 gpu::meanStdDev
 -------------------
-.. ocv:function:: void gpu::meanStdDev(const GpuMat\& mtx, Scalar\& mean, Scalar\& stddev)
+.. cpp:function:: void gpu::meanStdDev(const GpuMat\& mtx, Scalar\& mean, Scalar\& stddev)
 
     Computes a mean value and a standard deviation of matrix elements.
 
@@ -17,7 +17,8 @@ gpu::meanStdDev
 
     :param stddev: Standard deviation value.
 
-See Also: :ocv:func:`meanStdDev` 
+.. seealso:: 
+:ocv:func:`meanStdDev` 
 
 .. index:: gpu::norm
 
@@ -27,17 +28,18 @@ gpu::norm
 .. ocv:function:: double gpu::norm(const GpuMat\& src1, int normType, GpuMat\& buf)
 .. ocv:function:: double norm(const GpuMat\& src1, const GpuMat\& src2, int normType=NORM_L2)
 
-    Returns the norm of matrix (or difference of two matrices).
+    Returns the norm of matrix (or difference of two matrices).
 
-    :param src1: The source matrix. Any matrices except 64F are supported.
+    :param src1: Source matrix. Any matrices except 64F are supported.
 
-    :param src2: The second source matrix (if any) with the same size and type as ``src1``.
+    :param src2: 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.
 
     :param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
 
-See Also: :ocv:func:`norm`
+.. seealso:: 
+:ocv:func:`norm`
 
 .. index:: gpu::sum
 
@@ -53,7 +55,8 @@ gpu::sum
 
     :param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
 
-See Also: :ocv:func:`sum` 
+.. seealso:: 
+:ocv:func:`sum` 
 
 .. index:: gpu::absSum
 
@@ -105,7 +108,8 @@ gpu::minMax
 
 The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3.
        
-See Also: :ocv:func:`minMaxLoc` 
+.. seealso:: 
+:ocv:func:`minMaxLoc` 
 
 .. index:: gpu::minMaxLoc
 
@@ -135,7 +139,8 @@ gpu::minMaxLoc
 
        The function does not work with ``CV_64F`` images on GPU with the compute capability < 1.3.
 
-See Also: :ocv:func:`minMaxLoc` 
+.. seealso:: 
+:ocv:func:`minMaxLoc` 
 
 .. index:: gpu::countNonZero
 
@@ -151,6 +156,7 @@ gpu::countNonZero
 
     :param buf: Optional buffer to avoid extra memory allocations. It is resized automatically.
 
-       The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3.
+The function does not work with ``CV_64F`` images on GPUs with the compute capability < 1.3.
        
-       See Also: :ocv:func:`countNonZero` 
+.. seealso:: 
+:ocv:func:`countNonZero` 
index 6f91102..ba9106a 100644 (file)
@@ -11,11 +11,11 @@ gpu::transpose
 
     Transposes a matrix.
 
-    :param src: Source matrix. 1, 4, 8 bytes element sizes are supported for now.
+    :param src: Source matrix. 1-, 4-, 8-byte element sizes are supported for now.
 
     :param dst: Destination matrix.
 
-See Also:
+.. seealso::
 :ocv:func:`transpose` 
 
 .. index:: gpu::flip
@@ -39,7 +39,7 @@ gpu::flip
             * ``<0`` Flips around both axes.
             
 
-See Also:
+.. seealso::
 :ocv:func:`flip` 
 
 .. index:: gpu::LUT
@@ -57,7 +57,8 @@ gpu::LUT
     :param dst: Destination matrix with the same depth as  ``lut``  and the same number of channels as  ``src``.
             
 
-See Also: :ocv:func:`LUT` 
+.. seealso:: 
+:ocv:func:`LUT` 
 
 .. index:: gpu::merge
 
@@ -81,7 +82,8 @@ gpu::merge
 
     :param stream: Stream for the asynchronous version.
 
-See Also: :ocv:func:`merge` 
+.. seealso:: 
+:ocv:func:`merge` 
 
 .. index:: gpu::split
 
@@ -99,11 +101,12 @@ gpu::split
 
     :param src: Source matrix.
 
-    :param dst: The destination array/vector of single-channel matrices.
+    :param dst: Destination array/vector of single-channel matrices.
 
     :param stream: Stream for the asynchronous version.
 
-See Also: :ocv:func:`split`
+.. seealso:: 
+:ocv:func:`split`
 
 .. index:: gpu::magnitude
 
@@ -127,7 +130,7 @@ gpu::magnitude
 
     :param stream: Stream for the asynchronous version.
 
-See Also:
+.. seealso::
 :ocv:func:`magnitude` 
 
 .. index:: gpu::magnitudeSqr
@@ -172,7 +175,7 @@ gpu::phase
 
     :param stream: Stream for the asynchronous version.
 
-See Also:
+.. seealso::
 :ocv:func:`phase` 
 
 .. index:: gpu::cartToPolar
@@ -197,7 +200,7 @@ gpu::cartToPolar
 
     :param stream: Stream for the asynchronous version.
 
-See Also:
+.. seealso::
 :ocv:func:`cartToPolar` 
 
 .. index:: gpu::polarToCart
@@ -222,5 +225,5 @@ gpu::polarToCart
 
     :param stream: Stream for the asynchronous version.
 
-See Also:
+.. seealso::
 :ocv:func:`polarToCart` 
index f27bf0a..89c9870 100644 (file)
@@ -1,4 +1,4 @@
-Per-element Operations.
+Per-element Operations
 =======================
 
 .. highlight:: cpp
@@ -21,7 +21,8 @@ gpu::add
 
     :param dst: Destination matrix with the same size and type as ``src1``.
 
-See Also: :ocv:func:`add`
+.. seealso:: 
+:ocv:func:`add`
 
 .. index:: gpu::subtract
 
@@ -39,7 +40,8 @@ gpu::subtract
 
     :param dst: Destination matrix with the same size and type as ``src1``.
 
-See Also: :ocv:func:`subtract`
+.. seealso:: 
+:ocv:func:`subtract`
 
 
 
@@ -59,7 +61,8 @@ gpu::multiply
 
     :param dst: Destination matrix with the same size and type as ``src1``.
 
-See Also: :ocv:func:`multiply`
+.. seealso:: 
+:ocv:func:`multiply`
 
 
 .. index:: gpu::divide
@@ -78,9 +81,10 @@ gpu::divide
 
     :param dst: Destination matrix with the same size and type as ``src1``.
 
-       This function, in contrast to :ocv:func:`divide`, uses a round-down rounding mode.
+This function, in contrast to :ocv:func:`divide`, uses a round-down rounding mode.
 
-See Also: :ocv:func:`divide`
+.. seealso:: 
+:ocv:func:`divide`
 
 
 
@@ -96,7 +100,8 @@ gpu::exp
 
     :param dst: Destination matrix with the same size and type as ``src``.
 
-See Also: :ocv:func:`exp`
+.. seealso:: 
+:ocv:func:`exp`
 
 
 
@@ -112,7 +117,7 @@ gpu::log
 
     :param dst: Destination matrix with the same size and type as ``src``.
 
-See Also: :ocv:func:`log`
+.. seealso:: :ocv:func:`log`
 
 
 
@@ -124,7 +129,7 @@ gpu::absdiff
 
 .. ocv:function:: void gpu::absdiff(const GpuMat& src1, const Scalar& src2, GpuMat& dst)
 
-    Computes per-element absolute difference of two matrices (or of matrix and scalar).
+    Computes per-element absolute difference of two matrices (or of matrix and scalar).
 
     :param src1: First source matrix. ``CV_8UC1``, ``CV_8UC4``, ``CV_32SC1`` and ``CV_32FC1`` matrices are supported for now.
 
@@ -132,7 +137,8 @@ gpu::absdiff
 
     :param dst: Destination matrix with the same size and type as ``src1``.
 
-See Also: :ocv:func:`absdiff`
+.. seealso:: 
+:ocv:func:`absdiff`
 
 .. index:: gpu::compare
 
@@ -157,7 +163,8 @@ gpu::compare
             * **CMP_LE:** ``src1(.) <= src2(.)``
             * **CMP_NE:** ``src1(.) != src2(.)``
 
-See Also: :ocv:func:`compare`
+.. seealso:: 
+:ocv:func:`compare`
 
 
 .. index:: gpu::bitwise_not
@@ -232,7 +239,7 @@ gpu::bitwise_xor
 
 .. ocv:function:: void gpu::bitwise_xor(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, const GpuMat& mask, const Stream& stream)
 
-    Performs a per-element bitwise "exclusive or" operation of two matrices.
+    Performs a per-element bitwise ``exclusive or`` operation of two matrices.
 
     :param src1: First source matrix.
 
@@ -268,7 +275,8 @@ gpu::min
 
     :param stream: Stream for the asynchronous version.
 
-See Also: :ocv:func:`min`
+.. seealso:: 
+:ocv:func:`min`
 
 
 
@@ -294,4 +302,5 @@ gpu::max
 
     :param stream: Stream for the asynchronous version.
 
-See Also: :ocv:func:`max`
+.. seealso:: 
+:ocv:func:`max`