pull/1299/head
Vladislav Vinogradov 12 years ago
parent f936c1283b
commit cbe437571e
  1. 12
      doc/check_docs2.py
  2. 22
      modules/core/doc/opengl_interop.rst
  3. 6
      modules/cuda/doc/calib3d.rst
  4. 6
      modules/cuda/doc/cuda.rst
  5. 146
      modules/cuda/doc/data_structures.rst
  6. 147
      modules/cuda/doc/initalization_and_information.rst
  7. 33
      modules/cuda/doc/introduction.rst
  8. 128
      modules/cuda/doc/object_detection.rst
  9. 44
      modules/cudaarithm/doc/arithm.rst
  10. 52
      modules/cudaarithm/doc/core.rst
  11. 6
      modules/cudaarithm/doc/cudaarithm.rst
  12. 168
      modules/cudaarithm/doc/element_operations.rst
  13. 110
      modules/cudaarithm/doc/reductions.rst
  14. 55
      modules/cudabgsegm/doc/background_segmentation.rst
  15. 6
      modules/cudabgsegm/doc/cudabgsegm.rst
  16. 6
      modules/cudacodec/doc/cudacodec.rst
  17. 68
      modules/cudacodec/doc/videodec.rst
  18. 86
      modules/cudacodec/doc/videoenc.rst
  19. 6
      modules/cudafeatures2d/doc/cudafeatures2d.rst
  20. 222
      modules/cudafeatures2d/doc/feature_detection_and_description.rst
  21. 6
      modules/cudafilters/doc/cudafilters.rst
  22. 94
      modules/cudafilters/doc/filtering.rst
  23. 30
      modules/cudaimgproc/doc/color.rst
  24. 6
      modules/cudaimgproc/doc/cudaimgproc.rst
  25. 44
      modules/cudaimgproc/doc/feature_detection.rst
  26. 66
      modules/cudaimgproc/doc/histogram.rst
  27. 82
      modules/cudaimgproc/doc/hough.rst
  28. 74
      modules/cudaimgproc/doc/imgproc.rst
  29. 1
      modules/cudaimgproc/test/test_histogram.cpp
  30. 6
      modules/cudaoptflow/doc/cudaoptflow.rst
  31. 55
      modules/cudaoptflow/doc/optflow.rst
  32. 6
      modules/cudastereo/doc/cudastereo.rst
  33. 88
      modules/cudastereo/doc/stereo.rst
  34. 6
      modules/cudawarping/doc/cudawarping.rst
  35. 78
      modules/cudawarping/doc/warping.rst
  36. 18
      modules/nonfree/doc/feature_detection.rst
  37. 22
      modules/photo/doc/denoising.rst

@ -33,7 +33,7 @@ doc_signatures_whitelist = [
# templates # templates
"Matx", "Vec", "SparseMat_", "Scalar_", "Mat_", "Ptr", "Size_", "Point_", "Rect_", "Point3_", "Matx", "Vec", "SparseMat_", "Scalar_", "Mat_", "Ptr", "Size_", "Point_", "Rect_", "Point3_",
"DataType", "detail::RotationWarperBase", "flann::Index_", "CalonderDescriptorExtractor", "DataType", "detail::RotationWarperBase", "flann::Index_", "CalonderDescriptorExtractor",
"gpu::PtrStepSz", "gpu::PtrStep", "gpu::PtrElemStep_", "cuda::PtrStepSz", "cuda::PtrStep", "cuda::PtrElemStep_",
# black boxes # black boxes
"CvArr", "CvFileStorage", "CvArr", "CvFileStorage",
# other # other
@ -200,10 +200,10 @@ def process_module(module, path):
for filename in fnmatch.filter(files, "*.h*"): for filename in fnmatch.filter(files, "*.h*"):
hdrlist.append(os.path.join(root, filename)) hdrlist.append(os.path.join(root, filename))
if module == "gpu": if module == "cuda":
hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "gpu_types.hpp")) hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "cuda_types.hpp"))
hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "gpu.hpp")) hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "cuda.hpp"))
hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "gpu_stream_accessor.hpp")) hdrlist.append(os.path.join(path, "..", "core", "include", "opencv2", "core", "cuda_stream_accessor.hpp"))
decls = [] decls = []
for hname in hdrlist: for hname in hdrlist:
@ -212,7 +212,7 @@ def process_module(module, path):
funcs = [] funcs = []
# not really needed to hardcode all the namespaces. Normally all they are collected automatically # not really needed to hardcode all the namespaces. Normally all they are collected automatically
namespaces = ['cv', 'cv.gpu', 'cvflann', 'cvflann.anyimpl', 'cvflann.lsh', 'cv.flann', 'cv.linemod', 'cv.detail', 'cvtest', 'perf', 'cv.videostab'] namespaces = ['cv', 'cv.cuda', 'cvflann', 'cvflann.anyimpl', 'cvflann.lsh', 'cv.flann', 'cv.linemod', 'cv.detail', 'cvtest', 'perf', 'cv.videostab']
classes = [] classes = []
structs = [] structs = []

@ -83,7 +83,7 @@ The constructors.
:param abufId: Buffer object name. :param abufId: Buffer object name.
:param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`gpu::GpuMat` or ``std::vector`` ). :param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`cuda::GpuMat` or ``std::vector`` ).
:param target: Buffer usage. See :ocv:enum:`ogl::Buffer::Target` . :param target: Buffer usage. See :ocv:enum:`ogl::Buffer::Target` .
@ -146,7 +146,7 @@ Copies from host/device memory to OpenGL buffer.
.. ocv:function:: void ogl::Buffer::copyFrom(InputArray arr, Target target = ARRAY_BUFFER, bool autoRelease = false) .. ocv:function:: void ogl::Buffer::copyFrom(InputArray arr, Target target = ARRAY_BUFFER, bool autoRelease = false)
:param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`gpu::GpuMat` or ``std::vector`` ). :param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`cuda::GpuMat` or ``std::vector`` ).
:param target: Buffer usage. See :ocv:enum:`ogl::Buffer::Target` . :param target: Buffer usage. See :ocv:enum:`ogl::Buffer::Target` .
@ -160,7 +160,7 @@ Copies from OpenGL buffer to host/device memory or another OpenGL buffer object.
.. ocv:function:: void ogl::Buffer::copyTo(OutputArray arr) const .. ocv:function:: void ogl::Buffer::copyTo(OutputArray arr) const
:param arr: Destination array (host or device memory, can be :ocv:class:`Mat` , :ocv:class:`gpu::GpuMat` , ``std::vector`` or ``ogl::Buffer`` ). :param arr: Destination array (host or device memory, can be :ocv:class:`Mat` , :ocv:class:`cuda::GpuMat` , ``std::vector`` or ``ogl::Buffer`` ).
@ -227,7 +227,7 @@ ogl::Buffer::mapDevice
---------------------- ----------------------
Maps OpenGL buffer to CUDA device memory. Maps OpenGL buffer to CUDA device memory.
.. ocv:function:: gpu::GpuMat ogl::Buffer::mapDevice() .. ocv:function:: cuda::GpuMat ogl::Buffer::mapDevice()
This operatation doesn't copy data. This operatation doesn't copy data.
Several buffer objects can be mapped to CUDA memory at a time. Several buffer objects can be mapped to CUDA memory at a time.
@ -289,7 +289,7 @@ The constructors.
:param aformat: Image format. See :ocv:enum:`ogl::Texture2D::Format` . :param aformat: Image format. See :ocv:enum:`ogl::Texture2D::Format` .
:param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`gpu::GpuMat` or :ocv:class:`ogl::Buffer` ). :param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`cuda::GpuMat` or :ocv:class:`ogl::Buffer` ).
:param autoRelease: Auto release mode (if true, release will be called in object's destructor). :param autoRelease: Auto release mode (if true, release will be called in object's destructor).
@ -347,7 +347,7 @@ Copies from host/device memory to OpenGL texture.
.. ocv:function:: void ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease = false) .. ocv:function:: void ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease = false)
:param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`gpu::GpuMat` or :ocv:class:`ogl::Buffer` ). :param arr: Input array (host or device memory, it can be :ocv:class:`Mat` , :ocv:class:`cuda::GpuMat` or :ocv:class:`ogl::Buffer` ).
:param autoRelease: Auto release mode (if true, release will be called in object's destructor). :param autoRelease: Auto release mode (if true, release will be called in object's destructor).
@ -359,7 +359,7 @@ Copies from OpenGL texture to host/device memory or another OpenGL texture objec
.. ocv:function:: void ogl::Texture2D::copyTo(OutputArray arr, int ddepth = CV_32F, bool autoRelease = false) const .. ocv:function:: void ogl::Texture2D::copyTo(OutputArray arr, int ddepth = CV_32F, bool autoRelease = false) const
:param arr: Destination array (host or device memory, can be :ocv:class:`Mat` , :ocv:class:`gpu::GpuMat` , :ocv:class:`ogl::Buffer` or ``ogl::Texture2D`` ). :param arr: Destination array (host or device memory, can be :ocv:class:`Mat` , :ocv:class:`cuda::GpuMat` , :ocv:class:`ogl::Buffer` or ``ogl::Texture2D`` ).
:param ddepth: Destination depth. :param ddepth: Destination depth.
@ -528,12 +528,12 @@ Render OpenGL texture or primitives.
gpu::setGlDevice cuda::setGlDevice
---------------- -----------------
Sets a CUDA device and initializes it for the current thread with OpenGL interoperability. Sets a CUDA device and initializes it for the current thread with OpenGL interoperability.
.. ocv:function:: void gpu::setGlDevice( int device = 0 ) .. ocv:function:: void cuda::setGlDevice( int device = 0 )
:param device: System index of a GPU device starting with 0. :param device: System index of a CUDA device starting with 0.
This function should be explicitly called after OpenGL context creation and before any CUDA calls. This function should be explicitly called after OpenGL context creation and before any CUDA calls.

@ -5,11 +5,11 @@ Camera Calibration and 3D Reconstruction
gpu::solvePnPRansac cuda::solvePnPRansac
------------------- --------------------
Finds the object pose from 3D-2D point correspondences. Finds the object pose from 3D-2D point correspondences.
.. ocv:function:: void gpu::solvePnPRansac(const Mat& object, const Mat& image, const Mat& camera_mat, const Mat& dist_coef, Mat& rvec, Mat& tvec, bool use_extrinsic_guess=false, int num_iters=100, float max_dist=8.0, int min_inlier_count=100, vector<int>* inliers=NULL) .. ocv:function:: void cuda::solvePnPRansac(const Mat& object, const Mat& image, const Mat& camera_mat, const Mat& dist_coef, Mat& rvec, Mat& tvec, bool use_extrinsic_guess=false, int num_iters=100, float max_dist=8.0, int min_inlier_count=100, vector<int>* inliers=NULL)
:param object: Single-row matrix of object points. :param object: Single-row matrix of object points.

@ -1,6 +1,6 @@
************************************ **************************************
gpu. GPU-accelerated Computer Vision cuda. CUDA-accelerated Computer Vision
************************************ **************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -5,9 +5,9 @@ Data Structures
gpu::PtrStepSz cuda::PtrStepSz
-------------- ---------------
.. ocv:class:: gpu::PtrStepSz .. ocv:class:: cuda::PtrStepSz
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. :: 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. ::
@ -30,11 +30,11 @@ Lightweight class encapsulating pitched memory on a GPU and passed to nvcc-compi
gpu::PtrStep cuda::PtrStep
------------ -------------
.. ocv:class:: gpu::PtrStep .. ocv:class:: cuda::PtrStep
Structure similar to :ocv:class:`gpu::PtrStepSz` 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. :: Structure similar to :ocv:class:`cuda::PtrStepSz` 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 : public DevPtr<T> template <typename T> struct PtrStep : public DevPtr<T>
{ {
@ -57,9 +57,9 @@ Structure similar to :ocv:class:`gpu::PtrStepSz` but containing only a pointer a
gpu::GpuMat cuda::GpuMat
----------- ------------
.. ocv:class:: gpu::GpuMat .. ocv:class:: cuda::GpuMat
Base storage class for GPU memory with reference counting. Its interface matches the :ocv:class:`Mat` interface with the following limitations: Base storage class for GPU memory with reference counting. Its interface matches the :ocv:class:`Mat` interface with the following limitations:
@ -67,7 +67,7 @@ Base storage class for GPU memory with reference counting. Its interface matches
* no functions that return references to their data (because references on GPU are not valid for CPU) * no functions that return references to their data (because references on GPU are not valid for CPU)
* no expression templates technique support * 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::PtrStepSz` and :ocv:class:`gpu::PtrStep` so it can be passed directly to the kernel. Beware that the latter limitation may lead to overloaded matrix operators that cause memory allocations. The ``GpuMat`` class is convertible to :ocv:class:`cuda::PtrStepSz` and :ocv:class:`cuda::PtrStep` so it can be passed directly to the kernel.
.. 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. .. 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.
@ -76,34 +76,34 @@ Beware that the latter limitation may lead to overloaded matrix operators that c
class CV_EXPORTS GpuMat class CV_EXPORTS GpuMat
{ {
public: public:
//! default constructor //! default constructor
GpuMat(); GpuMat();
//! constructs GpuMat of the specified size and type //! constructs GpuMat of the specified size and type
GpuMat(int rows, int cols, int type); GpuMat(int rows, int cols, int type);
GpuMat(Size size, int type); GpuMat(Size size, int type);
..... .....
//! builds GpuMat from host memory (Blocking call) //! builds GpuMat from host memory (Blocking call)
explicit GpuMat(InputArray arr); explicit GpuMat(InputArray arr);
//! returns lightweight PtrStepSz structure for passing //! returns lightweight PtrStepSz structure for passing
//to nvcc-compiled code. Contains size, data ptr and step. //to nvcc-compiled code. Contains size, data ptr and step.
template <class T> operator PtrStepSz<T>() const; template <class T> operator PtrStepSz<T>() const;
template <class T> operator PtrStep<T>() const; template <class T> operator PtrStep<T>() const;
//! pefroms upload data to GpuMat (Blocking call) //! pefroms upload data to GpuMat (Blocking call)
void upload(InputArray arr); void upload(InputArray arr);
//! pefroms upload data to GpuMat (Non-Blocking call) //! pefroms upload data to GpuMat (Non-Blocking call)
void upload(InputArray arr, Stream& stream); void upload(InputArray arr, Stream& stream);
//! pefroms download data from device to host memory (Blocking call) //! pefroms download data from device to host memory (Blocking call)
void download(OutputArray dst) const; void download(OutputArray dst) const;
//! pefroms download data from device to host memory (Non-Blocking call) //! pefroms download data from device to host memory (Non-Blocking call)
void download(OutputArray dst, Stream& stream) const; void download(OutputArray dst, Stream& stream) const;
}; };
@ -113,11 +113,11 @@ Beware that the latter limitation may lead to overloaded matrix operators that c
gpu::createContinuous cuda::createContinuous
--------------------- ----------------------
Creates a continuous matrix. Creates a continuous matrix.
.. ocv:function:: void gpu::createContinuous(int rows, int cols, int type, OutputArray arr) .. ocv:function:: void cuda::createContinuous(int rows, int cols, int type, OutputArray arr)
:param rows: Row count. :param rows: Row count.
@ -131,11 +131,11 @@ Matrix is called continuous if its elements are stored continuously, that is, wi
gpu::ensureSizeIsEnough cuda::ensureSizeIsEnough
----------------------- ------------------------
Ensures that the size of a matrix is big enough and the matrix has a proper type. Ensures that the size of a matrix is big enough and the matrix has a proper type.
.. ocv:function:: void gpu::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr) .. ocv:function:: void cuda::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
:param rows: Minimum desired number of rows. :param rows: Minimum desired number of rows.
@ -149,9 +149,9 @@ The function does not reallocate memory if the matrix has proper attributes alre
gpu::CudaMem cuda::CudaMem
------------ -------------
.. ocv:class:: gpu::CudaMem .. ocv:class:: cuda::CudaMem
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. 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.
@ -191,47 +191,47 @@ Class with reference counting wrapping special memory type allocation functions
gpu::CudaMem::createMatHeader cuda::CudaMem::createMatHeader
----------------------------- ------------------------------
Creates a header without reference counting to :ocv:class:`gpu::CudaMem` data. Creates a header without reference counting to :ocv:class:`cuda::CudaMem` data.
.. ocv:function:: Mat gpu::CudaMem::createMatHeader() const .. ocv:function:: Mat cuda::CudaMem::createMatHeader() const
gpu::CudaMem::createGpuMatHeader cuda::CudaMem::createGpuMatHeader
-------------------------------- ---------------------------------
Maps CPU memory to GPU address space and creates the :ocv:class:`gpu::GpuMat` header without reference counting for it. Maps CPU memory to GPU address space and creates the :ocv:class:`cuda::GpuMat` header without reference counting for it.
.. ocv:function:: GpuMat gpu::CudaMem::createGpuMatHeader() const .. ocv:function:: GpuMat cuda::CudaMem::createGpuMatHeader() const
This can be done only if memory was allocated with the ``SHARED`` 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. This can be done only if memory was allocated with the ``SHARED`` 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.
gpu::registerPageLocked cuda::registerPageLocked
----------------------- ------------------------
Page-locks the memory of matrix and maps it for the device(s). Page-locks the memory of matrix and maps it for the device(s).
.. ocv:function:: void gpu::registerPageLocked(Mat& m) .. ocv:function:: void cuda::registerPageLocked(Mat& m)
:param m: Input matrix. :param m: Input matrix.
gpu::unregisterPageLocked cuda::unregisterPageLocked
------------------------- --------------------------
Unmaps the memory of matrix and makes it pageable again. Unmaps the memory of matrix and makes it pageable again.
.. ocv:function:: void gpu::unregisterPageLocked(Mat& m) .. ocv:function:: void cuda::unregisterPageLocked(Mat& m)
:param m: Input matrix. :param m: Input matrix.
gpu::Stream cuda::Stream
----------- ------------
.. ocv:class:: gpu::Stream .. ocv:class:: cuda::Stream
This class encapsulates a queue of asynchronous calls. This class encapsulates a queue of asynchronous calls.
@ -265,45 +265,45 @@ This class encapsulates a queue of asynchronous calls.
gpu::Stream::queryIfComplete cuda::Stream::queryIfComplete
---------------------------- -----------------------------
Returns ``true`` if the current stream queue is finished. Otherwise, it returns false. Returns ``true`` if the current stream queue is finished. Otherwise, it returns false.
.. ocv:function:: bool gpu::Stream::queryIfComplete() .. ocv:function:: bool cuda::Stream::queryIfComplete()
gpu::Stream::waitForCompletion cuda::Stream::waitForCompletion
------------------------------ -------------------------------
Blocks the current CPU thread until all operations in the stream are complete. Blocks the current CPU thread until all operations in the stream are complete.
.. ocv:function:: void gpu::Stream::waitForCompletion() .. ocv:function:: void cuda::Stream::waitForCompletion()
gpu::Stream::waitEvent cuda::Stream::waitEvent
---------------------- -----------------------
Makes a compute stream wait on an event. Makes a compute stream wait on an event.
.. ocv:function:: void gpu::Stream::waitEvent(const Event& event) .. ocv:function:: void cuda::Stream::waitEvent(const Event& event)
gpu::Stream::enqueueHostCallback cuda::Stream::enqueueHostCallback
-------------------------------- ---------------------------------
Adds a callback to be called on the host after all currently enqueued items in the stream have completed. Adds a callback to be called on the host after all currently enqueued items in the stream have completed.
.. ocv:function:: void gpu::Stream::enqueueHostCallback(StreamCallback callback, void* userData) .. ocv:function:: void cuda::Stream::enqueueHostCallback(StreamCallback callback, void* userData)
.. note:: Callbacks must not make any CUDA API calls. Callbacks must not perform any synchronization that may depend on outstanding device work or other callbacks that are not mandated to run earlier. Callbacks without a mandated order (in independent streams) execute in undefined order and may be serialized. .. note:: Callbacks must not make any CUDA API calls. Callbacks must not perform any synchronization that may depend on outstanding device work or other callbacks that are not mandated to run earlier. Callbacks without a mandated order (in independent streams) execute in undefined order and may be serialized.
gpu::StreamAccessor cuda::StreamAccessor
------------------- --------------------
.. ocv:struct:: gpu::StreamAccessor .. ocv:struct:: cuda::StreamAccessor
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. :: Class that enables getting ``cudaStream_t`` from :ocv:class:`cuda::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 struct StreamAccessor
{ {

@ -5,51 +5,51 @@ Initalization and Information
gpu::getCudaEnabledDeviceCount cuda::getCudaEnabledDeviceCount
------------------------------ -------------------------------
Returns the number of installed CUDA-enabled devices. Returns the number of installed CUDA-enabled devices.
.. ocv:function:: int gpu::getCudaEnabledDeviceCount() .. ocv:function:: int cuda::getCudaEnabledDeviceCount()
Use this function before any other GPU functions calls. If OpenCV is compiled without GPU support, this function returns 0. Use this function before any other CUDA functions calls. If OpenCV is compiled without CUDA support, this function returns 0.
gpu::setDevice cuda::setDevice
-------------- ---------------
Sets a device and initializes it for the current thread. Sets a device and initializes it for the current thread.
.. ocv:function:: void gpu::setDevice(int device) .. ocv:function:: void cuda::setDevice(int device)
:param device: System index of a GPU device starting with 0. :param device: System index of a CUDA device starting with 0.
If the call of this function is omitted, a default device is initialized at the fist GPU usage. If the call of this function is omitted, a default device is initialized at the fist CUDA usage.
gpu::getDevice cuda::getDevice
-------------- ---------------
Returns the current device index set by :ocv:func:`gpu::setDevice` or initialized by default. Returns the current device index set by :ocv:func:`cuda::setDevice` or initialized by default.
.. ocv:function:: int gpu::getDevice() .. ocv:function:: int cuda::getDevice()
gpu::resetDevice cuda::resetDevice
---------------- -----------------
Explicitly destroys and cleans up all resources associated with the current device in the current process. Explicitly destroys and cleans up all resources associated with the current device in the current process.
.. ocv:function:: void gpu::resetDevice() .. ocv:function:: void cuda::resetDevice()
Any subsequent API call to this device will reinitialize the device. Any subsequent API call to this device will reinitialize the device.
gpu::FeatureSet cuda::FeatureSet
--------------- ----------------
Enumeration providing GPU computing features. Enumeration providing CUDA computing features.
.. ocv:enum:: gpu::FeatureSet .. ocv:enum:: cuda::FeatureSet
.. ocv:emember:: FEATURE_SET_COMPUTE_10 .. ocv:emember:: FEATURE_SET_COMPUTE_10
.. ocv:emember:: FEATURE_SET_COMPUTE_11 .. ocv:emember:: FEATURE_SET_COMPUTE_11
@ -62,33 +62,34 @@ Enumeration providing GPU computing features.
.. ocv:emember:: NATIVE_DOUBLE .. ocv:emember:: NATIVE_DOUBLE
gpu::TargetArchs
----------------
.. ocv:class:: gpu::TargetArchs
Class providing a set of static methods to check what NVIDIA* card architecture the GPU module was built for. cuda::TargetArchs
-----------------
.. ocv:class:: cuda::TargetArchs
Class providing a set of static methods to check what NVIDIA* card architecture the CUDA module was built for.
The following method checks whether the module was built with the support of the given feature: The following method checks whether the module was built with the support of the given feature:
.. ocv:function:: static bool gpu::TargetArchs::builtWith( FeatureSet feature_set ) .. ocv:function:: static bool cuda::TargetArchs::builtWith( FeatureSet feature_set )
:param feature_set: Features to be checked. See :ocv:enum:`gpu::FeatureSet`. :param feature_set: Features to be checked. See :ocv:enum:`cuda::FeatureSet`.
There is a set of methods to check 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 CUDA code for the given architecture(s):
.. ocv:function:: static bool gpu::TargetArchs::has(int major, int minor) .. ocv:function:: static bool cuda::TargetArchs::has(int major, int minor)
.. ocv:function:: static bool gpu::TargetArchs::hasPtx(int major, int minor) .. ocv:function:: static bool cuda::TargetArchs::hasPtx(int major, int minor)
.. ocv:function:: static bool gpu::TargetArchs::hasBin(int major, int minor) .. ocv:function:: static bool cuda::TargetArchs::hasBin(int major, int minor)
.. ocv:function:: static bool gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor) .. ocv:function:: static bool cuda::TargetArchs::hasEqualOrLessPtx(int major, int minor)
.. ocv:function:: static bool gpu::TargetArchs::hasEqualOrGreater(int major, int minor) .. ocv:function:: static bool cuda::TargetArchs::hasEqualOrGreater(int major, int minor)
.. ocv:function:: static bool gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor) .. ocv:function:: static bool cuda::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
.. ocv:function:: static bool gpu::TargetArchs::hasEqualOrGreaterBin(int major, int minor) .. ocv:function:: static bool cuda::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
:param major: Major compute capability version. :param major: Major compute capability version.
@ -98,9 +99,9 @@ According to the CUDA C Programming Guide Version 3.2: "PTX code produced for so
gpu::DeviceInfo cuda::DeviceInfo
--------------- ----------------
.. ocv:class:: gpu::DeviceInfo .. ocv:class:: cuda::DeviceInfo
Class providing functionality for querying the specified GPU properties. :: Class providing functionality for querying the specified GPU properties. ::
@ -285,90 +286,90 @@ Class providing functionality for querying the specified GPU properties. ::
//! checks whether device supports the given feature //! checks whether device supports the given feature
bool supports(FeatureSet feature_set) const; bool supports(FeatureSet feature_set) const;
//! checks whether the GPU module can be run on the given device //! checks whether the CUDA module can be run on the given device
bool isCompatible() const; bool isCompatible() const;
}; };
gpu::DeviceInfo::DeviceInfo cuda::DeviceInfo::DeviceInfo
--------------------------- ----------------------------
The constructors. The constructors.
.. ocv:function:: gpu::DeviceInfo::DeviceInfo() .. ocv:function:: cuda::DeviceInfo::DeviceInfo()
.. ocv:function:: gpu::DeviceInfo::DeviceInfo(int device_id) .. ocv:function:: cuda::DeviceInfo::DeviceInfo(int device_id)
:param device_id: System index of the GPU device starting with 0. :param device_id: System index of the CUDA device 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. Constructs the ``DeviceInfo`` object for the specified device. If ``device_id`` parameter is missed, it constructs an object for the current device.
gpu::DeviceInfo::name cuda::DeviceInfo::name
--------------------- ----------------------
Returns the device name. Returns the device name.
.. ocv:function:: const char* gpu::DeviceInfo::name() const .. ocv:function:: const char* cuda::DeviceInfo::name() const
gpu::DeviceInfo::majorVersion cuda::DeviceInfo::majorVersion
----------------------------- ------------------------------
Returns the major compute capability version. Returns the major compute capability version.
.. ocv:function:: int gpu::DeviceInfo::majorVersion() .. ocv:function:: int cuda::DeviceInfo::majorVersion()
gpu::DeviceInfo::minorVersion cuda::DeviceInfo::minorVersion
----------------------------- ------------------------------
Returns the minor compute capability version. Returns the minor compute capability version.
.. ocv:function:: int gpu::DeviceInfo::minorVersion() .. ocv:function:: int cuda::DeviceInfo::minorVersion()
gpu::DeviceInfo::freeMemory cuda::DeviceInfo::freeMemory
--------------------------- ----------------------------
Returns the amount of free memory in bytes. Returns the amount of free memory in bytes.
.. ocv:function:: size_t gpu::DeviceInfo::freeMemory() .. ocv:function:: size_t cuda::DeviceInfo::freeMemory()
gpu::DeviceInfo::totalMemory cuda::DeviceInfo::totalMemory
---------------------------- -----------------------------
Returns the amount of total memory in bytes. Returns the amount of total memory in bytes.
.. ocv:function:: size_t gpu::DeviceInfo::totalMemory() .. ocv:function:: size_t cuda::DeviceInfo::totalMemory()
gpu::DeviceInfo::supports cuda::DeviceInfo::supports
------------------------- --------------------------
Provides information on GPU feature support. Provides information on CUDA feature support.
.. ocv:function:: bool gpu::DeviceInfo::supports(FeatureSet feature_set) const .. ocv:function:: bool cuda::DeviceInfo::supports(FeatureSet feature_set) const
:param feature_set: Features to be checked. See :ocv:enum:`gpu::FeatureSet`. :param feature_set: Features to be checked. See :ocv:enum:`cuda::FeatureSet`.
This function returns ``true`` if the device has the specified GPU feature. Otherwise, it returns ``false`` . This function returns ``true`` if the device has the specified CUDA feature. Otherwise, it returns ``false`` .
gpu::DeviceInfo::isCompatible cuda::DeviceInfo::isCompatible
----------------------------- ------------------------------
Checks the GPU module and device compatibility. Checks the CUDA module and device compatibility.
.. ocv:function:: bool gpu::DeviceInfo::isCompatible() .. ocv:function:: bool cuda::DeviceInfo::isCompatible()
This function returns ``true`` if the GPU module can be run on the specified device. Otherwise, it returns ``false`` . This function returns ``true`` if the CUDA module can be run on the specified device. Otherwise, it returns ``false`` .
gpu::DeviceInfo::deviceID cuda::DeviceInfo::deviceID
------------------------- --------------------------
Returns system index of the GPU device starting with 0. Returns system index of the CUDA device starting with 0.
.. ocv:function:: int gpu::DeviceInfo::deviceID() .. ocv:function:: int cuda::DeviceInfo::deviceID()

@ -1,21 +1,23 @@
GPU Module Introduction CUDA Module Introduction
======================= ========================
.. highlight:: cpp .. highlight:: cpp
General Information 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 CUDA module is a set of classes and functions to utilize CUDA computational capabilities. It is implemented using NVIDIA* CUDA* Runtime API and supports only NVIDIA GPUs. The OpenCV CUDA 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 CUDA 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. The CUDA module is designed as a host-level API. This means that if you have pre-compiled OpenCV CUDA binaries, you are not required to have the CUDA Toolkit installed or write any extra code to make use of the CUDA.
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. The OpenCV CUDA 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 CUDA module is an effective instrument for quick implementation of CUDA-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 CUDA module is built. Otherwise, the module is still built but at runtime all functions from the module throw
:ocv:class:`Exception` with ``CV_GpuNotSupported`` error code, except for :ocv:class:`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:`cuda::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. :ocv:func:`cuda::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.
Compilation for Different NVIDIA* Platforms Compilation for Different NVIDIA* Platforms
------------------------------------------- -------------------------------------------
@ -23,7 +25,7 @@ Compilation for Different NVIDIA* Platforms
NVIDIA* compiler enables generating binary code (cubin and fatbin) and intermediate code (PTX). Binary code often implies a specific GPU architecture and generation, so the compatibility with other GPUs is not guaranteed. PTX is targeted for a virtual platform that is defined entirely by the set of capabilities or features. Depending on the selected virtual platform, some of the instructions are emulated or disabled, even if the real hardware supports all the features. NVIDIA* compiler enables generating binary code (cubin and fatbin) and intermediate code (PTX). Binary code often implies a specific GPU architecture and generation, so the compatibility with other GPUs is not guaranteed. PTX is targeted for a virtual platform that is defined entirely by the set of capabilities or features. Depending on the selected virtual platform, some of the instructions are emulated or disabled, even if the real hardware supports all the features.
At the first call, the PTX code is compiled to binary code for the particular GPU using a JIT compiler. When the target GPU has a compute capability (CC) lower than the PTX code, JIT fails. At the first call, the PTX code is compiled to binary code for the particular GPU using a JIT compiler. When the target GPU has a compute capability (CC) lower than the PTX code, JIT fails.
By default, the OpenCV GPU module includes: By default, the OpenCV CUDA module includes:
* *
Binaries for compute capabilities 1.3 and 2.0 (controlled by ``CUDA_ARCH_BIN`` in ``CMake``) Binaries for compute capabilities 1.3 and 2.0 (controlled by ``CUDA_ARCH_BIN`` in ``CMake``)
@ -34,16 +36,16 @@ By default, the OpenCV GPU module includes:
This means that for devices with CC 1.3 and 2.0 binary images are ready to run. For all newer platforms, the PTX code for 1.3 is JIT'ed to a binary image. For devices with CC 1.1 and 1.2, the PTX for 1.1 is JIT'ed. For devices with CC 1.0, no code is available and the functions throw This means that for devices with CC 1.3 and 2.0 binary images are ready to run. For all newer platforms, the PTX code for 1.3 is JIT'ed to a binary image. For devices with CC 1.1 and 1.2, the PTX for 1.1 is JIT'ed. For devices with CC 1.0, no code is available and the functions throw
:ocv:class:`Exception`. For platforms where JIT compilation is performed first, the run is slow. :ocv:class:`Exception`. For platforms where JIT compilation is performed first, the run is slow.
On a GPU with CC 1.0, you can still compile the GPU module and most of the functions will run flawlessly. To achieve this, add "1.0" to the list of binaries, for example, ``CUDA_ARCH_BIN="1.0 1.3 2.0"`` . The functions that cannot be run on CC 1.0 GPUs throw an exception. On a GPU with CC 1.0, you can still compile the CUDA module and most of the functions will run flawlessly. To achieve this, add "1.0" to the list of binaries, for example, ``CUDA_ARCH_BIN="1.0 1.3 2.0"`` . The functions that cannot be run on CC 1.0 GPUs throw an exception.
You can always determine at runtime whether the OpenCV GPU-built binaries (or PTX code) are compatible with your GPU. The function You can always determine at runtime whether the OpenCV GPU-built binaries (or PTX code) are compatible with your GPU. The function
:ocv:func:`gpu::DeviceInfo::isCompatible` returns the compatibility status (true/false). :ocv:func:`cuda::DeviceInfo::isCompatible` returns the compatibility status (true/false).
Utilizing Multiple GPUs 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. In the current version, each of the OpenCV CUDA algorithms can use only a single GPU. So, to utilize multiple GPUs, you have to manually distribute the work between GPUs.
Switching active devie can be done using :ocv:func:`gpu::setDevice()` function. For more details please read Cuda C Programing Guide. Switching active devie can be done using :ocv:func:`cuda::setDevice()` function. For more details please read Cuda C Programing Guide.
While developing algorithms for multiple GPUs, note a data passing overhead. For primitive functions and small images, it can be significant, which may eliminate all the advantages of having multiple GPUs. But for high-level algorithms, consider using multi-GPU acceleration. For example, the Stereo Block Matching algorithm has been successfully parallelized using the following algorithm: While developing algorithms for multiple GPUs, note a data passing overhead. For primitive functions and small images, it can be significant, which may eliminate all the advantages of having multiple GPUs. But for high-level algorithms, consider using multi-GPU acceleration. For example, the Stereo Block Matching algorithm has been successfully parallelized using the following algorithm:
@ -56,7 +58,4 @@ While developing algorithms for multiple GPUs, note a data passing overhead. For
3. Merge the results into a single disparity map. 3. Merge the results into a single disparity map.
With this algorithm, a dual GPU gave a 180 With this algorithm, a dual GPU gave a 180% performance increase comparing to the single Fermi GPU. For a source code example, see http://code.opencv.org/projects/opencv/repository/revisions/master/entry/samples/gpu/.
%
performance increase comparing to the single Fermi GPU. For a source code example, see
http://code.opencv.org/projects/opencv/repository/revisions/master/entry/samples/gpu/.

@ -5,9 +5,9 @@ Object Detection
gpu::HOGDescriptor cuda::HOGDescriptor
------------------ -------------------
.. ocv:struct:: gpu::HOGDescriptor .. ocv:struct:: cuda::HOGDescriptor
The class implements Histogram of Oriented Gradients ([Dalal2005]_) object detector. :: The class implements Histogram of Oriented Gradients ([Dalal2005]_) object detector. ::
@ -65,15 +65,17 @@ Interfaces of all methods are kept similar to the ``CPU HOG`` descriptor and det
.. note:: .. note::
* An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/cpp/peopledetect.cpp * An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/cpp/peopledetect.cpp
* A GPU example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/gpu/hog.cpp * A CUDA example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/gpu/hog.cpp
* (Python) An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/python2/peopledetect.py * (Python) An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/python2/peopledetect.py
gpu::HOGDescriptor::HOGDescriptor
-------------------------------------
cuda::HOGDescriptor::HOGDescriptor
----------------------------------
Creates the ``HOG`` descriptor and detector. Creates the ``HOG`` descriptor and detector.
.. ocv:function:: gpu::HOGDescriptor::HOGDescriptor(Size win_size=Size(64, 128), Size block_size=Size(16, 16), Size block_stride=Size(8, 8), Size cell_size=Size(8, 8), int nbins=9, double win_sigma=DEFAULT_WIN_SIGMA, double threshold_L2hys=0.2, bool gamma_correction=true, int nlevels=DEFAULT_NLEVELS) .. ocv:function:: cuda::HOGDescriptor::HOGDescriptor(Size win_size=Size(64, 128), Size block_size=Size(16, 16), Size block_stride=Size(8, 8), Size cell_size=Size(8, 8), int nbins=9, double win_sigma=DEFAULT_WIN_SIGMA, double threshold_L2hys=0.2, bool gamma_correction=true, int nlevels=DEFAULT_NLEVELS)
:param win_size: Detection window size. Align to block size and block stride. :param win_size: Detection window size. Align to block size and block stride.
@ -95,59 +97,59 @@ Creates the ``HOG`` descriptor and detector.
gpu::HOGDescriptor::getDescriptorSize cuda::HOGDescriptor::getDescriptorSize
----------------------------------------- --------------------------------------
Returns the number of coefficients required for the classification. Returns the number of coefficients required for the classification.
.. ocv:function:: size_t gpu::HOGDescriptor::getDescriptorSize() const .. ocv:function:: size_t cuda::HOGDescriptor::getDescriptorSize() const
gpu::HOGDescriptor::getBlockHistogramSize cuda::HOGDescriptor::getBlockHistogramSize
--------------------------------------------- ------------------------------------------
Returns the block histogram size. Returns the block histogram size.
.. ocv:function:: size_t gpu::HOGDescriptor::getBlockHistogramSize() const .. ocv:function:: size_t cuda::HOGDescriptor::getBlockHistogramSize() const
gpu::HOGDescriptor::setSVMDetector cuda::HOGDescriptor::setSVMDetector
-------------------------------------- -----------------------------------
Sets coefficients for the linear SVM classifier. Sets coefficients for the linear SVM classifier.
.. ocv:function:: void gpu::HOGDescriptor::setSVMDetector(const vector<float>& detector) .. ocv:function:: void cuda::HOGDescriptor::setSVMDetector(const vector<float>& detector)
gpu::HOGDescriptor::getDefaultPeopleDetector cuda::HOGDescriptor::getDefaultPeopleDetector
------------------------------------------------ ---------------------------------------------
Returns coefficients of the classifier trained for people detection (for default window size). Returns coefficients of the classifier trained for people detection (for default window size).
.. ocv:function:: static vector<float> gpu::HOGDescriptor::getDefaultPeopleDetector() .. ocv:function:: static vector<float> cuda::HOGDescriptor::getDefaultPeopleDetector()
gpu::HOGDescriptor::getPeopleDetector48x96 cuda::HOGDescriptor::getPeopleDetector48x96
---------------------------------------------- -------------------------------------------
Returns coefficients of the classifier trained for people detection (for 48x96 windows). Returns coefficients of the classifier trained for people detection (for 48x96 windows).
.. ocv:function:: static vector<float> gpu::HOGDescriptor::getPeopleDetector48x96() .. ocv:function:: static vector<float> cuda::HOGDescriptor::getPeopleDetector48x96()
gpu::HOGDescriptor::getPeopleDetector64x128 cuda::HOGDescriptor::getPeopleDetector64x128
----------------------------------------------- --------------------------------------------
Returns coefficients of the classifier trained for people detection (for 64x128 windows). Returns coefficients of the classifier trained for people detection (for 64x128 windows).
.. ocv:function:: static vector<float> gpu::HOGDescriptor::getPeopleDetector64x128() .. ocv:function:: static vector<float> cuda::HOGDescriptor::getPeopleDetector64x128()
gpu::HOGDescriptor::detect cuda::HOGDescriptor::detect
------------------------------ ---------------------------
Performs object detection without a multi-scale window. Performs object detection without a multi-scale window.
.. ocv:function:: void gpu::HOGDescriptor::detect(const GpuMat& img, vector<Point>& found_locations, double hit_threshold=0, Size win_stride=Size(), Size padding=Size()) .. ocv:function:: void cuda::HOGDescriptor::detect(const GpuMat& img, vector<Point>& found_locations, double hit_threshold=0, Size win_stride=Size(), Size padding=Size())
:param img: Source image. ``CV_8UC1`` and ``CV_8UC4`` types are supported for now. :param img: Source image. ``CV_8UC1`` and ``CV_8UC4`` types are supported for now.
@ -161,17 +163,17 @@ Performs object detection without a multi-scale window.
gpu::HOGDescriptor::detectMultiScale cuda::HOGDescriptor::detectMultiScale
---------------------------------------- -------------------------------------
Performs object detection with a multi-scale window. Performs object detection with a multi-scale window.
.. ocv:function:: void gpu::HOGDescriptor::detectMultiScale(const GpuMat& img, vector<Rect>& found_locations, double hit_threshold=0, Size win_stride=Size(), Size padding=Size(), double scale0=1.05, int group_threshold=2) .. ocv:function:: void cuda::HOGDescriptor::detectMultiScale(const GpuMat& img, vector<Rect>& found_locations, double hit_threshold=0, Size win_stride=Size(), Size padding=Size(), double scale0=1.05, int group_threshold=2)
:param img: Source image. See :ocv:func:`gpu::HOGDescriptor::detect` for type limitations. :param img: Source image. See :ocv:func:`cuda::HOGDescriptor::detect` for type limitations.
:param found_locations: Detected objects boundaries. :param found_locations: Detected objects boundaries.
:param hit_threshold: Threshold for the distance between features and SVM classifying plane. See :ocv:func:`gpu::HOGDescriptor::detect` for details. :param hit_threshold: Threshold for the distance between features and SVM classifying plane. See :ocv:func:`cuda::HOGDescriptor::detect` for details.
:param win_stride: Window stride. It must be a multiple of block stride. :param win_stride: Window stride. It must be a multiple of block stride.
@ -183,13 +185,13 @@ Performs object detection with a multi-scale window.
gpu::HOGDescriptor::getDescriptors cuda::HOGDescriptor::getDescriptors
-------------------------------------- -----------------------------------
Returns block descriptors computed for the whole image. Returns block descriptors computed for the whole image.
.. ocv:function:: void gpu::HOGDescriptor::getDescriptors(const GpuMat& img, Size win_stride, GpuMat& descriptors, int descr_format=DESCR_FORMAT_COL_BY_COL) .. ocv:function:: void cuda::HOGDescriptor::getDescriptors(const GpuMat& img, Size win_stride, GpuMat& descriptors, int descr_format=DESCR_FORMAT_COL_BY_COL)
:param img: Source image. See :ocv:func:`gpu::HOGDescriptor::detect` for type limitations. :param img: Source image. See :ocv:func:`cuda::HOGDescriptor::detect` for type limitations.
:param win_stride: Window stride. It must be a multiple of block stride. :param win_stride: Window stride. It must be a multiple of block stride.
@ -204,18 +206,19 @@ Returns block descriptors computed for the whole image.
The function is mainly used to learn the classifier. The function is mainly used to learn the classifier.
gpu::CascadeClassifier_GPU
-------------------------- cuda::CascadeClassifier_CUDA
.. ocv:class:: gpu::CascadeClassifier_GPU ----------------------------
.. ocv:class:: cuda::CascadeClassifier_CUDA
Cascade classifier class used for object detection. Supports HAAR and LBP cascades. :: Cascade classifier class used for object detection. Supports HAAR and LBP cascades. ::
class CV_EXPORTS CascadeClassifier_GPU class CV_EXPORTS CascadeClassifier_CUDA
{ {
public: public:
CascadeClassifier_GPU(); CascadeClassifier_CUDA();
CascadeClassifier_GPU(const String& filename); CascadeClassifier_CUDA(const String& filename);
~CascadeClassifier_GPU(); ~CascadeClassifier_CUDA();
bool empty() const; bool empty() const;
bool load(const String& filename); bool load(const String& filename);
@ -239,48 +242,51 @@ Cascade classifier class used for object detection. Supports HAAR and LBP cascad
* A cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier.cpp * A cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier.cpp
* A Nvidea API specific cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier_nvidia_api.cpp * A Nvidea API specific cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier_nvidia_api.cpp
gpu::CascadeClassifier_GPU::CascadeClassifier_GPU
-----------------------------------------------------
cuda::CascadeClassifier_CUDA::CascadeClassifier_CUDA
----------------------------------------------------
Loads the classifier from a file. Cascade type is detected automatically by constructor parameter. Loads the classifier from a file. Cascade type is detected automatically by constructor parameter.
.. ocv:function:: gpu::CascadeClassifier_GPU::CascadeClassifier_GPU(const String& filename) .. ocv:function:: cuda::CascadeClassifier_CUDA::CascadeClassifier_CUDA(const String& filename)
:param filename: Name of the file from which the classifier is loaded. Only the old ``haar`` classifier (trained by the ``haar`` training application) and NVIDIA's ``nvbin`` are supported for HAAR and only new type of OpenCV XML cascade supported for LBP. :param filename: Name of the file from which the classifier is loaded. Only the old ``haar`` classifier (trained by the ``haar`` training application) and NVIDIA's ``nvbin`` are supported for HAAR and only new type of OpenCV XML cascade supported for LBP.
gpu::CascadeClassifier_GPU::empty cuda::CascadeClassifier_CUDA::empty
------------------------------------- -----------------------------------
Checks whether the classifier is loaded or not. Checks whether the classifier is loaded or not.
.. ocv:function:: bool gpu::CascadeClassifier_GPU::empty() const .. ocv:function:: bool cuda::CascadeClassifier_CUDA::empty() const
gpu::CascadeClassifier_GPU::load cuda::CascadeClassifier_CUDA::load
------------------------------------ ----------------------------------
Loads the classifier from a file. The previous content is destroyed. Loads the classifier from a file. The previous content is destroyed.
.. ocv:function:: bool gpu::CascadeClassifier_GPU::load(const String& filename) .. ocv:function:: bool cuda::CascadeClassifier_CUDA::load(const String& filename)
:param filename: Name of the file from which the classifier is loaded. Only the old ``haar`` classifier (trained by the ``haar`` training application) and NVIDIA's ``nvbin`` are supported for HAAR and only new type of OpenCV XML cascade supported for LBP. :param filename: Name of the file from which the classifier is loaded. Only the old ``haar`` classifier (trained by the ``haar`` training application) and NVIDIA's ``nvbin`` are supported for HAAR and only new type of OpenCV XML cascade supported for LBP.
gpu::CascadeClassifier_GPU::release
--------------------------------------- cuda::CascadeClassifier_CUDA::release
-------------------------------------
Destroys the loaded classifier. Destroys the loaded classifier.
.. ocv:function:: void gpu::CascadeClassifier_GPU::release() .. ocv:function:: void cuda::CascadeClassifier_CUDA::release()
gpu::CascadeClassifier_GPU::detectMultiScale cuda::CascadeClassifier_CUDA::detectMultiScale
------------------------------------------------ ----------------------------------------------
Detects objects of different sizes in the input image. Detects objects of different sizes in the input image.
.. ocv:function:: int gpu::CascadeClassifier_GPU::detectMultiScale(const GpuMat& image, GpuMat& objectsBuf, double scaleFactor=1.2, int minNeighbors=4, Size minSize=Size()) .. ocv:function:: int cuda::CascadeClassifier_CUDA::detectMultiScale(const GpuMat& image, GpuMat& objectsBuf, double scaleFactor=1.2, int minNeighbors=4, Size minSize=Size())
.. ocv:function:: int gpu::CascadeClassifier_GPU::detectMultiScale(const GpuMat& image, GpuMat& objectsBuf, Size maxObjectSize, Size minSize = Size(), double scaleFactor = 1.1, int minNeighbors = 4) .. ocv:function:: int cuda::CascadeClassifier_CUDA::detectMultiScale(const GpuMat& image, GpuMat& objectsBuf, Size maxObjectSize, Size minSize = Size(), double scaleFactor = 1.1, int minNeighbors = 4)
:param image: Matrix of type ``CV_8U`` containing an image where objects should be detected. :param image: Matrix of type ``CV_8U`` containing an image where objects should be detected.
@ -298,7 +304,7 @@ The detected objects are returned as a list of rectangles.
The function returns the number of detected objects, so you can retrieve them as in the following example: :: The function returns the number of detected objects, so you can retrieve them as in the following example: ::
gpu::CascadeClassifier_GPU cascade_gpu(...); cuda::CascadeClassifier_CUDA cascade_gpu(...);
Mat image_cpu = imread(...) Mat image_cpu = imread(...)
GpuMat image_gpu(image_cpu); GpuMat image_gpu(image_cpu);

@ -5,11 +5,11 @@ Arithm Operations on Matrices
gpu::gemm cuda::gemm
--------- ----------
Performs generalized matrix multiplication. Performs generalized matrix multiplication.
.. ocv:function:: void gpu::gemm(InputArray src1, InputArray src2, double alpha, InputArray src3, double beta, OutputArray dst, int flags = 0, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::gemm(InputArray src1, InputArray src2, double alpha, InputArray src3, double beta, OutputArray dst, int flags = 0, Stream& stream = Stream::Null())
:param src1: First multiplied input matrix that should have ``CV_32FC1`` , ``CV_64FC1`` , ``CV_32FC2`` , or ``CV_64FC2`` type. :param src1: First multiplied input matrix that should have ``CV_32FC1`` , ``CV_64FC1`` , ``CV_32FC2`` , or ``CV_64FC2`` type.
@ -43,11 +43,11 @@ The function performs generalized matrix multiplication similar to the ``gemm``
gpu::mulSpectrums cuda::mulSpectrums
----------------- ------------------
Performs a per-element multiplication of two Fourier spectrums. Performs a per-element multiplication of two Fourier spectrums.
.. ocv:function:: void gpu::mulSpectrums(InputArray src1, InputArray src2, OutputArray dst, int flags, bool conjB=false, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::mulSpectrums(InputArray src1, InputArray src2, OutputArray dst, int flags, bool conjB=false, Stream& stream = Stream::Null())
:param src1: First spectrum. :param src1: First spectrum.
@ -55,7 +55,7 @@ Performs a per-element multiplication of two Fourier spectrums.
:param dst: Destination spectrum. :param dst: Destination spectrum.
:param flags: Mock parameter used for CPU/GPU interfaces similarity. :param flags: Mock parameter used for CPU/CUDA interfaces similarity.
:param conjB: Optional flag to specify if the second spectrum needs to be conjugated before the multiplication. :param conjB: Optional flag to specify if the second spectrum needs to be conjugated before the multiplication.
@ -67,11 +67,11 @@ Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format
gpu::mulAndScaleSpectrums cuda::mulAndScaleSpectrums
------------------------- --------------------------
Performs a per-element multiplication of two Fourier spectrums and scales the result. Performs a per-element multiplication of two Fourier spectrums and scales the result.
.. ocv:function:: void gpu::mulAndScaleSpectrums(InputArray src1, InputArray src2, OutputArray dst, int flags, float scale, bool conjB=false, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::mulAndScaleSpectrums(InputArray src1, InputArray src2, OutputArray dst, int flags, float scale, bool conjB=false, Stream& stream = Stream::Null())
:param src1: First spectrum. :param src1: First spectrum.
@ -79,7 +79,7 @@ Performs a per-element multiplication of two Fourier spectrums and scales the re
:param dst: Destination spectrum. :param dst: Destination spectrum.
:param flags: Mock parameter used for CPU/GPU interfaces similarity. :param flags: Mock parameter used for CPU/CUDA interfaces similarity.
:param scale: Scale constant. :param scale: Scale constant.
@ -91,11 +91,11 @@ Only full (not packed) ``CV_32FC2`` complex spectrums in the interleaved format
gpu::dft cuda::dft
-------- ---------
Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix. Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix.
.. ocv:function:: void gpu::dft(InputArray src, OutputArray dst, Size dft_size, int flags=0, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::dft(InputArray src, OutputArray dst, Size dft_size, int flags=0, Stream& stream = Stream::Null())
:param src: Source matrix (real or complex). :param src: Source matrix (real or complex).
@ -127,9 +127,9 @@ The source matrix should be continuous, otherwise reallocation and data copying
gpu::Convolution cuda::Convolution
---------------- -----------------
.. ocv:class:: gpu::Convolution : public Algorithm .. ocv:class:: cuda::Convolution : public Algorithm
Base class for convolution (or cross-correlation) operator. :: Base class for convolution (or cross-correlation) operator. ::
@ -141,11 +141,11 @@ Base class for convolution (or cross-correlation) operator. ::
gpu::Convolution::convolve cuda::Convolution::convolve
--------------------------- ---------------------------
Computes a convolution (or cross-correlation) of two images. Computes a convolution (or cross-correlation) of two images.
.. ocv:function:: void gpu::Convolution::convolve(InputArray image, InputArray templ, OutputArray result, bool ccorr = false, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::Convolution::convolve(InputArray image, InputArray templ, OutputArray result, bool ccorr = false, Stream& stream = Stream::Null())
:param image: Source image. Only ``CV_32FC1`` images are supported for now. :param image: Source image. Only ``CV_32FC1`` images are supported for now.
@ -159,9 +159,9 @@ Computes a convolution (or cross-correlation) of two images.
gpu::createConvolution cuda::createConvolution
---------------------- -----------------------
Creates implementation for :ocv:class:`gpu::Convolution` . Creates implementation for :ocv:class:`cuda::Convolution` .
.. ocv:function:: Ptr<Convolution> createConvolution(Size user_block_size = Size()) .. ocv:function:: Ptr<Convolution> createConvolution(Size user_block_size = Size())

@ -5,13 +5,13 @@ Core Operations on Matrices
gpu::merge cuda::merge
---------- -----------
Makes a multi-channel matrix out of several single-channel matrices. Makes a multi-channel matrix out of several single-channel matrices.
.. ocv:function:: void gpu::merge(const GpuMat* src, size_t n, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::merge(const GpuMat* src, size_t n, OutputArray dst, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::merge(const std::vector<GpuMat>& src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::merge(const std::vector<GpuMat>& src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Array/vector of source matrices. :param src: Array/vector of source matrices.
@ -25,13 +25,13 @@ Makes a multi-channel matrix out of several single-channel matrices.
gpu::split cuda::split
---------- -----------
Copies each plane of a multi-channel matrix into an array. Copies each plane of a multi-channel matrix into an array.
.. ocv:function:: void gpu::split(InputArray src, GpuMat* dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::split(InputArray src, GpuMat* dst, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::split(InputArray src, vector<GpuMat>& dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::split(InputArray src, vector<GpuMat>& dst, Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -43,11 +43,11 @@ Copies each plane of a multi-channel matrix into an array.
gpu::transpose cuda::transpose
-------------- ---------------
Transposes a matrix. Transposes a matrix.
.. ocv:function:: void gpu::transpose(InputArray src1, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::transpose(InputArray src1, OutputArray dst, Stream& stream = Stream::Null())
:param src1: Source matrix. 1-, 4-, 8-byte element sizes are supported for now. :param src1: Source matrix. 1-, 4-, 8-byte element sizes are supported for now.
@ -59,11 +59,11 @@ Transposes a matrix.
gpu::flip cuda::flip
--------- ----------
Flips a 2D matrix around vertical, horizontal, or both axes. Flips a 2D matrix around vertical, horizontal, or both axes.
.. ocv:function:: void gpu::flip(InputArray src, OutputArray dst, int flipCode, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::flip(InputArray src, OutputArray dst, int flipCode, Stream& stream = Stream::Null())
:param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U``, ``CV_16U``, ``CV_32S`` or ``CV_32F`` depth. :param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U``, ``CV_16U``, ``CV_32S`` or ``CV_32F`` depth.
@ -83,9 +83,9 @@ Flips a 2D matrix around vertical, horizontal, or both axes.
gpu::LookUpTable cuda::LookUpTable
---------------- -----------------
.. ocv:class:: gpu::LookUpTable : public Algorithm .. ocv:class:: cuda::LookUpTable : public Algorithm
Base class for transform using lookup table. :: Base class for transform using lookup table. ::
@ -99,11 +99,11 @@ Base class for transform using lookup table. ::
gpu::LookUpTable::transform cuda::LookUpTable::transform
--------------------------- ----------------------------
Transforms the source matrix into the destination matrix using the given look-up table: ``dst(I) = lut(src(I))`` . Transforms the source matrix into the destination matrix using the given look-up table: ``dst(I) = lut(src(I))`` .
.. ocv:function:: void gpu::LookUpTable::transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::LookUpTable::transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. ``CV_8UC1`` and ``CV_8UC3`` matrices are supported for now. :param src: Source matrix. ``CV_8UC1`` and ``CV_8UC3`` matrices are supported for now.
@ -113,9 +113,9 @@ Transforms the source matrix into the destination matrix using the given look-up
gpu::createLookUpTable cuda::createLookUpTable
---------------------- -----------------------
Creates implementation for :ocv:class:`gpu::LookUpTable` . Creates implementation for :ocv:class:`cuda::LookUpTable` .
.. ocv:function:: Ptr<LookUpTable> createLookUpTable(InputArray lut) .. ocv:function:: Ptr<LookUpTable> createLookUpTable(InputArray lut)
@ -123,11 +123,11 @@ Creates implementation for :ocv:class:`gpu::LookUpTable` .
gpu::copyMakeBorder cuda::copyMakeBorder
----------------------- --------------------
Forms a border around an image. Forms a border around an image.
.. ocv:function:: void gpu::copyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::copyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, Scalar value = Scalar(), Stream& stream = Stream::Null())
:param src: Source image. ``CV_8UC1`` , ``CV_8UC4`` , ``CV_32SC1`` , and ``CV_32FC1`` types are supported. :param src: Source image. ``CV_8UC1`` , ``CV_8UC4`` , ``CV_32SC1`` , and ``CV_32FC1`` types are supported.

@ -1,6 +1,6 @@
************************************************* ***************************************************
gpuarithm. GPU-accelerated Operations on Matrices cudaarithm. CUDA-accelerated Operations on Matrices
************************************************* ***************************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -5,11 +5,11 @@ Per-element Operations
gpu::add cuda::add
-------- ---------
Computes a matrix-matrix or matrix-scalar sum. Computes a matrix-matrix or matrix-scalar sum.
.. ocv:function:: void gpu::add(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::add(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -27,11 +27,11 @@ Computes a matrix-matrix or matrix-scalar sum.
gpu::subtract cuda::subtract
------------- --------------
Computes a matrix-matrix or matrix-scalar difference. Computes a matrix-matrix or matrix-scalar difference.
.. ocv:function:: void gpu::subtract(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::subtract(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), int dtype = -1, Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -49,11 +49,11 @@ Computes a matrix-matrix or matrix-scalar difference.
gpu::multiply cuda::multiply
------------- --------------
Computes a matrix-matrix or matrix-scalar per-element product. Computes a matrix-matrix or matrix-scalar per-element product.
.. ocv:function:: void gpu::multiply(InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::multiply(InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -71,13 +71,13 @@ Computes a matrix-matrix or matrix-scalar per-element product.
gpu::divide cuda::divide
----------- ------------
Computes a matrix-matrix or matrix-scalar division. Computes a matrix-matrix or matrix-scalar division.
.. ocv:function:: void gpu::divide(InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::divide(InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::divide(double src1, InputArray src2, OutputArray dst, int dtype = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::divide(double src1, InputArray src2, OutputArray dst, int dtype = -1, Stream& stream = Stream::Null())
:param src1: First source matrix or a scalar. :param src1: First source matrix or a scalar.
@ -97,11 +97,11 @@ This function, in contrast to :ocv:func:`divide`, uses a round-down rounding mod
gpu::absdiff cuda::absdiff
------------ -------------
Computes per-element absolute difference of two matrices (or of a matrix and scalar). Computes per-element absolute difference of two matrices (or of a matrix and scalar).
.. ocv:function:: void gpu::absdiff(InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::absdiff(InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -115,11 +115,11 @@ Computes per-element absolute difference of two matrices (or of a matrix and sca
gpu::abs cuda::abs
-------- ---------
Computes an absolute value of each matrix element. Computes an absolute value of each matrix element.
.. ocv:function:: void gpu::abs(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::abs(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -131,11 +131,11 @@ Computes an absolute value of each matrix element.
gpu::sqr cuda::sqr
-------- ---------
Computes a square value of each matrix element. Computes a square value of each matrix element.
.. ocv:function:: void gpu::sqr(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::sqr(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -145,11 +145,11 @@ Computes a square value of each matrix element.
gpu::sqrt cuda::sqrt
--------- ----------
Computes a square root of each matrix element. Computes a square root of each matrix element.
.. ocv:function:: void gpu::sqrt(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::sqrt(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -161,11 +161,11 @@ Computes a square root of each matrix element.
gpu::exp cuda::exp
-------- ---------
Computes an exponent of each matrix element. Computes an exponent of each matrix element.
.. ocv:function:: void gpu::exp(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::exp(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -177,11 +177,11 @@ Computes an exponent of each matrix element.
gpu::log cuda::log
-------- ---------
Computes a natural logarithm of absolute value of each matrix element. Computes a natural logarithm of absolute value of each matrix element.
.. ocv:function:: void gpu::log(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::log(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -193,11 +193,11 @@ Computes a natural logarithm of absolute value of each matrix element.
gpu::pow cuda::pow
-------- ---------
Raises every matrix element to a power. Raises every matrix element to a power.
.. ocv:function:: void gpu::pow(InputArray src, double power, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::pow(InputArray src, double power, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -217,11 +217,11 @@ The function ``pow`` raises every element of the input matrix to ``power`` :
gpu::compare cuda::compare
------------ -------------
Compares elements of two matrices (or of a matrix and scalar). Compares elements of two matrices (or of a matrix and scalar).
.. ocv:function:: void gpu::compare(InputArray src1, InputArray src2, OutputArray dst, int cmpop, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::compare(InputArray src1, InputArray src2, OutputArray dst, int cmpop, Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -244,11 +244,11 @@ Compares elements of two matrices (or of a matrix and scalar).
gpu::bitwise_not cuda::bitwise_not
---------------- -----------------
Performs a per-element bitwise inversion. Performs a per-element bitwise inversion.
.. ocv:function:: void gpu::bitwise_not(InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::bitwise_not(InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null())
:param src: Source matrix. :param src: Source matrix.
@ -260,11 +260,11 @@ Performs a per-element bitwise inversion.
gpu::bitwise_or cuda::bitwise_or
--------------- ----------------
Performs a per-element bitwise disjunction of two matrices (or of matrix and scalar). Performs a per-element bitwise disjunction of two matrices (or of matrix and scalar).
.. ocv:function:: void gpu::bitwise_or(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::bitwise_or(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -278,11 +278,11 @@ Performs a per-element bitwise disjunction of two matrices (or of matrix and sca
gpu::bitwise_and cuda::bitwise_and
---------------- -----------------
Performs a per-element bitwise conjunction of two matrices (or of matrix and scalar). Performs a per-element bitwise conjunction of two matrices (or of matrix and scalar).
.. ocv:function:: void gpu::bitwise_and(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::bitwise_and(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -296,11 +296,11 @@ Performs a per-element bitwise conjunction of two matrices (or of matrix and sca
gpu::bitwise_xor cuda::bitwise_xor
---------------- -----------------
Performs a per-element bitwise ``exclusive or`` operation of two matrices (or of matrix and scalar). Performs a per-element bitwise ``exclusive or`` operation of two matrices (or of matrix and scalar).
.. ocv:function:: void gpu::bitwise_xor(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::bitwise_xor(InputArray src1, InputArray src2, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -314,11 +314,11 @@ Performs a per-element bitwise ``exclusive or`` operation of two matrices (or of
gpu::rshift cuda::rshift
----------- ------------
Performs pixel by pixel right shift of an image by a constant value. Performs pixel by pixel right shift of an image by a constant value.
.. ocv:function:: void gpu::rshift(InputArray src, Scalar_<int> val, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::rshift(InputArray src, Scalar_<int> val, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. Supports 1, 3 and 4 channels images with integers elements. :param src: Source matrix. Supports 1, 3 and 4 channels images with integers elements.
@ -330,11 +330,11 @@ Performs pixel by pixel right shift of an image by a constant value.
gpu::lshift cuda::lshift
----------- ------------
Performs pixel by pixel right left of an image by a constant value. Performs pixel by pixel right left of an image by a constant value.
.. ocv:function:: void gpu::lshift(InputArray src, Scalar_<int> val, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::lshift(InputArray src, Scalar_<int> val, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U`` , ``CV_16U`` or ``CV_32S`` depth. :param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U`` , ``CV_16U`` or ``CV_32S`` depth.
@ -346,11 +346,11 @@ Performs pixel by pixel right left of an image by a constant value.
gpu::min cuda::min
-------- ---------
Computes the per-element minimum of two matrices (or a matrix and a scalar). Computes the per-element minimum of two matrices (or a matrix and a scalar).
.. ocv:function:: void gpu::min(InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::min(InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -364,11 +364,11 @@ Computes the per-element minimum of two matrices (or a matrix and a scalar).
gpu::max cuda::max
-------- ---------
Computes the per-element maximum of two matrices (or a matrix and a scalar). Computes the per-element maximum of two matrices (or a matrix and a scalar).
.. ocv:function:: void gpu::max(InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::max(InputArray src1, InputArray src2, OutputArray dst, Stream& stream = Stream::Null())
:param src1: First source matrix or scalar. :param src1: First source matrix or scalar.
@ -382,11 +382,11 @@ Computes the per-element maximum of two matrices (or a matrix and a scalar).
gpu::addWeighted cuda::addWeighted
---------------- -----------------
Computes the weighted sum of two arrays. Computes the weighted sum of two arrays.
.. ocv:function:: void gpu::addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype = -1, Stream& stream = Stream::Null())
:param src1: First source array. :param src1: First source array.
@ -416,11 +416,11 @@ where ``I`` is a multi-dimensional index of array elements. In case of multi-cha
gpu::threshold cuda::threshold
-------------- ---------------
Applies a fixed-level threshold to each array element. Applies a fixed-level threshold to each array element.
.. ocv:function:: double gpu::threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type, Stream& stream = Stream::Null()) .. ocv:function:: double cuda::threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type, Stream& stream = Stream::Null())
:param src: Source array (single-channel). :param src: Source array (single-channel).
@ -438,13 +438,13 @@ Applies a fixed-level threshold to each array element.
gpu::magnitude cuda::magnitude
-------------- ---------------
Computes magnitudes of complex matrix elements. Computes magnitudes of complex matrix elements.
.. ocv:function:: void gpu::magnitude(InputArray xy, OutputArray magnitude, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::magnitude(InputArray xy, OutputArray magnitude, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::magnitude(InputArray x, InputArray y, OutputArray magnitude, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::magnitude(InputArray x, InputArray y, OutputArray magnitude, Stream& stream = Stream::Null())
:param xy: Source complex matrix in the interleaved format ( ``CV_32FC2`` ). :param xy: Source complex matrix in the interleaved format ( ``CV_32FC2`` ).
@ -460,13 +460,13 @@ Computes magnitudes of complex matrix elements.
gpu::magnitudeSqr cuda::magnitudeSqr
----------------- ------------------
Computes squared magnitudes of complex matrix elements. Computes squared magnitudes of complex matrix elements.
.. ocv:function:: void gpu::magnitudeSqr(InputArray xy, OutputArray magnitude, Stream& stream=Stream::Null() ) .. ocv:function:: void cuda::magnitudeSqr(InputArray xy, OutputArray magnitude, Stream& stream=Stream::Null() )
.. ocv:function:: void gpu::magnitudeSqr(InputArray x, InputArray y, OutputArray magnitude, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::magnitudeSqr(InputArray x, InputArray y, OutputArray magnitude, Stream& stream = Stream::Null())
:param xy: Source complex matrix in the interleaved format ( ``CV_32FC2`` ). :param xy: Source complex matrix in the interleaved format ( ``CV_32FC2`` ).
@ -480,11 +480,11 @@ Computes squared magnitudes of complex matrix elements.
gpu::phase cuda::phase
---------- -----------
Computes polar angles of complex matrix elements. Computes polar angles of complex matrix elements.
.. ocv:function:: void gpu::phase(InputArray x, InputArray y, OutputArray angle, bool angleInDegrees = false, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::phase(InputArray x, InputArray y, OutputArray angle, bool angleInDegrees = false, Stream& stream = Stream::Null())
:param x: Source matrix containing real components ( ``CV_32FC1`` ). :param x: Source matrix containing real components ( ``CV_32FC1`` ).
@ -500,11 +500,11 @@ Computes polar angles of complex matrix elements.
gpu::cartToPolar cuda::cartToPolar
---------------- -----------------
Converts Cartesian coordinates into polar. Converts Cartesian coordinates into polar.
.. ocv:function:: void gpu::cartToPolar(InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees = false, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::cartToPolar(InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees = false, Stream& stream = Stream::Null())
:param x: Source matrix containing real components ( ``CV_32FC1`` ). :param x: Source matrix containing real components ( ``CV_32FC1`` ).
@ -522,11 +522,11 @@ Converts Cartesian coordinates into polar.
gpu::polarToCart cuda::polarToCart
---------------- -----------------
Converts polar coordinates into Cartesian. Converts polar coordinates into Cartesian.
.. ocv:function:: void gpu::polarToCart(InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees = false, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::polarToCart(InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees = false, Stream& stream = Stream::Null())
:param magnitude: Source matrix containing magnitudes ( ``CV_32FC1`` ). :param magnitude: Source matrix containing magnitudes ( ``CV_32FC1`` ).

@ -5,17 +5,17 @@ Matrix Reductions
gpu::norm cuda::norm
--------- ----------
Returns the norm of a matrix (or difference of two matrices). Returns the norm of a matrix (or difference of two matrices).
.. ocv:function:: double gpu::norm(InputArray src1, int normType) .. ocv:function:: double cuda::norm(InputArray src1, int normType)
.. ocv:function:: double gpu::norm(InputArray src1, int normType, GpuMat& buf) .. ocv:function:: double cuda::norm(InputArray src1, int normType, GpuMat& buf)
.. ocv:function:: double gpu::norm(InputArray src1, int normType, InputArray mask, GpuMat& buf) .. ocv:function:: double cuda::norm(InputArray src1, int normType, InputArray mask, GpuMat& buf)
.. ocv:function:: double gpu::norm(InputArray src1, InputArray src2, int normType=NORM_L2) .. ocv:function:: double cuda::norm(InputArray src1, InputArray src2, int normType=NORM_L2)
:param src1: Source matrix. Any matrices except 64F are supported. :param src1: Source matrix. Any matrices except 64F are supported.
@ -31,15 +31,15 @@ Returns the norm of a matrix (or difference of two matrices).
gpu::sum cuda::sum
-------- ---------
Returns the sum of matrix elements. Returns the sum of matrix elements.
.. ocv:function:: Scalar gpu::sum(InputArray src) .. ocv:function:: Scalar cuda::sum(InputArray src)
.. ocv:function:: Scalar gpu::sum(InputArray src, GpuMat& buf) .. ocv:function:: Scalar cuda::sum(InputArray src, GpuMat& buf)
.. ocv:function:: Scalar gpu::sum(InputArray src, InputArray mask, GpuMat& buf) .. ocv:function:: Scalar cuda::sum(InputArray src, InputArray mask, GpuMat& buf)
:param src: Source image of any depth except for ``CV_64F`` . :param src: Source image of any depth except for ``CV_64F`` .
@ -51,15 +51,15 @@ Returns the sum of matrix elements.
gpu::absSum cuda::absSum
----------- ------------
Returns the sum of absolute values for matrix elements. Returns the sum of absolute values for matrix elements.
.. ocv:function:: Scalar gpu::absSum(InputArray src) .. ocv:function:: Scalar cuda::absSum(InputArray src)
.. ocv:function:: Scalar gpu::absSum(InputArray src, GpuMat& buf) .. ocv:function:: Scalar cuda::absSum(InputArray src, GpuMat& buf)
.. ocv:function:: Scalar gpu::absSum(InputArray src, InputArray mask, GpuMat& buf) .. ocv:function:: Scalar cuda::absSum(InputArray src, InputArray mask, GpuMat& buf)
:param src: Source image of any depth except for ``CV_64F`` . :param src: Source image of any depth except for ``CV_64F`` .
@ -69,15 +69,15 @@ Returns the sum of absolute values for matrix elements.
gpu::sqrSum cuda::sqrSum
----------- ------------
Returns the squared sum of matrix elements. Returns the squared sum of matrix elements.
.. ocv:function:: Scalar gpu::sqrSum(InputArray src) .. ocv:function:: Scalar cuda::sqrSum(InputArray src)
.. ocv:function:: Scalar gpu::sqrSum(InputArray src, GpuMat& buf) .. ocv:function:: Scalar cuda::sqrSum(InputArray src, GpuMat& buf)
.. ocv:function:: Scalar gpu::sqrSum(InputArray src, InputArray mask, GpuMat& buf) .. ocv:function:: Scalar cuda::sqrSum(InputArray src, InputArray mask, GpuMat& buf)
:param src: Source image of any depth except for ``CV_64F`` . :param src: Source image of any depth except for ``CV_64F`` .
@ -87,13 +87,13 @@ Returns the squared sum of matrix elements.
gpu::minMax cuda::minMax
----------- ------------
Finds global minimum and maximum matrix elements and returns their values. Finds global minimum and maximum matrix elements and returns their values.
.. ocv:function:: void gpu::minMax(InputArray src, double* minVal, double* maxVal=0, InputArray mask=noArray()) .. ocv:function:: void cuda::minMax(InputArray src, double* minVal, double* maxVal=0, InputArray mask=noArray())
.. ocv:function:: void gpu::minMax(InputArray src, double* minVal, double* maxVal, InputArray mask, GpuMat& buf) .. ocv:function:: void cuda::minMax(InputArray src, double* minVal, double* maxVal, InputArray mask, GpuMat& buf)
:param src: Single-channel source image. :param src: Single-channel source image.
@ -111,13 +111,13 @@ The function does not work with ``CV_64F`` images on GPUs with the compute capab
gpu::minMaxLoc cuda::minMaxLoc
-------------- ---------------
Finds global minimum and maximum matrix elements and returns their values with locations. Finds global minimum and maximum matrix elements and returns their values with locations.
.. ocv:function:: void gpu::minMaxLoc(InputArray src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray()) .. ocv:function:: void cuda::minMaxLoc(InputArray src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
.. ocv:function:: void gpu::minMaxLoc(InputArray src, double* minVal, double* maxVal, Point* minLoc, Point* maxLoc, InputArray mask, GpuMat& valbuf, GpuMat& locbuf) .. ocv:function:: void cuda::minMaxLoc(InputArray src, double* minVal, double* maxVal, Point* minLoc, Point* maxLoc, InputArray mask, GpuMat& valbuf, GpuMat& locbuf)
:param src: Single-channel source image. :param src: Single-channel source image.
@ -141,13 +141,13 @@ Finds global minimum and maximum matrix elements and returns their values with l
gpu::countNonZero cuda::countNonZero
----------------- ------------------
Counts non-zero matrix elements. Counts non-zero matrix elements.
.. ocv:function:: int gpu::countNonZero(InputArray src) .. ocv:function:: int cuda::countNonZero(InputArray src)
.. ocv:function:: int gpu::countNonZero(InputArray src, GpuMat& buf) .. ocv:function:: int cuda::countNonZero(InputArray src, GpuMat& buf)
:param src: Single-channel source image. :param src: Single-channel source image.
@ -159,11 +159,11 @@ The function does not work with ``CV_64F`` images on GPUs with the compute capab
gpu::reduce cuda::reduce
----------- ------------
Reduces a matrix to a vector. Reduces a matrix to a vector.
.. ocv:function:: void gpu::reduce(InputArray mtx, OutputArray vec, int dim, int reduceOp, int dtype = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::reduce(InputArray mtx, OutputArray vec, int dim, int reduceOp, int dtype = -1, Stream& stream = Stream::Null())
:param mtx: Source 2D matrix. :param mtx: Source 2D matrix.
@ -191,12 +191,12 @@ The function ``reduce`` reduces the matrix to a vector by treating the matrix ro
gpu::meanStdDev cuda::meanStdDev
--------------- ----------------
Computes a mean value and a standard deviation of matrix elements. Computes a mean value and a standard deviation of matrix elements.
.. ocv:function:: void gpu::meanStdDev(InputArray mtx, Scalar& mean, Scalar& stddev) .. ocv:function:: void cuda::meanStdDev(InputArray mtx, Scalar& mean, Scalar& stddev)
.. ocv:function:: void gpu::meanStdDev(InputArray mtx, Scalar& mean, Scalar& stddev, GpuMat& buf) .. ocv:function:: void cuda::meanStdDev(InputArray mtx, Scalar& mean, Scalar& stddev, GpuMat& buf)
:param mtx: Source matrix. ``CV_8UC1`` matrices are supported for now. :param mtx: Source matrix. ``CV_8UC1`` matrices are supported for now.
@ -210,11 +210,11 @@ Computes a mean value and a standard deviation of matrix elements.
gpu::rectStdDev cuda::rectStdDev
--------------- ----------------
Computes a standard deviation of integral images. Computes a standard deviation of integral images.
.. ocv:function:: void gpu::rectStdDev(InputArray src, InputArray sqr, OutputArray dst, Rect rect, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::rectStdDev(InputArray src, InputArray sqr, OutputArray dst, Rect rect, Stream& stream = Stream::Null())
:param src: Source image. Only the ``CV_32SC1`` type is supported. :param src: Source image. Only the ``CV_32SC1`` type is supported.
@ -228,13 +228,13 @@ Computes a standard deviation of integral images.
gpu::normalize cuda::normalize
-------------- ---------------
Normalizes the norm or value range of an array. Normalizes the norm or value range of an array.
.. ocv:function:: void gpu::normalize(InputArray src, OutputArray dst, double alpha = 1, double beta = 0, int norm_type = NORM_L2, int dtype = -1, InputArray mask = noArray()) .. ocv:function:: void cuda::normalize(InputArray src, OutputArray dst, double alpha = 1, double beta = 0, int norm_type = NORM_L2, int dtype = -1, InputArray mask = noArray())
.. ocv:function:: void gpu::normalize(InputArray src, OutputArray dst, double alpha, double beta, int norm_type, int dtype, InputArray mask, GpuMat& norm_buf, GpuMat& cvt_buf) .. ocv:function:: void cuda::normalize(InputArray src, OutputArray dst, double alpha, double beta, int norm_type, int dtype, InputArray mask, GpuMat& norm_buf, GpuMat& cvt_buf)
:param src: Input array. :param src: Input array.
@ -258,13 +258,13 @@ Normalizes the norm or value range of an array.
gpu::integral cuda::integral
------------- --------------
Computes an integral image. Computes an integral image.
.. ocv:function:: void gpu::integral(InputArray src, OutputArray sum, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::integral(InputArray src, OutputArray sum, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::integral(InputArray src, OutputArray sum, GpuMat& buffer, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::integral(InputArray src, OutputArray sum, GpuMat& buffer, Stream& stream = Stream::Null())
:param src: Source image. Only ``CV_8UC1`` images are supported for now. :param src: Source image. Only ``CV_8UC1`` images are supported for now.
@ -278,13 +278,13 @@ Computes an integral image.
gpu::sqrIntegral cuda::sqrIntegral
---------------- -----------------
Computes a squared integral image. Computes a squared integral image.
.. ocv:function:: void gpu::sqrIntegral(InputArray src, OutputArray sqsum, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::sqrIntegral(InputArray src, OutputArray sqsum, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::sqrIntegral(InputArray src, OutputArray sqsum, GpuMat& buf, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::sqrIntegral(InputArray src, OutputArray sqsum, GpuMat& buf, Stream& stream = Stream::Null())
:param src: Source image. Only ``CV_8UC1`` images are supported for now. :param src: Source image. Only ``CV_8UC1`` images are supported for now.

@ -5,11 +5,11 @@ Background Segmentation
gpu::BackgroundSubtractorMOG cuda::BackgroundSubtractorMOG
---------------------------- -----------------------------
Gaussian Mixture-based Background/Foreground Segmentation Algorithm. Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
.. ocv:class:: gpu::BackgroundSubtractorMOG : public cv::BackgroundSubtractorMOG .. ocv:class:: cuda::BackgroundSubtractorMOG : public cv::BackgroundSubtractorMOG
The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [MOG2001]_. The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [MOG2001]_.
@ -20,11 +20,12 @@ The class discriminates between foreground and background pixels by building and
* An example on gaussian mixture based background/foreground segmantation can be found at opencv_source_code/samples/gpu/bgfg_segm.cpp * An example on gaussian mixture based background/foreground segmantation can be found at opencv_source_code/samples/gpu/bgfg_segm.cpp
gpu::createBackgroundSubtractorMOG
---------------------------------- cuda::createBackgroundSubtractorMOG
-----------------------------------
Creates mixture-of-gaussian background subtractor Creates mixture-of-gaussian background subtractor
.. ocv:function:: Ptr<gpu::BackgroundSubtractorMOG> gpu::createBackgroundSubtractorMOG(int history=200, int nmixtures=5, double backgroundRatio=0.7, double noiseSigma=0) .. ocv:function:: Ptr<cuda::BackgroundSubtractorMOG> cuda::createBackgroundSubtractorMOG(int history=200, int nmixtures=5, double backgroundRatio=0.7, double noiseSigma=0)
:param history: Length of the history. :param history: Length of the history.
@ -36,11 +37,11 @@ Creates mixture-of-gaussian background subtractor
gpu::BackgroundSubtractorMOG2 cuda::BackgroundSubtractorMOG2
----------------------------- ------------------------------
Gaussian Mixture-based Background/Foreground Segmentation Algorithm. Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
.. ocv:class:: gpu::BackgroundSubtractorMOG2 : public cv::BackgroundSubtractorMOG2 .. ocv:class:: cuda::BackgroundSubtractorMOG2 : public cv::BackgroundSubtractorMOG2
The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [MOG2004]_. The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [MOG2004]_.
@ -48,11 +49,11 @@ The class discriminates between foreground and background pixels by building and
gpu::createBackgroundSubtractorMOG2 cuda::createBackgroundSubtractorMOG2
----------------------------------- ------------------------------------
Creates MOG2 Background Subtractor Creates MOG2 Background Subtractor
.. ocv:function:: Ptr<gpu::BackgroundSubtractorMOG2> gpu::createBackgroundSubtractorMOG2( int history=500, double varThreshold=16, bool detectShadows=true ) .. ocv:function:: Ptr<cuda::BackgroundSubtractorMOG2> cuda::createBackgroundSubtractorMOG2( int history=500, double varThreshold=16, bool detectShadows=true )
:param history: Length of the history. :param history: Length of the history.
@ -62,21 +63,21 @@ Creates MOG2 Background Subtractor
gpu::BackgroundSubtractorGMG cuda::BackgroundSubtractorGMG
---------------------------- -----------------------------
Background/Foreground Segmentation Algorithm. Background/Foreground Segmentation Algorithm.
.. ocv:class:: gpu::BackgroundSubtractorGMG : public cv::BackgroundSubtractorGMG .. ocv:class:: cuda::BackgroundSubtractorGMG : public cv::BackgroundSubtractorGMG
The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [GMG2012]_. The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [GMG2012]_.
gpu::createBackgroundSubtractorGMG cuda::createBackgroundSubtractorGMG
---------------------------------- -----------------------------------
Creates GMG Background Subtractor Creates GMG Background Subtractor
.. ocv:function:: Ptr<gpu::BackgroundSubtractorGMG> gpu::createBackgroundSubtractorGMG(int initializationFrames = 120, double decisionThreshold = 0.8) .. ocv:function:: Ptr<cuda::BackgroundSubtractorGMG> cuda::createBackgroundSubtractorGMG(int initializationFrames = 120, double decisionThreshold = 0.8)
:param initializationFrames: Number of frames of video to use to initialize histograms. :param initializationFrames: Number of frames of video to use to initialize histograms.
@ -84,10 +85,10 @@ Creates GMG Background Subtractor
gpu::BackgroundSubtractorFGD cuda::BackgroundSubtractorFGD
---------------------------- -----------------------------
.. ocv:class:: gpu::BackgroundSubtractorFGD : public cv::BackgroundSubtractor .. ocv:class:: cuda::BackgroundSubtractorFGD : public cv::BackgroundSubtractor
The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [FGD2003]_. :: The class discriminates between foreground and background pixels by building and maintaining a model of the background. Any pixel which does not fit this model is then deemed to be foreground. The class implements algorithm described in [FGD2003]_. ::
@ -101,21 +102,21 @@ The class discriminates between foreground and background pixels by building and
gpu::BackgroundSubtractorFGD::getForegroundRegions cuda::BackgroundSubtractorFGD::getForegroundRegions
-------------------------------------------------- ---------------------------------------------------
Returns the output foreground regions calculated by :ocv:func:`findContours`. Returns the output foreground regions calculated by :ocv:func:`findContours`.
.. ocv:function:: void gpu::BackgroundSubtractorFGD::getForegroundRegions(OutputArrayOfArrays foreground_regions) .. ocv:function:: void cuda::BackgroundSubtractorFGD::getForegroundRegions(OutputArrayOfArrays foreground_regions)
:params foreground_regions: Output array (CPU memory). :params foreground_regions: Output array (CPU memory).
gpu::createBackgroundSubtractorFGD cuda::createBackgroundSubtractorFGD
---------------------------------- -----------------------------------
Creates FGD Background Subtractor Creates FGD Background Subtractor
.. ocv:function:: Ptr<gpu::BackgroundSubtractorGMG> gpu::createBackgroundSubtractorFGD(const FGDParams& params = FGDParams()) .. ocv:function:: Ptr<cuda::BackgroundSubtractorGMG> cuda::createBackgroundSubtractorFGD(const FGDParams& params = FGDParams())
:param params: Algorithm's parameters. See [FGD2003]_ for explanation. :param params: Algorithm's parameters. See [FGD2003]_ for explanation.

@ -1,6 +1,6 @@
************************************************** ****************************************************
gpubgsegm. GPU-accelerated Background Segmentation cudabgsegm. CUDA-accelerated Background Segmentation
************************************************** ****************************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -1,6 +1,6 @@
************************************************* ***************************************************
gpucodec. GPU-accelerated Video Encoding/Decoding cudacodec. CUDA-accelerated Video Encoding/Decoding
************************************************* ***************************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -5,40 +5,40 @@ Video Decoding
gpucodec::VideoReader cudacodec::VideoReader
--------------------- ----------------------
Video reader interface. Video reader interface.
.. ocv:class:: gpucodec::VideoReader .. ocv:class:: cudacodec::VideoReader
.. note:: .. note::
* An example on how to use the videoReader class can be found at opencv_source_code/samples/gpu/video_reader.cpp * An example on how to use the videoReader class can be found at opencv_source_code/samples/gpu/video_reader.cpp
gpucodec::VideoReader::nextFrame cudacodec::VideoReader::nextFrame
-------------------------------- ---------------------------------
Grabs, decodes and returns the next video frame. Grabs, decodes and returns the next video frame.
.. ocv:function:: bool gpucodec::VideoReader::nextFrame(OutputArray frame) .. ocv:function:: bool cudacodec::VideoReader::nextFrame(OutputArray frame)
If no frames has been grabbed (there are no more frames in video file), the methods return ``false`` . The method throws :ocv:class:`Exception` if error occurs. If no frames has been grabbed (there are no more frames in video file), the methods return ``false`` . The method throws :ocv:class:`Exception` if error occurs.
gpucodec::VideoReader::format cudacodec::VideoReader::format
----------------------------- ------------------------------
Returns information about video file format. Returns information about video file format.
.. ocv:function:: FormatInfo gpucodec::VideoReader::format() const .. ocv:function:: FormatInfo cudacodec::VideoReader::format() const
gpucodec::Codec cudacodec::Codec
--------------- ----------------
Video codecs supported by :ocv:class:`gpucodec::VideoReader` . Video codecs supported by :ocv:class:`cudacodec::VideoReader` .
.. ocv:enum:: gpucodec::Codec .. ocv:enum:: cudacodec::Codec
.. ocv:emember:: MPEG1 = 0 .. ocv:emember:: MPEG1 = 0
.. ocv:emember:: MPEG2 .. ocv:emember:: MPEG2
@ -71,11 +71,11 @@ Video codecs supported by :ocv:class:`gpucodec::VideoReader` .
gpucodec::ChromaFormat cudacodec::ChromaFormat
---------------------- -----------------------
Chroma formats supported by :ocv:class:`gpucodec::VideoReader` . Chroma formats supported by :ocv:class:`cudacodec::VideoReader` .
.. ocv:enum:: gpucodec::ChromaFormat .. ocv:enum:: cudacodec::ChromaFormat
.. ocv:emember:: Monochrome = 0 .. ocv:emember:: Monochrome = 0
.. ocv:emember:: YUV420 .. ocv:emember:: YUV420
@ -84,9 +84,9 @@ Chroma formats supported by :ocv:class:`gpucodec::VideoReader` .
gpucodec::FormatInfo cudacodec::FormatInfo
-------------------- ---------------------
.. ocv:struct:: gpucodec::FormatInfo .. ocv:struct:: cudacodec::FormatInfo
Struct providing information about video file format. :: Struct providing information about video file format. ::
@ -100,24 +100,24 @@ Struct providing information about video file format. ::
gpucodec::createVideoReader cudacodec::createVideoReader
--------------------------- ----------------------------
Creates video reader. Creates video reader.
.. ocv:function:: Ptr<VideoReader> gpucodec::createVideoReader(const String& filename) .. ocv:function:: Ptr<VideoReader> cudacodec::createVideoReader(const String& filename)
.. ocv:function:: Ptr<VideoReader> gpucodec::createVideoReader(const Ptr<RawVideoSource>& source) .. ocv:function:: Ptr<VideoReader> cudacodec::createVideoReader(const Ptr<RawVideoSource>& source)
:param filename: Name of the input video file. :param filename: Name of the input video file.
:param source: RAW video source implemented by user. :param source: RAW video source implemented by user.
FFMPEG is used to read videos. User can implement own demultiplexing with :ocv:class:`gpucodec::RawVideoSource` . FFMPEG is used to read videos. User can implement own demultiplexing with :ocv:class:`cudacodec::RawVideoSource` .
gpucodec::RawVideoSource cudacodec::RawVideoSource
------------------------ -------------------------
.. ocv:class:: gpucodec::RawVideoSource .. ocv:class:: cudacodec::RawVideoSource
Interface for video demultiplexing. :: Interface for video demultiplexing. ::
@ -135,11 +135,11 @@ User can implement own demultiplexing by implementing this interface.
gpucodec::RawVideoSource::getNextPacket cudacodec::RawVideoSource::getNextPacket
--------------------------------------- ----------------------------------------
Returns next packet with RAW video frame. Returns next packet with RAW video frame.
.. ocv:function:: bool gpucodec::VideoSource::getNextPacket(unsigned char** data, int* size, bool* endOfFile) = 0 .. ocv:function:: bool cudacodec::VideoSource::getNextPacket(unsigned char** data, int* size, bool* endOfFile) = 0
:param data: Pointer to frame data. :param data: Pointer to frame data.
@ -149,8 +149,8 @@ Returns next packet with RAW video frame.
gpucodec::RawVideoSource::format cudacodec::RawVideoSource::format
-------------------------------- ---------------------------------
Returns information about video file format. Returns information about video file format.
.. ocv:function:: virtual FormatInfo gpucodec::RawVideoSource::format() const = 0 .. ocv:function:: virtual FormatInfo cudacodec::RawVideoSource::format() const = 0

@ -5,11 +5,11 @@ Video Encoding
gpucodec::VideoWriter cudacodec::VideoWriter
--------------------- ----------------------
Video writer interface. Video writer interface.
.. ocv:class:: gpucodec::VideoWriter .. ocv:class:: cudacodec::VideoWriter
The implementation uses H264 video codec. The implementation uses H264 video codec.
@ -20,11 +20,11 @@ The implementation uses H264 video codec.
* An example on how to use the videoWriter class can be found at opencv_source_code/samples/gpu/video_writer.cpp * An example on how to use the videoWriter class can be found at opencv_source_code/samples/gpu/video_writer.cpp
gpucodec::VideoWriter::write cudacodec::VideoWriter::write
---------------------------- -----------------------------
Writes the next video frame. Writes the next video frame.
.. ocv:function:: void gpucodec::VideoWriter::write(InputArray frame, bool lastFrame = false) = 0 .. ocv:function:: void cudacodec::VideoWriter::write(InputArray frame, bool lastFrame = false) = 0
:param frame: The written frame. :param frame: The written frame.
@ -34,14 +34,14 @@ The method write the specified image to video file. The image must have the same
gpucodec::createVideoWriter cudacodec::createVideoWriter
--------------------------- ----------------------------
Creates video writer. Creates video writer.
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const String& fileName, Size frameSize, double fps, SurfaceFormat format = SF_BGR) .. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const String& fileName, Size frameSize, double fps, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const String& fileName, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR) .. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const String& fileName, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, SurfaceFormat format = SF_BGR) .. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, SurfaceFormat format = SF_BGR)
.. ocv:function:: Ptr<gpucodec::VideoWriter> gpucodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR) .. ocv:function:: Ptr<cudacodec::VideoWriter> cudacodec::createVideoWriter(const Ptr<EncoderCallBack>& encoderCallback, Size frameSize, double fps, const EncoderParams& params, SurfaceFormat format = SF_BGR)
:param fileName: Name of the output video file. Only AVI file format is supported. :param fileName: Name of the output video file. Only AVI file format is supported.
@ -49,19 +49,19 @@ Creates video writer.
:param fps: Framerate of the created video stream. :param fps: Framerate of the created video stream.
:param params: Encoder parameters. See :ocv:struct:`gpucodec::EncoderParams` . :param params: Encoder parameters. See :ocv:struct:`cudacodec::EncoderParams` .
:param format: Surface format of input frames ( ``SF_UYVY`` , ``SF_YUY2`` , ``SF_YV12`` , ``SF_NV12`` , ``SF_IYUV`` , ``SF_BGR`` or ``SF_GRAY``). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is. :param format: Surface format of input frames ( ``SF_UYVY`` , ``SF_YUY2`` , ``SF_YV12`` , ``SF_NV12`` , ``SF_IYUV`` , ``SF_BGR`` or ``SF_GRAY``). BGR or gray frames will be converted to YV12 format before encoding, frames with other formats will be used as is.
:param encoderCallback: Callbacks for video encoder. See :ocv:class:`gpucodec::EncoderCallBack` . Use it if you want to work with raw video stream. :param encoderCallback: Callbacks for video encoder. See :ocv:class:`cudacodec::EncoderCallBack` . Use it if you want to work with raw video stream.
The constructors initialize video writer. FFMPEG is used to write videos. User can implement own multiplexing with :ocv:class:`gpucodec::EncoderCallBack` . The constructors initialize video writer. FFMPEG is used to write videos. User can implement own multiplexing with :ocv:class:`cudacodec::EncoderCallBack` .
gpucodec::EncoderParams cudacodec::EncoderParams
----------------------- ------------------------
.. ocv:struct:: gpucodec::EncoderParams .. ocv:struct:: cudacodec::EncoderParams
Different parameters for CUDA video encoder. :: Different parameters for CUDA video encoder. ::
@ -96,12 +96,12 @@ Different parameters for CUDA video encoder. ::
gpucodec::EncoderParams::EncoderParams cudacodec::EncoderParams::EncoderParams
-------------------------------------- ---------------------------------------
Constructors. Constructors.
.. ocv:function:: gpucodec::EncoderParams::EncoderParams() .. ocv:function:: cudacodec::EncoderParams::EncoderParams()
.. ocv:function:: gpucodec::EncoderParams::EncoderParams(const String& configFile) .. ocv:function:: cudacodec::EncoderParams::EncoderParams(const String& configFile)
:param configFile: Config file name. :param configFile: Config file name.
@ -109,29 +109,29 @@ Creates default parameters or reads parameters from config file.
gpucodec::EncoderParams::load cudacodec::EncoderParams::load
----------------------------- ------------------------------
Reads parameters from config file. Reads parameters from config file.
.. ocv:function:: void gpucodec::EncoderParams::load(const String& configFile) .. ocv:function:: void cudacodec::EncoderParams::load(const String& configFile)
:param configFile: Config file name. :param configFile: Config file name.
gpucodec::EncoderParams::save cudacodec::EncoderParams::save
----------------------------- ------------------------------
Saves parameters to config file. Saves parameters to config file.
.. ocv:function:: void gpucodec::EncoderParams::save(const String& configFile) const .. ocv:function:: void cudacodec::EncoderParams::save(const String& configFile) const
:param configFile: Config file name. :param configFile: Config file name.
gpucodec::EncoderCallBack cudacodec::EncoderCallBack
------------------------- --------------------------
.. ocv:class:: gpucodec::EncoderCallBack .. ocv:class:: cudacodec::EncoderCallBack
Callbacks for CUDA video encoder. :: Callbacks for CUDA video encoder. ::
@ -155,38 +155,38 @@ Callbacks for CUDA video encoder. ::
gpucodec::EncoderCallBack::acquireBitStream cudacodec::EncoderCallBack::acquireBitStream
------------------------------------------- --------------------------------------------
Callback function to signal the start of bitstream that is to be encoded. Callback function to signal the start of bitstream that is to be encoded.
.. ocv:function:: virtual uchar* gpucodec::EncoderCallBack::acquireBitStream(int* bufferSize) = 0 .. ocv:function:: virtual uchar* cudacodec::EncoderCallBack::acquireBitStream(int* bufferSize) = 0
Callback must allocate buffer for CUDA encoder and return pointer to it and it's size. Callback must allocate buffer for CUDA encoder and return pointer to it and it's size.
gpucodec::EncoderCallBack::releaseBitStream cudacodec::EncoderCallBack::releaseBitStream
------------------------------------------- --------------------------------------------
Callback function to signal that the encoded bitstream is ready to be written to file. Callback function to signal that the encoded bitstream is ready to be written to file.
.. ocv:function:: virtual void gpucodec::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0 .. ocv:function:: virtual void cudacodec::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0
gpucodec::EncoderCallBack::onBeginFrame cudacodec::EncoderCallBack::onBeginFrame
--------------------------------------- ----------------------------------------
Callback function to signal that the encoding operation on the frame has started. Callback function to signal that the encoding operation on the frame has started.
.. ocv:function:: virtual void gpucodec::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0 .. ocv:function:: virtual void cudacodec::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0
:param picType: Specify frame type (I-Frame, P-Frame or B-Frame). :param picType: Specify frame type (I-Frame, P-Frame or B-Frame).
gpucodec::EncoderCallBack::onEndFrame cudacodec::EncoderCallBack::onEndFrame
------------------------------------- --------------------------------------
Callback function signals that the encoding operation on the frame has finished. Callback function signals that the encoding operation on the frame has finished.
.. ocv:function:: virtual void gpucodec::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0 .. ocv:function:: virtual void cudacodec::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0
:param picType: Specify frame type (I-Frame, P-Frame or B-Frame). :param picType: Specify frame type (I-Frame, P-Frame or B-Frame).

@ -1,6 +1,6 @@
**************************************************************** ******************************************************************
gpufeatures2d. GPU-accelerated Feature Detection and Description cudafeatures2d. CUDA-accelerated Feature Detection and Description
**************************************************************** ******************************************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -5,13 +5,13 @@ Feature Detection and Description
gpu::FAST_GPU cuda::FAST_CUDA
------------- ---------------
.. ocv:class:: gpu::FAST_GPU .. ocv:class:: cuda::FAST_CUDA
Class used for corner detection using the FAST algorithm. :: Class used for corner detection using the FAST algorithm. ::
class FAST_GPU class FAST_CUDA
{ {
public: public:
enum enum
@ -24,7 +24,7 @@ Class used for corner detection using the FAST algorithm. ::
// all features have same size // all features have same size
static const int FEATURE_SIZE = 7; static const int FEATURE_SIZE = 7;
explicit FAST_GPU(int threshold, bool nonmaxSupression = true, explicit FAST_CUDA(int threshold, bool nonmaxSupression = true,
double keypointsRatio = 0.05); double keypointsRatio = 0.05);
void operator ()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints); void operator ()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints);
@ -51,17 +51,17 @@ Class used for corner detection using the FAST algorithm. ::
}; };
The class ``FAST_GPU`` implements FAST corner detection algorithm. The class ``FAST_CUDA`` implements FAST corner detection algorithm.
.. seealso:: :ocv:func:`FAST` .. seealso:: :ocv:func:`FAST`
gpu::FAST_GPU::FAST_GPU cuda::FAST_CUDA::FAST_CUDA
------------------------------------- --------------------------
Constructor. Constructor.
.. ocv:function:: gpu::FAST_GPU::FAST_GPU(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05) .. ocv:function:: cuda::FAST_CUDA::FAST_CUDA(int threshold, bool nonmaxSupression = true, double keypointsRatio = 0.05)
:param threshold: Threshold on difference between intensity of the central pixel and pixels on a circle around this pixel. :param threshold: Threshold on difference between intensity of the central pixel and pixels on a circle around this pixel.
@ -71,12 +71,12 @@ Constructor.
gpu::FAST_GPU::operator () cuda::FAST_CUDA::operator ()
------------------------------------- ----------------------------
Finds the keypoints using FAST detector. Finds the keypoints using FAST detector.
.. ocv:function:: void gpu::FAST_GPU::operator ()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints) .. ocv:function:: void cuda::FAST_CUDA::operator ()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints)
.. ocv:function:: void gpu::FAST_GPU::operator ()(const GpuMat& image, const GpuMat& mask, std::vector<KeyPoint>& keypoints) .. ocv:function:: void cuda::FAST_CUDA::operator ()(const GpuMat& image, const GpuMat& mask, std::vector<KeyPoint>& keypoints)
:param image: Image where keypoints (corners) are detected. Only 8-bit grayscale images are supported. :param image: Image where keypoints (corners) are detected. Only 8-bit grayscale images are supported.
@ -89,35 +89,35 @@ Finds the keypoints using FAST detector.
gpu::FAST_GPU::downloadKeypoints cuda::FAST_CUDA::downloadKeypoints
------------------------------------- ----------------------------------
Download keypoints from GPU to CPU memory. Download keypoints from GPU to CPU memory.
.. ocv:function:: void gpu::FAST_GPU::downloadKeypoints(const GpuMat& d_keypoints, std::vector<KeyPoint>& keypoints) .. ocv:function:: void cuda::FAST_CUDA::downloadKeypoints(const GpuMat& d_keypoints, std::vector<KeyPoint>& keypoints)
gpu::FAST_GPU::convertKeypoints cuda::FAST_CUDA::convertKeypoints
------------------------------------- ---------------------------------
Converts keypoints from GPU representation to vector of ``KeyPoint``. Converts keypoints from CUDA representation to vector of ``KeyPoint``.
.. ocv:function:: void gpu::FAST_GPU::convertKeypoints(const Mat& h_keypoints, std::vector<KeyPoint>& keypoints) .. ocv:function:: void cuda::FAST_CUDA::convertKeypoints(const Mat& h_keypoints, std::vector<KeyPoint>& keypoints)
gpu::FAST_GPU::release cuda::FAST_CUDA::release
------------------------------------- ------------------------
Releases inner buffer memory. Releases inner buffer memory.
.. ocv:function:: void gpu::FAST_GPU::release() .. ocv:function:: void cuda::FAST_CUDA::release()
gpu::FAST_GPU::calcKeyPointsLocation cuda::FAST_CUDA::calcKeyPointsLocation
------------------------------------- --------------------------------------
Find keypoints and compute it's response if ``nonmaxSupression`` is true. Find keypoints and compute it's response if ``nonmaxSupression`` is true.
.. ocv:function:: int gpu::FAST_GPU::calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask) .. ocv:function:: int cuda::FAST_CUDA::calcKeyPointsLocation(const GpuMat& image, const GpuMat& mask)
:param image: Image where keypoints (corners) are detected. Only 8-bit grayscale images are supported. :param image: Image where keypoints (corners) are detected. Only 8-bit grayscale images are supported.
@ -127,11 +127,11 @@ The function returns count of detected keypoints.
gpu::FAST_GPU::getKeyPoints cuda::FAST_CUDA::getKeyPoints
------------------------------------- -----------------------------
Gets final array of keypoints. Gets final array of keypoints.
.. ocv:function:: int gpu::FAST_GPU::getKeyPoints(GpuMat& keypoints) .. ocv:function:: int cuda::FAST_CUDA::getKeyPoints(GpuMat& keypoints)
:param keypoints: The output vector of keypoints. :param keypoints: The output vector of keypoints.
@ -139,13 +139,13 @@ The function performs non-max suppression if needed and returns final count of k
gpu::ORB_GPU cuda::ORB_CUDA
------------- --------------
.. ocv:class:: gpu::ORB_GPU .. ocv:class:: cuda::ORB_CUDA
Class for extracting ORB features and descriptors from an image. :: Class for extracting ORB features and descriptors from an image. ::
class ORB_GPU class ORB_CUDA
{ {
public: public:
enum enum
@ -164,7 +164,7 @@ Class for extracting ORB features and descriptors from an image. ::
DEFAULT_FAST_THRESHOLD = 20 DEFAULT_FAST_THRESHOLD = 20
}; };
explicit ORB_GPU(int nFeatures = 500, float scaleFactor = 1.2f, explicit ORB_CUDA(int nFeatures = 500, float scaleFactor = 1.2f,
int nLevels = 8, int edgeThreshold = 31, int nLevels = 8, int edgeThreshold = 31,
int firstLevel = 0, int WTA_K = 2, int firstLevel = 0, int WTA_K = 2,
int scoreType = 0, int patchSize = 31); int scoreType = 0, int patchSize = 31);
@ -196,11 +196,11 @@ The class implements ORB feature detection and description algorithm.
gpu::ORB_GPU::ORB_GPU cuda::ORB_CUDA::ORB_CUDA
------------------------------------- ------------------------
Constructor. Constructor.
.. ocv:function:: gpu::ORB_GPU::ORB_GPU(int nFeatures = 500, float scaleFactor = 1.2f, int nLevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, int scoreType = 0, int patchSize = 31) .. ocv:function:: cuda::ORB_CUDA::ORB_CUDA(int nFeatures = 500, float scaleFactor = 1.2f, int nLevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K = 2, int scoreType = 0, int patchSize = 31)
:param nFeatures: The number of desired features. :param nFeatures: The number of desired features.
@ -214,17 +214,17 @@ Constructor.
gpu::ORB_GPU::operator() cuda::ORB_CUDA::operator()
------------------------------------- --------------------------
Detects keypoints and computes descriptors for them. Detects keypoints and computes descriptors for them.
.. ocv:function:: void gpu::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, std::vector<KeyPoint>& keypoints) .. ocv:function:: void cuda::ORB_CUDA::operator()(const GpuMat& image, const GpuMat& mask, std::vector<KeyPoint>& keypoints)
.. ocv:function:: void gpu::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints) .. ocv:function:: void cuda::ORB_CUDA::operator()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints)
.. ocv:function:: void gpu::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, std::vector<KeyPoint>& keypoints, GpuMat& descriptors) .. ocv:function:: void cuda::ORB_CUDA::operator()(const GpuMat& image, const GpuMat& mask, std::vector<KeyPoint>& keypoints, GpuMat& descriptors)
.. ocv:function:: void gpu::ORB_GPU::operator()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints, GpuMat& descriptors) .. ocv:function:: void cuda::ORB_CUDA::operator()(const GpuMat& image, const GpuMat& mask, GpuMat& keypoints, GpuMat& descriptors)
:param image: Input 8-bit grayscale image. :param image: Input 8-bit grayscale image.
@ -243,40 +243,40 @@ Detects keypoints and computes descriptors for them.
gpu::ORB_GPU::downloadKeyPoints cuda::ORB_CUDA::downloadKeyPoints
------------------------------------- ---------------------------------
Download keypoints from GPU to CPU memory. Download keypoints from GPU to CPU memory.
.. ocv:function:: static void gpu::ORB_GPU::downloadKeyPoints( const GpuMat& d_keypoints, std::vector<KeyPoint>& keypoints ) .. ocv:function:: static void cuda::ORB_CUDA::downloadKeyPoints( const GpuMat& d_keypoints, std::vector<KeyPoint>& keypoints )
gpu::ORB_GPU::convertKeyPoints cuda::ORB_CUDA::convertKeyPoints
------------------------------------- --------------------------------
Converts keypoints from GPU representation to vector of ``KeyPoint``. Converts keypoints from CUDA representation to vector of ``KeyPoint``.
.. ocv:function:: static void gpu::ORB_GPU::convertKeyPoints( const Mat& d_keypoints, std::vector<KeyPoint>& keypoints ) .. ocv:function:: static void cuda::ORB_CUDA::convertKeyPoints( const Mat& d_keypoints, std::vector<KeyPoint>& keypoints )
gpu::ORB_GPU::release cuda::ORB_CUDA::release
------------------------------------- -----------------------
Releases inner buffer memory. Releases inner buffer memory.
.. ocv:function:: void gpu::ORB_GPU::release() .. ocv:function:: void cuda::ORB_CUDA::release()
gpu::BFMatcher_GPU cuda::BFMatcher_CUDA
-------------------------- --------------------
.. ocv:class:: gpu::BFMatcher_GPU .. ocv:class:: cuda::BFMatcher_CUDA
Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches between descriptor sets. :: Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches between descriptor sets. ::
class BFMatcher_GPU class BFMatcher_CUDA
{ {
public: public:
explicit BFMatcher_GPU(int norm = cv::NORM_L2); explicit BFMatcher_CUDA(int norm = cv::NORM_L2);
// Add descriptors to train descriptor collection. // Add descriptors to train descriptor collection.
void add(const std::vector<GpuMat>& descCollection); void add(const std::vector<GpuMat>& descCollection);
@ -375,67 +375,67 @@ Brute-force descriptor matcher. For each descriptor in the first set, this match
}; };
The class ``BFMatcher_GPU`` has an interface similar to the class :ocv:class:`DescriptorMatcher`. It has two groups of ``match`` methods: for matching descriptors of one image with another image or with an image set. Also, all functions have an alternative to save results either to the GPU memory or to the CPU memory. The class ``BFMatcher_CUDA`` has an interface similar to the class :ocv:class:`DescriptorMatcher`. It has two groups of ``match`` methods: for matching descriptors of one image with another image or with an image set. Also, all functions have an alternative to save results either to the GPU memory or to the CPU memory.
.. seealso:: :ocv:class:`DescriptorMatcher`, :ocv:class:`BFMatcher` .. seealso:: :ocv:class:`DescriptorMatcher`, :ocv:class:`BFMatcher`
gpu::BFMatcher_GPU::match cuda::BFMatcher_CUDA::match
------------------------------------- ---------------------------
Finds the best match for each descriptor from a query set with train descriptors. Finds the best match for each descriptor from a query set with train descriptors.
.. ocv:function:: void gpu::BFMatcher_GPU::match(const GpuMat& query, const GpuMat& train, std::vector<DMatch>& matches, const GpuMat& mask = GpuMat()) .. ocv:function:: void cuda::BFMatcher_CUDA::match(const GpuMat& query, const GpuMat& train, std::vector<DMatch>& matches, const GpuMat& mask = GpuMat())
.. ocv:function:: void gpu::BFMatcher_GPU::matchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, const GpuMat& mask = GpuMat(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::BFMatcher_CUDA::matchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, const GpuMat& mask = GpuMat(), Stream& stream = Stream::Null())
.. ocv:function:: void gpu::BFMatcher_GPU::match(const GpuMat& query, std::vector<DMatch>& matches, const std::vector<GpuMat>& masks = std::vector<GpuMat>()) .. ocv:function:: void cuda::BFMatcher_CUDA::match(const GpuMat& query, std::vector<DMatch>& matches, const std::vector<GpuMat>& masks = std::vector<GpuMat>())
.. ocv:function:: void gpu::BFMatcher_GPU::matchCollection( const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& masks=GpuMat(), Stream& stream=Stream::Null() ) .. ocv:function:: void cuda::BFMatcher_CUDA::matchCollection( const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& masks=GpuMat(), Stream& stream=Stream::Null() )
.. seealso:: :ocv:func:`DescriptorMatcher::match` .. seealso:: :ocv:func:`DescriptorMatcher::match`
gpu::BFMatcher_GPU::makeGpuCollection cuda::BFMatcher_CUDA::makeGpuCollection
------------------------------------------------- ---------------------------------------
Performs a GPU collection of train descriptors and masks in a suitable format for the :ocv:func:`gpu::BFMatcher_GPU::matchCollection` function. Performs a GPU collection of train descriptors and masks in a suitable format for the :ocv:func:`cuda::BFMatcher_CUDA::matchCollection` function.
.. ocv:function:: void gpu::BFMatcher_GPU::makeGpuCollection(GpuMat& trainCollection, GpuMat& maskCollection, const vector<GpuMat>& masks = std::vector<GpuMat>()) .. ocv:function:: void cuda::BFMatcher_CUDA::makeGpuCollection(GpuMat& trainCollection, GpuMat& maskCollection, const vector<GpuMat>& masks = std::vector<GpuMat>())
gpu::BFMatcher_GPU::matchDownload cuda::BFMatcher_CUDA::matchDownload
--------------------------------------------- -----------------------------------
Downloads matrices obtained via :ocv:func:`gpu::BFMatcher_GPU::matchSingle` or :ocv:func:`gpu::BFMatcher_GPU::matchCollection` to vector with :ocv:class:`DMatch`. Downloads matrices obtained via :ocv:func:`cuda::BFMatcher_CUDA::matchSingle` or :ocv:func:`cuda::BFMatcher_CUDA::matchCollection` to vector with :ocv:class:`DMatch`.
.. ocv:function:: static void gpu::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector<DMatch>&matches) .. ocv:function:: static void cuda::BFMatcher_CUDA::matchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector<DMatch>&matches)
.. ocv:function:: static void gpu::BFMatcher_GPU::matchDownload( const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector<DMatch>& matches ) .. ocv:function:: static void cuda::BFMatcher_CUDA::matchDownload( const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector<DMatch>& matches )
gpu::BFMatcher_GPU::matchConvert cuda::BFMatcher_CUDA::matchConvert
--------------------------------------------- ----------------------------------
Converts matrices obtained via :ocv:func:`gpu::BFMatcher_GPU::matchSingle` or :ocv:func:`gpu::BFMatcher_GPU::matchCollection` to vector with :ocv:class:`DMatch`. Converts matrices obtained via :ocv:func:`cuda::BFMatcher_CUDA::matchSingle` or :ocv:func:`cuda::BFMatcher_CUDA::matchCollection` to vector with :ocv:class:`DMatch`.
.. ocv:function:: void gpu::BFMatcher_GPU::matchConvert(const Mat& trainIdx, const Mat& distance, std::vector<DMatch>&matches) .. ocv:function:: void cuda::BFMatcher_CUDA::matchConvert(const Mat& trainIdx, const Mat& distance, std::vector<DMatch>&matches)
.. ocv:function:: void gpu::BFMatcher_GPU::matchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector<DMatch>&matches) .. ocv:function:: void cuda::BFMatcher_CUDA::matchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector<DMatch>&matches)
gpu::BFMatcher_GPU::knnMatch cuda::BFMatcher_CUDA::knnMatch
---------------------------------------- ------------------------------
Finds the ``k`` best matches for each descriptor from a query set with train descriptors. Finds the ``k`` best matches for each descriptor from a query set with train descriptors.
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatch(const GpuMat& query, const GpuMat& train, std::vector< std::vector<DMatch> >&matches, int k, const GpuMat& mask = GpuMat(), bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatch(const GpuMat& query, const GpuMat& train, std::vector< std::vector<DMatch> >&matches, int k, const GpuMat& mask = GpuMat(), bool compactResult = false)
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, GpuMat& allDist, int k, const GpuMat& mask = GpuMat(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, GpuMat& allDist, int k, const GpuMat& mask = GpuMat(), Stream& stream = Stream::Null())
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatch(const GpuMat& query, std::vector< std::vector<DMatch> >&matches, int k, const std::vector<GpuMat>&masks = std::vector<GpuMat>(), bool compactResult = false ) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatch(const GpuMat& query, std::vector< std::vector<DMatch> >&matches, int k, const std::vector<GpuMat>&masks = std::vector<GpuMat>(), bool compactResult = false )
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatch2Collection(const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& maskCollection = GpuMat(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatch2Collection(const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& maskCollection = GpuMat(), Stream& stream = Stream::Null())
:param query: Query set of descriptors. :param query: Query set of descriptors.
@ -457,41 +457,41 @@ The third variant of the method stores the results in GPU memory.
gpu::BFMatcher_GPU::knnMatchDownload cuda::BFMatcher_CUDA::knnMatchDownload
------------------------------------------------ --------------------------------------
Downloads matrices obtained via :ocv:func:`gpu::BFMatcher_GPU::knnMatchSingle` or :ocv:func:`gpu::BFMatcher_GPU::knnMatch2Collection` to vector with :ocv:class:`DMatch`. Downloads matrices obtained via :ocv:func:`cuda::BFMatcher_CUDA::knnMatchSingle` or :ocv:func:`cuda::BFMatcher_CUDA::knnMatch2Collection` to vector with :ocv:class:`DMatch`.
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatch2Download(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector< std::vector<DMatch> >& matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatch2Download(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors. If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
gpu::BFMatcher_GPU::knnMatchConvert cuda::BFMatcher_CUDA::knnMatchConvert
------------------------------------------------ -------------------------------------
Converts matrices obtained via :ocv:func:`gpu::BFMatcher_GPU::knnMatchSingle` or :ocv:func:`gpu::BFMatcher_GPU::knnMatch2Collection` to CPU vector with :ocv:class:`DMatch`. Converts matrices obtained via :ocv:func:`cuda::BFMatcher_CUDA::knnMatchSingle` or :ocv:func:`cuda::BFMatcher_CUDA::knnMatch2Collection` to CPU vector with :ocv:class:`DMatch`.
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatchConvert(const Mat& trainIdx, const Mat& distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatchConvert(const Mat& trainIdx, const Mat& distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
.. ocv:function:: void gpu::BFMatcher_GPU::knnMatch2Convert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector< std::vector<DMatch> >& matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::knnMatch2Convert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors. If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
gpu::BFMatcher_GPU::radiusMatch cuda::BFMatcher_CUDA::radiusMatch
------------------------------------------- ---------------------------------
For each query descriptor, finds the best matches with a distance less than a given threshold. For each query descriptor, finds the best matches with a distance less than a given threshold.
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatch(const GpuMat& query, const GpuMat& train, std::vector< std::vector<DMatch> >&matches, float maxDistance, const GpuMat& mask = GpuMat(), bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatch(const GpuMat& query, const GpuMat& train, std::vector< std::vector<DMatch> >&matches, float maxDistance, const GpuMat& mask = GpuMat(), bool compactResult = false)
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, GpuMat& nMatches, float maxDistance, const GpuMat& mask = GpuMat(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatchSingle(const GpuMat& query, const GpuMat& train, GpuMat& trainIdx, GpuMat& distance, GpuMat& nMatches, float maxDistance, const GpuMat& mask = GpuMat(), Stream& stream = Stream::Null())
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatch(const GpuMat& query, std::vector< std::vector<DMatch> >&matches, float maxDistance, const std::vector<GpuMat>& masks = std::vector<GpuMat>(), bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatch(const GpuMat& query, std::vector< std::vector<DMatch> >&matches, float maxDistance, const std::vector<GpuMat>& masks = std::vector<GpuMat>(), bool compactResult = false)
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatchCollection(const GpuMat& query, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, GpuMat& nMatches, float maxDistance, const std::vector<GpuMat>& masks = std::vector<GpuMat>(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatchCollection(const GpuMat& query, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, GpuMat& nMatches, float maxDistance, const std::vector<GpuMat>& masks = std::vector<GpuMat>(), Stream& stream = Stream::Null())
:param query: Query set of descriptors. :param query: Query set of descriptors.
@ -515,25 +515,25 @@ The third variant of the method stores the results in GPU memory and does not st
gpu::BFMatcher_GPU::radiusMatchDownload cuda::BFMatcher_CUDA::radiusMatchDownload
--------------------------------------------------- -----------------------------------------
Downloads matrices obtained via :ocv:func:`gpu::BFMatcher_GPU::radiusMatchSingle` or :ocv:func:`gpu::BFMatcher_GPU::radiusMatchCollection` to vector with :ocv:class:`DMatch`. Downloads matrices obtained via :ocv:func:`cuda::BFMatcher_CUDA::radiusMatchSingle` or :ocv:func:`cuda::BFMatcher_CUDA::radiusMatchCollection` to vector with :ocv:class:`DMatch`.
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector<DMatch> >&matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors. If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
gpu::BFMatcher_GPU::radiusMatchConvert cuda::BFMatcher_CUDA::radiusMatchConvert
--------------------------------------------------- ----------------------------------------
Converts matrices obtained via :ocv:func:`gpu::BFMatcher_GPU::radiusMatchSingle` or :ocv:func:`gpu::BFMatcher_GPU::radiusMatchCollection` to vector with :ocv:class:`DMatch`. Converts matrices obtained via :ocv:func:`cuda::BFMatcher_CUDA::radiusMatchSingle` or :ocv:func:`cuda::BFMatcher_CUDA::radiusMatchCollection` to vector with :ocv:class:`DMatch`.
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector<DMatch> >&matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatchConvert(const Mat& trainIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
.. ocv:function:: void gpu::BFMatcher_GPU::radiusMatchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false) .. ocv:function:: void cuda::BFMatcher_CUDA::radiusMatchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors. If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.

@ -1,6 +1,6 @@
******************************************* *********************************************
gpufilters. GPU-accelerated Image Filtering cudafilters. CUDA-accelerated Image Filtering
******************************************* *********************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -9,11 +9,13 @@ Functions and classes described in this section are used to perform various line
* An example containing all basic morphology operators like erode and dilate can be found at opencv_source_code/samples/gpu/morphology.cpp * An example containing all basic morphology operators like erode and dilate can be found at opencv_source_code/samples/gpu/morphology.cpp
gpu::Filter
-----------
.. ocv:class:: gpu::Filter
Common interface for all GPU filters ::
cuda::Filter
------------
.. ocv:class:: cuda::Filter
Common interface for all CUDA filters ::
class CV_EXPORTS Filter : public Algorithm class CV_EXPORTS Filter : public Algorithm
{ {
@ -23,11 +25,11 @@ Common interface for all GPU filters ::
gpu::Filter::apply cuda::Filter::apply
------------------ -------------------
Applies the specified filter to the image. Applies the specified filter to the image.
.. ocv:function:: void gpu::Filter::apply(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) = 0 .. ocv:function:: void cuda::Filter::apply(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) = 0
:param src: Input image. :param src: Input image.
@ -37,11 +39,11 @@ Applies the specified filter to the image.
gpu::createBoxFilter cuda::createBoxFilter
-------------------- ---------------------
Creates a normalized 2D box filter. Creates a normalized 2D box filter.
.. ocv:function:: Ptr<Filter> gpu::createBoxFilter(int srcType, int dstType, Size ksize, Point anchor = Point(-1,-1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0)) .. ocv:function:: Ptr<Filter> cuda::createBoxFilter(int srcType, int dstType, Size ksize, Point anchor = Point(-1,-1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0))
:param srcType: Input image type. Only ``CV_8UC1`` and ``CV_8UC4`` are supported for now. :param srcType: Input image type. Only ``CV_8UC1`` and ``CV_8UC4`` are supported for now.
@ -59,11 +61,11 @@ Creates a normalized 2D box filter.
gpu::createLinearFilter cuda::createLinearFilter
----------------------- ------------------------
Creates a non-separable linear 2D filter. Creates a non-separable linear 2D filter.
.. ocv:function:: Ptr<Filter> gpu::createLinearFilter(int srcType, int dstType, InputArray kernel, Point anchor = Point(-1,-1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0)) .. ocv:function:: Ptr<Filter> cuda::createLinearFilter(int srcType, int dstType, InputArray kernel, Point anchor = Point(-1,-1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0))
:param srcType: Input image type. Supports ``CV_8U`` , ``CV_16U`` and ``CV_32F`` one and four channel image. :param srcType: Input image type. Supports ``CV_8U`` , ``CV_16U`` and ``CV_32F`` one and four channel image.
@ -81,11 +83,11 @@ Creates a non-separable linear 2D filter.
gpu::createLaplacianFilter cuda::createLaplacianFilter
-------------------------- ---------------------------
Creates a Laplacian operator. Creates a Laplacian operator.
.. ocv:function:: Ptr<Filter> gpu::createLaplacianFilter(int srcType, int dstType, int ksize = 1, double scale = 1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0)) .. ocv:function:: Ptr<Filter> cuda::createLaplacianFilter(int srcType, int dstType, int ksize = 1, double scale = 1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0))
:param srcType: Input image type. Supports ``CV_8U`` , ``CV_16U`` and ``CV_32F`` one and four channel image. :param srcType: Input image type. Supports ``CV_8U`` , ``CV_16U`` and ``CV_32F`` one and four channel image.
@ -103,11 +105,11 @@ Creates a Laplacian operator.
gpu::createSeparableLinearFilter cuda::createSeparableLinearFilter
-------------------------------- ---------------------------------
Creates a separable linear filter. Creates a separable linear filter.
.. ocv:function:: Ptr<Filter> gpu::createSeparableLinearFilter(int srcType, int dstType, InputArray rowKernel, InputArray columnKernel, Point anchor = Point(-1,-1), int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1) .. ocv:function:: Ptr<Filter> cuda::createSeparableLinearFilter(int srcType, int dstType, InputArray rowKernel, InputArray columnKernel, Point anchor = Point(-1,-1), int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1)
:param srcType: Source array type. :param srcType: Source array type.
@ -127,11 +129,11 @@ Creates a separable linear filter.
gpu::createDerivFilter cuda::createDerivFilter
---------------------- -----------------------
Creates a generalized Deriv operator. Creates a generalized Deriv operator.
.. ocv:function:: Ptr<Filter> gpu::createDerivFilter(int srcType, int dstType, int dx, int dy, int ksize, bool normalize = false, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1) .. ocv:function:: Ptr<Filter> cuda::createDerivFilter(int srcType, int dstType, int dx, int dy, int ksize, bool normalize = false, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1)
:param srcType: Source image type. :param srcType: Source image type.
@ -153,11 +155,11 @@ Creates a generalized Deriv operator.
gpu::createSobelFilter cuda::createSobelFilter
---------------------- -----------------------
Creates a Sobel operator. Creates a Sobel operator.
.. ocv:function:: Ptr<Filter> gpu::createSobelFilter(int srcType, int dstType, int dx, int dy, int ksize = 3, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1) .. ocv:function:: Ptr<Filter> cuda::createSobelFilter(int srcType, int dstType, int dx, int dy, int ksize = 3, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1)
:param srcType: Source image type. :param srcType: Source image type.
@ -179,11 +181,11 @@ Creates a Sobel operator.
gpu::createScharrFilter cuda::createScharrFilter
----------------------- ------------------------
Creates a vertical or horizontal Scharr operator. Creates a vertical or horizontal Scharr operator.
.. ocv:function:: Ptr<Filter> gpu::createScharrFilter(int srcType, int dstType, int dx, int dy, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1) .. ocv:function:: Ptr<Filter> cuda::createScharrFilter(int srcType, int dstType, int dx, int dy, double scale = 1, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1)
:param srcType: Source image type. :param srcType: Source image type.
@ -203,11 +205,11 @@ Creates a vertical or horizontal Scharr operator.
gpu::createGaussianFilter cuda::createGaussianFilter
------------------------- --------------------------
Creates a Gaussian filter. Creates a Gaussian filter.
.. ocv:function:: Ptr<Filter> gpu::createGaussianFilter(int srcType, int dstType, Size ksize, double sigma1, double sigma2 = 0, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1) .. ocv:function:: Ptr<Filter> cuda::createGaussianFilter(int srcType, int dstType, Size ksize, double sigma1, double sigma2 = 0, int rowBorderMode = BORDER_DEFAULT, int columnBorderMode = -1)
:param srcType: Source image type. :param srcType: Source image type.
@ -227,11 +229,11 @@ Creates a Gaussian filter.
gpu::createMorphologyFilter cuda::createMorphologyFilter
--------------------------- ----------------------------
Creates a 2D morphological filter. Creates a 2D morphological filter.
.. ocv:function:: Ptr<Filter> gpu::createMorphologyFilter(int op, int srcType, InputArray kernel, Point anchor = Point(-1, -1), int iterations = 1) .. ocv:function:: Ptr<Filter> cuda::createMorphologyFilter(int op, int srcType, InputArray kernel, Point anchor = Point(-1, -1), int iterations = 1)
:param op: Type of morphological operation. The following types are possible: :param op: Type of morphological operation. The following types are possible:
@ -261,11 +263,11 @@ Creates a 2D morphological filter.
gpu::createBoxMaxFilter cuda::createBoxMaxFilter
----------------------- ------------------------
Creates the maximum filter. Creates the maximum filter.
.. ocv:function:: Ptr<Filter> gpu::createBoxMaxFilter(int srcType, Size ksize, Point anchor = Point(-1, -1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0)) .. ocv:function:: Ptr<Filter> cuda::createBoxMaxFilter(int srcType, Size ksize, Point anchor = Point(-1, -1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0))
:param srcType: Input/output image type. Only ``CV_8UC1`` and ``CV_8UC4`` are supported. :param srcType: Input/output image type. Only ``CV_8UC1`` and ``CV_8UC4`` are supported.
@ -279,11 +281,11 @@ Creates the maximum filter.
gpu::createBoxMinFilter cuda::createBoxMinFilter
----------------------- ------------------------
Creates the minimum filter. Creates the minimum filter.
.. ocv:function:: Ptr<Filter> gpu::createBoxMinFilter(int srcType, Size ksize, Point anchor = Point(-1, -1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0)) .. ocv:function:: Ptr<Filter> cuda::createBoxMinFilter(int srcType, Size ksize, Point anchor = Point(-1, -1), int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0))
:param srcType: Input/output image type. Only ``CV_8UC1`` and ``CV_8UC4`` are supported. :param srcType: Input/output image type. Only ``CV_8UC1`` and ``CV_8UC4`` are supported.
@ -297,11 +299,11 @@ Creates the minimum filter.
gpu::createRowSumFilter cuda::createRowSumFilter
----------------------- ------------------------
Creates a horizontal 1D box filter. Creates a horizontal 1D box filter.
.. ocv:function:: Ptr<Filter> gpu::createRowSumFilter(int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0)) .. ocv:function:: Ptr<Filter> cuda::createRowSumFilter(int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0))
:param srcType: Input image type. Only ``CV_8UC1`` type is supported for now. :param srcType: Input image type. Only ``CV_8UC1`` type is supported for now.
@ -317,11 +319,11 @@ Creates a horizontal 1D box filter.
gpu::createColumnSumFilter cuda::createColumnSumFilter
-------------------------- ---------------------------
Creates a vertical 1D box filter. Creates a vertical 1D box filter.
.. ocv:function:: Ptr<Filter> gpu::createColumnSumFilter(int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0)) .. ocv:function:: Ptr<Filter> cuda::createColumnSumFilter(int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0))
:param srcType: Input image type. Only ``CV_8UC1`` type is supported for now. :param srcType: Input image type. Only ``CV_8UC1`` type is supported for now.

@ -5,11 +5,11 @@ Color space processing
gpu::cvtColor cuda::cvtColor
------------- --------------
Converts an image from one color space to another. Converts an image from one color space to another.
.. ocv:function:: void gpu::cvtColor(InputArray src, OutputArray dst, int code, int dcn = 0, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::cvtColor(InputArray src, OutputArray dst, int code, int dcn = 0, Stream& stream = Stream::Null())
: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.
@ -27,11 +27,11 @@ Converts an image from one color space to another.
gpu::demosaicing cuda::demosaicing
---------------- -----------------
Converts an image from Bayer pattern to RGB or grayscale. Converts an image from Bayer pattern to RGB or grayscale.
.. ocv:function:: void gpu::demosaicing(InputArray src, OutputArray dst, int code, int dcn = -1, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::demosaicing(InputArray src, OutputArray dst, int code, int dcn = -1, Stream& stream = Stream::Null())
:param src: Source image (8-bit or 16-bit single channel). :param src: Source image (8-bit or 16-bit single channel).
@ -61,11 +61,11 @@ The function can do the following transformations:
gpu::swapChannels cuda::swapChannels
----------------- ------------------
Exchanges the color channels of an image in-place. Exchanges the color channels of an image in-place.
.. ocv:function:: void gpu::swapChannels(InputOutputArray image, const int dstOrder[4], Stream& stream = Stream::Null()) .. ocv:function:: void cuda::swapChannels(InputOutputArray image, const int dstOrder[4], Stream& stream = Stream::Null())
:param image: Source image. Supports only ``CV_8UC4`` type. :param image: Source image. Supports only ``CV_8UC4`` type.
@ -77,11 +77,11 @@ The methods support arbitrary permutations of the original channels, including r
gpu::gammaCorrection cuda::gammaCorrection
-------------------- ---------------------
Routines for correcting image color gamma. Routines for correcting image color gamma.
.. ocv:function:: void gpu::gammaCorrection(InputArray src, OutputArray dst, bool forward = true, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::gammaCorrection(InputArray src, OutputArray dst, bool forward = true, Stream& stream = Stream::Null())
:param src: Source image (3- or 4-channel 8 bit). :param src: Source image (3- or 4-channel 8 bit).
@ -93,11 +93,11 @@ Routines for correcting image color gamma.
gpu::alphaComp cuda::alphaComp
-------------- ---------------
Composites two images using alpha opacity values contained in each image. Composites two images using alpha opacity values contained in each image.
.. ocv:function:: void gpu::alphaComp(InputArray img1, InputArray img2, OutputArray dst, int alpha_op, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::alphaComp(InputArray img1, InputArray img2, OutputArray dst, int alpha_op, Stream& stream = Stream::Null())
:param img1: First image. Supports ``CV_8UC4`` , ``CV_16UC4`` , ``CV_32SC4`` and ``CV_32FC4`` types. :param img1: First image. Supports ``CV_8UC4`` , ``CV_16UC4`` , ``CV_32SC4`` and ``CV_32FC4`` types.

@ -1,6 +1,6 @@
******************************************** **********************************************
gpuimgproc. GPU-accelerated Image Processing cudaimgproc. CUDA-accelerated Image Processing
******************************************** **********************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -5,9 +5,9 @@ Feature Detection
gpu::CornernessCriteria cuda::CornernessCriteria
----------------------- ------------------------
.. ocv:class:: gpu::CornernessCriteria : public Algorithm .. ocv:class:: cuda::CornernessCriteria : public Algorithm
Base class for Cornerness Criteria computation. :: Base class for Cornerness Criteria computation. ::
@ -19,11 +19,11 @@ Base class for Cornerness Criteria computation. ::
gpu::CornernessCriteria::compute cuda::CornernessCriteria::compute
-------------------------------- ---------------------------------
Computes the cornerness criteria at each image pixel. Computes the cornerness criteria at each image pixel.
.. ocv:function:: void gpu::CornernessCriteria::compute(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::CornernessCriteria::compute(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source image. :param src: Source image.
@ -33,11 +33,11 @@ Computes the cornerness criteria at each image pixel.
gpu::createHarrisCorner cuda::createHarrisCorner
----------------------- ------------------------
Creates implementation for Harris cornerness criteria. Creates implementation for Harris cornerness criteria.
.. ocv:function:: Ptr<CornernessCriteria> gpu::createHarrisCorner(int srcType, int blockSize, int ksize, double k, int borderType = BORDER_REFLECT101) .. ocv:function:: Ptr<CornernessCriteria> cuda::createHarrisCorner(int srcType, int blockSize, int ksize, double k, int borderType = BORDER_REFLECT101)
:param srcType: Input source type. Only ``CV_8UC1`` and ``CV_32FC1`` are supported for now. :param srcType: Input source type. Only ``CV_8UC1`` and ``CV_32FC1`` are supported for now.
@ -53,11 +53,11 @@ Creates implementation for Harris cornerness criteria.
gpu::createMinEigenValCorner cuda::createMinEigenValCorner
---------------------------- -----------------------------
Creates implementation for the minimum eigen value of a 2x2 derivative covariation matrix (the cornerness criteria). Creates implementation for the minimum eigen value of a 2x2 derivative covariation matrix (the cornerness criteria).
.. ocv:function:: Ptr<CornernessCriteria> gpu::createMinEigenValCorner(int srcType, int blockSize, int ksize, int borderType = BORDER_REFLECT101) .. ocv:function:: Ptr<CornernessCriteria> cuda::createMinEigenValCorner(int srcType, int blockSize, int ksize, int borderType = BORDER_REFLECT101)
:param srcType: Input source type. Only ``CV_8UC1`` and ``CV_32FC1`` are supported for now. :param srcType: Input source type. Only ``CV_8UC1`` and ``CV_32FC1`` are supported for now.
@ -71,9 +71,9 @@ Creates implementation for the minimum eigen value of a 2x2 derivative covariati
gpu::CornersDetector cuda::CornersDetector
-------------------- ---------------------
.. ocv:class:: gpu::CornersDetector : public Algorithm .. ocv:class:: cuda::CornersDetector : public Algorithm
Base class for Corners Detector. :: Base class for Corners Detector. ::
@ -85,11 +85,11 @@ Base class for Corners Detector. ::
gpu::CornersDetector::detect cuda::CornersDetector::detect
---------------------------- -----------------------------
Determines strong corners on an image. Determines strong corners on an image.
.. ocv:function:: void gpu::CornersDetector::detect(InputArray image, OutputArray corners, InputArray mask = noArray()) .. ocv:function:: void cuda::CornersDetector::detect(InputArray image, OutputArray corners, InputArray mask = noArray())
:param image: Input 8-bit or floating-point 32-bit, single-channel image. :param image: Input 8-bit or floating-point 32-bit, single-channel image.
@ -99,11 +99,11 @@ Determines strong corners on an image.
gpu::createGoodFeaturesToTrackDetector cuda::createGoodFeaturesToTrackDetector
-------------------------------------- ---------------------------------------
Creates implementation for :ocv:class:`gpu::CornersDetector` . Creates implementation for :ocv:class:`cuda::CornersDetector` .
.. ocv:function:: Ptr<CornersDetector> gpu::createGoodFeaturesToTrackDetector(int srcType, int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 0.0, int blockSize = 3, bool useHarrisDetector = false, double harrisK = 0.04) .. ocv:function:: Ptr<CornersDetector> cuda::createGoodFeaturesToTrackDetector(int srcType, int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 0.0, int blockSize = 3, bool useHarrisDetector = false, double harrisK = 0.04)
:param srcType: Input source type. Only ``CV_8UC1`` and ``CV_32FC1`` are supported for now. :param srcType: Input source type. Only ``CV_8UC1`` and ``CV_32FC1`` are supported for now.

@ -5,11 +5,11 @@ Histogram Calculation
gpu::calcHist cuda::calcHist
------------- --------------
Calculates histogram for one channel 8-bit image. Calculates histogram for one channel 8-bit image.
.. ocv:function:: void gpu::calcHist(InputArray src, OutputArray hist, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::calcHist(InputArray src, OutputArray hist, Stream& stream = Stream::Null())
:param src: Source image with ``CV_8UC1`` type. :param src: Source image with ``CV_8UC1`` type.
@ -19,13 +19,13 @@ Calculates histogram for one channel 8-bit image.
gpu::equalizeHist cuda::equalizeHist
----------------- ------------------
Equalizes the histogram of a grayscale image. Equalizes the histogram of a grayscale image.
.. ocv:function:: void gpu::equalizeHist(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::equalizeHist(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::equalizeHist(InputArray src, OutputArray dst, InputOutputArray buf, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::equalizeHist(InputArray src, OutputArray dst, InputOutputArray buf, Stream& stream = Stream::Null())
:param src: Source image with ``CV_8UC1`` type. :param src: Source image with ``CV_8UC1`` type.
@ -39,9 +39,9 @@ Equalizes the histogram of a grayscale image.
gpu::CLAHE cuda::CLAHE
---------- -----------
.. ocv:class:: gpu::CLAHE : public cv::CLAHE .. ocv:class:: cuda::CLAHE : public cv::CLAHE
Base class for Contrast Limited Adaptive Histogram Equalization. :: Base class for Contrast Limited Adaptive Histogram Equalization. ::
@ -54,13 +54,13 @@ Base class for Contrast Limited Adaptive Histogram Equalization. ::
gpu::CLAHE::apply cuda::CLAHE::apply
----------------- ------------------
Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization. Equalizes the histogram of a grayscale image using Contrast Limited Adaptive Histogram Equalization.
.. ocv:function:: void gpu::CLAHE::apply(InputArray src, OutputArray dst) .. ocv:function:: void cuda::CLAHE::apply(InputArray src, OutputArray dst)
.. ocv:function:: void gpu::CLAHE::apply(InputArray src, OutputArray dst, Stream& stream) .. ocv:function:: void cuda::CLAHE::apply(InputArray src, OutputArray dst, Stream& stream)
:param src: Source image with ``CV_8UC1`` type. :param src: Source image with ``CV_8UC1`` type.
@ -70,11 +70,11 @@ Equalizes the histogram of a grayscale image using Contrast Limited Adaptive His
gpu::createCLAHE cuda::createCLAHE
---------------- -----------------
Creates implementation for :ocv:class:`gpu::CLAHE` . Creates implementation for :ocv:class:`cuda::CLAHE` .
.. ocv:function:: Ptr<gpu::CLAHE> createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8)) .. ocv:function:: Ptr<cuda::CLAHE> createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8))
:param clipLimit: Threshold for contrast limiting. :param clipLimit: Threshold for contrast limiting.
@ -83,11 +83,11 @@ Creates implementation for :ocv:class:`gpu::CLAHE` .
gpu::evenLevels cuda::evenLevels
--------------- ----------------
Computes levels with even distribution. Computes levels with even distribution.
.. ocv:function:: void gpu::evenLevels(OutputArray levels, int nLevels, int lowerLevel, int upperLevel) .. ocv:function:: void cuda::evenLevels(OutputArray levels, int nLevels, int lowerLevel, int upperLevel)
:param levels: Destination array. ``levels`` has 1 row, ``nLevels`` columns, and the ``CV_32SC1`` type. :param levels: Destination array. ``levels`` has 1 row, ``nLevels`` columns, and the ``CV_32SC1`` type.
@ -99,17 +99,17 @@ Computes levels with even distribution.
gpu::histEven cuda::histEven
------------- --------------
Calculates a histogram with evenly distributed bins. Calculates a histogram with evenly distributed bins.
.. ocv:function:: void gpu::histEven(InputArray src, OutputArray hist, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histEven(InputArray src, OutputArray hist, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::histEven(InputArray src, OutputArray hist, InputOutputArray buf, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histEven(InputArray src, OutputArray hist, InputOutputArray buf, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::histEven(InputArray src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histEven(InputArray src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null())
.. ocv:function:: void gpu::histEven(InputArray src, GpuMat hist[4], InputOutputArray buf, int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histEven(InputArray src, GpuMat hist[4], InputOutputArray buf, int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream = Stream::Null())
: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. ``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.
@ -127,17 +127,17 @@ Calculates a histogram with evenly distributed bins.
gpu::histRange cuda::histRange
-------------- ---------------
Calculates a histogram with bins determined by the ``levels`` array. Calculates a histogram with bins determined by the ``levels`` array.
.. ocv:function:: void gpu::histRange(InputArray src, OutputArray hist, InputArray levels, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histRange(InputArray src, OutputArray hist, InputArray levels, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::histRange(InputArray src, OutputArray hist, InputArray levels, InputOutputArray buf, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histRange(InputArray src, OutputArray hist, InputArray levels, InputOutputArray buf, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], Stream& stream = Stream::Null())
.. ocv:function:: void gpu::histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], InputOutputArray buf, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::histRange(InputArray src, GpuMat hist[4], const GpuMat levels[4], InputOutputArray buf, Stream& stream = Stream::Null())
: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. ``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.

@ -5,9 +5,9 @@ Hough Transform
gpu::HoughLinesDetector cuda::HoughLinesDetector
----------------------- ------------------------
.. ocv:class:: gpu::HoughLinesDetector : public Algorithm .. ocv:class:: cuda::HoughLinesDetector : public Algorithm
Base class for lines detector algorithm. :: Base class for lines detector algorithm. ::
@ -35,11 +35,11 @@ Base class for lines detector algorithm. ::
gpu::HoughLinesDetector::detect cuda::HoughLinesDetector::detect
------------------------------- --------------------------------
Finds lines in a binary image using the classical Hough transform. Finds lines in a binary image using the classical Hough transform.
.. ocv:function:: void gpu::HoughLinesDetector::detect(InputArray src, OutputArray lines) .. ocv:function:: void cuda::HoughLinesDetector::detect(InputArray src, OutputArray lines)
:param src: 8-bit, single-channel binary source image. :param src: 8-bit, single-channel binary source image.
@ -49,13 +49,13 @@ Finds lines in a binary image using the classical Hough transform.
gpu::HoughLinesDetector::downloadResults cuda::HoughLinesDetector::downloadResults
---------------------------------------- -----------------------------------------
Downloads results from :ocv:func:`gpu::HoughLinesDetector::detect` to host memory. Downloads results from :ocv:func:`cuda::HoughLinesDetector::detect` to host memory.
.. ocv:function:: void gpu::HoughLinesDetector::downloadResults(InputArray d_lines, OutputArray h_lines, OutputArray h_votes = noArray()) .. ocv:function:: void cuda::HoughLinesDetector::downloadResults(InputArray d_lines, OutputArray h_lines, OutputArray h_votes = noArray())
:param d_lines: Result of :ocv:func:`gpu::HoughLinesDetector::detect` . :param d_lines: Result of :ocv:func:`cuda::HoughLinesDetector::detect` .
:param h_lines: Output host array. :param h_lines: Output host array.
@ -63,11 +63,11 @@ Downloads results from :ocv:func:`gpu::HoughLinesDetector::detect` to host memor
gpu::createHoughLinesDetector cuda::createHoughLinesDetector
----------------------------- ------------------------------
Creates implementation for :ocv:class:`gpu::HoughLinesDetector` . Creates implementation for :ocv:class:`cuda::HoughLinesDetector` .
.. ocv:function:: Ptr<HoughLinesDetector> gpu::createHoughLinesDetector(float rho, float theta, int threshold, bool doSort = false, int maxLines = 4096) .. ocv:function:: Ptr<HoughLinesDetector> cuda::createHoughLinesDetector(float rho, float theta, int threshold, bool doSort = false, int maxLines = 4096)
:param rho: Distance resolution of the accumulator in pixels. :param rho: Distance resolution of the accumulator in pixels.
@ -81,9 +81,9 @@ Creates implementation for :ocv:class:`gpu::HoughLinesDetector` .
gpu::HoughSegmentDetector cuda::HoughSegmentDetector
------------------------- --------------------------
.. ocv:class:: gpu::HoughSegmentDetector : public Algorithm .. ocv:class:: cuda::HoughSegmentDetector : public Algorithm
Base class for line segments detector algorithm. :: Base class for line segments detector algorithm. ::
@ -113,11 +113,11 @@ Base class for line segments detector algorithm. ::
* An example using the Hough segment detector can be found at opencv_source_code/samples/gpu/houghlines.cpp * An example using the Hough segment detector can be found at opencv_source_code/samples/gpu/houghlines.cpp
gpu::HoughSegmentDetector::detect cuda::HoughSegmentDetector::detect
--------------------------------- ----------------------------------
Finds line segments in a binary image using the probabilistic Hough transform. Finds line segments in a binary image using the probabilistic Hough transform.
.. ocv:function:: void gpu::HoughSegmentDetector::detect(InputArray src, OutputArray lines) .. ocv:function:: void cuda::HoughSegmentDetector::detect(InputArray src, OutputArray lines)
:param src: 8-bit, single-channel binary source image. :param src: 8-bit, single-channel binary source image.
@ -127,11 +127,11 @@ Finds line segments in a binary image using the probabilistic Hough transform.
gpu::createHoughSegmentDetector cuda::createHoughSegmentDetector
------------------------------- --------------------------------
Creates implementation for :ocv:class:`gpu::HoughSegmentDetector` . Creates implementation for :ocv:class:`cuda::HoughSegmentDetector` .
.. ocv:function:: Ptr<HoughSegmentDetector> gpu::createHoughSegmentDetector(float rho, float theta, int minLineLength, int maxLineGap, int maxLines = 4096) .. ocv:function:: Ptr<HoughSegmentDetector> cuda::createHoughSegmentDetector(float rho, float theta, int minLineLength, int maxLineGap, int maxLines = 4096)
:param rho: Distance resolution of the accumulator in pixels. :param rho: Distance resolution of the accumulator in pixels.
@ -145,9 +145,9 @@ Creates implementation for :ocv:class:`gpu::HoughSegmentDetector` .
gpu::HoughCirclesDetector cuda::HoughCirclesDetector
------------------------- --------------------------
.. ocv:class:: gpu::HoughCirclesDetector : public Algorithm .. ocv:class:: cuda::HoughCirclesDetector : public Algorithm
Base class for circles detector algorithm. :: Base class for circles detector algorithm. ::
@ -180,11 +180,11 @@ Base class for circles detector algorithm. ::
gpu::HoughCirclesDetector::detect cuda::HoughCirclesDetector::detect
--------------------------------- ----------------------------------
Finds circles in a grayscale image using the Hough transform. Finds circles in a grayscale image using the Hough transform.
.. ocv:function:: void gpu::HoughCirclesDetector::detect(InputArray src, OutputArray circles) .. ocv:function:: void cuda::HoughCirclesDetector::detect(InputArray src, OutputArray circles)
:param src: 8-bit, single-channel grayscale input image. :param src: 8-bit, single-channel grayscale input image.
@ -194,11 +194,11 @@ Finds circles in a grayscale image using the Hough transform.
gpu::createHoughCirclesDetector cuda::createHoughCirclesDetector
------------------------------- --------------------------------
Creates implementation for :ocv:class:`gpu::HoughCirclesDetector` . Creates implementation for :ocv:class:`cuda::HoughCirclesDetector` .
.. ocv:function:: Ptr<HoughCirclesDetector> gpu::createHoughCirclesDetector(float dp, float minDist, int cannyThreshold, int votesThreshold, int minRadius, int maxRadius, int maxCircles = 4096) .. ocv:function:: Ptr<HoughCirclesDetector> cuda::createHoughCirclesDetector(float dp, float minDist, int cannyThreshold, int votesThreshold, int minRadius, int maxRadius, int maxCircles = 4096)
:param dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if ``dp=1`` , the accumulator has the same resolution as the input image. If ``dp=2`` , the accumulator has half as big width and height. :param dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if ``dp=1`` , the accumulator has the same resolution as the input image. If ``dp=2`` , the accumulator has half as big width and height.
@ -216,19 +216,19 @@ Creates implementation for :ocv:class:`gpu::HoughCirclesDetector` .
gpu::createGeneralizedHoughBallard cuda::createGeneralizedHoughBallard
---------------------------------- -----------------------------------
Creates implementation for generalized hough transform from [Ballard1981]_ . Creates implementation for generalized hough transform from [Ballard1981]_ .
.. ocv:function:: Ptr<GeneralizedHoughBallard> gpu::createGeneralizedHoughBallard() .. ocv:function:: Ptr<GeneralizedHoughBallard> cuda::createGeneralizedHoughBallard()
gpu::createGeneralizedHoughGuil cuda::createGeneralizedHoughGuil
------------------------------- --------------------------------
Creates implementation for generalized hough transform from [Guil1999]_ . Creates implementation for generalized hough transform from [Guil1999]_ .
.. ocv:function:: Ptr<GeneralizedHoughGuil> gpu::createGeneralizedHoughGuil() .. ocv:function:: Ptr<GeneralizedHoughGuil> cuda::createGeneralizedHoughGuil()

@ -5,9 +5,9 @@ Image Processing
gpu::CannyEdgeDetector cuda::CannyEdgeDetector
---------------------- -----------------------
.. ocv:class:: gpu::CannyEdgeDetector : public Algorithm .. ocv:class:: cuda::CannyEdgeDetector : public Algorithm
Base class for Canny Edge Detector. :: Base class for Canny Edge Detector. ::
@ -32,13 +32,13 @@ Base class for Canny Edge Detector. ::
gpu::CannyEdgeDetector::detect cuda::CannyEdgeDetector::detect
------------------------------ -------------------------------
Finds edges in an image using the [Canny86]_ algorithm. Finds edges in an image using the [Canny86]_ algorithm.
.. ocv:function:: void gpu::CannyEdgeDetector::detect(InputArray image, OutputArray edges) .. ocv:function:: void cuda::CannyEdgeDetector::detect(InputArray image, OutputArray edges)
.. ocv:function:: void gpu::CannyEdgeDetector::detect(InputArray dx, InputArray dy, OutputArray edges) .. ocv:function:: void cuda::CannyEdgeDetector::detect(InputArray dx, InputArray dy, OutputArray edges)
:param image: Single-channel 8-bit input image. :param image: Single-channel 8-bit input image.
@ -50,11 +50,11 @@ Finds edges in an image using the [Canny86]_ algorithm.
gpu::createCannyEdgeDetector cuda::createCannyEdgeDetector
---------------------------- -----------------------------
Creates implementation for :ocv:class:`gpu::CannyEdgeDetector` . Creates implementation for :ocv:class:`cuda::CannyEdgeDetector` .
.. ocv:function:: Ptr<CannyEdgeDetector> gpu::createCannyEdgeDetector(double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false) .. ocv:function:: Ptr<CannyEdgeDetector> cuda::createCannyEdgeDetector(double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false)
:param low_thresh: First threshold for the hysteresis procedure. :param low_thresh: First threshold for the hysteresis procedure.
@ -66,11 +66,11 @@ Creates implementation for :ocv:class:`gpu::CannyEdgeDetector` .
gpu::meanShiftFiltering cuda::meanShiftFiltering
----------------------- ------------------------
Performs mean-shift filtering for each point of the source image. Performs mean-shift filtering for each point of the source image.
.. ocv:function:: void gpu::meanShiftFiltering(InputArray src, OutputArray dst, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::meanShiftFiltering(InputArray src, OutputArray dst, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1), Stream& stream = Stream::Null())
:param src: Source image. Only ``CV_8UC4`` images are supported for now. :param src: Source image. Only ``CV_8UC4`` images are supported for now.
@ -86,11 +86,11 @@ It maps each point of the source image into another point. As a result, you have
gpu::meanShiftProc cuda::meanShiftProc
------------------ -------------------
Performs a mean-shift procedure and stores information about processed points (their colors and positions) in two images. Performs a mean-shift procedure and stores information about processed points (their colors and positions) in two images.
.. ocv:function:: void gpu::meanShiftProc(InputArray src, OutputArray dstr, OutputArray dstsp, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::meanShiftProc(InputArray src, OutputArray dstr, OutputArray dstsp, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1), Stream& stream = Stream::Null())
:param src: Source image. Only ``CV_8UC4`` images are supported for now. :param src: Source image. Only ``CV_8UC4`` images are supported for now.
@ -104,15 +104,15 @@ Performs a mean-shift procedure and stores information about processed points (t
:param criteria: Termination criteria. See :ocv:class:`TermCriteria`. :param criteria: Termination criteria. See :ocv:class:`TermCriteria`.
.. seealso:: :ocv:func:`gpu::meanShiftFiltering` .. seealso:: :ocv:func:`cuda::meanShiftFiltering`
gpu::meanShiftSegmentation cuda::meanShiftSegmentation
-------------------------- ---------------------------
Performs a mean-shift segmentation of the source image and eliminates small segments. Performs a mean-shift segmentation of the source image and eliminates small segments.
.. ocv:function:: void gpu::meanShiftSegmentation(InputArray src, OutputArray dst, int sp, int sr, int minsize, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1)) .. ocv:function:: void cuda::meanShiftSegmentation(InputArray src, OutputArray dst, int sp, int sr, int minsize, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1))
:param src: Source image. Only ``CV_8UC4`` images are supported for now. :param src: Source image. Only ``CV_8UC4`` images are supported for now.
@ -128,9 +128,9 @@ Performs a mean-shift segmentation of the source image and eliminates small segm
gpu::TemplateMatching cuda::TemplateMatching
--------------------- ----------------------
.. ocv:class:: gpu::TemplateMatching : public Algorithm .. ocv:class:: cuda::TemplateMatching : public Algorithm
Base class for Template Matching. :: Base class for Template Matching. ::
@ -142,11 +142,11 @@ Base class for Template Matching. ::
gpu::TemplateMatching::match cuda::TemplateMatching::match
---------------------------- -----------------------------
Computes a proximity map for a raster template and an image where the template is searched for. Computes a proximity map for a raster template and an image where the template is searched for.
.. ocv:function:: void gpu::TemplateMatching::match(InputArray image, InputArray templ, OutputArray result, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::TemplateMatching::match(InputArray image, InputArray templ, OutputArray result, Stream& stream = Stream::Null())
:param image: Source image. :param image: Source image.
@ -158,11 +158,11 @@ Computes a proximity map for a raster template and an image where the template i
gpu::createTemplateMatching cuda::createTemplateMatching
--------------------------- ----------------------------
Creates implementation for :ocv:class:`gpu::TemplateMatching` . Creates implementation for :ocv:class:`cuda::TemplateMatching` .
.. ocv:function:: Ptr<TemplateMatching> gpu::createTemplateMatching(int srcType, int method, Size user_block_size = Size()) .. ocv:function:: Ptr<TemplateMatching> cuda::createTemplateMatching(int srcType, int method, Size user_block_size = Size())
:param srcType: Input source type. ``CV_32F`` and ``CV_8U`` depth images (1..4 channels) are supported for now. :param srcType: Input source type. ``CV_32F`` and ``CV_8U`` depth images (1..4 channels) are supported for now.
@ -188,11 +188,11 @@ The following methods are supported for the ``CV_32F`` images for now:
gpu::bilateralFilter cuda::bilateralFilter
-------------------- ---------------------
Performs bilateral filtering of passed image Performs bilateral filtering of passed image
.. ocv:function:: void gpu::bilateralFilter(InputArray src, OutputArray dst, int kernel_size, float sigma_color, float sigma_spatial, int borderMode=BORDER_DEFAULT, Stream& stream=Stream::Null()) .. ocv:function:: void cuda::bilateralFilter(InputArray src, OutputArray dst, int kernel_size, float sigma_color, float sigma_spatial, int borderMode=BORDER_DEFAULT, Stream& stream=Stream::Null())
:param src: Source image. Supports only (channles != 2 && depth() != CV_8S && depth() != CV_32S && depth() != CV_64F). :param src: Source image. Supports only (channles != 2 && depth() != CV_8S && depth() != CV_32S && depth() != CV_64F).
@ -212,11 +212,11 @@ Performs bilateral filtering of passed image
gpu::blendLinear cuda::blendLinear
------------------- -----------------
Performs linear blending of two images. Performs linear blending of two images.
.. ocv:function:: void gpu::blendLinear(InputArray img1, InputArray img2, InputArray weights1, InputArray weights2, OutputArray result, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::blendLinear(InputArray img1, InputArray img2, InputArray weights1, InputArray weights2, OutputArray result, Stream& stream = Stream::Null())
:param img1: First image. Supports only ``CV_8U`` and ``CV_32F`` depth. :param img1: First image. Supports only ``CV_8U`` and ``CV_32F`` depth.

@ -52,6 +52,7 @@ using namespace cvtest;
PARAM_TEST_CASE(HistEven, cv::cuda::DeviceInfo, cv::Size) PARAM_TEST_CASE(HistEven, cv::cuda::DeviceInfo, cv::Size)
{ {
cv::cuda::DeviceInfo devInfo; cv::cuda::DeviceInfo devInfo;
cv::Size size;
virtual void SetUp() virtual void SetUp()
{ {

@ -1,6 +1,6 @@
**************************************** ******************************************
gpuoptflow. GPU-accelerated Optical Flow cudaoptflow. CUDA-accelerated Optical Flow
**************************************** ******************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -9,9 +9,10 @@ Optical Flow
* A general optical flow example using the Nvidia API can be found at opencv_source_code/samples/gpu/opticalflow_nvidia_api.cpp * A general optical flow example using the Nvidia API can be found at opencv_source_code/samples/gpu/opticalflow_nvidia_api.cpp
gpu::BroxOpticalFlow
-------------------- cuda::BroxOpticalFlow
.. ocv:class:: gpu::BroxOpticalFlow ---------------------
.. ocv:class:: cuda::BroxOpticalFlow
Class computing the optical flow for two images using Brox et al Optical Flow algorithm ([Brox2004]_). :: Class computing the optical flow for two images using Brox et al Optical Flow algorithm ([Brox2004]_). ::
@ -53,9 +54,10 @@ Class computing the optical flow for two images using Brox et al Optical Flow al
* An example illustrating the Brox et al optical flow algorithm can be found at opencv_source_code/samples/gpu/brox_optical_flow.cpp * An example illustrating the Brox et al optical flow algorithm can be found at opencv_source_code/samples/gpu/brox_optical_flow.cpp
gpu::FarnebackOpticalFlow
------------------------- cuda::FarnebackOpticalFlow
.. ocv:class:: gpu::FarnebackOpticalFlow --------------------------
.. ocv:class:: cuda::FarnebackOpticalFlow
Class computing a dense optical flow using the Gunnar Farneback’s algorithm. :: Class computing a dense optical flow using the Gunnar Farneback’s algorithm. ::
@ -93,11 +95,11 @@ Class computing a dense optical flow using the Gunnar Farneback’s algorithm. :
gpu::FarnebackOpticalFlow::operator () cuda::FarnebackOpticalFlow::operator ()
-------------------------------------- ---------------------------------------
Computes a dense optical flow using the Gunnar Farneback’s algorithm. Computes a dense optical flow using the Gunnar Farneback’s algorithm.
.. ocv:function:: void gpu::FarnebackOpticalFlow::operator ()(const GpuMat &frame0, const GpuMat &frame1, GpuMat &flowx, GpuMat &flowy, Stream &s = Stream::Null()) .. ocv:function:: void cuda::FarnebackOpticalFlow::operator ()(const GpuMat &frame0, const GpuMat &frame1, GpuMat &flowx, GpuMat &flowy, Stream &s = Stream::Null())
:param frame0: First 8-bit gray-scale input image :param frame0: First 8-bit gray-scale input image
:param frame1: Second 8-bit gray-scale input image :param frame1: Second 8-bit gray-scale input image
@ -109,17 +111,17 @@ Computes a dense optical flow using the Gunnar Farneback’s algorithm.
gpu::FarnebackOpticalFlow::releaseMemory cuda::FarnebackOpticalFlow::releaseMemory
---------------------------------------- -----------------------------------------
Releases unused auxiliary memory buffers. Releases unused auxiliary memory buffers.
.. ocv:function:: void gpu::FarnebackOpticalFlow::releaseMemory() .. ocv:function:: void cuda::FarnebackOpticalFlow::releaseMemory()
gpu::PyrLKOpticalFlow cuda::PyrLKOpticalFlow
--------------------- ----------------------
.. ocv:class:: gpu::PyrLKOpticalFlow .. ocv:class:: cuda::PyrLKOpticalFlow
Class used for calculating an optical flow. :: Class used for calculating an optical flow. ::
@ -150,11 +152,12 @@ The class can calculate an optical flow for a sparse feature set or dense optica
* An example of the Lucas Kanade optical flow algorithm can be found at opencv_source_code/samples/gpu/pyrlk_optical_flow.cpp * An example of the Lucas Kanade optical flow algorithm can be found at opencv_source_code/samples/gpu/pyrlk_optical_flow.cpp
gpu::PyrLKOpticalFlow::sparse
----------------------------- cuda::PyrLKOpticalFlow::sparse
------------------------------
Calculate an optical flow for a sparse feature set. Calculate an optical flow for a sparse feature set.
.. ocv:function:: void gpu::PyrLKOpticalFlow::sparse(const GpuMat& prevImg, const GpuMat& nextImg, const GpuMat& prevPts, GpuMat& nextPts, GpuMat& status, GpuMat* err = 0) .. ocv:function:: void cuda::PyrLKOpticalFlow::sparse(const GpuMat& prevImg, const GpuMat& nextImg, const GpuMat& prevPts, GpuMat& nextPts, GpuMat& status, GpuMat* err = 0)
:param prevImg: First 8-bit input image (supports both grayscale and color images). :param prevImg: First 8-bit input image (supports both grayscale and color images).
@ -172,11 +175,11 @@ Calculate an optical flow for a sparse feature set.
gpu::PyrLKOpticalFlow::dense cuda::PyrLKOpticalFlow::dense
----------------------------- -----------------------------
Calculate dense optical flow. Calculate dense optical flow.
.. ocv:function:: void gpu::PyrLKOpticalFlow::dense(const GpuMat& prevImg, const GpuMat& nextImg, GpuMat& u, GpuMat& v, GpuMat* err = 0) .. ocv:function:: void cuda::PyrLKOpticalFlow::dense(const GpuMat& prevImg, const GpuMat& nextImg, GpuMat& u, GpuMat& v, GpuMat* err = 0)
:param prevImg: First 8-bit grayscale input image. :param prevImg: First 8-bit grayscale input image.
@ -190,19 +193,19 @@ Calculate dense optical flow.
gpu::PyrLKOpticalFlow::releaseMemory cuda::PyrLKOpticalFlow::releaseMemory
------------------------------------ -------------------------------------
Releases inner buffers memory. Releases inner buffers memory.
.. ocv:function:: void gpu::PyrLKOpticalFlow::releaseMemory() .. ocv:function:: void cuda::PyrLKOpticalFlow::releaseMemory()
gpu::interpolateFrames cuda::interpolateFrames
---------------------- -----------------------
Interpolates frames (images) using provided optical flow (displacement field). Interpolates frames (images) using provided optical flow (displacement field).
.. ocv:function:: void gpu::interpolateFrames(const GpuMat& frame0, const GpuMat& frame1, const GpuMat& fu, const GpuMat& fv, const GpuMat& bu, const GpuMat& bv, float pos, GpuMat& newFrame, GpuMat& buf, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::interpolateFrames(const GpuMat& frame0, const GpuMat& frame1, const GpuMat& fu, const GpuMat& fv, const GpuMat& bu, const GpuMat& bv, float pos, GpuMat& newFrame, GpuMat& buf, Stream& stream = Stream::Null())
:param frame0: First frame (32-bit floating point images, single channel). :param frame0: First frame (32-bit floating point images, single channel).

@ -1,6 +1,6 @@
************************************************ **************************************************
gpustereo. GPU-accelerated Stereo Correspondence cudastereo. CUDA-accelerated Stereo Correspondence
************************************************ **************************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -9,9 +9,11 @@ Stereo Correspondence
* A stereo matching example using several GPU's can be found at opencv_source_code/samples/gpu/stereo_multi.cpp * A stereo matching example using several GPU's can be found at opencv_source_code/samples/gpu/stereo_multi.cpp
* A stereo matching example using several GPU's and driver API can be found at opencv_source_code/samples/gpu/driver_api_stereo_multi.cpp * A stereo matching example using several GPU's and driver API can be found at opencv_source_code/samples/gpu/driver_api_stereo_multi.cpp
gpu::StereoBM
-------------
.. ocv:class:: gpu::StereoBM : public cv::StereoBM cuda::StereoBM
--------------
.. ocv:class:: cuda::StereoBM : public cv::StereoBM
Class computing stereo correspondence (disparity map) using the block matching algorithm. :: Class computing stereo correspondence (disparity map) using the block matching algorithm. ::
@ -19,11 +21,11 @@ Class computing stereo correspondence (disparity map) using the block matching a
gpu::createStereoBM cuda::createStereoBM
------------------- --------------------
Creates StereoBM object. Creates StereoBM object.
.. ocv:function:: Ptr<gpu::StereoBM> gpu::createStereoBM(int numDisparities = 64, int blockSize = 19) .. ocv:function:: Ptr<cuda::StereoBM> cuda::createStereoBM(int numDisparities = 64, int blockSize = 19)
:param numDisparities: the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to ``numDisparities``. The search range can then be shifted by changing the minimum disparity. :param numDisparities: the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to ``numDisparities``. The search range can then be shifted by changing the minimum disparity.
@ -31,9 +33,9 @@ Creates StereoBM object.
gpu::StereoBeliefPropagation cuda::StereoBeliefPropagation
---------------------------- -----------------------------
.. ocv:class:: gpu::StereoBeliefPropagation : public cv::StereoMatcher .. ocv:class:: cuda::StereoBeliefPropagation : public cv::StereoMatcher
Class computing stereo correspondence using the belief propagation algorithm. :: Class computing stereo correspondence using the belief propagation algorithm. ::
@ -118,11 +120,11 @@ By default, ``StereoBeliefPropagation`` uses floating-point arithmetics and the
gpu::createStereoBeliefPropagation cuda::createStereoBeliefPropagation
---------------------------------- -----------------------------------
Creates StereoBeliefPropagation object. Creates StereoBeliefPropagation object.
.. ocv:function:: Ptr<gpu::StereoBeliefPropagation> gpu::createStereoBeliefPropagation(int ndisp = 64, int iters = 5, int levels = 5, int msg_type = CV_32F) .. ocv:function:: Ptr<cuda::StereoBeliefPropagation> cuda::createStereoBeliefPropagation(int ndisp = 64, int iters = 5, int levels = 5, int msg_type = CV_32F)
:param ndisp: Number of disparities. :param ndisp: Number of disparities.
@ -134,19 +136,19 @@ Creates StereoBeliefPropagation object.
gpu::StereoBeliefPropagation::estimateRecommendedParams cuda::StereoBeliefPropagation::estimateRecommendedParams
------------------------------------------------------- --------------------------------------------------------
Uses a heuristic method to compute the recommended parameters ( ``ndisp``, ``iters`` and ``levels`` ) for the specified image size ( ``width`` and ``height`` ). Uses a heuristic method to compute the recommended parameters ( ``ndisp``, ``iters`` and ``levels`` ) for the specified image size ( ``width`` and ``height`` ).
.. ocv:function:: void gpu::StereoBeliefPropagation::estimateRecommendedParams(int width, int height, int& ndisp, int& iters, int& levels) .. ocv:function:: void cuda::StereoBeliefPropagation::estimateRecommendedParams(int width, int height, int& ndisp, int& iters, int& levels)
gpu::StereoBeliefPropagation::compute cuda::StereoBeliefPropagation::compute
------------------------------------- --------------------------------------
Enables the stereo correspondence operator that finds the disparity for the specified data cost. Enables the stereo correspondence operator that finds the disparity for the specified data cost.
.. ocv:function:: void gpu::StereoBeliefPropagation::compute(InputArray data, OutputArray disparity, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::StereoBeliefPropagation::compute(InputArray data, OutputArray disparity, Stream& stream = Stream::Null())
:param data: User-specified data cost, a matrix of ``msg_type`` type and ``Size(<image columns>*ndisp, <image rows>)`` size. :param data: User-specified data cost, a matrix of ``msg_type`` type and ``Size(<image columns>*ndisp, <image rows>)`` size.
@ -156,13 +158,13 @@ Enables the stereo correspondence operator that finds the disparity for the spec
gpu::StereoConstantSpaceBP cuda::StereoConstantSpaceBP
-------------------------- ---------------------------
.. ocv:class:: gpu::StereoConstantSpaceBP : public gpu::StereoBeliefPropagation .. ocv:class:: cuda::StereoConstantSpaceBP : public cuda::StereoBeliefPropagation
Class computing stereo correspondence using the constant space belief propagation algorithm. :: Class computing stereo correspondence using the constant space belief propagation algorithm. ::
class CV_EXPORTS StereoConstantSpaceBP : public gpu::StereoBeliefPropagation class CV_EXPORTS StereoConstantSpaceBP : public cuda::StereoBeliefPropagation
{ {
public: public:
//! number of active disparity on the first level //! number of active disparity on the first level
@ -198,11 +200,11 @@ By default, ``StereoConstantSpaceBP`` uses floating-point arithmetics and the ``
gpu::createStereoConstantSpaceBP cuda::createStereoConstantSpaceBP
-------------------------------- ---------------------------------
Creates StereoConstantSpaceBP object. Creates StereoConstantSpaceBP object.
.. ocv:function:: Ptr<gpu::StereoConstantSpaceBP> gpu::createStereoConstantSpaceBP(int ndisp = 128, int iters = 8, int levels = 4, int nr_plane = 4, int msg_type = CV_32F) .. ocv:function:: Ptr<cuda::StereoConstantSpaceBP> cuda::createStereoConstantSpaceBP(int ndisp = 128, int iters = 8, int levels = 4, int nr_plane = 4, int msg_type = CV_32F)
:param ndisp: Number of disparities. :param ndisp: Number of disparities.
@ -216,17 +218,17 @@ Creates StereoConstantSpaceBP object.
gpu::StereoConstantSpaceBP::estimateRecommendedParams cuda::StereoConstantSpaceBP::estimateRecommendedParams
----------------------------------------------------- ------------------------------------------------------
Uses a heuristic method to compute parameters (ndisp, iters, levelsand nrplane) for the specified image size (widthand height). Uses a heuristic method to compute parameters (ndisp, iters, levelsand nrplane) for the specified image size (widthand height).
.. ocv:function:: void gpu::StereoConstantSpaceBP::estimateRecommendedParams(int width, int height, int& ndisp, int& iters, int& levels, int& nr_plane) .. ocv:function:: void cuda::StereoConstantSpaceBP::estimateRecommendedParams(int width, int height, int& ndisp, int& iters, int& levels, int& nr_plane)
gpu::DisparityBilateralFilter cuda::DisparityBilateralFilter
----------------------------- ------------------------------
.. ocv:class:: gpu::DisparityBilateralFilter : public cv::Algorithm .. ocv:class:: cuda::DisparityBilateralFilter : public cv::Algorithm
Class refining a disparity map using joint bilateral filtering. :: Class refining a disparity map using joint bilateral filtering. ::
@ -264,11 +266,11 @@ The class implements [Yang2010]_ algorithm.
gpu::createDisparityBilateralFilter cuda::createDisparityBilateralFilter
----------------------------------- ------------------------------------
Creates DisparityBilateralFilter object. Creates DisparityBilateralFilter object.
.. ocv:function:: Ptr<gpu::DisparityBilateralFilter> gpu::createDisparityBilateralFilter(int ndisp = 64, int radius = 3, int iters = 1) .. ocv:function:: Ptr<cuda::DisparityBilateralFilter> cuda::createDisparityBilateralFilter(int ndisp = 64, int radius = 3, int iters = 1)
:param ndisp: Number of disparities. :param ndisp: Number of disparities.
@ -278,11 +280,11 @@ Creates DisparityBilateralFilter object.
gpu::DisparityBilateralFilter::apply cuda::DisparityBilateralFilter::apply
------------------------------------ -------------------------------------
Refines a disparity map using joint bilateral filtering. Refines a disparity map using joint bilateral filtering.
.. ocv:function:: void gpu::DisparityBilateralFilter::apply(InputArray disparity, InputArray image, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::DisparityBilateralFilter::apply(InputArray disparity, InputArray image, OutputArray dst, Stream& stream = Stream::Null())
:param disparity: Input disparity map. ``CV_8UC1`` and ``CV_16SC1`` types are supported. :param disparity: Input disparity map. ``CV_8UC1`` and ``CV_16SC1`` types are supported.
@ -294,11 +296,11 @@ Refines a disparity map using joint bilateral filtering.
gpu::reprojectImageTo3D cuda::reprojectImageTo3D
----------------------- ------------------------
Reprojects a disparity image to 3D space. Reprojects a disparity image to 3D space.
.. ocv:function:: void gpu::reprojectImageTo3D(InputArray disp, OutputArray xyzw, InputArray Q, int dst_cn = 4, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::reprojectImageTo3D(InputArray disp, OutputArray xyzw, InputArray Q, int dst_cn = 4, Stream& stream = Stream::Null())
:param disp: Input disparity image. ``CV_8U`` and ``CV_16S`` types are supported. :param disp: Input disparity image. ``CV_8U`` and ``CV_16S`` types are supported.
@ -314,11 +316,11 @@ Reprojects a disparity image to 3D space.
gpu::drawColorDisp cuda::drawColorDisp
------------------ -------------------
Colors a disparity image. Colors a disparity image.
.. ocv:function:: void gpu::drawColorDisp(InputArray src_disp, OutputArray dst_disp, int ndisp, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::drawColorDisp(InputArray src_disp, OutputArray dst_disp, int ndisp, Stream& stream = Stream::Null())
:param src_disp: Source disparity image. ``CV_8UC1`` and ``CV_16SC1`` types are supported. :param src_disp: Source disparity image. ``CV_8UC1`` and ``CV_16SC1`` types are supported.

@ -1,6 +1,6 @@
***************************************** *******************************************
gpuwarping. GPU-accelerated Image Warping cudawarping. CUDA-accelerated Image Warping
***************************************** *******************************************
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1

@ -5,11 +5,11 @@ Image Warping
gpu::remap cuda::remap
-------------- -----------
Applies a generic geometrical transformation to an image. Applies a generic geometrical transformation to an image.
.. ocv:function:: void gpu::remap(InputArray src, OutputArray dst, InputArray xmap, InputArray ymap, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::remap(InputArray src, OutputArray dst, InputArray xmap, InputArray ymap, int interpolation, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null())
:param src: Source image. :param src: Source image.
@ -39,11 +39,11 @@ Values of pixels with non-integer coordinates are computed using the bilinear in
gpu::resize cuda::resize
--------------- ------------
Resizes an image. Resizes an image.
.. ocv:function:: void gpu::resize(InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation = INTER_LINEAR, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::resize(InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation = INTER_LINEAR, Stream& stream = Stream::Null())
:param src: Source image. :param src: Source image.
@ -76,11 +76,11 @@ Resizes an image.
gpu::warpAffine cuda::warpAffine
------------------- ----------------
Applies an affine transformation to an image. Applies an affine transformation to an image.
.. ocv:function:: void gpu::warpAffine(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::warpAffine(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null())
:param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported. :param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported.
@ -98,11 +98,11 @@ Applies an affine transformation to an image.
gpu::buildWarpAffineMaps cuda::buildWarpAffineMaps
------------------------ -------------------------
Builds transformation maps for affine transformation. Builds transformation maps for affine transformation.
.. ocv:function:: void gpu::buildWarpAffineMaps(InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::buildWarpAffineMaps(InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null())
:param M: *2x3* transformation matrix. :param M: *2x3* transformation matrix.
@ -116,15 +116,15 @@ Builds transformation maps for affine transformation.
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`gpu::warpAffine` , :ocv:func:`gpu::remap` .. seealso:: :ocv:func:`cuda::warpAffine` , :ocv:func:`cuda::remap`
gpu::warpPerspective cuda::warpPerspective
------------------------ ---------------------
Applies a perspective transformation to an image. Applies a perspective transformation to an image.
.. ocv:function:: void gpu::warpPerspective(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null()) .. ocv:function:: void cuda::warpPerspective(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags = INTER_LINEAR, int borderMode = BORDER_CONSTANT, Scalar borderValue = Scalar(), Stream& stream = Stream::Null())
:param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported. :param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or ``CV_32F`` depth and 1, 3, or 4 channels are supported.
@ -142,11 +142,11 @@ Applies a perspective transformation to an image.
gpu::buildWarpPerspectiveMaps cuda::buildWarpPerspectiveMaps
----------------------------- ------------------------------
Builds transformation maps for perspective transformation. Builds transformation maps for perspective transformation.
.. ocv:function:: void gpu::buildWarpAffineMaps(InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::buildWarpAffineMaps(InputArray M, bool inverse, Size dsize, OutputArray xmap, OutputArray ymap, Stream& stream = Stream::Null())
:param M: *3x3* transformation matrix. :param M: *3x3* transformation matrix.
@ -160,45 +160,45 @@ Builds transformation maps for perspective transformation.
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`gpu::warpPerspective` , :ocv:func:`gpu::remap` .. seealso:: :ocv:func:`cuda::warpPerspective` , :ocv:func:`cuda::remap`
gpu::buildWarpPlaneMaps cuda::buildWarpPlaneMaps
----------------------- ------------------------
Builds plane warping maps. Builds plane warping maps.
.. ocv:function:: void gpu::buildWarpPlaneMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, InputArray T, float scale, OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::buildWarpPlaneMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, InputArray T, float scale, OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null())
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
gpu::buildWarpCylindricalMaps cuda::buildWarpCylindricalMaps
----------------------------- ------------------------------
Builds cylindrical warping maps. Builds cylindrical warping maps.
.. ocv:function:: void gpu::buildWarpCylindricalMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, float scale, OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::buildWarpCylindricalMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, float scale, OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null())
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
gpu::buildWarpSphericalMaps cuda::buildWarpSphericalMaps
--------------------------- ----------------------------
Builds spherical warping maps. Builds spherical warping maps.
.. ocv:function:: void gpu::buildWarpSphericalMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, float scale, OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::buildWarpSphericalMaps(Size src_size, Rect dst_roi, InputArray K, InputArray R, float scale, OutputArray map_x, OutputArray map_y, Stream& stream = Stream::Null())
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
gpu::rotate cuda::rotate
--------------- ------------
Rotates an image around the origin (0,0) and then shifts it. Rotates an image around the origin (0,0) and then shifts it.
.. ocv:function:: void gpu::rotate(InputArray src, OutputArray dst, Size dsize, double angle, double xShift = 0, double yShift = 0, int interpolation = INTER_LINEAR, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::rotate(InputArray src, OutputArray dst, Size dsize, double angle, double xShift = 0, double yShift = 0, int interpolation = INTER_LINEAR, Stream& stream = Stream::Null())
:param src: Source image. Supports 1, 3 or 4 channels images with ``CV_8U`` , ``CV_16U`` or ``CV_32F`` depth. :param src: Source image. Supports 1, 3 or 4 channels images with ``CV_8U`` , ``CV_16U`` or ``CV_32F`` depth.
@ -216,15 +216,15 @@ Rotates an image around the origin (0,0) and then shifts it.
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
.. seealso:: :ocv:func:`gpu::warpAffine` .. seealso:: :ocv:func:`cuda::warpAffine`
gpu::pyrDown cuda::pyrDown
------------------- -------------
Smoothes an image and downsamples it. Smoothes an image and downsamples it.
.. ocv:function:: void gpu::pyrDown(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::pyrDown(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source image. :param src: Source image.
@ -236,11 +236,11 @@ Smoothes an image and downsamples it.
gpu::pyrUp cuda::pyrUp
------------------- -----------
Upsamples an image and then smoothes it. Upsamples an image and then smoothes it.
.. ocv:function:: void gpu::pyrUp(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) .. ocv:function:: void cuda::pyrUp(InputArray src, OutputArray dst, Stream& stream = Stream::Null())
:param src: Source image. :param src: Source image.

@ -142,13 +142,13 @@ The function is parallelized with the TBB library.
If you are using the C version, make sure you call ``cv::initModule_nonfree()`` from ``nonfree/nonfree.hpp``. If you are using the C version, make sure you call ``cv::initModule_nonfree()`` from ``nonfree/nonfree.hpp``.
gpu::SURF_GPU cuda::SURF_CUDA
------------- ---------------
.. ocv:class:: gpu::SURF_GPU .. ocv:class:: cuda::SURF_CUDA
Class used for extracting Speeded Up Robust Features (SURF) from an image. :: Class used for extracting Speeded Up Robust Features (SURF) from an image. ::
class SURF_GPU class SURF_CUDA
{ {
public: public:
enum KeypointLayout enum KeypointLayout
@ -164,9 +164,9 @@ Class used for extracting Speeded Up Robust Features (SURF) from an image. ::
}; };
//! the default constructor //! the default constructor
SURF_GPU(); SURF_CUDA();
//! the full constructor taking all the necessary parameters //! the full constructor taking all the necessary parameters
explicit SURF_GPU(double _hessianThreshold, int _nOctaves=4, explicit SURF_CUDA(double _hessianThreshold, int _nOctaves=4,
int _nOctaveLayers=2, bool _extended=false, float _keypointsRatio=0.01f); int _nOctaveLayers=2, bool _extended=false, float _keypointsRatio=0.01f);
//! returns the descriptor size in float's (64 or 128) //! returns the descriptor size in float's (64 or 128)
@ -225,9 +225,9 @@ Class used for extracting Speeded Up Robust Features (SURF) from an image. ::
}; };
The class ``SURF_GPU`` implements Speeded Up Robust Features descriptor. There is a fast multi-scale Hessian keypoint detector that can be used to find the keypoints (which is the default option). But the descriptors can also be computed for the user-specified keypoints. Only 8-bit grayscale images are supported. The class ``SURF_CUDA`` implements Speeded Up Robust Features descriptor. There is a fast multi-scale Hessian keypoint detector that can be used to find the keypoints (which is the default option). But the descriptors can also be computed for the user-specified keypoints. Only 8-bit grayscale images are supported.
The class ``SURF_GPU`` can store results in the GPU and CPU memory. It provides functions to convert results between CPU and GPU version ( ``uploadKeypoints``, ``downloadKeypoints``, ``downloadDescriptors`` ). The format of CPU results is the same as ``SURF`` results. GPU results are stored in ``GpuMat``. The ``keypoints`` matrix is :math:`\texttt{nFeatures} \times 7` matrix with the ``CV_32FC1`` type. The class ``SURF_CUDA`` can store results in the GPU and CPU memory. It provides functions to convert results between CPU and GPU version ( ``uploadKeypoints``, ``downloadKeypoints``, ``downloadDescriptors`` ). The format of CPU results is the same as ``SURF`` results. GPU results are stored in ``GpuMat``. The ``keypoints`` matrix is :math:`\texttt{nFeatures} \times 7` matrix with the ``CV_32FC1`` type.
* ``keypoints.ptr<float>(X_ROW)[i]`` contains x coordinate of the i-th feature. * ``keypoints.ptr<float>(X_ROW)[i]`` contains x coordinate of the i-th feature.
* ``keypoints.ptr<float>(Y_ROW)[i]`` contains y coordinate of the i-th feature. * ``keypoints.ptr<float>(Y_ROW)[i]`` contains y coordinate of the i-th feature.
@ -239,7 +239,7 @@ The class ``SURF_GPU`` can store results in the GPU and CPU memory. It provides
The ``descriptors`` matrix is :math:`\texttt{nFeatures} \times \texttt{descriptorSize}` matrix with the ``CV_32FC1`` type. The ``descriptors`` matrix is :math:`\texttt{nFeatures} \times \texttt{descriptorSize}` matrix with the ``CV_32FC1`` type.
The class ``SURF_GPU`` uses some buffers and provides access to it. All buffers can be safely released between function calls. The class ``SURF_CUDA`` uses some buffers and provides access to it. All buffers can be safely released between function calls.
.. seealso:: :ocv:class:`SURF` .. seealso:: :ocv:class:`SURF`

@ -99,11 +99,11 @@ The function converts images to CIELAB colorspace and then separately denoise L
gpu::nonLocalMeans cuda::nonLocalMeans
------------------- -------------------
Performs pure non local means denoising without any simplification, and thus it is not fast. Performs pure non local means denoising without any simplification, and thus it is not fast.
.. ocv:function:: void gpu::nonLocalMeans(const GpuMat& src, GpuMat& dst, float h, int search_window = 21, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& s = Stream::Null()) .. ocv:function:: void cuda::nonLocalMeans(const GpuMat& src, GpuMat& dst, float h, int search_window = 21, int block_size = 7, int borderMode = BORDER_DEFAULT, Stream& s = Stream::Null())
:param src: Source image. Supports only CV_8UC1, CV_8UC2 and CV_8UC3. :param src: Source image. Supports only CV_8UC1, CV_8UC2 and CV_8UC3.
@ -125,9 +125,9 @@ Performs pure non local means denoising without any simplification, and thus it
gpu::FastNonLocalMeansDenoising cuda::FastNonLocalMeansDenoising
------------------------------- --------------------------------
.. ocv:class:: gpu::FastNonLocalMeansDenoising .. ocv:class:: cuda::FastNonLocalMeansDenoising
:: ::
@ -144,11 +144,11 @@ The class implements fast approximate Non Local Means Denoising algorithm.
gpu::FastNonLocalMeansDenoising::simpleMethod() cuda::FastNonLocalMeansDenoising::simpleMethod()
----------------------------------------------- ------------------------------------------------
Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising with several computational optimizations. Noise expected to be a gaussian white noise Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising with several computational optimizations. Noise expected to be a gaussian white noise
.. ocv:function:: void gpu::FastNonLocalMeansDenoising::simpleMethod(const GpuMat& src, GpuMat& dst, float h, int search_window = 21, int block_size = 7, Stream& s = Stream::Null()) .. ocv:function:: void cuda::FastNonLocalMeansDenoising::simpleMethod(const GpuMat& src, GpuMat& dst, float h, int search_window = 21, int block_size = 7, Stream& s = Stream::Null())
:param src: Input 8-bit 1-channel, 2-channel or 3-channel image. :param src: Input 8-bit 1-channel, 2-channel or 3-channel image.
@ -170,11 +170,11 @@ This function expected to be applied to grayscale images. For colored images loo
gpu::FastNonLocalMeansDenoising::labMethod() cuda::FastNonLocalMeansDenoising::labMethod()
-------------------------------------------- ---------------------------------------------
Modification of ``FastNonLocalMeansDenoising::simpleMethod`` for color images Modification of ``FastNonLocalMeansDenoising::simpleMethod`` for color images
.. ocv:function:: void gpu::FastNonLocalMeansDenoising::labMethod(const GpuMat& src, GpuMat& dst, float h_luminance, float h_color, int search_window = 21, int block_size = 7, Stream& s = Stream::Null()) .. ocv:function:: void cuda::FastNonLocalMeansDenoising::labMethod(const GpuMat& src, GpuMat& dst, float h_luminance, float h_color, int search_window = 21, int block_size = 7, Stream& s = Stream::Null())
:param src: Input 8-bit 3-channel image. :param src: Input 8-bit 3-channel image.

Loading…
Cancel
Save