Precise edge detection in images of melted specimens of metals and alloys