| This study focuses on the actual working environment and working requirements of the bamboo-breaking machine diameter measuring mechanism,and studies the bamboo diameter measurement algorithm based on lightweight cascade network and binocular stereo vision.The USB binocular camera is used as the imaging device,and the Raspberry Pi 4B and Movidius neural computing stick are used as the calculation core to build the measurement system to verify the measurement method.The main contents of this paper include network selection and training,stereo matching algorithm research,contour fitting method research and overall implementation of measurement system.In the part of network selection and training,the lightweight object detection network YOLOv4-Tiny,the lightweight semantic segmentation network MobileNetSegNet and the single-stage instance segmentation network YOLACT are compared and tested.Considering the deployment environment of the model,this study uses a cascade network of lightweight object detection network and semantic segmentation network to complete object detection and image segmentation tasks.The training data set is taken from the real pictures of the end face of the bamboo,and the model is tested and evaluated after the training.In the research part of stereo matching algorithm,the advantages and disadvantages of the current mainstream binocular stereo matching algorithm are analyzed.Aiming at the problem of limited computing resources of embedded devices,the target detection network and ORB(Oriented FAST and Rotated BRIEF)algorithm are used to extract and match the feature points of the bamboo tube end face in the left and right camera images.On the premise of ensuring the accuracy of disparity acquisition,the calculation amount is reduced,and the stereo matching algorithm based on ORB is compared with the stereo matching algorithm based on AD-Census cost and SGBM algorithm.In the research part of contour fitting method,aiming at the need of projection size calculation of target bamboo tube,the contour fitting method of bamboo tube end face is studied.The contour fitting effect and calculation efficiency of circumscribed rectangle method,minimum circumscribed circle method and ellipse Fourier analysis are analyzed and compared.Finally,the minimum circumscribed circle method is used as the main contour fitting method.In the overall implementation part of the measurement system,this study selects Shumeipai 4B as the measurement algorithm to deploy hardware and build a system test platform for experiments.The actual working environment of the diameter measuring mechanism of the bamboo breaking machine is simulated,and the measurement system is tested.The test results show that the diameter measurement system designed in this study is accurate and effective in the specified measurement distance and angle range.The optimal measurement distance of the algorithm is 30~40 cm.The average relative error of bamboo tube outer diameter measurement is 1.43%,the average relative error of thickness measurement is 8.76%,and the detection speed is 7.1 FPS.The system can simultaneously measure the diameter and thickness of bamboo,meet the needs of measuring diameter and changing tool,and evaluate and classify the thickness of bamboo tube,so as to provide basis for tool changing and thickness sorting.In addition,the measurement system has certain flexibility.It can be applied to the size analysis of other products only by completing the data establishment,network training and model deployment corresponding to other targets. |