在铃木安倍的paper中,我尝试了他们的示例中的边界跟踪算法:,
这里算法:
我的算法结果为
与纸张结果不同,在纸张2中,当我处理步骤3.4部分a时,结果变为-2。它是(i 3 ,j 3 +1)从当前像素+ 1的平均坐标列?
答案 0 :(得分:0)
Without seeing your implementation, it's hard to know for sure. But, my first guess is that, in your code, you're deciding to label a pixel as -LNBD only if is zero, instead of also confirming that this cell was examined your implementation of step (3.3). So, in your loop that implements (3.3), add a flag that flips to true when your counterclockwise search for a 1-pixel value hits , and then modify your implementation of step (3.4(a)) to also check this flag.
I encountered the same problem myself and didn't quite realize it until I read the proof of Lemma 2 on P 43.