Re: Point selection: center of the pixel
Posted by Wayne Rasband on Dec 08, 2006; 7:51pm
URL: http://imagej.273.s1.nabble.com/polygon-selection-tp3700848p3700852.html
> I understand that with point tool, the (x,y) that you
> get for a pixel depends on which corner of the pixel
> you are pointing with the point tool. I would like to
> have (x,y) corresponding to the center of the pixel
> (the same way it is done in MATLAB). how could I do
> this?
When you click on a pixel with the point tool, the (x,y) you get is the
point at the upper left corner of the pixel. You can see this by
zooming an image 3200% and clicking with the point tool. You can get
the center of the pixel by adding 0.5 to each of the coordinates. A
future version of ImageJ will support sub-pixel addressing and then
(x,y) will be the point within the pixel you clicked on. Currently,
only the straight line tool supports sub-pixel addressing.
-wayne