Accuracy of Centroid from Image

What is the accuracy of centroid extracted from an image? I recently had a argument with a colleague of mine. Here a  simple test. First generate images with a sphere $n$ pixels in diameter, moving across an image. Then measure the centroid using OpenCV in Python. To keep things simple, I will move the spheres in…