I was doing example 11-1 of \"Learning OpenCV\" by Bradski. Unfortunately the given example doesn\'t work on my computer.
The program is supposed to calibrate camera
try
cvRemap( t, image, mapx, mapy ); cvUndistort2(t ,image , intrinsic, distortion);
instead of
cvRemap( image, t, mapx, mapy ); // Undistort image cvUndistort2(image, t, intrinsic, distortion);