A new shape prior segmentation method based on graph cuts is used to segment workpiece images and measure the workpiece posture for grasping workpieces in cluttered industry scene. Firstly, a prior shape is built. Minimum bounding rectangle method is proposed to register the workpiece shape model and the manual shape of the target workpiece to get the prior shape. In order to ensure the segmentation accuracy, a single prior shape is used. The target shape prior knowledge is added to the graph cut model. Secondly, the weight of the shape prior term is adjusted in a self-adaptive manner, so that the shape prior term of the energy function in graph cut method becomes adaptive to the image to be segmented. Thirdly, multiple workpieces in a image can be segmented by the shape prior method. Meanwhile, the optimal position of suction cup for grasping the workpiece is determined. Finally, the structured light vision system is used to acquire the point cloud of the workpiece. The plane of the workpiece is fitted and the normal vector is determined. Thus, the grasping orientation is obtained. The effectiveness of the proposed approach is demonstrated on the workpiece segmentation in the scene with occlusion, light variation and cluttered background. The posture of the planar workpiece acquired through calculation is accurate, and can be applied to the grasping operation in conditions of occlusion, reflection and complicated background.