With the aim to realise the transmission of the digital image information with a high-speed and real-time processsing and to reduce the amount of data of the storage, a new theory for image compression, Compressed Sensing(CS), is investigated to solve the problem. The concept of CS theory is introduced and a system for the optical image based on the CS theory is designed, and then it presents a new algorithm for rebuilding the image—Harmonic Orthogonal Matching Pursuit(HXOMP) algorithm. The corresponding numerical simulation and expremental results show that the imaging mechanism can capture the image and compress the data at the same time, and this method can also obtain good results of rebuilding images. Due to small amount of the data used, this method is very useful to transform images with a long distance.