Commit 916d07cf authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

merged bug fix from r8179 (ORB_GPU)

parent ea735a04
......@@ -568,12 +568,18 @@ void cv::gpu::ORB_GPU::computeKeyPointsPyramid()
{
keyPointsCount_[level] = fastDetector_.calcKeyPointsLocation(imagePyr_[level], maskPyr_[level]);
if (keyPointsCount_[level] == 0)
continue;
ensureSizeIsEnough(3, keyPointsCount_[level], CV_32FC1, keyPointsPyr_[level]);
GpuMat fastKpRange = keyPointsPyr_[level].rowRange(0, 2);
keyPointsCount_[level] = fastDetector_.getKeyPoints(fastKpRange);
int n_features = n_features_per_level_[level];
if (keyPointsCount_[level] == 0)
continue;
int n_features = static_cast<int>(n_features_per_level_[level]);
if (scoreType_ == ORB::HARRIS_SCORE)
{
......@@ -613,6 +619,9 @@ void cv::gpu::ORB_GPU::computeDescriptors(GpuMat& descriptors)
for (int level = 0; level < nLevels_; ++level)
{
if (keyPointsCount_[level] == 0)
continue;
GpuMat descRange = descriptors.rowRange(offset, offset + keyPointsCount_[level]);
if (blurForDescriptor)
......@@ -650,6 +659,9 @@ void cv::gpu::ORB_GPU::mergeKeyPoints(GpuMat& keypoints)
for (int level = 0; level < nLevels_; ++level)
{
if (keyPointsCount_[level] == 0)
continue;
float sf = getScale(scaleFactor_, firstLevel_, level);
GpuMat keyPointsRange = keypoints.colRange(offset, offset + keyPointsCount_[level]);
......
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