Hi, guys
Im developing a AR Virtual tryon Webapp.
i calculated avg pos between 3 points (vertices) so object is moving with face landmarks correctly.
but i want rotate facemesh along with facelandmarks(vertices/points)
how to calculate rotation with moving vertices or landmark positions
lets say you have point vectors before rotation, after and the offset you have calculated. then you should have: (after - offset) = RotMatrix * before or something like that, right?
now you repeat this for three points, and make 2 matrices using them as columns:
A = [after1 - offset, after2 - offset, after3 - offset]
B = [before1, before2, before3]