@ahojnnes : As expected, this should be initialized with `np.zeros` or the border pixels should initialized with 0. Without it, the results are garbage points.