sclass G22GhostImage is IBWImage { int w, h; public int getWidth() { ret w; } public int getHeight() { ret h; } // number of images averaged int imageCount; // array contains raw sum over images // (1 for white pixel, 0 for black pixel) int[] pixels; FloatBWImage toFloatBWImage() { float[] floatPixels = new[pixels.length]; for i over pixels: floatPixels[i] = floatRatio(pixels[i], imageCount); ret new FloatBWImage(w, h, floatPixels); } public BufferedImage getBufferedImage() { ret toFloatBWImage().getBufferedImage(); } }