The ImagePyramid class implements a pyramid operation on a RenderedImage. Supposing that we have a RenderedImage of 1024 x 1024, we could generate ten additional images by successively averaging 2 x 2 pixel blocks, each time discarding every other row and column of pixels. We would be left with images of 512 x 512, 256 x 256, and so on down to 1 x 1.
The downSampler is a chain of operations used to derive the image at the next lower resolution level from the image at the current resolution level.
The upSampler is a chain of operations used to derive the image at the next higher resolution level from the image at the current resolution level.
The differencer is a chain of operations used to find the difference between an image at a particular resolution level and the image obtained by first down sampling that image then up sampling the result image of the down sampling operations.
The combiner is a chain of operations used to combine the resulting image of the up sampling operations and the different image saved to retrieve an image at a higher resolution level.
* ImagePyramid(RenderedImage image, RenderedOp downsampler, RenderedOp upSampler, RenderedOp differencer, RenderedOp combiner)
constructs an ImagePyramid object. The parameters point to the last operation in each chain. The first operation in each chain must not have any source images specified; that is, its number of sources must be 0.
* ImagePyramid(RenderedOp downSampler, RenderedOp upSampler, RenderedOp differencer, RenderedOp combiner)
constructs an ImagePyramid object.
* public RenderedImage getImage(int level)
returns the image at the specified resolution level.
* public RenderedImage getDownImage()
returns the image at the next lower resolution level, obtained by applying the downSampler on the image at the current resolution level.
* public RenderedImage getUpImage()
returns the image at the previous higher resolution level.
* public RenderedImage getDiffImage()
returns the difference image between the current image and the image obtained by first down sampling the current image then up sampling the result image of down sampling.
Tuesday, 24 July 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment