Measurement method of tobacco stem length based on machine vision
In response to the challenges posed by traditional manual measurements of tobacco stem length,char-acterized by low efficiency,high labor intensity,and difficulty in ensuring accuracy,a classification measure-ment method for measuring the length of different forms of tobacco stems by machine vision was proposed.This method collects clear digital images of tobacco stems through a 25 million pixel high-end array black-and-white camera.Initially,the images were subjected to preprocessing through median filtering and image opening opera-tions.Subsequently,global threshold segmentation and image connectivity techniques were applied to extract and crop the region of interest within the tobacco stem.Based on morphology,the tobacco stems were then categorized into rectangular and curved types to enhance measurement accuracy.To perform measurements,two distinct approa-ches were employed for these two morphological categories:the minimum bounding rectangle measurement method for rectangular stems and an improved Steger algorithm based on the adaptive width skeleton extraction for curved stems.Fifteen groups of rectangular stems and curved ones with different lengths were selected,and the standard values of tobacco stems measured by three-coordinate measuring instrument were compared with the measured values of this method.Experimental results demonstrate that the maximum relative errors of rectangular and irregular stems measured by this method are-0.196%and-0.109%,respectively,and the maximum repeated measurement errors for a single tobacco stem are 0.008 mm and 0.006 mm,respectively.This method not only has high accuracy and good stability,but also significantly reduces labor intensity and has broad practical application potential.