|
AT_BD Class Function Manual |
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
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
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
|
Class
AT_BD
Usage
{String} ret = object.FAPPROX()
Example:
|
->fname = BLK.fapprox() -> |
See also (class function)
sd_xpyp, sd_gcp
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 "-", stung 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
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
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
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
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
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
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 9 parameters, namely
c - camera focal length
xp yp - principal point coordinate
k1 k2 - 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 |
IOP to be determined |
| 1 | c |
| 2 | xp yp |
| 3 | c xp yp |
| 4 | c xp yp k1 |
| 5 | c xp yp k1 A1 |
| 6 | c xp yp k1 A1 p1 |
| 7 | c xp yp k1 A1 p1 k2 |
| 8 | c xp yp k1 A1 p1 k2 A2 |
| 9 | c xp yp k1 A1 p1 k2 A2 p2 |
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() -> |
See also (class function)
adjust
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