shenasa-ai / head-pose-estimation

Head Pose Estimation using Mediapipe face mesh
45 stars 4 forks source link

How we can calculate the face coordinate in read world ? #1

Open PythonImageDeveloper opened 2 years ago

PythonImageDeveloper commented 2 years ago

Hi, Thanks you for sharing your knowledge, I have some question: Q1- You set the face coordinate in real world to hard code, How you calculate this coordinate? This coordinate will remain static for every time and any faces in picture and any location and position?

Q2 You set focal length *fx, fy = 1w and cx, cy = w/2**, this rule is for simplify? are there exact values for focal lengths of camera?

Q3 If we have multi monitors, is it possible the codes work for them?

HanHailiang commented 1 year ago

Hi, Thanks you for sharing your knowledge, I have some question: Q1- You set the face coordinate in real world to hard code, How you calculate this coordinate? This coordinate will remain static for every time and any faces in picture and any location and position?

Q2 You set focal length *fx, fy = 1w and cx, cy = w/2**, this rule is for simplify? are there exact values for focal lengths of camera?

Q3 If we have multi monitors, is it possible the codes work for them? I noticed this problem too. Let me know if you solve the problem. Thank you

NoNounknow commented 1 year ago

Hi, Thanks you for sharing your knowledge, I have some question: Q1- You set the face coordinate in real world to hard code, How you calculate this coordinate? This coordinate will remain static for every time and any faces in picture and any location and position? Q2 You set focal length *fx, fy = 1w and cx, cy = w/2, this rule is for simplify? are there exact values for focal lengths of camera? Q3** If we have multi monitors, is it possible the codes work for them? I noticed this problem too. Let me know if you solve the problem. Thank you

I'm also interested in how this coordinate is calculated: face_coordination_in_real_world = np.array([ [285, 528, 200], [285, 371, 152], [197, 574, 128], [173, 425, 108], [360, 574, 128], [391, 425, 108] ], dtype=np.float64) Where can I get a more detailed calculation method?

HanHailiang commented 1 year ago

After my simulations and calculations, these points should only be averages, assuming the face is right in the middle of the screen