The IceMan Imaging Model |
Images in IceMan exist conceptually in an infinite two-dimensional plane specified by integer coordinates. Conforming to standard computer and image-processing convention, x increases from left to right, and y from top to bottom.
Images can be combined in various ways and numbers to give rise to new images, which occupy some part of the 2D image plane determined by rules of composition to be defined later in this document.
Internally, operations may be performed with non-integral coordinates: however, the result is always an image occupying a rectangle specified in integer coordinates. Thus a half-pixel move to the right results in an image which is offset correctly by half a pixel from the original image, but the boundaries of the image still lie on the integer grid.
Each image maintains two rectangles, or boxes, that specify its position in the 2D plane. The data box is the region for which there is real allocated memory, and which can be both read from and written to. The request box is typically larger than the data box, and specifies the rectangular region from which data can be read. For example, images by default have a request box of infinite extent, and reading data from anywhere outside the image always results in a constant (zero) value for all channels.
Points and boxes are stored as the type List in the script language. Images have the type of IceImage.
Type
|
Size (bytes)
|
Range
|
Use
|
Fractional
|
1
|
0-1
|
Speed
|
FixedPoint
|
2
|
-8.0 - 7.9997
|
Speed/precision
|
Float
|
4
|
*
|
Precision/speed
|
Double
|
8
|
*
|
High precision
|
*The floating point types have very large machine dependent ranges and are stored as IEEE float and double respectiveyl
Image pixel types are not directly visible to the scripting interface. Images of various types can be created using the pre-defined enumerated types in the table above, but the few functions that access pixel values directly pass them as Lists of Numbers
The Image object offers a large number of image processing methods, each of which takes zero to three Image instances as input and returns another Image instance. With very few exceptions, methods do not modify the image they are operating on; instead they create and return a new instance.
Internally, image data is stored in uniformly sized tiles. This storage format is not exposed to the script programmer. In general, the internal data never needs to be accessed directly.
Cards are, for the most part, indistinguishable from images but have a special creation function.
Operations on Images have certain semantics that are outlined in this section.
The region of an image outside the data box but within the request box is called the abyss. Many possible surround behaviors are conceivable:
Only the first two types of surround behavior (card and image surround) are currently supported by IceMan, though the internals are capable of being extended to support the other behaviors.
By default, images have Card surround with infinite extent, and the card contains all zeros.
Another notion in IceMan that is useful to keep in mind is that each operator produces an output image that is large enough to contain all the pixels that "matter". A blur operation, for example, produces an output image larger than the input by the width of the filter kernel.
Pixar Animation Studios
|