MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getAverage

Method getAverage

ij/src/main/java/ij/plugin/Binner.java:187–194  ·  view source on GitHub ↗
(ImageProcessor ip, int x, int y)

Source from the content-addressed store, hash-verified

185 }
186
187 private float getAverage(ImageProcessor ip, int x, int y) {
188 float sum = 0;
189 for (int y2=0; y2<yshrink; y2++) {
190 for (int x2=0; x2<xshrink; x2++)
191 sum += ip.getf(x*xshrink+x2, y*yshrink+y2);
192 }
193 return (float)(sum/(xshrink*yshrink));
194 }
195
196 private float getMedian(ImageProcessor ip, int x, int y) {
197 int shrinksize = xshrink*yshrink;

Callers 1

shrinkMethod · 0.95

Calls 1

getfMethod · 0.45

Tested by

no test coverage detected