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 7bfc7bc5af..24e9ab55b3 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 24e9ab55b3..ecd7c68f14 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 ecd7c68f14..6f9333952e 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 6f9333952e..1c22b8a9c7 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 1c22b8a9c7..eaa29c3f3d 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 e483935028..d9e821db41 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 eaa29c3f3d..8b02d5b2b3 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 05a850bd17..050375820f 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 432d2368a3..b4f4acdaf7 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 4720623234..a08227491e 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 435e711a1a..6efd24144c 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 8b02d5b2b3..a36b70e941 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 76a115fd70..cc49ec193d 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 ea2ab400c6..d94de21d9c 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 6e4fc4d7cd..50880f99d3 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 d3d2521df9..b8ad3edfb0 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 589a34914f..997be056dc 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 5dc20756b4..558a0d18fa 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 be61b79e44..d20c937852 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 89c8dff828..28f0cc12af 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 5a59803798..c3648eff38 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 9e709245da..bd1c3c3921 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 86d60d49be..7a5c105199 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 4d73323059..6023de9039 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 296dc69338..fabfa9a469 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 a71e579282..f3bf62cad2 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 f0b0e12927..704c51be8c 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 72b4ba6f7f..33ea36f482 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 8c08d25a92..ddc211007c 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 8c08d25a92..561164bd9a 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 818ec9b4ba..b94d17c6c7 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 717bbc7a2e..6d89437618 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 10b6804869..0a2cf3f8dc 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 ff7509ffdc..b1686842e1 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 dea14a9108..43dbac68c9 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 2ec7001ac0..5ad97b08a3 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 c4cde19907..3eb8913be4 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 6bfa095f30..6df81c7ba7 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 258ed91e51..d78d345197 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 b94d17c6c7..13461e82c1 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 79dd42cd4b..63e0e65e02 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 2e54570e73..0e1a6332c6 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 bee73dbea1..a9d4d7c425 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 704c51be8c..e3326982e5 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 86ce881240..024a9d91e2 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 0a2562d8c5..a1aec3c24c 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 60ce51360e..8dd77d5a97 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 881cd371a9..b7f026db25 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 88a451bf29..2f2841356f 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 a8e0fd17ec..b079b8c481 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 fdd1931bd8..cc48aa28c5 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 aace143d53..02f77c224d 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 b1dc166acf..c79c4b2e67 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 d6a877bc80..c52b6e366e 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 47932075cd..3dca0434f1 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 bf911f4bea..8c770ee38c 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 78ebc1a268..836f8ee9bd 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 880bdff5eb..025221b4ee 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 3180f1bbbe..b361a9232a 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 018ec63154..a5e057ffca 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 33c42c72dc..86c0a3c70d 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 ecdf2ce1c8..8376b41044 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 259684092f..33723daa32 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 fc136f1b1a..fd7366f002 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 4cba47e960..49da659361 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 7f2758877b..b6dcd2a08a 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 803e1f91b6..4dcd5d4d6a 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 8a29adc0cc..af24c3489a 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 88f6c8d0fc..9ccaf31563 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 fe5d9d1904..2a67311170 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 5eb32b46c9..f2314c6a76 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 017a8a70dc..946444ad9f 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 cd90fe65a0..d6f7fe0f37 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 8266f0930d..3035c97f04 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 fac471ed4c..db45eceb8f 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 6ecc766517..a36e1a13ed 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 35ac006394..ff49eb4eda 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 8613075261..bc1761b497 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 a6d9eab403..2d9639a855 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 19c728bb77..c799853db4 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 3821a8e163..f2f7c41155 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 037999cbfe..c0328e16b1 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 064fef8d30..bd25601d07 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 58b91d8c3f..1a5301f977 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 aaf0703249..69559f796a 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 4c400a2b68..dc9ab66db9 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 9fc6f65b44..c41d802e56 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 d78d345197..528949d70d 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 9514cc390b..cd948fc9d5 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 cc49ec193d..c490768b82 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 d94de21d9c..5d8d81ea87 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 92f54249e4..27c2fd5f05 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 f0beed43d6..67d5d33748 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 cd6d3d5346..ed09845461 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 50880f99d3..05b7968ea2 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 0a2562d8c5..b7ef9633de 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 89f148ffb4..33fbde2e5a 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 5c34179c54..541b1d6ef9 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 40c1f2ab39..bbbf1f907e 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 2d2de9a2be..68f3949a84 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 0a2cf3f8dc..a2c6854961 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 54063cd7f7..db78e85c72 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 6f8243457c..5a133a7b1c 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 112c4827f3..a5d5afd1f4 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 02dc72c4ea..17c8cd459d 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 ba84043fc7..afd68ffe42 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 c4537cc7d4..e7e672b3ee 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 0a948d198a..7158dc72c4 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 a19f7fc516..13f4197342 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 248f134705..3880df0982 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 ff21e9a315..658e1f4bc1 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 0208806069..fcf38749d8 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 2f34bbbffe..a73b65da6f 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 159a970db4..8272806e2b 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 c3958bf1fb..ea96d8a8a2 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 7f4e413277..b82eff5954 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 b93de0c6b2..0762b19b10 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 a4fa205c1f..56cd745d29 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 d244e572d9..328ccd91ae 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 5a7d5938cb..434bd5eca8 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 714220ddf4..e5b46c9368 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 a2f65e0b73..6c779ead90 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 d0842db180..005d3c73f5 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 b2143ba142..835bc95c3d 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 49242d07c7..7c2a04d74f 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 68e26a439e..4a20382755 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 ef8c4dd04e..fe1b3046a3 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 921367b3df..085386f5c3 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 a30eba4310..b6bc7b42b4 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 dd9250c7f9..1704f6b42e 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 921026b40d..fb684c367f 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 39bcf949a0..6eb6e48323 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 5328d1f1b2..bd06a52083 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 2e269999ac..8621ff31b0 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 a05c98ee03..d6a89f2057 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 07cccee1a3..4402e8c388 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 1908f92a2a..b3e699dc47 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 2b1cfccd03..fcbf67ca7a 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 9dc498399d..95eb961c7f 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 a8e0fd17ec..e66d84d16a 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 d163ebe76a..030c13cc57 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 7c5b0c321b..ea22967dff 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 db88aca654..c402ff7210 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 22a7fe7cbf..5fa3533054 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 c12ab59506..17e95b4e4a 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 5402759e3c..ca670b6db7 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 55692ae3b7..16c68fd474 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 1609d7c552..6b596a3228 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 db7a7dfc3e..fb9596e5d6 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 b1686842e1..d97f660688 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 bfa8ee3f8f..80bdec08ff 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 9162abb7ef..8d7c77e1fa 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 c167b6a13a..eb0b55f33b 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 3c3eb98c80..7e09f3fc57 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 2e85e5a888..0ad11b8bcf 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 9596d8cc85..2d2c0a19cd 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 47af57a7e2..e670df7e6f 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 0dd3e69c40..6fc4c748cf 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 19e2340eb5..8b445c6829 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 5ea94e20c8..d61b8d5ae7 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 278d41f7ca..85b562d657 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 7cc564eded..917f7f215d 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 e40ad3492d..e09846457c 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 88efa9539f..157fee894f 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 02cf3afa44..85f4d39343 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 caee4366de..b59e6b75b1 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 56f445e429..773aee618f 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 89f2bb8dc8..50aabaca68 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 074ceb0598..36ae38ed24 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 095b339f87..ca60fb70f6 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 05a850bd17..c993bf2a28 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 1d3b0b011b..76a7714865 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 6071fc5987..069a33dd6d 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 5f76113179..064fee9aca 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 025348194d..8c60f96dea 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 c2ab00452c..b30fe944c1 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 60e2d1b58f..ad8b872080 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 13aaf78dec..cfe03b20c8 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 716a2f1613..c567e22719 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 ef7fff4359..5d128d6309 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 9239ddfac8..a71047c58a 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 825d932a24..76c0a2eb10 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 0b59fc6a55..36eb8bde1c 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 a5c0336e82..1d1b0f1ab9 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 3d15444f26..b98b26d5df 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 8e6e269399..63693749db 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 5b80449e28..d31b3715b5 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 532e61d134..9fd0b23298 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 b7d2d6d44a..82286031f5 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 c01737c95a..4b6a6e41b9 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 fc8a0f72af..0f1cf2cbe0 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 2e54570e73..047c0a51a3 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 68dab0ac01..c2a44842ca 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 39f6cc4f85..eb983fb17e 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 f02df6af71..045cd98158 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 c99148a914..16d84dd92f 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 0c2e9bd4e0..edbc36a3f2 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 27a587260a..c7ceef4539 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 684a2a9378..6ee3e35a76 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 76940fff05..a064070890 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 f7f5a4cd08..91215547e9 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 3b91f12ba3..2d861b627d 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 5a7d4a3004..b259149682 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 b090045c7d..6148e95cb4 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 6d89437618..bfe5b638f3 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 4720623234..4b9aada546 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 b7f026db25..362841b217 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 2f2841356f..ee1eb59969 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