Bounding box array of points
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Description
Good night,
I am looking for a way with the face points array, get its bounding box and face rotation (tilt, yaw, roll).
`mat = np.array(face_landmarks.landmark)`
It returns the array of face points if I can't find out how it's rotated, at least through the boundigbox knowing its size
Can you help me
CODE
```
camera = cv2.VideoCapture("F:/C0010.MP4")
mp_face_mesh = mp.solutions.face_mesh
mp_drawing = mp.solutions.drawing_utils
with mp_face_mesh.FaceMesh(
static_image_mode = False,
max_num_faces = 1,
min_detection_confidence=0.5) as face_mesh:
while True:
ret, frame = camera.read()
if (ret == 0):
break
frame_rgb = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)
results = face_mesh.process(frame_rgb)
if results.multi_face_landmarks is not None:
for face_landmarks in results.multi_face_landmarks:
mp_drawing.draw_landmarks(frame,face_landmarks)
ys, zs, xs = getaxis(face_landmarks.landmark)
mat = np.array(face_landmarks.landmark)
print (rotation_angles(mat, "XYZ"))
cv2.imshow("FRAME",frame)
k = cv2.waitKey(1) & 0xFF
if (k == 27):
break
camera.release()
```
Contributor guide
Research direction
The issue mentions FaceMesh's face_landmarks.landmark and the np.array(mat) conversion, but no repository file, test, or pyntcloud entry point. First determine whether bounding-box and face-rotation support is in scope, then define the expected inputs and outputs before locating the relevant tests or adding one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100