Image Class Function Manual (M-O)

MAKELEFT

| HOME | BACK |

Purpose

To make a left stereo-mate of an image.  Every pixel in the original image, the calling image, is shift to the right hand side, on the same row with an amount proportional to its elevation difference to a based elevation, specified by the user.  Pixels in the new image where no value was assigned will be filled up by the nearest neighbor method.

The left stereo-mate, and the right stereo-mate generated by function "makeright", are supposed to use for 3D stereoscopic viewing.  They can be printed out as a hardcopies and be viewed under a stereoscope, or can be used in function "anaglyph" to generate an anaglyph image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{Image_uch} ret  =  object.MAKELEFT({Image_flt} argm1, [{double} argm2, {double} argm3])

argm1 = DEM image

argm2 = height difference interval for an amount of 1 pixel shift

        (default = (Elev max - Elev min) / 4 percents of no of columns)

argm3 = based elevayion

        (default = minimum elevation in the DEM)

Example:

->Img_left = Img.makeleft(DEM)

->

See also (class function)

makeright, anaglyph

| HOME | BACK |


MAKERIGHT

| HOME | BACK |

Purpose

To make a right stereo-mate of an image.  Every pixel in the original image, the calling image, is shift to the left hand side, on the same row with an amount proportional to its elevation difference to a based elevation, specified by the user.  Pixels in the new image where no value was assigned will be filled up by the nearest neighbor method.

The right stereo-mate, and the left stereo-mate generated by function "makeleft", are supposed to use for 3D stereoscopic viewing.  They can be printed out as a hardcopies and be viewed under a stereoscope, or can be used in function "anaglyph" to generate an anaglyph image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{Image_uch} ret  =  object.MAKERIGHT({Image_flt} argm1, [{double} argm2, {double} argm3])

argm1 = DEM image

argm2 = height difference interval for an amount of 1 pixel shift

        (default = (Elev max - Elev min) / 4 percents of no of columns)

argm3 = based elevayion

        (default = minimum elevation in the DEM)

Example:

->Img_left = Img.makeright(DEM)

->

See also (class function)

makeleft, anaglyph

| HOME | BACK |


MATRIX

| HOME | BACK |

Purpose

To return a matrix object of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

For class Image

{Matrix} ret  =  object.MATRIX()

For class Image_flt

{Matrix_flt} ret  =  object.MATRIX()

For class Image_int

{Matrix_int} ret  =  object.MATRIX()

For class Image_sht

{Matrix_sht} ret  =  object.MATRIX()

For class Image_uch

{Matrix_uch} ret  =  object.MATRIX()

For class Image_bln

{Matrix_bln} ret  =  object.MATRIX()

Example:

->A = Img.matrix()

->

See also (class function)

 

| HOME | BACK |


MAX

| HOME | BACK |

Purpose

To determine the maximum value of all elements of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

For class Image

{double} ret  =  object.MAX()

For class Image_flt

{float} ret  =  object.MAX()

For class Image_int

{int} ret  =  object.MAX()

For class Image_sht

{short} ret  =  object.MAX()

For class Image_uch

{uchar} ret  =  object.MAX()

For class Image_bln

{bool} ret  =  object.MAX()

Example:

->x = Img.max()

->

See also (class function)

min, mean, sd

| HOME | BACK |


MEAN

| HOME | BACK |

Purpose

To determine a mean, an average, value of all elements of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{double} ret  =  object.MEAN()

Example:

->x = Img.mean()

->

See also (class function)

max, min, sd

| HOME | BACK |


MEDIAN

| HOME | BACK |

Purpose

To determine a median, a value at the center position when all elements are sorted, of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

For class Image

{double} ret  =  object.MEDIAN()

For class Image_flt

{float} ret  =  object.MEDIAN()

For class Image_int

{int} ret  =  object.MEDIAN()

For class Image_sht

{short} ret  =  object.MEDIAN()

For class Image_uch

{uchar} ret  =  object.MEDIAN()

For class Image_bln

{bool} ret  =  object.MEDIAN()

Example:

->x = Img.median()

->

See also (class function)

max, min, mean, sd

| HOME | BACK |


MIN

| HOME | BACK |

Purpose

To determine the minimum value of all elements of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

For class Image

{double} ret  =  object.MIN()

For class Image_flt

{float} ret  =  object.MIN()

For class Image_int

{int} ret  =  object.MIN()

For class Image_sht

{short} ret  =  object.MIN()

For class Image_uch

{uchar} ret  =  object.MIN()

For class Image_bln

{bool} ret  =  object.MIN()

Example:

->x = Img.min()

->

See also (class function)

max, mean, sd

| HOME | BACK |


MOSAIC

| HOME | BACK |

Purpose

To create a mosaic consisting of several images overlaid on top of each other.  All images must be in the same map projection, and are stored in files as Noobeed format, i.e. each image has one documentation file and one data file.  The last argument in the function indicates whether feathering is performed.  If not, all images are simply spatially overlaid on top of each other.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{void} object.MOSAIC({double} argm1, {VecStr} argm2, [{int} argm3])

argm1 = resolution of the mosaic image

argm2 = vector of strings, containing all image file names

argm3 = an option flag (0 = no feathering; 1 = do feathering) 

        (default = 0)       

Example:

->Img_big = Image()

->Img_big.mosaic(20, vec_img_name, 1)

->

See also (class function)

feather, overlay

| HOME | BACK |


NCOL

| HOME | BACK |

Purpose

To report the number of columns of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{int} ret  =  object.NCOL()

Example:

->n = A.ncol()

->

See also (class function)

nrow

| HOME | BACK |


NEAREST

| HOME | BACK |

Purpose

To get a value at a particular x y coordinate, using nearest neighbor method.

If the coordinate is outside the region of the image, the function will return the current value of null data of the image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

For class Image

{double} ret  =  object.NEAREST({double} argm1, {double} argm2)

For class Image_flt

{float} ret  =  object.NEAREST({double} argm1, {double} argm2)

For class Image_int

{int} ret  =  object.NEAREST({double} argm1, {double} argm2)

For class Image_sht

{short} ret  =  object.NEAREST({double} argm1, {double} argm2)

For class Image_uch

{uchar} ret  =  object.NEAREST({double} argm1, {double} argm2)

For class Image_bln

{bool} ret  =  object.NEAREST({double} argm1, {double} argm2)

argm1 = x coordinate

argm2 = y coordinate

Example:

->val = Img.nearest(12.544, 22.986)

->

See also (class function)

bilinear, bicubic

| HOME | BACK |


NROW

| HOME | BACK |

Purpose

To report the number of rows of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{int} ret  =  object.NROW()

Example:

->n = A.nrow()

->

See also (class function)

ncol

| HOME | BACK |


NULLDATA

| HOME | BACK |

Purpose

To report the current value of null data of an Image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

{double} ret  =  object.NULLDATA()

Example:

->n = A.nulldata()

->

See also (class function)

flag_null

| HOME | BACK |


OVERLAP

| HOME | BACK |

Purpose

To extract a portion of the original image, the calling image, in an area defined by an overlap area of the original image and another image.  This function does not do any interpolation, or resample, it just simply windows out the overlap portion of the original image.

If flag_null of the second image is set, the result image will be checked again whether any pixels fall in null data region of the second image, using a nearest neighbor method.  If so, its value will be reset to null data of the first image.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

For class Image

{Image} ret  =  object.OVERLAP({Image} argm1)

For class Image_flt

{Image_flt} ret  =  object.OVERLAP({Image_flt} argm1)

For class Image_int

{Image_int} ret  =  object.OVERLAP({Image_int} argm1)

For class Image_sht

{Image_sht} ret  =  object.OVERLAP({Image_sht} argm1)

For class Image_uch

{Image_uch} ret  =  object.OVERLAP({Image_uch} argm1)

For class Image_bln

{Image_bln} ret  =  object.OVERLAP({Image_bln} argm1)

argm1 = The overlapping image

Example:

->Img_1_cut = Img_1.overlap(Img_2)

->

See also (class function)

overlay, intersect

| HOME | BACK |


OVERLAY

| HOME | BACK |

Purpose

To reassign new values of the original image, the calling image, according to values of an overlay image. 

The result image will have the same size as the original one, however, its pixel values will get updated to a new value, from the second image, if they also spatially lie within the area coverage of the second image.

There will be no resample if the two images are exactly the same size.

Class

Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln

Usage

For class Image

{Image} ret  =  object.OVERLAY({Image} argm1, [{String} argm2])

For class Image_flt

{Image_flt} ret  =  object.OVERLAY({Image_flt} argm1, [{String} argm2])

For class Image_int

{Image_int} ret  =  object.OVERLAY({Image_int} argm1, [{String} argm2])

For class Image_sht

{Image_sht} ret  =  object.OVERLAY({Image_sht} argm1, [{String} argm2])

For class Image_uch

{Image_uch} ret  =  object.OVERLAY({Image_uch} argm1, [{String} argm2])

For class Image_bln

{Image_bln} ret  =  object.OVERLAY({Image_bln} argm1, [{String} argm2])

argm1 = The overlaying image

argm2 = interpolation method, must be "nearest" or "bilinear", or "bicubic".

        (default = "nearest")

Example:

->Img_1_update = Img_1.overlay(Img_2, "bilinear")

->

See also (class function)

overlap, intersect

| HOME | BACK |