contrast detection on die casting