Wood defect detection technology based on machine vision is of great significance to improve the quality of sawn timber,classification of sawn timber,and accelerate the automation of wood processing.In this paper,wood defects such as dead knot,living knot,insect eye and crack image were studied.The machine vision nondestructive testing of wood defects was studied deeply.The main contents include:(1)Wood defect segmentation: Image segmentation is the key step of wood surface defect detection.Aiming at the shortage of traditional segmentation algorithm,a two-component linear segmentation algorithm based on RGB color space is proposed.According to the experimental analysis,no matter what defect type,it will have a better segmentation effect for the defect with color change,and the correct segmentation rate of the living and dead knots can reach 87.5%.(2)Recognition of Wood Defect Type: Defect Type Recognition is usually based on neural network recognition.In this paper,convolution neural network and BP neural network are tested for defect recognition,and the recognition effect of the two networks is compared.Through the test data,it can be concluded that the accuracy of defect type identification by convolution neural network is up to 1%.The recognition rate of BP neural network is 80%.In addition,CNN network does not need complicated pretreatment process,and it has the advantages of less time and strong robustness.Therefore,convolution neural network is used to identify wood defects.(3)Wood defect location: CMOS industrial camera was used to obtain the image of wood defect in a constant light intensity lamp box.In this paper,the calibration algorithm refers to Zhang Zhengyou calibration method and Camera Calibration development kit,so as to obtain the camera’s internal parameters,external parameters and distortion coefficient.The calibration results are used to correct the image and make the location test.In this paper,locating the center of gravity of irregular defects is used to locate defects.By comparing the center of gravity identified by the algorithm with the actual measured center of gravity,it is found that the error between them is(-1.10 cm,0.92 cm).By combining the coordinates of the center of gravity and the defect external rectangle,we can achieve the goal of eliminating the defects accurately.Through the segmentation,identification and location of wood defects,this paper can provide a systematic solution for industrial wood defect detection,and expand the application of machine vision in wood defect detection. |