From ce992c8269559a459bb3cf9d2418cf1641336cca Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 6 Feb 2014 19:07:30 +0400 Subject: [PATCH] ocl: update gftt --- modules/imgproc/src/featureselect.cpp | 2 +- modules/imgproc/test/ocl/test_gftt.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/imgproc/src/featureselect.cpp b/modules/imgproc/src/featureselect.cpp index c5ed3e5615..53743c6a85 100644 --- a/modules/imgproc/src/featureselect.cpp +++ b/modules/imgproc/src/featureselect.cpp @@ -124,7 +124,7 @@ static bool ocl_goodFeaturesToTrack( InputArray _image, OutputArray _corners, tmpCorners.resize(total); Mat mcorners(1, totalb, CV_8UC1, &tmpCorners[0]); - corners.colRange(0, totalb).getMat(ACCESS_READ).copyTo(mcorners); + corners.colRange(0, totalb).copyTo(mcorners); } std::sort( tmpCorners.begin(), tmpCorners.end() ); diff --git a/modules/imgproc/test/ocl/test_gftt.cpp b/modules/imgproc/test/ocl/test_gftt.cpp index 62bbce077e..df6fa731dd 100644 --- a/modules/imgproc/test/ocl/test_gftt.cpp +++ b/modules/imgproc/test/ocl/test_gftt.cpp @@ -84,8 +84,8 @@ PARAM_TEST_CASE(GoodFeaturesToTrack, double, bool) void UMatToVector(const UMat & um, std::vector & v) const { - v.resize(points.cols); - um.getMat(ACCESS_READ).copyTo(v); + v.resize(um.size().area()); + um.copyTo(Mat(um.size(), CV_32FC2, &v[0])); } };