From f23b51de6f0bfcf96fef8bbe805d601172705a53 Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Mon, 14 Oct 2013 13:36:07 -0400 Subject: [PATCH 01/32] Added -l prefix to EXTRA_COMPONENTS when generating pkg-config file --- cmake/OpenCVGenPkgconfig.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake index 7bfc7bc5a..24e9ab55b 100644 --- a/cmake/OpenCVGenPkgconfig.cmake +++ b/cmake/OpenCVGenPkgconfig.cmake @@ -57,8 +57,11 @@ endforeach() # add extra dependencies required for OpenCV set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) if(OpenCV_EXTRA_COMPONENTS) - string(REPLACE ";" " " OpenCV_EXTRA_COMPONENTS "${OpenCV_EXTRA_COMPONENTS}") - set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${OpenCV_EXTRA_COMPONENTS}") + set(OpenCV_DASH_L_EXTRA_COMPONENTS "") + foreach(ExtraComponent ${OpenCV_EXTRA_COMPONENTS}) + set(OpenCV_DASH_L_EXTRA_COMPONENTS "${OpenCV_DASH_L_EXTRA_COMPONENTS} -l${ExtraComponent}") + endforeach() + set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${OpenCV_DASH_L_EXTRA_COMPONENTS}") endif() #generate the .pc file From 70df365c87e0d2eb220f1b0214fb8c2618e3661c Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Tue, 15 Oct 2013 14:54:58 -0400 Subject: [PATCH 02/32] changed foreach variable to match naming conventions and dropped intermediate variable, appending directly to the LIB_COMPONENTS list --- cmake/OpenCVGenPkgconfig.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake index 24e9ab55b..ecd7c68f1 100644 --- a/cmake/OpenCVGenPkgconfig.cmake +++ b/cmake/OpenCVGenPkgconfig.cmake @@ -57,11 +57,9 @@ endforeach() # add extra dependencies required for OpenCV set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) if(OpenCV_EXTRA_COMPONENTS) - set(OpenCV_DASH_L_EXTRA_COMPONENTS "") - foreach(ExtraComponent ${OpenCV_EXTRA_COMPONENTS}) - set(OpenCV_DASH_L_EXTRA_COMPONENTS "${OpenCV_DASH_L_EXTRA_COMPONENTS} -l${ExtraComponent}") + foreach(extra_component ${OpenCV_EXTRA_COMPONENTS}) + set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}") endforeach() - set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${OpenCV_DASH_L_EXTRA_COMPONENTS}") endif() #generate the .pc file From 5bd59936635516eec05ec2ba8caa479cc7dbcf0f Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Thu, 17 Oct 2013 14:05:06 -0400 Subject: [PATCH 03/32] Only append -l to lib entries with no path and no -l or -L of their own --- cmake/OpenCVGenPkgconfig.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake index ecd7c68f1..6f9333952 100644 --- a/cmake/OpenCVGenPkgconfig.cmake +++ b/cmake/OpenCVGenPkgconfig.cmake @@ -58,7 +58,13 @@ endforeach() set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) if(OpenCV_EXTRA_COMPONENTS) foreach(extra_component ${OpenCV_EXTRA_COMPONENTS}) - set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}") + if(extra_component MATCHES "-[lL](.*)" ) + set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}") + elseif(extra_component MATCHES "/") + set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}") + else() + set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}") + endif() endforeach() endif() From 61ccd170bdf4378c9e1bced426adfb9b5e1fa9a8 Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Thu, 17 Oct 2013 14:12:02 -0400 Subject: [PATCH 04/32] shortened code to not repeat myself --- cmake/OpenCVGenPkgconfig.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake index 6f9333952..1c22b8a9c 100644 --- a/cmake/OpenCVGenPkgconfig.cmake +++ b/cmake/OpenCVGenPkgconfig.cmake @@ -58,13 +58,15 @@ endforeach() set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) if(OpenCV_EXTRA_COMPONENTS) foreach(extra_component ${OpenCV_EXTRA_COMPONENTS}) - if(extra_component MATCHES "-[lL](.*)" ) - set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}") - elseif(extra_component MATCHES "/") - set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}") + + if(extra_component MATCHES "-[lL](.*)" OR extra_component MATCHES "/") + set(maybe_l_prefix "") else() - set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}") + set(maybe_l_prefix "-l") endif() + + set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}") + endforeach() endif() From 0c4d4846790f87b89f9f2d70fe920e570b9f8fb4 Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Thu, 17 Oct 2013 14:17:49 -0400 Subject: [PATCH 05/32] added backslash --- cmake/OpenCVGenPkgconfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake index 1c22b8a9c..eaa29c3f3 100644 --- a/cmake/OpenCVGenPkgconfig.cmake +++ b/cmake/OpenCVGenPkgconfig.cmake @@ -59,7 +59,7 @@ set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) if(OpenCV_EXTRA_COMPONENTS) foreach(extra_component ${OpenCV_EXTRA_COMPONENTS}) - if(extra_component MATCHES "-[lL](.*)" OR extra_component MATCHES "/") + if(extra_component MATCHES "-[lL](.*)" OR extra_component MATCHES "[\\/]") set(maybe_l_prefix "") else() set(maybe_l_prefix "-l") From 8f995fac881cb70a97d799a6f9881045c5443da6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 19 Oct 2013 01:30:03 -0500 Subject: [PATCH 06/32] Change intrinsic camera matrix initialization In the function cvInitIntrinsicParams2D the principal point for normalized image coordinates is set to 0/0. This updates the function to initialize the principal point at 0.5/0.5. --- modules/calib3d/src/calibration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/calib3d/src/calibration.cpp b/modules/calib3d/src/calibration.cpp index e48393502..d9e821db4 100644 --- a/modules/calib3d/src/calibration.cpp +++ b/modules/calib3d/src/calibration.cpp @@ -1391,8 +1391,8 @@ CV_IMPL void cvInitIntrinsicParams2D( const CvMat* objectPoints, matA = cvCreateMat( 2*nimages, 2, CV_64F ); _b = cvCreateMat( 2*nimages, 1, CV_64F ); - a[2] = (imageSize.width - 1)*0.5; - a[5] = (imageSize.height - 1)*0.5; + a[2] = (!imageSize.width) ? 0.5 : (imageSize.width - 1)*0.5; + a[5] = (!imageSize.height) ? 0.5 : (imageSize.height - 1)*0.5; _allH = cvCreateMat( nimages, 9, CV_64F ); // extract vanishing points in order to obtain initial value for the focal length From fe3dd762a46355a41c1be94fd844d72e846dda7e Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Sat, 19 Oct 2013 17:30:32 -0400 Subject: [PATCH 07/32] fixed wrong regex --- cmake/OpenCVGenPkgconfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake index eaa29c3f3..8b02d5b2b 100644 --- a/cmake/OpenCVGenPkgconfig.cmake +++ b/cmake/OpenCVGenPkgconfig.cmake @@ -59,7 +59,7 @@ set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) if(OpenCV_EXTRA_COMPONENTS) foreach(extra_component ${OpenCV_EXTRA_COMPONENTS}) - if(extra_component MATCHES "-[lL](.*)" OR extra_component MATCHES "[\\/]") + if(extra_component MATCHES "^-[lL](.*)" OR extra_component MATCHES "[\\/]") set(maybe_l_prefix "") else() set(maybe_l_prefix "-l") From 7285341083a1210db1485eee1075540fa5ebc884 Mon Sep 17 00:00:00 2001 From: peng xiao Date: Mon, 21 Oct 2013 10:21:37 +0800 Subject: [PATCH 08/32] 1. Let btvRegWeights to be constant per `process` call. 2. Let Farneback to be the default optical flow method. 3. Fix a timing method bug for ocl path. 4. Remove useless finish operation in farneback 5. Refactor buffer usage. --- modules/ocl/src/optical_flow_farneback.cpp | 2 - modules/superres/src/btv_l1_ocl.cpp | 78 +++------ modules/superres/src/opencl/superres_btvl1.cl | 163 ++++++------------ samples/gpu/super_resolution.cpp | 6 +- 4 files changed, 84 insertions(+), 165 deletions(-) diff --git a/modules/ocl/src/optical_flow_farneback.cpp b/modules/ocl/src/optical_flow_farneback.cpp index 05a850bd1..050375820 100644 --- a/modules/ocl/src/optical_flow_farneback.cpp +++ b/modules/ocl/src/optical_flow_farneback.cpp @@ -336,8 +336,6 @@ void cv::ocl::FarnebackOpticalFlow::updateFlow_boxFilter( swap(M, bufM); - finish(); - optflow_farneback::updateFlowOcl(M, flowx, flowy); if (updateMatrices) diff --git a/modules/superres/src/btv_l1_ocl.cpp b/modules/superres/src/btv_l1_ocl.cpp index 432d2368a..b4f4acdaf 100644 --- a/modules/superres/src/btv_l1_ocl.cpp +++ b/modules/superres/src/btv_l1_ocl.cpp @@ -70,6 +70,7 @@ namespace cv { float* btvWeights_ = NULL; size_t btvWeights_size = 0; + oclMat c_btvRegWeights; } } @@ -82,10 +83,6 @@ namespace btv_l1_device_ocl void upscale(const oclMat& src, oclMat& dst, int scale); - float diffSign(float a, float b); - - Point3f diffSign(Point3f a, Point3f b); - void diffSign(const oclMat& src1, const oclMat& src2, oclMat& dst); void calcBtvRegularization(const oclMat& src, oclMat& dst, int ksize); @@ -165,20 +162,6 @@ void btv_l1_device_ocl::upscale(const oclMat& src, oclMat& dst, int scale) } -float btv_l1_device_ocl::diffSign(float a, float b) -{ - return a > b ? 1.0f : a < b ? -1.0f : 0.0f; -} - -Point3f btv_l1_device_ocl::diffSign(Point3f a, Point3f b) -{ - return Point3f( - a.x > b.x ? 1.0f : a.x < b.x ? -1.0f : 0.0f, - a.y > b.y ? 1.0f : a.y < b.y ? -1.0f : 0.0f, - a.z > b.z ? 1.0f : a.z < b.z ? -1.0f : 0.0f - ); -} - void btv_l1_device_ocl::diffSign(const oclMat& src1, const oclMat& src2, oclMat& dst) { Context* clCxt = Context::getContext(); @@ -228,12 +211,6 @@ void btv_l1_device_ocl::calcBtvRegularization(const oclMat& src, oclMat& dst, in int cn = src.oclchannels(); - cl_mem c_btvRegWeights; - size_t count = btvWeights_size * sizeof(float); - c_btvRegWeights = openCLCreateBuffer(clCxt, CL_MEM_READ_ONLY, count); - int cl_safe_check = clEnqueueWriteBuffer(getClCommandQueue(clCxt), c_btvRegWeights, 1, 0, count, btvWeights_, 0, NULL, NULL); - CV_Assert(cl_safe_check == CL_SUCCESS); - args.push_back(make_pair(sizeof(cl_mem), (void*)&src_.data)); args.push_back(make_pair(sizeof(cl_mem), (void*)&dst_.data)); args.push_back(make_pair(sizeof(cl_int), (void*)&src_step)); @@ -242,11 +219,9 @@ void btv_l1_device_ocl::calcBtvRegularization(const oclMat& src, oclMat& dst, in args.push_back(make_pair(sizeof(cl_int), (void*)&src.cols)); args.push_back(make_pair(sizeof(cl_int), (void*)&ksize)); args.push_back(make_pair(sizeof(cl_int), (void*)&cn)); - args.push_back(make_pair(sizeof(cl_mem), (void*)&c_btvRegWeights)); + args.push_back(make_pair(sizeof(cl_mem), (void*)&c_btvRegWeights.data)); openCLExecuteKernel(clCxt, &superres_btvl1, kernel_name, global_thread, local_thread, args, -1, -1); - cl_safe_check = clReleaseMemObject(c_btvRegWeights); - CV_Assert(cl_safe_check == CL_SUCCESS); } namespace @@ -321,9 +296,6 @@ namespace { CV_Assert( src.channels() == 1 || src.channels() == 3 || src.channels() == 4 ); - dst.create(src.rows * scale, src.cols * scale, src.type()); - dst.setTo(Scalar::all(0)); - btv_l1_device_ocl::upscale(src, dst, scale); } @@ -351,12 +323,13 @@ namespace btvWeights_ = &btvWeights[0]; btvWeights_size = size; + Mat btvWeights_mheader(1, static_cast(size), CV_32FC1, btvWeights_); + c_btvRegWeights = btvWeights_mheader; } void calcBtvRegularization(const oclMat& src, oclMat& dst, int btvKernelSize) { dst.create(src.size(), src.type()); - dst.setTo(Scalar::all(0)); const int ksize = (btvKernelSize - 1) / 2; @@ -407,7 +380,7 @@ namespace oclMat highRes_; vector diffTerms_; - vector a_, b_, c_; + oclMat a_, b_, c_, d_; oclMat regTerm_; }; @@ -421,7 +394,7 @@ namespace btvKernelSize_ = 7; blurKernelSize_ = 5; blurSigma_ = 0.0; - opticalFlow_ = createOptFlow_DualTVL1_OCL(); + opticalFlow_ = createOptFlow_Farneback_OCL(); curBlurKernelSize_ = -1; curBlurSigma_ = -1.0; @@ -487,34 +460,36 @@ namespace // iterations diffTerms_.resize(src.size()); - a_.resize(src.size()); - b_.resize(src.size()); - c_.resize(src.size()); - + bool d_inited = false; + a_.create(highRes_.size(), highRes_.type()); + b_.create(highRes_.size(), highRes_.type()); + c_.create(lowResSize, highRes_.type()); + d_.create(highRes_.rows, highRes_.cols, highRes_.type()); for (int i = 0; i < iterations_; ++i) { + if(!d_inited) + { + d_.setTo(0); + d_inited = true; + } for (size_t k = 0; k < src.size(); ++k) { diffTerms_[k].create(highRes_.size(), highRes_.type()); - a_[k].create(highRes_.size(), highRes_.type()); - b_[k].create(highRes_.size(), highRes_.type()); - c_[k].create(lowResSize, highRes_.type()); - // a = M * Ih - ocl::remap(highRes_, a_[k], backwardMaps_[k].first, backwardMaps_[k].second, INTER_NEAREST, BORDER_CONSTANT, Scalar()); + ocl::remap(highRes_, a_, backwardMaps_[k].first, backwardMaps_[k].second, INTER_NEAREST, BORDER_CONSTANT, Scalar()); // b = HM * Ih - filters_[k]->apply(a_[k], b_[k], Rect(0,0,-1,-1)); + filters_[k]->apply(a_, b_, Rect(0,0,-1,-1)); // c = DHF * Ih - ocl::resize(b_[k], c_[k], lowResSize, 0, 0, INTER_NEAREST); + ocl::resize(b_, c_, lowResSize, 0, 0, INTER_NEAREST); - diffSign(src[k], c_[k], c_[k]); + diffSign(src[k], c_, c_); // a = Dt * diff - upscale(c_[k], a_[k], scale_); + upscale(c_, d_, scale_); // b = HtDt * diff - filters_[k]->apply(a_[k], b_[k], Rect(0,0,-1,-1)); + filters_[k]->apply(d_, b_, Rect(0,0,-1,-1)); // diffTerm = MtHtDt * diff - ocl::remap(b_[k], diffTerms_[k], forwardMaps_[k].first, forwardMaps_[k].second, INTER_NEAREST, BORDER_CONSTANT, Scalar()); + ocl::remap(b_, diffTerms_[k], forwardMaps_[k].first, forwardMaps_[k].second, INTER_NEAREST, BORDER_CONSTANT, Scalar()); } if (lambda_ > 0) @@ -549,10 +524,11 @@ namespace highRes_.release(); diffTerms_.clear(); - a_.clear(); - b_.clear(); - c_.clear(); + a_.release(); + b_.release(); + c_.release(); regTerm_.release(); + c_btvRegWeights.release(); } //////////////////////////////////////////////////////////// diff --git a/modules/superres/src/opencl/superres_btvl1.cl b/modules/superres/src/opencl/superres_btvl1.cl index 472062323..a08227491 100644 --- a/modules/superres/src/opencl/superres_btvl1.cl +++ b/modules/superres/src/opencl/superres_btvl1.cl @@ -44,24 +44,24 @@ //M*/ __kernel void buildMotionMapsKernel(__global float* forwardMotionX, - __global float* forwardMotionY, - __global float* backwardMotionX, - __global float* backwardMotionY, - __global float* forwardMapX, - __global float* forwardMapY, - __global float* backwardMapX, - __global float* backwardMapY, - int forwardMotionX_row, - int forwardMotionX_col, - int forwardMotionX_step, - int forwardMotionY_step, - int backwardMotionX_step, - int backwardMotionY_step, - int forwardMapX_step, - int forwardMapY_step, - int backwardMapX_step, - int backwardMapY_step - ) + __global float* forwardMotionY, + __global float* backwardMotionX, + __global float* backwardMotionY, + __global float* forwardMapX, + __global float* forwardMapY, + __global float* backwardMapX, + __global float* backwardMapY, + int forwardMotionX_row, + int forwardMotionX_col, + int forwardMotionX_step, + int forwardMotionY_step, + int backwardMotionX_step, + int backwardMotionY_step, + int forwardMapX_step, + int forwardMapY_step, + int backwardMapX_step, + int backwardMapY_step + ) { int x = get_global_id(0); int y = get_global_id(1); @@ -83,14 +83,14 @@ __kernel void buildMotionMapsKernel(__global float* forwardMotionX, } __kernel void upscaleKernel(__global float* src, - __global float* dst, - int src_step, - int dst_step, - int src_row, - int src_col, - int scale, - int channels - ) + __global float* dst, + int src_step, + int dst_step, + int src_row, + int src_col, + int scale, + int channels + ) { int x = get_global_id(0); int y = get_global_id(1); @@ -100,17 +100,10 @@ __kernel void upscaleKernel(__global float* src, if(channels == 1) { dst[y * scale * dst_step + x * scale] = src[y * src_step + x]; - }else if(channels == 3) + } + else { - dst[y * channels * scale * dst_step + 3 * x * scale + 0] = src[y * channels * src_step + 3 * x + 0]; - dst[y * channels * scale * dst_step + 3 * x * scale + 1] = src[y * channels * src_step + 3 * x + 1]; - dst[y * channels * scale * dst_step + 3 * x * scale + 2] = src[y * channels * src_step + 3 * x + 2]; - }else - { - dst[y * channels * scale * dst_step + 4 * x * scale + 0] = src[y * channels * src_step + 4 * x + 0]; - dst[y * channels * scale * dst_step + 4 * x * scale + 1] = src[y * channels * src_step + 4 * x + 1]; - dst[y * channels * scale * dst_step + 4 * x * scale + 2] = src[y * channels * src_step + 4 * x + 2]; - dst[y * channels * scale * dst_step + 4 * x * scale + 3] = src[y * channels * src_step + 4 * x + 3]; + vstore4(vload4(0, src + y * channels * src_step + 4 * x), 0, dst + y * channels * scale * dst_step + 4 * x * scale); } } } @@ -121,15 +114,6 @@ float diffSign(float a, float b) return a > b ? 1.0f : a < b ? -1.0f : 0.0f; } -float3 diffSign3(float3 a, float3 b) -{ - float3 pos; - pos.x = a.x > b.x ? 1.0f : a.x < b.x ? -1.0f : 0.0f; - pos.y = a.y > b.y ? 1.0f : a.y < b.y ? -1.0f : 0.0f; - pos.z = a.z > b.z ? 1.0f : a.z < b.z ? -1.0f : 0.0f; - return pos; -} - float4 diffSign4(float4 a, float4 b) { float4 pos; @@ -141,13 +125,13 @@ float4 diffSign4(float4 a, float4 b) } __kernel void diffSignKernel(__global float* src1, - __global float* src2, - __global float* dst, - int src1_row, - int src1_col, - int dst_step, - int src1_step, - int src2_step) + __global float* src2, + __global float* dst, + int src1_row, + int src1_col, + int dst_step, + int src1_step, + int src2_step) { int x = get_global_id(0); int y = get_global_id(1); @@ -156,19 +140,18 @@ __kernel void diffSignKernel(__global float* src1, { dst[y * dst_step + x] = diffSign(src1[y * src1_step + x], src2[y * src2_step + x]); } - barrier(CLK_LOCAL_MEM_FENCE); } __kernel void calcBtvRegularizationKernel(__global float* src, - __global float* dst, - int src_step, - int dst_step, - int src_row, - int src_col, - int ksize, - int channels, - __global float* c_btvRegWeights - ) + __global float* dst, + int src_step, + int dst_step, + int src_row, + int src_col, + int ksize, + int channels, + __constant float* c_btvRegWeights + ) { int x = get_global_id(0) + ksize; int y = get_global_id(1) + ksize; @@ -180,57 +163,19 @@ __kernel void calcBtvRegularizationKernel(__global float* src, const float srcVal = src[y * src_step + x]; float dstVal = 0.0f; - for (int m = 0, count = 0; m <= ksize; ++m) - { - for (int l = ksize; l + m >= 0; --l, ++count) - dstVal = dstVal + c_btvRegWeights[count] * (diffSign(srcVal, src[(y + m) * src_step + (x + l)]) - diffSign(src[(y - m) * src_step + (x - l)], srcVal)); - } - dst[y * dst_step + x] = dstVal; - }else if(channels == 3) - { - float3 srcVal; - srcVal.x = src[y * src_step + 3 * x + 0]; - srcVal.y = src[y * src_step + 3 * x + 1]; - srcVal.z = src[y * src_step + 3 * x + 2]; - - float3 dstVal; - dstVal.x = 0.0f; - dstVal.y = 0.0f; - dstVal.z = 0.0f; - for (int m = 0, count = 0; m <= ksize; ++m) { for (int l = ksize; l + m >= 0; --l, ++count) { - float3 src1; - src1.x = src[(y + m) * src_step + 3 * (x + l) + 0]; - src1.y = src[(y + m) * src_step + 3 * (x + l) + 1]; - src1.z = src[(y + m) * src_step + 3 * (x + l) + 2]; - - float3 src2; - src2.x = src[(y - m) * src_step + 3 * (x - l) + 0]; - src2.y = src[(y - m) * src_step + 3 * (x - l) + 1]; - src2.z = src[(y - m) * src_step + 3 * (x - l) + 2]; - - dstVal = dstVal + c_btvRegWeights[count] * (diffSign3(srcVal, src1) - diffSign3(src2, srcVal)); + dstVal = dstVal + c_btvRegWeights[count] * (diffSign(srcVal, src[(y + m) * src_step + (x + l)]) - diffSign(src[(y - m) * src_step + (x - l)], srcVal)); } } - dst[y * dst_step + 3 * x + 0] = dstVal.x; - dst[y * dst_step + 3 * x + 1] = dstVal.y; - dst[y * dst_step + 3 * x + 2] = dstVal.z; - }else + dst[y * dst_step + x] = dstVal; + } + else { - float4 srcVal; - srcVal.x = src[y * src_step + 4 * x + 0];//r type =float - srcVal.y = src[y * src_step + 4 * x + 1];//g - srcVal.z = src[y * src_step + 4 * x + 2];//b - srcVal.w = src[y * src_step + 4 * x + 3];//a - - float4 dstVal; - dstVal.x = 0.0f; - dstVal.y = 0.0f; - dstVal.z = 0.0f; - dstVal.w = 0.0f; + float4 srcVal = vload4(0, src + y * src_step + 4 * x); + float4 dstVal = 0.f; for (int m = 0, count = 0; m <= ksize; ++m) { @@ -249,13 +194,9 @@ __kernel void calcBtvRegularizationKernel(__global float* src, src2.w = src[(y - m) * src_step + 4 * (x - l) + 3]; dstVal = dstVal + c_btvRegWeights[count] * (diffSign4(srcVal, src1) - diffSign4(src2, srcVal)); - } } - dst[y * dst_step + 4 * x + 0] = dstVal.x; - dst[y * dst_step + 4 * x + 1] = dstVal.y; - dst[y * dst_step + 4 * x + 2] = dstVal.z; - dst[y * dst_step + 4 * x + 3] = dstVal.w; + vstore4(dstVal, 0, dst + y * dst_step + 4 * x); } } } diff --git a/samples/gpu/super_resolution.cpp b/samples/gpu/super_resolution.cpp index 435e711a1..6efd24144 100644 --- a/samples/gpu/super_resolution.cpp +++ b/samples/gpu/super_resolution.cpp @@ -221,7 +221,11 @@ int main(int argc, const char* argv[]) if(useOcl) { - MEASURE_TIME(superRes->nextFrame(result_)); + MEASURE_TIME( + { + superRes->nextFrame(result_); + ocl::finish(); + }); } else #endif From 387587f4f0515d0564c0d79e1d20e7a0fce6c67b Mon Sep 17 00:00:00 2001 From: Greg Hale Date: Mon, 21 Oct 2013 09:27:04 -0400 Subject: [PATCH 09/32] regex doesnt need to match full length of input, so only trying to match the leading -[lL] --- cmake/OpenCVGenPkgconfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake index 8b02d5b2b..a36b70e94 100644 --- a/cmake/OpenCVGenPkgconfig.cmake +++ b/cmake/OpenCVGenPkgconfig.cmake @@ -59,7 +59,7 @@ set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_}) if(OpenCV_EXTRA_COMPONENTS) foreach(extra_component ${OpenCV_EXTRA_COMPONENTS}) - if(extra_component MATCHES "^-[lL](.*)" OR extra_component MATCHES "[\\/]") + if(extra_component MATCHES "^-[lL]" OR extra_component MATCHES "[\\/]") set(maybe_l_prefix "") else() set(maybe_l_prefix "-l") From 9acca12d2dcd01435161e3281fc269e65697cb76 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 21 Oct 2013 19:15:11 +0400 Subject: [PATCH 10/32] ocl: workaround for ProgramCache cleanup issue, use RAII to print kernel build error --- modules/ocl/src/cl_programcache.cpp | 41 ++++++++++++++++------------- modules/ocl/src/cl_programcache.hpp | 1 - 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/modules/ocl/src/cl_programcache.cpp b/modules/ocl/src/cl_programcache.cpp index 76a115fd7..cc49ec193 100644 --- a/modules/ocl/src/cl_programcache.cpp +++ b/modules/ocl/src/cl_programcache.cpp @@ -61,12 +61,16 @@ namespace cv { namespace ocl { cv::Mutex ProgramCache::mutexFiles; cv::Mutex ProgramCache::mutexCache; -std::auto_ptr _programCache; +ProgramCache* _programCache = NULL; ProgramCache* ProgramCache::getProgramCache() { - if (NULL == _programCache.get()) - _programCache.reset(new ProgramCache()); - return _programCache.get(); + if (NULL == _programCache) + { + cv::AutoLock lock(getInitializationMutex()); + if (NULL == _programCache) + _programCache = new ProgramCache(); + } + return _programCache; } ProgramCache::ProgramCache() @@ -78,6 +82,12 @@ ProgramCache::ProgramCache() ProgramCache::~ProgramCache() { releaseProgram(); + if (this == _programCache) + { + cv::AutoLock lock(getInitializationMutex()); + if (this == _programCache) + _programCache = NULL; + } } cl_program ProgramCache::progLookup(const string& srcsign) @@ -420,22 +430,17 @@ struct ProgramFileCache { if(status == CL_BUILD_PROGRAM_FAILURE) { - cl_int logStatus; - char *buildLog = NULL; size_t buildLogSize = 0; - logStatus = clGetProgramBuildInfo(program, - getClDeviceID(ctx), CL_PROGRAM_BUILD_LOG, buildLogSize, - buildLog, &buildLogSize); - if(logStatus != CL_SUCCESS) - std::cout << "Failed to build the program and get the build info." << endl; - buildLog = new char[buildLogSize]; - CV_DbgAssert(!!buildLog); - memset(buildLog, 0, buildLogSize); openCLSafeCall(clGetProgramBuildInfo(program, getClDeviceID(ctx), - CL_PROGRAM_BUILD_LOG, buildLogSize, buildLog, NULL)); - std::cout << "\nBUILD LOG: " << options << "\n"; - std::cout << buildLog << endl; - delete [] buildLog; + CL_PROGRAM_BUILD_LOG, 0, NULL, &buildLogSize)); + std::vector buildLog; buildLog.resize(buildLogSize); + memset(&buildLog[0], 0, buildLogSize); + openCLSafeCall(clGetProgramBuildInfo(program, getClDeviceID(ctx), + CL_PROGRAM_BUILD_LOG, buildLogSize, &buildLog[0], NULL)); + std::cout << std::endl << "BUILD LOG: " + << (source->name ? source->name : "dynamic program") << ": " + << options << "\n"; + std::cout << &buildLog[0] << endl; } openCLVerifyCall(status); } diff --git a/modules/ocl/src/cl_programcache.hpp b/modules/ocl/src/cl_programcache.hpp index ea2ab400c..d94de21d9 100644 --- a/modules/ocl/src/cl_programcache.hpp +++ b/modules/ocl/src/cl_programcache.hpp @@ -52,7 +52,6 @@ class ProgramCache protected: ProgramCache(); ~ProgramCache(); - friend class std::auto_ptr; public: static ProgramCache *getProgramCache(); From e7fd0534780522dac5a7448f47098d1b49c17337 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 21 Oct 2013 19:48:36 +0400 Subject: [PATCH 11/32] ocl: fix FFT initialization --- modules/ocl/src/fft.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ocl/src/fft.cpp b/modules/ocl/src/fft.cpp index 6e4fc4d7c..50880f99d 100644 --- a/modules/ocl/src/fft.cpp +++ b/modules/ocl/src/fft.cpp @@ -126,7 +126,8 @@ void cv::ocl::fft_setup() { return; } - pCache.setupData = new clAmdFftSetupData; + if (pCache.setupData == NULL) + pCache.setupData = new clAmdFftSetupData; openCLSafeCall(clAmdFftInitSetupData( pCache.setupData )); pCache.started = true; } From 4d86e2140d0b3966537614a85f7a4f909bd0025e Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 21 Oct 2013 20:47:55 +0400 Subject: [PATCH 12/32] OpenCL examples refactoring --- samples/ocl/adaptive_bilateral_filter.cpp | 31 +++++++----- samples/ocl/bgfg_segm.cpp | 25 ++++------ samples/ocl/clahe.cpp | 60 ++++++++++++----------- samples/ocl/facedetect.cpp | 47 ++++++------------ samples/ocl/hog.cpp | 10 +++- samples/ocl/pyrlk_optical_flow.cpp | 20 +++----- samples/ocl/squares.cpp | 22 +++++---- samples/ocl/stereo_match.cpp | 8 ++- samples/ocl/surf_matcher.cpp | 34 ++++++------- samples/ocl/tvl1_optical_flow.cpp | 33 +++---------- 10 files changed, 130 insertions(+), 160 deletions(-) diff --git a/samples/ocl/adaptive_bilateral_filter.cpp b/samples/ocl/adaptive_bilateral_filter.cpp index d3d2521df..b8ad3edfb 100644 --- a/samples/ocl/adaptive_bilateral_filter.cpp +++ b/samples/ocl/adaptive_bilateral_filter.cpp @@ -12,17 +12,27 @@ int main( int argc, const char** argv ) { const char* keys = "{ i | input | | specify input image }" - "{ k | ksize | 5 | specify kernel size }"; + "{ k | ksize | 5 | specify kernel size }" + "{ h | help | false | print help message }"; + CommandLineParser cmd(argc, argv, keys); + if (cmd.get("help")) + { + cout << "Usage : adaptive_bilateral_filter [options]" << endl; + cout << "Available options:" << endl; + cmd.printParams(); + return EXIT_SUCCESS; + } + string src_path = cmd.get("i"); int ks = cmd.get("k"); const char * winName[] = {"input", "adaptive bilateral CPU", "adaptive bilateral OpenCL", "bilateralFilter OpenCL"}; - Mat src = imread(src_path); - Mat abFilterCPU; - if(src.empty()){ - //cout << "error read image: " << src_path << endl; - return -1; + Mat src = imread(src_path), abFilterCPU; + if (src.empty()) + { + cout << "error read image: " << src_path << endl; + return EXIT_FAILURE; } ocl::oclMat dsrc(src), dABFilter, dBFilter; @@ -32,17 +42,12 @@ int main( int argc, const char** argv ) ocl::adaptiveBilateralFilter(dsrc, dABFilter, ksize, 10); ocl::bilateralFilter(dsrc, dBFilter, ks, 30, 9); - Mat abFilter = dABFilter; - Mat bFilter = dBFilter; + Mat abFilter = dABFilter, bFilter = dBFilter; imshow(winName[0], src); - imshow(winName[1], abFilterCPU); - imshow(winName[2], abFilter); - imshow(winName[3], bFilter); - waitKey(); - return 0; + return EXIT_SUCCESS; } diff --git a/samples/ocl/bgfg_segm.cpp b/samples/ocl/bgfg_segm.cpp index 589a34914..997be056d 100644 --- a/samples/ocl/bgfg_segm.cpp +++ b/samples/ocl/bgfg_segm.cpp @@ -14,7 +14,6 @@ using namespace cv::ocl; int main(int argc, const char** argv) { - cv::CommandLineParser cmd(argc, argv, "{ c | camera | false | use camera }" "{ f | file | 768x576.avi | input video file }" @@ -26,7 +25,7 @@ int main(int argc, const char** argv) cout << "Usage : bgfg_segm [options]" << endl; cout << "Available options:" << endl; cmd.printParams(); - return 0; + return EXIT_SUCCESS; } bool useCamera = cmd.get("camera"); @@ -36,13 +35,12 @@ int main(int argc, const char** argv) if (method != "mog" && method != "mog2") { cerr << "Incorrect method" << endl; - return -1; + return EXIT_FAILURE; } int m = method == "mog" ? M_MOG : M_MOG2; VideoCapture cap; - if (useCamera) cap.open(0); else @@ -50,8 +48,8 @@ int main(int argc, const char** argv) if (!cap.isOpened()) { - cerr << "can not open camera or video file" << endl; - return -1; + cout << "can not open camera or video file" << endl; + return EXIT_FAILURE; } Mat frame; @@ -62,15 +60,11 @@ int main(int argc, const char** argv) cv::ocl::MOG mog; cv::ocl::MOG2 mog2; - oclMat d_fgmask; - oclMat d_fgimg; - oclMat d_bgimg; + oclMat d_fgmask, d_fgimg, d_bgimg; d_fgimg.create(d_frame.size(), d_frame.type()); - Mat fgmask; - Mat fgimg; - Mat bgimg; + Mat fgmask, fgimg, bgimg; switch (m) { @@ -83,7 +77,7 @@ int main(int argc, const char** argv) break; } - for(;;) + for (;;) { cap >> frame; if (frame.empty()) @@ -123,10 +117,9 @@ int main(int argc, const char** argv) if (!bgimg.empty()) imshow("mean background image", bgimg); - int key = waitKey(30); - if (key == 27) + if (27 == waitKey(30)) break; } - return 0; + return EXIT_SUCCESS; } diff --git a/samples/ocl/clahe.cpp b/samples/ocl/clahe.cpp index 5dc20756b..558a0d18f 100644 --- a/samples/ocl/clahe.cpp +++ b/samples/ocl/clahe.cpp @@ -9,15 +9,13 @@ using namespace std; Ptr pFilter; int tilesize; int cliplimit; -string outfile; static void TSize_Callback(int pos) { if(pos==0) - { pFilter->setTilesGridSize(Size(1,1)); - } - pFilter->setTilesGridSize(Size(tilesize,tilesize)); + else + pFilter->setTilesGridSize(Size(tilesize,tilesize)); } static void Clip_Callback(int) @@ -31,63 +29,64 @@ int main(int argc, char** argv) "{ i | input | | specify input image }" "{ c | camera | 0 | specify camera id }" "{ s | use_cpu | false | use cpu algorithm }" - "{ o | output | clahe_output.jpg | specify output save path}"; + "{ o | output | clahe_output.jpg | specify output save path}" + "{ h | help | false | print help message }"; - CommandLineParser cmd(argc, argv, keys); - string infile = cmd.get("i"); - outfile = cmd.get("o"); + cv::CommandLineParser cmd(argc, argv, keys); + if (cmd.get("help")) + { + cout << "Usage : clahe [options]" << endl; + cout << "Available options:" << endl; + cmd.printParams(); + return EXIT_SUCCESS; + } + + string infile = cmd.get("i"), outfile = cmd.get("o"); int camid = cmd.get("c"); bool use_cpu = cmd.get("s"); CvCapture* capture = 0; - bool running = true; namedWindow("CLAHE"); createTrackbar("Tile Size", "CLAHE", &tilesize, 32, (TrackbarCallback)TSize_Callback); createTrackbar("Clip Limit", "CLAHE", &cliplimit, 20, (TrackbarCallback)Clip_Callback); Mat frame, outframe; - ocl::oclMat d_outframe; + ocl::oclMat d_outframe, d_frame; int cur_clip; Size cur_tilesize; - if(use_cpu) - { - pFilter = createCLAHE(); - } - else - { - pFilter = ocl::createCLAHE(); - } + pFilter = use_cpu ? createCLAHE() : ocl::createCLAHE(); + cur_clip = (int)pFilter->getClipLimit(); cur_tilesize = pFilter->getTilesGridSize(); setTrackbarPos("Tile Size", "CLAHE", cur_tilesize.width); setTrackbarPos("Clip Limit", "CLAHE", cur_clip); + if(infile != "") { frame = imread(infile); if(frame.empty()) { cout << "error read image: " << infile << endl; - return -1; + return EXIT_FAILURE; } } else - { capture = cvCaptureFromCAM(camid); - } + cout << "\nControls:\n" << "\to - save output image\n" << "\tESC - exit\n"; - while(running) + + for (;;) { if(capture) frame = cvQueryFrame(capture); else frame = imread(infile); if(frame.empty()) - { continue; - } + if(use_cpu) { cvtColor(frame, frame, COLOR_BGR2GRAY); @@ -95,15 +94,18 @@ int main(int argc, char** argv) } else { - ocl::oclMat d_frame(frame); - ocl::cvtColor(d_frame, d_outframe, COLOR_BGR2GRAY); + ocl::cvtColor(d_frame = frame, d_outframe, COLOR_BGR2GRAY); pFilter->apply(d_outframe, d_outframe); d_outframe.download(outframe); } + imshow("CLAHE", outframe); + char key = (char)cvWaitKey(3); - if(key == 'o') imwrite(outfile, outframe); - else if(key == 27) running = false; + if(key == 'o') + imwrite(outfile, outframe); + else if(key == 27) + break; } - return 0; + return EXIT_SUCCESS; } diff --git a/samples/ocl/facedetect.cpp b/samples/ocl/facedetect.cpp index be61b79e4..d20c93785 100644 --- a/samples/ocl/facedetect.cpp +++ b/samples/ocl/facedetect.cpp @@ -28,27 +28,29 @@ static void workBegin() { work_begin = getTickCount(); } + static void workEnd() { work_end += (getTickCount() - work_begin); } + static double getTime() { return work_end /((double)cvGetTickFrequency() * 1000.); } -void detect( Mat& img, vector& faces, +static void detect( Mat& img, vector& faces, ocl::OclCascadeClassifierBuf& cascade, double scale, bool calTime); -void detectCPU( Mat& img, vector& faces, +static void detectCPU( Mat& img, vector& faces, CascadeClassifier& cascade, double scale, bool calTime); -void Draw(Mat& img, vector& faces, double scale); +static void Draw(Mat& img, vector& faces, double scale); // This function test if gpu_rst matches cpu_rst. @@ -56,7 +58,6 @@ void Draw(Mat& img, vector& faces, double scale); // Else if will return (total diff of each cpu and gpu rects covered pixels)/(total cpu rects covered pixels) double checkRectSimilarity(Size sz, vector& cpu_rst, vector& gpu_rst); - int main( int argc, const char** argv ) { const char* keys = @@ -72,10 +73,12 @@ int main( int argc, const char** argv ) CommandLineParser cmd(argc, argv, keys); if (cmd.get("help")) { + cout << "Usage : facedetect [options]" << endl; cout << "Available options:" << endl; cmd.printParams(); - return 0; + return EXIT_SUCCESS; } + CvCapture* capture = 0; Mat frame, frameCopy, image; @@ -89,8 +92,8 @@ int main( int argc, const char** argv ) if( !cascade.load( cascadeName ) || !cpu_cascade.load(cascadeName) ) { - cerr << "ERROR: Could not load classifier cascade" << endl; - return -1; + cout << "ERROR: Could not load classifier cascade" << endl; + return EXIT_FAILURE; } if( inputName.empty() ) @@ -99,25 +102,17 @@ int main( int argc, const char** argv ) if(!capture) cout << "Capture from CAM 0 didn't work" << endl; } - else if( inputName.size() ) + else { - image = imread( inputName, 1 ); + image = imread( inputName, CV_LOAD_IMAGE_COLOR ); if( image.empty() ) { capture = cvCaptureFromAVI( inputName.c_str() ); if(!capture) cout << "Capture from AVI didn't work" << endl; - return -1; + return EXIT_FAILURE; } } - else - { - image = imread( "lena.jpg", 1 ); - if(image.empty()) - cout << "Couldn't read lena.jpg" << endl; - return -1; - } - cvNamedWindow( "result", 1 ); if( capture ) @@ -134,24 +129,16 @@ int main( int argc, const char** argv ) frame.copyTo( frameCopy ); else flip( frame, frameCopy, 0 ); + if(useCPU) - { detectCPU(frameCopy, faces, cpu_cascade, scale, false); - } else - { detect(frameCopy, faces, cascade, scale, false); - } + Draw(frameCopy, faces, scale); if( waitKey( 10 ) >= 0 ) - goto _cleanup_; + break; } - - - waitKey(0); - - -_cleanup_: cvReleaseCapture( &capture ); } else @@ -164,9 +151,7 @@ _cleanup_: { cout << "loop" << i << endl; if(useCPU) - { detectCPU(image, faces, cpu_cascade, scale, i==0?false:true); - } else { detect(image, faces, cascade, scale, i==0?false:true); diff --git a/samples/ocl/hog.cpp b/samples/ocl/hog.cpp index 89c8dff82..28f0cc12a 100644 --- a/samples/ocl/hog.cpp +++ b/samples/ocl/hog.cpp @@ -72,6 +72,14 @@ int main(int argc, char** argv) "{ l |larger_win| false | use 64x128 window}" "{ o | output | | specify output path when input is images}"; CommandLineParser cmd(argc, argv, keys); + if (cmd.get("help")) + { + cout << "Usage : hog [options]" << endl; + cout << "Available options:" << endl; + cmd.printParams(); + return EXIT_SUCCESS; + } + App app(cmd); try { @@ -89,7 +97,7 @@ int main(int argc, char** argv) { return cout << "unknown exception" << endl, 1; } - return 0; + return EXIT_SUCCESS; } App::App(CommandLineParser& cmd) diff --git a/samples/ocl/pyrlk_optical_flow.cpp b/samples/ocl/pyrlk_optical_flow.cpp index 5a5980379..c3648eff3 100644 --- a/samples/ocl/pyrlk_optical_flow.cpp +++ b/samples/ocl/pyrlk_optical_flow.cpp @@ -44,7 +44,8 @@ static void download(const oclMat& d_mat, vector& vec) d_mat.download(mat); } -static void drawArrows(Mat& frame, const vector& prevPts, const vector& nextPts, const vector& status, Scalar line_color = Scalar(0, 0, 255)) +static void drawArrows(Mat& frame, const vector& prevPts, const vector& nextPts, const vector& status, + Scalar line_color = Scalar(0, 0, 255)) { for (size_t i = 0; i < prevPts.size(); ++i) { @@ -104,7 +105,7 @@ int main(int argc, const char* argv[]) cout << "Usage: pyrlk_optical_flow [options]" << endl; cout << "Available options:" << endl; cmd.printParams(); - return 0; + return EXIT_SUCCESS; } bool defaultPicturesFail = false; @@ -136,7 +137,7 @@ int main(int argc, const char* argv[]) Mat frame0Gray, frame1Gray; Mat ptr0, ptr1; - if(vdofile == "") + if(vdofile.empty()) capture = cvCaptureFromCAM( inputName ); else capture = cvCreateFileCapture(vdofile.c_str()); @@ -144,14 +145,12 @@ int main(int argc, const char* argv[]) int c = inputName ; if(!capture) { - if(vdofile == "") + if(vdofile.empty()) cout << "Capture from CAM " << c << " didn't work" << endl; else cout << "Capture from file " << vdofile << " failed" <= 0 ) - goto _cleanup_; + break; } - waitKey(0); - -_cleanup_: cvReleaseCapture( &capture ); } else @@ -264,5 +260,5 @@ nocamera: waitKey(); - return 0; + return EXIT_SUCCESS; } diff --git a/samples/ocl/squares.cpp b/samples/ocl/squares.cpp index 9e709245d..bd1c3c392 100644 --- a/samples/ocl/squares.cpp +++ b/samples/ocl/squares.cpp @@ -13,9 +13,9 @@ using namespace cv; using namespace std; -#define ACCURACY_CHECK 1 +#define ACCURACY_CHECK -#if ACCURACY_CHECK +#ifdef ACCURACY_CHECK // check if two vectors of vector of points are near or not // prior assumption is that they are in correct order static bool checkPoints( @@ -278,27 +278,31 @@ int main(int argc, char** argv) { const char* keys = "{ i | input | | specify input image }" - "{ o | output | squares_output.jpg | specify output save path}"; + "{ o | output | squares_output.jpg | specify output save path}" + "{ h | help | false | print help message }"; CommandLineParser cmd(argc, argv, keys); string inputName = cmd.get("i"); string outfile = cmd.get("o"); - if(inputName.empty()) + + if(cmd.get("help")) { + cout << "Usage : squares [options]" << endl; cout << "Available options:" << endl; cmd.printParams(); - return 0; + return EXIT_SUCCESS; } int iterations = 10; - namedWindow( wndname, 1 ); + namedWindow( wndname, CV_LOAD_IMAGE_COLOR ); vector > squares_cpu, squares_ocl; Mat image = imread(inputName, 1); if( image.empty() ) { cout << "Couldn't load " << inputName << endl; - return -1; + return EXIT_FAILURE; } + int j = iterations; int64 t_ocl = 0, t_cpp = 0; //warm-ups @@ -307,7 +311,7 @@ int main(int argc, char** argv) findSquares_ocl(image, squares_ocl); -#if ACCURACY_CHECK +#ifdef ACCURACY_CHECK cout << "Checking ocl accuracy ... " << endl; cout << (checkPoints(squares_cpu, squares_ocl) ? "Pass" : "Failed") << endl; #endif @@ -332,5 +336,5 @@ int main(int argc, char** argv) imwrite(outfile, result); cvWaitKey(0); - return 0; + return EXIT_SUCCESS; } diff --git a/samples/ocl/stereo_match.cpp b/samples/ocl/stereo_match.cpp index 86d60d49b..7a5c10519 100644 --- a/samples/ocl/stereo_match.cpp +++ b/samples/ocl/stereo_match.cpp @@ -76,8 +76,9 @@ int main(int argc, char** argv) "{ l | left | | specify left image }" "{ r | right | | specify right image }" "{ m | method | BM | specify match method(BM/BP/CSBP) }" - "{ n | ndisp | 64 | specify number of disparity levels }" + "{ n | ndisp | 64 | specify number of disparity levels }" "{ o | output | stereo_match_output.jpg | specify output path when input is images}"; + CommandLineParser cmd(argc, argv, keys); if (cmd.get("help")) { @@ -85,6 +86,7 @@ int main(int argc, char** argv) cmd.printParams(); return 0; } + try { App app(cmd); @@ -96,7 +98,8 @@ int main(int argc, char** argv) { cout << "error: " << e.what() << endl; } - return 0; + + return EXIT_SUCCESS; } App::App(CommandLineParser& cmd) @@ -114,6 +117,7 @@ App::App(CommandLineParser& cmd) << "\t2/w - increase/decrease window size (for BM only)\n" << "\t3/e - increase/decrease iteration count (for BP and CSBP only)\n" << "\t4/r - increase/decrease level count (for BP and CSBP only)\n"; + l_img = cmd.get("l"); r_img = cmd.get("r"); string mstr = cmd.get("m"); diff --git a/samples/ocl/surf_matcher.cpp b/samples/ocl/surf_matcher.cpp index 4d7332305..6023de903 100644 --- a/samples/ocl/surf_matcher.cpp +++ b/samples/ocl/surf_matcher.cpp @@ -14,21 +14,20 @@ const int LOOP_NUM = 10; const int GOOD_PTS_MAX = 50; const float GOOD_PORTION = 0.15f; -namespace -{ - int64 work_begin = 0; int64 work_end = 0; -void workBegin() +static void workBegin() { work_begin = getTickCount(); } -void workEnd() + +static void workEnd() { work_end = getTickCount() - work_begin; } -double getTime() + +static double getTime() { return work_end /((double)cvGetTickFrequency() * 1000.); } @@ -59,7 +58,7 @@ struct SURFMatcher } }; -Mat drawGoodMatches( +static Mat drawGoodMatches( const Mat& cpu_img1, const Mat& cpu_img2, const vector& keypoints1, @@ -129,7 +128,6 @@ Mat drawGoodMatches( return img_matches; } -} //////////////////////////////////////////////////// // This program demonstrates the usage of SURF_OCL. // use cpu findHomography interface to calculate the transformation matrix @@ -142,12 +140,14 @@ int main(int argc, char* argv[]) "{ o | output | SURF_output.jpg | specify output save path (only works in CPU or GPU only mode) }" "{ c | use_cpu | false | use CPU algorithms }" "{ a | use_all | false | use both CPU and GPU algorithms}"; + CommandLineParser cmd(argc, argv, keys); if (cmd.get("help")) { + std::cout << "Usage: surf_matcher [options]" << std::endl; std::cout << "Available options:" << std::endl; cmd.printParams(); - return 0; + return EXIT_SUCCESS; } Mat cpu_img1, cpu_img2, cpu_img1_grey, cpu_img2_grey; @@ -168,23 +168,17 @@ int main(int argc, char* argv[]) cvtColor(cpu_img2, cpu_img2_grey, CV_BGR2GRAY); img2 = cpu_img2_grey; - if(useALL) - { - useCPU = false; - useGPU = false; - } - else if(useCPU==false && useALL==false) - { + if (useALL) + useCPU = useGPU = false; + else if(!useCPU && !useALL) useGPU = true; - } if(!useCPU) - { std::cout << "Device name:" << cv::ocl::Context::getContext()->getDeviceInfo().deviceName << std::endl; - } + double surf_time = 0.; //declare input/output @@ -330,5 +324,5 @@ int main(int argc, char* argv[]) imshow("ocl surf matches", ocl_img_matches); } waitKey(0); - return 0; + return EXIT_SUCCESS; } diff --git a/samples/ocl/tvl1_optical_flow.cpp b/samples/ocl/tvl1_optical_flow.cpp index 296dc6933..fabfa9a46 100644 --- a/samples/ocl/tvl1_optical_flow.cpp +++ b/samples/ocl/tvl1_optical_flow.cpp @@ -96,10 +96,9 @@ int main(int argc, const char* argv[]) cout << "Usage: pyrlk_optical_flow [options]" << endl; cout << "Available options:" << endl; cmd.printParams(); - return 0; + return EXIT_SUCCESS; } - bool defaultPicturesFail = false; string fname0 = cmd.get("l"); string fname1 = cmd.get("r"); string vdofile = cmd.get("v"); @@ -113,22 +112,10 @@ int main(int argc, const char* argv[]) cv::Ptr alg = cv::createOptFlow_DualTVL1(); cv::ocl::OpticalFlowDual_TVL1_OCL d_alg; - Mat flow, show_flow; Mat flow_vec[2]; if (frame0.empty() || frame1.empty()) - { useCamera = true; - defaultPicturesFail = true; - CvCapture* capture = 0; - capture = cvCaptureFromCAM( inputName ); - if (!capture) - { - cout << "Can't load input images" << endl; - return -1; - } - } - if (useCamera) { @@ -137,22 +124,17 @@ int main(int argc, const char* argv[]) Mat frame0Gray, frame1Gray; Mat ptr0, ptr1; - if(vdofile == "") + if(vdofile.empty()) capture = cvCaptureFromCAM( inputName ); else capture = cvCreateFileCapture(vdofile.c_str()); - int c = inputName ; if(!capture) { - if(vdofile == "") - cout << "Capture from CAM " << c << " didn't work" << endl; + if(vdofile.empty()) + cout << "Capture from CAM " << inputName << " didn't work" << endl; else cout << "Capture from file " << vdofile << " failed" <= 0 ) - goto _cleanup_; + break; } - waitKey(0); - -_cleanup_: cvReleaseCapture( &capture ); } else @@ -254,5 +233,5 @@ nocamera: waitKey(); - return 0; + return EXIT_SUCCESS; } From 8ff267cbac420e8dffa1da53dea37dbac9db159c Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 22 Oct 2013 14:48:25 +0400 Subject: [PATCH 13/32] Fixed incorrectly unprefixed constant names in the OpenNI tutorial. Bug report: http://code.opencv.org/issues/3329 --- doc/user_guide/ug_highgui.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/user_guide/ug_highgui.rst b/doc/user_guide/ug_highgui.rst index a71e57928..f3bf62cad 100644 --- a/doc/user_guide/ug_highgui.rst +++ b/doc/user_guide/ug_highgui.rst @@ -41,15 +41,15 @@ VideoCapture can retrieve the following data: #. data given from depth generator: - * ``OPENNI_DEPTH_MAP`` - depth values in mm (CV_16UC1) - * ``OPENNI_POINT_CLOUD_MAP`` - XYZ in meters (CV_32FC3) - * ``OPENNI_DISPARITY_MAP`` - disparity in pixels (CV_8UC1) - * ``OPENNI_DISPARITY_MAP_32F`` - disparity in pixels (CV_32FC1) - * ``OPENNI_VALID_DEPTH_MASK`` - mask of valid pixels (not ocluded, not shaded etc.) (CV_8UC1) + * ``CV_CAP_OPENNI_DEPTH_MAP`` - depth values in mm (CV_16UC1) + * ``CV_CAP_OPENNI_POINT_CLOUD_MAP`` - XYZ in meters (CV_32FC3) + * ``CV_CAP_OPENNI_DISPARITY_MAP`` - disparity in pixels (CV_8UC1) + * ``CV_CAP_OPENNI_DISPARITY_MAP_32F`` - disparity in pixels (CV_32FC1) + * ``CV_CAP_OPENNI_VALID_DEPTH_MASK`` - mask of valid pixels (not ocluded, not shaded etc.) (CV_8UC1) #. data given from RGB image generator: - * ``OPENNI_BGR_IMAGE`` - color image (CV_8UC3) - * ``OPENNI_GRAY_IMAGE`` - gray image (CV_8UC1) + * ``CV_CAP_OPENNI_BGR_IMAGE`` - color image (CV_8UC3) + * ``CV_CAP_OPENNI_GRAY_IMAGE`` - gray image (CV_8UC1) In order to get depth map from depth sensor use ``VideoCapture::operator >>``, e. g. :: @@ -73,8 +73,8 @@ For getting several data maps use ``VideoCapture::grab`` and ``VideoCapture::ret capture.grab(); - capture.retrieve( depthMap, OPENNI_DEPTH_MAP ); - capture.retrieve( bgrImage, OPENNI_BGR_IMAGE ); + capture.retrieve( depthMap, CV_CAP_OPENNI_DEPTH_MAP ); + capture.retrieve( bgrImage, CV_CAP_OPENNI_BGR_IMAGE ); if( waitKey( 30 ) >= 0 ) break; From f82eb0f79c647d5b64c32e6e4837399705037dc1 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 22 Oct 2013 18:47:37 +0400 Subject: [PATCH 14/32] Add better OpenMP detection and make an option to enable it. Bug report and inspiration: http://code.opencv.org/issues/3328 --- CMakeLists.txt | 1 + cmake/OpenCVFindLibsPerf.cmake | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b0e1292..704c51be8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,7 @@ OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF OCV_OPTION(WITH_WIN32UI "Build with Win32 UI Backend support" ON IF WIN32 ) OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF IF APPLE ) OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS) ) +OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF) OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF WIN32 ) OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) ) OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) ) diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake index 72b4ba6f7..33ea36f48 100644 --- a/cmake/OpenCVFindLibsPerf.cmake +++ b/cmake/OpenCVFindLibsPerf.cmake @@ -47,13 +47,13 @@ else() endif() # --- OpenMP --- -if(NOT HAVE_TBB AND NOT HAVE_CSTRIPES) - set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/omptest.cpp") - file(WRITE "${_fname}" "#ifndef _OPENMP\n#error\n#endif\nint main() { return 0; }\n") - try_compile(HAVE_OPENMP "${CMAKE_BINARY_DIR}" "${_fname}") - file(REMOVE "${_fname}") -else() - set(HAVE_OPENMP 0) +if(WITH_OPENMP AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES) + find_package(OpenMP) + if(OPENMP_FOUND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + endif() + set(HAVE_OPENMP "${OPENMP_FOUND}") endif() # --- GCD --- From 87fc3441f279a6c28d26fbb06c0ee09fa2ebf614 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Oct 2013 18:42:55 +0400 Subject: [PATCH 15/32] workaround for cv::multiply bug --- modules/ocl/test/test_arithm.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ocl/test/test_arithm.cpp b/modules/ocl/test/test_arithm.cpp index 8c08d25a9..ddc211007 100644 --- a/modules/ocl/test/test_arithm.cpp +++ b/modules/ocl/test/test_arithm.cpp @@ -181,9 +181,6 @@ PARAM_TEST_CASE(ArithmTestBase, MatDepth, Channels, bool) depth = GET_PARAM(0); cn = GET_PARAM(1); use_roi = GET_PARAM(2); - - val = cv::Scalar(rng.uniform(-100.0, 100.0), rng.uniform(-100.0, 100.0), - rng.uniform(-100.0, 100.0), rng.uniform(-100.0, 100.0)); } void random_roi() @@ -213,6 +210,9 @@ PARAM_TEST_CASE(ArithmTestBase, MatDepth, Channels, bool) generateOclMat(gdst1_whole, gdst1_roi, dst1, roiSize, dst1Border); generateOclMat(gdst2_whole, gdst2_roi, dst2, roiSize, dst2Border); generateOclMat(gmask_whole, gmask_roi, mask, roiSize, maskBorder); + + val = cv::Scalar(rng.uniform(-100.0, 100.0), rng.uniform(-100.0, 100.0), + rng.uniform(-100.0, 100.0), rng.uniform(-100.0, 100.0)); } void Near(double threshold = 0.) @@ -389,7 +389,7 @@ OCL_TEST_P(Mul, Scalar) { random_roi(); - cv::multiply(val[0], src1_roi, dst1_roi); + cv::multiply(Scalar::all(val[0]), src1_roi, dst1_roi); cv::ocl::multiply(val[0], gsrc1_roi, gdst1_roi); Near(gdst1_roi.depth() >= CV_32F ? 1e-3 : 1); From 29499ed51af2055b4507316d3896fc817e95ff18 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Oct 2013 19:53:04 +0400 Subject: [PATCH 16/32] moved to relative errors in ocl::norm tests --- modules/ocl/test/test_arithm.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/ocl/test/test_arithm.cpp b/modules/ocl/test/test_arithm.cpp index 8c08d25a9..561164bd9 100644 --- a/modules/ocl/test/test_arithm.cpp +++ b/modules/ocl/test/test_arithm.cpp @@ -61,6 +61,11 @@ using namespace cvtest; using namespace testing; using namespace std; +static bool relativeError(double actual, double expected, double eps) +{ + return std::abs(actual - expected) / actual < eps; +} + //////////////////////////////// LUT ///////////////////////////////////////////////// PARAM_TEST_CASE(Lut, MatDepth, MatDepth, bool, bool) @@ -1466,7 +1471,7 @@ OCL_TEST_P(Norm, NORM_L1) const double cpuRes = cv::norm(src1_roi, src2_roi, type); const double gpuRes = cv::ocl::norm(gsrc1_roi, gsrc2_roi, type); - EXPECT_NEAR(cpuRes, gpuRes, 0.1); + EXPECT_PRED3(relativeError, cpuRes, gpuRes, 1e-6); } } @@ -1484,7 +1489,7 @@ OCL_TEST_P(Norm, NORM_L2) const double cpuRes = cv::norm(src1_roi, src2_roi, type); const double gpuRes = cv::ocl::norm(gsrc1_roi, gsrc2_roi, type); - EXPECT_NEAR(cpuRes, gpuRes, 0.1); + EXPECT_PRED3(relativeError, cpuRes, gpuRes, 1e-6); } } From d571b28eaa99ca4b6f51b31a12283b7bafa0cbb0 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 23 Oct 2013 20:28:22 +0400 Subject: [PATCH 17/32] cmake: fix bug with installation into OPENCV_LIB_INSTALL_PATH directory --- cmake/OpenCVUtils.cmake | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index 818ec9b4b..b94d17c6c 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -467,9 +467,10 @@ function(ocv_install_target) set(isArchive 0) set(isDst 0) + unset(__dst) foreach(e ${ARGN}) if(isDst EQUAL 1) - set(DST "${e}") + set(__dst "${e}") break() endif() if(isArchive EQUAL 1 AND e STREQUAL "DESTINATION") @@ -482,18 +483,20 @@ function(ocv_install_target) endif() endforeach() -# message(STATUS "Process ${__target} dst=${DST}...") - if(NOT DEFINED DST) - set(DST "OPENCV_LIB_INSTALL_PATH") +# message(STATUS "Process ${__target} dst=${__dst}...") + if(DEFINED __dst) + get_target_property(fname ${__target} LOCATION_DEBUG) + if(fname MATCHES "\\.lib$") + string(REGEX REPLACE "\\.lib$" ".pdb" fname "${fname}") + install(FILES ${fname} DESTINATION ${__dst} CONFIGURATIONS Debug) + endif() + + get_target_property(fname ${__target} LOCATION_RELEASE) + if(fname MATCHES "\\.lib$") + string(REGEX REPLACE "\\.lib$" ".pdb" fname "${fname}") + install(FILES ${fname} DESTINATION ${__dst} CONFIGURATIONS Release) + endif() endif() - - get_target_property(fname ${__target} LOCATION_DEBUG) - string(REPLACE ".lib" ".pdb" fname "${fname}") - install(FILES ${fname} DESTINATION ${DST} CONFIGURATIONS Debug) - - get_target_property(fname ${__target} LOCATION_RELEASE) - string(REPLACE ".lib" ".pdb" fname "${fname}") - install(FILES ${fname} DESTINATION ${DST} CONFIGURATIONS Release) endif() endif() endfunction() From 7c1443cbdd565e03a63ade1367a32a365c93082f Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Oct 2013 22:11:57 +0400 Subject: [PATCH 18/32] fixed an accuracy test for ocl::resize (in some cases dsize.area() was equal to 0) --- modules/ocl/test/test_warp.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/ocl/test/test_warp.cpp b/modules/ocl/test/test_warp.cpp index 717bbc7a2..6d8943761 100644 --- a/modules/ocl/test/test_warp.cpp +++ b/modules/ocl/test/test_warp.cpp @@ -283,14 +283,21 @@ PARAM_TEST_CASE(Resize, MatType, double, double, Interpolation, bool) void random_roi() { - Size srcRoiSize = randomSize(1, MAX_VALUE); - Border srcBorder = randomBorder(0, useRoi ? MAX_VALUE : 0); - randomSubMat(src, src_roi, srcRoiSize, srcBorder, type, -MAX_VALUE, MAX_VALUE); + CV_Assert(fx > 0 && fy > 0); - Size dstRoiSize; + Size srcRoiSize = randomSize(1, MAX_VALUE), dstRoiSize; dstRoiSize.width = cvRound(srcRoiSize.width * fx); dstRoiSize.height = cvRound(srcRoiSize.height * fy); + if (dstRoiSize.area() == 0) + { + random_roi(); + return; + } + + Border srcBorder = randomBorder(0, useRoi ? MAX_VALUE : 0); + randomSubMat(src, src_roi, srcRoiSize, srcBorder, type, -MAX_VALUE, MAX_VALUE); + Border dstBorder = randomBorder(0, useRoi ? MAX_VALUE : 0); randomSubMat(dst_whole, dst_roi, dstRoiSize, dstBorder, type, -MAX_VALUE, MAX_VALUE); @@ -315,7 +322,7 @@ OCL_TEST_P(Resize, Mat) { random_roi(); - resize(src_roi, dst_roi, Size(), fx, fy, interpolation); + cv::resize(src_roi, dst_roi, Size(), fx, fy, interpolation); ocl::resize(gsrc_roi, gdst_roi, Size(), fx, fy, interpolation); Near(1.0); From 5864895ec6517bca45644988e5e225d37418cecb Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Oct 2013 17:20:10 +0400 Subject: [PATCH 19/32] fixed ocl::copyMakeBorder --- modules/ocl/src/imgproc.cpp | 41 +--- .../ocl/src/opencl/imgproc_copymakeboder.cl | 225 ++++++------------ modules/ocl/test/test_imgproc.cpp | 2 +- 3 files changed, 90 insertions(+), 178 deletions(-) diff --git a/modules/ocl/src/imgproc.cpp b/modules/ocl/src/imgproc.cpp index 10b680486..0a2cf3f8d 100644 --- a/modules/ocl/src/imgproc.cpp +++ b/modules/ocl/src/imgproc.cpp @@ -436,7 +436,7 @@ namespace cv CV_Assert(top >= 0 && bottom >= 0 && left >= 0 && right >= 0); - if( _src.offset != 0 && (bordertype & BORDER_ISOLATED) == 0 ) + if( (_src.wholecols != _src.cols || _src.wholerows != _src.rows) && (bordertype & BORDER_ISOLATED) == 0 ) { Size wholeSize; Point ofs; @@ -453,34 +453,25 @@ namespace cv } bordertype &= ~cv::BORDER_ISOLATED; - // TODO need to remove this conditions and fix the code - if (bordertype == cv::BORDER_REFLECT || bordertype == cv::BORDER_WRAP) - { - CV_Assert((_src.cols >= left) && (_src.cols >= right) && (_src.rows >= top) && (_src.rows >= bottom)); - } - else if (bordertype == cv::BORDER_REFLECT_101) - { - CV_Assert((_src.cols > left) && (_src.cols > right) && (_src.rows > top) && (_src.rows > bottom)); - } - dst.create(_src.rows + top + bottom, _src.cols + left + right, _src.type()); - int srcStep = _src.step1() / _src.oclchannels(), dstStep = dst.step1() / dst.oclchannels(); + int srcStep = _src.step / _src.elemSize(), dstStep = dst.step / dst.elemSize(); int srcOffset = _src.offset / _src.elemSize(), dstOffset = dst.offset / dst.elemSize(); int depth = _src.depth(), ochannels = _src.oclchannels(); - int __bordertype[] = {cv::BORDER_CONSTANT, cv::BORDER_REPLICATE, BORDER_REFLECT, BORDER_WRAP, BORDER_REFLECT_101}; - const char *borderstr[] = {"BORDER_CONSTANT", "BORDER_REPLICATE", "BORDER_REFLECT", "BORDER_WRAP", "BORDER_REFLECT_101"}; - size_t bordertype_index; + int __bordertype[] = { BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT, BORDER_WRAP, BORDER_REFLECT_101 }; + const char *borderstr[] = { "BORDER_CONSTANT", "BORDER_REPLICATE", "BORDER_REFLECT", "BORDER_WRAP", "BORDER_REFLECT_101" }; - for(bordertype_index = 0; bordertype_index < sizeof(__bordertype) / sizeof(int); bordertype_index++) - if (__bordertype[bordertype_index] == bordertype) + int bordertype_index = -1; + for (int i = 0, end = sizeof(__bordertype) / sizeof(int); i < end; i++) + if (__bordertype[i] == bordertype) + { + bordertype_index = i; break; - - if (bordertype_index == sizeof(__bordertype) / sizeof(int)) + } + if (bordertype_index < 0) CV_Error(CV_StsBadArg, "Unsupported border type"); - string kernelName = "copymakeborder"; - size_t localThreads[3] = {16, 16, 1}; + size_t localThreads[3] = { 16, 16, 1 }; size_t globalThreads[3] = { dst.cols, dst.rows, 1 }; vector< pair > args; @@ -503,12 +494,6 @@ namespace cv typeMap[depth], channelMap[ochannels], borderstr[bordertype_index]); - if (src.type() == CV_8UC1 && (dst.offset & 3) == 0 && (dst.cols & 3) == 0) - { - kernelName = "copymakeborder_C1_D0"; - globalThreads[0] = dst.cols >> 2; - } - int cn = src.channels(), ocn = src.oclchannels(); int bufSize = src.elemSize1() * ocn; AutoBuffer _buf(bufSize); @@ -518,7 +503,7 @@ namespace cv args.push_back( make_pair( bufSize , (void *)buf )); - openCLExecuteKernel(src.clCxt, &imgproc_copymakeboder, kernelName, globalThreads, + openCLExecuteKernel(src.clCxt, &imgproc_copymakeboder, "copymakeborder", globalThreads, localThreads, args, -1, -1, buildOptions.c_str()); } diff --git a/modules/ocl/src/opencl/imgproc_copymakeboder.cl b/modules/ocl/src/opencl/imgproc_copymakeboder.cl index ff7509ffd..b1686842e 100644 --- a/modules/ocl/src/opencl/imgproc_copymakeboder.cl +++ b/modules/ocl/src/opencl/imgproc_copymakeboder.cl @@ -35,173 +35,100 @@ // #if defined (DOUBLE_SUPPORT) -#ifdef cl_khr_fp64 -#pragma OPENCL EXTENSION cl_khr_fp64:enable -#elif defined (cl_amd_fp64) +#ifdef cl_amd_fp64 #pragma OPENCL EXTENSION cl_amd_fp64:enable +#elif defined (cl_khr_fp64) +#pragma OPENCL EXTENSION cl_khr_fp64:enable #endif #endif #ifdef BORDER_CONSTANT -//BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii -#define ELEM(i,l_edge,r_edge,elem1,elem2) (i)<(l_edge) | (i) >= (r_edge) ? (elem1) : (elem2) -#endif - -#ifdef BORDER_REPLICATE -//BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? (l_edge) : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? (r_edge)-1 : (addr) -#endif - +#define EXTRAPOLATE(x, y, v) v = scalar; +#elif defined BORDER_REPLICATE +#define EXTRAPOLATE(x, y, v) \ + { \ + x = max(min(x, src_cols - 1), 0); \ + y = max(min(y, src_rows - 1), 0); \ + v = src[mad24(y, src_step, x + src_offset)]; \ + } +#elif defined BORDER_WRAP +#define EXTRAPOLATE(x, y, v) \ + { \ + if (x < 0) \ + x -= ((x - src_cols + 1) / src_cols) * src_cols; \ + if (x >= src_cols) \ + x %= src_cols; \ + \ + if (y < 0) \ + y -= ((y - src_rows + 1) / src_rows) * src_rows; \ + if( y >= src_rows ) \ + y %= src_rows; \ + v = src[mad24(y, src_step, x + src_offset)]; \ + } +#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101) #ifdef BORDER_REFLECT -//BORDER_REFLECT: fedcba|abcdefgh|hgfedcb -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? -(i)-1 : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? -(i)-1+((r_edge)<<1) : (addr) +#define DELTA int delta = 0 +#else +#define DELTA int delta = 1 +#endif +#define EXTRAPOLATE(x, y, v) \ + { \ + DELTA; \ + if (src_cols == 1) \ + x = 0; \ + else \ + do \ + { \ + if( x < 0 ) \ + x = -x - 1 + delta; \ + else \ + x = src_cols - 1 - (x - src_cols) - delta; \ + } \ + while (x >= src_cols || x < 0); \ + \ + if (src_rows == 1) \ + y = 0; \ + else \ + do \ + { \ + if( y < 0 ) \ + y = -y - 1 + delta; \ + else \ + y = src_rows - 1 - (y - src_rows) - delta; \ + } \ + while (y >= src_rows || y < 0); \ + v = src[mad24(y, src_step, x + src_offset)]; \ + } +#else +#error No extrapolation method #endif -#ifdef BORDER_REFLECT_101 -//BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? -(i) : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? -(i)-2+((r_edge)<<1) : (addr) -#endif - -#ifdef BORDER_WRAP -//BORDER_WRAP: cdefgh|abcdefgh|abcdefg -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? (i)+(r_edge) : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? (i)-(r_edge) : (addr) -#endif +#define NEED_EXTRAPOLATION(gx, gy) (gx >= src_cols || gy >= src_rows || gx < 0 || gy < 0) __kernel void copymakeborder (__global const GENTYPE *src, __global GENTYPE *dst, - const int dst_cols, - const int dst_rows, - const int src_cols, - const int src_rows, - const int src_step_in_pixel, - const int src_offset_in_pixel, - const int dst_step_in_pixel, - const int dst_offset_in_pixel, - const int top, - const int left, - const GENTYPE val - ) + int dst_cols, int dst_rows, + int src_cols, int src_rows, + int src_step, int src_offset, + int dst_step, int dst_offset, + int top, int left, GENTYPE scalar) { int x = get_global_id(0); int y = get_global_id(1); - int src_x = x-left; - int src_y = y-top; - int src_addr = mad24(src_y,src_step_in_pixel,src_x+src_offset_in_pixel); - int dst_addr = mad24(y,dst_step_in_pixel,x+dst_offset_in_pixel); - int con = (src_x >= 0) && (src_x < src_cols) && (src_y >= 0) && (src_y < src_rows); - if(con) - { - dst[dst_addr] = src[src_addr]; - } - else - { - #ifdef BORDER_CONSTANT - //write the result to dst - if((x= 0) && (src_x+3 < src_cols) && (src_y >= 0) && (src_y < src_rows); - if(con) + if (x < dst_cols && y < dst_rows) { - uchar4 tmp = vload4(0,src+src_addr); - *(__global uchar4*)(dst+dst_addr) = tmp; - } - else - { - #ifdef BORDER_CONSTANT - //write the result to dst - if((((src_x<0) && (src_x+3>=0))||(src_x < src_cols) && (src_x+3 >= src_cols)) && (src_y >= 0) && (src_y < src_rows)) + int src_x = x - left; + int src_y = y - top; + int dst_index = mad24(y, dst_step, x + dst_offset); + + if (NEED_EXTRAPOLATION(src_x, src_y)) + EXTRAPOLATE(src_x, src_y, dst[dst_index]) + else { - int4 addr; - uchar4 tmp; - addr.x = ((src_x < 0) || (src_x>= src_cols)) ? 0 : src_addr; - addr.y = ((src_x+1 < 0) || (src_x+1>= src_cols)) ? 0 : (src_addr+1); - addr.z = ((src_x+2 < 0) || (src_x+2>= src_cols)) ? 0 : (src_addr+2); - addr.w = ((src_x+3 < 0) || (src_x+3>= src_cols)) ? 0 : (src_addr+3); - tmp.x = src[addr.x]; - tmp.y = src[addr.y]; - tmp.z = src[addr.z]; - tmp.w = src[addr.w]; - tmp.x = (src_x >=0)&&(src_x < src_cols) ? tmp.x : val; - tmp.y = (src_x+1 >=0)&&(src_x +1 < src_cols) ? tmp.y : val; - tmp.z = (src_x+2 >=0)&&(src_x +2 < src_cols) ? tmp.z : val; - tmp.w = (src_x+3 >=0)&&(src_x +3 < src_cols) ? tmp.w : val; - *(__global uchar4*)(dst+dst_addr) = tmp; + int src_index = mad24(src_y, src_step, src_x + src_offset); + dst[dst_index] = src[src_index]; } - else if((x Date: Thu, 24 Oct 2013 01:29:39 +0400 Subject: [PATCH 20/32] ocl: show diff --- modules/ocl/test/utility.cpp | 17 +++++++++++++++++ modules/ocl/test/utility.hpp | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/ocl/test/utility.cpp b/modules/ocl/test/utility.cpp index dea14a910..43dbac68c 100644 --- a/modules/ocl/test/utility.cpp +++ b/modules/ocl/test/utility.cpp @@ -231,4 +231,21 @@ double checkRectSimilarity(Size sz, std::vector& ob1, std::vector& o return final_test_result; } +void showDiff(const Mat& gold, const Mat& actual, double eps) +{ + Mat diff; + absdiff(gold, actual, diff); + threshold(diff, diff, eps, 255.0, cv::THRESH_BINARY); + + namedWindow("gold", WINDOW_NORMAL); + namedWindow("actual", WINDOW_NORMAL); + namedWindow("diff", WINDOW_NORMAL); + + imshow("gold", gold); + imshow("actual", actual); + imshow("diff", diff); + + waitKey(); +} + } // namespace cvtest diff --git a/modules/ocl/test/utility.hpp b/modules/ocl/test/utility.hpp index 2ec7001ac..5ad97b08a 100644 --- a/modules/ocl/test/utility.hpp +++ b/modules/ocl/test/utility.hpp @@ -52,7 +52,7 @@ extern int LOOP_TIMES; namespace cvtest { -//void showDiff(cv::InputArray gold, cv::InputArray actual, double eps); +void showDiff(const Mat& gold, const Mat& actual, double eps); cv::ocl::oclMat createMat_ocl(cv::RNG& rng, Size size, int type, bool useRoi); cv::ocl::oclMat loadMat_ocl(cv::RNG& rng, const Mat& m, bool useRoi); From eddaaa9643edb18f1dcc53f015b48dab2bf0d24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Wej=C3=A9us?= Date: Thu, 24 Oct 2013 10:36:01 +0200 Subject: [PATCH 21/32] Removed incorrect release of obtained colorspace. This fixes bug #3318 (updated commit for 2.4 branch) --- .../ios/image_manipulation/image_manipulation.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/tutorials/ios/image_manipulation/image_manipulation.rst b/doc/tutorials/ios/image_manipulation/image_manipulation.rst index c4cde1990..3eb8913be 100644 --- a/doc/tutorials/ios/image_manipulation/image_manipulation.rst +++ b/doc/tutorials/ios/image_manipulation/image_manipulation.rst @@ -12,7 +12,8 @@ In this tutorial we will learn how to do basic image processing using OpenCV in *Introduction* ============== -In *OpenCV* all the image processing operations are done on *Mat*. iOS uses UIImage object to display image. One of the thing is to convert UIImage object to Mat object. Below is the code to convert UIImage to Mat. +In *OpenCV* all the image processing operations are usually carried out on the *Mat* structure. In iOS however, to render an image on screen it have to be an instance of the *UIImage* class. To convert an *OpenCV Mat* to an *UIImage* we use the *Core Graphics* framework available in iOS. Below is the code needed to covert back and forth between Mat's and UIImage's. + .. code-block:: cpp @@ -22,7 +23,7 @@ In *OpenCV* all the image processing operations are done on *Mat*. iOS uses UIIm CGFloat cols = image.size.width; CGFloat rows = image.size.height; - cv::Mat cvMat(rows, cols, CV_8UC4); // 8 bits per component, 4 channels + cv::Mat cvMat(rows, cols, CV_8UC4); // 8 bits per component, 4 channels (color channels + alpha) CGContextRef contextRef = CGBitmapContextCreate(cvMat.data, // Pointer to data cols, // Width of bitmap @@ -35,7 +36,6 @@ In *OpenCV* all the image processing operations are done on *Mat*. iOS uses UIIm CGContextDrawImage(contextRef, CGRectMake(0, 0, cols, rows), image.CGImage); CGContextRelease(contextRef); - CGColorSpaceRelease(colorSpace); return cvMat; } @@ -61,12 +61,11 @@ In *OpenCV* all the image processing operations are done on *Mat*. iOS uses UIIm CGContextDrawImage(contextRef, CGRectMake(0, 0, cols, rows), image.CGImage); CGContextRelease(contextRef); - CGColorSpaceRelease(colorSpace); return cvMat; } -Once we obtain the Mat Object. We can do all our processing on Mat object, similar to cpp. For example if we want to convert image to gray, we can do it via below code. +After the processing we need to convert it back to UIImage. The code below can handle both gray-scale and color image conversions (determined by the number of channels in the *if* statement). .. code-block:: cpp From dab3000778d4667b445886e457e85d57bff522e6 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 24 Oct 2013 13:59:25 +0400 Subject: [PATCH 22/32] fixed bug in ocl::equalizeHist --- modules/ocl/src/opencl/imgproc_histogram.cl | 54 ++++++++++++--------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/modules/ocl/src/opencl/imgproc_histogram.cl b/modules/ocl/src/opencl/imgproc_histogram.cl index 6bfa095f3..6df81c7ba 100644 --- a/modules/ocl/src/opencl/imgproc_histogram.cl +++ b/modules/ocl/src/opencl/imgproc_histogram.cl @@ -130,12 +130,10 @@ __kernel __attribute__((reqd_work_group_size(HISTOGRAM256_BIN_COUNT,1,1)))void c globalHist[mad24(gx, hist_step, lid)] = bin1+bin2+bin3+bin4; } -__kernel void __attribute__((reqd_work_group_size(1,HISTOGRAM256_BIN_COUNT,1)))calc_sub_hist_border_D0( - __global const uchar* src, - int src_step, int src_offset, - __global int* globalHist, - int left_col, int cols, - int rows, int hist_step) +__kernel void __attribute__((reqd_work_group_size(1,HISTOGRAM256_BIN_COUNT,1))) +calc_sub_hist_border_D0(__global const uchar* src, int src_step, int src_offset, + __global int* globalHist, int left_col, int cols, + int rows, int hist_step) { int gidx = get_global_id(0); int gidy = get_global_id(1); @@ -162,6 +160,7 @@ __kernel void __attribute__((reqd_work_group_size(1,HISTOGRAM256_BIN_COUNT,1)))c globalHist[mad24(rowIndex, hist_step, lidy)] += subhist[lidy]; } + __kernel __attribute__((reqd_work_group_size(256,1,1)))void merge_hist(__global int* buf, __global int* hist, int src_step) @@ -188,32 +187,43 @@ __kernel __attribute__((reqd_work_group_size(256,1,1)))void merge_hist(__global hist[gx] = data[0]; } -__kernel __attribute__((reqd_work_group_size(256,1,1)))void calLUT( - __global uchar * dst, - __constant int * hist, - int total) +__kernel __attribute__((reqd_work_group_size(256,1,1))) +void calLUT(__global uchar * dst, __constant int * hist, int total) { int lid = get_local_id(0); - __local int sumhist[HISTOGRAM256_BIN_COUNT+1]; + __local int sumhist[HISTOGRAM256_BIN_COUNT]; + __local float scale; - sumhist[lid]=hist[lid]; + sumhist[lid] = hist[lid]; barrier(CLK_LOCAL_MEM_FENCE); - if(lid==0) + if (lid == 0) { - int sum = 0; - int i = 0; - while (!sumhist[i]) ++i; - sumhist[HISTOGRAM256_BIN_COUNT] = sumhist[i]; - for(sumhist[i++] = 0; i Date: Thu, 24 Oct 2013 18:33:23 +0400 Subject: [PATCH 23/32] Fixed a Wmissing-declarations warning when compiling with MinGW. --- modules/ocl/src/cl_context.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ocl/src/cl_context.cpp b/modules/ocl/src/cl_context.cpp index 258ed91e5..d78d34519 100644 --- a/modules/ocl/src/cl_context.cpp +++ b/modules/ocl/src/cl_context.cpp @@ -757,6 +757,9 @@ __Module::~__Module() #if defined(WIN32) && defined(CVAPI_EXPORTS) +extern "C" +BOOL WINAPI DllMain(HINSTANCE /*hInst*/, DWORD fdwReason, LPVOID lpReserved); + extern "C" BOOL WINAPI DllMain(HINSTANCE /*hInst*/, DWORD fdwReason, LPVOID lpReserved) { From 4b17d073c07c1b73480833bd0c8f03f17d8d9502 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 24 Oct 2013 19:04:41 +0400 Subject: [PATCH 24/32] cmake: fix linker dependencies for opencv_java Linker dependencies to all OpenCV modules are invalid. We should not include other bindings in this list (like "opencv_python"). --- cmake/OpenCVUtils.cmake | 12 ++++++++++++ modules/java/CMakeLists.txt | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index b94d17c6c..13461e82c 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -11,6 +11,18 @@ if(NOT COMMAND find_host_program) endmacro() endif() +# assert macro +# Note: it doesn't support lists in arguments +# Usage samples: +# ocv_assert(MyLib_FOUND) +# ocv_assert(DEFINED MyLib_INCLUDE_DIRS) +macro(ocv_assert) + if(NOT (${ARGN})) + string(REPLACE ";" " " __assert_msg "${ARGN}") + message(AUTHOR_WARNING "Assertion failed: ${__assert_msg}") + endif() +endmacro() + macro(ocv_check_environment_variables) foreach(_var ${ARGN}) if(NOT DEFINED ${_var} AND DEFINED ENV{${_var}}) diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt index 79dd42cd4..63e0e65e0 100644 --- a/modules/java/CMakeLists.txt +++ b/modules/java/CMakeLists.txt @@ -274,7 +274,12 @@ add_library(${the_module} SHARED ${handwrittren_h_sources} ${handwrittren_cpp_so "${JAR_FILE}" "${JAR_FILE}.dephelper") if(BUILD_FAT_JAVA_LIB) set(__deps ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_MODULES_BUILD}) - list(REMOVE_ITEM __deps ${the_module} opencv_ts) + foreach(m ${OPENCV_MODULES_BUILD}) # filterout INTERNAL (like opencv_ts) and BINDINGS (like opencv_python) modules + ocv_assert(DEFINED OPENCV_MODULE_${m}_CLASS) + if(NOT OPENCV_MODULE_${m}_CLASS STREQUAL "PUBLIC") + list(REMOVE_ITEM __deps ${m}) + endif() + endforeach() ocv_list_unique(__deps) set(__extradeps ${__deps}) ocv_list_filterout(__extradeps "^opencv_") From 9ea6001d087f1502137d400eb09cd07c3e4032b7 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 25 Oct 2013 13:32:35 +0400 Subject: [PATCH 25/32] enabled ocl::bilateralFilter ROI testing --- modules/ocl/test/test_filters.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ocl/test/test_filters.cpp b/modules/ocl/test/test_filters.cpp index 2e54570e7..0e1a6332c 100644 --- a/modules/ocl/test/test_filters.cpp +++ b/modules/ocl/test/test_filters.cpp @@ -432,7 +432,7 @@ INSTANTIATE_TEST_CASE_P(Filter, Bilateral, Combine( Values(Size(0, 0)), // not used Values((int)BORDER_CONSTANT, (int)BORDER_REPLICATE, (int)BORDER_REFLECT, (int)BORDER_WRAP, (int)BORDER_REFLECT_101), - Values(false))); // TODO does not work with ROI + Bool())); INSTANTIATE_TEST_CASE_P(Filter, AdaptiveBilateral, Combine( Values(CV_8UC1, CV_8UC3), From e1c8f5d723bfb8d81b5c546d7bdb52afe07c592a Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 25 Oct 2013 13:50:22 +0400 Subject: [PATCH 26/32] Removed a stray comma in the Android toolchain file. It was actually acting as an additional argument, breaking the error message. --- platforms/android/android.toolchain.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/android/android.toolchain.cmake b/platforms/android/android.toolchain.cmake index bee73dbea..a9d4d7c42 100644 --- a/platforms/android/android.toolchain.cmake +++ b/platforms/android/android.toolchain.cmake @@ -715,7 +715,7 @@ __INIT_VARIABLE( ANDROID_ABI OBSOLETE_ARM_TARGET OBSOLETE_ARM_TARGETS VALUES ${A # verify that target ABI is supported list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx ) if( __androidAbiIdx EQUAL -1 ) - string( REPLACE ";" "\", \"", PRINTABLE_ANDROID_SUPPORTED_ABIS "${ANDROID_SUPPORTED_ABIS}" ) + string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS "${ANDROID_SUPPORTED_ABIS}" ) message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain. Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\" " ) From 76b904b02269da81e675a91bc64614299d90ae6e Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 25 Oct 2013 13:54:55 +0400 Subject: [PATCH 27/32] Replaced our usage of LINK_PRIVATE with that of LINK_INTERFACE_LIBRARIES. The reasons for that are twofold: 1) LINK_PRIVATE is only available since CMake 2.8.7. 2) The way it was used generated a warning because of CMake policy CMP0023: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#policy:CMP0023 Using LINK_INTERFACE_LIBRARIES actually causes another warning - this time because of CMake policy CMP0022: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#policy:CMP0022 I set the policy to OLD, because NEW means subtle changes when compiling with CMake 2.8.12, and I don't want to research that this close to release. :-) I also removed the setting of CMP0003, because it's set by cmake_minimal_version anyway. --- CMakeLists.txt | 13 ++++--------- cmake/OpenCVModule.cmake | 5 +++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 704c51be8..e3326982e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,15 +11,6 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) -# -------------------------------------------------------------- -# Indicate CMake 2.7 and above that we don't want to mix relative -# and absolute paths in linker lib lists. -# Run "cmake --help-policy CMP0003" for more information. -# -------------------------------------------------------------- -if(COMMAND cmake_policy) - cmake_policy(SET CMP0003 NEW) -endif() - # Following block can broke build in case of cross-compilng # but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command # so we will try to detect crosscompiling by presense of CMAKE_TOOLCHAIN_FILE @@ -48,6 +39,10 @@ else() cmake_minimum_required(VERSION 2.6.3) endif() +if(POLICY CMP0022) + cmake_policy(SET CMP0022 OLD) +endif() + # must go before the project command set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) if(DEFINED CMAKE_BUILD_TYPE AND CMAKE_VERSION VERSION_GREATER "2.8") diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index 86ce88124..024a9d91e 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -535,9 +535,10 @@ macro(ocv_create_module) if(NOT "${ARGN}" STREQUAL "SKIP_LINK") target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS}) - target_link_libraries(${the_module} LINK_PRIVATE ${OPENCV_MODULE_${the_module}_DEPS_EXT} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN}) + target_link_libraries(${the_module} LINK_INTERFACE_LIBRARIES ${OPENCV_MODULE_${the_module}_DEPS}) + target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS_EXT} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN}) if (HAVE_CUDA) - target_link_libraries(${the_module} LINK_PRIVATE ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) + target_link_libraries(${the_module} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) endif() endif() From b33a62beb065bd62d0860828d4e6f299d092680b Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 25 Oct 2013 16:41:20 +0400 Subject: [PATCH 28/32] fixed separable filter extrapolation --- modules/ocl/src/filtering.cpp | 68 ++--- modules/ocl/src/opencl/filter_sep_col.cl | 43 +-- modules/ocl/src/opencl/filter_sep_row.cl | 358 +++++++++++------------ modules/ocl/test/test_filters.cpp | 2 +- 4 files changed, 198 insertions(+), 273 deletions(-) diff --git a/modules/ocl/src/filtering.cpp b/modules/ocl/src/filtering.cpp index 0a2562d8c..a1aec3c24 100644 --- a/modules/ocl/src/filtering.cpp +++ b/modules/ocl/src/filtering.cpp @@ -1058,74 +1058,39 @@ template <> struct index_and_sizeof template void linearRowFilter_gpu(const oclMat &src, const oclMat &dst, oclMat mat_kernel, int ksize, int anchor, int bordertype) { - Context *clCxt = src.clCxt; + CV_Assert(bordertype <= BORDER_REFLECT_101); + CV_Assert(ksize == (anchor << 1) + 1); int channels = src.oclchannels(); - size_t localThreads[3] = {16, 16, 1}; - string kernelName = "row_filter"; + size_t localThreads[3] = { 16, 16, 1 }; + size_t globalThreads[3] = { dst.cols, dst.rows, 1 }; - char btype[30]; - - switch (bordertype) - { - case 0: - sprintf(btype, "BORDER_CONSTANT"); - break; - case 1: - sprintf(btype, "BORDER_REPLICATE"); - break; - case 2: - sprintf(btype, "BORDER_REFLECT"); - break; - case 3: - sprintf(btype, "BORDER_WRAP"); - break; - case 4: - sprintf(btype, "BORDER_REFLECT_101"); - break; - } - - char compile_option[128]; - sprintf(compile_option, "-D RADIUSX=%d -D LSIZE0=%d -D LSIZE1=%d -D CN=%d -D %s", anchor, (int)localThreads[0], (int)localThreads[1], channels, btype); - - size_t globalThreads[3]; - globalThreads[1] = (dst.rows + localThreads[1] - 1) / localThreads[1] * localThreads[1]; - globalThreads[2] = (1 + localThreads[2] - 1) / localThreads[2] * localThreads[2]; + const char * const borderMap[] = { "BORDER_CONSTANT", "BORDER_REPLICATE", "BORDER_REFLECT", "BORDER_WRAP", "BORDER_REFLECT_101" }; + std::string buildOptions = format("-D RADIUSX=%d -D LSIZE0=%d -D LSIZE1=%d -D CN=%d -D %s", + anchor, (int)localThreads[0], (int)localThreads[1], channels, borderMap[bordertype]); if (src.depth() == CV_8U) { switch (channels) { case 1: - case 3: - globalThreads[0] = ((dst.cols + 4) / 4 + localThreads[0] - 1) / localThreads[0] * localThreads[0]; + globalThreads[0] = (dst.cols + 3) >> 2; break; case 2: - globalThreads[0] = ((dst.cols + 1) / 2 + localThreads[0] - 1) / localThreads[0] * localThreads[0]; + globalThreads[0] = (dst.cols + 1) >> 1; break; case 4: - globalThreads[0] = (dst.cols + localThreads[0] - 1) / localThreads[0] * localThreads[0]; + globalThreads[0] = dst.cols; break; } } - else - { - globalThreads[0] = (dst.cols + localThreads[0] - 1) / localThreads[0] * localThreads[0]; - } - //sanity checks - CV_Assert(clCxt == dst.clCxt); - CV_Assert(src.cols == dst.cols); - CV_Assert(src.oclchannels() == dst.oclchannels()); - CV_Assert(ksize == (anchor << 1) + 1); - int src_pix_per_row, dst_pix_per_row; - int src_offset_x, src_offset_y;//, dst_offset_in_pixel; - src_pix_per_row = src.step / src.elemSize(); - src_offset_x = (src.offset % src.step) / src.elemSize(); - src_offset_y = src.offset / src.step; - dst_pix_per_row = dst.step / dst.elemSize(); - //dst_offset_in_pixel = dst.offset / dst.elemSize(); + int src_pix_per_row = src.step / src.elemSize(); + int src_offset_x = (src.offset % src.step) / src.elemSize(); + int src_offset_y = src.offset / src.step; + int dst_pix_per_row = dst.step / dst.elemSize(); int ridusy = (dst.rows - src.rows) >> 1; + vector > args; args.push_back(make_pair(sizeof(cl_mem), &src.data)); args.push_back(make_pair(sizeof(cl_mem), &dst.data)); @@ -1140,7 +1105,8 @@ void linearRowFilter_gpu(const oclMat &src, const oclMat &dst, oclMat mat_kernel args.push_back(make_pair(sizeof(cl_int), (void *)&ridusy)); args.push_back(make_pair(sizeof(cl_mem), (void *)&mat_kernel.data)); - openCLExecuteKernel(clCxt, &filter_sep_row, kernelName, globalThreads, localThreads, args, channels, src.depth(), compile_option); + openCLExecuteKernel(src.clCxt, &filter_sep_row, "row_filter", globalThreads, localThreads, + args, channels, src.depth(), buildOptions.c_str()); } Ptr cv::ocl::getLinearRowFilter_GPU(int srcType, int /*bufType*/, const Mat &rowKernel, int anchor, int bordertype) diff --git a/modules/ocl/src/opencl/filter_sep_col.cl b/modules/ocl/src/opencl/filter_sep_col.cl index 60ce51360..8dd77d5a9 100644 --- a/modules/ocl/src/opencl/filter_sep_col.cl +++ b/modules/ocl/src/opencl/filter_sep_col.cl @@ -47,36 +47,6 @@ #define READ_TIMES_ROW ((2*(RADIUS+LSIZE0)-1)/LSIZE0) #endif -#ifdef BORDER_CONSTANT -//BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii -#define ELEM(i,l_edge,r_edge,elem1,elem2) (i)<(l_edge) | (i) >= (r_edge) ? (elem1) : (elem2) -#endif - -#ifdef BORDER_REPLICATE -//BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh -#define ADDR_L(i,l_edge,r_edge) (i) < (l_edge) ? (l_edge) : (i) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? (r_edge)-1 : (addr) -#endif - -#ifdef BORDER_REFLECT -//BORDER_REFLECT: fedcba|abcdefgh|hgfedcb -#define ADDR_L(i,l_edge,r_edge) (i) < (l_edge) ? -(i)-1 : (i) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? -(i)-1+((r_edge)<<1) : (addr) -#endif - -#ifdef BORDER_REFLECT_101 -//BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba -#define ADDR_L(i,l_edge,r_edge) (i) < (l_edge) ? -(i) : (i) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? -(i)-2+((r_edge)<<1) : (addr) -#endif - -#ifdef BORDER_WRAP -//BORDER_WRAP: cdefgh|abcdefgh|abcdefg -#define ADDR_L(i,l_edge,r_edge) (i) < (l_edge) ? (i)+(r_edge) : (i) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? (i)-(r_edge) : (addr) -#endif - - /********************************************************************************** These kernels are written for separable filters such as Sobel, Scharr, GaussianBlur. Now(6/29/2011) the kernels only support 8U data type and the anchor of the convovle @@ -107,15 +77,16 @@ __kernel __attribute__((reqd_work_group_size(LSIZE0,LSIZE1,1))) void col_filter { int x = get_global_id(0); int y = get_global_id(1); + int l_x = get_local_id(0); int l_y = get_local_id(1); - int start_addr = mad24(y,src_step_in_pixel,x); - int end_addr = mad24(src_whole_rows - 1,src_step_in_pixel,src_whole_cols); - int i; - GENTYPE_SRC sum; - GENTYPE_SRC temp[READ_TIMES_COL]; - __local GENTYPE_SRC LDS_DAT[LSIZE1*READ_TIMES_COL][LSIZE0+1]; + int start_addr = mad24(y, src_step_in_pixel, x); + int end_addr = mad24(src_whole_rows - 1, src_step_in_pixel, src_whole_cols); + + int i; + GENTYPE_SRC sum, temp[READ_TIMES_COL]; + __local GENTYPE_SRC LDS_DAT[LSIZE1 * READ_TIMES_COL][LSIZE0 + 1]; //read pixels from src for(i = 0;i= (r_edge) ? (elem1) : (elem2) -#endif - -#ifdef BORDER_REPLICATE -//BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? (l_edge) : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? (r_edge)-1 : (addr) -#endif - +#elif defined BORDER_REPLICATE +#define EXTRAPOLATE(x, maxV) \ + { \ + x = max(min(x, maxV - 1), 0); \ + } +#elif defined BORDER_WRAP +#define EXTRAPOLATE(x, maxV) \ + { \ + if (x < 0) \ + x -= ((x - maxV + 1) / maxV) * maxV; \ + if (x >= maxV) \ + x %= maxV; \ + } +#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101) +#define EXTRAPOLATE_(x, maxV, delta) \ + { \ + if (maxV == 1) \ + x = 0; \ + else \ + do \ + { \ + if ( x < 0 ) \ + x = -x - 1 + delta; \ + else \ + x = maxV - 1 - (x - maxV) - delta; \ + } \ + while (x >= maxV || x < 0); \ + } #ifdef BORDER_REFLECT -//BORDER_REFLECT: fedcba|abcdefgh|hgfedcb -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? -(i)-1 : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? -(i)-1+((r_edge)<<1) : (addr) +#define EXTRAPOLATE(x, maxV) EXTRAPOLATE_(x, maxV, 0) +#else +#define EXTRAPOLATE(x, maxV) EXTRAPOLATE_(x, maxV, 1) #endif - -#ifdef BORDER_REFLECT_101 -//BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? -(i) : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? -(i)-2+((r_edge)<<1) : (addr) -#endif - -#ifdef BORDER_WRAP -//BORDER_WRAP: cdefgh|abcdefgh|abcdefg -#define ADDR_L(i,l_edge,r_edge,addr) (i) < (l_edge) ? (i)+(r_edge) : (addr) -#define ADDR_R(i,r_edge,addr) (i) >= (r_edge) ? (i)-(r_edge) : (addr) +#else +#error No extrapolation method #endif /********************************************************************************** @@ -96,73 +105,71 @@ The info above maybe obsolete. ***********************************************************************************/ __kernel __attribute__((reqd_work_group_size(LSIZE0,LSIZE1,1))) void row_filter_C1_D0 -(__global const uchar * restrict src, - __global float * dst, - const int dst_cols, - const int dst_rows, - const int src_whole_cols, - const int src_whole_rows, - const int src_step_in_pixel, - const int src_offset_x, - const int src_offset_y, - const int dst_step_in_pixel, - const int radiusy, - __constant float * mat_kernel __attribute__((max_constant_size(4*(2*RADIUSX+1))))) + (__global uchar * restrict src, + __global float * dst, + int dst_cols, int dst_rows, + int src_whole_cols, int src_whole_rows, + int src_step_in_pixel, + int src_offset_x, int src_offset_y, + int dst_step_in_pixel, int radiusy, + __constant float * mat_kernel __attribute__((max_constant_size(4*(2*RADIUSX+1))))) { int x = get_global_id(0)<<2; int y = get_global_id(1); int l_x = get_local_id(0); int l_y = get_local_id(1); - int start_x = x+src_offset_x-RADIUSX & 0xfffffffc; - int offset = src_offset_x-RADIUSX & 3; - int start_y = y+src_offset_y-radiusy; - int start_addr = mad24(start_y,src_step_in_pixel,start_x); + + int start_x = x+src_offset_x - RADIUSX & 0xfffffffc; + int offset = src_offset_x - RADIUSX & 3; + int start_y = y + src_offset_y - radiusy; + int start_addr = mad24(start_y, src_step_in_pixel, start_x); int i; float4 sum; uchar4 temp[READ_TIMES_ROW]; __local uchar4 LDS_DAT[LSIZE1][READ_TIMES_ROW*LSIZE0+1]; #ifdef BORDER_CONSTANT - int end_addr = mad24(src_whole_rows - 1,src_step_in_pixel,src_whole_cols); - //read pixels from src - for(i = 0; i 0)) ? current_addr : 0; temp[i] = *(__global uchar4*)&src[current_addr]; } - //judge if read out of boundary - for(i = 0; isrc_whole_cols)| (start_y<0) | (start_y >= src_whole_rows); int4 index[READ_TIMES_ROW]; int4 addr; int s_y; - if(not_all_in_range) + + if (not_all_in_range) { - //judge if read out of boundary - for(i = 0; i 0)) ? current_addr : 0; temp[i] = src[current_addr]; } + //judge if read out of boundary - for(i = 0; i 0)) ? current_addr : 0; temp[i] = src[current_addr]; } - //judge if read out of boundary - for(i = 0; i 0)) ? current_addr : 0; temp[i] = src[current_addr]; } - //judge if read out of boundary - for(i = 0; i Date: Thu, 24 Oct 2013 20:01:29 +0400 Subject: [PATCH 29/32] cmake: fix android installation for different NDK ABIs --- cmake/OpenCVGenConfig.cmake | 17 +++++++++++------ cmake/templates/OpenCVConfig.cmake.in | 6 +++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake index 881cd371a..b7f026db2 100644 --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake @@ -74,7 +74,12 @@ if(ANDROID AND NOT BUILD_SHARED_LIBS AND HAVE_TBB) list(APPEND OpenCV2_INCLUDE_DIRS_CONFIGCMAKE ${TBB_INCLUDE_DIRS}) endif() -export(TARGETS ${OpenCVModules_TARGETS} FILE "${CMAKE_BINARY_DIR}/OpenCVModules.cmake") +set(modules_file_suffix "") +if(ANDROID) + set(modules_file_suffix "-${ANDROID_NDK_ABI_NAME}") +endif() + +export(TARGETS ${OpenCVModules_TARGETS} FILE "${CMAKE_BINARY_DIR}/OpenCVModules${modules_file_suffix}.cmake") configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/OpenCVConfig.cmake" IMMEDIATE @ONLY) #support for version checking when finding opencv. find_package(OpenCV 2.3.1 EXACT) should now work. @@ -94,7 +99,7 @@ endif() configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" IMMEDIATE @ONLY) configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake" IMMEDIATE @ONLY) -if(UNIX) +if(UNIX) # ANDROID configuration is created here also #http://www.vtk.org/Wiki/CMake/Tutorials/Packaging reference # For a command "find_package( [major[.minor]] [EXACT] [REQUIRED|QUIET])" # cmake will look in the following dir on unix: @@ -104,11 +109,11 @@ if(UNIX) if(INSTALL_TO_MANGLED_PATHS) install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/) install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/) - install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/) + install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/ FILE OpenCVModules${modules_file_suffix}.cmake) else() install(FILES "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/) install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/) - install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/) + install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/ FILE OpenCVModules${modules_file_suffix}.cmake) endif() endif() @@ -128,10 +133,10 @@ if(WIN32) configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" IMMEDIATE @ONLY) if(BUILD_SHARED_LIBS) install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/lib") - install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/lib") + install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/lib" FILE OpenCVModules${modules_file_suffix}.cmake) else() install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/staticlib") - install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/staticlib") + install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/staticlib" FILE OpenCVModules${modules_file_suffix}.cmake) endif() install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}") install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/") diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in index 88a451bf2..2f2841356 100644 --- a/cmake/templates/OpenCVConfig.cmake.in +++ b/cmake/templates/OpenCVConfig.cmake.in @@ -36,7 +36,11 @@ # # =================================================================================== -include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules.cmake) +if(NOT ANDROID) + include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules.cmake) +else() + include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules-${ANDROID_NDK_ABI_NAME}.cmake) +endif() # TODO All things below should be reviewed. What is about of moving this code into related modules (special vars/hooks/files) From e1596d69cccd552cae5a1df719b52c958c81f655 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 25 Oct 2013 17:28:31 +0400 Subject: [PATCH 30/32] fixed extrapolation in ocl::adaptiveBilateralFilter --- .../opencl/filtering_adaptive_bilateral.cl | 112 ++++++++---------- 1 file changed, 49 insertions(+), 63 deletions(-) diff --git a/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl b/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl index a8e0fd17e..b079b8c48 100644 --- a/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl +++ b/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl @@ -45,38 +45,43 @@ // //M*/ - -#ifdef BORDER_REPLICATE -//BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh -#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (l_edge) : (i)) -#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (r_edge)-1 : (addr)) -#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? (t_edge) :(i)) -#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? (b_edge)-1 :(addr)) -#endif - +#ifdef BORDER_CONSTANT +#define ELEM(i,l_edge,r_edge,elem1,elem2) (i)<(l_edge) | (i) >= (r_edge) ? (elem1) : (elem2) +#elif defined BORDER_REPLICATE +#define EXTRAPOLATE(x, maxV) \ + { \ + x = max(min(x, maxV - 1), 0); \ + } +#elif defined BORDER_WRAP +#define EXTRAPOLATE(x, maxV) \ + { \ + if (x < 0) \ + x -= ((x - maxV + 1) / maxV) * maxV; \ + if (x >= maxV) \ + x %= maxV; \ + } +#elif defined(BORDER_REFLECT) || defined(BORDER_REFLECT_101) +#define EXTRAPOLATE_(x, maxV, delta) \ + { \ + if (maxV == 1) \ + x = 0; \ + else \ + do \ + { \ + if ( x < 0 ) \ + x = -x - 1 + delta; \ + else \ + x = maxV - 1 - (x - maxV) - delta; \ + } \ + while (x >= maxV || x < 0); \ + } #ifdef BORDER_REFLECT -//BORDER_REFLECT: fedcba|abcdefgh|hgfedcb -#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i)-1 : (i)) -#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-1+((r_edge)<<1) : (addr)) -#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? -(i)-1 : (i)) -#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? -(i)-1+((b_edge)<<1) : (addr)) +#define EXTRAPOLATE(x, maxV) EXTRAPOLATE_(x, maxV, 0) +#else +#define EXTRAPOLATE(x, maxV) EXTRAPOLATE_(x, maxV, 1) #endif - -#ifdef BORDER_REFLECT_101 -//BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba -#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? -(i) : (i)) -#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? -(i)-2+((r_edge)<<1) : (addr)) -#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? -(i) : (i)) -#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? -(i)-2+((b_edge)<<1) : (addr)) -#endif - -//blur function does not support BORDER_WRAP -#ifdef BORDER_WRAP -//BORDER_WRAP: cdefgh|abcdefgh|abcdefg -#define ADDR_L(i, l_edge, r_edge) ((i) < (l_edge) ? (i)+(r_edge) : (i)) -#define ADDR_R(i, r_edge, addr) ((i) >= (r_edge) ? (i)-(r_edge) : (addr)) -#define ADDR_H(i, t_edge, b_edge) ((i) < (t_edge) ? (i)+(b_edge) : (i)) -#define ADDR_B(i, b_edge, addr) ((i) >= (b_edge) ? (i)-(b_edge) : (addr)) +#else +#error No extrapolation method #endif __kernel void @@ -117,9 +122,7 @@ edgeEnhancingFilter_C4_D0( float4 tmp_sum[1+EXTRA]; for(int tmpint = 0; tmpint < 1+EXTRA; tmpint++) - { tmp_sum[tmpint] = (float4)(0,0,0,0); - } #ifdef BORDER_CONSTANT bool con; @@ -127,25 +130,18 @@ edgeEnhancingFilter_C4_D0( for(int j = 0; j < ksY+EXTRA; j++) { con = (startX+col >= 0 && startX+col < src_whole_cols && startY+j >= 0 && startY+j < src_whole_rows); - int cur_col = clamp(startX + col, 0, src_whole_cols); - if(con) - { + if (con) ss = src[(startY+j)*(src_step>>2) + cur_col]; - } data[j][col] = con ? ss : (uchar4)0; } #else for(int j= 0; j < ksY+EXTRA; j++) { - int selected_row; - int selected_col; - selected_row = ADDR_H(startY+j, 0, src_whole_rows); - selected_row = ADDR_B(startY+j, src_whole_rows, selected_row); - - selected_col = ADDR_L(startX+col, 0, src_whole_cols); - selected_col = ADDR_R(startX+col, src_whole_cols, selected_col); + int selected_row = startY+j, selected_col = startX+col; + EXTRAPOLATE(selected_row, src_whole_rows) + EXTRAPOLATE(selected_col, src_whole_cols) data[j][col] = src[selected_row * (src_step>>2) + selected_col]; } @@ -172,7 +168,6 @@ edgeEnhancingFilter_C4_D0( if(col < (THREADS-(ksX-1))) { int4 currVal; - int howManyAll = (2*anX+1)*(ksY); //find variance of all data @@ -187,15 +182,14 @@ edgeEnhancingFilter_C4_D0( sumVal =0; sumValSqr=0; for(int j = startLMj; j < endLMj; j++) - { for(int i=-anX; i<=anX; i++) { - currVal = convert_int4(data[j][col+anX+i]) ; + currVal = convert_int4(data[j][col+anX+i]); sumVal += currVal; sumValSqr += mul24(currVal, currVal); } - } + var[extraCnt] = convert_float4( ( (sumValSqr * howManyAll)- mul24(sumVal , sumVal) ) ) / ( (float)(howManyAll*howManyAll) ) ; #else var[extraCnt] = (float4)(900.0, 900.0, 900.0, 0.0); @@ -228,17 +222,15 @@ edgeEnhancingFilter_C4_D0( weight = 1.0f; #endif #else - currVal = convert_int4(data[j][col+anX+i]) ; + currVal = convert_int4(data[j][col+anX+i]); currWRTCenter = currVal-currValCenter; #if VAR_PER_CHANNEL - weight = var[extraCnt] / (var[extraCnt] + convert_float4(currWRTCenter * currWRTCenter)) * (float4)(lut[lut_j*lut_step+anX+i]); - //weight.x = var[extraCnt].x / ( var[extraCnt].x + (float) mul24(currWRTCenter.x , currWRTCenter.x) ) ; - //weight.y = var[extraCnt].y / ( var[extraCnt].y + (float) mul24(currWRTCenter.y , currWRTCenter.y) ) ; - //weight.z = var[extraCnt].z / ( var[extraCnt].z + (float) mul24(currWRTCenter.z , currWRTCenter.z) ) ; - //weight.w = 0; + weight = var[extraCnt] / (var[extraCnt] + convert_float4(currWRTCenter * currWRTCenter)) * + (float4)(lut[lut_j*lut_step+anX+i]); #else - weight = 1.0f/(1.0f+( mul24(currWRTCenter.x, currWRTCenter.x) + mul24(currWRTCenter.y, currWRTCenter.y) + mul24(currWRTCenter.z, currWRTCenter.z))/(var.x+var.y+var.z)); + weight = 1.0f/(1.0f+( mul24(currWRTCenter.x, currWRTCenter.x) + mul24(currWRTCenter.y, currWRTCenter.y) + + mul24(currWRTCenter.z, currWRTCenter.z))/(var.x+var.y+var.z)); #endif #endif tmp_sum[extraCnt] += convert_float4(data[j][col+anX+i]) * weight; @@ -249,9 +241,7 @@ edgeEnhancingFilter_C4_D0( tmp_sum[extraCnt] /= totalWeight; if(posX >= 0 && posX < dst_cols && (posY+extraCnt) >= 0 && (posY+extraCnt) < dst_rows) - { dst[(dst_startY+extraCnt) * (dst_step>>2)+ dst_startX + col] = convert_uchar4(tmp_sum[extraCnt]); - } #if VAR_PER_CHANNEL totalWeight = (float4)(0,0,0,0); @@ -323,13 +313,9 @@ edgeEnhancingFilter_C1_D0( #else for(int j= 0; j < ksY+EXTRA; j++) { - int selected_row; - int selected_col; - selected_row = ADDR_H(startY+j, 0, src_whole_rows); - selected_row = ADDR_B(startY+j, src_whole_rows, selected_row); - - selected_col = ADDR_L(startX+col, 0, src_whole_cols); - selected_col = ADDR_R(startX+col, src_whole_cols, selected_col); + int selected_row = startY+j, selected_col = startX+col; + EXTRAPOLATE(selected_row, src_whole_rows) + EXTRAPOLATE(selected_col, src_whole_cols) data[j][col] = src[selected_row * (src_step) + selected_col]; } From 2b6fca68bf83803c4eb90a1d32a1fa7272e1f43f Mon Sep 17 00:00:00 2001 From: Andrey Pavlenko Date: Fri, 25 Oct 2013 18:00:46 +0400 Subject: [PATCH 31/32] fixing typo --- modules/nonfree/perf/perf_surf.ocl.cpp | 2 +- modules/nonfree/src/opencl/surf.cl | 2 +- modules/nonfree/src/surf.ocl.cpp | 2 +- modules/nonfree/test/test_surf.ocl.cpp | 2 +- modules/ocl/include/opencv2/ocl/matrix_operations.hpp | 2 +- modules/ocl/include/opencv2/ocl/ocl.hpp | 2 +- modules/ocl/perf/main.cpp | 2 +- modules/ocl/perf/perf_arithm.cpp | 2 +- modules/ocl/perf/perf_bgfg.cpp | 2 +- modules/ocl/perf/perf_blend.cpp | 2 +- modules/ocl/perf/perf_brute_force_matcher.cpp | 2 +- modules/ocl/perf/perf_calib3d.cpp | 2 +- modules/ocl/perf/perf_canny.cpp | 2 +- modules/ocl/perf/perf_color.cpp | 2 +- modules/ocl/perf/perf_fft.cpp | 2 +- modules/ocl/perf/perf_filters.cpp | 2 +- modules/ocl/perf/perf_gemm.cpp | 2 +- modules/ocl/perf/perf_gftt.cpp | 2 +- modules/ocl/perf/perf_haar.cpp | 2 +- modules/ocl/perf/perf_hog.cpp | 2 +- modules/ocl/perf/perf_imgproc.cpp | 2 +- modules/ocl/perf/perf_kalman.cpp | 2 +- modules/ocl/perf/perf_match_template.cpp | 2 +- modules/ocl/perf/perf_matrix_operation.cpp | 2 +- modules/ocl/perf/perf_ml.cpp | 2 +- modules/ocl/perf/perf_moments.cpp | 2 +- modules/ocl/perf/perf_norm.cpp | 2 +- modules/ocl/perf/perf_opticalflow.cpp | 2 +- modules/ocl/perf/perf_precomp.hpp | 2 +- modules/ocl/perf/perf_pyramid.cpp | 2 +- modules/ocl/perf/perf_split_merge.cpp | 2 +- modules/ocl/src/arithm.cpp | 2 +- modules/ocl/src/bgfg_mog.cpp | 2 +- modules/ocl/src/blend.cpp | 2 +- modules/ocl/src/brute_force_matcher.cpp | 2 +- modules/ocl/src/build_warps.cpp | 2 +- modules/ocl/src/canny.cpp | 2 +- modules/ocl/src/cl_context.cpp | 2 +- modules/ocl/src/cl_operations.cpp | 2 +- modules/ocl/src/cl_programcache.cpp | 2 +- modules/ocl/src/cl_programcache.hpp | 2 +- modules/ocl/src/color.cpp | 2 +- modules/ocl/src/columnsum.cpp | 2 +- modules/ocl/src/error.cpp | 2 +- modules/ocl/src/fft.cpp | 2 +- modules/ocl/src/filtering.cpp | 2 +- modules/ocl/src/gemm.cpp | 2 +- modules/ocl/src/gftt.cpp | 2 +- modules/ocl/src/haar.cpp | 2 +- modules/ocl/src/hog.cpp | 2 +- modules/ocl/src/imgproc.cpp | 2 +- modules/ocl/src/interpolate_frames.cpp | 2 +- modules/ocl/src/kalman.cpp | 2 +- modules/ocl/src/kmeans.cpp | 2 +- modules/ocl/src/knearest.cpp | 2 +- modules/ocl/src/match_template.cpp | 2 +- modules/ocl/src/matrix_operations.cpp | 2 +- modules/ocl/src/mcwutil.cpp | 2 +- modules/ocl/src/moments.cpp | 2 +- modules/ocl/src/mssegmentation.cpp | 2 +- modules/ocl/src/opencl/arithm_LUT.cl | 2 +- modules/ocl/src/opencl/arithm_absdiff_nonsaturate.cl | 2 +- modules/ocl/src/opencl/arithm_add.cl | 2 +- modules/ocl/src/opencl/arithm_addWeighted.cl | 2 +- modules/ocl/src/opencl/arithm_add_mask.cl | 2 +- modules/ocl/src/opencl/arithm_add_scalar.cl | 2 +- modules/ocl/src/opencl/arithm_add_scalar_mask.cl | 2 +- modules/ocl/src/opencl/arithm_bitwise_binary.cl | 2 +- modules/ocl/src/opencl/arithm_bitwise_binary_mask.cl | 2 +- modules/ocl/src/opencl/arithm_bitwise_binary_scalar.cl | 2 +- modules/ocl/src/opencl/arithm_bitwise_not.cl | 2 +- modules/ocl/src/opencl/arithm_cartToPolar.cl | 2 +- modules/ocl/src/opencl/arithm_compare.cl | 2 +- modules/ocl/src/opencl/arithm_exp.cl | 2 +- modules/ocl/src/opencl/arithm_flip.cl | 2 +- modules/ocl/src/opencl/arithm_flip_rc.cl | 2 +- modules/ocl/src/opencl/arithm_log.cl | 2 +- modules/ocl/src/opencl/arithm_nonzero.cl | 2 +- modules/ocl/src/opencl/arithm_phase.cl | 2 +- modules/ocl/src/opencl/arithm_pow.cl | 2 +- modules/ocl/src/opencl/arithm_setidentity.cl | 2 +- modules/ocl/src/opencl/arithm_sum.cl | 2 +- modules/ocl/src/opencl/arithm_transpose.cl | 2 +- modules/ocl/src/opencl/bgfg_mog.cl | 2 +- modules/ocl/src/opencl/brute_force_match.cl | 2 +- modules/ocl/src/opencl/build_warps.cl | 2 +- modules/ocl/src/opencl/convertC3C4.cl | 2 +- modules/ocl/src/opencl/cvt_color.cl | 2 +- modules/ocl/src/opencl/filter_sep_row.cl | 2 +- modules/ocl/src/opencl/filtering_adaptive_bilateral.cl | 2 +- modules/ocl/src/opencl/filtering_boxFilter.cl | 2 +- modules/ocl/src/opencl/filtering_laplacian.cl | 2 +- modules/ocl/src/opencl/filtering_morph.cl | 2 +- modules/ocl/src/opencl/haarobjectdetect.cl | 2 +- modules/ocl/src/opencl/haarobjectdetect_scaled2.cl | 2 +- modules/ocl/src/opencl/imgproc_canny.cl | 2 +- modules/ocl/src/opencl/imgproc_clahe.cl | 2 +- modules/ocl/src/opencl/imgproc_columnsum.cl | 2 +- modules/ocl/src/opencl/imgproc_convolve.cl | 2 +- modules/ocl/src/opencl/imgproc_copymakeboder.cl | 2 +- modules/ocl/src/opencl/imgproc_gftt.cl | 2 +- modules/ocl/src/opencl/imgproc_threshold.cl | 2 +- modules/ocl/src/opencl/interpolate_frames.cl | 2 +- modules/ocl/src/opencl/kernel_radix_sort_by_key.cl | 2 +- modules/ocl/src/opencl/kernel_sort_by_key.cl | 2 +- modules/ocl/src/opencl/kernel_stablesort_by_key.cl | 2 +- modules/ocl/src/opencl/knearest.cl | 2 +- modules/ocl/src/opencl/match_template.cl | 2 +- modules/ocl/src/opencl/merge_mat.cl | 2 +- modules/ocl/src/opencl/moments.cl | 2 +- modules/ocl/src/opencl/operator_convertTo.cl | 2 +- modules/ocl/src/opencl/optical_flow_farneback.cl | 2 +- modules/ocl/src/opencl/pyr_down.cl | 2 +- modules/ocl/src/opencl/pyr_up.cl | 2 +- modules/ocl/src/opencl/pyrlk.cl | 2 +- modules/ocl/src/opencl/split_mat.cl | 2 +- modules/ocl/src/opencl/stereobm.cl | 2 +- modules/ocl/src/opencl/stereocsbp.cl | 2 +- modules/ocl/src/opencl/svm.cl | 2 +- modules/ocl/src/opencl/tvl1flow.cl | 2 +- modules/ocl/src/optical_flow_farneback.cpp | 2 +- modules/ocl/src/precomp.hpp | 2 +- modules/ocl/src/pyrdown.cpp | 2 +- modules/ocl/src/pyrlk.cpp | 2 +- modules/ocl/src/pyrup.cpp | 2 +- modules/ocl/src/sort_by_key.cpp | 2 +- modules/ocl/src/split_merge.cpp | 2 +- modules/ocl/src/stereo_csbp.cpp | 2 +- modules/ocl/src/stereobm.cpp | 2 +- modules/ocl/src/stereobp.cpp | 2 +- modules/ocl/src/svm.cpp | 2 +- modules/ocl/src/tvl1flow.cpp | 2 +- modules/ocl/test/test_api.cpp | 2 +- modules/ocl/test/test_arithm.cpp | 2 +- modules/ocl/test/test_bgfg.cpp | 2 +- modules/ocl/test/test_blend.cpp | 2 +- modules/ocl/test/test_brute_force_matcher.cpp | 2 +- modules/ocl/test/test_calib3d.cpp | 2 +- modules/ocl/test/test_canny.cpp | 2 +- modules/ocl/test/test_color.cpp | 2 +- modules/ocl/test/test_fft.cpp | 2 +- modules/ocl/test/test_filters.cpp | 2 +- modules/ocl/test/test_gemm.cpp | 2 +- modules/ocl/test/test_imgproc.cpp | 2 +- modules/ocl/test/test_kalman.cpp | 2 +- modules/ocl/test/test_kmeans.cpp | 2 +- modules/ocl/test/test_match_template.cpp | 2 +- modules/ocl/test/test_matrix_operation.cpp | 2 +- modules/ocl/test/test_mean_shift.cpp | 2 +- modules/ocl/test/test_ml.cpp | 2 +- modules/ocl/test/test_optflow.cpp | 2 +- modules/ocl/test/test_pyramids.cpp | 2 +- modules/ocl/test/test_sort.cpp | 2 +- modules/ocl/test/test_split_merge.cpp | 2 +- modules/ocl/test/test_warp.cpp | 2 +- modules/superres/src/opencl/superres_btvl1.cl | 2 +- 156 files changed, 156 insertions(+), 156 deletions(-) diff --git a/modules/nonfree/perf/perf_surf.ocl.cpp b/modules/nonfree/perf/perf_surf.ocl.cpp index fdd1931bd..cc48aa28c 100644 --- a/modules/nonfree/perf/perf_surf.ocl.cpp +++ b/modules/nonfree/perf/perf_surf.ocl.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/nonfree/src/opencl/surf.cl b/modules/nonfree/src/opencl/surf.cl index aace143d5..02f77c224 100644 --- a/modules/nonfree/src/opencl/surf.cl +++ b/modules/nonfree/src/opencl/surf.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/nonfree/src/surf.ocl.cpp b/modules/nonfree/src/surf.ocl.cpp index b1dc166ac..c79c4b2e6 100644 --- a/modules/nonfree/src/surf.ocl.cpp +++ b/modules/nonfree/src/surf.ocl.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/nonfree/test/test_surf.ocl.cpp b/modules/nonfree/test/test_surf.ocl.cpp index d6a877bc8..c52b6e366 100644 --- a/modules/nonfree/test/test_surf.ocl.cpp +++ b/modules/nonfree/test/test_surf.ocl.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/include/opencv2/ocl/matrix_operations.hpp b/modules/ocl/include/opencv2/ocl/matrix_operations.hpp index 47932075c..3dca0434f 100644 --- a/modules/ocl/include/opencv2/ocl/matrix_operations.hpp +++ b/modules/ocl/include/opencv2/ocl/matrix_operations.hpp @@ -23,7 +23,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/include/opencv2/ocl/ocl.hpp b/modules/ocl/include/opencv2/ocl/ocl.hpp index bf911f4be..8c770ee38 100644 --- a/modules/ocl/include/opencv2/ocl/ocl.hpp +++ b/modules/ocl/include/opencv2/ocl/ocl.hpp @@ -23,7 +23,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/main.cpp b/modules/ocl/perf/main.cpp index 78ebc1a26..836f8ee9b 100644 --- a/modules/ocl/perf/main.cpp +++ b/modules/ocl/perf/main.cpp @@ -22,7 +22,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_arithm.cpp b/modules/ocl/perf/perf_arithm.cpp index 880bdff5e..025221b4e 100644 --- a/modules/ocl/perf/perf_arithm.cpp +++ b/modules/ocl/perf/perf_arithm.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_bgfg.cpp b/modules/ocl/perf/perf_bgfg.cpp index 3180f1bbb..b361a9232 100644 --- a/modules/ocl/perf/perf_bgfg.cpp +++ b/modules/ocl/perf/perf_bgfg.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_blend.cpp b/modules/ocl/perf/perf_blend.cpp index 018ec6315..a5e057ffc 100644 --- a/modules/ocl/perf/perf_blend.cpp +++ b/modules/ocl/perf/perf_blend.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_brute_force_matcher.cpp b/modules/ocl/perf/perf_brute_force_matcher.cpp index 33c42c72d..86c0a3c70 100644 --- a/modules/ocl/perf/perf_brute_force_matcher.cpp +++ b/modules/ocl/perf/perf_brute_force_matcher.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_calib3d.cpp b/modules/ocl/perf/perf_calib3d.cpp index ecdf2ce1c..8376b4104 100644 --- a/modules/ocl/perf/perf_calib3d.cpp +++ b/modules/ocl/perf/perf_calib3d.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_canny.cpp b/modules/ocl/perf/perf_canny.cpp index 259684092..33723daa3 100644 --- a/modules/ocl/perf/perf_canny.cpp +++ b/modules/ocl/perf/perf_canny.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_color.cpp b/modules/ocl/perf/perf_color.cpp index fc136f1b1..fd7366f00 100644 --- a/modules/ocl/perf/perf_color.cpp +++ b/modules/ocl/perf/perf_color.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_fft.cpp b/modules/ocl/perf/perf_fft.cpp index 4cba47e96..49da65936 100644 --- a/modules/ocl/perf/perf_fft.cpp +++ b/modules/ocl/perf/perf_fft.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_filters.cpp b/modules/ocl/perf/perf_filters.cpp index 7f2758877..b6dcd2a08 100644 --- a/modules/ocl/perf/perf_filters.cpp +++ b/modules/ocl/perf/perf_filters.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_gemm.cpp b/modules/ocl/perf/perf_gemm.cpp index 803e1f91b..4dcd5d4d6 100644 --- a/modules/ocl/perf/perf_gemm.cpp +++ b/modules/ocl/perf/perf_gemm.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_gftt.cpp b/modules/ocl/perf/perf_gftt.cpp index 8a29adc0c..af24c3489 100644 --- a/modules/ocl/perf/perf_gftt.cpp +++ b/modules/ocl/perf/perf_gftt.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_haar.cpp b/modules/ocl/perf/perf_haar.cpp index 88f6c8d0f..9ccaf3156 100644 --- a/modules/ocl/perf/perf_haar.cpp +++ b/modules/ocl/perf/perf_haar.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_hog.cpp b/modules/ocl/perf/perf_hog.cpp index fe5d9d190..2a6731117 100644 --- a/modules/ocl/perf/perf_hog.cpp +++ b/modules/ocl/perf/perf_hog.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_imgproc.cpp b/modules/ocl/perf/perf_imgproc.cpp index 5eb32b46c..f2314c6a7 100644 --- a/modules/ocl/perf/perf_imgproc.cpp +++ b/modules/ocl/perf/perf_imgproc.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_kalman.cpp b/modules/ocl/perf/perf_kalman.cpp index 017a8a70d..946444ad9 100644 --- a/modules/ocl/perf/perf_kalman.cpp +++ b/modules/ocl/perf/perf_kalman.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_match_template.cpp b/modules/ocl/perf/perf_match_template.cpp index cd90fe65a..d6f7fe0f3 100644 --- a/modules/ocl/perf/perf_match_template.cpp +++ b/modules/ocl/perf/perf_match_template.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_matrix_operation.cpp b/modules/ocl/perf/perf_matrix_operation.cpp index 8266f0930..3035c97f0 100644 --- a/modules/ocl/perf/perf_matrix_operation.cpp +++ b/modules/ocl/perf/perf_matrix_operation.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_ml.cpp b/modules/ocl/perf/perf_ml.cpp index fac471ed4..db45eceb8 100644 --- a/modules/ocl/perf/perf_ml.cpp +++ b/modules/ocl/perf/perf_ml.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_moments.cpp b/modules/ocl/perf/perf_moments.cpp index 6ecc76651..a36e1a13e 100644 --- a/modules/ocl/perf/perf_moments.cpp +++ b/modules/ocl/perf/perf_moments.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_norm.cpp b/modules/ocl/perf/perf_norm.cpp index 35ac00639..ff49eb4ed 100644 --- a/modules/ocl/perf/perf_norm.cpp +++ b/modules/ocl/perf/perf_norm.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_opticalflow.cpp b/modules/ocl/perf/perf_opticalflow.cpp index 861307526..bc1761b49 100644 --- a/modules/ocl/perf/perf_opticalflow.cpp +++ b/modules/ocl/perf/perf_opticalflow.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_precomp.hpp b/modules/ocl/perf/perf_precomp.hpp index a6d9eab40..2d9639a85 100644 --- a/modules/ocl/perf/perf_precomp.hpp +++ b/modules/ocl/perf/perf_precomp.hpp @@ -22,7 +22,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_pyramid.cpp b/modules/ocl/perf/perf_pyramid.cpp index 19c728bb7..c799853db 100644 --- a/modules/ocl/perf/perf_pyramid.cpp +++ b/modules/ocl/perf/perf_pyramid.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/perf/perf_split_merge.cpp b/modules/ocl/perf/perf_split_merge.cpp index 3821a8e16..f2f7c4115 100644 --- a/modules/ocl/perf/perf_split_merge.cpp +++ b/modules/ocl/perf/perf_split_merge.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/arithm.cpp b/modules/ocl/src/arithm.cpp index 037999cbf..c0328e16b 100644 --- a/modules/ocl/src/arithm.cpp +++ b/modules/ocl/src/arithm.cpp @@ -32,7 +32,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/bgfg_mog.cpp b/modules/ocl/src/bgfg_mog.cpp index 064fef8d3..bd25601d0 100644 --- a/modules/ocl/src/bgfg_mog.cpp +++ b/modules/ocl/src/bgfg_mog.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/blend.cpp b/modules/ocl/src/blend.cpp index 58b91d8c3..1a5301f97 100644 --- a/modules/ocl/src/blend.cpp +++ b/modules/ocl/src/blend.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/brute_force_matcher.cpp b/modules/ocl/src/brute_force_matcher.cpp index aaf070324..69559f796 100644 --- a/modules/ocl/src/brute_force_matcher.cpp +++ b/modules/ocl/src/brute_force_matcher.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/build_warps.cpp b/modules/ocl/src/build_warps.cpp index 4c400a2b6..dc9ab66db 100644 --- a/modules/ocl/src/build_warps.cpp +++ b/modules/ocl/src/build_warps.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/canny.cpp b/modules/ocl/src/canny.cpp index 9fc6f65b4..c41d802e5 100644 --- a/modules/ocl/src/canny.cpp +++ b/modules/ocl/src/canny.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/cl_context.cpp b/modules/ocl/src/cl_context.cpp index d78d34519..528949d70 100644 --- a/modules/ocl/src/cl_context.cpp +++ b/modules/ocl/src/cl_context.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/cl_operations.cpp b/modules/ocl/src/cl_operations.cpp index 9514cc390..cd948fc9d 100644 --- a/modules/ocl/src/cl_operations.cpp +++ b/modules/ocl/src/cl_operations.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/cl_programcache.cpp b/modules/ocl/src/cl_programcache.cpp index cc49ec193..c490768b8 100644 --- a/modules/ocl/src/cl_programcache.cpp +++ b/modules/ocl/src/cl_programcache.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/cl_programcache.hpp b/modules/ocl/src/cl_programcache.hpp index d94de21d9..5d8d81ea8 100644 --- a/modules/ocl/src/cl_programcache.hpp +++ b/modules/ocl/src/cl_programcache.hpp @@ -24,7 +24,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/color.cpp b/modules/ocl/src/color.cpp index 92f54249e..27c2fd5f0 100644 --- a/modules/ocl/src/color.cpp +++ b/modules/ocl/src/color.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/columnsum.cpp b/modules/ocl/src/columnsum.cpp index f0beed43d..67d5d3374 100644 --- a/modules/ocl/src/columnsum.cpp +++ b/modules/ocl/src/columnsum.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/error.cpp b/modules/ocl/src/error.cpp index cd6d3d534..ed0984546 100644 --- a/modules/ocl/src/error.cpp +++ b/modules/ocl/src/error.cpp @@ -24,7 +24,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/fft.cpp b/modules/ocl/src/fft.cpp index 50880f99d..05b7968ea 100644 --- a/modules/ocl/src/fft.cpp +++ b/modules/ocl/src/fft.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/filtering.cpp b/modules/ocl/src/filtering.cpp index 0a2562d8c..b7ef9633d 100644 --- a/modules/ocl/src/filtering.cpp +++ b/modules/ocl/src/filtering.cpp @@ -29,7 +29,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/gemm.cpp b/modules/ocl/src/gemm.cpp index 89f148ffb..33fbde2e5 100644 --- a/modules/ocl/src/gemm.cpp +++ b/modules/ocl/src/gemm.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/gftt.cpp b/modules/ocl/src/gftt.cpp index 5c34179c5..541b1d6ef 100644 --- a/modules/ocl/src/gftt.cpp +++ b/modules/ocl/src/gftt.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/haar.cpp b/modules/ocl/src/haar.cpp index 40c1f2ab3..bbbf1f907 100644 --- a/modules/ocl/src/haar.cpp +++ b/modules/ocl/src/haar.cpp @@ -30,7 +30,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/hog.cpp b/modules/ocl/src/hog.cpp index 2d2de9a2b..68f3949a8 100644 --- a/modules/ocl/src/hog.cpp +++ b/modules/ocl/src/hog.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/imgproc.cpp b/modules/ocl/src/imgproc.cpp index 0a2cf3f8d..a2c685496 100644 --- a/modules/ocl/src/imgproc.cpp +++ b/modules/ocl/src/imgproc.cpp @@ -35,7 +35,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/interpolate_frames.cpp b/modules/ocl/src/interpolate_frames.cpp index 54063cd7f..db78e85c7 100644 --- a/modules/ocl/src/interpolate_frames.cpp +++ b/modules/ocl/src/interpolate_frames.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/kalman.cpp b/modules/ocl/src/kalman.cpp index 6f8243457..5a133a7b1 100644 --- a/modules/ocl/src/kalman.cpp +++ b/modules/ocl/src/kalman.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/kmeans.cpp b/modules/ocl/src/kmeans.cpp index 112c4827f..a5d5afd1f 100644 --- a/modules/ocl/src/kmeans.cpp +++ b/modules/ocl/src/kmeans.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/knearest.cpp b/modules/ocl/src/knearest.cpp index 02dc72c4e..17c8cd459 100644 --- a/modules/ocl/src/knearest.cpp +++ b/modules/ocl/src/knearest.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/match_template.cpp b/modules/ocl/src/match_template.cpp index ba84043fc..afd68ffe4 100644 --- a/modules/ocl/src/match_template.cpp +++ b/modules/ocl/src/match_template.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/matrix_operations.cpp b/modules/ocl/src/matrix_operations.cpp index c4537cc7d..e7e672b3e 100644 --- a/modules/ocl/src/matrix_operations.cpp +++ b/modules/ocl/src/matrix_operations.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/mcwutil.cpp b/modules/ocl/src/mcwutil.cpp index 0a948d198..7158dc72c 100644 --- a/modules/ocl/src/mcwutil.cpp +++ b/modules/ocl/src/mcwutil.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/moments.cpp b/modules/ocl/src/moments.cpp index a19f7fc51..13f419734 100644 --- a/modules/ocl/src/moments.cpp +++ b/modules/ocl/src/moments.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/mssegmentation.cpp b/modules/ocl/src/mssegmentation.cpp index 248f13470..3880df098 100644 --- a/modules/ocl/src/mssegmentation.cpp +++ b/modules/ocl/src/mssegmentation.cpp @@ -24,7 +24,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_LUT.cl b/modules/ocl/src/opencl/arithm_LUT.cl index ff21e9a31..658e1f4bc 100644 --- a/modules/ocl/src/opencl/arithm_LUT.cl +++ b/modules/ocl/src/opencl/arithm_LUT.cl @@ -16,7 +16,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_absdiff_nonsaturate.cl b/modules/ocl/src/opencl/arithm_absdiff_nonsaturate.cl index 020880606..fcf38749d 100644 --- a/modules/ocl/src/opencl/arithm_absdiff_nonsaturate.cl +++ b/modules/ocl/src/opencl/arithm_absdiff_nonsaturate.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_add.cl b/modules/ocl/src/opencl/arithm_add.cl index 2f34bbbff..a73b65da6 100644 --- a/modules/ocl/src/opencl/arithm_add.cl +++ b/modules/ocl/src/opencl/arithm_add.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_addWeighted.cl b/modules/ocl/src/opencl/arithm_addWeighted.cl index 159a970db..8272806e2 100644 --- a/modules/ocl/src/opencl/arithm_addWeighted.cl +++ b/modules/ocl/src/opencl/arithm_addWeighted.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_add_mask.cl b/modules/ocl/src/opencl/arithm_add_mask.cl index c3958bf1f..ea96d8a8a 100644 --- a/modules/ocl/src/opencl/arithm_add_mask.cl +++ b/modules/ocl/src/opencl/arithm_add_mask.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_add_scalar.cl b/modules/ocl/src/opencl/arithm_add_scalar.cl index 7f4e41327..b82eff595 100644 --- a/modules/ocl/src/opencl/arithm_add_scalar.cl +++ b/modules/ocl/src/opencl/arithm_add_scalar.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_add_scalar_mask.cl b/modules/ocl/src/opencl/arithm_add_scalar_mask.cl index b93de0c6b..0762b19b1 100644 --- a/modules/ocl/src/opencl/arithm_add_scalar_mask.cl +++ b/modules/ocl/src/opencl/arithm_add_scalar_mask.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_bitwise_binary.cl b/modules/ocl/src/opencl/arithm_bitwise_binary.cl index a4fa205c1..56cd745d2 100644 --- a/modules/ocl/src/opencl/arithm_bitwise_binary.cl +++ b/modules/ocl/src/opencl/arithm_bitwise_binary.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_bitwise_binary_mask.cl b/modules/ocl/src/opencl/arithm_bitwise_binary_mask.cl index d244e572d..328ccd91a 100644 --- a/modules/ocl/src/opencl/arithm_bitwise_binary_mask.cl +++ b/modules/ocl/src/opencl/arithm_bitwise_binary_mask.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_bitwise_binary_scalar.cl b/modules/ocl/src/opencl/arithm_bitwise_binary_scalar.cl index 5a7d5938c..434bd5eca 100644 --- a/modules/ocl/src/opencl/arithm_bitwise_binary_scalar.cl +++ b/modules/ocl/src/opencl/arithm_bitwise_binary_scalar.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_bitwise_not.cl b/modules/ocl/src/opencl/arithm_bitwise_not.cl index 714220ddf..e5b46c936 100644 --- a/modules/ocl/src/opencl/arithm_bitwise_not.cl +++ b/modules/ocl/src/opencl/arithm_bitwise_not.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_cartToPolar.cl b/modules/ocl/src/opencl/arithm_cartToPolar.cl index a2f65e0b7..6c779ead9 100644 --- a/modules/ocl/src/opencl/arithm_cartToPolar.cl +++ b/modules/ocl/src/opencl/arithm_cartToPolar.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_compare.cl b/modules/ocl/src/opencl/arithm_compare.cl index d0842db18..005d3c73f 100644 --- a/modules/ocl/src/opencl/arithm_compare.cl +++ b/modules/ocl/src/opencl/arithm_compare.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_exp.cl b/modules/ocl/src/opencl/arithm_exp.cl index b2143ba14..835bc95c3 100644 --- a/modules/ocl/src/opencl/arithm_exp.cl +++ b/modules/ocl/src/opencl/arithm_exp.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_flip.cl b/modules/ocl/src/opencl/arithm_flip.cl index 49242d07c..7c2a04d74 100644 --- a/modules/ocl/src/opencl/arithm_flip.cl +++ b/modules/ocl/src/opencl/arithm_flip.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_flip_rc.cl b/modules/ocl/src/opencl/arithm_flip_rc.cl index 68e26a439..4a2038275 100644 --- a/modules/ocl/src/opencl/arithm_flip_rc.cl +++ b/modules/ocl/src/opencl/arithm_flip_rc.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_log.cl b/modules/ocl/src/opencl/arithm_log.cl index ef8c4dd04..fe1b3046a 100644 --- a/modules/ocl/src/opencl/arithm_log.cl +++ b/modules/ocl/src/opencl/arithm_log.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_nonzero.cl b/modules/ocl/src/opencl/arithm_nonzero.cl index 921367b3d..085386f5c 100644 --- a/modules/ocl/src/opencl/arithm_nonzero.cl +++ b/modules/ocl/src/opencl/arithm_nonzero.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_phase.cl b/modules/ocl/src/opencl/arithm_phase.cl index a30eba431..b6bc7b42b 100644 --- a/modules/ocl/src/opencl/arithm_phase.cl +++ b/modules/ocl/src/opencl/arithm_phase.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_pow.cl b/modules/ocl/src/opencl/arithm_pow.cl index dd9250c7f..1704f6b42 100644 --- a/modules/ocl/src/opencl/arithm_pow.cl +++ b/modules/ocl/src/opencl/arithm_pow.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_setidentity.cl b/modules/ocl/src/opencl/arithm_setidentity.cl index 921026b40..fb684c367 100644 --- a/modules/ocl/src/opencl/arithm_setidentity.cl +++ b/modules/ocl/src/opencl/arithm_setidentity.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_sum.cl b/modules/ocl/src/opencl/arithm_sum.cl index 39bcf949a..6eb6e4832 100644 --- a/modules/ocl/src/opencl/arithm_sum.cl +++ b/modules/ocl/src/opencl/arithm_sum.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/arithm_transpose.cl b/modules/ocl/src/opencl/arithm_transpose.cl index 5328d1f1b..bd06a5208 100644 --- a/modules/ocl/src/opencl/arithm_transpose.cl +++ b/modules/ocl/src/opencl/arithm_transpose.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/bgfg_mog.cl b/modules/ocl/src/opencl/bgfg_mog.cl index 2e269999a..8621ff31b 100644 --- a/modules/ocl/src/opencl/bgfg_mog.cl +++ b/modules/ocl/src/opencl/bgfg_mog.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/brute_force_match.cl b/modules/ocl/src/opencl/brute_force_match.cl index a05c98ee0..d6a89f205 100644 --- a/modules/ocl/src/opencl/brute_force_match.cl +++ b/modules/ocl/src/opencl/brute_force_match.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/build_warps.cl b/modules/ocl/src/opencl/build_warps.cl index 07cccee1a..4402e8c38 100644 --- a/modules/ocl/src/opencl/build_warps.cl +++ b/modules/ocl/src/opencl/build_warps.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/convertC3C4.cl b/modules/ocl/src/opencl/convertC3C4.cl index 1908f92a2..b3e699dc4 100644 --- a/modules/ocl/src/opencl/convertC3C4.cl +++ b/modules/ocl/src/opencl/convertC3C4.cl @@ -15,7 +15,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/cvt_color.cl b/modules/ocl/src/opencl/cvt_color.cl index 2b1cfccd0..fcbf67ca7 100644 --- a/modules/ocl/src/opencl/cvt_color.cl +++ b/modules/ocl/src/opencl/cvt_color.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/filter_sep_row.cl b/modules/ocl/src/opencl/filter_sep_row.cl index 9dc498399..95eb961c7 100644 --- a/modules/ocl/src/opencl/filter_sep_row.cl +++ b/modules/ocl/src/opencl/filter_sep_row.cl @@ -16,7 +16,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl b/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl index a8e0fd17e..e66d84d16 100644 --- a/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl +++ b/modules/ocl/src/opencl/filtering_adaptive_bilateral.cl @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/filtering_boxFilter.cl b/modules/ocl/src/opencl/filtering_boxFilter.cl index d163ebe76..030c13cc5 100644 --- a/modules/ocl/src/opencl/filtering_boxFilter.cl +++ b/modules/ocl/src/opencl/filtering_boxFilter.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/filtering_laplacian.cl b/modules/ocl/src/opencl/filtering_laplacian.cl index 7c5b0c321..ea22967df 100644 --- a/modules/ocl/src/opencl/filtering_laplacian.cl +++ b/modules/ocl/src/opencl/filtering_laplacian.cl @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/filtering_morph.cl b/modules/ocl/src/opencl/filtering_morph.cl index db88aca65..c402ff721 100644 --- a/modules/ocl/src/opencl/filtering_morph.cl +++ b/modules/ocl/src/opencl/filtering_morph.cl @@ -17,7 +17,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/haarobjectdetect.cl b/modules/ocl/src/opencl/haarobjectdetect.cl index 22a7fe7cb..5fa353305 100644 --- a/modules/ocl/src/opencl/haarobjectdetect.cl +++ b/modules/ocl/src/opencl/haarobjectdetect.cl @@ -19,7 +19,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/haarobjectdetect_scaled2.cl b/modules/ocl/src/opencl/haarobjectdetect_scaled2.cl index c12ab5950..17e95b4e4 100644 --- a/modules/ocl/src/opencl/haarobjectdetect_scaled2.cl +++ b/modules/ocl/src/opencl/haarobjectdetect_scaled2.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/imgproc_canny.cl b/modules/ocl/src/opencl/imgproc_canny.cl index 5402759e3..ca670b6db 100644 --- a/modules/ocl/src/opencl/imgproc_canny.cl +++ b/modules/ocl/src/opencl/imgproc_canny.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/imgproc_clahe.cl b/modules/ocl/src/opencl/imgproc_clahe.cl index 55692ae3b..16c68fd47 100644 --- a/modules/ocl/src/opencl/imgproc_clahe.cl +++ b/modules/ocl/src/opencl/imgproc_clahe.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/imgproc_columnsum.cl b/modules/ocl/src/opencl/imgproc_columnsum.cl index 1609d7c55..6b596a322 100644 --- a/modules/ocl/src/opencl/imgproc_columnsum.cl +++ b/modules/ocl/src/opencl/imgproc_columnsum.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/imgproc_convolve.cl b/modules/ocl/src/opencl/imgproc_convolve.cl index db7a7dfc3..fb9596e5d 100644 --- a/modules/ocl/src/opencl/imgproc_convolve.cl +++ b/modules/ocl/src/opencl/imgproc_convolve.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/imgproc_copymakeboder.cl b/modules/ocl/src/opencl/imgproc_copymakeboder.cl index b1686842e..d97f66068 100644 --- a/modules/ocl/src/opencl/imgproc_copymakeboder.cl +++ b/modules/ocl/src/opencl/imgproc_copymakeboder.cl @@ -16,7 +16,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/imgproc_gftt.cl b/modules/ocl/src/opencl/imgproc_gftt.cl index bfa8ee3f8..80bdec08f 100644 --- a/modules/ocl/src/opencl/imgproc_gftt.cl +++ b/modules/ocl/src/opencl/imgproc_gftt.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/imgproc_threshold.cl b/modules/ocl/src/opencl/imgproc_threshold.cl index 9162abb7e..8d7c77e1f 100644 --- a/modules/ocl/src/opencl/imgproc_threshold.cl +++ b/modules/ocl/src/opencl/imgproc_threshold.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/interpolate_frames.cl b/modules/ocl/src/opencl/interpolate_frames.cl index c167b6a13..eb0b55f33 100644 --- a/modules/ocl/src/opencl/interpolate_frames.cl +++ b/modules/ocl/src/opencl/interpolate_frames.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/kernel_radix_sort_by_key.cl b/modules/ocl/src/opencl/kernel_radix_sort_by_key.cl index 3c3eb98c8..7e09f3fc5 100644 --- a/modules/ocl/src/opencl/kernel_radix_sort_by_key.cl +++ b/modules/ocl/src/opencl/kernel_radix_sort_by_key.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/kernel_sort_by_key.cl b/modules/ocl/src/opencl/kernel_sort_by_key.cl index 2e85e5a88..0ad11b8bc 100644 --- a/modules/ocl/src/opencl/kernel_sort_by_key.cl +++ b/modules/ocl/src/opencl/kernel_sort_by_key.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/kernel_stablesort_by_key.cl b/modules/ocl/src/opencl/kernel_stablesort_by_key.cl index 9596d8cc8..2d2c0a19c 100644 --- a/modules/ocl/src/opencl/kernel_stablesort_by_key.cl +++ b/modules/ocl/src/opencl/kernel_stablesort_by_key.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/knearest.cl b/modules/ocl/src/opencl/knearest.cl index 47af57a7e..e670df7e6 100644 --- a/modules/ocl/src/opencl/knearest.cl +++ b/modules/ocl/src/opencl/knearest.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/match_template.cl b/modules/ocl/src/opencl/match_template.cl index 0dd3e69c4..6fc4c748c 100644 --- a/modules/ocl/src/opencl/match_template.cl +++ b/modules/ocl/src/opencl/match_template.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/merge_mat.cl b/modules/ocl/src/opencl/merge_mat.cl index 19e2340eb..8b445c682 100644 --- a/modules/ocl/src/opencl/merge_mat.cl +++ b/modules/ocl/src/opencl/merge_mat.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/moments.cl b/modules/ocl/src/opencl/moments.cl index 5ea94e20c..d61b8d5ae 100644 --- a/modules/ocl/src/opencl/moments.cl +++ b/modules/ocl/src/opencl/moments.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/operator_convertTo.cl b/modules/ocl/src/opencl/operator_convertTo.cl index 278d41f7c..85b562d65 100644 --- a/modules/ocl/src/opencl/operator_convertTo.cl +++ b/modules/ocl/src/opencl/operator_convertTo.cl @@ -16,7 +16,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/optical_flow_farneback.cl b/modules/ocl/src/opencl/optical_flow_farneback.cl index 7cc564ede..917f7f215 100644 --- a/modules/ocl/src/opencl/optical_flow_farneback.cl +++ b/modules/ocl/src/opencl/optical_flow_farneback.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/pyr_down.cl b/modules/ocl/src/opencl/pyr_down.cl index e40ad3492..e09846457 100644 --- a/modules/ocl/src/opencl/pyr_down.cl +++ b/modules/ocl/src/opencl/pyr_down.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/pyr_up.cl b/modules/ocl/src/opencl/pyr_up.cl index 88efa9539..157fee894 100644 --- a/modules/ocl/src/opencl/pyr_up.cl +++ b/modules/ocl/src/opencl/pyr_up.cl @@ -28,7 +28,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/pyrlk.cl b/modules/ocl/src/opencl/pyrlk.cl index 02cf3afa4..85f4d3934 100644 --- a/modules/ocl/src/opencl/pyrlk.cl +++ b/modules/ocl/src/opencl/pyrlk.cl @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/split_mat.cl b/modules/ocl/src/opencl/split_mat.cl index caee4366d..b59e6b75b 100644 --- a/modules/ocl/src/opencl/split_mat.cl +++ b/modules/ocl/src/opencl/split_mat.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/stereobm.cl b/modules/ocl/src/opencl/stereobm.cl index 56f445e42..773aee618 100644 --- a/modules/ocl/src/opencl/stereobm.cl +++ b/modules/ocl/src/opencl/stereobm.cl @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/stereocsbp.cl b/modules/ocl/src/opencl/stereocsbp.cl index 89f2bb8dc..50aabaca6 100644 --- a/modules/ocl/src/opencl/stereocsbp.cl +++ b/modules/ocl/src/opencl/stereocsbp.cl @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/svm.cl b/modules/ocl/src/opencl/svm.cl index 074ceb059..36ae38ed2 100644 --- a/modules/ocl/src/opencl/svm.cl +++ b/modules/ocl/src/opencl/svm.cl @@ -16,7 +16,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/opencl/tvl1flow.cl b/modules/ocl/src/opencl/tvl1flow.cl index 095b339f8..ca60fb70f 100644 --- a/modules/ocl/src/opencl/tvl1flow.cl +++ b/modules/ocl/src/opencl/tvl1flow.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/optical_flow_farneback.cpp b/modules/ocl/src/optical_flow_farneback.cpp index 05a850bd1..c993bf2a2 100644 --- a/modules/ocl/src/optical_flow_farneback.cpp +++ b/modules/ocl/src/optical_flow_farneback.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/precomp.hpp b/modules/ocl/src/precomp.hpp index 1d3b0b011..76a771486 100644 --- a/modules/ocl/src/precomp.hpp +++ b/modules/ocl/src/precomp.hpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/pyrdown.cpp b/modules/ocl/src/pyrdown.cpp index 6071fc598..069a33dd6 100644 --- a/modules/ocl/src/pyrdown.cpp +++ b/modules/ocl/src/pyrdown.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/pyrlk.cpp b/modules/ocl/src/pyrlk.cpp index 5f7611317..064fee9ac 100644 --- a/modules/ocl/src/pyrlk.cpp +++ b/modules/ocl/src/pyrlk.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/pyrup.cpp b/modules/ocl/src/pyrup.cpp index 025348194..8c60f96de 100644 --- a/modules/ocl/src/pyrup.cpp +++ b/modules/ocl/src/pyrup.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/sort_by_key.cpp b/modules/ocl/src/sort_by_key.cpp index c2ab00452..b30fe944c 100644 --- a/modules/ocl/src/sort_by_key.cpp +++ b/modules/ocl/src/sort_by_key.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/split_merge.cpp b/modules/ocl/src/split_merge.cpp index 60e2d1b58..ad8b87208 100644 --- a/modules/ocl/src/split_merge.cpp +++ b/modules/ocl/src/split_merge.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/stereo_csbp.cpp b/modules/ocl/src/stereo_csbp.cpp index 13aaf78de..cfe03b20c 100644 --- a/modules/ocl/src/stereo_csbp.cpp +++ b/modules/ocl/src/stereo_csbp.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/stereobm.cpp b/modules/ocl/src/stereobm.cpp index 716a2f161..c567e2271 100644 --- a/modules/ocl/src/stereobm.cpp +++ b/modules/ocl/src/stereobm.cpp @@ -27,7 +27,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/stereobp.cpp b/modules/ocl/src/stereobp.cpp index ef7fff435..5d128d630 100644 --- a/modules/ocl/src/stereobp.cpp +++ b/modules/ocl/src/stereobp.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/svm.cpp b/modules/ocl/src/svm.cpp index 9239ddfac..a71047c58 100644 --- a/modules/ocl/src/svm.cpp +++ b/modules/ocl/src/svm.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/src/tvl1flow.cpp b/modules/ocl/src/tvl1flow.cpp index 825d932a2..76c0a2eb1 100644 --- a/modules/ocl/src/tvl1flow.cpp +++ b/modules/ocl/src/tvl1flow.cpp @@ -24,7 +24,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_api.cpp b/modules/ocl/test/test_api.cpp index 0b59fc6a5..36eb8bde1 100644 --- a/modules/ocl/test/test_api.cpp +++ b/modules/ocl/test/test_api.cpp @@ -21,7 +21,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_arithm.cpp b/modules/ocl/test/test_arithm.cpp index a5c0336e8..1d1b0f1ab 100644 --- a/modules/ocl/test/test_arithm.cpp +++ b/modules/ocl/test/test_arithm.cpp @@ -32,7 +32,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_bgfg.cpp b/modules/ocl/test/test_bgfg.cpp index 3d15444f2..b98b26d5d 100644 --- a/modules/ocl/test/test_bgfg.cpp +++ b/modules/ocl/test/test_bgfg.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_blend.cpp b/modules/ocl/test/test_blend.cpp index 8e6e26939..63693749d 100644 --- a/modules/ocl/test/test_blend.cpp +++ b/modules/ocl/test/test_blend.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_brute_force_matcher.cpp b/modules/ocl/test/test_brute_force_matcher.cpp index 5b80449e2..d31b3715b 100644 --- a/modules/ocl/test/test_brute_force_matcher.cpp +++ b/modules/ocl/test/test_brute_force_matcher.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_calib3d.cpp b/modules/ocl/test/test_calib3d.cpp index 532e61d13..9fd0b2329 100644 --- a/modules/ocl/test/test_calib3d.cpp +++ b/modules/ocl/test/test_calib3d.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_canny.cpp b/modules/ocl/test/test_canny.cpp index b7d2d6d44..82286031f 100644 --- a/modules/ocl/test/test_canny.cpp +++ b/modules/ocl/test/test_canny.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_color.cpp b/modules/ocl/test/test_color.cpp index c01737c95..4b6a6e41b 100644 --- a/modules/ocl/test/test_color.cpp +++ b/modules/ocl/test/test_color.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_fft.cpp b/modules/ocl/test/test_fft.cpp index fc8a0f72a..0f1cf2cbe 100644 --- a/modules/ocl/test/test_fft.cpp +++ b/modules/ocl/test/test_fft.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_filters.cpp b/modules/ocl/test/test_filters.cpp index 2e54570e7..047c0a51a 100644 --- a/modules/ocl/test/test_filters.cpp +++ b/modules/ocl/test/test_filters.cpp @@ -30,7 +30,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_gemm.cpp b/modules/ocl/test/test_gemm.cpp index 68dab0ac0..c2a44842c 100644 --- a/modules/ocl/test/test_gemm.cpp +++ b/modules/ocl/test/test_gemm.cpp @@ -24,7 +24,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_imgproc.cpp b/modules/ocl/test/test_imgproc.cpp index 39f6cc4f8..eb983fb17 100644 --- a/modules/ocl/test/test_imgproc.cpp +++ b/modules/ocl/test/test_imgproc.cpp @@ -33,7 +33,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_kalman.cpp b/modules/ocl/test/test_kalman.cpp index f02df6af7..045cd9815 100644 --- a/modules/ocl/test/test_kalman.cpp +++ b/modules/ocl/test/test_kalman.cpp @@ -24,7 +24,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_kmeans.cpp b/modules/ocl/test/test_kmeans.cpp index c99148a91..16d84dd92 100644 --- a/modules/ocl/test/test_kmeans.cpp +++ b/modules/ocl/test/test_kmeans.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_match_template.cpp b/modules/ocl/test/test_match_template.cpp index 0c2e9bd4e..edbc36a3f 100644 --- a/modules/ocl/test/test_match_template.cpp +++ b/modules/ocl/test/test_match_template.cpp @@ -24,7 +24,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_matrix_operation.cpp b/modules/ocl/test/test_matrix_operation.cpp index 27a587260..c7ceef453 100644 --- a/modules/ocl/test/test_matrix_operation.cpp +++ b/modules/ocl/test/test_matrix_operation.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_mean_shift.cpp b/modules/ocl/test/test_mean_shift.cpp index 684a2a937..6ee3e35a7 100644 --- a/modules/ocl/test/test_mean_shift.cpp +++ b/modules/ocl/test/test_mean_shift.cpp @@ -33,7 +33,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_ml.cpp b/modules/ocl/test/test_ml.cpp index 76940fff0..a06407089 100644 --- a/modules/ocl/test/test_ml.cpp +++ b/modules/ocl/test/test_ml.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_optflow.cpp b/modules/ocl/test/test_optflow.cpp index f7f5a4cd0..91215547e 100644 --- a/modules/ocl/test/test_optflow.cpp +++ b/modules/ocl/test/test_optflow.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_pyramids.cpp b/modules/ocl/test/test_pyramids.cpp index 3b91f12ba..2d861b627 100644 --- a/modules/ocl/test/test_pyramids.cpp +++ b/modules/ocl/test/test_pyramids.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_sort.cpp b/modules/ocl/test/test_sort.cpp index 5a7d4a300..b25914968 100644 --- a/modules/ocl/test/test_sort.cpp +++ b/modules/ocl/test/test_sort.cpp @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_split_merge.cpp b/modules/ocl/test/test_split_merge.cpp index b090045c7..6148e95cb 100644 --- a/modules/ocl/test/test_split_merge.cpp +++ b/modules/ocl/test/test_split_merge.cpp @@ -26,7 +26,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/ocl/test/test_warp.cpp b/modules/ocl/test/test_warp.cpp index 6d8943761..bfe5b638f 100644 --- a/modules/ocl/test/test_warp.cpp +++ b/modules/ocl/test/test_warp.cpp @@ -33,7 +33,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. diff --git a/modules/superres/src/opencl/superres_btvl1.cl b/modules/superres/src/opencl/superres_btvl1.cl index 472062323..4b9aada54 100644 --- a/modules/superres/src/opencl/superres_btvl1.cl +++ b/modules/superres/src/opencl/superres_btvl1.cl @@ -25,7 +25,7 @@ // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation -// and/or other oclMaterials provided with the distribution. +// and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. From c016c43d253596fae041685a737e6e55347ad6b1 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 25 Oct 2013 19:10:13 +0400 Subject: [PATCH 32/32] Fixed Android SDK build - again. --- cmake/OpenCVGenConfig.cmake | 4 +++- cmake/templates/OpenCVConfig.cmake.in | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake index b7f026db2..362841b21 100644 --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake @@ -76,7 +76,9 @@ endif() set(modules_file_suffix "") if(ANDROID) - set(modules_file_suffix "-${ANDROID_NDK_ABI_NAME}") + # the REPLACE here is needed, because OpenCVModules_armeabi.cmake includes + # OpenCVModules_armeabi-*.cmake, which would match OpenCVModules_armeabi-v7a*.cmake. + string(REPLACE - _ modules_file_suffix "_${ANDROID_NDK_ABI_NAME}") endif() export(TARGETS ${OpenCVModules_TARGETS} FILE "${CMAKE_BINARY_DIR}/OpenCVModules${modules_file_suffix}.cmake") diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in index 2f2841356..ee1eb5996 100644 --- a/cmake/templates/OpenCVConfig.cmake.in +++ b/cmake/templates/OpenCVConfig.cmake.in @@ -36,12 +36,13 @@ # # =================================================================================== -if(NOT ANDROID) - include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules-${ANDROID_NDK_ABI_NAME}.cmake) +set(modules_file_suffix "") +if(ANDROID) + string(REPLACE - _ modules_file_suffix "_${ANDROID_NDK_ABI_NAME}") endif() +include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${modules_file_suffix}.cmake) + # TODO All things below should be reviewed. What is about of moving this code into related modules (special vars/hooks/files) # Version Compute Capability from which OpenCV has been compiled is remembered