Laser plasma accelerators (LPAs) have made great progress, achieving electron beam with energy up to 1 GeV from a centimeter scale capillary plasma waveguide. Here, we report the measurement of optical transition radiation (OTR) from the capillary-based LPA electron beams. Transition radiation images, produced by electrons passing through two separate foils (located at 2.3 m and 3.8 m away from the exit of the LPA) were recorded with a high resolution imaging system, respectively. Two magnetic quadrupole lenses were placed right after the capillary to focus and collimate the electron beams. Significant localized spikes appeared in the OTR images when the electron beam was focused by the magnetic quadrupole lenses, indicating the coherence of the radiation and the existence of ultrashort longitudinal structures inside the electron beam. © 2013 Chinese Physical Society and the Institute of High Energy Physics of the Chinese Academy of Sciences and the Institute of Modern Physics of the Chinese Academy of Sciences and IOP Publishing Ltd.