IceMan Reference Guide


list BoundingBox(pixel)
pixel: Threshold (ice.Image).

Find the bounding box of all pixels that are greater than the specified threshold.

Note: It makes no sense for the threshold to be anything but a card

The list returned has four elements that are; (origin x, origin y, size x, size y)

ice.Image Mean(box)
box: Mean computed over this region (list).

Computes the average value of each channel over a specified rectangular region. An image is returned, but it is always 1x1, the single pixel representing the mean.

list Histogram(nBins, range)
nBins: Number of bins in histogram (int).
range: Range of values to bin (list).

Returns an List of histograms, one for each channel. Each histogram is a List

Note: For efficiency reasons, Fractional (8-bit) images always return histograms with 256 bins.

ice.Image Range(computeBox, interval)
computeBox: Region over which range is computed (list).
interval: Minimum and maximum pixel value to consider (list).

Computes the range of each channel in the image. Values outside of the interval have no effect on the result. The result is an image with two pixels: the first at (0,0) contains minimum values for each channel, and the second at (1,0) the maximum values. The result image has the same ply as the input image. You can pass this range image directly to the Normalize operator

Note: This operation is not lazy-evaluated: if called on an existing expression, it will trigger evaluation.

infinite = [float('inf'), float('inf')]
rangeImg = image.Range(image.DataBox(), infinite)

# rangeImage is a two pixel image of the same ply as the input
min = rangeImg.GetPixelVal(0,0)[0]
max = rangeImg.GetPixelVal(1,0)[0]
print "MIN: %f MAX: %f" % (min, max)
ice.Image GetPixel(x, y, filterType = PointSample)
x: x coordinate from which pixel value is to be retrieved (int).
y: y coordinate from which pixel value is to be retrieved (int).
filterType: filter to use (int). Defaults to point sample. Can be one of:

  • ice.constants.FILTER_BILINEAR
  • ice.constants.FILTER_BSPLINE
  • ice.constants.FILTER_CATROM
  • ice.constants.FILTER_LANCZOS
  • ice.constants.FILTER_POINTSAMPLE

The returned image is a card.

list GetPixelVal(x, y)
x: x coordinate from which pixel value is to be retrieved (int).
y: y coordinate from which pixel value is to be retrieved (int).

The pixel value is returned as an List of component values.