1
nppiGraphcut_32s8u
函数对32位带符号整数边缘能力有效。在CUDA 6.5工具包中包含的grabCut示例中,他们只需将Npp32f
转换为Npp32s
即可。例如,从GrabcutUtil.cu
在grabcutNPP例如文件夹:针对非整数边缘能力的NPP图切割
// Top/Bottom
Npp32s bottom;
bottom = _FIXED(edge_weight(center, tex2D(imageTex, x + 0.5f ,y + 1.5f), alpha, beta, 1.0f));
其中edge_weight
返回Npp32f
。 他们扩大了他们的数字,以便边缘容量将是大的值,从而避免误差四舍五入?