MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / getImageWorldQuaternion

Function getImageWorldQuaternion

src/utils/colmapTransforms.ts:18–25  ·  view source on GitHub ↗
(image: Image)

Source from the content-addressed store, hash-verified

16 * The result is inverted to convert from world-to-camera to camera-to-world.
17 */
18export function getImageWorldQuaternion(image: Image): THREE.Quaternion {
19 return new THREE.Quaternion(
20 image.qvec[1], // x
21 image.qvec[2], // y
22 image.qvec[3], // z
23 image.qvec[0] // w
24 ).invert();
25}
26
27/**
28 * Get the world position of a camera from its COLMAP pose.

Callers 2

getImageWorldPositionFunction · 0.85
getImageWorldPoseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected