1 | initial version |
It's easier to understand the concept if you are also thinking about the other pixels.
Let's take a 2x2 pixel image. If (0,0)
is the top-left corner of the first pixel, then the pixel coordinate is (0.5,0.5)
. This means that the coordinate (1,1)
would correspond to a boundary between 4 pixels, which makes no sense.
If (0,0)
is the center of the first pixel, then (0.5,0.5)
is "half-way" between the pixels, which is much more logical.
Maybe it's easier to imagine if you resize the image by a factor of 10. You would find the first pixel at position (5,5)
, the second pixel at (15,5)
.
If we generalize, for a resize factor K
, the pixel (x,y)
will have the coordinates (K(x+0.5),K(y+0.5))
instead of the much simpler (Kx,Ky)
2 | No.2 Revision |
It's easier to understand the concept if you are also thinking about the other pixels.
Let's take a 2x2 pixel image. If (0,0)
is the top-left corner of the first pixel, then the pixel center coordinate is (0.5,0.5)
. This means that the coordinate (1,1)
(normally the center of a pixel) would correspond to a boundary between 4 pixels, which makes no sense.
If (0,0)
is the center of the first pixel, then (0.5,0.5)
is "half-way" between the pixels, which is much more logical.
Maybe it's easier to imagine if you resize the image by a factor of 10. You would find the first pixel at the strange position (5,5)
, the second pixel at (15,5)
.
If we generalize, for a resize factor K
, the you'll find pixel (x,y)
will have at the coordinates (K(x+0.5),K(y+0.5))
instead of the much simpler (Kx,Ky)