Since many enterprises produce a huge number of workpiece images every day, and the existing interactive workpiece segmentation algorithm can not meet the real-time requirements, a workpiece segmentation method combining workpiece morphological features and image segmentation algorithm is proposed. This method consists of four steps:firstly, the image is segmented by use of MeanShift algorithm to extract the target region; secondly, the noise in the target region is eliminated using morphological open operation, and then the connected target region can be separated; thirdly, the edge detection of the target region is carried out to calculate the complete workpiece contour information, and then the workpiece region is determined according to the size of the outer contour area; fourthly, the foreground and background regions are labeled by using the minimal contour rectangle of the workpiece area and the Gaussian mixture model is established using GrabCut algorithm for foreground and background respectively, then the foreground and background regions can be segmented by use of mincut/maxflow algorithm, and finally the workpiece object can be extracted. The experimental results show that, for the samples provided by the manufacturer, the recall and accuracy of the proposed method are 94.97% and 88.48% respectively, and the method has strong practicability and good real-time performance.