Ptr<FilterEngine_GPU> cv::ocl::createFilter2D_GPU(const Ptr<BaseFilter_GPU> filter2D)
{
- return Ptr<FilterEngine_GPU>(new Filter2DEngine_GPU(filter2D));
+ return makePtr<Filter2DEngine_GPU>(filter2D);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
Ptr<BaseFilter_GPU> filter2D = getMorphologyFilter_GPU(op, type, kernel, ksize, anchor);
- return Ptr<FilterEngine_GPU>(new MorphologyFilterEngine_GPU(filter2D, iterations));
+ return makePtr<MorphologyFilterEngine_GPU>(filter2D, iterations);
}
namespace
normalizeKernel(kernel, gpu_krnl, CV_32FC1);
normalizeAnchor(norm_archor, ksize);
- return Ptr<BaseFilter_GPU>(new LinearFilter_GPU(ksize, anchor, gpu_krnl, GPUFilter2D_callers[CV_MAT_CN(srcType)],
- borderType));
+ return makePtr<LinearFilter_GPU>(ksize, anchor, gpu_krnl, GPUFilter2D_callers[CV_MAT_CN(srcType)],
+ borderType);
}
Ptr<FilterEngine_GPU> cv::ocl::createLinearFilter_GPU(int srcType, int dstType, const Mat &kernel, const Point &anchor,
Ptr<FilterEngine_GPU> cv::ocl::createSeparableFilter_GPU(const Ptr<BaseRowFilter_GPU> &rowFilter,
const Ptr<BaseColumnFilter_GPU> &columnFilter)
{
- return Ptr<FilterEngine_GPU>(new SeparableFilterEngine_GPU(rowFilter, columnFilter));
+ return makePtr<SeparableFilterEngine_GPU>(rowFilter, columnFilter);
}
/*
normalizeAnchor(anchor, ksize);
- return Ptr<BaseFilter_GPU>(new GPUBoxFilter(ksize, anchor,
- borderType, FilterBox_callers[(CV_MAT_DEPTH(srcType) == CV_32F)][CV_MAT_CN(srcType)]));
+ return makePtr<GPUBoxFilter>(ksize, anchor,
+ borderType, FilterBox_callers[(CV_MAT_DEPTH(srcType) == CV_32F)][CV_MAT_CN(srcType)]);
}
Ptr<FilterEngine_GPU> cv::ocl::createBoxFilter_GPU(int srcType, int dstType,
normalizeAnchor(anchor, ksize);
- return Ptr<BaseRowFilter_GPU>(new GpuLinearRowFilter(ksize, anchor, mat_kernel,
- gpuFilter1D_callers[CV_MAT_DEPTH(srcType)], bordertype));
+ return makePtr<GpuLinearRowFilter>(ksize, anchor, mat_kernel,
+ gpuFilter1D_callers[CV_MAT_DEPTH(srcType)], bordertype);
}
namespace
normalizeAnchor(anchor, ksize);
- return Ptr<BaseColumnFilter_GPU>(new GpuLinearColumnFilter(ksize, anchor, mat_kernel,
- gpuFilter1D_callers[CV_MAT_DEPTH(dstType)], bordertype));
+ return makePtr<GpuLinearColumnFilter>(ksize, anchor, mat_kernel,
+ gpuFilter1D_callers[CV_MAT_DEPTH(dstType)], bordertype);
}
Ptr<FilterEngine_GPU> cv::ocl::createSeparableLinearFilter_GPU(int srcType, int dstType,