AT_BD Class Function Manual


ADJUST

| HOME | BACK |

Purpose

To perform a block adjustment by using collinearity condition, hence the input measuring coordinates must be in photo coordinate system.  This is the so-called "Bundle Block Adjustment".

Please note that single points, points that only show up in one photo, are not allowed in the model, or an error is reported.

The input Ground control point file can contain points which are not measured in model and they will be automatically discard by the program.

The function requires a filename to store the adjustment result.  If file name extensions are omitted, the function will add default extensions to the files.  The default extension of the camera file is ".txt".  if a path name is not include in the specified file name, the function will store the file in the current data path, set by command "set path".

***** Important Note: sd_xpyp and sd_gcp which are used as default value for SD if it is omitted in the input measuring file, must be set BEFORE reading data (loadobs, and loadgcp).

Class

AT_BD

Usage

{Matrix} ret  =  object.ADJUST({String} argm1)

argm1 = filename to store the adjustment result

Example:

->BLK = AT_BD()

->BLK.focal() = 76.20

->BLK.sd_gcp() = 0.5

->BLK.sd_xpyp() = 0.03

->BLK.loadobs("my_input_data")

->BLK.loadgcp("my_gcp")

->Mtmp = BLK.adjust("my_result")

->

See also (class function)

loadobs, loadgcp

| HOME | BACK |


FOCAL

| HOME | BACK |

Purpose

To report the current setting of default value of focal length of photos in the block.  This is an important constant that is required in the collinearity condition.  The default focal length will only used for those photos that do not have focal length.

Class

AT_BD

Usage

{void} ret  =  object.FOCAL()

Example:

->f = BLK.focal()

->

See also (class function)

sd_xpyp, sd_gcp

| HOME | BACK |


FAPPROX

| HOME | BACK |

Purpose

To report the current setting filename of approximate parameters (EOP).  This filename is set to a null string, "", at the beginning when a AT_BD is created, and determination of approximate parameter values is done in an automatic mode.

If the filename is not a null string, it must exist in the current directory and its content must be as follows.

/This is an example of approx parameters file

/Photo no omega(deg)                   phe(deg)                kappa(deg)              Xo        Yo        Zo


1    3.595112668805153e+002    5.227965302557665e+000    8.992630545893384e+001    132.405    112.132    298.145
2    2.170664509074368e+001    8.022126730666246e+000    8.960050353364960e+001    153.743    -7.636     278.455
3    3.388874837481681e+002    7.791929030113052e+000    9.019551328268842e+001    151.826    221.922    299.800
4    3.276851819863135e+002    7.131497177741535e+000    9.200973368252267e+001    147.362    260.229    261.296
5    3.548627345139510e+002    7.076792410198998e+000    2.380264604842759e+000    146.275    125.514    323.755
6    1.097487146261942e+001    3.507360039413106e+000    2.255205143421900e+000    128.061    39.029     324.180
7    3.326981908218049e+002    4.402853021227315e+000    1.843672930051828e+000    138.638    248.818    296.493
8    3.233395710132011e+002    3.983506857382615e+000    3.595440024660768e+002    133.066    308.129    268.689

 

Class

AT_BD

Usage

{String} ret  =  object.FAPPROX()

Example:

->fname = BLK.fapprox()

->

See also (class function)

sd_xpyp, sd_gcp

| HOME | BACK |


LOADGCP

| HOME | BACK |

Purpose

To load ground control point data from a file.  The file is an ASCII file and must consists of two block of data, namely horizontal ground control and vertical ground control, separated by a symbol "-", strung together at least 3 times, e.g. "-----" (see example in the file below).

For horizontal control points, each record must have 3 or 4 fields, namely point number, x coordinate and y coordinate and SD.  If the last field is omitted, the default SD, set by function "sd_gcp", will be used. 

For vertical control points, each record must have 2 or 3 fields, namely point number, elevation and SD.  If the last field is omitted, the default SD, set by function "sd_gcp", will be used. 

The following shows an example of a ground control point file.  Please note the use of "/" symbol in the data file, which indicates that the particular line is not wanted to be read, could be a comment line, or a wrong piece of data.

If file name extensions are omitted, the function will add default extensions to the files.  The default extension is ".txt".

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".

 

/ AT GCPs' coordinates
/ read from a 1/250,000 topographic map, contour interval 200 m
/ unit = meter
/ Horizontal GCP
/ Pt no X Y SD
/ 1 -667047.376 217712.596 50.000
 2 -619366.596 242930.557 50.000
/ 3 -695941.636 247336.830 50.000
 4 -658920.623 180101.449 50.000
 5 -818214.107 164667.097 50.000
 6 -828170.906 166537.475 50.000
/ more...
/ more...
/ the following line is required by the program to separate 
/ horizontal gcp from vertical gcp
/ it consists of at least 3 minus signes, "-", connected together
-----------------------------------------------------
/ Vertical GCP
/ Pt no Z SD
 1 -34772.627 50.000
 2 -34682.271 50.000
/ 3 -42770.597 50.000
 4 -36566.107 50.000
 5 -52106.999 50.000
 6 -54463.351 50.000
 7 -45169.424 50.000
 8 -46417.985 50.000
/ more...
/ more...

 

Class

AT_BD

Usage

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

argm1 = ground control point filename

Example:

->BLK = AT_BD()

->BLK.loadgcp("my_gcp")

->

See also (class function)

loadobs, adjust

| HOME | BACK |


LOADOBS

| HOME | BACK |

Purpose

To load observation data, 2D x y photo coordinates, from a file.  The file is an ASCII file and must consists of blocks of records having 3 or 4 fields, namely point number, x photo coordinate and y photo coordinate and SD.  If the last field is omitted, the default SD, set by function "sd_xpyp", will be used.

Each block in the observation file must start with a number represent the photo number and followed by its camera focal length.  If the camera focal length is OMITTED, the default value, set bu L-function "focal" is used.  Then it is followed by all measurement in that photo.  Then it starts again with the second photo and so on.  Each photo measurement can come in any order.

The following shows an example of a observation data file.  Please note the use of "/" symbol in the data file, which indicates that the particular line is not wanted to be read, could be a comment line, or a wrong piece of data.

Please note that most points do not have SD, and the setting default value will be used.  Points that require a particular SD can be manually assigned, and the program will ignore the default SD and assign the specified SD to them, for example points 8340304 in photo 83403 in the file below.

If file name extensions are omitted, the function will add default extensions to the files.  The default extension is ".txt".

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".

/ Observation data for AT Bundle adjustment
/ DISP images, focal length 76.20 mm
/ Observed image rectangular coordinates of tie pts and GCPs, unit = mm
/ acc of image coord observation is 0.030 mm (30 micron)
/ Each block starts with Photo number, then followed by observed coord
/ Pt 1-39 are GCPs, others are tie points
/ no single points allowed in this model
/
83403
 1 -7.061 -14.684
 2 -7.923 -25.338
 3 1.490 -12.127
 4 -15.091 -11.434
 5 -0.513 19.742
 6 0.926 21.424
 7 -18.280 20.074
 8 -31.176 29.713
 9 -40.931 11.865
 8340301 1.691 21.589
 8340302 -8.398 8.378
 8340303 -8.119 -3.641
/ 8340304 -4.050 -28.741
 8340305 -11.928 -49.109
 8340306 -30.515 28.588
 8340307 -34.601 14.616
 8340308 -33.001 1.353
 8340309 -32.061 -12.196
 8440301 -48.182 37.053
 8440302 -49.018 31.561
 8440303 -50.464 19.331
84403
 1 36.679 -15.173
 2 35.217 -25.736
 3 44.914 -12.391
 4 28.095 -11.699
 5 43.508 19.729
 6 44.842 21.426
 7 25.459 20.270
 8 12.054 30.327
 9 1.491 12.210
 11 -8.043 21.699
 12 -34.293 14.372
 13 -43.722 23.487
 8340301 45.562 21.546
 8340302 35.401 8.321
 8340303 35.335 -3.817
 8340304 39.016 -29.154
 8340305 30.451 -49.834
 8340306 12.700 29.172
 8340307 8.450 14.931
 8340308 9.811 1.384
 8340309 10.647 -12.433
 8440301 -5.971 38.189
 8440302 -6.867 32.547
 8440303 -8.492 20.004
 8540301 -53.912 28.264
 8540302 -52.692 21.559
 8540303 -43.371 16.195
 8540304 -35.477 32.885
 8540305 -20.811 21.809
 8540306 -45.454 13.658
/ more....
/ ........

 

 

Class

AT_BD

Usage

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

argm1 = observation data filename

Example:

->BLK = AT_3D()

->BLK.loadobs("my_observed_data")

->

See also (class function)

loadgcp, adjust

| HOME | BACK |


NO_ITERATE

| HOME | BACK |

Purpose

To report the current setting of the maximum number of iterations.  In case that the computation can not be converted, the program will stop if the number of iteration reaches this value. 

Class

AT_BD

Usage

{int} ret  =  object.NO_ITERATE()

Example:

->n = BLK.no_iterate()

->

See also (class function)

sd_gcp, sd_xpyp

| HOME | BACK |


NUMSCALE0

| HOME | BACK |

Purpose

To report the current setting of default value of photo scale number, e.g. 15000, 20000.  This value help assign a good approximate value for Z coordinate of each photo.  When an AT_BD is created, its default numscale0 value is -1.  This is to let the program know that it must determine photo scale by itself.

Class

AT_BD

Usage

{double} ret  =  object.NUMSCALE0()

Example:

->sd2 = BLK.numscale0()

->

See also (class function)

z0

| HOME | BACK |


SD_GCP

| HOME | BACK |

Purpose

To report the current setting of default value of standard deviation of ground control.  This value will be only used for those data that have no SD. 

Class

AT_BD

Usage

{double} ret  =  object.SD_GCP()

Example:

->sd1 = BLK.sd_gcp()

->

See also (class function)

sd_xpyp

| HOME | BACK |


SD_XPYP

| HOME | BACK |

Purpose

To report the current setting of default value of standard deviation of observation data, photo coordinates.  This value will be only used for those data that have no SD. 

Class

AT_BD

Usage

{double} ret  =  object.SD_XPYP()

Example:

->sd2 = BLK.sd_xpyp()

->

See also (class function)

sd_gcp

| HOME | BACK |


SELFCALIB

| HOME | BACK |

Purpose

To perform a Bundle Block Adjustment with self calibration.  This function is similar to the traditional block adjustment, except that Interior orientation Parameters (IOP) are also part of the unknown parameters in the mathematic model.

There are up to 10 parameters, namely (Beyer, 1992) **

         c - camera focal length

         xp yp - principal point coordinate

         k1 k2 k3 - radial lens distortion parameters

         A1 A2 - affine parameters for change in x y scale and lack of orthogonality

         p1 p2 - decentric lens distortion

The user is required to enter the number of IOPs being wanted to include in the model.  By specifying the number of parameters, the model is predefined as follows.

no of parameters

(This is the number for ARGUMENT2

see Usage below)

IOP to be determined

1

c

2

xp yp

3

c xp yp

4

c xp yp k1

5

c xp yp k1 A1

51

c xp yp k1 p1

52

c xp yp k1 k2

6

c xp yp k1 A1 p1

61

c xp yp k1 A1 A2

62

c xp yp k1 A1 k2

63

c xp yp k1 p1 p2

64

c xp yp k1 p1 k2

7

c xp yp k1 A1 p1 k2

71

c xp yp k1 A1 p1 A2

72

c xp yp k1 k2 A1 A2

73

c xp yp k1 k2 p1 p2

8

c xp yp k1 A1 p1 k2 A2

81

c xp yp k1 A1 p1 k2 p2

82

c xp yp k1 k2 p1 p2 k3

83

c xp yp k1 k2 A1 A2 k3

9

c xp yp k1 A1 p1 k2 A2 p2

91

c xp yp k1 A1 p1 k2 p2 k3

92

c xp yp k1 A1 p1 k2 A2 k3

10

c xp yp k1 A1 p1 k2 A2 p2 k3

 

 

**Beyer, H. A. (1992) Geometric and Radiometric Analysis of a CCD-Camera Based Photogrammetric Ckise-Range System, Dissertation ETH Nr. 9701, Institute of Geodesy and Photogrammetry, Zurich, 186 pp.

 

Full model with all possible parameters (c, xp, yp, k1, A1, p1, k2, A2, p2, k3)

 

x = xp - c Nx/D + dx

y = yp - c Ny/D + dy

 

dx = dx(radial) + dx(affine) + dx(decentric)

dy = dy(radial) + dy(affine) + dy(decentric)

 

dx(radial) = (k1)(r^2)xb + (k2)(r^4)xb + (k3)(r^6)xb

dy(radial) = (k1)(r^2)yb + (k2)(r^4)yb + (k3)(r^6)yb

 

dx(affine) = -(A1)xb + (A2)yb

dy(affine) = (A2)xb

 

dx(decentric) = (p1)(r^2+2xb^2) + 2(p2)xbyb

dy(decentric) = 2(p1)xbyb + (p2)(r^2 + 2yb^2)

 

where r^2 = xb^2 + yb^2

 

and xb = x-xp

yb = y-yp

 

Class

AT_BD

Usage

{Matrix} ret  =  object.SELFCALIB({String} argm1,{int} argm2)

argm1 = filename to store the adjustment result

argm2 = no of IOP wanted to be in the model (default = 4)

Example:

->Blk = AT_BD()
->Blk.fapprox() = "approx"
->Blk.focal() = 10
->Blk.sd_xpyp() = 0.005
->Blk.sd_gcp() = 0.005
->Blk.no_iterate() = 15

->Blk.loadobs("box_at_xpyp.txt")
->Blk.loadgcp("box_gcp")

->X = Blk.selfcalib("box_calib9.rpt", 9)

->

See also (class function)

adjust

| HOME | BACK |


Z0

| HOME | BACK |

Purpose

To report the current setting of default value of flying height.  This value help assign a good approximate value for Z coordinate of each photo.  When an AT_BD is created, its default Z0 value is -1.  This is to let the program know that it must determine Z0 by itself.

Class

AT_BD

Usage

{double} ret  =  object.Z0()

Example:

->sd2 = BLK.z0()

->

See also (class function)

numscale0

| HOME | BACK |