You can either use text() to put text into the overlay, or use Brett's utility to burn it into the image: http://www.mathworks.com/matlabcentral/fileexchange/38721-embed-text-and-graphics-in-an-image
Or the Computer Vision System Toolbox has the textInserter object: http://www.mathworks.com/help/vision/ref/vision.textinserterclass.html