Image Formation by Incoherent and Coherent Transition Radiation from Flat and Rough Surfaces