diff --git a/modules/gpu/include/opencv2/gpu/gpu.hpp b/modules/gpu/include/opencv2/gpu/gpu.hpp index 83fbd60c5f..87dfcc73c8 100644 --- a/modules/gpu/include/opencv2/gpu/gpu.hpp +++ b/modules/gpu/include/opencv2/gpu/gpu.hpp @@ -921,7 +921,7 @@ CV_EXPORTS void graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTra CV_EXPORTS void connectivityMask(const GpuMat& image, GpuMat& mask, const cv::Scalar& lo, const cv::Scalar& hi, Stream& stream = Stream::Null()); //! performs connected componnents labeling. -CV_EXPORTS void labelComponents(const GpuMat& mask, GpuMat& components, Stream& stream = Stream::Null()); +CV_EXPORTS void labelComponents(const GpuMat& mask, GpuMat& components, int flags = 0, Stream& stream = Stream::Null()); ////////////////////////////////// Histograms ////////////////////////////////// diff --git a/modules/gpu/src/graphcuts.cpp b/modules/gpu/src/graphcuts.cpp index 73ae4c885f..e0a43f2cb8 100644 --- a/modules/gpu/src/graphcuts.cpp +++ b/modules/gpu/src/graphcuts.cpp @@ -48,7 +48,7 @@ void cv::gpu::graphcut(GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, Gpu void cv::gpu::graphcut(GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, GpuMat&, Stream&) { throw_nogpu(); } void cv::gpu::connectivityMask(const GpuMat&, GpuMat&, const cv::Scalar&, const cv::Scalar&, Stream&) { throw_nogpu(); } -void cv::gpu::labelComponents(const GpuMat& mask, GpuMat& components, Stream& stream) { throw_nogpu(); } +void cv::gpu::labelComponents(const GpuMat& mask, GpuMat& components, int, Stream& stream) { throw_nogpu(); } #else /* !defined (HAVE_CUDA) */ @@ -106,7 +106,7 @@ void cv::gpu::connectivityMask(const GpuMat& image, GpuMat& mask, const cv::Scal f(image, mask, culo, cuhi, stream); } -void cv::gpu::labelComponents(const GpuMat& mask, GpuMat& components, Stream& s) +void cv::gpu::labelComponents(const GpuMat& mask, GpuMat& components, int flags, Stream& s) { CV_Assert(!mask.empty() && mask.type() == CV_8U); @@ -114,7 +114,7 @@ void cv::gpu::labelComponents(const GpuMat& mask, GpuMat& components, Stream& s) components.create(mask.size(), CV_32SC1); cudaStream_t stream = StreamAccessor::getStream(s); - device::ccl::labelComponents(mask, components, 0, stream); + device::ccl::labelComponents(mask, components, flags, stream); } namespace