|
Photo Class Function Manual (E-H) |
Purpose
To make an edge Photo using the Sobel edge detector operator. The result edge Photo is a binary image, whose pixel values are either 0, background, or 255, edge pixel.
Class
Photo
Usage
{Photo} ret = object.EDGESOBEL([{double} argm1])
argm1 = a cutoff value.
A pixel whose slope magnitude larger than cutoff value is considered edge pixel. If not given, the function will determine it by using a noise estimation function.
Example:
|
->ph2 = ph1.edgesobel() -> |
See also (class function)
Purpose
To perform Exterior Orientation (EO) using bundle adjustment single photo resection. The function requires at least 3 ground control points, with x y z coordinate. The input measure coordinates on the photograph can be either row and column numbers, x y image rectangular coordinates, or x y photo coordinates. See details in Understanding Coordinate System.
The function assumes that row and column numbers as input data are measured from the calling photo. If not, they must be converted to x y image rectangular coordinates, or x y photo coordinates. Sometimes the user might measure row and column numbers of points on the original full size image, while the calling photo is a portion, sub-images, of the original photos.
In most circumstances, it is necessary to perform Interior Orientation (IO) prior to EO. IO parameters are used to transform between row and column numbers or x y image rectangular coordinates to x y photo coordinates.
The results Exterior Orientation Parameters (EOP) are used to updated EOP of the calling photo object.
Moreover, an ASCII text file is 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". This can reduce computer time tremendously, especially when the size of the photo is very large.
Class
Photo
Usage
{Matrix} ret = object.EO({VecIdPt2D} argm1, {VecIdPt3D} argm2, [{String} argm3, {int} argm4])
argm1 = list of coordinates with ID, measured on photo
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), 1(image rectangular coordinate), or 2(photo coordinate)
(default = 0 (row and column number))
Example:
|
->Mtmp = ph1.EO(vec_1, vec_2, "my_EO_report",
0)
-> |
See also (class function)
EO_SC1, EO_SC2, EO_SC3, IO
Purpose
To report the current Exterior Orientation Parameters of the photo..
Class
Photo
Usage
{Vector} ret = object.EO_PARA()
Example:
|
->vec_para = ph1.eo_para() -> |
See also (class function)
io_para12, io_para21
Purpose
To perform Exterior Orientation (EO) and self calibration of 1 camera parameter, using bundle adjustment single photo resection. The function requires at least 3 ground control points, with x y z coordinate. The input measure coordinates on the photograph can be either row and column numbers, x y image rectangular coordinates, or x y photo coordinates. See details in Understanding Coordinate System.
The function assumes that row and column numbers as input data are measured from the calling photo. If not, they must be converted to x y image rectangular coordinates, or x y photo coordinates Sometimes the user might measure row and column numbers of points on the original full size image, while the calling photo is a portion, sub-images, of the original photos.
The additional parameter inserted into the bundle adjustment model is the focal length of the camera. This function can be used to calibrate the focal length of an unknown camera. Its best estimated value is reported in the output report file.
The function will update the EOP of the photo, however it will not update the current value of the camera focal length.
In most circumstances, it is necessary to perform Interior Orientation (IO) prior to EO. IO parameters are used to transform between row and column numbers or x y image rectangular coordinates to x y photo coordinates.
The results Exterior Orientation Parameters (EOP) are used to updated EOP of the calling photo object.
Moreover, an ASCII text file is 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". This can reduce computer time tremendously, especially when the size of the photo is very large.
Class
Photo
Usage
{Matrix} ret = object.EO_SC1({VecIdPt2D} argm1, {VecIdPt3D} argm2, [{String} argm3, {int} argm4])
argm1 = list of coordinates, measured on photo
argm2 = list of ground control coordinates
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), 1(image rectangular coordinate), or 2(photo coordinate)
(default = 0 (row and column number))
Example:
|
->Mtmp = ph1.EO_SC1(vec_1, vec_2, "my_EO_report",
0)
-> |
See also (class function)
EO, EO_SC2, EO_SC3, IO
Purpose
To perform Exterior Orientation (EO) and self calibration of 2 camera parameters, using bundle adjustment single photo resection. The function requires at least 3 ground control points, with x y z coordinate. The input measure coordinates on the photograph can be either row and column numbers, x y image rectangular coordinates, or x y photo coordinates. See details in Understanding Coordinate System.
The function assumes that row and column numbers as input data are measured from the calling photo. If not, they must be converted to x y image rectangular coordinates, or x y photo coordinates. Sometimes the user might measure row and column numbers of points on the original full size image, while the calling photo is a portion, sub-images, of the original photos.
The additional parameters inserted into the bundle adjustment model is the x y coordinate of the principal point of the camera. This function can be used to calibrate the coordinate of the principal point of an unknown camera. Its best estimated value is reported in the output report file.
The function will update the EOP of the photo, however it will not update the current value of the camera principal coordinate.
In most circumstances, it is necessary to perform Interior Orientation (IO) prior to EO. IO parameters are used to transform between row and column numbers or x y image rectangular coordinates to x y photo coordinates.
The results Exterior Orientation Parameters (EOP) are used to updated EOP of the calling photo object.
Moreover, an ASCII text file is 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". This can reduce computer time tremendously, especially when the size of the photo is very large.
Class
Photo
Usage
{Matrix} ret = object.EO_SC2({VecIdPt2D} argm1, {VecIdPt3D} argm2, [{String} argm3, {int} argm4])
argm1 = list of coordinates, measured on photo
argm2 = list of ground control coordinates
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), 1(image rectangular coordinate), or 2(photo coordinate)
(default = 0 (row and column number))
Example:
|
->Mtmp = ph1.EO_SC2(vec_1, vec_2, "my_EO_report",
0)
-> |
See also (class function)
EO, EO_SC1, EO_SC3, IO
Purpose
To perform Exterior Orientation (EO) and self calibration of 3 camera parameters, using bundle adjustment single photo resection. The function requires at least 3 ground control points, with x y z coordinate. The input measure coordinates on the photograph can be either row and column numbers, x y image rectangular coordinates, or x y photo coordinates. See details in Understanding Coordinate System.
The function assumes that row and column numbers as input data are measured from the calling photo. If not, they must be converted to x y image rectangular coordinates, or x y photo coordinates. Sometimes the user might measure row and column numbers of points on the original full size image, while the calling photo is a portion, sub-images, of the original photos.
The additional parameters inserted into the bundle adjustment model is the camera focal length, and the x y coordinate of the principal point of the camera. This function can be used to calibrate the camera focal length as well as the coordinate of the principal point of an unknown camera. The best estimated value is reported in the output report file.
The function will update the EOP of the photo, however it will not update the current value of the camera principal coordinate, nor does the camera focal length.
In most circumstances, it is necessary to perform Interior Orientation (IO) prior to EO. IO parameters are used to transform between row and column numbers or x y image rectangular coordinates to x y photo coordinates.
The results Exterior Orientation Parameters (EOP) are used to updated EOP of the calling photo object.
Moreover, an ASCII text file is 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". This can reduce computer time tremendously, especially when the size of the photo is very large.
Class
Photo
Usage
{Matrix} ret = object.EO_SC3({VecIdPt2D} argm1, {VecIdPt3D} argm2, [{String} argm3, {int} argm4])
argm1 = list of coordinates, measured on photo
argm2 = list of ground control coordinates
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), 1(image rectangular coordinate), or 2(photo coordinate)
(default = 0 (row and column number))
Example:
|
->Mtmp = ph1.EO_SC3(vec_1, vec_2, "my_EO_report",
0)
-> |
See also (class function)
EO, EO_SC2, EO_SC3, IO
Purpose
To fill a closed polygon, defined by a poly-line, in a Photo. The fill value is taken from the current value of the red color, set by command "set pencolor".
Class
Photo
Usage
{void} object.FILLPOLY({VecPt2D} argm1)
argm1 = list of x y coordinates of a polygon, stored in a VecPt2D object.
Example:
|
->ph1.fillpoly(pline1) -> |
See also (class function)
drwcircle, drwline, drwpline
Purpose
To report the current value of flag_earth. It indicates whether the computation of x y photo coordinates must take into account the earth curvature correction. When its value is 0 (off), there will be no earth curvature correction applied to photo coordinates. When a Photo is initiated, its flag_earth value is zero (off).
Class
Photo
Usage
{bool} ret = object.FLAG_EARTH()
Example:
|
->flag = A.flag_earth()
-> |
See also (class function)
flag_rdd, flag_refract
Purpose
To report the current value of flag_rdd. It indicates whether the computation of x y photo coordinates must take into account the lens distortion correction. When its value is 0 (off), there will be no lens distortion correction applied to photo coordinates. When a Photo is initiated, its flag_rdd value is one (on).
Class
Photo
Usage
{bool} ret = object.FLAG_RDD()
Example:
|
->flag = A.flag_rdd()
-> |
See also (class function)
flag_earth, flag_refract
Purpose
To report the current value of flag_refract. It indicates whether the computation of x y photo coordinates must take into account the atmospheric refraction correction. When its value is 0 (off), there will be no atmospheric refraction correction applied to photo coordinates. When a Photo is initiated, its flag_refract value is zero (off).
Class
Photo
Usage
{bool} ret = object.FLAG_REFRACT()
Example:
|
->flag = A.flag_refract()
-> |
See also (class function)
flag_rdd, flag_earth
Purpose
To convert from a ground control coordinate, x y z, to row and column number.
Class
Photo
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)
gcp2xpyp
Purpose
To convert from a ground control coordinate, x y z, to x y photo coordinate..
Class
Photo
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 = ph1.gcp2rc(600, 700, 100) -> |
See also (class function)
gcp2xy
Purpose
To get a value of an element at a particular index in a matrix of a Photo. The photo 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
Photo
Usage
{uchar} ret = object.GOGET({int} argm1, {int} argm2)
argm1 = row number
argm2 = column number
Example:
|
->a = ph1.goget(20,360) -> |
See also (class function)
goset, gosetmat
Purpose
To set a value of an element at a particular index in a Matrix of a Photo. The photo 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
Photo
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:
|
->A.goset(20,360, 99) -> |
See also (class function)
goget, gosetmat
Purpose
To set new values of elements in a particular portion in a Matrix of a Photo. An index at which the upper left corner of the sub-matrix to be placed is specified by the user. The photo 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
Photo
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:
|
->ph1.vload("ph_1") Photo virtually loaded... ->b = [10 20; 30 40] ->ph1.gosetmat(1,1,b) -> |
See also (class function)
goget, goset