Low-resolution of terahertz (THz) imaging troubled its applications in the field of medical diagnosis and security inspection. The continuous wave (CW) THz imaging system utilizing a pyroelectric detector has been realized. The two crucial factors were analyzed in theory and verified in experiment; a high-quality THz image with the resolution of 0.4mm was obtained by choosing suitable imaging parameters. In our experiment the THz wave frequency of 2.53 THz, the spot size of 1.8 mm and the step length of 250 mu m were selected to achieve high quality THz image. We also image several samples with different materials utilizing this system, and the results were very good.