Thesignature IMAGE

structure Image : IMAGE

type'a image='a Array2.array

valimage:int*int*'a->'a image

valfromList:'a list list->'a image

valtoList:'a image->'a list list

valtabulate:int*int*(int*int->'a)->'a image

valtabulateFilter:int*int*(int*int->'a)->'a image

valsub:'a image*int*int->'a

valnRows:'a image->int

valnCols:'a image->int

valrow:'a image*int->'a vector

valcolumn:'a image*int->'a vector

valmapi:(int*int*'a->'b)->'a image->'b image

valmap:('a->'b)->'a image->'b image

valfoldi:(int * int * 'a*'b->'b)->'b->'a image->'b

valfold:('a*'b->'b)->'b->'a image->'b

valcrop:('a image*int*int*int*int)->'a image

valpad:'a->('a image*int*int)->'a image

valbinop:('a*'b->'c)->'a image*'b image->'c image

valtranspose:'a image->'a image

valflip:'a image->'a image

valflop:'a image->'a image

valrotateCW:'a image->'a image

valrotateCCW:'a image->'a image

valdownSampleRows:'a image->'a image

valdownSampleCols:'a image->'a image

valdownSample:'a image->'a image

valupSampleRows:'a->'a image->'a image

valupSampleCols:'a->'a image->'a image

valupSample:'a->'a image->'a image

valleftToRight:'a image list->'a image

valtopToBottom:'a image list->'a image

structureGrey:IMAGE_GREY

structureColor:IMAGE_COLOR

structureComplex:IMAGE_COMPLEX

**type**'a image**=**'a Array2.array- The polymorphic image type, implemented as an Array2.array.
**val**image**:***rows*int******columns*int******value*'a**->**'a image- Construct an image with the specified number of
*rows*and*columns*with all pixels assigned*value*. **val**fromList**:**'a list list**->**'a image- Construct an image from a list. Each "inner" list is interpreted as one row of the resultant image. For example, given the list
`[[1.0,2.0],[3.0,4.0]]`this function will construct an image whose first row contains`1.0`and`2.0`and whose second rows contains`3.0`and`4.0`. **val**toList**:**'a image**->**'a list list- Construct a list of lists from an image, where each "inner" list is a row of the input image.
**val**tabulate**:***rows*int******columns*int******f*(int*****int**->**'a)**->**'a image- Construct an image with the specified number of
*rows*and*columns*with the pixel at*(i,j)*assigned the value returned by applying*f*to*(i,j)*. The function is applied in row-major order (Array2.RowMajor). **val**tabulateFilter**:***rows*int******columns*int******f*(int*****int**->**'a)**->**'a image- Similar to
`tabulate`, except that to match the periodicity of the 2D discrete Fourier spectrum, the value of the pixel at location*(i, j)*is computed by applying*f*to*x*and*y*, where*x*equals*i*if*i*is less than*m/2*and*i - m*otherwise, and*y*equals*j*if*j*is less than*n/2*and*j - n*otherwise. For example, the value at location (0, 0) is the result of applying*f*to 0 and 0, the value at (*m*-1,*n*-1) is the result of applying*f*to -1 and -1. **val**sub**:**'a image******i*int******j*int**->**'a- Return the value of the pixel at
*(i,j)*. **val**nRows**:**'a image**->**int- Return the number of rows in an image.
**val**nCols**:**'a image**->**int- Return the number of columns in an image.
**val**row**:**'a image******n*int**->**'a vector- Return the
*n*^{th}row of an image. **val**column**:**'a image******n*int**->**'a vector- Return the
*n*^{th}column of an image. **val**mapi**:***f*(int*****int*****'a**->**'b)**->**'a image**->**'b image**val**map**:***f*('a**->**'b)**->**'a image**->**'b image- Map the function
*f*to an image in row-major order (Array2.RowMajor). The function`(map f)`is equivalent to`(mapi (fn (_,_,x) => f x))`. **val**foldi**:**(int * int * 'a*****'b**->**'b)**->**'b**->**'a image**->**'b**val**fold**:**('a*****'b**->**'b)**->**'b**->**'a image**->**'b- Fold across an image. This is always implemented row-major order (Array2.RowMajor). The function
`(fold f)`is equivalent to`(foldi (fn (_,_,a,b) => f (a,b)))`. **val**crop**:**('a image******i0*int******j0*int******n*int******m*int)**->**'a image- Return an image with
*m*rows and*n*columns, cropped from the input image starting at (*i0*,*j0*). **val**pad**:***zero*'a**->**(*img*'a image******m*int******n*int)**->**'a image- Returns an image with
*m*rows and*n*columns, where the value at*(i,j)*is the same as*img*at*(i,j)*if*i*is less than the number of rows in*img*and*j*is less than the number of columns in*img*, and*zero*otherwise. **val**binop**:**('a*****'b**->**'c)**->**'a image*****'b image**->**'c image- Construct an image by pixel-wise applying a binary operator to two images.
**val**transpose**:**'a image**->**'a image- Transpose an image as if it were a matrix.
**val**flip**:**'a image**->**'a image- Flip an image vertically.
**val**flop**:**'a image**->**'a image- Flip an image horizontally.
**val**rotateCW**:**'a image**->**'a image- Rotate an image 90 degrees clockwise.
**val**rotateCCW**:**'a image**->**'a image- Rotate an image 90 degrees counter-clockwise.
**val**downSampleRows**:**'a image**->**'a image- Discard even rows of an image.
**val**downSampleCols**:**'a image**->**'a image- Discard even rows of an image.
**val**downSample**:**'a image**->**'a image- Discard even rows and columns of an image.
**val**upSampleRows**:***zero*'a**->**'a image**->**'a image- Construct an image with twice as many rows, where the pixel at (
*i*2,j)*is the value of the input image at*(i,j)*, and all other pixels are*zero*. **val**upSampleCols**:***zero*'a**->**'a image**->**'a image- Construct an image with twice as many columns, where the pixel at (
*i,j*2)*is the value of the input image at*(i,j)*, and all other pixels are*zero*. **val**upSample**:***zero*'a**->**'a image**->**'a image- Construct an image with twice as many rows and columns, where the pixel at (
*i*2,j*2)*is the value of the input image at*(i,j)*, and all other pixels are*zero*. **val**leftToRight**:**'a image list**->**'a image- Concatenate images from left to right.
**val**topToBottom**:**'a image list**->**'a image- Concatenate images from top to bottom.

Last modified: Tue Feb 14 11:48:00 Mountain Standard Time 2006