Vision-based on-machine measurement for CNC machine tool