Как повернуть лицевые ориентиры медиапайпа по осям крена, тангажа и рыскания в Python? ⇐ Python
Как повернуть лицевые ориентиры медиапайпа по осям крена, тангажа и рыскания в Python?
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
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
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
При импорте медиапайпа в мой проект Python происходит сбой моих аудиодрайверов.
Anonymous » » в форуме Python - 0 Ответы
- 21 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Почему Find_all's Find_all из Beautifulsoup не найдет лицевые элементы определенного класса?
Anonymous » » в форуме Html - 0 Ответы
- 3 Просмотры
-
Последнее сообщение Anonymous
-