Commit 8f108b4e authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

bug fix

parent d3c4e907
...@@ -801,6 +801,11 @@ void cv::gpu::BruteForceMatcher_GPU_base::radiusMatchSingle(const GpuMat& query, ...@@ -801,6 +801,11 @@ void cv::gpu::BruteForceMatcher_GPU_base::radiusMatchSingle(const GpuMat& query,
ensureSizeIsEnough(nQuery, std::max((nTrain / 100), 10), CV_32SC1, trainIdx); ensureSizeIsEnough(nQuery, std::max((nTrain / 100), 10), CV_32SC1, trainIdx);
ensureSizeIsEnough(nQuery, std::max((nTrain / 100), 10), CV_32FC1, distance); ensureSizeIsEnough(nQuery, std::max((nTrain / 100), 10), CV_32FC1, distance);
} }
if (stream)
stream.enqueueMemSet(nMatches, Scalar::all(0));
else
nMatches.setTo(Scalar::all(0));
caller_t func = callers[distType][query.depth()]; caller_t func = callers[distType][query.depth()];
CV_Assert(func != 0); CV_Assert(func != 0);
...@@ -926,6 +931,11 @@ void cv::gpu::BruteForceMatcher_GPU_base::radiusMatchCollection(const GpuMat& qu ...@@ -926,6 +931,11 @@ void cv::gpu::BruteForceMatcher_GPU_base::radiusMatchCollection(const GpuMat& qu
ensureSizeIsEnough(nQuery, std::max((nQuery / 100), 10), CV_32SC1, imgIdx); ensureSizeIsEnough(nQuery, std::max((nQuery / 100), 10), CV_32SC1, imgIdx);
ensureSizeIsEnough(nQuery, std::max((nQuery / 100), 10), CV_32FC1, distance); ensureSizeIsEnough(nQuery, std::max((nQuery / 100), 10), CV_32FC1, distance);
} }
if (stream)
stream.enqueueMemSet(nMatches, Scalar::all(0));
else
nMatches.setTo(Scalar::all(0));
caller_t func = callers[distType][query.depth()]; caller_t func = callers[distType][query.depth()];
CV_Assert(func != 0); CV_Assert(func != 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