fixed SURF_GPU bug (features count > max dimension of grid)
authorVladislav Vinogradov <no@email>
Mon, 28 Mar 2011 10:34:44 +0000 (10:34 +0000)
committerVladislav Vinogradov <no@email>
Mon, 28 Mar 2011 10:34:44 +0000 (10:34 +0000)
minor gpu docs fixes

modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst
modules/gpu/doc/data_structures.rst
modules/gpu/doc/image_processing.rst
modules/gpu/doc/initalization_and_information.rst
modules/gpu/include/opencv2/gpu/gpu.hpp
modules/gpu/src/surf.cpp

index 994e6d5..2cf7d14 100644 (file)
@@ -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
 
index 8bdbb9d..ef960ea 100644 (file)
@@ -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. ::
 
index fdbdcf1..f3af5d9 100644 (file)
@@ -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. ::
 
index f0acbd3..45cb51b 100644 (file)
@@ -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. ::
 
index a184358..2bca086 100644 (file)
@@ -1576,7 +1576,7 @@ namespace cv
             void operator()(const GpuMat& img, const GpuMat& mask, std::vector<KeyPoint>& keypoints, std::vector<float>& descriptors, \r
                 bool useProvidedKeypoints = false);\r
 \r
-            //! max keypoints = keypointsRatio * img.size().area()\r
+            //! max keypoints = min(keypointsRatio * img.size().area(), 65535)\r
             float keypointsRatio;\r
 \r
             bool upright;\r
index d1f18a7..49fde58 100644 (file)
@@ -101,9 +101,9 @@ namespace
             CV_Assert(nOctaves > 0 && nOctaveLayers > 0);\r
             CV_Assert(TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS));\r
 \r
-            maxKeypoints = static_cast<int>(img.size().area() * surf.keypointsRatio);\r
-            maxFeatures = static_cast<int>(1.5 * maxKeypoints);\r
-            maxCandidates = static_cast<int>(1.5 * maxFeatures);\r
+            maxKeypoints = min(static_cast<int>(img.size().area() * surf.keypointsRatio), 65535);\r
+            maxFeatures = min(static_cast<int>(1.5 * maxKeypoints), 65535);\r
+            maxCandidates = min(static_cast<int>(1.5 * maxFeatures), 65535);\r
 \r
             CV_Assert(maxKeypoints > 0);\r
             \r