BackgroundMeasuring stem diameter (SD) is a crucial foundation for forest resource management, but current methods require expert personnel and are time-consuming and costly. In this study, we proposed a novel device and method for automatic SD measurement using an image sensor and a laser module. Firstly, the laser module generated a spot on the tree stem that could be used as reference information for measuring SD. Secondly, an end-to-end model was performed to identify the trunk contour in the panchromatic image from the image sensor. Finally, SD was calculated from the linear relationship between the trunk contour and the spot diameter in pixels.ResultsWe conducted SD measurements in three natural scenarios with different land cover types: transitional woodland/shrub, mixed forest, and green urban area. The SD values varied from 2.00 cm to 89.00 cm across these scenarios. Compared with the field tape measurements, the SD data measured by our method showed high consistency in different natural scenarios. The absolute mean error was 0.36 cm and the root mean square error was 0.45 cm. Our integrated device is low cost, portable, and without the assistance of a tripod. Compared to most studies, our method demonstrated better versatility and exhibited higher performance.ConclusionOur method achieved the automatic, efficient and accurate measurement of SD in natural scenarios. In the future, the device will be further explored to be integrated into autonomous mobile robots for more scenarios.