Aiming at detecting the random and complicated characteristic of wood surface, we proposed a comprehensive detection algorithm based on computer vision and compressed sensing. First, integral projection method was used to trace and locate the position of a wood plate; then surface images were obtained by blocks. Second, multiscaled features were extracted from image to express the surface characteristic. Third, particle swarm optimization algorithm was used for multiscaled features selection. Finally, the defects and textures were detected by compressed sensing classifier. Five types of wood samples, including radial texture, tangential texture, wormhole, live knot, and dead knot, were used for tests, and the average classification accuracy was 94.7%.