|
|
|
@ -64,11 +64,19 @@ namespace cv |
|
|
|
|
|
|
|
|
|
static const int OPT_SIZE = 100; |
|
|
|
|
|
|
|
|
|
static const char * T_ARR [] = { |
|
|
|
|
"uchar",
|
|
|
|
|
"char",
|
|
|
|
|
"ushort",
|
|
|
|
|
"short",
|
|
|
|
|
"int",
|
|
|
|
|
"float -D T_FLOAT",
|
|
|
|
|
"double"}; |
|
|
|
|
|
|
|
|
|
template < int BLOCK_SIZE, int MAX_DESC_LEN/*, typename Mask*/ > |
|
|
|
|
void matchUnrolledCached(const oclMat &query, const oclMat &train, const oclMat &/*mask*/, |
|
|
|
|
const oclMat &trainIdx, const oclMat &distance, int distType) |
|
|
|
|
{ |
|
|
|
|
assert(query.type() == CV_32F); |
|
|
|
|
cv::ocl::Context *ctx = query.clCxt; |
|
|
|
|
size_t globalSize[] = {(query.rows + BLOCK_SIZE - 1) / BLOCK_SIZE * BLOCK_SIZE, BLOCK_SIZE, 1}; |
|
|
|
|
size_t localSize[] = {BLOCK_SIZE, BLOCK_SIZE, 1}; |
|
|
|
@ -78,7 +86,9 @@ void matchUnrolledCached(const oclMat &query, const oclMat &train, const oclMat |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d -D BLOCK_SIZE=%d -D MAX_DESC_LEN=%d", distType, block_size, m_size); |
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d -D MAX_DESC_LEN=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size, m_size); |
|
|
|
|
|
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
@ -96,7 +106,7 @@ void matchUnrolledCached(const oclMat &query, const oclMat &train, const oclMat |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_UnrollMatch"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -110,7 +120,6 @@ template < int BLOCK_SIZE/*, typename Mask*/ > |
|
|
|
|
void match(const oclMat &query, const oclMat &train, const oclMat &/*mask*/, |
|
|
|
|
const oclMat &trainIdx, const oclMat &distance, int distType) |
|
|
|
|
{ |
|
|
|
|
assert(query.type() == CV_32F); |
|
|
|
|
cv::ocl::Context *ctx = query.clCxt; |
|
|
|
|
size_t globalSize[] = {(query.rows + BLOCK_SIZE - 1) / BLOCK_SIZE * BLOCK_SIZE, BLOCK_SIZE, 1}; |
|
|
|
|
size_t localSize[] = {BLOCK_SIZE, BLOCK_SIZE, 1}; |
|
|
|
@ -119,8 +128,9 @@ void match(const oclMat &query, const oclMat &train, const oclMat &/*mask*/, |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d -D BLOCK_SIZE=%d", distType, block_size); |
|
|
|
|
|
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size); |
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
|
args.push_back( make_pair( sizeof(cl_mem), (void *)&query.data )); |
|
|
|
@ -137,7 +147,7 @@ void match(const oclMat &query, const oclMat &train, const oclMat &/*mask*/, |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_Match"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -152,7 +162,6 @@ template < int BLOCK_SIZE, int MAX_DESC_LEN/*, typename Mask*/ > |
|
|
|
|
void matchUnrolledCached(const oclMat &query, const oclMat &train, float maxDistance, const oclMat &/*mask*/, |
|
|
|
|
const oclMat &trainIdx, const oclMat &distance, const oclMat &nMatches, int distType) |
|
|
|
|
{ |
|
|
|
|
assert(query.type() == CV_32F); |
|
|
|
|
cv::ocl::Context *ctx = query.clCxt; |
|
|
|
|
size_t globalSize[] = {(train.rows + BLOCK_SIZE - 1) / BLOCK_SIZE * BLOCK_SIZE, (query.rows + BLOCK_SIZE - 1) / BLOCK_SIZE * BLOCK_SIZE, 1}; |
|
|
|
|
size_t localSize[] = {BLOCK_SIZE, BLOCK_SIZE, 1}; |
|
|
|
@ -162,7 +171,9 @@ void matchUnrolledCached(const oclMat &query, const oclMat &train, float maxDist |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d -D BLOCK_SIZE=%d -D MAX_DESC_LEN=%d", distType, block_size, m_size); |
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d -D MAX_DESC_LEN=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size, m_size); |
|
|
|
|
|
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
@ -184,7 +195,7 @@ void matchUnrolledCached(const oclMat &query, const oclMat &train, float maxDist |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_RadiusUnrollMatch"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -193,7 +204,6 @@ template < int BLOCK_SIZE/*, typename Mask*/ > |
|
|
|
|
void radius_match(const oclMat &query, const oclMat &train, float maxDistance, const oclMat &/*mask*/, |
|
|
|
|
const oclMat &trainIdx, const oclMat &distance, const oclMat &nMatches, int distType) |
|
|
|
|
{ |
|
|
|
|
assert(query.type() == CV_32F); |
|
|
|
|
cv::ocl::Context *ctx = query.clCxt; |
|
|
|
|
size_t globalSize[] = {(train.rows + BLOCK_SIZE - 1) / BLOCK_SIZE * BLOCK_SIZE, (query.rows + BLOCK_SIZE - 1) / BLOCK_SIZE * BLOCK_SIZE, 1}; |
|
|
|
|
size_t localSize[] = {BLOCK_SIZE, BLOCK_SIZE, 1}; |
|
|
|
@ -202,7 +212,9 @@ void radius_match(const oclMat &query, const oclMat &train, float maxDistance, c |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d -D BLOCK_SIZE=%d", distType, block_size); |
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size); |
|
|
|
|
|
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
@ -224,7 +236,7 @@ void radius_match(const oclMat &query, const oclMat &train, float maxDistance, c |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_RadiusMatch"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -300,7 +312,9 @@ void knn_matchUnrolledCached(const oclMat &query, const oclMat &train, const ocl |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d -D BLOCK_SIZE=%d -D MAX_DESC_LEN=%d", distType, block_size, m_size); |
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d -D MAX_DESC_LEN=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size, m_size); |
|
|
|
|
|
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
@ -318,7 +332,7 @@ void knn_matchUnrolledCached(const oclMat &query, const oclMat &train, const ocl |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_knnUnrollMatch"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -334,7 +348,9 @@ void knn_match(const oclMat &query, const oclMat &train, const oclMat &/*mask*/, |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d -D BLOCK_SIZE=%d", distType, block_size); |
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size); |
|
|
|
|
|
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
@ -352,7 +368,7 @@ void knn_match(const oclMat &query, const oclMat &train, const oclMat &/*mask*/, |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_knnMatch"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -368,7 +384,10 @@ void calcDistanceUnrolled(const oclMat &query, const oclMat &train, const oclMat |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d", distType); |
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d -D MAX_DESC_LEN=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size, m_size); |
|
|
|
|
|
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
|
args.push_back( make_pair( sizeof(cl_mem), (void *)&query.data )); |
|
|
|
@ -386,7 +405,7 @@ void calcDistanceUnrolled(const oclMat &query, const oclMat &train, const oclMat |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_calcDistanceUnrolled"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -401,7 +420,10 @@ void calcDistance(const oclMat &query, const oclMat &train, const oclMat &/*mask |
|
|
|
|
vector< pair<size_t, const void *> > args; |
|
|
|
|
|
|
|
|
|
char opt [OPT_SIZE] = ""; |
|
|
|
|
sprintf(opt, "-D DIST_TYPE=%d", distType); |
|
|
|
|
sprintf(opt,
|
|
|
|
|
"-D T=%s -D DIST_TYPE=%d -D BLOCK_SIZE=%d",
|
|
|
|
|
T_ARR[query.depth()], distType, block_size); |
|
|
|
|
|
|
|
|
|
if(globalSize[0] != 0) |
|
|
|
|
{ |
|
|
|
|
args.push_back( make_pair( sizeof(cl_mem), (void *)&query.data )); |
|
|
|
@ -418,7 +440,7 @@ void calcDistance(const oclMat &query, const oclMat &train, const oclMat &/*mask |
|
|
|
|
|
|
|
|
|
std::string kernelName = "BruteForceMatch_calcDistance"; |
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, query.depth(), opt); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1, opt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -480,7 +502,7 @@ void findKnnMatch(int k, const oclMat &trainIdx, const oclMat &distance, const o |
|
|
|
|
//args.push_back( make_pair( sizeof(cl_int), (void *)&train.cols ));
|
|
|
|
|
//args.push_back( make_pair( sizeof(cl_int), (void *)&query.step ));
|
|
|
|
|
|
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, trainIdx.depth(), -1); |
|
|
|
|
openCLExecuteKernel(ctx, &brute_force_match, kernelName, globalSize, localSize, args, -1, -1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -540,17 +562,6 @@ void cv::ocl::BruteForceMatcher_OCL_base::matchSingle(const oclMat &query, const |
|
|
|
|
if (query.empty() || train.empty()) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
// match1 doesn't support signed char type, match2 only support float, hamming support uchar, ushort and int
|
|
|
|
|
int callType = query.depth(); |
|
|
|
|
if (callType != 5) |
|
|
|
|
CV_Error(CV_UNSUPPORTED_FORMAT_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
|
|
|
|
|
if ((distType == 0 && callType == 1 ) || (distType == 1 && callType != 5) || (distType == 2 && (callType != 0 |
|
|
|
|
|| callType != 2 || callType != 4))) |
|
|
|
|
{ |
|
|
|
|
CV_Error(CV_UNSUPPORTED_DEPTH_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CV_Assert(query.channels() == 1 && query.depth() < CV_64F); |
|
|
|
|
CV_Assert(train.cols == query.cols && train.type() == query.type()); |
|
|
|
|
|
|
|
|
@ -605,7 +616,7 @@ void cv::ocl::BruteForceMatcher_OCL_base::matchConvert(const Mat &trainIdx, cons |
|
|
|
|
|
|
|
|
|
void cv::ocl::BruteForceMatcher_OCL_base::match(const oclMat &query, const oclMat &train, vector<DMatch> &matches, const oclMat &mask) |
|
|
|
|
{ |
|
|
|
|
assert(mask.empty()); // mask is not supported at the moment
|
|
|
|
|
assert(mask.empty()); // mask is not supported at the moment
|
|
|
|
|
oclMat trainIdx, distance; |
|
|
|
|
matchSingle(query, train, trainIdx, distance, mask); |
|
|
|
|
matchDownload(trainIdx, distance, matches); |
|
|
|
@ -661,26 +672,14 @@ void cv::ocl::BruteForceMatcher_OCL_base::matchCollection(const oclMat &query, c |
|
|
|
|
if (query.empty() || trainCollection.empty()) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
// match1 doesn't support signed char type, match2 only support float, hamming support uchar, ushort and int
|
|
|
|
|
int callType = query.depth(); |
|
|
|
|
if (callType != 5) |
|
|
|
|
CV_Error(CV_UNSUPPORTED_FORMAT_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
|
|
|
|
|
if ((distType == 0 && callType == 1 ) || (distType == 1 && callType != 5) || (distType == 2 && (callType != 0 |
|
|
|
|
|| callType != 2 || callType != 4))) |
|
|
|
|
{ |
|
|
|
|
CV_Error(CV_UNSUPPORTED_DEPTH_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CV_Assert(query.channels() == 1 && query.depth() < CV_64F); |
|
|
|
|
|
|
|
|
|
const int nQuery = query.rows; |
|
|
|
|
|
|
|
|
|
const int nQuery = query.rows; |
|
|
|
|
|
|
|
|
|
ensureSizeIsEnough(1, nQuery, CV_32S, trainIdx); |
|
|
|
|
ensureSizeIsEnough(1, nQuery, CV_32S, imgIdx); |
|
|
|
|
ensureSizeIsEnough(1, nQuery, CV_32F, distance); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
matchDispatcher(query, (const oclMat *)trainCollection.ptr(), trainCollection.cols, masks, trainIdx, imgIdx, distance, distType); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
@ -752,18 +751,6 @@ void cv::ocl::BruteForceMatcher_OCL_base::knnMatchSingle(const oclMat &query, co |
|
|
|
|
if (query.empty() || train.empty()) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
// match1 doesn't support signed char type, match2 only support float, hamming support uchar, ushort and int
|
|
|
|
|
int callType = query.depth(); |
|
|
|
|
|
|
|
|
|
if (callType != 5) |
|
|
|
|
CV_Error(CV_UNSUPPORTED_FORMAT_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
|
|
|
|
|
if ((distType == 0 && callType == 1 ) || (distType == 1 && callType != 5) || (distType == 2 && (callType != 0 |
|
|
|
|
|| callType != 2 || callType != 4))) |
|
|
|
|
{ |
|
|
|
|
CV_Error(CV_UNSUPPORTED_DEPTH_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CV_Assert(query.channels() == 1 && query.depth() < CV_64F); |
|
|
|
|
CV_Assert(train.type() == query.type() && train.cols == query.cols); |
|
|
|
|
|
|
|
|
@ -860,26 +847,7 @@ void cv::ocl::BruteForceMatcher_OCL_base::knnMatch2Collection(const oclMat &quer |
|
|
|
|
|
|
|
|
|
typedef void (*caller_t)(const oclMat & query, const oclMat & trains, const oclMat & masks, |
|
|
|
|
const oclMat & trainIdx, const oclMat & imgIdx, const oclMat & distance); |
|
|
|
|
#if 0 |
|
|
|
|
static const caller_t callers[3][6] = |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
ocl_match2L1_gpu<unsigned char>, 0/*match2L1_gpu<signed char>*/, |
|
|
|
|
ocl_match2L1_gpu<unsigned short>, ocl_match2L1_gpu<short>, |
|
|
|
|
ocl_match2L1_gpu<int>, ocl_match2L1_gpu<float> |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
0/*match2L2_gpu<unsigned char>*/, 0/*match2L2_gpu<signed char>*/, |
|
|
|
|
0/*match2L2_gpu<unsigned short>*/, 0/*match2L2_gpu<short>*/, |
|
|
|
|
0/*match2L2_gpu<int>*/, ocl_match2L2_gpu<float> |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
ocl_match2Hamming_gpu<unsigned char>, 0/*match2Hamming_gpu<signed char>*/, |
|
|
|
|
ocl_match2Hamming_gpu<unsigned short>, 0/*match2Hamming_gpu<short>*/, |
|
|
|
|
ocl_match2Hamming_gpu<int>, 0/*match2Hamming_gpu<float>*/ |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
CV_Assert(query.channels() == 1 && query.depth() < CV_64F); |
|
|
|
|
|
|
|
|
|
const int nQuery = query.rows; |
|
|
|
@ -1025,23 +993,11 @@ void cv::ocl::BruteForceMatcher_OCL_base::knnMatch(const oclMat &query, vector< |
|
|
|
|
|
|
|
|
|
// radiusMatchSingle
|
|
|
|
|
void cv::ocl::BruteForceMatcher_OCL_base::radiusMatchSingle(const oclMat &query, const oclMat &train, |
|
|
|
|
oclMat &trainIdx, oclMat &distance, oclMat &nMatches, float maxDistance, const oclMat &mask) |
|
|
|
|
oclMat &trainIdx, oclMat &distance, oclMat &nMatches, float maxDistance, const oclMat &mask) |
|
|
|
|
{ |
|
|
|
|
if (query.empty() || train.empty()) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
// match1 doesn't support signed char type, match2 only support float, hamming support uchar, ushort and int
|
|
|
|
|
int callType = query.depth(); |
|
|
|
|
|
|
|
|
|
if (callType != 5) |
|
|
|
|
CV_Error(CV_UNSUPPORTED_FORMAT_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
|
|
|
|
|
if ((distType == 0 && callType == 1 ) || (distType == 1 && callType != 5) || (distType == 2 && (callType != 0 |
|
|
|
|
|| callType != 2 || callType != 4))) |
|
|
|
|
{ |
|
|
|
|
CV_Error(CV_UNSUPPORTED_DEPTH_ERR, "BruteForceMatch OpenCL only support float type query!\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const int nQuery = query.rows; |
|
|
|
|
const int nTrain = train.rows; |
|
|
|
|
|
|
|
|
|