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
。 他們擴大了他們的數字,以便邊緣容量將是大的值,從而避免誤差四捨五入?