OpenCV for Unity 2.6.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
AR utilities. More...
Static Public Member Functions | |
static float | CalculateDistance (float frustumSize, float fov) |
Calculate distance. https://docs.unity3d.com/Manual/FrustumSizeAtDistance.html. | |
static float | CalculateFOVAngle (float frustumSize, float distance) |
Calculate FOV angle. https://docs.unity3d.com/Manual/FrustumSizeAtDistance.html. | |
static float | CalculateFrustumSize (float distance, float fov) |
Calculate frustum size. https://docs.unity3d.com/Manual/FrustumSizeAtDistance.html. | |
static Matrix4x4 | CalculateProjectionMatrixFromCameraMatrixValues (float fx, float fy, float cx, float cy, float width, float height, float near, float far) |
Calculate projection matrix from camera matrix values. (OpenCV coordinate system to OpenGL coordinate system) | |
static Matrix4x4 | CameraMatrixValuesFromCalculateProjectionMatrix (Matrix4x4 projectionMatrix, float width, float height, float fovV) |
Calculate camera matrix values from projection matrix. (OpenGL coordinate system to OpenCV coordinate system) | |
static void | ComposeMatrix (Vector3 localPosition, Quaternion localRotation, Vector3 localScale, out Matrix4x4 matrix) |
Compose TRS matrix from position, rotation and scale. | |
static PoseData | ConvertMatrixToPoseData (ref Matrix4x4 matrix) |
Convertes transform matrix to PoseData. | |
static Matrix4x4 | ConvertPoseDataToMatrix (ref PoseData poseData, bool toLeftHandCoordinateSystem=false) |
Convertes PoseData to transform matrix. | |
static Quaternion | ConvertRvecToRot (IList< double > rvec) |
Convertes rvec value to rotation transform. | |
static PoseData | ConvertRvecTvecToPoseData (IList< double > rvec, IList< double > tvec) |
Convertes rvec and tvec value to PoseData. | |
static Vector3 | ConvertTvecToPos (IList< double > tvec) |
Convertes tvec value to position transform. | |
static Dictionary< int, PoseData > | CreatePoseDataDict (IList< int > ids, IList< double > rvecs, IList< double > tvecs) |
Creates pose data dictionary. | |
static void | DecomposeMatrix (ref Matrix4x4 matrix, out Vector3 localPosition, out Quaternion localRotation, out Vector3 localScale) |
Extract position, rotation and scale from TRS matrix. | |
static Quaternion | ExtractRotationFromMatrix (ref Matrix4x4 matrix) |
Extract rotation quaternion from transform matrix. | |
static Vector3 | ExtractScaleFromMatrix (ref Matrix4x4 matrix) |
Extract scale from transform matrix. | |
static Vector3 | ExtractTranslationFromMatrix (ref Matrix4x4 matrix) |
Extract translation from transform matrix. | |
static void | LowpassPoseData (ref PoseData oldPose, ref PoseData newPose, float posThreshold, float rotThreshold) |
Performs a lowpass check on the position and rotation in newPose, comparing them to oldPose. | |
static void | LowpassPoseDataDict (Dictionary< int, PoseData > oldDict, Dictionary< int, PoseData > newDict, float posThreshold, float rotThreshold) |
Performs a lowpass check on the position and rotation of each marker in newDict, comparing them to those in oldDict. | |
static void | SetTransformFromMatrix (Transform transform, ref Matrix4x4 matrix) |
Set transform component from TRS matrix. | |
AR utilities.
|
static |
Calculate distance. https://docs.unity3d.com/Manual/FrustumSizeAtDistance.html.
frustumHeight | One side size of a frustum. |
fov | Field of view. (horizontal or vertical direction) |
|
static |
Calculate FOV angle. https://docs.unity3d.com/Manual/FrustumSizeAtDistance.html.
frustumHeight | One side size of a frustum. |
distance | Distance. |
|
static |
Calculate frustum size. https://docs.unity3d.com/Manual/FrustumSizeAtDistance.html.
distance | Distance. |
fov | Field of view. (horizontal or vertical direction) |
|
static |
Calculate projection matrix from camera matrix values. (OpenCV coordinate system to OpenGL coordinate system)
fx | Focal length x. |
fy | Focal length y. |
cx | Image center point x.(principal point x) |
cy | Image center point y.(principal point y) |
width | Image width. |
height | Image height. |
near | The near clipping plane distance. |
far | The far clipping plane distance. |
|
static |
Calculate camera matrix values from projection matrix. (OpenGL coordinate system to OpenCV coordinate system)
projectionMatrix | Projection matrix. |
width | Image width. |
height | Image height. |
fovV | Vertical field of view. |
|
static |
Compose TRS matrix from position, rotation and scale.
localPosition | Position. |
localRotation | Rotation. |
localScale | Scale. |
matrix | Transform matrix. |
|
static |
|
static |
|
static |
Convertes rvec value to rotation transform.
tvec | Rvec. |
|
static |
|
static |
Convertes tvec value to position transform.
tvec | Tvec. |
|
static |
Creates pose data dictionary.
ids | ids. |
rvecs | Rvecs. |
tvecs | Tvecs. |
|
static |
Extract position, rotation and scale from TRS matrix.
matrix | Transform matrix. This parameter is passed by reference to improve performance; no changes will be made to it. |
localPosition | Position. |
localRotation | Rotation. |
localScale | Scale. |
|
static |
Extract rotation quaternion from transform matrix.
matrix | Transform matrix. This parameter is passed by reference to improve performance; no changes will be made to it. |
|
static |
Extract scale from transform matrix.
matrix | Transform matrix. This parameter is passed by reference to improve performance; no changes will be made to it. |
|
static |
Extract translation from transform matrix.
matrix | Transform matrix. This parameter is passed by reference to improve performance; no changes will be made to it. |
|
static |
Performs a lowpass check on the position and rotation of each marker in newDict, comparing them to those in oldDict.
oldDict | Old dictionary. |
newDict | New dictionary. |
posThreshold | Positon threshold. |
rotThreshold | Rotation threshold. |
|
static |
Set transform component from TRS matrix.
transform | Transform component. |
matrix | Transform matrix. This parameter is passed by reference to improve performance; no changes will be made to it. |