lincolnhard / head-pose-estimation

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

add Python src #13

Closed nanowhiter closed 6 years ago

nanowhiter commented 6 years ago

Convert c++ code to python code.

Rapternmn commented 6 years ago

There is a problem with cam matrix. Change it by the following code and see the improvement.

double focal_length = frame.cols; Point2d center = cv::Point2d(frame.cols/2,frame.rows/2); cammatrix = (cv::Mat(3,3) << focal_length, 0, center.x, 0 , focal_length, center.y, 0, 0, 1);