|
|
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 photosl and they will be automatically discarded by the program.
The function requires a filename to store the adjustment result. If file name extension is omitted, the function will add default extension to the file. 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).
The resulting output matrix is a one dimensional matrix contains EOP values of each photo and coordinates of tie points. The user can use the computation report to help identify elenment of the output matrix.
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 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". In addition, GPS point coordinates are accepted in the adjustment model. The adjustment process is similar to the normal bundle adjustment with extra observation of GPS points which are intended to be direct observations of projection center coordinates of each photo. The user must pay attention to the offset distance between the camera projection center and the center of the GPS receiver and input this information as arguments of the function.
Please note that single points, points that only show up in one photo, are not allowed in the model, or an error is reported.
By using the "flag_approx_gcp" which is one of the function arhuments, ground control point data are be able to turn on and off to tell the adjustment whether they are real ground control points or just approximations. If the flag is off (=0), the ground control point data will be treated as normal observation data. However, if the flag is on (not eaual zero), the ground control point data will be used for determining parameters at the beginning of the adjustment, and they will be neglect during the adjustment. Adjustment with GPS data still needs ground control points, at least two horizontal points, to use in the parameter approximationprocess.
The function requires a filename to store the adjustment result. If file name extension is omitted, the function will add default extension to the file. 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).
The resulting output matrix is a one dimensional matrix contains EOP values of each photo and coordinates of tie points. The user can use the computation report to help identify elenment of the output matrix.
Class
AT_BD
Usage
{Matrix} ret = object.ADJUSTGPS({String} argm1, {double} argm2,{double} argm3,{double} argm4,{int} argm5)
argm1 = filename to store the adjustment result
argm2, argm3, argm4 = offset distance of GPS receiver in x y z direction.
The origin of the offset distance is the camera projection center.
argm5 = flag approx gcp (0 = off others = on)
(default = 0 meaning GCP data are not approximation)
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") ->Blk.loadgps("my_gps") ->Mtmp = BLK.adjustgps("my_result",10,10,5,0) -> |
See also (class function)
loadobs, loadgcp, loadgps
FOCAL
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 "-", 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 extension is omitted, the function will add default extension to the file. 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 signs, "-", 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, loadgps
Purpose
To load GPS point data from a file. The file is an ASCII file and contains a list of 3D point with ID and standard deviation. If standard deviations are not given a default value of sd will be used.
The following shows an example of a GPS point file.
If file name extension is omitted, the function will add default extension to the file. 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".
/ / /photo id x y z sd 4 58.289 25.642 1373.960 0.00100 5 -439.846 -33.645 1313.970 0.00100 6 23.017 -6.819 1372.820 0.00100 7 -28.715 -2.342 1330.472 0.00100 8 -6232.798 -576.331 2652.972 0.00100 9 -222.392 -454.098 967.198 0.00100 |
Class
AT_BD
Usage
{void} object.LOADGPS({String} argm1)
argm1 = GPS point observation data filename
Example:
->BLK = AT_BD() ->BLK.loadgps("my_gps") -> |
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 extension is omitted, the function will add default extension to the file. 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 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 Close-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() -> |
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