http://imagej.273.s1.nabble.com/Is-it-possible-to-measure-with-sub-pixel-resolution-tp5016356p5016358.html
Thank you for replying.
> like half a pixel.
).
selection could be weighted by the fraction of its area covered. But it's
good to know it's not a possibility, I won't look any further. If this
becomes critical we will use the size-adjustment trick you suggested.
> selection, nothing in between.
>
> If you need better resolution for measurements, you have to increase the
> image size, Image>Adjust>Size, and use interpolation.
>
> Michael
> ___________________________________________________________________
>
> On Sun, May 8, 2016 18:15, Emmanuel Levy wrote:
> > 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> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>