I believe (if I did understand you properly) that you have discovered the world of interpolation. An image itself, is a continous plane with x
coordinates in the range of [0, width]
and y
coordinates in the range of [0, height]
. To show the image in a monitor, or store it in disk, the image is discretized in pixels.
If you are applying discrete operations, such as convolutions, additions or thresholds to an image, it is normal to think of it as a grid of values. However, specially in your case that you are tracking objects in an image, you should think of it as a continuous space. The center of mass of a object, wont probably lay in a discrete value, it will be some floating point coordinate in the above range (i.e. p = (50.5, 10.1)
), but that shouldn't be a problem.
If you want, you can also access the color (or gray-scale value) of the p = (50.5, 10.1)
pixel by using bilinear (or more complex) interpolation.