The Application of Image Segmentation in Distinguishing Different Components of the Casting Slice