GoodFeaturesToTrackDetector_GPU fails when no corners found
This commit is contained in:
Vladislav Vinogradov
2012-11-29 11:17:04 +04:00
parent 5047b3fba2
commit 362655b02a
2 changed files with 21 additions and 0 deletions

View File

@@ -85,6 +85,12 @@ void cv::gpu::GoodFeaturesToTrackDetector_GPU::operator ()(const GpuMat& image,
int total = findCorners_gpu(eig_, static_cast<float>(maxVal * qualityLevel), mask, tmpCorners_.ptr<float2>(), tmpCorners_.cols);
if (total == 0)
{
corners.release();
return;
}
sortCorners_gpu(eig_, tmpCorners_.ptr<float2>(), total);
if (minDistance < 1)