Table of Contents

Struct Intrinsics

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

Represents parameters that describe the camera intrinsic properties such as the focal length or lens distortion.

public struct Intrinsics : IEquatable<Intrinsics>
Implements
Inherited Members

Fields

FocalLength

The focal length of the camera.

public Point2d FocalLength

Field Value

Point2d

ImageSize

The image size of the camera, in pixels.

public Size? ImageSize

Field Value

Size?

PrincipalPoint

The principal point of the camera.

public Point2d PrincipalPoint

Field Value

Point2d

RadialDistortion

The radial distortion coefficients of the camera.

public Point3d RadialDistortion

Field Value

Point3d

TangentialDistortion

The tangential distortion coefficients of the camera.

public Point2d TangentialDistortion

Field Value

Point2d

Properties

FovY

Gets the vertical field of view of the camera.

public double? FovY { get; }

Property Value

double?

Methods

Equals(Intrinsics)

Returns a value indicating whether this instance is equal to the specified Intrinsics structure.

public bool Equals(Intrinsics other)

Parameters

other Intrinsics

The Intrinsics object to compare with this instance.

Returns

bool

true if other represents the same parameter values as this instance; otherwise, false.

Equals(object)

Returns a value indicating whether the specified object is an Intrinsics structure with the same parameter values as this Intrinsics structure.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if obj is an Intrinsics structure and has the same parameter values as this structure; otherwise, false.

FromCameraMatrix(Mat, Mat, Size?)

Returns an Intrinsics structure representing the camera intrinsic parameters extracted from a camera matrix, lens distortion and optional image size.

public static Intrinsics FromCameraMatrix(Mat cameraMatrix, Mat distortionCoefficients, Size? imageSize)

Parameters

cameraMatrix Mat

A 2x3 matrix specifying the focal lengths and principal point offset.

distortionCoefficients Mat

A 1x5 or 5x1 vector specifying the coefficients for the lens distortion model.

imageSize Size?

The image size of the camera, in pixels.

Returns

Intrinsics

An Intrinsics object representing the extracted camera intrinsic parameters.

FromCameraMatrix(Mat, Mat, Size?, out Intrinsics)

Initializes an Intrinsics structure representing the camera intrinsic parameters extracted from a camera matrix, lens distortion and optional image size.

public static void FromCameraMatrix(Mat cameraMatrix, Mat distortionCoefficients, Size? imageSize, out Intrinsics intrinsics)

Parameters

cameraMatrix Mat

A 2x3 matrix specifying the focal lengths and principal point offset.

distortionCoefficients Mat

A 1x5 or 5x1 vector specifying the coefficients for the lens distortion model.

imageSize Size?

The image size of the camera, in pixels.

intrinsics Intrinsics

When this method returns, contains an Intrinsics object representing the extracted camera intrinsic parameters.

GetHashCode()

Returns a hash code for this Intrinsics structure.

public override int GetHashCode()

Returns

int

An integer value that specifies a hash value for this Intrinsics structure.

ToString()

Creates a string representation of this Intrinsics structure.

public override string ToString()

Returns

string

A string containing all the parameter values of this Intrinsics structure.

Operators

operator ==(Intrinsics, Intrinsics)

Indicates whether two Intrinsics structures are equal.

public static bool operator ==(Intrinsics left, Intrinsics right)

Parameters

left Intrinsics

The Intrinsics structure on the left-hand side of the equality operator.

right Intrinsics

The Intrinsics structure on the right-hand side of the equality operator.

Returns

bool

true if left and right have equal parameter values; otherwise, false.

operator !=(Intrinsics, Intrinsics)

Indicates whether two Intrinsics structures are different.

public static bool operator !=(Intrinsics left, Intrinsics right)

Parameters

left Intrinsics

The Intrinsics structure on the left-hand side of the inequality operator.

right Intrinsics

The Intrinsics structure on the right-hand side of the inequality operator.

Returns

bool

true if left and right differ in any of their parameter values; false if left and right are equal.