next up previous
Next: Axis Coordinates
Up: THE AXIS COORDINATE SYSTEM
Previous: THE AXIS COORDINATE SYSTEM

Pixel Coordinates   

Hitherto, an NDF has been considered simply as an N-dimensional array of pixels, addressed by a set of pixel indices. Since they are integer quantities, these indices cannot represent a continuous coordinate system, although the information stored in an NDF will almost always require that positions within it be describable to sub-pixel accuracy. For example, a calculation to determine the centroid position of a star in a 2-dimensional image will inevitably give rise to a non-integer result, for which a continuous (x,y) coordinate system will be required.

There are a number of ways in which a continuous coordinate system can be defined for a regular array of pixels. In the absence of other information, the NDF convention is to use a pixel coordinate system in which a pixel with indices (i,j) has its centre at the position:

($i-\frac{1}{2},j-\frac{1}{2}$)

and is taken to be one unit in extent in each dimension. Pixel (1,1) would therefore be centred at the position (0.5,0.5) and would have its ``lower'' and ``upper'' corners located at positions (0.0,0.0) and (1.0,1.0) respectively, as follows:


\begin{picture}
(15,25)(0,-7.5)

\thicklines 
 
\put(0,0){\line(1,0){10}}
\put(1...
 ...put(14,5){\vector(-1,0){8}}
\put(15,5){\makebox(0,0)[l]{(0.5,0.5)}}\end{picture}

This makes it possible to refer to fractional pixel positions--in this case within a 2-dimensional array, although the principle can obviously be extended to other numbers of dimensions.



next up previous
Next: Axis Coordinates
Up: THE AXIS COORDINATE SYSTEM
Previous: THE AXIS COORDINATE SYSTEM


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils