Login  Register

X-Y coordinates to pixels

Posted by Brian Sellar on Feb 03, 2006; 3:22pm
URL: http://imagej.273.s1.nabble.com/X-Y-coordinates-to-pixels-tp3703837.html

Leslie,

I'm jumping in on this thread so forgive me if I'm off the mark.

If you record an image of something then the amount of information you
can gain depends on how many pixels cover the area of the thing you
photographed.

If you were taking an image of a complete A4 piece of paper for example
which is about 300mm x 210mm and your camera produced images of 720 x
560 pixels then to find the image lengthscale compared to realworld you
divide the length of object (paper)by 720 and width of object by 560.
So every pixel in your image represents ~0.4mm top to bottom and across.

So a pixel at pixel location (21,47) in your XY coords would be
[21x0.4mm] along and [47x0.4mm] down from one corner of the image
(depending on where the program starts its rows and columns and where
on the pixel the XY coord represents (top left corner??) This
represents a real world length. Now you don't have integer lengths (the
displacement from the top corner of the paper to your point of interest
would be 20.591mm). But since pixels are the smallest element in an
image and are in rows and columns they'll always be whole numbers.

Brian