Abstract: A method of automatic positioning of plastic sprue based on Machine Vision has been studied, this method uses morphological operation to segment each part from the workpiece and then recognizes the parts needing to cut by shape matching, finally positions the sprue along the edge of the various parts according to the characteristics of the sprue. This paper uses an improved Canny operator to detect edges of image and Hu moment invariants for shape matching. Through experiments, it proves that the method is feasible and effective and it can position the sprue of the plastic workpiece accurately.