We put forward a new method based on compressed encoding imaging faced with detection for height limit. In the beginning of this paper, we focus on hadamard encoding, and analysis the SNR of hadamard encoding. Then, a new encoding matrix M based on hadamard matrix been put forward. Matrix M is suitable for the sparse image obtained from the detection for height limit, and implement easily on the DMD. Compressed encoding imaging simulation based on measurement matrix M have been done in our work, and demonstrates the feasibility of the design method.