Photo Class Function Manual (A-D)

(  )

| HOME | BACK |

Purpose

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

Class

Photo

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 = Photo()
->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 : 200
no of column : 300
no of bit per sample : 8
Compression : no
Image type : gray level
Reading done...

Warning : relation between image and photo coordinates not established (use IO to make it)...

->print ph1(0,0)
            170

See also (class function)

 

| HOME | BACK |


BICUBIC

| HOME | BACK |

Purpose

To get a value at a particular x y photo coordinate, using bi-cubic interpolation.

This function converts the input x y photo coordinate to x y image rectangular coordinate, and calls to function "bicubic" of class Image.

Class

Photo

Usage

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

argm1 = x photo coordinate

argm2 = y photo coordinate

Example:

->val = ph1.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.

This function converts the input x y photo coordinate to x y image rectangular coordinate, and calls to function "bilinear" of class Image.

Class

Photo

Usage

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

argm1 = x photo coordinate

argm2 = y photo coordinate

Example:

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

->

See also (class function)

nearest, bicubic

| HOME | BACK |


CAMERA

| HOME | BACK |

Purpose

To return a Camera object of the current camera of the photo.

Class

Photo

Usage

{Camera} ret  =  object.CAMERA()

Example:

->cam = ph1.camera()

->

See also (class function)

image, io_para12, io_para21, eo_para

| HOME | BACK |


CLOSE

| HOME | BACK |

Purpose

To close a virtually loaded photo.  This function is irrelevant to a normal Image.

Class

Photo

Usage

{void} object.CLOSE()

Example:

->A = Photo()

->A.vload("ph_1")

->A.close()

See also (class function)

vload, load, save

| HOME | BACK |


COR_EARTH

| HOME | BACK |

Purpose

To compute earth curvature correction at a given x y photo coordinate.  The formula is an approximate one, as follows.

dr    =   r * r * r * numscale / ( 2 * earth_radius * camera_focal * SF_1000)

where  dr           = earth curvature correction

       r            = radial distance from principal point (e.g. 100.05 mm)

       numscale     = scale number of photo (e.g. 15000)

       earth_radius = 6370000 m

       camera_focal = camera focal length (e.g. 150 mm)

       SF_1000      = 1000  (unit scale factor to convert from meter to millimeter)

Class

Photo

Usage

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

argm1 = x photo coordinate

argm2 = y photo coordinate

Example:

->print ph1.cor_earth(100,100)

           ( 0.010 , 0.010)

->

See also (class function)

cor_rdd, cor_refract

| HOME | BACK |


COR_RDD

| HOME | BACK |

Purpose

To compute a correction of lens radial distortion at a given x y photo coordinate.  The correction is interpolated linearly from the lens distortion table of the current camera of the photo.

Class

Photo

Usage

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

argm1 = x photo coordinate

argm2 = y photo coordinate

Example:

->print ph1.cor_rdd(100,100)

           ( 0.000 , 0.000)

->

See also (class function)

cor_earth, cor_refract

| HOME | BACK |


COR_REFRACT

| HOME | BACK |

Purpose

To compute atmospheric refraction correction at a given x y photo coordinate.  The formula is adopted from "Manual of Photogrammetry" , as follows.

dr    =   - K * ( r + r * r * r / ( camera_focal * camera_focal))

where  dr           = atmospheric refraction correction

       r            = radial distance from principal point (e.g. 100.05 mm)

       camera_focal = camera focal length (e.g. 150 mm)

       K            = atmostpheric correction constant (is a function of elevation)

Class

Photo

Usage

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

argm1 = x photo coordinate

argm2 = y photo coordinate

argm3 = mean ground elevation (in meter)

Example:

->print ph1.cor_refract(100,100, 20)

           ( -0.003 , -0.003)

->

See also (class function)

cor_rdd, cor_earth

| HOME | BACK |


DRWCIRCLE

| HOME | BACK |

Purpose

To draw a circle in a Photo.

Class

Photo

Usage

{void} object.DRWCIRCLE({double} argm1, {double} argm2, {double} argm3)

argm1 = x photo coordinate of the center of the circle being drawn

argm2 = y photo coordinate of the center of the circle being drawn

argm3 = radius of the circle (in x y photo coordinate system unit)

Example:

->ph1.drwcircle(10,10,3)       

->

See also (class function)

drwline, drwpline

| HOME | BACK |


DRWLINE

| HOME | BACK |

Purpose

To draw an line in a PHoto.

Class

Photo

Usage

{void} object.DRWLINE({double} argm1, {double} argm2, {double} argm3, {double} argm4)

argm1 = x photo coordinate of the first point

argm2 = y photo coordinate of the first point

argm3 = x photo coordinate of the second point

argm4 = y photo coordinate of the second point

Example:

->ph1.drwline(100,100,3,2)       

->

See also (class function)

drwcircle, drwpline

| HOME | BACK |


DRWPLINE

| HOME | BACK |

Purpose

To draw a poly-line in a Photo.

Class

Photo

Usage

{void} object.DRWPLINE({VecPt2D} argm1)

argm1 = list of x y photo coordinates of a poly-line, stored in a VecPt2D object

Example:

->A.drwpline(pline1)       

->

See also (class function)

drwcircle, drwline

| HOME | BACK |


DRWVECCIRCLE

| HOME | BACK |

Purpose

To draw a list of circles in a Photo.

Class

Photo

Usage

{void} object.DRWSQUARE({VecPt2D} argm1, {int} argm2)

argm1 = list x y photo coordinates of centers of circles

argm2 = radius of the circles (in x y photo coordinate system unit)

 

Example:

->ph1.drwveccircle(vec_center,3)       

->

See also (class function)

drwcircle, drwpline, drwline

| HOME | BACK |