| Log volume is an important indicator to judge the quality of logs,and end diameter measurement is a major part of log volume detection.At present,most wood factories use manual method to measure the end diameter,which has the problems of low efficiency,large error and long cycle.Machine vision measurement is a non-contact measuring method,which has the advantages of high accuracy,high efficiency and high real-time performance.It has been increasingly used in actual production and life.In this paper,a set of portable non-contact device is developed to measure the diameter of log end,which can effectively complete the measurement work under the premise of ensuring the measurement accuracy.In the detection range of 5-30 cm,the detection error of the measured object with a target size of 10-60 cm is less than 10%.Firstly,this paper designs an image acquisition system based on line laser features.The MCU of the system adopts the STM32H7 controller.The system includes the functions of acquiring images distance information of measurement targets,image processing and data storage and display.Secondly,this paper calibrates corresponding sensors and the camera according to the system requirements,analyzes the region of interest in the line laser image of the measured object,studying the target feature extraction algorithm,and the size calculation scheme is designed.In order to reduce the influence of noise around the line laser on the target features,a method of weighting the gray components of R,G,and B channels is proposed.On this basis,image processing and feature extraction are carried out.Comparing and analyzing the measurement results of three calculation schemes,including perimeter mean method,skeleton length method and horizontal pixel calculation method in the aspect of feature size calculation methods,using four data fitting algorithms to establish corresponding optimal mathematical model.Finally,the measurement device developed in this paper is used to conduct measurement experiments for different types of target objects,data analysis of the measurement results and reasons for the errors are summarized,which proves that the measurement system developed in this paper can meet the measurement needs and has a good application prospect in the field of log end diameter measurement. |