Abstract:96.7%、93.1%,。A machine vision approach for the detection of greenhouse cucumbers with near-infrared spectral imaging was presented. Firstly, a spectral image using certain near-infrared wavelength was applied to resolve the fruit information representation within the similar-color background. Secondly, fruit was recognized based on the following steps: region partition according to gray distribution of vertical histogram, optimized threshold of invariable intensity moment on divided local image, noise elimination using specified morphological template. Thirdly, the region for robotic grasping of cucumber fruit was determined by texture feature analysis and the cutting point was located with inertia axis principle. The experimental results showed that the correct recognition rate of fruit is 93.3%, as well as the rates of the grasping point and cutting point within the effective range are 96.7% and 93.1% respectively.