Commit 57195e96 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed SURF_GPU bug (features count > max dimension of grid)

minor gpu docs fixes
parent d0e66f77
...@@ -150,7 +150,7 @@ The class for computing stereo correspondence using belief propagation algorithm ...@@ -150,7 +150,7 @@ The class for computing stereo correspondence using belief propagation algorithm
... ...
}; };
The class implements Pedro F. Felzenszwalb algorithm [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006.]. It can compute own data cost (using truncated linear model) or use user-provided data cost. The class implements Pedro F. Felzenszwalb algorithm [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006]. It can compute own data cost (using truncated linear model) or use user-provided data cost.
**Please note:** ``StereoBeliefPropagation`` requires a lot of memory: **Please note:** ``StereoBeliefPropagation`` requires a lot of memory:
...@@ -162,7 +162,7 @@ for message storage and ...@@ -162,7 +162,7 @@ for message storage and
.. math:: .. math::
width\_step \cdot height \cdot ndisp \cdot (1 + 0.25 + 0.0625 + \dotsm + \frac{1}{4^{levels}} width\_step \cdot height \cdot ndisp \cdot (1 + 0.25 + 0.0625 + \dotsm + \frac{1}{4^{levels}})
for data cost storage. ``width_step`` is the number of bytes in a line including the padding. for data cost storage. ``width_step`` is the number of bytes in a line including the padding.
...@@ -204,7 +204,7 @@ gpu::StereoBeliefPropagation::StereoBeliefPropagation ...@@ -204,7 +204,7 @@ gpu::StereoBeliefPropagation::StereoBeliefPropagation
DiscTerm = \min(disc\_single\_jump \cdot \lvert f_1-f_2 \rvert, max\_disc\_term) DiscTerm = \min(disc\_single\_jump \cdot \lvert f_1-f_2 \rvert, max\_disc\_term)
For more details please see [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006.]. For more details please see [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006].
By default :cpp:class:`StereoBeliefPropagation` uses floating-point arithmetics and ``CV_32FC1`` type for messages. But also it can use fixed-point arithmetics and ``CV_16SC1`` type for messages for better perfomance. To avoid overflow in this case, the parameters must satisfy By default :cpp:class:`StereoBeliefPropagation` uses floating-point arithmetics and ``CV_32FC1`` type for messages. But also it can use fixed-point arithmetics and ``CV_16SC1`` type for messages for better perfomance. To avoid overflow in this case, the parameters must satisfy
......
...@@ -294,7 +294,7 @@ gpu::Stream::waitForCompletion ...@@ -294,7 +294,7 @@ gpu::Stream::waitForCompletion
gpu::StreamAccessor gpu::StreamAccessor
------------------- -------------------
.. c:type:: gpu::StreamAccessor .. cpp:class:: gpu::StreamAccessor
This class provides possibility to get ``cudaStream_t`` from :cpp:class:`gpu::Stream`. This class is declared in ``stream_accessor.hpp`` because that is only public header that depend on Cuda Runtime API. Including it will bring the dependency to your code. :: This class provides possibility to get ``cudaStream_t`` from :cpp:class:`gpu::Stream`. This class is declared in ``stream_accessor.hpp`` because that is only public header that depend on Cuda Runtime API. Including it will bring the dependency to your code. ::
......
...@@ -163,7 +163,7 @@ gpu::cornerMinEigenVal ...@@ -163,7 +163,7 @@ gpu::cornerMinEigenVal
:param borderType: Pixel extrapolation method. Only ``BORDER_REFLECT101`` and ``BORDER_REPLICATE`` are supported for now. :param borderType: Pixel extrapolation method. Only ``BORDER_REFLECT101`` and ``BORDER_REPLICATE`` are supported for now.
See also: :c:func:`cornerMinEigenValue`. See also: :c:func:`cornerMinEigenVal`.
...@@ -279,7 +279,7 @@ gpu::convolve ...@@ -279,7 +279,7 @@ gpu::convolve
gpu::ConvolveBuf gpu::ConvolveBuf
---------------- ----------------
.. c:type:: gpu::ConvolveBuf .. cpp:class:: gpu::ConvolveBuf
Memory buffer for the :cpp:func:`gpu::convolve` function. :: Memory buffer for the :cpp:func:`gpu::convolve` function. ::
......
...@@ -185,7 +185,7 @@ gpu::DeviceInfo::isCompatible ...@@ -185,7 +185,7 @@ gpu::DeviceInfo::isCompatible
gpu::TargetArchs gpu::TargetArchs
---------------- ----------------
.. c:type:: gpu::TargetArchs .. cpp:class:: gpu::TargetArchs
This class provides functionality (as set of static methods) for checking which NVIDIA card architectures the GPU module was built for. This class provides functionality (as set of static methods) for checking which NVIDIA card architectures the GPU module was built for.
...@@ -223,7 +223,7 @@ According to the CUDA C Programming Guide Version 3.2: "PTX code produced for so ...@@ -223,7 +223,7 @@ According to the CUDA C Programming Guide Version 3.2: "PTX code produced for so
gpu::MultiGpuManager gpu::MultiGpuManager
-------------------- --------------------
.. c:type:: gpu::MultiGpuManager .. cpp:class:: gpu::MultiGpuManager
Provides functionality for working with many GPUs. :: Provides functionality for working with many GPUs. ::
......
...@@ -1576,7 +1576,7 @@ namespace cv ...@@ -1576,7 +1576,7 @@ namespace cv
void operator()(const GpuMat& img, const GpuMat& mask, std::vector<KeyPoint>& keypoints, std::vector<float>& descriptors, void operator()(const GpuMat& img, const GpuMat& mask, std::vector<KeyPoint>& keypoints, std::vector<float>& descriptors,
bool useProvidedKeypoints = false); bool useProvidedKeypoints = false);
//! max keypoints = keypointsRatio * img.size().area() //! max keypoints = min(keypointsRatio * img.size().area(), 65535)
float keypointsRatio; float keypointsRatio;
bool upright; bool upright;
......
...@@ -101,9 +101,9 @@ namespace ...@@ -101,9 +101,9 @@ namespace
CV_Assert(nOctaves > 0 && nOctaveLayers > 0); CV_Assert(nOctaves > 0 && nOctaveLayers > 0);
CV_Assert(TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS)); CV_Assert(TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS));
maxKeypoints = static_cast<int>(img.size().area() * surf.keypointsRatio); maxKeypoints = min(static_cast<int>(img.size().area() * surf.keypointsRatio), 65535);
maxFeatures = static_cast<int>(1.5 * maxKeypoints); maxFeatures = min(static_cast<int>(1.5 * maxKeypoints), 65535);
maxCandidates = static_cast<int>(1.5 * maxFeatures); maxCandidates = min(static_cast<int>(1.5 * maxFeatures), 65535);
CV_Assert(maxKeypoints > 0); CV_Assert(maxKeypoints > 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment