Login  Register

Is it possible to measure with sub-pixel resolution?

Posted by Emmanuel Levy on May 08, 2016; 4:01pm
URL: http://imagej.273.s1.nabble.com/Is-it-possible-to-measure-with-sub-pixel-resolution-tp5016356.html

Dear list members,

I was wondering if there's a specific option/way to do measurements in an
image with sub-pixel resolution?

I paste below macro code to illustrate what I mean. The following creates a
10x10 pixels image, half of which is back and the other half white. If I
draw a triangle that is half in the black and half in the white area, with
a total area of 1pixel, I get a mean value of 255, but I would have
expected 127.5

newImage("Untitled", "8-bit black", 10, 10, 1);

makeRectangle(5, 0, 5, 10);

setBackgroundColor(255, 255, 255);

run("Clear", "slice");

makePolygon(4,5,6,5,5,6);

run("Measure");


Does anyone know if it's possible to get 127.5?

Thanks for your help,

Best wishes,

Emmanuel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html