I sense that a lot of people are looking for a simple triangulation method with OpenCV, when they have two images and matching features.
While OpenCV contains the function cvTriangulatePoints in the triangulation.cpp file, it is not documented, and uses the arcane C API.
Luckily, Hartley and Zisserman describe in their excellent book "Multiple View Geometry" (in many cases considered to be "The Bible" of 3D reconstruction), a simple method for linear triangulation. This method is actually discussed earlier in Hartley's article "Triangulation".
I implemented it using the new OpenCV 2.3+ C++ API, which makes it super easy, and here it is before you.