(image: Image)
| 16 | * The result is inverted to convert from world-to-camera to camera-to-world. |
| 17 | */ |
| 18 | export 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. |
no outgoing calls
no test coverage detected