Images (Functions and Variables Available in the Reports)

Images

GetImageInfo - this function has several variables that can be used to output basic information on an image.

Syntax:

  $GetImageInfo( filePath, anyText )

Parameter:

filePath - a path to an image

Available variables:

width - the image width

height - the image height

ratio - aspect ratio: width divided by height

relWidth - it has value 1 if the width is bigger than the height, otherwise it equals to the ratio

relHeight - it has value 1 if the height is bigger than the width, otherwise it equals to the ratio

Example:

  $IterateOrthoProjections(
    $SaveOrtho( "$(orthoGuid)", "color", "ortho_$(orthoIndex)_color.jpg", 800, 800 )
    $GetImageInfo( "ortho_$(orthoIndex)_color.jpg",
      orthoName: $(orthoName), width: $(width), height: $(height), ratio: $(ratio), relWidth: $(relWidth), relHeight: $(relHeight)
    )
  )
                

IterateImages - this function has several variables that can be used to output information on each input in a project.

Syntax:

  $IterateImages( noParametersJustAnyText )

Available variables:

inputImageName - a file name without an extension

inputImageExt - the image extension

inputImagePath - the absolute path without the file name

inputIndex - the index

inputWidth - the width

inputHeight - the height

inputIsAligned - information about alignment of the image

inputCameraIndex - displays camera's index if image was aligned (otherwise displays value -1


NOTE: Variables inputIsAligned and inputCameraIndex give information based on the selected component

ExportImagePriors - this function has several variables that can be used to output prior information on individual inputs in the project based on the inputIndex.

Syntax:

  $ExportImagePriors( srcImage, anyText )

Available variables:

inputIsGeoreferenced - true if the input file is geo-referenced, otherwise false

inputIsLatLong - true if the coordinate system of the input file is Geographic, false if it is Cartesian

inputIsPointCloud - true if the input file is from a laser-scanner point cloud, otherwise false

inputCalibrationPriorType - type of calibration priors (Unknown, Approximate, Fixed)

inputIsPositionPrior - true if the prior position is defined

inputX - the x coordinate of a camera position (it is valid only if the input coordinate system is Cartesian - inputIsLatLong variable is false)

inputY - the y coordinate of the camera position (it is valid only if the input coordinate system is Cartesian)

inputZ - the z coordinate of the camera position (it is valid only if the input coordinate system is Cartesian)

inputLat - the latitude coordinate of the camera position (it is valid only if the input coordinate system is Geographic - inputIsLatLong variable is true)

inputLon - the longitude coordinate of the camera position (it is valid only if the input coordinate system is Geographic)

inputAlt - the altitude coordinate of the camera position (it is valid only if the input coordinate system is Geographic)

inputXOutCS - the X value from the input coordinate system in the output coordinate system

inputYOutCS - the Y value from the input coordinate system in the output coordinate system

inputZOutCS - the Z value from the input coordinate system in the output coordinate system

inputLatOutCS - the latitude value from the input coordinate system in the output coordinate system

inputLonOutCS - the longitude value from the input coordinate system in the output coordinate system

inputAltOutCS - the altitude value from the input coordinate system in the output coordinate system

inputXEuclid - the X value from the input coordinate system in the Euclidean coordinate system

inputYEuclid - the Y value from the input coordinate system in the Euclidean coordinate system

inputZEuclid - the Z value from the input coordinate system in the Euclidean coordinate system

inputCS - a coordinate system in which camera took the image

inputCSUnit - the unit of a coordinate system in which camera took the image

inputCSUnitShort - a short version of the unit's name

inputCSUnitToMeter - the multiplicator used to convert units

inputIsOrientationPrior - true if the prior rotation is defined via Yaw, Pitch, Roll angles

inputYaw - prior rotation angle Yaw (around y axis)

inputPitch - prior rotation angle Pitch (around x axis)

inputRoll - prior rotation angle Roll (around z axis)

inputIsOpkRotationPrior - true if the prior rotation is defined via Omega, Phi, Kappa

inputOmega - prior rotation angle Omega

inputPhi - prior rotation angle Phi

inputKappa - prior rotation angle Kappa

inputIsPriorAccuracy - true if prior position and orientation accuracy is defined

inputAccuracyX - prior accuracy for X (longitude) coordinate

inputAccuracyY - prior accuracy for Y (latitude) coordinate

inputAccuracyZ - prior accuracy for Z (altitude) coordinate

inputAccuracyYaw - prior accuracy for rotation angle Yaw (Omega)

inputAccuracyPitch - prior accuracy for rotation angle Pitch (Phi)

inputAccuracyRoll - prior accuracy for rotation angle Roll (Kappa)

inputIsInsOffsetValid - true if offset between camera center and position sensor is defined

inputInsOfsX - camera offset in X axis

inputInsOfsY - camera offset in Y axis

inputInsOfsZ - camera offset in Z axis

inputInsOfsYaw - camera offset in Yaw rotation angle

inputInsOfsPitch - camera offset in Pitch rotation angle

inputInsOfsRoll - camera offset in Roll rotation angle

calibrationGroup - prior calibration to which image belongs

distortionGroup - prior distortion to which image belongs

inputF - a focal length (prior calibration)

inputPX - the principal point x (prior calibration)

inputPY - the principal point y (prior calibration)

inputAspect - aspect ratio (prior calibration)

inputSkew - input skew coefficient (prior calibration)

inputK1 - radial 1 (prior calibration)

inputK2 - radial 2 (prior calibration)

inputK3 - radial 3 (prior calibration)

inputK4 - radial 4 (prior calibration)

inputT1 - tangential 1 (prior calibration)

inputT2 - tangential 2 (prior calibration)

inputLensModel - input lens distortion model (prior lens distortion)

inputLensModelIndex - input lens distortion model index

Example:

$IterateImages(
    Image name: $(inputImageName)
    Extension: $(inputImageExt)
    Path: $(inputImagePath)
    Index: $(inputIndex)
    Width: $(inputWidth)
    Height: $(inputHeight)

 $ExportImagePriors(inputIndex,
     Geo-referenced: $(inputIsGeoreferenced)
     LatLong: $(inputIsLatLong)
     PointCloud: $(inputIsPointCloud)
     Calibration prior type: $(inputCalibrationPriorType)
     Lat: $(inputLat)
     Lon: $(inputLon)
     Alt: $(inputAlt)
     X: $(inputX)
     Y: $(inputY)
     Z: $(inputZ)
     Focal length: $(inputF)
     Principal point x: $(inputPX)
     Principal point y: $(inputPY)
     Radial 1: $(inputK1)
     Radial 2: $(inputK2)
     Radial 3: $(inputK3)
     Radial 4: $(inputK4)
     Tangential 1: $(inputT1)
     Tangential 2: $(inputT2)
     Aspect ratio: $(inputAspect)
 )
)
                

SaveImage - this function saves an image.

Syntax:

  $SaveImage( srcImage, dstImageFileName )
  or
  $SaveImage( srcImage, dstImageFileName, maxWidth, maxHeight )

Parameters:

srcImage - an image index (a number without quotes) or an image file path (a string with quotes): use the IterateImages function to get indexes of all inputs (see the example below)

dstImageFileName - a path where to store the image

maxWidth - if the image width is bigger than maxWidth, then the image will be scaled so that its width is equal to or less than maxWidth. To keep the original dimensions, use a negative number.

maxHeight - if the image height is bigger than maxHeight, then the image will be scaled so that its height is equal to or less than maxHeight. To keep the original dimensions, use a negative number.

Example:

  $IterateImages(
    $SaveImage( inputIndex, "$(inputImageName)$(inputImageExt)", -1, -1 )
  )
                

ExportImageResolutionStats - this function can be used to output all image resolutions with image counts.

Syntax:

  $ExportImageResolutionStats( noParametersJustAnyText )

Available variables:

imageWidth - an image width

imageHeight - the image height

imageCount - a number of images with the width equal to the imageWidth and with the height equal to the imageHeight

Example:

  $ExportImageResolutionStats(
    Image width: $(imageWidth)
    Image height: $(imageHeight)
    Number of images: $(imageCount)
  )
                

Scripting Report Basics

Learn how to create custom report templates

Function Sets

Functions sets and their functions, expressions and variables

Basic Functions

Project information, exporter scope, and basic function set

Components Scope

Component export functions and variables

Camera Scope

Learn how to get information about cameras

Scene Structure Scope

Learn how to add custom point statics to reports

Control Points and Constraints Scope

Check the list of control points and constraints functionalities

Models Scope

Learn how to generate model reports

Ortho Projection Scope

See the list of ortho projection export functions

Map Scope

See the list of map export functions