Temperature measurement and thermal control of die casting processes using CCD cameras