---
title: "InternalParams"
description: "API documentation for InternalParams"
url: https://developer.disguise.one/python-api/docs/internalparams/
---

# InternalParams

Internal (intrinsic) parameters of a camera or projector system  
Represent the internal parameters of a camera or projector system, e.g.  
sensor and lens characteristics of a pinhole camera model.

See also: [Calibration Guide](/plugins/guides/calibration)

Base class: _\_BlipValue_

## Constructors

#### **\_\_init\_\_**(self)

Constructor using default values for 1080p HD, 1/2” sensor, f=15mm  
Create a set of internal parameters of an optical system, e.g. a camera  
or projector.

#### **\_\_init\_\_**(self, imgSize: _[Int2](/python-api/docs/int2#int2)_, focal: _float_, pixSize: _[Vec2](/python-api/docs/vec2#vec2)_, ppShift: _[Vec2](/python-api/docs/vec2#vec2)_)

Constructor for specifying most important parameters

Create a set of internal parameters of an optical system, e.g. a camera  
or projector.  
Note: The focal length, pixel size and focus distance must be specified in the  
same unit (e.g. \[m\])!

**Parameters**:

-   imgSize image width and height in \[pixel\]
-   focal focal length of lens in \[m\]
-   pixSize physical size of a single pixel on the sensor in \[m\] (implicitly pixel aspect ratio)
-   ppShift horizontal and vertical shift of principal point on image plane in \[pixel\]

## Methods

#### **getAspectRatio**(self) -> _float_

Get image aspect ratio

#### **getFocalLengthPixels**(self) -> _[Vec2](/python-api/docs/vec2#vec2)_

Get focal length in pixels

#### **getFovX**(self, bAdjustForFocus: _bool_) -> _float_

Calculate the horizontal field of view in \[rad\]

#### **getFovY**(self, bAdjustForFocus: _bool_) -> _float_

Calculate the vertical field of view in \[rad\]

#### **getMatrix**(self, verbose: _int_) -> _[Mat](/python-api/docs/mat#mat)_

Get the internal transformation matrix resulting in pixel coordinates

NOTE: This matrix does not contain perspective elements to divide by Z!

#### **getPixelAspectRatio**(self) -> _float_

Get pixel image aspect ratio

#### **getPrincipalPoint**(self) -> _[Vec2](/python-api/docs/vec2#vec2)_

Calculate the principal point position in \[pixels\]

#### **getSensorAspectRatio**(self) -> _float_

Get image sensor aspect ratio

#### **getSensorSize**(self) -> _[Vec2](/python-api/docs/vec2#vec2)_

Get full image sensor size in \[m\]

#### **getThrowRatio**(self) -> _float_

Calculate the throw ratio using focal length and sensor size: D/W = f/s\_x

#### **setIntrinsicMatrix**(self, K: _[Mat](/python-api/docs/mat#mat)_, verbose: _int_) -> _bool_

Extract individual parameters from specified intrinsic matrix and set them

-   Use the specified intrinsic matrix to extract individual parameters and then  
    set this objects parameter values to those derived from the matrix.  
    The following parameters are affected:

-   focal length
-   principal point shift  
    If the value extraction from the matrix failed, then no parameters are changed.  
    NOTE: This method uses getIntrinsicParameters() and assumes that the current  
    image size and sensor size stay the same!

**Parameters**:

-   K 3x3 intrinsic matrix with new parameters  
    **Returns** returns ‘false’ if extraction from matrix K failed (not a valid intrinsic matrix)

#### **setPrincipalPoint**(self, ppointX: _float_, ppointY: _float_)

Set the position of the principal point in \[pixels\]

The principal point shift is modified according to the specified position  
and the current image size.
