Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2023.
Loading...
Searching...
No Matches
SCameraInternal Class Reference

Allow edition of the internal camera parameters of a SImage. More...

Public Member Functions

number GetFocalLength ()
 Get the focal length in mm. More...
 
number GetPixelSize ()
 Get the pixel size in mm. More...
 
number GetPPAx ()
 Get the X value of the principal point of autocollimation in mm. More...
 
number GetPPAy ()
 Get the Y value of the principal point of autocollimation in mm. More...
 
number GetPPSx ()
 Get the X value of the principal point of symmetry in mm. More...
 
number GetPPSy ()
 Get the Y value of the principal point of symmetry in mm. More...
 
Object GetRadialDistortion ()
 Get the radial distortion coefficients. More...
 
number GetSensorHeight ()
 Get the sensor height in mm. More...
 
number GetSensorWidth ()
 Get the sensor width in mm. More...
 
Object GetTangentialDistortion ()
 Get the tangential distortion coefficients. More...
 
 SCameraInternal ()
 Default constructor. More...
 
 SCameraInternal (SCameraInternal other)
 Construct a SCameraInternal by copying the SCameraInternal other. More...
 
 SetFocalLength (number focalLength)
 Set the focal length in mm. More...
 
 SetPixelSize (number pixelSize)
 Set the pixel size in mm. More...
 
 SetPPA (number xPPA, number yPPA)
 Set the principal point of autocollimation in mm. More...
 
 SetPPS (number xPPS, number yPPS)
 Set the principal point of symmetry in mm. More...
 
 SetRadialDistortion (Array< number > coefK)
 Set the radial distortion coefficients. The input table should have 7 elements. More...
 
 SetSensorSize (number sensorWidth, number sensorHeight)
 Set the sensor size in mm. More...
 
 SetTangentialDistortion (Array< number > coefP)
 Set the tangential distortion coefficients. The input table should have 2 elements. More...
 
string toString ()
 Get the type of the variable. More...
 

Static Public Member Functions

static Object FromFile (string fileName)
 Import an .incam file and create a new SCameraInternal from file. More...
 
static SCameraInternal New ()
 Default constructor. More...
 
static SCameraInternal New (SCameraInternal other)
 Construct a SCameraInternal by copying the SCameraInternal other. More...
 

Detailed Description

Allow edition of the internal camera parameters of a SImage.

See also
SImage, SCameraExternal

Constructor & Destructor Documentation

◆ SCameraInternal() [1/2]

SCameraInternal::SCameraInternal ( )

Default constructor.

◆ SCameraInternal() [2/2]

SCameraInternal::SCameraInternal ( SCameraInternal  other)

Construct a SCameraInternal by copying the SCameraInternal other.

Parameters
other(SCameraInternal) The SCameraInternal to copy

Member Function Documentation

◆ FromFile()

static Object SCameraInternal::FromFile ( string  fileName)
static

Import an .incam file and create a new SCameraInternal from file.

Warning
When you write a '\' in string you need to double it '\\' or use '/' instead. Pay especially attention to this when writing file paths in your scripts.
var path = 'C:/Point.asc'; // valid syntax
var path = 'C:\\Point.asc'; // valid syntax
var path = 'C:\Point.asc'; // invalid syntax
Parameters
fileName(string) The path and name of the .incam file to import
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred
ret.CameraInternal(SCameraInternal) The camera internal parameters

◆ GetFocalLength()

number SCameraInternal::GetFocalLength ( )

Get the focal length in mm.

Returns
(number) The focal length in mm.

◆ GetPixelSize()

number SCameraInternal::GetPixelSize ( )

Get the pixel size in mm.

Returns
(number) The pixel size in mm.

◆ GetPPAx()

number SCameraInternal::GetPPAx ( )

Get the X value of the principal point of autocollimation in mm.

Returns
(number) The X value of the principal point of autocollimation in mm.

◆ GetPPAy()

number SCameraInternal::GetPPAy ( )

Get the Y value of the principal point of autocollimation in mm.

Returns
(number) The Y value of the principal point of autocollimation in mm.

◆ GetPPSx()

number SCameraInternal::GetPPSx ( )

Get the X value of the principal point of symmetry in mm.

Returns
(number) The X value of the principal point of symmetry in mm.

◆ GetPPSy()

number SCameraInternal::GetPPSy ( )

Get the Y value of the principal point of symmetry in mm.

Returns
(number) The Y value of the principal point of symmetry in mm.

◆ GetRadialDistortion()

Object SCameraInternal::GetRadialDistortion ( )

Get the radial distortion coefficients.

Return values
ret.CoefK(Array<number>) The table of radial distortion coefficients

◆ GetSensorHeight()

number SCameraInternal::GetSensorHeight ( )

Get the sensor height in mm.

Returns
(number) The sensor height in mm.

◆ GetSensorWidth()

number SCameraInternal::GetSensorWidth ( )

Get the sensor width in mm.

Returns
(number) The sensor width in mm.

◆ GetTangentialDistortion()

Object SCameraInternal::GetTangentialDistortion ( )

Get the tangential distortion coefficients.

Return values
ret.CoefP(Array<number>) The table of tangential distortion coefficients

◆ New() [1/2]

static SCameraInternal SCameraInternal::New ( )
static

Default constructor.

Returns
(SCameraInternal) The new SCameraInternal.

◆ New() [2/2]

static SCameraInternal SCameraInternal::New ( SCameraInternal  other)
static

Construct a SCameraInternal by copying the SCameraInternal other.

Parameters
other(SCameraInternal) The SCameraInternal to copy
Returns
(SCameraInternal) The new SCameraInternal.

◆ SetFocalLength()

SCameraInternal::SetFocalLength ( number  focalLength)

Set the focal length in mm.

Parameters
focalLength(number) The focal length in mm.

◆ SetPixelSize()

SCameraInternal::SetPixelSize ( number  pixelSize)

Set the pixel size in mm.

Parameters
pixelSize(number) The pixel size in mm.

◆ SetPPA()

SCameraInternal::SetPPA ( number  xPPA,
number  yPPA 
)

Set the principal point of autocollimation in mm.

Parameters
xPPA(number) The X value of the principal point of autocollimation in mm.
yPPA(number) The Y value of the principal point of autocollimation in mm.

◆ SetPPS()

SCameraInternal::SetPPS ( number  xPPS,
number  yPPS 
)

Set the principal point of symmetry in mm.

Parameters
xPPS(number) The X value of the principal point of symmetry in mm.
yPPS(number) The Y value of the principal point of symmetry in mm.

◆ SetRadialDistortion()

SCameraInternal::SetRadialDistortion ( Array< number >  coefK)

Set the radial distortion coefficients. The input table should have 7 elements.

Parameters
coefK(Array<number>) The radial distortion coefficients table. Should contain 7 elements

◆ SetSensorSize()

SCameraInternal::SetSensorSize ( number  sensorWidth,
number  sensorHeight 
)

Set the sensor size in mm.

Parameters
sensorWidth(number) The sensor width in mm.
sensorHeight(number) The sensor height in mm.

◆ SetTangentialDistortion()

SCameraInternal::SetTangentialDistortion ( Array< number >  coefP)

Set the tangential distortion coefficients. The input table should have 2 elements.

Parameters
coefP(Array<number>) The tangential distortion coefficients table. Should contain 2 elements.

◆ toString()

string SCameraInternal::toString ( )

Get the type of the variable.

Returns
(string) The type name