Hi,
You should first read about the homography concept, for example : https://en.wikipedia.org/wiki/Homogra... or http://people.scs.carleton.ca/~c_shu/...
Basically, the matrix H contains the geometric transformation to pass from a view to another view assuming a planar surface in space.
In the tutorial, after the matching of the keypoints, you estimate the homography H using a RANSAC method (a robust method to estimate the homography without (trying to not) taking care of the possible outliers) with :
> Mat H = findHomography( obj, scene, CV_RANSAC );
So :
perspectiveTransform( obj_corners, scene_corners, H);
will just calculate the coordinates of the box corners in the current view / scene to draw the bounding box.
Edit:
The function calculates for each corners (if I am not wrong) :
w = H_31 * obj_corners[i].x + H_32 * obj_corners[i].y + H_33 * 1
scene_corners[i].x = (H_11 * obj_corners[i].x + H_12 * obj_corners[i].y + H_13 * 1) / w
scene_corners[i].y = (H_21 * obj_corners[i].x + H_22 * obj_corners[i].y + H_23 * 1) / w