|
|
|
@ -144,7 +144,7 @@ namespace |
|
|
|
|
|
|
|
|
|
void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& bottom, GpuMat& labels, GpuMat& buf, Stream& s) |
|
|
|
|
{ |
|
|
|
|
#if (CUDA_VERSION < 5000) |
|
|
|
|
#if (CUDART_VERSION < 5000) |
|
|
|
|
CV_Assert(terminals.type() == CV_32S); |
|
|
|
|
#else |
|
|
|
|
CV_Assert(terminals.type() == CV_32S || terminals.type() == CV_32F); |
|
|
|
@ -181,7 +181,7 @@ void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTrans |
|
|
|
|
|
|
|
|
|
NppiGraphcutStateHandler state(sznpp, buf.ptr<Npp8u>(), nppiGraphcutInitAlloc); |
|
|
|
|
|
|
|
|
|
#if (CUDA_VERSION < 5000) |
|
|
|
|
#if (CUDART_VERSION < 5000) |
|
|
|
|
nppSafeCall( nppiGraphcut_32s8u(terminals.ptr<Npp32s>(), leftTransp.ptr<Npp32s>(), rightTransp.ptr<Npp32s>(), top.ptr<Npp32s>(), bottom.ptr<Npp32s>(), |
|
|
|
|
static_cast<int>(terminals.step), static_cast<int>(leftTransp.step), sznpp, labels.ptr<Npp8u>(), static_cast<int>(labels.step), state) ); |
|
|
|
|
#else |
|
|
|
@ -204,7 +204,7 @@ void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTrans |
|
|
|
|
void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTransp, GpuMat& top, GpuMat& topLeft, GpuMat& topRight, |
|
|
|
|
GpuMat& bottom, GpuMat& bottomLeft, GpuMat& bottomRight, GpuMat& labels, GpuMat& buf, Stream& s) |
|
|
|
|
{ |
|
|
|
|
#if (CUDA_VERSION < 5000) |
|
|
|
|
#if (CUDART_VERSION < 5000) |
|
|
|
|
CV_Assert(terminals.type() == CV_32S); |
|
|
|
|
#else |
|
|
|
|
CV_Assert(terminals.type() == CV_32S || terminals.type() == CV_32F); |
|
|
|
@ -253,7 +253,7 @@ void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTrans |
|
|
|
|
|
|
|
|
|
NppiGraphcutStateHandler state(sznpp, buf.ptr<Npp8u>(), nppiGraphcut8InitAlloc); |
|
|
|
|
|
|
|
|
|
#if (CUDA_VERSION < 5000) |
|
|
|
|
#if (CUDART_VERSION < 5000) |
|
|
|
|
nppSafeCall( nppiGraphcut8_32s8u(terminals.ptr<Npp32s>(), leftTransp.ptr<Npp32s>(), rightTransp.ptr<Npp32s>(), |
|
|
|
|
top.ptr<Npp32s>(), topLeft.ptr<Npp32s>(), topRight.ptr<Npp32s>(), |
|
|
|
|
bottom.ptr<Npp32s>(), bottomLeft.ptr<Npp32s>(), bottomRight.ptr<Npp32s>(), |
|
|
|
|