lincolnhard / head-pose-estimation

Real-time head pose estimation built with OpenCV and dlib
MIT License
580 stars 172 forks source link

HeadPose Angel (SolvePNP) (euler_angle[1, 0] giving slight wrong value) #22

Open vasanthhr opened 5 years ago

vasanthhr commented 5 years ago

Hello All,

I was trying to use this get_head_pose(shape) function to get the x, y and z values of the headpose.

But I was getting slight error on 'y' value whenever the head is straight towards the camera , and it gives some negative value and this value is close to zero.

Can you suggest me how I can get the 'y' value as zero whenever headpose is straight towards camera.

santo4ul commented 5 years ago

Hi @vasanthhr, I'm facing the same problem.. any luck on this?

santo4ul commented 5 years ago

This seems to be an issue with camera calibration. After calibrating my camera and feeding the correct K[] and D[], the boxes are almost accurate.

Hope this helps.

TheMasterRoot commented 5 years ago

This seems to be an issue with camera calibration. After calibrating my camera and feeding the correct K[] and D[], the boxes are almost accurate.

Hope this helps.

what is K[] and D[] and how to calibrate the camera?

vasanthhr commented 5 years ago

@santo4ul @TheMasterRoot @lincolnhard @nanowhiter

Could you please suggest me what values I need to put it in k[] and D[] to get a proper value of euler_angle[1, 0] ?.

I do have another issue, I am trying to compress an image by three times(Assume initial size of an image is 640x480 and then reduced the width and height by three times so final image size becomes 213x160), but roll(poseZ) value is not proper when image gets compressed.

Please let me know solution for these two issues.