Aimed at the complexity and randomness of the wood board defects, we propose a novel and efficient method in this paper. Firstly, three-level dual-tree complex wavelet decomposition was used to extract 40 features, including average value, standard deviation and entropy from low-frequency, high-frequency sub-bands and the original image. Then, the particle swarm optimization (PSO) algorithm was applied and 20 key features obtained. Finally, a data dictionary of training samples was constructed based on compressed sensing, and classification of defects was completed by the minimal reconstruction error. Four types of Xylosma racemosum wood samples, i.e., live knot, dead knot, pinhole and crack, were used for the experiment. The recognition rates of the four types were 93.3%, 86.7%, 100% and 93.3%, respectively. Experimental results showed that the good directionality of dual-tree complex wavelets can reflect the complex information of wood board, the PSO can improve the efficiency of classification, and the compressed sensing has the advantages of simple structure and high classification accuracy.