I'm able to figure out how to produce the camera matrix for a set of stereo cameras without recitification. What I do is I call calibrateCamera twice, this gives me C1, R1 and T1 and C2, R2 and T2, for each camera.
I combine this to make the projection matrix P1 = C1 * [R1|T1], and P2 = C2 * [R2|C2]. This is a 3x4 matrix
I then have a correspondence algorithm of my own that produces a correspondence, and then I feed each of them triangulatePts to get a set of 3D points.
Now, I have the need to use stereo rectification prior to running my correspondence algorithm. I'm stuck as to how to get the projection matrix after doing stereo rectification. We seem to get two rotation matrices(let them be called, R*) and a new projection matrix (P*). How do I combine these now to get a new projection matrix (3x4 matrix) to feed into triangulatePts?
The sample seems to only address as to how to use these matrices and run initUndistorRectifyMap and remap, so that the images get aligned. It also gives me a disparity map, but I don't think I should use that as my sole purpose for doing this is to test a correspondence algorithm, which would result in a good disparity map.
EDIT: I assume no distortion is present in the cameras, which is mostly true in this case.