Как повернуть лицевые ориентиры медиапайпа по осям крена, тангажа и рыскания в Python?Python

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Как повернуть лицевые ориентиры медиапайпа по осям крена, тангажа и рыскания в Python?

Сообщение Anonymous »


I have extracted facial landmarks using mediapipe and stored it in a csv file. When I visualised the face using the 468 x-and y-coordinates, the face that I depicted is rotated in roll, yaw, and pitch axes. I would like to ask how can I rotate the landmark coordinates so that the face can look upright and straightforward?

I have tried to rotate the coordinates in the roll axis with a rotation matrix

rotation_matrix = np.array([[math.cos(angle), -math.sin(angle)], [math.sin(angle), math.cos(angle)]])

However, I have no idea how can I rotate the landmarks in the pitch and yaw axes with the x- and y-coordinates I got. Can anyone help me figure this out?

I am using Python to work on this. Thank you!


Источник: https://stackoverflow.com/questions/780 ... xes-in-pyt
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»