Based on the measurement and positioning of truck in the loading industry,this paper studies the segmentation and measurement methods of truck point clouds based on traditional methods and deep learning.Point cloud semantic segmentation is the basic task of 3D scene understanding,and it has been widely used in fields such as unmanned driving,augmented reality,and robot obstacle avoidance.Traditional point cloud segmentation methods based on clustering and RANSAC model fitting are suitable for regular geometric object segmentation,but the parameters of the algorithm need to be manually set.In order to improve the generalization of the algorithm,this article is based on the basic framework of Point Net++,combined with the latest Transformer technology and attention mechanism to achieve feature extraction and aggregation of KNN neighbors.This paper also studies the methods of data augmentation and completes the training and testing of model in the cloud server.The specific work of this article is as follows.(1)Design measurement schemes according to actual industry and complete point cloud registration and pointy cloud preprocessing.This paper completes data collection based on To F camera,designs the basic parameters of structure of the measurement system,studies point cloud registration and point cloud fusion,analyses the feature of point cloud in the day and night,and finally choose the order and method of pass through filtering,voxel filtering,and statistical filtering.(2)The traditional truck point cloud segmentation is realized based on the European clustering RANSAC model fitting method and normal difference method,and the selfattention deep learning truck segmentation model is designed and implemented.Aiming at the simple and regular car body that separates the front of the car from the car,the front of the car is preliminarily segmented based on European clustering,and then the plane equation of the front rail is accurately fitted based on the RANSAC algorithm.For complex deformed car bodies such as curved bottom plate,multi-layer bottom plate point cloud,and irregular front fence plane,first,select part of the front car body to use the Do N algorithm to strengthen the edge information and filter out the plane information,and then proceed gradually after cutting off the bottom plate and side fence.Iterate all linear equations to determine the position of the front fence.Design a point cloud segmentation model based on the basic framework of Point Net++,Transformer,attention mechanism and KNN neighbors,and complete data augmentation,model training and testing.First,aggregate KNN neighbors feature of sample points based on attentive pooling which learns important information of feature,and the aggregated feature acts as the inputting embeddings of Transformer.Secondly,stack several Transformer to extract advanced semantic feature,and concatenate the Transformer as global feature.Thirdly,concatenate the local point feature and the global feature as the input of segmentation sub-network,and then output the scores.Finally,construct the customized dataset and complete data augmentation to generate a dataset of 5580 samples.Experiments show that overall accuracy is 49.09% and mean intersection-over-union is 18.28%.(3)Based on RANSAC line and plane fitting,Hough transform and other methods,the measurement and positioning of the three-dimensional size of the truck,the offset angle,the origin of the carriage,and the obstacles of the carriage is implemented.For simple car bodies and complex car bodies,the RANSAC fitting is used to gradually fit the floor equation of the car,iteratively fit all the straight lines of the side rails,and determine the highest line equation of the side rails.Finally,based on Hough and model fitting,the line equations of the remaining front fences,obstacles and back fences are determined.Based on the above linear and plane equations,all parameters to be measured are determined.Experiments show that the absolute error is less than 5 cm,the average relative error is less than 2%,and it takes 49 s on average from data collection to parameter output,and the measurement system can meet the requirements of real-time loading. |