SPOT Class Function Manual (A-S)

(  )

| HOME | BACK |

Purpose

To get a value of an element at a particular index, row and column number, in a SPOT image.

Class

SPOT

Usage

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

argm1 = row number

argm2 = column number

Example:

->a = matrix_uch(200,300)
->a.rand(255)
->a.savetif("temp")
->ph1 = SPOT()
->ph1.loadtif("temp")


  Tif Image format Type II(little-endian) confirm
  no of entry in this block : 9
  no of entry read : 9
  no of row : 100
  no of column : 100
  no of bit per sample : 8
  Compression : no
  Image type : gray level
  Reading done...


  Tif data read

->print ph1(0,0)
            170

See also (class function)

 

| HOME | BACK |


ARRLEN

| HOME | BACK |

Purpose

To get a value of length of linear array sensor of the SPOT image.  The initial value set by Noobeed is 78 milimeters.

Class

SPOT

Usage

{double} ret  =  object.ARRLEN()

Example:

->a = spot()
->print a.arrlen()


        78.00000
->

See also (class function)

arrtime

| HOME | BACK |


ARRTIME

| HOME | BACK |

Purpose

To get a value of total image capturing time of the SPOT image.  This value is linearly proportional to the number of rows of the image.  The initial value set by Noobeed is 9 seconds.  This value is for SPOT image, assuming that the initialized image is a whole scene image (i.e. 6000 rows for panchromatic).

Class

SPOT

Usage

{double} ret  =  object.ARRLEN()

Example:

->a = spot()
->print a.arrtime()


       9.00000
->

See also (class function)

arrlen

| HOME | BACK |


BICUBIC

| HOME | BACK |

Purpose

To get a value at a particular x y image rectangular coordinate, using bi-cubic interpolation.  Please see section "Linear Array Coordinate System" under understanding  coordinate system.

Class

SPOT

Usage

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

argm1 = x image rectangular coordinate

argm2 = y image rectangular coordinate

Example:

->val = sp1.bicubic(12.544, 22.986)

->

See also (class function)

nearest, bilinear

| HOME | BACK |


BILINEAR

| HOME | BACK |

Purpose

To get a value at a particular x y photo coordinate, using bi-linear interpolation.  Please see section "Linear Array Coordinate System" under understanding  coordinate system.

Class

SPOT

Usage

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

argm1 = x image rectangular coordinate

argm2 = y image rectangular coordinate

Example:

->val = sp1.bilinear(12.544, 22.986)

->

See also (class function)

nearest, bicubic

| HOME | BACK |


CLOSE

| HOME | BACK |

Purpose

To close a virtually loaded SPOT object.  This function is irrelevant to a normal loaded object.

Class

SPOT

Usage

{void} object.CLOSE()

Example:

->sp1 = SPOT()

->sp1.vload("scene_1")

->sp1.close()

See also (class function)

vload, load, save

| HOME | BACK |


EO

| HOME | BACK |

Purpose

To perform Exterior Orientation (EO) using bundle adjustment.  The function requires at least 6 ground control points, with x y z coordinate.  The input measure coordinates on the photograph can be either row and column numbers, or x y image rectangular coordinates.  See details in Understanding Coordinate System.

IThere is no need to perform Interior Orientation (IO) prior to EO, since the relationship between array size and the row and column indices is known and defined as part of the member data of SPOT.

There is an ASCII text file automatically generated after the EO is done.  Also a matrix containing EOP and all related information are return to the user.  This matrix is is actually where the information in the report is from.  By comparing the returning matrix to the report, the user can easily figure out what output information is represented by which part of the matrix.

The computation of this function does not involve image data, therefore, it is possible to load the photo in virtual mode, using function "vload". 

Class

SPOT

Usage

{Matrix} ret  =  object.EO({VecIdPt2D} argm1, {VecIdPt3D} argm2, [{String} argm3, {int} argm4])

argm1 = list of coordinates with ID, measured on SPOT image

argm2 = list of ground control coordinates with ID

argm3 = output file name for the report    (default = "RPT_EO.txt")

argm4 = type of measuring coordinates on the photo,

        must be 0(row and column), or 1(image rectangular coordinate)

       (default = 0 (row and column number))

 

Example:

->Mtmp = sh1.EO(vec_1, vec_2, "my_EO_report", 0)

->

See also (class function)

 

| HOME | BACK |


EO_PARA

| HOME | BACK |

Purpose

To report the current Exterior Orientation Parameters of the SPOT.  The result is a vector of 12 double precision values, namely omega, phe, kappa, Xo, Yo, Zo, dt_omega, dt_phe, dt_kappa, dt_Xo, dt_Yo, dt_Zo.  All angles have a unit of degree.  The last 6 parameters are change per unit of time, or speed, of the previous 6 parameters .

Class

SPOT

Usage

{Vector} ret  =  object.EO_PARA()

Example:

->vec_para = sh1.eo_para()

->

See also (class function)

 

| HOME | BACK |


FOCAL

| HOME | BACK |

Purpose

To report the current setting value of the focal length.

Class

SPOT

Usage

{double} ret  =  object.FOCAL()

Example:

->c = sp1.focal()

->
 

See also (class function)

arralen, arrtime, xp

| HOME | BACK |


GCP2RC

| HOME | BACK |

Purpose

To convert from a ground control coordinate, x y z, to row and column number.

Class

SPOT

Usage

{Indx} ret  =  object.GCP2RC({double} argm1, {double} argm2, {double} argm3)

argm1 = x ground control coordinate

argm2 = y ground control coordinate

argm3 = z ground control coordinate

Example:

->ind = ph1.gcp2rc(600, 700, 100)

->

See also (class function)

gcp2xpyt

| HOME | BACK |


GCP2XPYT

| HOME | BACK |

Purpose

To convert from a ground control coordinate, x y z, to x y photo / time coordinate..

Class

SPOT

Usage

{Pt2D} ret  =  object.GCP2RC({double} argm1, {double} argm2, {double} argm3)

argm1 = x ground control coordinate

argm2 = y ground control coordinate

argm3 = z ground control coordinate

Example:

->pt = sh1.gcp2rc(600, 700, 100)

->

See also (class function)

xpyt2gcp

| HOME | BACK |


GOGET

| HOME | BACK |

Purpose

To get a value of an element at a particular index in a matrix of a SPOT image object.  The SPOT object must be virtually loaded, by using a function "vload". 

Function "vload" does not really load data into memory, therefore, this function simply go to the required position and read data directly from the file.

Class

SPOT

Usage

{uchar} ret  =  object.GOGET({int} argm1, {int} argm2)

argm1 = row number

argm2 = column number

Example:

->a = psh1.goget(20,360)

->

See also (class function)

goset, gosetmat

| HOME | BACK |


GOSET

| HOME | BACK |

Purpose

To set a value of an element at a particular index in a Matrix of a SPOT image object.  The SPOT object must be virtually loaded, by using a function "vload". 

Function "vload" does not really load data into memory, therefore, this function simply go to the required position and write data directly to the file.

Class

SPOT

Usage

{void} object.GOSET({int} argm1, {int} argm2, {uchar} argm3)

argm1 = row number

argm2 = column number

argm3 = a new value set at the particular index

Example:

->sp1.goset(20,360, 99)

->

See also (class function)

goget, gosetmat

| HOME | BACK |


GOSETMAT

| HOME | BACK |

Purpose

To set new values of elements in a particular portion in a Matrix of a SPOT image object.  An index at which the upper left corner of the sub-matrix to be placed is specified by the user.  The SPOT object must be virtually loaded, by using a function "vload". 

Function "vload" does not really load data into memory, therefore, this function simply go to the required positions and write data directly to the file.

Class

SPOT

Usage

{void} object.GOSET({int} argm1, {int} argm2, {Matrix_uch} argm3)

argm1 = row number of a point at which the upper left window is located

argm2 = column number of a point at which the upper left window is located

argm3 = a matrix whose values is to be copied onto the calling photo's matrix

Example:

->sp1.vload("scene_1")

SPOT virtually loaded...

->b = [10 20; 30 40]

->sp1.gosetmat(1,1,b)

->

See also (class function)

goget, goset

| HOME | BACK |


ID

| HOME | BACK |

Purpose

To report an ID of the SPOT object.

Class

SPOT

Usage

{int} ret  =  object.ID()

Example:

->id = sp1.id()

->

See also (class function)

 

| HOME | BACK |


INIT

| HOME | BACK |

Purpose

To initialize a SPOT object.

Class

SPOT

Usage

{void} object.INIT({int} argm1, {int} argm2)

argm1 = no of rows

argm2 = no of columns

Example:

->sp1.init(3000,3000)

->

See also (class function)

 

| HOME | BACK |


IS_COVER

| HOME | BACK |

Purpose

To determine whether a point is covered by a SPOT image.

Class

SPOT

Usage

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

argm1 = x image rectangular coordinate of a point being determined

argm2 = y image rectangular coordinate of a point being determined

Example:

->b1 = sp1.is_cover(15.012, 20.256)

->

See also (class function)

 

| HOME | BACK |


LOAD

| HOME | BACK |

Purpose

To load a SPOT image object saved as Noobeed format.  There are 2 files needed.  One is for the documentation, and it is an ASCII file.  The other is a binary file containing data of the image. 

If file name extension is omitted, the function will add default extension to the file.   The default extension of the documentation file is ".txt" and that of the data file is ".raw".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

The detail structure of the documentation file is described in function "save".

Class

SPOT

Usage

{void} object.LOAD({String} argm1, [{String} argm2])

argm1 = file name for the documentation file (default extension is ".txt")

argm2 = file name for the data file  

        (default file name is same file name as argm1 with an extension ".raw")

Example:

->A = SPOT()

->A.load("my_spot")

->

See also (class function)

loadtif, loadbmp

| HOME | BACK |


LOADBMP

| HOME | BACK |

Purpose

To load data from a bitmap (BMP) file  and stored in a SPOT object.

If file name extension is omitted, the function will add default extensions to the files.  The default extension of a bitmap file is ".bmp".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

This function requires that the data is of 8-bit and with no compression.

Class

SPOT

Usage

{void} object.LOADBMP({String} argm1)

argm1 = file name for the bitmap file (default extension is ".bmp")

Example:

->A = SPOT()

->A.loadbmp("my_bmp")

->

See also (class function)

loadtif, load

| HOME | BACK |


LOADTIF

| HOME | BACK |

Purpose

To load data from a Tag Image File (TIF) file  and stored in a SPOT object.

If file name extension is omitted, the function will add default extensions to the files.  The default extension of a bitmap file is ".tif".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

This function requires that the data is of 8-bit gray scale image and with no compression.

Class

SPOT

Usage

{void} object.LOADTIF({String} argm1)

argm1 = file name for the TIF file (default extension is ".tif")

Example:

->A = SPOT()

->A.loadbmp("my_tif")

->

See also (class function)

load, loadbmp

| HOME | BACK |


MATRIX

| HOME | BACK |

Purpose

To return a Matrix_uch object, which is one of the member data of the SPOT object.

Class

SPOT

Usage

{double} ret  =  object.MATRIX()

Example:

->MAT = sp1.matrix()

->

See also (class function)

min, mean, sd

| HOME | BACK |


MAX

| HOME | BACK |

Purpose

To determine the maximum value of all elements of a SPOT object.

Class

SPOT

Usage

{double} ret  =  object.MAX()

Example:

->x = sp1.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 a SPOT object.

Class

SPOT

Usage

{double} ret  =  object.MEAN()

Example:

->x = sp1.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 a SPOT object.

Class

SPOT

Usage

{double} ret  =  object.MEDIAN()

Example:

->x = sp1.median()

->

See also (class function)

max, min, mean, sd

| HOME | BACK |


MIN

| HOME | BACK |

Purpose

To determine the minimum value of all elements of a SPOT object.

Class

SPOT

Usage

{double} ret  =  object.MIN()

Example:

->x = sp1.min()

->

See also (class function)

max, mean, sd

| HOME | BACK |


NAME

| HOME | BACK |

Purpose

To return the name of the SPOT object.

Class

SPOT

Usage

{String} ret  =  object.NAME()

Example:

->sp1_name = sp1.name()

->

See also (class function)

id

| HOME | BACK |


NCOL

| HOME | BACK |

Purpose

To report the number of columns of a SPOT object.

Class

SPOT

Usage

{int} ret  =  object.NCOL()

Example:

->n = sp1.ncol()

->

See also (class function)

nrow

| HOME | BACK |


NEAREST

| HOME | BACK |

Purpose

To get a value at a particular x y photo coordinate, using nearest neighbor method.  Please see section "Linear Array Coordinate System" under understanding  coordinate system.

Class

SPOT

Usage

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

argm1 = x image rectangular coordinate

argm2 = y image rectangular coordinate

Example:

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

->

See also (class function)

bilinear, bicubic

| HOME | BACK |


NROW

| HOME | BACK |

Purpose

To report the number of rows of a SPOT object.

Class

SPOT

Usage

{int} ret  =  object.NROW()

Example:

->n = sp1.nrow()

->

See also (class function)

ncol

| HOME | BACK |


ORTHO

| HOME | BACK |

Purpose

To create an ortho-rectified image using rigorous collinearity transformation and a Digital Elevation Model (DEM).  The Exterior Orientation of the SPOT image is assumed  to be known, or have been determined in the previous stage.  The coordinate system on which the EOP is based must be the same system of DEM.  Hence the final ortho-photo map is also in the same coordinate system as that of DEM and EOP.

This function determines an area coverage of the final ortho-photo automatically.  It is the largest area possible that the projected ortho-photo can be created using the given DEM.  Hence, if the area coverage of DEM is smaller than the ortho-projected area, the coverage of the final result image will be controlled by the area coverage of DEM.  On the other hand, if the area coverage of DEM is too big, the final result image will have an area coverage of the largest possible otho-projected area from the photo.

The result image is an Image_uch object, where spatial information is correctly attached to the image.  Hence, its x y image rectangular coordinate is equivalent to ground coordinate.  The boundary of the result ortho-rectified image is determined automatically, using the specified resolution given by the user.  If an image is to be ortho-rectified onto a pre-defined blank image, the function "ortho2img" must be used instead.  In this case the user has a full control over the area coverage of the final result image.

Class

SPOT

Usage

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

argm1 = resolution of the ortho-rectified image (in ground unit)

argm2 = DEM image

argm3 = resample method, must be "nearest" or "bilinear" or "bicubic"

        (default = "nearest")

Example:

->Img_ortho = sp1.ortho(10.0, Img_dem, "bicubic")

->

See also (class function)

ortho2img

| HOME | BACK |


ORTHO2IMG

| HOME | BACK |

Purpose

To create an ortho-rectified image using rigorous collinearity transformation and a Digital Elevation Model (DEM).  The result image will have the same size and resolution as the template image specified in one of the function arguments.

The function is similar to function "ortho", except that it will create a new image, by using information from the image in the first argument, to store the ortho-rectified image. 

This function can be used to fully control the size and resolution of the output ortho-rectified image.  Hence the target result image can be generated before hand according to a certain specification, for example resolution, coordinates of lower left and upper right corner.  Then it will be input as one of the argument in the function.  The result ortho-rectified image will have exactly the same geometry as the pre-defined image.

All other detail explanations are same as that of function "ortho" and can be seen in function "ortho". 

Class

SPOT

Usage

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

argm1 = template image for the result ortho-rectified image

argm2 = DEM image

argm3 = resample method, must be "nearest" or "bilinear" or "bicubic"

        (default = "nearest")

Example:

->Img_ortho = sp1.ortho2img(img_ortho, Img_dem, "bicubic")

->

See also (class function)

ortho

| HOME | BACK |


PPX

| HOME | BACK |

Purpose

To report the current setting value of x- photo coordinate of the principal point.

Class

SPOT

Usage

{double} ret  =  object.PPX()

Example:

->x = sp1.ppx()

->

See also (class function)

focal, arrlen, arrtime

| HOME | BACK |


RC2GCP

| HOME | BACK |

Purpose

To convert from a row and column number of a point on a SPOT image to an x y z ground control coordinate.  Please note that the arguments of the function are of type double, which allows a sub-pixel row and column number as input.

Only row and column number is not enough, since the light ray projected from the image can go for ever.  Thus this function also needs a ground elevation value, to make a plane so that the light ray from the photo can intersect the ground.

Class

SPOT

Usage

{Pt3D} ret  =  object.RC2XY({double} argm1, {double} argm2, {double} argm3)

argm1 = row number         (in pixel unit)

argm2 = column number      (in pixel unit)

argm3 = ground elevation   (in ground coordinate system unit)

Example:

->pt_xyz = sp1.rc2gcp(12.544, 22.986, 600)

->

See also (class function)

gcp2rc, vecgcp2rc, vidgcp2rc

| HOME | BACK |


RC2XPYT

| HOME | BACK |

Purpose

To convert from a row and column number of a point on a photo to an x y photo / time coordinate.    Please see section "Linear Array Coordinate System" under understanding  coordinate system.

Class

SPOT

Usage

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

argm1 = row number         (in pixel unit)

argm2 = column number      (in pixel unit)

Example:

->pt = sp1.rc2xpyp(60, 1025)

->

See also (class function)

xpyt2rc, vecxpyt2rc, vidxpyt2rc

| HOME | BACK |


RC2XY

| HOME | BACK |

Purpose

To convert from a row and column number of a point on a SPOT image to an x y image rectangular coordinate.    Please see section "Linear Array Coordinate System" under understanding  coordinate system.

Class

SPOT

Usage

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

argm1 = row number         (in pixel unit)

argm2 = column number      (in pixel unit)

Example:

->pt = sp1.rc2xy(100,250)

->

See also (class function)

xy2rc

| HOME | BACK |


SAVE

| HOME | BACK |

Purpose

To save as Noobeed format.  The function creates two files, one for documentation and another for data.

The documentation file will have an extension ".txt".  It is actually an ASCII file and must have exactly 9 lines, as below. 

 SPOT

/ Documant file of a SPOT object

/ SPOT image id

0

/ no of row

6000

/ no of column

6000

/ calibrated focal length (mm)

1082.000

/ calibrated principal point x coordinate (origin at the center of the array)

0.000

/ total linear array length (mm)

78.000

/ total integration time (sec)

9.000

/ EO parameters (omega(deg) phe(deg) kappa(deg) Xo Yo Zo

/ dt_omega dt_phe dt_kappa dt_Xo dt_Yo dt_Zo )

 -0.619522270504 7.779753389812 349.415103896922 516116.177 3720874.429 821509.314
+ -0.194762282067117 0.067344070567673 0.002043439633740 2544.084 9264.354 -312.493
 

 

TPlease notice the continuity sign, "+", at the last record of the above documentation file.

The data file is in fact a generic binary file.  First it stores all element of the first row of the matrix of the SPOT image, from the first to the last column, then go to the second row, and does the same thing.  Hence the size of the data file will be exactly equal to total number of elements of the image multiplied by no of bytes per element (1 bytes in this case).

if a file name extension is not given, the function assumes an extension of ".txt" for documentation file and ".raw" for data file.

if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".

Class

SPOT

Usage

{void} object.SAVE({String} argm1, [{String} argm2])

argm1 = documentation file name

argm2 = data file name   (default = same name as argm1 with extension ".raw")

Example:

->sp1.save("my_scene")

->

See also (class function)

load

| HOME | BACK |


SAVEBMP

| HOME | BACK |

Purpose

To save as bitmap (BMP) format. 

if a file name extension is not given, the function assumes an extension of ".bmp".

if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".

Class

SPOT

Usage

{void} object.SAVEBMP({String} argm1)

argm1 = output file name

Example:

->sp1.savebmp("my_bmp")

->

See also (class function)

savetif

| HOME | BACK |


SAVEDOC

| HOME | BACK |

Purpose

To save only information of a SPOT object to a documentation file.  The documentation file will have an extension ".txt".  It is actually an ASCII file and must have exactly 9 lines, see details in function "save".

Class

SPOT

Usage

{void} object.SAVEDOC({String} argm1)

argm1 = output file name (default extension = ".txt")

Example:

->sp1.savedoc("my_scene")

->

See also (class function)

save

| HOME | BACK |


SAVETIF

| HOME | BACK |

Purpose

To save as Tag Image File (TIF) format.

if a file name extension is not given, the function assumes an extension of ".tif".

if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".

Class

SPOT

Usage

{void} object.SAVETIF({String} argm1)

argm1 = output file name

Example:

->sp1.savetif("my_tif")

->

See also (class function)

savebmp

| HOME | BACK |


SD

| HOME | BACK |

Purpose

To determine the value of the standard deviation of all elements in a SPOT object.

Class

SPOT

Usage

{double} ret  =  object.SD()

Example:

->sd = sp1.sd()

->

See also (class function)

max, min, mean

| HOME | BACK |