yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.65k stars 611 forks source link

P_Affine is not an orthogonal rotation matrix #25

Closed T2hhbmEK closed 3 years ago

T2hhbmEK commented 5 years ago

P attained from https://github.com/YadiraF/face3d/blob/master/face3d/mesh/transform.py#L239 is not an orthogonal rotation matrix.

Here, https://github.com/YadiraF/face3d/blob/master/face3d/morphable_model/fit.py#L254 , we only get an approximation of s, R, t (P != [sR|t]). R is not an orthogonal rotation matrix, either.

The transformation of R to angles, https://github.com/YadiraF/face3d/blob/master/face3d/morphable_model/morphabel_model.py#L140 , is not lossless, because 3 Euler angles cannot reconstruct the matrix R if R is not an orthogonal rotation matrix.