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

minor gpu docs fixes
pull/13383/head
Vladislav Vinogradov 14 years ago
parent d0e66f7766
commit 57195e9627
  1. 6
      modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst
  2. 2
      modules/gpu/doc/data_structures.rst
  3. 4
      modules/gpu/doc/image_processing.rst
  4. 4
      modules/gpu/doc/initalization_and_information.rst
  5. 2
      modules/gpu/include/opencv2/gpu/gpu.hpp
  6. 6
      modules/gpu/src/surf.cpp

@ -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:
@ -162,7 +162,7 @@ for message storage and
.. 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.
@ -204,7 +204,7 @@ gpu::StereoBeliefPropagation::StereoBeliefPropagation
DiscTerm = \min(disc\_single\_jump \cdot \lvert f_1-f_2 \rvert, max\_disc\_term)
For more details please see [Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient belief propagation for early vision. International Journal of Computer Vision, 70(1), October 2006.].
For more details 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

@ -294,7 +294,7 @@ gpu::Stream::waitForCompletion
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. ::

@ -163,7 +163,7 @@ gpu::cornerMinEigenVal
: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
gpu::ConvolveBuf
----------------
.. c:type:: gpu::ConvolveBuf
.. cpp:class:: gpu::ConvolveBuf
Memory buffer for the :cpp:func:`gpu::convolve` function. ::

@ -185,7 +185,7 @@ gpu::DeviceInfo::isCompatible
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.
@ -223,7 +223,7 @@ According to the CUDA C Programming Guide Version 3.2: "PTX code produced for so
gpu::MultiGpuManager
--------------------
.. c:type:: gpu::MultiGpuManager
.. cpp:class:: gpu::MultiGpuManager
Provides functionality for working with many GPUs. ::

@ -1576,7 +1576,7 @@ namespace cv
void operator()(const GpuMat& img, const GpuMat& mask, std::vector<KeyPoint>& keypoints, std::vector<float>& descriptors,
bool useProvidedKeypoints = false);
//! max keypoints = keypointsRatio * img.size().area()
//! max keypoints = min(keypointsRatio * img.size().area(), 65535)
float keypointsRatio;
bool upright;

@ -101,9 +101,9 @@ namespace
CV_Assert(nOctaves > 0 && nOctaveLayers > 0);
CV_Assert(TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS));
maxKeypoints = static_cast<int>(img.size().area() * surf.keypointsRatio);
maxFeatures = static_cast<int>(1.5 * maxKeypoints);
maxCandidates = static_cast<int>(1.5 * maxFeatures);
maxKeypoints = min(static_cast<int>(img.size().area() * surf.keypointsRatio), 65535);
maxFeatures = min(static_cast<int>(1.5 * maxKeypoints), 65535);
maxCandidates = min(static_cast<int>(1.5 * maxFeatures), 65535);
CV_Assert(maxKeypoints > 0);

Loading…
Cancel
Save