Skip to main content

TensorMath.solvePnPExtended

Function

Estimates the object pose given a set of object points (inObjectPoints), their corresponding image projections (inImagePoints), and the intrinsic camera matr…

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

solvePnPExtended(inObjectPoints, inImagePoints, imagePointsShape, cameraIntrinsicsMatrix, distortionCoeff, distortionCoeffShape, useExtrinsicGuess, flags, outRotTrans): boolean

Estimates the object pose given a set of object points (inObjectPoints), their corresponding image projections (inImagePoints), and the intrinsic camera matrix (cameraIntrinsicsMatrix). Similar to solvePnP but has additional camera distortion coefficient settings.

distortionCoeff - Input vector of distortion coefficients. If the vector is null - the zero distortion coefficients are assumed.

distortionCoeffShape - {numElements, 1, 1} where numElements can be 4, 5, 8 or 12.

useExtrinsicGuess - The function uses the provided outRotTrans values as initial approximations of the rotation and translation vectors and further optimizes them.

Parameters

ParameterType
inObjectPointsFloat32Array
inImagePointsFloat32Array
imagePointsShapevec3
cameraIntrinsicsMatrixmat3
distortionCoeffFloat32Array
distortionCoeffShapevec3
useExtrinsicGuessboolean
flagsnumber
outRotTransFloat32Array

Returns

boolean