Skip to content

Instantly share code, notes, and snippets.

@ALevitskyy
ALevitskyy / extrinsic_to_blender.py
Created November 5, 2019 01:03
Convert CV2 extrinsic to Blender camera.object.location and camera.object.rotation_euler parameters
import math
import cv2
import numpy as np
def isRotationMatrix(R):
Rt = np.transpose(R)
shouldBeIdentity = np.dot(Rt, R)
I = np.identity(3, dtype=R.dtype)
n = np.linalg.norm(I - shouldBeIdentity)