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

Description:

Add a new camera to the project.

Syntax:

"AddCamera cName f fw fh pw ph xp yp K1 K2 K3 P1 P2"

or

"AddCamera cName f fw fh pw ph xp yp K1 K2 K3 P1 P2 photo"

where:

cName is a unique camera name (no spaces), "f" is the camera's focal length in mm, "fw fh" are the format size in mm, "pw ph" are the camera's expected image size in pixels,  "xp yp" are the principal point in mm, "K1 K2 K3 P1 P2" are optional and are the lens distortion parameters, and “photo” is the optional photo number to which this camera is specifically assigned.

Return:

"1" if  successful or "0" if not.

Failure returns

- insufficient number of parameters

- no project is open

- 'cName' already exists in project

Example:

"AddCamera nikon1 35.2 36.2 23.8 1280 1024 18.2 12.1"  OR

"AddCamera cam4 35.2 36.2 23.8 1280 1024 18.2 12.1 0.0003 0.000032 0.000012 0.002 -0.00005"

OR

"AddCamera cam4 35.2 36.2 23.8 1280 1024 18.2 12.1 0.0003 0.000032 0.000012 0.002 -0.00005 2"

return: "1"