Abstract:Aiming at the problem that the breast and belly circumference of pigs cannot be accurately measured due to the barriers of the railing in the study of pig body size detection based on depth camera, a method of combining cubic B-spline curve fitting and edge detection based on threshold analysis was proposed, to achieve the completion of the missing area of the side-view point cloud.The original point cloud data on the left side of the fake pig collected by the DK depth camera was preprocessed, and the side-view point cloud of the pig was extracted by methods such as straight-through filtering, voxel grid down-sampling, statistical filtering and Euclidean clustering. Perform slicing, threshold analysis, projection, and fitting of the side-view point cloud were carried out to obtain the complementary point cloud after curve fitting, and then edge detection was performed on the side-view point cloud to obtain the edge point cloud, and the missing part of the edge point cloud was fitted and complemented to obtain a complete edge point cloud, the complementary point cloud after curve fitting was analyzed and compared with the edge point cloud, and the complementary point cloud was removed beyond the edge to obtain the final side-view complementary point cloud.Automatic extraction and manual extraction of body size measurement points were performed on the uncompleted point cloud and the complete point cloud respectively. The experimental results showed that after completing the missing point cloud of the abdomen by the method, the selection error of the abdominal measurement point was reduced from 1.54cm to 0.64cm. After the missing point cloud of the chest was completed, the selection error of the chest measurement point was reduced from 3.41cm to 0.89cm. The research results can provide a method for the side-view point cloud completion of pigs.