In order to improve the operating precision of the harvesting robot,a vision system for intelligently identifying and locating the mature tomato was designed.The active detection method based on structured-light stereo vision was expected to deal with the problem of variable illumination and target occlusion in the glasshouse.The maximum between-cluster variances of hue(H)and saturation(S)value were adopted as the threshold for color segmentation,which weakened the impact on the image caused by the light intensity variation.Through the limit on the pixel size and circularity of the candidate areas,the vision system recognized the fruit area and removed the noise areas.The fruit’s 3D position was computed on the basis of spatial relationship between the laser plane and the camera,when the linear laser was projected on the centre area of the mature fruit.The blue view-scanning laser stripe pixels on the mature fruit were extracted according to its Cb color characteristic.As the field test results show,the measurement error on the fruit radius is less than 5 mm,the centre distance error between the fruit and camera is less than 7 mm,and the single axis coordinate error is less than 5.6 mm.This structured-light vision system could effectively identify and locate mature fruit.