Wood logs need to be measured for size when passing through customs to verify their quantity and volume. Due to the large number of wood logs needs through customs, a fast and accurate measurement method is required. The traditional log measurement methods are inefficient, have significant errors in determining the long and short diameters of the wood, and are difficult to achieve fast measurements in complex wood stacking environments. We use a Mask R-CNN instance segmentation model to detect the contour of the wood log and employ a binocular stereo camera to measure the log diameter. A rotation search algorithm centered on the wood contour is proposed to find long and short diameters and to optimal log size according to the Chinese standard. The experiments show that the Mask R-CNN we trained obtains 0.796 average precision and 0.943 , and the recognition rate of wood log ends reaches 98.2%. The average error of the short diameter of the measurement results is 5.7 mm, the average error of the long diameter is 7.19 mm, and the average error of the diameter of the wood is 5.3 mm.
Wood recognition is necessary for work in the wood trade activities. The advantage of the one-class wood classification method is more generalization, and it only needs positive samples and does not need negative samples in the training phase, so it is suitable for rare wood species inspection. This paper proposed an improved method based on the one-class support vector machine (OCSVM) for wood species recognition. It uses cross-section images acquired with a magnifying glass, which uses a pre-trained VGG16 model for feature extraction, a normal distribution test for key features filtering, and OCSVM to determine the wood species. The results showed that the approach achieved a mean recall of 0.842 for both positive and negative samples, which indicates this method has good performance for wood recognition. In a negative public dataset, the negative recall reached as high as 0.989, which showed that this method has good generalization.