PreviousNext
Help > Programming PhotoModeler - Scripting/DDE Interface > Commands > GetPhotoCamera
GetPhotoCamera

Description:

Get the camera parameters for a particular photo (useful for calibration or if all you know is the photo number).

Syntax:

"GetPhotoCamera ID"

where:

ID is a unique identifier number for the photograph (>=1).

Return:

"1 !camName! f fw fh xp yp K1 K2 K3 P1 P2" if successful or "0" if not

where:

"camName" is the name of the camera (which might have spaces), "f" is the camera's focal length in mm, "fw fh" are the format size in mm, "xp yp" are the principal point in mm, and "K1 K2 K3 P1 P2" are the lens distortion parameters.

Failure returns

- incorrect number of parameters

- no project is open

- 'ID' does not correspond to an existing photo

Example:

"GetPhotoCamera 1"

returned "1  !nikon1! 35.2 36.2 23.8 18.2 12.1 0.000023 0.000004 0.00003"