Sorry I am just not sure the code in documentation. As following.
Does this sample code based on raw image (distort) from leap motion or it already assumes the image is undistorted? Thanks!
Leap::Image image_left = frame.images()[0];
Leap::Image image_right = frame.images()[1];
Leap::Vector slopes_left = image_left.rectify(left_camera_pixel);
Leap::Vector slopes_right = image_right.rectify(right_camera_pixel);
//Do the triangulation from the rectify() slopes
float cameraZ = 40/(slopes_right.x - slopes_left.x);
float cameraY = cameraZ * slopes_right.y;
float cameraX = cameraZ * slopes_right.x - 20;
Leap::Vector position = Leap::Vector(cameraX, -cameraZ, cameraY);