fix matrix type for keypoints buffer in CUDA FAST
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Wed, 6 Jul 2016 11:27:08 +0000 (14:27 +0300)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Wed, 6 Jul 2016 11:27:08 +0000 (14:27 +0300)
use CV_32FC1 instead of CV_16SC2 since detectAsync uses CV_32FC1
to reallocate the matrix

modules/cudafeatures2d/src/fast.cpp

index 2095ef7..ce44b3a 100644 (file)
@@ -104,7 +104,7 @@ namespace
         }
 
         BufferPool pool(Stream::Null());
-        GpuMat d_keypoints = pool.getBuffer(ROWS_COUNT, max_npoints_, CV_16SC2);
+        GpuMat d_keypoints = pool.getBuffer(ROWS_COUNT, max_npoints_, CV_32FC1);
 
         detectAsync(_image, d_keypoints, _mask, Stream::Null());
         convert(d_keypoints, keypoints);