Aim at the complex background of eggplant image in the growing environment, a image segmentation method based on BP neural network was put forward. The EXG gray values of 3×3 neighborhood pixels were obtained as image features through by analyzing the eggplant image. 30 eggplant images were taken as training samples and results of manual segmentation images by Photoshop were regarded as teacher signals. The improved BP algorithm was used to train the parameter of the neural network. The effective parameter was achieved after 120 times of training. The result of this experiment showed that the eggplant fruit could be preferably segmented from the background by using BP neural network algorithm and it could totally meet the demands of the picking robots after further processing by way of combining mathematics morphology with median filtering.