A class implementing the "Pyramid" operation on a
RenderedImage . Given a RenderedImage
which represents the image at the highest resolution level,
the images at lower resolution levels may be derived by
performing a specific chain of operations to downsample the
image at the higher resolution level repeatedly. Similarly,
once an image at a lower resolution level is obtained, the images
at higher resolution levels may be retrieved by performing a
specific chain of operations to upsample the image at the lower
resolution level repeatedly.
When an image is downsampled, the image at the higher resolution
level is lost. However, the difference image between the original image
and the image obtained by up sampling the downsampled result image is
saved. This difference image, combined with the up sampling operations
is used to retrieve the image at a higher resolution level from the
image at a lower resolution level.
This is a bi-directional operation. A user may request an image
at any resolution level greater than or equal to the highest
resolution level, which is defined as level 0.
The downSampler is a chain of operations that is
used to derive the image at the next lower resolution level from
the image at the current resolution level. That is, given an image
at resolution level i , downSampler is
used to obtain the image at resolution level i+1 .
The chain may contain one or more operation nodes; however, each
node must be a RenderedOp . The parameter points to the
last node in the chain. The very first node in the chain must be
a RenderedOp that takes one RenderedImage
as its source. All other nodes may have multiple sources. When
traversing back up the chain, if a node has more than one source,
the first source, source0 , is used to move up the
chain. This parameter is saved by reference.
The upSampler is a chain of operations that is
used to derive the image at the next higher resolution level from
the image at the current resolution level. That is, given an image
at resolution level i , upSampler is
used to obtain the image at resolution level i-1 .
The requirement for this parameter is identical to that of the
downSampler parameter.
The differencer is a chain of operations that is 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 chain may contain one or more operation nodes; however, each
node must be a RenderedOp . The parameter points to the
last node in the chain. The very first node in the chain must be
a RenderedOp that takes two RenderedImage s
as its sources. When traversing back up the chain, if a node has
more than one source, the first source, source0 , is
used to move up the chain. This parameter is saved by reference.
The combiner is a chain of operations that is
used to combine the result image of the up sampling operations
and the difference image saved to retrieve an image at a higher
resolution level. The requirement for this parameter is identical
to that of the differencer parameter.
Reference:
"The Laplacian Pyramid as a Compact Image Code"
Peter J. Burt and Edward H. Adelson
IEEE Transactions on Communications, Vol. COM-31, No. 4, April 1983
See Also: ImageMIPMap |