March 2019
Intermediate to advanced
538 pages
13h 38m
English
After obtaining the rotation and translation, we project four points from the object coordinate space to the preceding image: tip of the nose, x axis direction, y axis direction, and z axis direction, and draw the arrows in the preceding image:
vector<Point3f> objectPointsForReprojection { objectPoints[2], // tip of nose objectPoints[2] + Point3f(0,0,15), // nose and Z-axis objectPoints[2] + Point3f(0,15,0), // nose and Y-axis objectPoints[2] + Point3f(15,0,0) // nose and X-axis};//...vector<Point2f> projectionOutput(objectPointsForReprojection.size());projectPoints(objectPointsForReprojection, rvec, tvec, K, Mat(), projectionOutput);arrowedLine(out, projectionOutput[0], projectionOutput[1], Scalar(255,255 ...