			outputText << allCornersFound.size() << " chessboards found and used.";
			putText(displayImage, outputText.str(), cv::Point(50, 50), 1, 1.0, cv::Scalar(255,0,0));
			
			// Display the image.
			cv::imshow(calibrationWindowName, displayImage);

			// Wait 10 ms for a key to be pressed.
			lastKey=cv::waitKey(10);

			switch(lastKey)
			{
				// If the 'a' key was pressed.
				case 'a':
					takeFrame=true;