|
|
|
@ -1449,7 +1449,7 @@ static bool ocl_linearPolar(InputArray _src, OutputArray _dst, |
|
|
|
|
size_t h = dsize.height; |
|
|
|
|
String buildOptions; |
|
|
|
|
unsigned mem_size = 32; |
|
|
|
|
if (flags & CV_WARP_INVERSE_MAP) |
|
|
|
|
if (flags & cv::WARP_INVERSE_MAP) |
|
|
|
|
{ |
|
|
|
|
buildOptions = "-D InverseMap"; |
|
|
|
|
} |
|
|
|
@ -1464,7 +1464,7 @@ static bool ocl_linearPolar(InputArray _src, OutputArray _dst, |
|
|
|
|
ocl::KernelArg ocl_cp_sp = ocl::KernelArg::PtrReadWrite(cp_sp); |
|
|
|
|
ocl::KernelArg ocl_r = ocl::KernelArg::PtrReadWrite(r); |
|
|
|
|
|
|
|
|
|
if (!(flags & CV_WARP_INVERSE_MAP)) |
|
|
|
|
if (!(flags & cv::WARP_INVERSE_MAP)) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1495,7 +1495,7 @@ static bool ocl_linearPolar(InputArray _src, OutputArray _dst, |
|
|
|
|
size_t globalThreads[2] = { (size_t)dsize.width , (size_t)dsize.height }; |
|
|
|
|
size_t localThreads[2] = { mem_size , mem_size }; |
|
|
|
|
k.run(2, globalThreads, localThreads, false); |
|
|
|
|
remap(src, _dst, mapx, mapy, flags & cv::INTER_MAX, (flags & CV_WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
remap(src, _dst, mapx, mapy, flags & cv::INTER_MAX, (flags & cv::WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
static bool ocl_logPolar(InputArray _src, OutputArray _dst, |
|
|
|
@ -1518,7 +1518,7 @@ static bool ocl_logPolar(InputArray _src, OutputArray _dst, |
|
|
|
|
size_t h = dsize.height; |
|
|
|
|
String buildOptions; |
|
|
|
|
unsigned mem_size = 32; |
|
|
|
|
if (flags & CV_WARP_INVERSE_MAP) |
|
|
|
|
if (flags & cv::WARP_INVERSE_MAP) |
|
|
|
|
{ |
|
|
|
|
buildOptions = "-D InverseMap"; |
|
|
|
|
} |
|
|
|
@ -1535,7 +1535,7 @@ static bool ocl_logPolar(InputArray _src, OutputArray _dst, |
|
|
|
|
ocl::KernelArg ocl_cp_sp = ocl::KernelArg::PtrReadWrite(cp_sp); |
|
|
|
|
ocl::KernelArg ocl_r = ocl::KernelArg::PtrReadWrite(r); |
|
|
|
|
|
|
|
|
|
if (!(flags & CV_WARP_INVERSE_MAP)) |
|
|
|
|
if (!(flags & cv::WARP_INVERSE_MAP)) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1566,7 +1566,7 @@ static bool ocl_logPolar(InputArray _src, OutputArray _dst, |
|
|
|
|
size_t globalThreads[2] = { (size_t)dsize.width , (size_t)dsize.height }; |
|
|
|
|
size_t localThreads[2] = { mem_size , mem_size }; |
|
|
|
|
k.run(2, globalThreads, localThreads, false); |
|
|
|
|
remap(src, _dst, mapx, mapy, flags & cv::INTER_MAX, (flags & CV_WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
remap(src, _dst, mapx, mapy, flags & cv::INTER_MAX, (flags & cv::WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
@ -3635,7 +3635,7 @@ cvWarpAffine( const CvArr* srcarr, CvArr* dstarr, const CvMat* marr, |
|
|
|
|
cv::Mat matrix = cv::cvarrToMat(marr); |
|
|
|
|
CV_Assert( src.type() == dst.type() ); |
|
|
|
|
cv::warpAffine( src, dst, matrix, dst.size(), flags, |
|
|
|
|
(flags & CV_WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT, |
|
|
|
|
(flags & cv::WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT, |
|
|
|
|
fillval ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3647,7 +3647,7 @@ cvWarpPerspective( const CvArr* srcarr, CvArr* dstarr, const CvMat* marr, |
|
|
|
|
cv::Mat matrix = cv::cvarrToMat(marr); |
|
|
|
|
CV_Assert( src.type() == dst.type() ); |
|
|
|
|
cv::warpPerspective( src, dst, matrix, dst.size(), flags, |
|
|
|
|
(flags & CV_WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT, |
|
|
|
|
(flags & cv::WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT, |
|
|
|
|
fillval ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3660,7 +3660,7 @@ cvRemap( const CvArr* srcarr, CvArr* dstarr, |
|
|
|
|
cv::Mat mapx = cv::cvarrToMat(_mapx), mapy = cv::cvarrToMat(_mapy); |
|
|
|
|
CV_Assert( src.type() == dst.type() && dst.size() == mapx.size() ); |
|
|
|
|
cv::remap( src, dst, mapx, mapy, flags & cv::INTER_MAX, |
|
|
|
|
(flags & CV_WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT, |
|
|
|
|
(flags & cv::WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT, |
|
|
|
|
fillval ); |
|
|
|
|
CV_Assert( dst0.data == dst.data ); |
|
|
|
|
} |
|
|
|
@ -3744,7 +3744,7 @@ void cv::warpPolar(InputArray _src, OutputArray _dst, Size dsize, |
|
|
|
|
mapy.create(dsize, CV_32F); |
|
|
|
|
bool semiLog = (flags & WARP_POLAR_LOG) != 0; |
|
|
|
|
|
|
|
|
|
if (!(flags & CV_WARP_INVERSE_MAP)) |
|
|
|
|
if (!(flags & cv::WARP_INVERSE_MAP)) |
|
|
|
|
{ |
|
|
|
|
CV_Assert(!dsize.empty()); |
|
|
|
|
double Kangle = CV_2PI / dsize.height; |
|
|
|
@ -3784,7 +3784,7 @@ void cv::warpPolar(InputArray _src, OutputArray _dst, Size dsize, |
|
|
|
|
my[rho] = (float)y; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
remap(_src, _dst, mapx, mapy, flags & cv::INTER_MAX, (flags & CV_WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
remap(_src, _dst, mapx, mapy, flags & cv::INTER_MAX, (flags & cv::WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -3837,7 +3837,7 @@ void cv::warpPolar(InputArray _src, OutputArray _dst, Size dsize, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
remap(src, _dst, mapx, mapy, flags & cv::INTER_MAX, |
|
|
|
|
(flags & CV_WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
(flags & cv::WARP_FILL_OUTLIERS) ? cv::BORDER_CONSTANT : cv::BORDER_TRANSPARENT); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|