This is probably because the matrix containing the centroid snake gets simply added to the incoming image, so if a pixel is already 100% white, adding pixels to that will just be clipped.
The solution could be to overwrite those pixels with the red dots, and not adding the red dots to them.
This is probably because the matrix containing the centroid snake gets simply added to the incoming image, so if a pixel is already 100% white, adding pixels to that will just be clipped. The solution could be to overwrite those pixels with the red dots, and not adding the red dots to them.